anti cheat health and armour - pls help
#1

hello
i have one problem.
When someone uses cheat Health.
Several times is killed.
I once killed.
Please help.
------------
Код:
public OnPlayerUpdate(playerid)
{
    new Float:pHealth;
    GetPlayerHealth(playerid, pHealth);
    if(pHealth >= 100)
    {
    new Namep[MAX_PLAYER_NAME], AntiCheatHealthMessage[128];
    GetPlayerName(playerid, Namep, sizeof(Namep));
    format(AntiCheatHealthMessage, sizeof(AntiCheatHealthMessage), "{FF0000}[AntiCheat] Player %s = hacked health", Namep, playerid);
    SendClientMessageToAll(0xFFFFFFFF, AntiCheatHealthMessage);
    SetPlayerHealth(playerid, 0);
	}
    new Float:pArmour;
    GetPlayerArmour(playerid, pArmour);
    if(pArmour >= 100)
    {
    new Namep[MAX_PLAYER_NAME], AntiCheatArmourMessage[128];
    GetPlayerName(playerid, Namep, sizeof(Namep));
    format(AntiCheatArmourMessage, sizeof(AntiCheatArmourMessage), "{FF0000}[AntiCheat] Player %s = hacked armour", Namep, playerid);
    SendClientMessageToAll(0xFFFFFFFF, AntiCheatArmourMessage);
    SetPlayerHealth(playerid, 0);
    }
    return 1;
}
Код:
public OnPlayerSpawn(playerid)
{
	SetPlayerHealth(playerid, 99);
	return 1;
}
------------
sorry. my bad english
Reply


Messages In This Thread
anti cheat health and armour - pls help - by Miladajir - 11.05.2014, 06:36
Re: anti cheat health and armour - pls help - by Xtreme Brotherz - 11.05.2014, 06:52
Re: anti cheat health and armour - pls help - by Miladajir - 11.05.2014, 07:11
Re: anti cheat health and armour - pls help - by Miladajir - 11.05.2014, 07:23
Re: anti cheat health and armour - pls help - by DaniceMcHarley - 11.05.2014, 08:11

Forum Jump:


Users browsing this thread: 1 Guest(s)