Admin Onduty Slap player if shoot!
#4

PHP код:
new bool:AdminDuty[MAX_PLAYERS]
public 
OnPlayerConnect(playerid)
{
AdminDuty[playeridp] = false;
}
CMD:aduty
{
if(!
IsPlayerAdmin(playerid)) return SendClientMessage(playeridRED,"*You are not allowed to use this command!");
new 
aName[24],string);
GetPlayerName(playeridaName24);
format(string,50,"[Admin] %s(%i) Is Now On Admin Duty!",aName,playerid);
SendClientMessageToAll(blue,string);
AdminDuty[playerid] = true;
return 
1;
}
public 
OnPlayerGiveDamage(playeriddamagedidFloatamountweaponidbodypart)
{
if(
IsPlayerAdmin(damagedid) && AdminDuty[damagedid] == true)
{
new 
Float:X,Float:Y,Float:Z;
GetPlayerPos(playeridXYZ);
SetPlayerPos(playeridXYZ+1);
SendClientMessage(playerid,RED,"[Server]You Have Been Automatically Slapped To Shooting A Admin On Duty!");
SetPlayerHealth(damagedid,GetPlayerHealth(damagedid)+amount);
return 
1;

Enjoy ^^
Reply


Messages In This Thread
Admin Onduty Slap player if shoot! - by jamesmith12 - 21.07.2015, 11:57
Re: Admin Onduty Slap player if shoot! - by thaKing - 21.07.2015, 12:05
Re: Admin Onduty Slap player if shoot! - by nezo2001 - 21.07.2015, 12:06
Re: Admin Onduty Slap player if shoot! - by Roberto80 - 21.07.2015, 12:13

Forum Jump:


Users browsing this thread: 1 Guest(s)