27.02.2013, 14:55
Anti Armour Hack
When i connect to the server i get instantly banned when im spawning for armout hack and i dont see why!
My Anti Armour Hack:
pawn Код:
new pArmour[MAX_PLAYERS];
public OnPlayerSpawn(playerid)
{
AntiCheat_SetPlayerArmour(playerid, 0);
return 1;
}
public OnPlayerUpdate(playerid)
{
new Float:Armour;
if(GetPlayerArmour(playerid, Armour) > pArmour[playerid])
}
SendClientMessage(playerid, -1, ""Red"AntiCheat: You've got banned for armour cheating! ");
format(string, sizeof(string), ""Red"AntiCheat: %s Banned | Reason: Armour Cheats! ", GetName(playerid));
SendClientMessageToAll(-1, string);
BanEx(playerid, "Banned By: SERVER | Reason: Armour Cheats! ");
}
else if(GetPlayerArmour(playerid, Armour) < pArmour[playerid])
{
pArmour[playerid] = GetPlayerArmour(playerid, Armour);
}
return 1;
}
stock AntiCheat_SetPlayerArmour(playerid, amount)
{
pArmour[playerid] = amount;
SetPlayerArmour(playerid, amount);
}
Forgot the GetName stock!
Edit:
pawn Код:
stock GetName(playerid)
{
new pName[24];
GetPlayerName(playerid, pName, 24);
return pName;
}