06.11.2010, 17:48
How i can buil score system evry 15 minutes playng online is 1 score ?
SetTimer("OnlineTimer",100000,true);
//OnlineTimer is the name of a timer
//100000 is the time = 10 min
//false is if the timer will repeat
//EDIT: put this under your OnPlayerSpawn or OnPlayerConnect callback.
public OnlineTimer
{
new score = GetPlayerScore(playerid);
SetPlayerScore(playerid,score+1);
return 1;
//EDIT: Put this at the bottom of your script.
}
SetTimer("ScoreTimer",900000,true); // 900000 = 15 minutes
public ScoreTimer()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
SetPlayerScore(i,GetPlayerScore(i) + 1);
}
}
}
use this
pawn Code:
pawn Code:
|
forward SetTimer(playerid);