devildead622 Posted April 4, 2013 Share 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 ) Link to comment
xXMADEXx Posted April 4, 2013 Share Posted April 4, 2013 Why don't you test and see? and, btw, line 7 is incorrect. Link to comment
DNL291 Posted April 4, 2013 Share 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. Link to comment
فاّرس Posted April 4, 2013 Share Posted April 4, 2013 Syntax ban addBan ( [ string IP, string Username, string Serial, player responsibleElement, string reason, int seconds = 0 ] ) Link to comment
PaiN^ Posted April 4, 2013 Share Posted April 4, 2013 You should use banPlayer instead .. 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