06.01.2014, 14:39
(
Последний раз редактировалось Tayab; 06.01.2014 в 14:42.
Причина: Added comments.
)
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;
}

