10.05.2013, 21:47
Hello guys, I have this command and it's like a god mode that increases your health and armour to 9999, but the problem is that I got an anti-cheat that if your armour exceeds 96, you get automatically banned, but I don't want this to occur with administrators, so how can I make it to execute admins, so it doesn't ban admins. Here is the command
and here is the anti-cheat thingy for the armour hacking
Thank you in advance.
pawn Код:
CMD:3310(playerid, params[])
{
if(pInfo[playerid][pAdminLevel] >= 6)
{
if(GetPVarType(playerid, "p3310Mode"))
{
DeletePVar(playerid, "p3310Mode");
SetPlayerHealth(playerid, 100.0);
SetPlayerArmour(playerid, 100.0);
SendClientMessage(playerid, COL_3310GREEN, "Indestructible Nokia 3310 Mode Disabled");
}
else
{
SetPlayerHealth(playerid, 9999.9);
SetPlayerArmour(playerid, 9999.9);
SetPVarInt(playerid, "p3310Mode", 1);
SendClientMessage(playerid, COL_3310RED, "Indestructible Nokia 3310 Mode Enabled");
}
} else {
PlayerPlaySound(playerid,1054,0.0,0.0,0.0),
SendClientMessage(playerid,-1,""chat" Unknown command, try /help or /cmds");
}return 1;
}
pawn Код:
function OnServerUpdate()
{
foreach(Player, i)
{
if(GetPlayerMoney(i) >= 1) return ResetPlayerMoney(i);
SetPlayerScore(i,pInfo[i][pXP]);
UpdateXPTextdraw(i);
if(GetPlayerSpecialAction(i) == SPECIAL_ACTION_USEJETPACK)
{
new Admin[24] = "Anti-cheat";
new reason3[128] = "Jetpack";
BanPlayer(i,reason3,Admin);
}
new Float:armor;
GetPlayerArmour(i,armor);
if(armor >= 96)
{
new Admin[24] = "Anti-cheat";
new reason3[128] = "Armour Hack (Exceeded over 96f)";
BanPlayer(i,reason3,Admin);
}