07.12.2010, 19:22
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
}
}
}