Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:setsec(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 100000 || PlayerInfo[playerid][pAP] >= 2)
- {
- new giveplayerid, task[8], string[128];
- if(sscanf(params, "us[8]", giveplayerid, task))
- {
- SendClientMessage(playerid, COLOR_WHITE, "USAGE: /setsec [player] [secondary task]");
- SendClientMessage(playerid, COLOR_WHITE, "Secondary Tasks: FMod GMod SO BA, ST, SST, PR, HR, Sec");
- SendClientMessage(playerid, COLOR_WHITE, "Secondary Tasks: DoFM, DoGM, DoSO, DoBA, DoCR, DoPR, DoAP");
- return 1;
- }
- if(giveplayerid != INVALID_PLAYER_ID)
- {
- if(PlayerInfo[giveplayerid][pAdmin] > 2)
- {
- if(strcmp(task, "fmod", true) == 0)
- {
- if(PlayerInfo[giveplayerid][pFactionModerator] == 0)
- {
- PlayerInfo[giveplayerid][pFactionModerator] = 1;
- SendClientMessage(playerid, COLOR_WHITE, "You have made them a Faction Moderator");
- SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a Faction Moderator");
- format(string, sizeof(string), "%s has given Faction Moderator to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- else
- {
- PlayerInfo[giveplayerid][pFactionModerator] = 0;
- SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Faction Moderator");
- SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Faction Moderator taken");
- format(string, sizeof(string), "%s has taken Faction Moderator from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- }
- if(strcmp(task, "dofm", true) == 0)
- {
- if(PlayerInfo[giveplayerid][pFactionModerator] == 0 || PlayerInfo[giveplayerid][pFactionModerator] == 1)
- {
- PlayerInfo[giveplayerid][pFactionModerator] = 2;
- SendClientMessage(playerid, COLOR_WHITE, "You have made them a Director of Faction Management");
- SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a Director of Faction Management");
- format(string, sizeof(string), "%s has given Director of Faction Management to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- else
- {
- PlayerInfo[giveplayerid][pFactionModerator] = 0;
- SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Director of Faction Management");
- SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Director of Faction Management taken");
- format(string, sizeof(string), "%s has taken Director of Faction Management from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- }
- else if(strcmp(task, "gmod", true) == 0)
- {
- if(PlayerInfo[giveplayerid][pGangModerator] == 0)
- {
- PlayerInfo[giveplayerid][pGangModerator] = 1;
- SendClientMessage(playerid, COLOR_WHITE, "You have made them a Gang Moderator");
- SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a Gang Moderator");
- format(string, sizeof(string), "%s has given Gang Moderator to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- else
- {
- PlayerInfo[giveplayerid][pGangModerator] = 0;
- SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Gang Moderator");
- SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Gang Moderator taken");
- format(string, sizeof(string), "%s has taken Gang Moderator from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- }
- else if(strcmp(task, "dogm", true) == 0)
- {
- if(PlayerInfo[giveplayerid][pGangModerator] == 0 || PlayerInfo[giveplayerid][pGangModerator] == 1)
- {
- PlayerInfo[giveplayerid][pGangModerator] = 2;
- SendClientMessage(playerid, COLOR_WHITE, "You have made them a Director of Gang Management");
- SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a Director of Gang Management");
- format(string, sizeof(string), "%s has given Director of Gang Management to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- else
- {
- PlayerInfo[giveplayerid][pGangModerator] = 0;
- SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Director of Gang Management");
- SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Director of Gang Management taken");
- format(string, sizeof(string), "%s has taken Director of Gang Management from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- }
- else if(strcmp(task, "so", true) == 0)
- {
- if(PlayerInfo[giveplayerid][pUndercover] == 0)
- {
- PlayerInfo[giveplayerid][pUndercover] = 1;
- SendClientMessage(playerid, COLOR_WHITE, "You have made them a Special Operative");
- SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a Special Operative");
- format(string, sizeof(string), "%s has given Special Operative to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- else
- {
- PlayerInfo[giveplayerid][pUndercover] = 0;
- SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Special Operative");
- SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Special Operative permissions taken");
- format(string, sizeof(string), "%s has taken Special Operative permissions from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- }
- else if(strcmp(task, "doso", true) == 0)
- {
- if(PlayerInfo[giveplayerid][pUndercover] == 0 || PlayerInfo[giveplayerid][pUndercover] == 1)
- {
- PlayerInfo[giveplayerid][pUndercover] = 2;
- SendClientMessage(playerid, COLOR_WHITE, "You have made them a Director of Special Operations");
- SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a Director of Special Operations");
- format(string, sizeof(string), "%s has given Director of Special Operations to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- else
- {
- PlayerInfo[giveplayerid][pUndercover] = 0;
- SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Director of Special Operations");
- SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Director of Special Operations permissions taken");
- format(string, sizeof(string), "%s has taken Director of Special Operations permissions from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- }
- else if(strcmp(task, "ba", true) == 0)
- {
- if(PlayerInfo[giveplayerid][pBanAppealer] == 0)
- {
- PlayerInfo[giveplayerid][pBanAppealer] = 1;
- SendClientMessage(playerid, COLOR_WHITE, "You have made them a Ban Appealer");
- SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a Ban Appealer");
- format(string, sizeof(string), "%s has given Ban Appealer to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- else
- {
- PlayerInfo[giveplayerid][pBanAppealer] = 0;
- SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Ban Appealer");
- SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Ban Appealer taken");
- format(string, sizeof(string), "%s has taken Ban Appealer from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- }
- else if(strcmp(task, "doba", true) == 0)
- {
- if(PlayerInfo[giveplayerid][pBanAppealer] == 0 || PlayerInfo[giveplayerid][pBanAppealer] == 1)
- {
- PlayerInfo[giveplayerid][pBanAppealer] = 2;
- SendClientMessage(playerid, COLOR_WHITE, "You have made them a Director of Ban Appeals");
- SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a Director of Ban Appeals");
- format(string, sizeof(string), "%s has given Director of Ban Appeals to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- else
- {
- PlayerInfo[giveplayerid][pBanAppealer] = 0;
- SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Director of Ban Appeals");
- SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Director of Ban Appeals taken");
- format(string, sizeof(string), "%s has taken Director of Ban Appeals from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- }
- else if(strcmp(task, "st", true) == 0)
- {
- if(PlayerInfo[giveplayerid][pShopTech] == 0)
- {
- PlayerInfo[giveplayerid][pShopTech] = 1;
- SendClientMessage(playerid, COLOR_WHITE, "You have made them a Shop Technician");
- SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a Shop Technician");
- format(string, sizeof(string), "%s has given Shop Technician to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- else
- {
- PlayerInfo[giveplayerid][pShopTech] = 0;
- SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Shop Technician");
- SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Shop Technician taken");
- format(string, sizeof(string), "%s has taken Shop Technician from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- }
- else if(strcmp(task, "sst", true) == 0)
- {
- if(PlayerInfo[giveplayerid][pShopTech] == 0 || PlayerInfo[giveplayerid][pShopTech] == 1)
- {
- PlayerInfo[giveplayerid][pShopTech] = 2;
- SendClientMessage(playerid, COLOR_WHITE, "You have made them a Senior Shop Technician");
- SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a Senior Shop Technician");
- format(string, sizeof(string), "%s has given Senior Shop Technician to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- else
- {
- PlayerInfo[giveplayerid][pShopTech] = 0;
- SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Senior Shop Technician");
- SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Senior Shop Technician taken");
- format(string, sizeof(string), "%s has taken Senior Shop Technician from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- }
- else if(strcmp(task, "docr", true) == 0)
- {
- if(PlayerInfo[giveplayerid][pShopTech] == 0 || PlayerInfo[giveplayerid][pShopTech] == 1 || PlayerInfo[giveplayerid][pShopTech] == 2)
- {
- PlayerInfo[giveplayerid][pShopTech] = 3;
- SendClientMessage(playerid, COLOR_WHITE, "You have made them a Director of Customer Relations");
- SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a Director of Customer Relations");
- format(string, sizeof(string), "%s has given Senior Director of Customer Relations to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- else
- {
- PlayerInfo[giveplayerid][pShopTech] = 0;
- SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Director of Customer Relations");
- SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Director of Customer Relations taken");
- format(string, sizeof(string), "%s has taken Director of Customer Relations from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- }
- else if(strcmp(task, "pr", true) == 0)
- {
- if(PlayerInfo[giveplayerid][pPR] == 0)
- {
- PlayerInfo[giveplayerid][pPR] = 1;
- SendClientMessage(playerid, COLOR_WHITE, "You have made them a member of Public Relations");
- SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a member of Public Relations");
- format(string, sizeof(string), "%s has given Public Relations permissions to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- else
- {
- PlayerInfo[giveplayerid][pPR] = 0;
- SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Public Relations permissions");
- SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Public Relations permissions taken");
- format(string, sizeof(string), "%s has taken Public Relations permissions from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- }
- else if(strcmp(task, "dopr", true) == 0)
- {
- if(PlayerInfo[giveplayerid][pPR] == 0 || PlayerInfo[giveplayerid][pPR] == 1)
- {
- PlayerInfo[giveplayerid][pPR] = 2;
- SendClientMessage(playerid, COLOR_WHITE, "You have made them a Director of Public Relations");
- SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a Director of Public Relations");
- format(string, sizeof(string), "%s has given Director of Public Relations permissions to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- else
- {
- PlayerInfo[giveplayerid][pPR] = 0;
- SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Director of Public Relations permissions");
- SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Director of Public Relations permissions taken");
- format(string, sizeof(string), "%s has taken Director of Public Relations permissions from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- }
- else if(strcmp(task, "hr", true) == 0)
- {
- if(PlayerInfo[giveplayerid][pHR] == 0)
- {
- PlayerInfo[giveplayerid][pHR] = 1;
- SendClientMessage(playerid, COLOR_WHITE, "You have made them a member of Human Resources");
- SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a member of Human Resources");
- format(string, sizeof(string), "%s has given Human Resources permissions to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- else
- {
- PlayerInfo[giveplayerid][pHR] = 0;
- SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Human Resources permissions");
- SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Human Resources permissions taken");
- format(string, sizeof(string), "%s has taken Human Resources permissions from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- }
- else if(strcmp(task, "sec", true) == 0)
- {
- if(PlayerInfo[giveplayerid][pSecurity] == 0)
- {
- PlayerInfo[giveplayerid][pSecurity] = 1;
- SendClientMessage(playerid, COLOR_WHITE, "You have made them a member of Security");
- SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made a member of Security");
- format(string, sizeof(string), "%s has given Security permissions to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- else
- {
- PlayerInfo[giveplayerid][pSecurity] = 0;
- SendClientMessageEx(playerid, COLOR_GREY, "You have taken their Security permissions");
- SendClientMessage(giveplayerid, COLOR_GREY, "You have had your Security permissions taken");
- format(string, sizeof(string), "%s has taken Security permissions from %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- }
- else if(strcmp(task, "doap", true) == 0)
- {
- if(PlayerInfo[giveplayerid][pAP] == 0)
- {
- PlayerInfo[giveplayerid][pAP] = 1;
- SendClientMessage(playerid, COLOR_WHITE, "You have made them Director Of Admin Personnel");
- SendClientMessage(giveplayerid, COLOR_WHITE, "You have been made Director Of Admin Personnel");
- format(string, sizeof(string), "%s has given DoAP premission to %s", GetPlayerNameEx(playerid), GetPlayerNameEx(giveplayerid));
- Log("logs/admin.log", string);
- }
- }
- }
- else SendClientMessage(playerid, COLOR_GRAD2, "They are not an admin!");
- }
- else SendClientMessageEx(playerid, COLOR_GRAD2, "That person is not connected.");
- }
- else SendClientMessageEx(playerid, COLOR_GREY, "You do not have permission to use this command.");
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement