11.08.2012, 20:17
Do you want something like:
pawn Код:
new szTimeTicks = 0,
n_bTimerID; // at top
n_bTimerID = SetTimer( "ScoreTimer", 1000, true ); // in gamemode init
forward ScoreTimer( ); // at top
public ScoreTimer( ) // anywhere you want
{
szTimeTicks++; // counting ticks every second
switch( szTimeTicks ) // switching it
{
case 3600: // checking if the time ticks are 1 hour
{
szTimeTicks = 0; // resetting the time ticks to 0
for( new f = 0; f < MAX_PLAYERS; f++ ) // looping the players
{
if( IsPlayerConnected( f ) )
{
SetPlayerScore( f, GetPlayerScore( f ) + 1 ); // give the score!
}
}
}
}
}