Score by Playing hours
#10

Quote:
Originally Posted by 0ne
Посмотреть сообщение
Hmm, a fail code?


pawn Код:
new OnlineTimer[MAX_PLAYERS];
enum pinfo
{
    MinutesPlayed,
    HoursPlayed
}
new PInfo[MAX_PLAYERS][pinfo];

onplayerconnect:

OnlineTimer[playerid] = SetTimerEx("OnlineTimeUpdate", 60000, 1, "i", playerid);


forward OnlineTimeUpdate(playerid);
public OnlineTimeUpdate(playerid)
{
PInfo[playerid][MinutesPlayed] ++;
if(PInfo[playerid][MinutesPlayed] == 60)
{
PInfo[playerid][HoursPlayed] ++;
SetPlayerScore(playerid,PInfo[playerid][HoursPlayed]);
PInfo[playerid][MinutesPlayed] = 0;
}
}

I tried this code, but the score still stays 0 :[
Reply


Messages In This Thread
Score by Playing hours - by Rady - 12.08.2010, 10:02
Re: Score by Playing hours - by Rady - 12.08.2010, 16:53
Re: Score by Playing hours - by Jakku - 12.08.2010, 16:55
Re: Score by Playing hours - by 0ne - 12.08.2010, 16:58
Re: Score by Playing hours - by Jakku - 12.08.2010, 17:00
Re: Score by Playing hours - by Jakku - 12.08.2010, 17:02
Re: Score by Playing hours - by 0ne - 12.08.2010, 17:02
Re: Score by Playing hours - by Jakku - 12.08.2010, 17:04
Re: Score by Playing hours - by HyperZ - 12.08.2010, 17:08
Re: Score by Playing hours - by Rady - 12.08.2010, 17:34

Forum Jump:


Users browsing this thread: 1 Guest(s)