Small problem with SetTimerEx
#1

Hello.
I'm trying to make invincible anti cheat, looks like that:
pawn Код:
#include <a_samp>
 
public OnFilterScriptInit()
{
    SetTimer("AntiCheat", 60000, true);
    return true;
}
forward AntiCheat();
public AntiCheat()
{
    for(new i; i < 1000; i++)
    {
        //if(!IsPlayerConnected(i) || CallRemoteFunction("NoGm", "i", "i")) continue;
        new Float:FirstHp;
        GetPlayerHealth(i, FirstHp);
        SetPlayerHealth(i, FirstHp-1);
        SetTimerEx("CheakGM", 2000, false, "if", "i", "FirstHp");
    }
}
forward CheakGM(playerid, Float:FirstHp);
public CheakGM(playerid, Float:FirstHp)
{
    new Float:SecondHp;
    GetPlayerHealth(playerid, SecondHp);
    if(floatcmp(FirstHp, SecondHp) == 0) Kick(playerid);
    else SetPlayerHealth(playerid, FirstHp);
}
I'm trying to call CheakGM by SetTimerEx, but it's not calling.
What is my problem?

Sorry for my Elnglish. ;(
Reply


Messages In This Thread
Small problem with SetTimerEx - by Anuris - 12.06.2014, 15:14
Re: Small problem with SetTimerEx - by Jefff - 12.06.2014, 16:00
Re: Small problem with SetTimerEx - by TakeiT - 12.06.2014, 16:24
Re: Small problem with SetTimerEx - by Anuris - 12.06.2014, 18:56

Forum Jump:


Users browsing this thread: 2 Guest(s)