Posts: 1,534
Threads: 179
Joined: Apr 2009
Quote:
Originally Posted by [HLF]Southclaw
What you are doing wrong here is declaring an array for all the players inside a loop for all the players.
You don't need to use an array because as soon as you loop passes one ID the armour variable can be re-used:
pawn Код:
forward ArmourTimer(); public ArmourTimer() { new Float:fPlayerArmour; for(new i; i<MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { GetPlayerArmour(i, fPlayerArmour); if( fPlayerArmour > 99.1 ) { printf("Player:%d Armour Hack", i); // ban(...) } } } }
Also for debugging you should print the 'fPlayerArmour' value just to see what it's doing.
If you don't want to spam the console make a quick textdraw and update it with the value using a format.
|
It still doesn't kick me, also doesn't show the print message in the console