Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(strcmp(cmd, "/dipartimenti", true) == 0 || strcmp(cmd, "/d", true) == 0)
- {
- if(IsPlayerConnected(playerid))
- {
- new wstring[128];
- new faction = PlayerInfo[playerid][pFaction];
- new rank = PlayerInfo[playerid][pRank];
- 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_LIGHTYELLOW2, "[USO:] (/d)ipartimenti");
- return 1;
- }
- if(Muted[playerid])
- {
- SendClientMessage(playerid, COLOR_RED, "[ERRORE:] Non puoi usare la radio, sei mutato!.");
- return 1;
- }
- if (PlayerInfo[playerid][pFaction]==0 || PlayerInfo[playerid][pFaction]==1 || PlayerInfo[playerid][pFaction]==2 || PlayerInfo[playerid][pFaction]==6)
- {
- if(CopOnDuty[playerid])
- {
- if(rank == 1)
- {
- format(wstring, sizeof(wstring), "[DIPART-POLIZIA:] %s %s: %s, passo.",DynamicFactions[faction][fRank1],GetPlayerNameEx(playerid),result);
- ProxDetector(5.0, playerid, wstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- SendFactionTypeMessage(1, COLOR_YELLOW, wstring);
- SendFactionMessage(4, COLOR_YELLOW, wstring);
- SendFactionMessage(6, COLOR_YELLOW, wstring);
- FactionChatLog(wstring);
- PhoneAnimation(playerid);
- }
- else if(rank == 2)
- {
- format(wstring, sizeof(wstring), "[DIPART-POLIZIA:] %s %s: %s, passo.",DynamicFactions[faction][fRank2],GetPlayerNameEx(playerid),result);
- ProxDetector(5.0, playerid, wstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- SendFactionTypeMessage(1, COLOR_YELLOW, wstring);
- SendFactionMessage(6, COLOR_YELLOW, wstring);
- SendFactionMessage(4, COLOR_YELLOW, wstring);
- FactionChatLog(wstring);
- PhoneAnimation(playerid);
- }
- else if(rank == 3)
- {
- format(wstring, sizeof(wstring), "[DIPART-POLIZIA:] %s %s: %s, passo.",DynamicFactions[faction][fRank3],GetPlayerNameEx(playerid),result);
- SendFactionTypeMessage(1, COLOR_YELLOW, wstring);
- SendFactionMessage(6, COLOR_YELLOW, wstring);
- SendFactionMessage(4, COLOR_YELLOW, wstring);
- ProxDetector(5.0, playerid, wstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- FactionChatLog(wstring);
- PhoneAnimation(playerid);
- }
- else if(rank == 4)
- {
- format(wstring, sizeof(wstring), "[DIPART-POLIZIA:] %s %s: %s, passo.",DynamicFactions[faction][fRank4],GetPlayerNameEx(playerid),result);
- SendFactionTypeMessage(1, COLOR_YELLOW, wstring);
- SendFactionMessage(6, COLOR_YELLOW, wstring);
- SendFactionMessage(4, COLOR_YELLOW, wstring);
- ProxDetector(5.0, playerid, wstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- FactionChatLog(wstring);
- PhoneAnimation(playerid);
- }
- else if(rank == 5)
- {
- format(wstring, sizeof(wstring), "[DIPART-POLIZIA:] %s %s: %s, passo.",DynamicFactions[faction][fRank5],GetPlayerNameEx(playerid),result);
- SendFactionTypeMessage(1, COLOR_YELLOW, wstring);
- SendFactionMessage(6, COLOR_YELLOW, wstring);
- SendFactionMessage(4, COLOR_YELLOW, wstring);
- ProxDetector(5.0, playerid, wstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- FactionChatLog(wstring);
- PhoneAnimation(playerid);
- }
- else if(rank == 6)
- {
- format(wstring, sizeof(wstring), "[DIPART-POLIZIA:] %s %s: %s, passo.",DynamicFactions[faction][fRank6],GetPlayerNameEx(playerid),result);
- SendFactionTypeMessage(1, COLOR_YELLOW, wstring);
- SendFactionMessage(6, COLOR_YELLOW, wstring);
- SendFactionMessage(4, COLOR_YELLOW, wstring);
- FactionChatLog(wstring);
- PhoneAnimation(playerid);
- }
- else if(rank == 7)
- {
- format(wstring, sizeof(wstring), "[DIPART-POLIZIA:] %s %s: %s, passo.",DynamicFactions[faction][fRank7],GetPlayerNameEx(playerid),result);
- SendFactionTypeMessage(1, COLOR_YELLOW, wstring);
- SendFactionMessage(6, COLOR_YELLOW, wstring);
- ProxDetector(5.0, playerid, wstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- SendFactionMessage(4, COLOR_YELLOW, wstring);
- FactionChatLog(wstring);
- PhoneAnimation(playerid);
- }
- else if(rank == 8)
- {
- format(wstring, sizeof(wstring), "[DIPART-POLIZIA:] %s %s: %s, passo.",DynamicFactions[faction][fRank8],GetPlayerNameEx(playerid),result);
- SendFactionTypeMessage(1, COLOR_YELLOW, wstring);
- SendFactionMessage(6, COLOR_YELLOW, wstring);
- ProxDetector(5.0, playerid, wstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- SendFactionMessage(4, COLOR_YELLOW, wstring);
- FactionChatLog(wstring);
- PhoneAnimation(playerid);
- }
- else if(rank == 9)
- {
- format(wstring, sizeof(wstring), "[DIPART-POLIZIA:] %s %s: %s, passo.",DynamicFactions[faction][fRank9],GetPlayerNameEx(playerid),result);
- SendFactionTypeMessage(1, COLOR_YELLOW, wstring);
- SendFactionMessage(4, COLOR_YELLOW, wstring);
- ProxDetector(5.0, playerid, wstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- SendFactionMessage(6, COLOR_YELLOW, wstring);
- FactionChatLog(wstring);
- PhoneAnimation(playerid);
- }
- else if(rank == 10)
- {
- format(wstring, sizeof(wstring), "[DIPART-POLIZIA:] %s %s: %s, passo.",DynamicFactions[faction][fRank10],GetPlayerNameEx(playerid),result);
- SendFactionTypeMessage(1, COLOR_YELLOW, wstring);
- SendFactionMessage(6, COLOR_YELLOW, wstring);
- ProxDetector(5.0, playerid, wstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
- SendFactionMessage(4, COLOR_YELLOW, wstring);
- FactionChatLog(wstring);
- PhoneAnimation(playerid);
- }
- }
- else
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement