Score problem
#1

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...
Reply
#2

Simple Method:
pawn Код:
//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 ); }
    }
}
And for Register/Login system, you can take a look at the scripting tutorials section.
GL.
Reply
#3

what for reg/log system? i using Lu Admin
Reply
#4

Alright then, you don't need the Reg/Log system.

But the code I gave you above should give 1 score to each player per minute.
Reply
#5

I think there is score saving in LuxAdmin, you just need to enable it.
Reply
#6

Quote:
Originally Posted by iPLEOMAX
Посмотреть сообщение
Alright then, you don't need the Reg/Log system.

But the code I gave you above should give 1 score to each player per minute.
i ok... this is almost same thing..

thank you, but will save all scores if player goes offline?
Reply
#7

I found this in LuxAdmin Topic:

Quote:
+ Save Player Statistics (Deaths+Kills+Weapons+Money+Position+TimeInServer+ Ip+Health+Armour+Score+WantedLevel)
So, Yeah it should save.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)