OnPlayerTakeDamage
#1

For some reason this doesn't work:
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float:amount, weaponid)
{
	if (GodMode[playerid] == 1)
	{
		new Float:health;
		GetPlayerHealth(playerid,health);
		if (health < 150.0)
		{
			SetPlayerHealth(playerid, 200.0);
		}
	}
I have a /god command for level 3+ admins which enables god mode, but the code above doesn't seem to work. Also don't suggest making it SetPlayerHealth(playerid, 9999999) when typing /god, because this doesn't work for some reason in my server. Does anybody know what is the issue?
Reply


Messages In This Thread
OnPlayerTakeDamage - by GoldenLion - 09.05.2016, 12:57
Re: OnPlayerTakeDamage - by Slawiii - 09.05.2016, 13:01
Re: OnPlayerTakeDamage - by Konstantinos - 09.05.2016, 13:04
Re: OnPlayerTakeDamage - by GoldenLion - 09.05.2016, 13:39

Forum Jump:


Users browsing this thread: 1 Guest(s)