16.12.2013, 01:41
pawn Код:
new Float:pHealth[MAX_PLAYERS];
stock SetPlayerHealthEx(playerid, Float:cantidad)
{
pHealth[playerid] = cantidad;
SetPlayerHealth(playerid, cantidad);
}
stock GetPlayerHealthEx(playerid, &Float:health)
{
health = pHealth[playerid]);
}
public OnGameModeInit()
{
SetTimer("AnticheatTimer", 1000, 1);
}
forward AnticheatTimer();
public AnticheatTimer()
{
new Float:health;
for(new i;i<MAX_PLAYERS;i++) if(IsPlayerConnected(i))
{
GetPlayerHealth(playerid, health);
if(pHealth[playerid] < health)
{
//cheat, usa ban o lo que quieras
}
if(pHealth[playerid] > health) pHealth[playerid] = health;
}
}