#1

How do I get 1 hour to put on / stats
Reply
#2

Well. I'm sure there's a few ways to do it, but the most simplest way would be to create a timer. And at the end of the timers cycle, have it add 1 hour to their user data. Here's a example.

pawn Код:
SetTimerEx("payday", 3600000, true, "i", playerid); //This would create a repeating timer for the playerid.
After that, you would need to forward "payday". So do the following.

pawn Код:
forward payday(playerid);
public payday(playerid)
{
    SendClientMessage(playerid, color, "Congratulations. You have earned 1+ score for playing one hour."); //sends them a message, making them aware of the payday.
    PlayerInfo[playerid][pHours]++; //adds 1 hour to their user data.
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)