Jump to content

[AYUDA]error slothbot


Recommended Posts

Hola a todos, sera que me podrian ayudar con un error del slothbot que es ERROR:Slothbot/sbclient.lua:115: attempt to compare boolean with number esa es la parte donde aparece el error, no se porque pasara porfavor ayuda

function chase_shoot(ped) 
    if (isElement(ped)) then 
        local player = getElementData ( ped, "target" ) 
        if (isElement(player)) and (getElementData (ped, "slothbot") == true) then 
            if (getElementType(player) == "ped") or (getElementType(player) == "player") then 
                if (getElementData ( ped, "status" ) == "chasing" ) and (isElement(player)) then 
                    if (getElementHealth(ped)>0) and (getElementHealth(player)>0) and (getElementData ( ped, "controller" ) == getLocalPlayer()) then 
                        local x,y,z = getElementPosition( player ) 
                        local ex,ey,ez = getElementPosition( ped ) 
                        local isclear = isLineOfSightClear (ex, ey, ez+1, x, y, z+1, true, false, false, true, false, false, false)  
                        if isclear == true then -- if the ped can see the local player 
                            local distance = (getDistanceBetweenPoints3D (ex, ey, ez, x, y, z)) 
                            if (getPedWeapon(ped) < 19)  and (getPedWeapon(ped) ~= 9) then -- if its a melee weapon hat isnt a chainsaw 
                                if (distance < 2 ) then 
                                    triggerServerEvent ( "pedShootTrigger", ped, "melee" ) 
                                    setTimer ( chase_shoot, 2300, 1, ped, player ) 
                                else 
                                    setTimer ( chase_shoot, 1500 ,1 , ped, player ) 
                                end 

Link to comment
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...