23.12.2009, 21:00
first you need to make a forward for the payday
we have it here:
Then on OnGameModeInit() we make a timer on 20min
Then the forward we made first is now a public, so we fill in the public.
Untested
That should work,
That'll be it, if it dont work try deleting the timer INSIDE the PayDay callback. then it only goes one time after the server startup
we have it here:
pawn Код:
forward PayDay();
pawn Код:
SetTimer("PayDay",1200000,1);
pawn Код:
public PayDay()
{
for (new i; i < MAX_PLAYERS; i++)
{
if (IsPlayerConnected(i))
{
new string[64];
GivePlayerMoney(i,2000);
format(string, sizeof(string), "You have received your payday on $2000");
SendClientMessage(i, COLOR, string);
SetTimer("PayDay",1200000,1);
}
}
}
That should work,
That'll be it, if it dont work try deleting the timer INSIDE the PayDay callback. then it only goes one time after the server startup