11.05.2014, 06:36
hello
i have one problem.
When someone uses cheat Health.
Several times is killed.
I once killed.
Please help.
------------
------------
sorry. my bad english
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