10.12.2012, 13:13
Hi.I wanna if player is online to get 1000 money when the time is --:00.Thanks
SetTimer( "PayDayTimer", 100, true );
forward PayDayTimer();
public PayDayTimer()
{
new
hour,
minute,
second;
gettime( hour, minute, second ); //get the current time
if( minute == 0 ) //if minute == 0 - anything o' clock
{
for( new i = 0; i < MAX_PLAYERS; i++ ) //loop through all possible players
{
if( IsPlayerConnected( i )) //check if the players loop through are connected (no point giving money to players who don't exist)
{
SendClientMessage( i, 0xFFFF00FF, "PAYDAY! + $1000"); //send a message
GivePlayerMoney( i, 1000 ); //give them money
}
}
}
}