Help with PayDay
#4

pawn Код:
// Top
forward PayDay( ); // Forwarding the function

// OnGameModeInit
SetTimer( "PayDay", 1800000, true ); // Setting the timer to call every 30 minutes (1.8 million milliseconds)

// Outside callbacks
public PayDay( )
{
    for( new i; i < MAX_PLAYERS; i++ ) // Can be substituted with foreach (Recommended)
    {
        if( IsPlayerConnected( i ) // Is the player connected?
        {
            GivePlayerMoney( i, 5000 ); // Give the player some money
        }
    }
}
Untested, please forgive me if I missed anything.
Reply


Messages In This Thread
Help with PayDay - by Ivica_Razor - 07.12.2010, 18:27
Re: Help with PayDay - by Ivica_Razor - 07.12.2010, 18:55
Re: Help with PayDay - by Mehtab - 07.12.2010, 19:13
Re: Help with PayDay - by JamesC - 07.12.2010, 19:22
Re: Help with PayDay - by Ivica_Razor - 07.12.2010, 19:54
Re: Help with PayDay - by Ivica_Razor - 07.12.2010, 21:05
Re: Help with PayDay - by JamesC - 07.12.2010, 21:24
Re: Help with PayDay - by Ivica_Razor - 07.12.2010, 23:02
Re: Help with PayDay - by fangoth1 - 08.12.2010, 00:02
Re: Help with PayDay - by Ivica_Razor - 08.12.2010, 14:26

Forum Jump:


Users browsing this thread: 1 Guest(s)