01.01.2010, 02:04
That's messy as hell.
pawn Код:
public AntiHackCheat()
{
new string[128], tmpname[MAX_PLAYER_NAME];
for (new i = 0; i < MAX_PLAYERS; i++)
{
switch(GetPlayerWeapon(i))
{
case 9, 17, 36, 37, 38, 35, 39, 40, 42, 44, 45, 47:
{
GetPlayerName(i, tmpname, sizeof(tmpname));
format(string, sizeof(string), "Hohoho, %s has been auto-banned for weapon hacking.", tmpname);
SendClientMessageToAll(GAME_ENGINE, string);
print(string); // I don't have a clue why you're printing a string that has already been formatted, and formatting it again in printf()
Ban(i);
}
}
}
return 1;
}