toxicsmoke11 Posted July 15, 2014 Share Posted July 15, 2014 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 Link to comment
Moderators IIYAMA Posted July 15, 2014 Moderators Share Posted July 15, 2014 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. Link to comment
toxicsmoke11 Posted July 15, 2014 Author Share Posted July 15, 2014 i gave myself a hunter and it outputted nobody broke vehicle rule its not working Link to comment
Et-win Posted July 15, 2014 Share Posted July 15, 2014 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. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now