KILLTIMER
#5

Another one that I made with this type of variable and that gave the same error because of him being in onplayerconnect

Global Var
pawn Код:
new t_lesswanted[MAX_PLAYERS];
OnPlayerDisconnect
pawn Код:
KillTimer(t_lesswanted[playerid]);
OnPlayerConnect
pawn Код:
t_lesswanted[playerid] = SetTimerEx("call_lesswanted", (60000 * 5), true, "i", playerid);
Code
pawn Код:
forward call_lesswanted(playerid);
pawn Код:
public call_lesswanted(playerid)
{
    if((WantedPoints[playerid] - 1) >= 0)
    {
        static wanSTR[100];
        -- WantedPoints[playerid];
        format(wanSTR, sizeof wanSTR, ">> seu level de procurado abaixou para %02i", WantedPoints[playerid]);
       
        SendClientMessage(playerid, -1, wanSTR);
        SetPlayerWantedLevel(playerid, WantedPoints[playerid]);
    }
    return 0x01;
}
I need the KillTimer activate when the level is 0, and that the code is working again when the player earn stars.
Help please? (:
Reply


Messages In This Thread
KILLTIMER - by dansr - 06.04.2013, 04:13
Re: KILLTIMER - by JaKe Elite - 06.04.2013, 04:16
Re: KILLTIMER - by dansr - 06.04.2013, 04:23
Re: KILLTIMER - by Pottus - 06.04.2013, 05:01
Re: KILLTIMER - by dansr - 06.04.2013, 05:10
Re: KILLTIMER - by Pottus - 06.04.2013, 05:13
Re: KILLTIMER - by dansr - 06.04.2013, 05:14
Re: KILLTIMER - by Pottus - 06.04.2013, 05:16
Re: KILLTIMER - by dansr - 06.04.2013, 05:19

Forum Jump:


Users browsing this thread: 1 Guest(s)