17.11.2013, 09:42
hello in my gamemode there is more than 300+ cmd for admin
i wanna make them cant use while not /aduty
is there is anyway to do that without adding
before every cmd ?
as my /aduty cmd is
i wanna make them cant use while not /aduty
is there is anyway to do that without adding
pawn Код:
if(!PlayerInfo[playerid][pAdminDuty]) return SendClientMessageEx(playerid, COLOR_GRAD2, "You can't do this whilst your off Duty!");
as my /aduty cmd is
pawn Код:
CMD:aduty(playerid, params[]) {
new string[128];
if((PlayerInfo[playerid][pAdmin] >= 2) && GetPVarInt(playerid, "IsInArena") < 0 && !GetPVarInt(playerid, "EventToken")) {
if(PlayerInfo[playerid][pAdminDuty]) {
PlayerInfo[playerid][pAdminDuty] = 0;
PlayerInfo[playerid][pTogReports] = 1;
//SetPlayerToTeamColor(playerid);
SendClientMessageEx(playerid, COLOR_WHITE, "You have clocked out from Admin Duty, you are now in Role Play Mode.");
format(string, sizeof(string), "{AA3333}Admin Duty{FFFF00}: %s has clocked off and is now off duty.", GetPlayerNameEx(playerid));
ABroadCast(COLOR_YELLOW,string, 2);
}
else {
PlayerInfo[playerid][pAdminDuty] = 1;
PlayerInfo[playerid][pTogReports] = 0;
//SetPlayerToTeamColor(playerid);
SendClientMessageEx(playerid, COLOR_WHITE, "You have clocked in to Admin Duty, you are no longer in Role play Mode.");
format(string, sizeof(string), "{AA3333}Admin Duty{FFFF00}: %s has clocked in and is now on duty.", GetPlayerNameEx(playerid));
ABroadCast(COLOR_YELLOW,string, 2);
}
}
return 1;
}