Advertisement
Guest User

samp

a guest
Jun 16th, 2014
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.66 KB | None | 0 0
  1. if(strcmp(cmd, "/dipartimenti", true) == 0 || strcmp(cmd, "/d", true) == 0)
  2. {
  3. if(IsPlayerConnected(playerid))
  4. {
  5. new wstring[128];
  6. new faction = PlayerInfo[playerid][pFaction];
  7. new rank = PlayerInfo[playerid][pRank];
  8. new length = strlen(cmdtext);
  9. while ((idx < length) && (cmdtext[idx] <= ' '))
  10. {
  11. idx++;
  12. }
  13. new offset = idx;
  14. new result[256];
  15. while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
  16. {
  17. result[idx - offset] = cmdtext[idx];
  18. idx++;
  19. }
  20. result[idx - offset] = EOS;
  21. if(!strlen(result))
  22. {
  23. SendClientMessage(playerid, COLOR_LIGHTYELLOW2, "[USO:] (/d)ipartimenti");
  24. return 1;
  25. }
  26. if(Muted[playerid])
  27. {
  28. SendClientMessage(playerid, COLOR_RED, "[ERRORE:] Non puoi usare la radio, sei mutato!.");
  29. return 1;
  30. }
  31. if (PlayerInfo[playerid][pFaction]==0 || PlayerInfo[playerid][pFaction]==1 || PlayerInfo[playerid][pFaction]==2 || PlayerInfo[playerid][pFaction]==6)
  32. {
  33. if(CopOnDuty[playerid])
  34. {
  35. if(rank == 1)
  36. {
  37. format(wstring, sizeof(wstring), "[DIPART-POLIZIA:] %s %s: %s, passo.",DynamicFactions[faction][fRank1],GetPlayerNameEx(playerid),result);
  38. ProxDetector(5.0, playerid, wstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  39. SendFactionTypeMessage(1, COLOR_YELLOW, wstring);
  40. SendFactionMessage(4, COLOR_YELLOW, wstring);
  41. SendFactionMessage(6, COLOR_YELLOW, wstring);
  42. FactionChatLog(wstring);
  43. PhoneAnimation(playerid);
  44. }
  45. else if(rank == 2)
  46. {
  47. format(wstring, sizeof(wstring), "[DIPART-POLIZIA:] %s %s: %s, passo.",DynamicFactions[faction][fRank2],GetPlayerNameEx(playerid),result);
  48. ProxDetector(5.0, playerid, wstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  49. SendFactionTypeMessage(1, COLOR_YELLOW, wstring);
  50. SendFactionMessage(6, COLOR_YELLOW, wstring);
  51. SendFactionMessage(4, COLOR_YELLOW, wstring);
  52. FactionChatLog(wstring);
  53. PhoneAnimation(playerid);
  54. }
  55. else if(rank == 3)
  56. {
  57. format(wstring, sizeof(wstring), "[DIPART-POLIZIA:] %s %s: %s, passo.",DynamicFactions[faction][fRank3],GetPlayerNameEx(playerid),result);
  58. SendFactionTypeMessage(1, COLOR_YELLOW, wstring);
  59. SendFactionMessage(6, COLOR_YELLOW, wstring);
  60. SendFactionMessage(4, COLOR_YELLOW, wstring);
  61. ProxDetector(5.0, playerid, wstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  62. FactionChatLog(wstring);
  63. PhoneAnimation(playerid);
  64. }
  65. else if(rank == 4)
  66. {
  67. format(wstring, sizeof(wstring), "[DIPART-POLIZIA:] %s %s: %s, passo.",DynamicFactions[faction][fRank4],GetPlayerNameEx(playerid),result);
  68. SendFactionTypeMessage(1, COLOR_YELLOW, wstring);
  69. SendFactionMessage(6, COLOR_YELLOW, wstring);
  70. SendFactionMessage(4, COLOR_YELLOW, wstring);
  71. ProxDetector(5.0, playerid, wstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  72. FactionChatLog(wstring);
  73. PhoneAnimation(playerid);
  74. }
  75. else if(rank == 5)
  76. {
  77. format(wstring, sizeof(wstring), "[DIPART-POLIZIA:] %s %s: %s, passo.",DynamicFactions[faction][fRank5],GetPlayerNameEx(playerid),result);
  78. SendFactionTypeMessage(1, COLOR_YELLOW, wstring);
  79. SendFactionMessage(6, COLOR_YELLOW, wstring);
  80. SendFactionMessage(4, COLOR_YELLOW, wstring);
  81. ProxDetector(5.0, playerid, wstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  82. FactionChatLog(wstring);
  83. PhoneAnimation(playerid);
  84. }
  85. else if(rank == 6)
  86. {
  87. format(wstring, sizeof(wstring), "[DIPART-POLIZIA:] %s %s: %s, passo.",DynamicFactions[faction][fRank6],GetPlayerNameEx(playerid),result);
  88. SendFactionTypeMessage(1, COLOR_YELLOW, wstring);
  89. SendFactionMessage(6, COLOR_YELLOW, wstring);
  90. SendFactionMessage(4, COLOR_YELLOW, wstring);
  91. FactionChatLog(wstring);
  92. PhoneAnimation(playerid);
  93. }
  94. else if(rank == 7)
  95. {
  96. format(wstring, sizeof(wstring), "[DIPART-POLIZIA:] %s %s: %s, passo.",DynamicFactions[faction][fRank7],GetPlayerNameEx(playerid),result);
  97. SendFactionTypeMessage(1, COLOR_YELLOW, wstring);
  98. SendFactionMessage(6, COLOR_YELLOW, wstring);
  99. ProxDetector(5.0, playerid, wstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  100. SendFactionMessage(4, COLOR_YELLOW, wstring);
  101. FactionChatLog(wstring);
  102. PhoneAnimation(playerid);
  103. }
  104. else if(rank == 8)
  105. {
  106. format(wstring, sizeof(wstring), "[DIPART-POLIZIA:] %s %s: %s, passo.",DynamicFactions[faction][fRank8],GetPlayerNameEx(playerid),result);
  107. SendFactionTypeMessage(1, COLOR_YELLOW, wstring);
  108. SendFactionMessage(6, COLOR_YELLOW, wstring);
  109. ProxDetector(5.0, playerid, wstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  110. SendFactionMessage(4, COLOR_YELLOW, wstring);
  111. FactionChatLog(wstring);
  112. PhoneAnimation(playerid);
  113. }
  114. else if(rank == 9)
  115. {
  116. format(wstring, sizeof(wstring), "[DIPART-POLIZIA:] %s %s: %s, passo.",DynamicFactions[faction][fRank9],GetPlayerNameEx(playerid),result);
  117. SendFactionTypeMessage(1, COLOR_YELLOW, wstring);
  118. SendFactionMessage(4, COLOR_YELLOW, wstring);
  119. ProxDetector(5.0, playerid, wstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  120. SendFactionMessage(6, COLOR_YELLOW, wstring);
  121. FactionChatLog(wstring);
  122. PhoneAnimation(playerid);
  123. }
  124. else if(rank == 10)
  125. {
  126. format(wstring, sizeof(wstring), "[DIPART-POLIZIA:] %s %s: %s, passo.",DynamicFactions[faction][fRank10],GetPlayerNameEx(playerid),result);
  127. SendFactionTypeMessage(1, COLOR_YELLOW, wstring);
  128. SendFactionMessage(6, COLOR_YELLOW, wstring);
  129. ProxDetector(5.0, playerid, wstring,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5);
  130. SendFactionMessage(4, COLOR_YELLOW, wstring);
  131. FactionChatLog(wstring);
  132. PhoneAnimation(playerid);
  133. }
  134. }
  135. else
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement