21.06.2011, 18:09
Well when I set my Admin level to 0, or create a new account, log in, give my self a badweapon, it does nothing.
pawn Код:
//GameModeInit
SetTimer("WeaponHack", 1000, true);
//--------------------------
public WeaponHack(playerid, weaponid)
{
WeaponHackCheck(playerid, weaponid);
return 1;
}
stock WeaponHackCheck(playerid, weaponid)
{
new WeaponName[128];
new string[128];
GetWeaponName( weaponid, WeaponName, sizeof( WeaponName ) );
if(!IsAdmin(playerid,1))
{
switch (weaponid)
{
case 1,18:
{
format(string,sizeof(string),"%s has been banned for weapon Hacking(%s)",pName(playerid), WeaponName);
SendClientMessageToAll(COLOR_LIGHTRED,string);
PlayerInfo[playerid][pBanned] = 1;
Kick(playerid);
}
case 23:
{
format(string,sizeof(string),"%s has been banned for weapon Hacking(%s)",pName(playerid), WeaponName);
SendClientMessageToAll(COLOR_LIGHTRED,string);
PlayerInfo[playerid][pBanned] = 1;
Kick(playerid);
}
case 25,26:
{
format(string,sizeof(string),"%s has been banned for weapon Hacking(%s)",pName(playerid), WeaponName);
SendClientMessageToAll(COLOR_LIGHTRED,string);
PlayerInfo[playerid][pBanned] = 1;
Kick(playerid);
}
case 28,29:
{
format(string,sizeof(string),"%s has been banned for weapon Hacking(%s)",pName(playerid), WeaponName);
SendClientMessageToAll(COLOR_LIGHTRED,string);
PlayerInfo[playerid][pBanned] = 1;
Kick(playerid);
}
case 32,34:
{
format(string,sizeof(string),"%s has been banned for weapon Hacking(%s)",pName(playerid), WeaponName);
SendClientMessageToAll(COLOR_LIGHTRED,string);
PlayerInfo[playerid][pBanned] = 1;
Kick(playerid);
}
case 36,46:
{
format(string,sizeof(string),"%s has been banned for weapon Hacking(%i)",pName(playerid), WeaponName);
SendClientMessageToAll(COLOR_LIGHTRED,string);
PlayerInfo[playerid][pBanned] = 1;
Kick(playerid);
}
}
}
return 1;
}