there is any way for that?
#1

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

pawn Код:
if(!PlayerInfo[playerid][pAdminDuty]) return SendClientMessageEx(playerid, COLOR_GRAD2, "You can't do this whilst your off Duty!");
before every cmd ?
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;
}
Reply


Messages In This Thread
there is any way for that? - by Joe_Goro - 17.11.2013, 09:42
Re: there is any way for that? - by ]Rafaellos[ - 17.11.2013, 09:44
Re: there is any way for that? - by Joe_Goro - 17.11.2013, 09:47
Re: there is any way for that? - by ]Rafaellos[ - 17.11.2013, 09:53
AW: there is any way for that? - by Skimmer - 17.11.2013, 09:54
Re: there is any way for that? - by Konstantinos - 17.11.2013, 09:56
Re: there is any way for that? - by iPrivate - 17.11.2013, 10:00
Re: there is any way for that? - by Joe_Goro - 17.11.2013, 10:08

Forum Jump:


Users browsing this thread: 1 Guest(s)