22.01.2016, 09:12
Thank you pottus, i've managed to fix this,
Checking if the player is on duty and if the player is, do not inflict damage.
and at OnPlayerGiveDamage im checking if the admin on duty is shooting a player, if he is.
Sending him a message not to do so.
Thanks you helped me out alot <3
Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ) { if(aod[playerid] != Text3D:INVALID_3DTEXT_ID) { return 0; } return 1; }
and at OnPlayerGiveDamage im checking if the admin on duty is shooting a player, if he is.
Sending him a message not to do so.
Код:
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."); } return 1; }