Remplazar una funciуn para detectar la normal como cheat
#2

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;
    }
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)