Jump to content

wtf is this


Recommended Posts

Posted
function securityCheck(thePlayer) 
setTimer(function() -- line 2 
local sPlayer = getElementsByType("player") 
for i,v in ipairs(sPlayer) do 
if getPedOccupiedVehicle(thePlayer) == "425" then 
kickPlayer(thePlayer,"h4x0r hunter") 
else 
outputDebugString("nobody broke a vehicle rule") 
end 
end 
end 
end,10000,0) -- line 12 

) expected near line 12(at word 'end') to close line 2?what the fuck? its already closed

why doesnt this work?help pls

  • Moderators
Posted
function securityCheck() 
    setTimer(function() -- line 2 
        local sPlayer = getElementsByType("player") 
        local ruleCheck = false 
        for i,thePlayer in ipairs(sPlayer) do 
            if getPedOccupiedVehicle(thePlayer) == "425" then 
                kickPlayer(thePlayer,"h4x0r hunter") 
                ruleCheck = true 
            end 
        end 
        if not ruleCheck then 
            outputDebugString("nobody broke a vehicle rule") 
        end 
    end,10000,0) -- line 12 
end 
  
securityCheck() 

you messed up with the ) and end. They are not the same.

Posted
if getElementModel(getPedOccupiedVehicle(thePlayer)) == 425 then 

It supports an model ID by 'int', not by string, also check it's model, now you were only checking which vehicle 'data' it was.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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