Help with script
#4

@park4bmx

The correct code should look like this:

pawn Код:
new ScoreTimer[MAX_PLAYERS];
ScoreTimer[playerid] = SetTimerEx("AddScore", 3600000, true, "i", playerid);
forward AddScore(playerid);
public AddScore(playerid)
{
     SetPlayerScore(playerid,GetPlayerScore(playerid)+100)
}

//now add this under OnPlayerDISCONNECT, NOT OnPlayerDeath
KillTimer(ScoreTimer[playerid])
Why should you kill the timer when the player died? He'd still play, so you'll have to kill it when he leaves the server / disconnects!
Reply


Messages In This Thread
Help with script - by boyan96 - 29.03.2012, 17:46
Re: Help with script - by Zhao - 29.03.2012, 17:50
Re: Help with script - by park4bmx - 29.03.2012, 17:53
Re: Help with script - by Twisted_Insane - 29.03.2012, 18:10

Forum Jump:


Users browsing this thread: 1 Guest(s)