Score
#2

1 hour = 1 score:

Код:
//under OnGameModeInit
SetTimer("gScore",3600000,1);

//Anywhere (out of any callback)
forward gScore();
public gScore()
{
     foreach(Player,i)
     {
          SetPlayerScore(i,GetPlayerScore(i)+1);
     }
     return 1;
}

Not my code
1 kill = score
death = -1 score

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
	if(killerid != INVALID_PLAYER_ID)
	{
	    PlayerData[killerid][Kills]++;
	}
	PlayerData[playerid][Deaths]++;
	gIsPlayerDead[playerid] = 1;
	return 1;
}

Need enum

enum pData
{
Kills,
 Deaths,
};
new PlayerData[MAX_PLAYERS][pData];
Reply


Messages In This Thread
Score - by Biggy54 - 04.09.2014, 08:09
Re: Score - by TheNerka - 04.09.2014, 08:18
Re: Score - by LeroyII - 04.09.2014, 08:19
Re: Score - by JM_Millers - 04.09.2014, 08:19
Re: Score - by HazardouS - 04.09.2014, 08:20
Re: Score - by TheNerka - 04.09.2014, 08:21
Re: Score - by LeroyII - 04.09.2014, 08:21
Re: Score - by TheNerka - 04.09.2014, 08:23
Re: Score - by Biggy54 - 04.09.2014, 08:23
Re: Score - by TheNerka - 04.09.2014, 08:26

Forum Jump:


Users browsing this thread: 1 Guest(s)