03.12.2011, 15:06
There is an easier way of checking for different weapons instead of copy pasting it like 5 times
Ex:
Ex:
pawn Code:
public OnPlayerUpdate(playerid)
{
new weaponid = GetPlayerWeapon(playerid);//This will cause the "weaponid not defined" Error
new Nam[MAX_PLAYER_NAME];
new str[128];
if( weaponid == 16 || weaponid == WEAPONID || weaponid == WEAPONID2 /* etc etc */) // The weapon ID
{
GetPlayerName(playerid,Nam,sizeof(Nam));
format(str,sizeof(str),"ANTI WEAPON HACK: %s has been banned from server for spawning a bad weapon!",Nam);
SendClientMessageToAll(0xFF0000FF,str);
BanEx(playerid,"ANTI WEAPON HACK: Weapon Hack!");
}
return 1;
}

