10.04.2014, 09:57
put a timer on ongamemodeinit
it should go every minute and lower the player variable by one, when it reaches 0 you can work again
It should look something like this.
And when you finish work it puts the variable back at 60 or how many minutes you want
Код:
SetTimer("SideJob", 60000, true);
Код:
forward SideJob();
public SideJob();
{
foreach(Player, i)
{
if(PlayerInfo[i][SideJob] >0)
{
PlayerInfo[i][SideJob]--;
if(PlayerInfo[i][SideJob] == 0)
{
SendClientMessage(i, -1, "You can work again");
}
}
}
return 1;
}
And when you finish work it puts the variable back at 60 or how many minutes you want

