12.12.2010, 12:54
Basically, i know this sounds noobish, but how could I make a person earn 1 point (score) for every minute they're online?
Thanks in advance!
Thanks in advance!
forward score(playerid); // TOP
public OnPlayerConnect(playerid)
{
SetTimerEx("score", 60000, true, "i");
return 1;
}
public score(playerid) // END
{
SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
return 1;
}
SetTimerEx("score", 60000, true, "d", playerid);
forward Score(playerid); // TOP
new gScoreTimer[MAX_PLAYERS]; // TOP
public OnPlayerConnect(playerid)
{
gScoreTimer[playerid] = SetTimerEx("Score", 60000, true, "i", playerid);
return 1;
}
public OnPlayerDisconnect(playerid)
{
KillTimer(gScoreTimer[playerid]);
return 1;
}
public Score(playerid) // END
{
SetPlayerScore(playerid, GetPlayerScore(playerid) + 1);
return 1;
}