Jump to content
  • 0

Intrebare HEALTH


HORVENN

Question

7 answers to this question

Recommended Posts

Ti l-am facut acum pe loc, nu l-am testat ( Sper sa-ti mearga );


forward HealthPlayer();
public HealthPlayer()
{
for(new i;i<MAX_PLAYERS;i++)
{
if(PlayerInfo[i][pHealth] < 20)
{
SendClientMessage(i, COLOR_WHITE,"Aproape esti pe moarte, mergi si mananca.");
}
}
return 1;
}

<a href="http://www.userbars.be"><img src="http://img534.imageshack.us/img534/9098/36589.gif" alt="Free userbars" border="0"></a>

Link to comment
Share on other sites

este o mica-mare problema ... imi afiseaza mesajul acela de nenumarate ori ... cand serverul executa public HealthPlayer

	new HPWarn[MAX_PLAYERS]; // La inceputul modului

	forward HealthPlayer();
	public HealthPlayer()
	{
		for(new i;i<MAX_PLAYERS;i++)
		{
			if(PlayerInfo[i][pHealth] < 20 && HPWarn[i] == 0)
			{
				SendClientMessage(i, COLOR_WHITE,"Aproape esti pe moarte, mergi si mananca.");
				HPWarn[i] = 1;
			}
		}
	return 1;
	}

Acum iti va arata numai o data. Pune timer in OnGameModeInit, si fa-l la 5000 ms (5 secunde).

Daca vrei, la 10 secunde ar fi mai bine, ca nu se mai pune asa 'presiune' pe server. :)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.