21.01.2016, 21:28
Im trying to set it so if an admin is on duty, and shoots a player, the player will not be inflicted.
I figured i would do this by getting the Damage and giving it back however i can't find out what i am doing wrong.
I figured i would do this by getting the Damage and giving it back however i can't find out what i am doing wrong.
Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid, bodypart)
{
if(aod[playerid] != Text3D:INVALID_3DTEXT_ID)
{
SendClientMessage(playerid, COLOR_WHITE, "{ff0000}[Error]:{ffffff} You are On-Duty please refrain from damaging players.");
amount = GetPlayerHealth(damagedid);
SetPlayerHealth(damagedid, +amount);
}
return 1;
}


