public AntiWeapon(playerid) { new string[256]; new sendername[MAX_PLAYER_NAME]; GetPlayerName(playerid, sendername, sizeof(sendername)); new weapon = GetPlayerWeapon(playerid); if(weapon == 1 || 9 || 16 || 17 || 18 || 21 || 22 || 26 || 28 || 32 || 35 || 36 || 37 || 38 || 39 || 40 || 43 || 44 || 45) { Ban(playerid); format(string, sizeof(string), "Auto-Ban System Banned %s, Reason: Weapon Hacks", sendername); SendClientMessageToAll(COLOR_RED, string); } return 1; }
if(weapon == 1 || 9 || 16 || 17 || 18 || 21 || 22 || 26 || 28 || 32 || 35 || 36 || 37 || 38 || 39 || 40 || 43 || 44 || 45)
Originally Posted by GTAguillaume
Код:
if(weapon == 1 || 9 || 16 || 17 || 18 || 21 || 22 || 26 || 28 || 32 || 35 || 36 || 37 || 38 || 39 || 40 || 43 || 44 || 45) |
{ switch (weapon) { case 1: { ...................
case:0 case:1 ect.
public AntiWeapon(playerid)
{
new string[256];
new sendername[MAX_PLAYER_NAME];
GetPlayerName(playerid, sendername, sizeof(sendername));
new weapon = GetPlayerWeapon(playerid);
switch(weapon)
{
case 1, 9, 16, 17, 18, 21, 22, 26, 28, 32, 35:
{
Ban(playerid);
format(string, sizeof(string), "Auto-Ban System Banned %s, Reason: Weapon Hacks", sendername);
SendClientMessageToAll(COLOR_RED, string);
}
}
return 1;
}
Originally Posted by MadeMan
pawn Код:
|