How to get the highest score and give him a prize
#3

Quote:
Originally Posted by Electrifying
View Post
Code:
forward ENDGG();
public ENDGG()
{
	static i;
	for( i = GetMaxPlayers() - 1; i > -1; --i) //Create a loop
	{
		if(IsPlayerConnected(i))
		{
			if(lvl[i] == 30)
			{
				//your price here... can be whatever you want
				SetPlayerScore(i, GetPlayerScore(i)+10);
			}
		}
	}

return 1;
}

//ONGAMEMODEINIT

public OnGameModeInit()
{
	SetTimer("ENDGG", 600000, 1 /*1 if you want to repeat, 0 if you don't want to*/);
	return 1;
}
but as I see in this It only check wheather that someone is lvl 30 and give him a prize but that's not what I want *READ THE MAIN POST WELL
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)