Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:aduty(playerid, params[])
- {
- new string[128];
- if(!IsPlayerLoggedIn(playerid)) return SendClientMessage(playerid, COLOR_GREY, "You need to login first before using any command.");
- if(PlayerInfo[playerid][pAdmin] < 1) return SendClientMessage(playerid, COLOR_GREY, "You are not authorized to use this command.");
- if(PlayerInfo[playerid][pDutyNameSet] == 0) return SendClientMessage(playerid, COLOR_GREY, "You don't have a duty name, please choose one by doing /adutyname");
- if(!aDuty[playerid])
- {
- format(string, sizeof(string), "AdmWarn: %s has went on admin duty.", RPN(playerid));
- SendClientMessageToAll(COLOR_YELLOW, string);
- aDuty[playerid] = 1;
- format(string, sizeof(string), "%s", RPALN(playerid));
- SetPlayerName(playerid, PlayerInfo[playerid][pDutyName]);
- }
- else
- {
- if(Spec[playerid]) return SendClientMessage(playerid, COLOR_GREY, "You can't go off admin duty while spectating someone.");
- aDuty[playerid] = 0;
- format(string, sizeof(string), "AdmWarn: %s has went off admin duty.", RPN(playerid));
- SendClientMessageToAll(COLOR_YELLOW, string);
- SetPlayerName(playerid, PlayerInfo[playerid][pOffDutyName]);
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 100.0);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment