Set Player Score
#2

Comments should help you out on what I've done below.
pawn Код:
public OnPlayerConnect(playerid)
{
    SetTimer("IncreaseScore",1000*60*5,true); // Set a timer for 5 minutes. It'll be called every 5 minutes and will not stop unless you want to kill it.
}
forward IncreaseScore();
public IncreaseScore()
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        SetPlayerScore(i,GetPlayerScore(i)+10); // get all the players' score and increment it by 10.
        format(string,sizeof(string),"[SERVER]{FF0000}Everyone's score has been increased with {FF8800}%d{FF0000} score.",GetPlayerScore(i)); // making the string to show up in sending client message
        SendClientMessageToAll(0x40FF00FF,string);
    }
    return 1;
}
Reply


Messages In This Thread
Set Player Score - by [SU]Spartan - 06.01.2014, 14:30
Re: Set Player Score - by Tayab - 06.01.2014, 14:39
Re: Set Player Score - by RedFusion - 06.01.2014, 14:41
Re: Set Player Score - by [SU]Spartan - 06.01.2014, 14:43

Forum Jump:


Users browsing this thread: 1 Guest(s)