zombie spawn protection
#7

Quote:
Originally Posted by ax1
Посмотреть сообщение
Код:
     SetPlayerHealth(playerid, GetPlayerHealth(playerid)+amount);
     SetPlayerHealth(issuerid, GetPlayerHealth(playerid)-amount);
Код:
public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
{
    if(issuerid != INVALID_PLAYER_ID) 
    {
		if(IsPlayerInRangeOfPoint(playerid, range, x, y, z)) 
		{
			new Float:hp;
			GetPlayerHealth(playerid, hp);
			SetPlayerHealth(playerid, hp + amount);
			GetPlayerHealth(playerid, hp);
			SetPlayerHealth(issuerid, hp - amount);
		}
    }
    return 1;
}
The right syntax is GetPlayerHealth(playerid, &Float:health);
Reply


Messages In This Thread
zombie spawn protection - by sanamalik400 - 12.09.2015, 23:07
Re : zombie spawn protection - by KillerDVX - 12.09.2015, 23:30
Re: zombie spawn protection - by sanamalik400 - 12.09.2015, 23:34
Re: zombie spawn protection - by sanamalik400 - 13.09.2015, 11:34
Re: zombie spawn protection - by sanamalik400 - 13.09.2015, 11:57
Re: zombie spawn protection - by ax1 - 13.09.2015, 13:12
Re: zombie spawn protection - by X337 - 13.09.2015, 13:23
Re: zombie spawn protection - by ax1 - 13.09.2015, 13:25
Re : zombie spawn protection - by KillerDVX - 13.09.2015, 15:51
Re: zombie spawn protection - by sanamalik400 - 13.09.2015, 18:36

Forum Jump:


Users browsing this thread: 1 Guest(s)