Subdomain Posts
D | 4 days ago
D | 9 days ago
D | 9 days ago
D | 10 days ago
D | 10 days ago
D | 10 days ago
None | 19 days ago
D | 19 days ago
JavaScript | 36 days ago
D | 432 days ago
Recent Posts
None | 1 sec ago
None | 15 sec ago
Java | 24 sec ago
Perl | 35 sec ago
None | 38 sec ago
Perl | 49 sec ago
None | 53 sec ago
C++ | 57 sec ago
Bash | 1 min ago
None | 1 min ago
Sitereport
Find cool info about any domain on the internet?
visit sitereport
Free Subdomains
Want a pastebin.com sub-domain for your community?
learn more...
What is pastebin?
Pastebin is a website that hosts all your text & code on dedicated servers for easy sharing.
learn more...
Learn a little bit about the new Pastebin.com on our help page. hide message
By Javi_Cogollero on the 10th of Jan 2009 02:45:41 PM Download | Raw | Embed | Report
  1. //----------------------------------[departments]-----------------------------------------------
  2.         if(strcmp(cmd, "/departamentos", true) == 0 || strcmp(cmd, "/d", true) == 0)
  3.         {
  4.             if(IsPlayerConnected(playerid))
  5.             {
  6.                         GetPlayerName(playerid, sendername, sizeof(sendername));
  7.                         new length = strlen(cmdtext);
  8.                         while ((idx < length) && (cmdtext[idx] <= ' '))
  9.                         {
  10.                                 idx++;
  11.                         }
  12.                         new offset = idx;
  13.                         new result[64];
  14.                         while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  15.                         {
  16.                                 result[idx - offset] = cmdtext[idx];
  17.                                 idx++;
  18.                         }
  19.                         result[idx - offset] = EOS;
  20.                         if(!strlen(result))
  21.                         {
  22.                                 SendClientMessage(playerid, COLOR_GRAD2, "Uso: (/d)epartamentos [Chat departamental ]");
  23.                                 return 1;
  24.                         }
  25.                         if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1)
  26.                         {
  27.                             if(PlayerInfo[playerid][pRango] == 6) { format(string, sizeof(string), "** Jefe %s: %s, Cambio. **", sendername, result); }
  28.                                 else if(PlayerInfo[playerid][pRango] == 5) { format(string, sizeof(string), "** Capitan %s: %s, Cambio. **", sendername, result); }
  29.                                 else if(PlayerInfo[playerid][pRango] == 4) { format(string, sizeof(string), "** Teniente %s: %s, Cambio. **", sendername, result); }
  30.                                 else if(PlayerInfo[playerid][pRango] == 3) { format(string, sizeof(string), "** Sargento %s: %s, Cambio. **", sendername, result); }
  31.                                 else if(PlayerInfo[playerid][pRango] == 2) { format(string, sizeof(string), "** Oficial %s: %s, Cambio. **", sendername, result); }
  32.                                 else if(PlayerInfo[playerid][pRango] == 1) { format(string, sizeof(string), "** Cadete %s: %s, Cambio. **", sendername, result); }
  33.                                 else
  34.                                 {
  35.                                         format(string, sizeof(string), "** Oficial %s: %s, cambio. **", sendername, result);
  36.                                 }
  37.                                 SendRadioMessage(1, COLOR_ALLDEPT, string);
  38.                                 SendRadioMessage(2, COLOR_ALLDEPT, string);
  39.                 SendRadioMessage(3, COLOR_ALLDEPT, string);
  40.                 SendRadioMessage(4, COLOR_ALLDEPT, string);
  41.                                 printf("%s", string);
  42.                                 return 1;
  43.                         }
  44.                         else if(PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2)
  45.                         {
  46.                             if(PlayerInfo[playerid][pRango] == 6) { format(string, sizeof(string), "** Director %s: %s, Cambio. **", sendername, result); }
  47.                                 else if(PlayerInfo[playerid][pRango] == 5) { format(string, sizeof(string), "** Assistant Director in Charge %s: %s, Cambio. **", sendername, result); }
  48.                                 else if(PlayerInfo[playerid][pRango] == 4) { format(string, sizeof(string), "** Special Agent in Charge %s: %s, Cambio. **", sendername, result); }
  49.                                 else if(PlayerInfo[playerid][pRango] == 3) { format(string, sizeof(string), "** Special Agent %s: %s, Cambio. **", sendername, result); }
  50.                                 else if(PlayerInfo[playerid][pRango] == 2) { format(string, sizeof(string), "** Special Agent Trainee %s: %s, Cambio. **", sendername, result); }
  51.                                 else if(PlayerInfo[playerid][pRango] == 1) { format(string, sizeof(string), "** Professional Staff %s: %s, Cambio. **", sendername, result); }
  52.                                 else
  53.                                 {
  54.                                         format(string, sizeof(string), "** Intern %s: %s, Cambio. **", sendername, result);
  55.                                 }
  56.                                 SendRadioMessage(1, COLOR_ALLDEPT, string);
  57.                                 SendRadioMessage(2, COLOR_ALLDEPT, string);
  58.                 SendRadioMessage(3, COLOR_ALLDEPT, string);
  59.                 SendRadioMessage(4, COLOR_ALLDEPT, string);
  60.                                 printf("%s", string);
  61.                                 return 1;
  62.                         }
  63.                         else if(PlayerInfo[playerid][pMember] == 23 || PlayerInfo[playerid][pLeader] == 23)
  64.                         {
  65.                             if(PlayerInfo[playerid][pRango] == 6) { format(string, sizeof(string), "** Directora %s: %s, over. **", sendername, result); }
  66.                                 else if(PlayerInfo[playerid][pRango] == 5) { format(string, sizeof(string), "** Teniente %s: %s, over. **", sendername, result); }
  67.                                 else if(PlayerInfo[playerid][pRango] == 4) { format(string, sizeof(string), "** Agente Especial CIA %s: %s, over. **", sendername, result); }
  68.                                 else if(PlayerInfo[playerid][pRango] == 3) { format(string, sizeof(string), "** Agente CIA %s: %s, over. **", sendername, result); }
  69.                                 else if(PlayerInfo[playerid][pRango] == 2) { format(string, sizeof(string), "** Aprendiz CIA %s: %s, over. **", sendername, result); }
  70.                                 else if(PlayerInfo[playerid][pRango] == 1) { format(string, sizeof(string), "** Privado %s: %s, over. **", sendername, result); }
  71.                                 else
  72.                                 {
  73.                                         format(string, sizeof(string), "** Intern %s: %s, over. **", sendername, result);
  74.                                 }
  75.                                 SendTeamMessage(1, COLOR_ALLDEPT, string);
  76.                                 SendTeamMessage(2, COLOR_ALLDEPT, string);
  77.                                 SendTeamMessage(11, COLOR_ALLDEPT, string);
  78.                                 SendTeamMessage(14, COLOR_ALLDEPT, string);
  79.                                 printf("%s", string);
  80.                                 return 1;
  81.                         }
  82.                         else if(PlayerInfo[playerid][pMember] == 3 || PlayerInfo[playerid][pLeader] == 3)
  83.                         {
  84.                             if(PlayerInfo[playerid][pRango] == 6) { format(string, sizeof(string), "** S.W.A.T General %s: %s, Cambio. **", sendername, result); }
  85.                                 else if(PlayerInfo[playerid][pRango] == 5) { format(string, sizeof(string), "** S.W.A.T Teniente %s: %s, Cambio. **", sendername, result); }
  86.                                 else if(PlayerInfo[playerid][pRango] == 4) { format(string, sizeof(string), "** S.W.A.T Capitan %s: %s, Cambio. **", sendername, result); }
  87.                                 else if(PlayerInfo[playerid][pRango] == 3) { format(string, sizeof(string), "** S.W.A.T Mayor %s: %s, Cambio. **", sendername, result); }
  88.                                 else if(PlayerInfo[playerid][pRango] == 2) { format(string, sizeof(string), "** S.W.A.T Sargento %s: %s, Cambio. **", sendername, result); }
  89.                                 else if(PlayerInfo[playerid][pRango] == 1) { format(string, sizeof(string), "** S.W.A.T Agente %s: %s, Cambio. **", sendername, result); }
  90.                                 else
  91.                                 {
  92.                                         format(string, sizeof(string), "** Agente %s: %s, Cambio. **", sendername, result);
  93.                                 }
  94.                                 SendRadioMessage(1, COLOR_ALLDEPT, string);
  95.                                 SendRadioMessage(2, COLOR_ALLDEPT, string);
  96.                 SendRadioMessage(3, COLOR_ALLDEPT, string);
  97.                 SendRadioMessage(4, COLOR_ALLDEPT, string);
  98.                                 printf("%s", string);
  99.                                 return 1;
  100.                         }
  101.                         else if(gTeam[playerid] == 1||PlayerInfo[playerid][pMember]==4||PlayerInfo[playerid][pLeader]==4)
  102.                         {
  103.                                 format(string, sizeof(string), "** Paramedico %s: %s, Cambio. **", sendername, result);
  104.                                 SendRadioMessage(1, COLOR_ALLDEPT, string);
  105.                                 SendRadioMessage(2, COLOR_ALLDEPT, string);
  106.                 SendRadioMessage(3, COLOR_ALLDEPT, string);
  107.                 SendRadioMessage(4, COLOR_ALLDEPT, string);
  108.                                 printf("%s", string);
  109.                                 return 1;
  110.                         }
  111.                         else
  112.                         {
  113.                                 SendClientMessage(playerid, COLOR_GRAD2, "   No Eres Parte de Este Equipo!");
  114.                                 return 1;
  115.                         }
  116.                 }
  117.                 return 1;
  118.         }
Submit a correction or amendment below. Make A New Post
To highlight particular lines, prefix each line with @h@
Syntax highlighting:
Post expiration:
Post exposure:
Name / Title:
Email: