Score point
#1

Hello I want add to my server score timer
Each 10 minute = 1 point score , How I can do that ?
Reply
#2

For this to work, you need the foreach include, you can get it here: https://sampforum.blast.hk/showthread.php?tid=92679

Well first you'd have to make the timer, this goes inside OnGameModeInit():
pawn Код:
SetTimer("Score",1000*60*10, true); // 1ms x 60 x 10 = 10 minutes
Then you'd have to use foreach or a loop in a function to loop through the players and set them +1 score.
pawn Код:
forward Score();
public Score()
{
    foreach(Player, i) // Loops through each player - Better than using a standard loop.
    {
        SetPlayerScore(i, GetPlayerScore(i) + 1); // Setting the player score - Gets the current score and adds one(1)
    }
    return true;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)