Score timer does not work
#4

pawn Код:
#include <a_samp>
new ScoreTimer[MAX_PLAYERS];
new ScoreTimerr[MAX_PLAYERS];

forward UpdateScore(playerid);

public OnPlayerConnect(playerid)
{
    ScoreTimerr[playerid] = SetTimerEx("UpdateScore", 1000, true, "i", playerid);
    ScoreTimer[playerid] = 0;
    return 1;
}

public OnPlayerDisconnect(playerid)
{
    KillTimer(ScoreTimerr[playerid]);
    return 1;
}

public UpdateScore(playerid)
{
    ScoreTimer[playerid] ++;
    if(ScoreTimer[playerid] == 60)
    {
        SetPlayerScore(playerid, GetPlayerScore(playerid) +1);
        ScoreTimer[playerid] = 0;
    }
    return 1;
}
Reply


Messages In This Thread
Score timer does not work - by Johnson_Brooks - 30.08.2012, 15:15
Re: Score timer does not work - by Johnson_Brooks - 30.08.2012, 17:18
Re: Score timer does not work - by Jessyy - 30.08.2012, 17:32
Re: Score timer does not work - by lamarr007 - 30.08.2012, 17:33
Re: Score timer does not work - by Johnson_Brooks - 30.08.2012, 17:39
Re: Score timer does not work - by playbox12 - 30.08.2012, 17:52
Re: Score timer does not work - by Johnson_Brooks - 30.08.2012, 18:12

Forum Jump:


Users browsing this thread: 1 Guest(s)