Код:
CMD:r(playerid, params[])
{
new string[128];
if(isnull(params)) return SendClientMessageEx(playerid, COLOR_WHITE, "USAGE: (/r)adio [radio chat]");
new rank[64], division[16];
switch (PlayerInfo[playerid][pMember]) // employer/rank/division data is pulled from here
{
case 1:
{
switch(PlayerInfo[playerid][pRank])
{
case 1: rank = "Officer (I)";
case 2: rank = "Officer (II)";
case 3: rank = "Sergeant";
case 4: rank = "Lieutenant";
case 5: rank = "Captain";
case 6: rank = "Commander";
case 7: rank = "Deputy Chief";
case 8: rank = "Chief";
default: rank = "Cadet";
}
switch(PlayerInfo[playerid][pDivision])
{
case 2: division = " (CIB)";
case 3: division = " (COUNTY)";
case 4: division = " (ATTF)";
case 5: division = " (SWAT)";
case 6: division = " (TRAFFIC)";
default: division = "";
}
format(string, sizeof(string), "** %s%s %s: %s **", rank, division, GetPlayerNameEx(playerid), params);
SendRadioMessage(1, RADIO, string);
Log("logs/NCPDradio.log", string);
}
case 2:
{
switch(PlayerInfo[playerid][pRank])
{
case 1: rank = "Staff";
case 2: rank = "Agent";
case 3: rank = "Senior Agent";
case 4: rank = "Special Agent";
case 5: rank = "Assistant Director";
case 6: rank = "Director";
default: rank = "Intern";
}
switch(PlayerInfo[playerid][pDivision])
{
case 2: division = " (GU)";
case 3: division = " (FAN)";
case 4: division = " (CID)";
case 5: division = " (GANG UNIT)";
case 6: division = " (NSB)";
default: division = "";
}
format(string, sizeof(string), "** %s%s %s: %s **", rank, division, GetPlayerNameEx(playerid), params);
SendRadioMessage(2, RADIO, string);
}
case 3:
{
switch(PlayerInfo[playerid][pRank])
{
case 1: rank = "Officer";
case 2: rank = "Corporal";
case 3: rank = "Sergeant";
case 4: rank = "Lieutenant";
case 5: rank = "Assistant Warden";
case 6: rank = "Warden";
default: rank = "Recruit";
}
switch(PlayerInfo[playerid][pDivision])
{
case 1: division = " (HR)";
case 2: division = " (ERT)";
case 3: division = " (GANG UNIT)";
case 4: division = " (SO)";
default: division = "";
}
format(string, sizeof(string), "** %s%s %s: %s **", rank, division, GetPlayerNameEx(playerid), params);
SendRadioMessage(3, RADIO, string);
}
case 4:
{
switch(PlayerInfo[playerid][pRank])
{
case 1: rank = "Firefighter";
case 2: rank = "FF/Paramedic";
case 3: rank = "Lieutenant";
case 4: rank = "Captain";
case 5: rank = "Assistant Chief";
case 6: rank = "Fire Chief";
default: rank = "Cadet";
}
switch(PlayerInfo[playerid][pDivision])
{
case 1: division = " (FD)";
case 2: division = " (LF)";
case 3: division = " (T&R)";
case 4: division = " (EMS)";
default: division = "";
}
format(string, sizeof(string), "** %s%s %s: %s **", rank, division, GetPlayerNameEx(playerid), params);
SendRadioMessage(4, TEAM_CYAN_COLOR, string);
Log("logs/fdradio.log", string);
}
case 5:
{
switch(PlayerInfo[playerid][pRank])
{
case 1: rank = "Bailiff";
case 2: rank = "Probation Officer";
case 3: rank = "District Attorney";
case 4: rank = "State Prosecutor";
case 5: rank = "Court Judge";
case 6: rank = "Supreme Court Judge";
case 7: rank = "Chief Justice";
default: rank = "Court Clerk";
}
format(string, sizeof(string), "** %s %s: %s **", rank, GetPlayerNameEx(playerid), params);
SendRadioMessage(5, RADIO, string);
}
case 6:
{
switch(PlayerInfo[playerid][pRank])
{
case 1: rank = "Dispatcher";
case 2: rank = "Dispatch Supervisor";
case 3: rank = "Parking Patrol";
case 4: rank = "Government Cabinet";
case 5: rank = "Deputy Mayor";
case 6: rank = "Mayor";
default: rank = "Intern";
}
format(string, sizeof(string), "** %s %s: %s **", rank, GetPlayerNameEx(playerid), params);
SendRadioMessage(6, RADIO, string);
}
case 7:
{
switch(PlayerInfo[playerid][pRank])
{
case 1: rank = "Deputy";
case 2: rank = "Deputy (II)";
case 3: rank = "Sergeant";
case 4: rank = "Lieutenant";
case 5: rank = "Captain";
case 6: rank = "Commander";
case 7: rank = "Undersheriff";
case 8: rank = "Sheriff";
default: rank = "Cadet";
}
switch(PlayerInfo[playerid][pDivision])
{
case 1: division = "(PATROL) ";
case 2: division = "(CIB) ";
case 3: division = "(TRAFFIC) ";
case 4: division = "(TNT) ";
case 5: division = "(HVE) ";
default: division = "";
}
format(string, sizeof(string), "** %s%s %s: %s **", rank, division, GetPlayerNameEx(playerid), params);
SendRadioMessage(7, RADIO, string);
Log("logs/NCSDradio.log", string);
}
case 9:
{
switch(PlayerInfo[playerid][pRank])
{
case 1: rank = "Local Reporter";
case 2: rank = "Local Editor";
case 3: rank = "Network Anchor";
case 4: rank = "Network Editor";
case 5: rank = "Asst. Network Producer";
case 6: rank = "Network Producer";
default: rank = "Intern";
}
switch(PlayerInfo[playerid][pDivision])
{
case 1: division = " (Security)";
case 2: division = " (IA)";
case 3: division = " (TS)";
case 4: division = " (TnR)";
default: division = "";
}
format(string, sizeof(string), "** %s%s %s: %s **", rank, division, GetPlayerNameEx(playerid), params);
SendRadioMessage(9, TEAM_NEWS_COLOR, string);
}
case 11:
{
switch(PlayerInfo[playerid][pRank])
{
case 0: rank = "Private";
case 1: rank = "Corporal";
case 2: rank = "Sergeant";
case 3: rank = "Lieutenant";
case 4: rank = "Captain";
case 5: rank = "Major";
case 6: rank = "General";
default: rank = "Private";
}
switch(PlayerInfo[playerid][pDivision])
{
case 1: division = " (AIR)";
case 2: division = " (ARM)";
case 3: division = " (VET)";
case 4: division = " (AIR SF)";
case 5: division = " (ARM SF)";
case 6: division = " (INF)";
}
format(string, sizeof(string), "** %s%s %s: %s **", rank, division, GetPlayerNameEx(playerid), params);
SendRadioMessage(11, COLOR_NG, string);
}
case 12:
{
if(PlayerInfo[playerid][pDivision] == 1 || PlayerInfo[playerid][pDivision] == 0)
{
switch(PlayerInfo[playerid][pRank])
{
case 1: rank = "Citizen";
case 2: rank = "People's Representative";
case 3: rank = "Tribal Representative";
case 4: rank = "Mayor";
case 5: rank = "Ruling Council Member";
case 6: rank = "Executive Officer of RC";
default: rank = "Citizen";
}
}
else if(PlayerInfo[playerid][pDivision] == 2)
{
switch(PlayerInfo[playerid][pRank])
{
case 1: rank = "Citizen";
case 2: rank = "Private";
case 3: rank = "Lieutenant";
case 4: rank = "Captain";
case 5: rank = "General";
case 6: rank = "Executive Officer of RC";
default: rank = "Citizen";
}
}
else if(PlayerInfo[playerid][pDivision] == 3)
{
switch(PlayerInfo[playerid][pRank])
{
case 1: rank = "Citizen";
case 2: rank = "Trainee";
case 3: rank = "Lieutenant";
case 4: rank = "Captain";
case 5: rank = "Chief";
case 6: rank = "Executive Officer of RC";
default: rank = "Citizen";
}
}
else if(PlayerInfo[playerid][pDivision] == 4)
{
switch(PlayerInfo[playerid][pRank])
{
case 1: rank = "Citizen";
case 2: rank = "Aide";
case 3: rank = "Staff";
case 4: rank = "Ambassador";
case 5: rank = "Councelor General";
case 6: rank = "Executive Officer of RC";
default: rank = "Citizen";
}
}
switch(PlayerInfo[playerid][pDivision])
{
case 1: division = "";
case 2: division = " (AF)";
case 3: division = " (ES)";
case 4: division = " (DC)";
default: division = "";
}
format(string, sizeof(string), "** %s%s %s: %s **", rank, division, GetPlayerNameEx(playerid), params);
SendRadioMessage(12, COLOR_TR, string);
}
case 13:
{
switch(PlayerInfo[playerid][pRank])
{
case 0: rank = "Ensign";
case 1: rank = "Marksman";
case 2: rank = "Elite Marksman";
case 3: rank = "Operative";
case 4: rank = "Elite Operative";
case 5: rank = "Vice Commander";
case 6: rank = "Supreme Commander";
default: rank = "Ensign";
}
switch(PlayerInfo[playerid][pDivision])
{
default: division = "";
}
format(string, sizeof(string), "** %s%s %s: %s **", rank, division, GetPlayerNameEx(playerid), params);
SendRadioMessage(13, COLOR_NOOSE, string);
}
case 14:
{
switch(PlayerInfo[playerid][pRank])
{
case 1: rank = "Battery ";
case 2: rank = "Mechanic ";
case 3: rank = "Tow Truck ";
case 4: rank = "Shift Manager ";
case 5: rank = "Deputy Head ";
case 6: rank = "Head ";
default: rank = "Trainee ";
}
switch(PlayerInfo[playerid][pDivision])
{
case 1: division = "(DILI)";
case 2: division = "(LA)";
case 3: division = "(REPO)";
case 4: division = "(FLAT)";
case 5: division = "(MONT)";
}
format(string, sizeof(string), "** Rapid Recovery %s%s %s: %s **", rank, division, GetPlayerNameEx(playerid), params);
SendRadioMessage(14, RADIO, string);
}
case 15:
{
switch(PlayerInfo[playerid][pRank])
{
case 1: rank = "Garbage Man";
case 2: rank = "Street Sweeper";
case 3: rank = "Electrician";
case 4: rank = "Incident Response";
case 5: rank = "Road Worker";
case 6: rank = "Deputy Director";
case 7: rank = "Director";
default: rank = "Trainee";
}
switch(PlayerInfo[playerid][pDivision])
{
default: division = "";
}
format(string, sizeof(string), "** %s%s %s: %s **", rank, division, GetPlayerNameEx(playerid), params);
SendRadioMessage(15, RADIO, string);
}
case 16:
{
switch(PlayerInfo[playerid][pRank])
{
case 1: rank = "Supervisor";
case 2: rank = "Security Officer";
case 3: rank = "Manager";
case 4: rank = "Executive ";
case 5: rank = "Director of Ops";
case 6: rank = "Vice President";
case 7: rank = "Chief Executive Officer";
default: rank = "Staff";
}
switch(PlayerInfo[playerid][pDivision])
{
default: division = "";
}
format(string, sizeof(string), "** TPS %s%s %s: %s **", rank, division, GetPlayerNameEx(playerid), params);
SendRadioMessage(16, RADIO, string);
}
case 17:
{
switch(PlayerInfo[playerid][pRank])
{
case 1: rank = "Battery";
case 2: rank = "Jr. Mechanic";
case 3: rank = "Mechanic";
case 4: rank = "Tow Driver";
case 5: rank = "Manager";
case 6: rank = "Head";
default: rank = "Trainee";
}
switch(PlayerInfo[playerid][pDivision])
{
default: division = "";
}
format(string, sizeof(string), "** %s %s %s: %s **", rank, division, GetPlayerNameEx(playerid), params);
SendRadioMessage(17, RADIO, string);
}
case 18:
{
switch(PlayerInfo[playerid][pRank])
{
case 1: rank = "VACANT";
case 2: rank = "VACANT";
case 3: rank = "VACANT";
case 4: rank = "VACANT";
case 5: rank = "VACANT";
case 6: rank = "VACANT";
default: rank = "VACANT";
}
switch(PlayerInfo[playerid][pDivision])
{
default: division = "";
}
format(string, sizeof(string), "** %s %s %s: %s **", rank, division, GetPlayerNameEx(playerid), params);
SendRadioMessage(18, RADIO, string);
}
case 19:
{
switch(PlayerInfo[playerid][pRank])
{
case 1: rank = "VACANT";
case 2: rank = "VACANT";
case 3: rank = "VACANT";
case 4: rank = "VACANT";
case 5: rank = "VACANT";
case 6: rank = "VACANT";
default: rank = "VACANT";
}
switch(PlayerInfo[playerid][pDivision])
{
default: division = "";
}
format(string, sizeof(string), "** %s%s %s: %s **", rank, division, GetPlayerNameEx(playerid), params);
SendRadioMessage(19, RADIO, string);
}
case 20:
{
switch(PlayerInfo[playerid][pRank])
{
case 1: rank = "Deputy";
case 2: rank = "Deputy (II)";
case 3: rank = "Sergeant";
case 4: rank = "Lieutenant";
case 5: rank = "Captain";
case 6: rank = "Commander";
case 7: rank = "Deputy Commisioner";
case 8: rank = "Commisioner";
default: rank = "Cadet";
}
switch(PlayerInfo[playerid][pDivision])
{
case 1: division = "(PATROL) ";
case 2: division = "(CIB) ";
case 3: division = "(TRAFFIC) ";
case 4: division = "(TNT) ";
case 5: division = "(HVE) ";
default: division = "";
}
format(string, sizeof(string), "** %s%s %s: %s **", rank, division, GetPlayerNameEx(playerid), params);
SendRadioMessage(19, RADIO, string);
}
default:
{
SendClientMessageEx(playerid,COLOR_GRAD2,"You're not in a faction.");
break;
}