06.03.2009, 16:51
1) You should ask in the SeifAdmin topic
2) Try this
Also add the variables Secs and Mins to thier Account, If you want only one timer then do this
2) Try this
pawn Code:
// Top of script
forward PlayingTime(playerid);
new PlayingTimer[MAX_PLAYERS];
// OnPlayerConnect
PlayingTimer[playerid] = SetTimerEx(blablabla);
// OnPlayerDisconnect
KillTimer[PlayingTimer[playerid);
// Somewhere in scipt
public PlayingTime(playerid)
{
AccountInfo[playerid][Secs]++;
if(AccountInfo[playerid][Secs] == 60)
{
AccountInfo[playerid][Mins]++;
}
if(AccountInfo[playerid][Mins] == 60)
{
AccountInfo[playerid][Hours]++;
}
return 1;
}
pawn Code:
// Top of script
forward PlayingTime();
// OnGameModeInit
SetTimer("PlayingTime", 1000, 1);
// Somewhere in scipt
public PlayingTime()
{
for(new i; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
AccountInfo[i][Secs]++;
if(AccountInfo[i][Secs] == 60)
{
AccountInfo[i][Mins]++;
}
if(AccountInfo[i][Mins] == 60)
{
AccountInfo[i][Hours]++;
}
}
}
return 1;
}

