Age system
#3

Quote:
Originally Posted by scottyishere
View Post
Add a timer on OnGameModeInit, something like SetTimer("hourlytime",1000*60*60,true);
Then add the function:
pawn Code:
forward hourlytime();
public hourlytime()
{
   for(new i=0;i<MAX_PLAYERS;i++)
   {
       if(CurrentXP[i]>=1000)
       {
            CurrentAge[i]++;
            CurrentXP[i]-=1000;
       }
   }
}
Oh, now I get it. You can do a check each time the player receives the XP. Like:
pawn Code:
[player receives XP]
if(CurrentXP[playerid]>=1000)
   [stuff I did above]
Reply


Messages In This Thread
Age system - by rokasma - 09.11.2012, 19:30
Re: Age system - by scottyishere - 09.11.2012, 20:18
Re: Age system - by scottyishere - 09.11.2012, 20:20
Re: Age system - by FalconWingsX - 09.11.2012, 20:28
Re: Age system - by rokasma - 09.11.2012, 20:32

Forum Jump:


Users browsing this thread: 1 Guest(s)