22.07.2011, 10:44
please can you tell me how to make that 1 minute on server give players to 1 score and that scores save when some goes disconnect and come back that score is same...
//On Top of your script
new OneScoreTimer;
//In OnGameModeInit
OneScoreTimer = SetTimerEx( "GiveAllScore", 1000*60, true, "i", 1 );
//In OnGameModeExit or whenever you want to stop this timer:
KillTimer(OneScoreTimer);
//At the end of your script:
forward GiveAllScore( score );
public GiveAllScore( score )
{
for ( new i=0; i<MAX_PLAYERS; i++ )
{
if ( IsPlayerConnected(i) ) { SetPlayerScore( i, GetPlayerScore(i) + score ); }
}
}
+ Save Player Statistics (Deaths+Kills+Weapons+Money+Position+TimeInServer+ Ip+Health+Armour+Score+WantedLevel) |