devildead622 Posted April 4, 2013 Posted April 4, 2013 I'm doing an anti cheat and have some doubts the former is: this is correct? function checklife(player) local playerHealth = getElementHealth(player) setTimer (checklife, 2000, 0) if playerHealth >= 102 then local theNoob = getPlayerFromName(player) local theNoobSerial = getPlayerSerial(theNoob) addBan( nil, nil, theNoobSerial, player, "Hacker Detectado! LIXAO!" ) end end addEventHandler( "onPlayerSpawn", getRootElement(), checklife )
xXMADEXx Posted April 4, 2013 Posted April 4, 2013 Why don't you test and see? and, btw, line 7 is incorrect.
DNL291 Posted April 4, 2013 Posted April 4, 2013 See the parameters of onPlayerSpawn event. Use the source instead parameter player. The source of this event is the player that just spawned.
فاّرس Posted April 4, 2013 Posted April 4, 2013 Syntax ban addBan ( [ string IP, string Username, string Serial, player responsibleElement, string reason, int seconds = 0 ] )
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