Quote:
Originally Posted by CalgonX
Sorry, you'll have to fix the indentation.
pawn Код:
public AntiWeaponHack(playerid) { new deathreason[256]; new string[128], tmpname[MAX_PLAYER_NAME]; for (new i = 0; i < MAX_PLAYERS; i++) { if( ! IsPlayerAdmin( i ) ) { switch(GetPlayerWeapon(i)) { case 17, 36, 37, 38, 39, 40, 42, 41, 43, 44, 45, 47: { GetWeaponName(GetPlayerWeapon(i),deathreason,255); // <<-- i is the playerid GetPlayerName(i, tmpname, sizeof(tmpname)); format(string, sizeof(string), "[ANTI-CHEAT] %s has been auto-banned for Weapon Hacking [ %s ]", tmpname, deathreason); SendClientMessageToAll(COLOR_RED, string); print(string); Ban(playerid); } } } }
|
Thank you both for your help, Yes i know i suck at indenting but i'm trying.