30.04.2011, 02:28
Hey All,
This is my first time with PAWN and Ive read through the Wiki couldn't find what I was looking for so I thought Id ask here.
Originally,
I had my Paycheck code only work on Player id 0. So that every 300 seconds (5 min) the player would receive $3000. I then fixed it to work for all players with the following code.
I have Paycheck as a forward and paycheck as a timer in gamemodeinit. The commented line crashes the server or gives players unlimited amounts of 3000 dollars.
I was wondering how to make this:
Work for ALL Players
Reset Timer so it happens every 5 minutes.
Thanks for your time,
Regards,
Liam
This is my first time with PAWN and Ive read through the Wiki couldn't find what I was looking for so I thought Id ask here.
Originally,
I had my Paycheck code only work on Player id 0. So that every 300 seconds (5 min) the player would receive $3000. I then fixed it to work for all players with the following code.
Код:
public paycheck()
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
GivePlayerMoney(i,3000);
SendClientMessage(i, COLOR_GREEN, "5Mins $3000 Paycheck Recieved");
//SetTimer("paycheck",0,false);
}
}
I was wondering how to make this:
Work for ALL Players
Reset Timer so it happens every 5 minutes.
Thanks for your time,
Regards,
Liam

