CLEO Help Help me to find script

CLEO related
Status
Not open for further replies.

RazooorS

Active member
Joined
Feb 16, 2019
Messages
60
Reaction score
0
I need objectFinder who had one command and he search object for ids 19054, 19055, 19056, 19057, 19058.
 

dphome

Well-known member
Joined
Mar 21, 2020
Messages
458
Solutions
9
Reaction score
166
Location
Poland
I have script lua for you, you need moonloader and sampfuncs.
objects.lua put in GTA\Moonloader.
Screenshots:
Object detector active: J+K
Left Side Bar+ J+left arrow


Code:
local sampev = require 'lib.samp.events'
local font_flag = require('moonloader').font_flag
local my_font = renderCreateFont('Verdana', 6, font_flag.BOLD + font_flag.SHADOW)
local my_font2 = renderCreateFont('Verdana', 12, font_flag.BOLD + font_flag.SHADOW)
local toggle = false
local leftSideBar = false
local count = 0
local searchObjects = {
                            {modelid = 19054,   name = '19054'}, -- name your object
                            {modelid = 19055,   name = '19055'},
                            {modelid = 19056,   name = '19056'},
                            {modelid = 19057,   name = '19057'},
                            {modelid = 19058,   name = '19058'},
                    }
function main()
    repeat wait(0) until isSampAvailable()
    wait(2000)   
    while true do wait(0)
        count = 0
        if isKeyDown(0x4A)  and isKeyDown(0x4B) then
            toggle = not toggle
            if toggle then  printStringNow('~g~ Object detector', 1500)  else printStringNow('~r~ Object detector', 1500) end
        end
        if toggle and wasKeyPressed(0x25) then
            leftSideBar = not leftSideBar
            if leftSideBar then  printStringNow('~g~ Object detector - Left Side Bar', 1500) else printStringNow('~r~ Object detector - Left Side Bar', 1500) end
        end
        if toggle and wasKeyPressed(0x27) then
        end

        if toggle then
            for _, object in ipairs(getAllObjects()) do
                if doesObjectExist(object) then
                    local _, oX, oY, oZ = getObjectCoordinates(object)
                    if _ then
                        if isObjectOnScreen(object) or not isAnyPickupAtCoords(oX, oY, oZ) and isObjectOnScreen(object) then
                            local pX, pY, pZ = getCharCoordinates(PLAYER_PED)
                            local distance = getDistanceBetweenCoords3d(oX, oY, oZ, pX, pY, pZ) distance = round(distance, 2)
                            local wposX, wposY = convert3DCoordsToScreen(oX, oY, oZ)
                            local model = tonumber(getObjectModel(object))

                            for _, s in ipairs(searchObjects) do
                                if s['modelid'] == model then
                                    renderFontDrawText(my_font, ''..s['name']..'\nDistance: '..distance..'', wposX, wposY , 0xffFFFFFF)
                                    if leftSideBar then renderFontDrawText(my_font2, '' ..count.. ' - '..s['name']..' - Distance: '..distance..'', 180, 400 + (count * 25), 0xffFFFFBB) count = count + 1 end
                                else
                                end
                            end
                        end
                    end
                end
            end
        end
    end
end

function round(num, numDecimalPlaces)
    if numDecimalPlaces and numDecimalPlaces>0 then
      local mult = 10^numDecimalPlaces
      return math.floor(num * mult + 0.5) / mult
    end
    return math.floor(num + 0.5)
end
 

Attachments

  • objects.lua
    2.4 KB · Views: 8

RazooorS

Active member
Joined
Feb 16, 2019
Messages
60
Reaction score
0
I have script lua for you, you need moonloader and sampfuncs.
objects.lua put in GTA\Moonloader.
Screenshots:
Object detector active: J+K
Left Side Bar+ J+left arrow


Code:
local sampev = require 'lib.samp.events'
local font_flag = require('moonloader').font_flag
local my_font = renderCreateFont('Verdana', 6, font_flag.BOLD + font_flag.SHADOW)
local my_font2 = renderCreateFont('Verdana', 12, font_flag.BOLD + font_flag.SHADOW)
local toggle = false
local leftSideBar = false
local count = 0
local searchObjects = {
                            {modelid = 19054,   name = '19054'}, -- name your object
                            {modelid = 19055,   name = '19055'},
                            {modelid = 19056,   name = '19056'},
                            {modelid = 19057,   name = '19057'},
                            {modelid = 19058,   name = '19058'},
                    }
function main()
    repeat wait(0) until isSampAvailable()
    wait(2000)  
    while true do wait(0)
        count = 0
        if isKeyDown(0x4A)  and isKeyDown(0x4B) then
            toggle = not toggle
            if toggle then  printStringNow('~g~ Object detector', 1500)  else printStringNow('~r~ Object detector', 1500) end
        end
        if toggle and wasKeyPressed(0x25) then
            leftSideBar = not leftSideBar
            if leftSideBar then  printStringNow('~g~ Object detector - Left Side Bar', 1500) else printStringNow('~r~ Object detector - Left Side Bar', 1500) end
        end
        if toggle and wasKeyPressed(0x27) then
        end

        if toggle then
            for _, object in ipairs(getAllObjects()) do
                if doesObjectExist(object) then
                    local _, oX, oY, oZ = getObjectCoordinates(object)
                    if _ then
                        if isObjectOnScreen(object) or not isAnyPickupAtCoords(oX, oY, oZ) and isObjectOnScreen(object) then
                            local pX, pY, pZ = getCharCoordinates(PLAYER_PED)
                            local distance = getDistanceBetweenCoords3d(oX, oY, oZ, pX, pY, pZ) distance = round(distance, 2)
                            local wposX, wposY = convert3DCoordsToScreen(oX, oY, oZ)
                            local model = tonumber(getObjectModel(object))

                            for _, s in ipairs(searchObjects) do
                                if s['modelid'] == model then
                                    renderFontDrawText(my_font, ''..s['name']..'\nDistance: '..distance..'', wposX, wposY , 0xffFFFFFF)
                                    if leftSideBar then renderFontDrawText(my_font2, '' ..count.. ' - '..s['name']..' - Distance: '..distance..'', 180, 400 + (count * 25), 0xffFFFFBB) count = count + 1 end
                                else
                                end
                            end
                        end
                    end
                end
            end
        end
    end
end

function round(num, numDecimalPlaces)
    if numDecimalPlaces and numDecimalPlaces>0 then
      local mult = 10^numDecimalPlaces
      return math.floor(num * mult + 0.5) / mult
    end
    return math.floor(num + 0.5)
end
Thanks so much but can you add on this script when he located object he show me on the radar
 
Status
Not open for further replies.
Top