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

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;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)