Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/departments", true) == 0 || strcmp(cmd, "/d", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[256];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "{FFFFFF}Folosire{696969}: (/d)epartments [chat]");
- return 1;
- }
- if(Muted[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "Momentan ai mute.");
- return 1;
- }
- new maskid = PlayerInfo[playerid][pMaskID];
- new str[128];
- new faction[128];
- if(PlayerInfo[playerid][pFaction] == 3) { faction = "BCSD"; }
- if(PlayerInfo[playerid][pFaction] == 6) { faction = "GOUVERMENT"; }
- if(PlayerInfo[playerid][pFaction] == 7) { faction = "LSC"; }
- if(PlayerInfo[playerid][pFaction] == 2) { faction = "BCFD"; }
- if(PlayerInfo[playerid][pFaction] == 3 || PlayerInfo[playerid][pFaction] == 6 || PlayerInfo[playerid][pFaction] == 7 || PlayerInfo[playerid][pFaction] == 2 || PlayerInfo[playerid][pFaction] == 3)
- {
- if(strlen(result) > MAXLEN)
- {
- new pos = MAXLEN;
- if(pos < MAXLEN-1) pos = MAXLEN;
- if(PlayerInfo[playerid][pMaskuse] == 1)
- {
- format(str, sizeof(str), "** [%s] %s [Masca_%d]: %.*s ...", faction, GetRankName(playerid), maskid, pos, result);
- SendFactionMessage(3, COLOR_ALLDEPT, str);
- SendFactionMessage(6, COLOR_ALLDEPT, str);
- SendFactionMessage(7, COLOR_ALLDEPT, str);
- SendFactionMessage(2, COLOR_ALLDEPT, str);
- SendFactionMessage(10, COLOR_ALLDEPT, str);
- format(str, sizeof(str), "** [%s] %s [Masca_%d]: ... %s **", faction, GetRankName(playerid), maskid, result[pos]);
- SendFactionMessage(3, COLOR_ALLDEPT, str);
- SendFactionMessage(6, COLOR_ALLDEPT, str);
- SendFactionMessage(7, COLOR_ALLDEPT, str);
- SendFactionMessage(2, COLOR_ALLDEPT, str);
- SendFactionMessage(10, COLOR_ALLDEPT, str);
- }
- else
- {
- format(str, sizeof(str), "** [%s] %s %s: %.*s ...", faction, GetRankName(playerid), GetPlayerNameEx(playerid), pos, result);
- SendFactionMessage(3, COLOR_ALLDEPT, str);
- SendFactionMessage(6, COLOR_ALLDEPT, str);
- SendFactionMessage(7, COLOR_ALLDEPT, str);
- SendFactionMessage(2, COLOR_ALLDEPT, str);
- SendFactionMessage(10, COLOR_ALLDEPT, str);
- format(str, sizeof(str), "** [%s] %s %s: ... %s **", faction, GetRankName(playerid), GetPlayerNameEx(playerid), result[pos]);
- SendFactionMessage(3, COLOR_ALLDEPT, str);
- SendFactionMessage(6, COLOR_ALLDEPT, str);
- SendFactionMessage(7, COLOR_ALLDEPT, str);
- SendFactionMessage(2, COLOR_ALLDEPT, str);
- SendFactionMessage(10, COLOR_ALLDEPT, str);
- }
- }
- else
- {
- if(PlayerInfo[playerid][pMaskuse] == 1)
- {
- format(str, sizeof(str), "** [%s] %s [Masca_%d]: %s **", faction, GetRankName(playerid), maskid, result);
- SendFactionMessage(3, COLOR_ALLDEPT, str);
- SendFactionMessage(6, COLOR_ALLDEPT, str);
- SendFactionMessage(7, COLOR_ALLDEPT, str);
- SendFactionMessage(2, COLOR_ALLDEPT, str);
- SendFactionMessage(10, COLOR_ALLDEPT, str);
- }
- else
- {
- format(str, sizeof(str), "** [%s] %s %s: %s **", faction, GetRankName(playerid), GetPlayerNameEx(playerid), result);
- SendFactionMessage(3, COLOR_ALLDEPT, str);
- SendFactionMessage(6, COLOR_ALLDEPT, str);
- SendFactionMessage(7, COLOR_ALLDEPT, str);
- SendFactionMessage(2, COLOR_ALLDEPT, str);
- SendFactionMessage(10, COLOR_ALLDEPT, str);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_LIGHTRED, "Factiune invalida.");
- return 1;
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/r", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- if(Muted[playerid] == 1) { SendClientMessage(playerid, COLOR_LIGHTRED, "Ai primit mute."); return 1; }
- if(PlayerInfo[playerid][pRadio] == 0) { SendClientMessage(playerid, COLOR_GREY,"Nu ai o statie radio."); return 1; }
- if(PlayerInfo[playerid][pJailed] != 0) { SendClientMessage(playerid, COLOR_LIGHTRED,"1 ti-a confiscat statia radio.."); return 1; }
- if(PlayerInfo[playerid][pRfreq] == 0) { SendClientMessage(playerid, COLOR_WHITE,"Te rog selecteaza o frecventa!(/setfreq)"); return 1; }
- GetPlayerName(playerid, sendername, sizeof(sendername));
- new length = strlen(cmdtext);
- while ((idx < length) && (cmdtext[idx] <= ' '))
- {
- idx++;
- }
- new offset = idx;
- new result[256];
- while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
- {
- result[idx - offset] = cmdtext[idx];
- idx++;
- }
- result[idx - offset] = EOS;
- if(!strlen(result))
- {
- SendClientMessage(playerid, COLOR_GRAD2, "Fp;psore: (/r)adio [radio chat]");
- return 1;
- }
- new str[128];
- new maskid = PlayerInfo[playerid][pMaskID];
- if(RadioStatus[playerid] == 1)
- {
- if(PlayerInfo[playerid][pRfreq] == 911510 || PlayerInfo[playerid][pRfreq] == 911112 || PlayerInfo[playerid][pRfreq] == 911910)
- {
- if(PlayerInfo[playerid][pFaction] == 3 || PlayerInfo[playerid][pFaction] == 1 || PlayerInfo[playerid][pFaction] == 2)
- {
- if(strlen(result) > MAXLEN)
- {
- new pos = MAXLEN;
- if(pos < MAXLEN-1) pos = MAXLEN;
- if(PlayerInfo[playerid][pMaskuse] == 1)
- {
- if (PlayerInfo[playerid][pFaction] == 3 && PlayerInfo[playerid][pRfreq] == 911910)
- {
- format(str, sizeof(str), "**[CH: %d] %s [Masca_%d]: %.*s ...", PlayerInfo[playerid][pRfreq], GetRankName(playerid), maskid, pos, result);
- SendRadioMessagePD(playerid,PlayerInfo[playerid][pRfreq], COLOR_RADIO,str, PlayerInfo[playerid][pRadioPD]);
- format(str, sizeof(str), "**[CH: %d] %s [Masca_%d]: ... %s, over", PlayerInfo[playerid][pRfreq], GetRankName(playerid), maskid, result[pos]);
- SendRadioMessagePD(playerid,PlayerInfo[playerid][pRfreq], COLOR_RADIO,str, PlayerInfo[playerid][pRadioPD]);
- }
- else
- {
- format(str, sizeof(str), "**[CH: %d] %s [Masca_%d]: %.*s ...", PlayerInfo[playerid][pRfreq], GetRankName(playerid), maskid, pos, result);
- SendRadioMessage(playerid,PlayerInfo[playerid][pRfreq], COLOR_RADIO,str);
- format(str, sizeof(str), "**[CH: %d] %s [Masca_%d]: ... %s, over", PlayerInfo[playerid][pRfreq], GetRankName(playerid), maskid, result[pos]);
- SendRadioMessage(playerid,PlayerInfo[playerid][pRfreq], COLOR_RADIO,str);
- }
- }
- else
- {
- if (PlayerInfo[playerid][pFaction] == 3 && PlayerInfo[playerid][pRfreq] == 911910)
- {
- format(str, sizeof(str), "**[CH: %d] %s %s: %.*s ...", PlayerInfo[playerid][pRfreq], GetRankName(playerid), GetPlayerNameEx(playerid), pos, result);
- SendRadioMessagePD(playerid,PlayerInfo[playerid][pRfreq], COLOR_RADIO,str, PlayerInfo[playerid][pRadioPD]);
- format(str, sizeof(str), "**[CH: %d] %s %s: ... %s, over", PlayerInfo[playerid][pRfreq], GetRankName(playerid), GetPlayerNameEx(playerid), result[pos]);
- SendRadioMessagePD(playerid,PlayerInfo[playerid][pRfreq], COLOR_RADIO,str, PlayerInfo[playerid][pRadioPD]);
- }
- else
- {
- format(str, sizeof(str), "**[CH: %d] %s %s: %.*s ...", PlayerInfo[playerid][pRfreq], GetRankName(playerid), GetPlayerNameEx(playerid), pos, result);
- SendRadioMessage(playerid,PlayerInfo[playerid][pRfreq], COLOR_RADIO,str);
- format(str, sizeof(str), "**[CH: %d] %s %s: ... %s, over", PlayerInfo[playerid][pRfreq], GetRankName(playerid), GetPlayerNameEx(playerid), result[pos]);
- SendRadioMessage(playerid,PlayerInfo[playerid][pRfreq], COLOR_RADIO,str);
- }
- }
- }
- else
- {
- if(PlayerInfo[playerid][pMaskuse] == 1)
- {
- if (PlayerInfo[playerid][pFaction] == 3 && PlayerInfo[playerid][pRfreq] == 911910)
- {
- format(str, sizeof(str), "**[CH: %d] %s [Masca_%d]: %s, over", PlayerInfo[playerid][pRfreq], GetRankName(playerid), maskid, result);
- SendRadioMessagePD(playerid,PlayerInfo[playerid][pRfreq], COLOR_RADIO,str, PlayerInfo[playerid][pRadioPD]);
- }
- else
- {
- format(str, sizeof(str), "**[CH: %d] %s [Masca_%d]: %s, over", PlayerInfo[playerid][pRfreq], GetRankName(playerid), maskid, result);
- SendRadioMessage(playerid,PlayerInfo[playerid][pRfreq], COLOR_RADIO,str);
- }
- }
- else
- {
- if (PlayerInfo[playerid][pFaction] == 3 && PlayerInfo[playerid][pRfreq] == 911910)
- {
- format(str, sizeof(str), "**[CH: %d] %s %s: %s, over", PlayerInfo[playerid][pRfreq], GetRankName(playerid), GetPlayerNameEx(playerid), result);
- SendRadioMessagePD(playerid,PlayerInfo[playerid][pRfreq], COLOR_RADIO,str, PlayerInfo[playerid][pRadioPD]);
- }
- else
- {
- format(str, sizeof(str), "**[CH: %d] %s %s: %s, over", PlayerInfo[playerid][pRfreq], GetRankName(playerid), GetPlayerNameEx(playerid), result);
- SendRadioMessage(playerid,PlayerInfo[playerid][pRfreq], COLOR_RADIO,str);
- }
- }
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_GRAD2, "Statia ta radio este oprita.");
- return 1;
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment