04.07.2012, 18:00
I have a player test by setting their HP to 100 but not their server sided value, and it doesnt send the mesasge to admins like its supposed to.
Код:
public OnGameModeInit() { // Don't use these lines if it's a filterscript SetGameModeText("Blank Script"); AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0); SetTimer("chkhealth",60000,true); SetTimer("chkweapons",60000,true); SetTimer("chkarmour",60000,true); SetTimer("chkmoney",60000,true); SetTimer("chkskin",60000,true); return 1; } forward chkhealth(); public chkhealth() { new astring[MAX_PLAYER_NAME+128],pname[MAX_PLAYER_NAME],Float:hp; for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(logged[i] == 1) { GetPlayerHealth(i,hp); if(hp != health[i]) { format(astring,sizeof(astring),"%s(%i) is possibly health hacking, please investigate!",pname,i); SendClientMessageToAdmins(0xFF0000FF,astring); } } } } } forward chkarmour(); public chkarmour() { new astring[MAX_PLAYER_NAME+128],pname[MAX_PLAYER_NAME],Float:parmour; for(new i = 0; i < MAX_PLAYERS; i++) { if(IsPlayerConnected(i)) { if(logged[i] == 1) { GetPlayerArmour(i,parmour); if(parmour != armour[i]) { format(astring,sizeof(astring),"%s(%i) is possibly armour hacking, please investigate!",pname,i); SendClientMessageToAdmins(0xFF0000FF,astring); } } } } }