Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Makeleader befehl
- if(strcmp(cmd, "/makeleader", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp))
- {
- SendClientMessage(playerid, COLOR_GRAD2, " /makeleader [playerid/Name] [Nummer(1-24)]");
- return 1;
- }
- new para1;
- new level;
- para1 = ReturnUser(tmp);
- tmp = strtok(cmdtext, idx);
- level = strval(tmp);
- if(level > 24 || level < 0) { SendClientMessage(playerid, COLOR_GREY, " Geh nicht tiefer als Nummer 0, oder höher als Nummer 25!"); return 1; }
- if (PlayerInfo[playerid][pAdmin] >= 4)
- {
- if(IsPlayerConnected(para1))
- {
- if(para1 != INVALID_PLAYER_ID)
- {
- if(PlayerInfo[para1][pFrakSperre] > 0)
- {
- SendClientMessage(playerid, COLOR_GREY, " Dieser Spieler hat FraktionsSperre!");
- return 1;
- }
- // Der /megaphone befehl
- if(strcmp(cmd, "/megaphone", true) == 0 || strcmp(cmd, "/m", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- //new tmpcar = GetPlayerVehicleID(playerid);
- GetPlayerName(playerid, pname, sizeof(pname));
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[64];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(OnDuty[playerid]==0)
- {
- SendClientMessage(playerid, COLOR_GREY, "Du bist bist auser Dienst!");
- return 1;
- }
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "Benutze: (/m)egaphone [megaphone chat]");
- return 1;
- }
- if(gTeam[playerid] == 2 || IsACop(playerid) || PlayerInfo[playerid][pMember] == 4||PlayerInfo[playerid][pLeader] == 4 || PlayerInfo[playerid][pMember] == 24||PlayerInfo[playerid][pLeader] == 24)
- {
- if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1)
- {
- format(string, sizeof(string), "[Officer %s:o< %s]", pname, result);
- ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(PlayerInfo[playerid][pMember] == 2||PlayerInfo[playerid][pLeader] == 2)
- {
- format(string, sizeof(string), "[Officer %s:o< %s]", pname, result);
- ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(PlayerInfo[playerid][pMember] == 4||PlayerInfo[playerid][pLeader] == 4)
- {
- format(string, sizeof(string), "[Medic %s:o< %s]", pname, result);
- ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(PlayerInfo[playerid][pMember] == 21||PlayerInfo[playerid][pLeader] == 21)
- {
- format(string, sizeof(string), "[FBI Agent %s:o< %s]", pname, result);
- ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(PlayerInfo[playerid][pMember] == 23||PlayerInfo[playerid][pLeader] == 23)
- {
- format(string, sizeof(string), "[Soldat %s:o< %s]", pname, result);
- ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(PlayerInfo[playerid][pMember] == 22||PlayerInfo[playerid][pLeader] == 22)
- {
- format(string, sizeof(string), "[Feuerwehr %s:o< %s]", pname, result);
- ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- else if(PlayerInfo[playerid][pMember] == 24||PlayerInfo[playerid][pLeader] == 24)
- {
- format(string, sizeof(string), "[Oamt %s:o< %s]", pname, result);
- ProxDetector(60.0, playerid, string,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW,COLOR_YELLOW);
- }
- printf("%s", string);
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, " Du musst bei einer Staatlichen Fraktion sein, um diesen Befehl benutzen zu können !");
- return 1;
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement