Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2014
193
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <a_samp>
  2. #include <core>
  3. #include <float>
  4.  
  5. new glob0[500];
  6.  
  7. new glob7D0[500];
  8.  
  9. new Text:globFA0;
  10.  
  11. new globFA4[128];
  12.  
  13. new glob11A4 = -1;
  14.  
  15.  
  16.  
  17.  
  18. public OnGameModeInit()
  19. {
  20. AddPlayerClass(0, 0.0, 0.0, 0.0, 0.0, 23, 500, 28, 750, 30, 500);
  21. AddPlayerClass(164, 0.0, 0.0, 0.0, 0.0, 23, 500, 28, 750, 30, 500);
  22. AddPlayerClass(165, 0.0, 0.0, 0.0, 0.0, 23, 500, 28, 750, 30, 500);
  23. AddPlayerClass(166, 0.0, 0.0, 0.0, 0.0, 23, 500, 28, 750, 30, 500);
  24. AddPlayerClass(121, 0.0, 0.0, 0.0, 0.0, 4, 1, 25, 100, 0, 0);
  25. AddPlayerClass(122, 0.0, 0.0, 0.0, 0.0, 4, 1, 25, 100, 0, 0);
  26. AddPlayerClass(181, 0.0, 0.0, 0.0, 0.0, 4, 1, 25, 100, 0, 0);
  27. AddPlayerClass(280, 0.0, 0.0, 0.0, 0.0, 22, 500, 25, 100, 33, 50);
  28. AddPlayerClass(281, 0.0, 0.0, 0.0, 0.0, 22, 500, 25, 100, 33, 50);
  29. AddPlayerClass(282, 0.0, 0.0, 0.0, 0.0, 22, 500, 25, 100, 33, 50);
  30. AddPlayerClass(283, 0.0, 0.0, 0.0, 0.0, 22, 500, 25, 100, 33, 50);
  31. AddPlayerClass(284, 0.0, 0.0, 0.0, 0.0, 22, 500, 25, 100, 33, 50);
  32. AddPlayerClass(285, 0.0, 0.0, 0.0, 0.0, 22, 500, 25, 100, 33, 50);
  33. AddPlayerClass(288, 0.0, 0.0, 0.0, 0.0, 22, 500, 25, 100, 33, 50);
  34. AddPlayerClass(79, 0.0, 0.0, 0.0, 0.0, 6, 1, 28, 500, 0, 0);
  35. AddPlayerClass(137, 0.0, 0.0, 0.0, 0.0, 6, 1, 28, 500, 0, 0);
  36. AddPlayerClass(213, 0.0, 0.0, 0.0, 0.0, 6, 1, 28, 500, 0, 0);
  37. AddPlayerClass(230, 0.0, 0.0, 0.0, 0.0, 6, 1, 28, 500, 0, 0);
  38. AddPlayerClass(239, 0.0, 0.0, 0.0, 0.0, 6, 1, 28, 500, 0, 0);
  39. AddStaticVehicle(484, 4498.3251, -2517.7303, -0.4129, 138.2467, -1, -1);
  40. CreateObject(12990, 4495.664, -2510.7591, 2.3733, 0.0, 0.0, 270.0, 0);
  41. UsePlayerPedAnims();
  42. DisableInteriorEnterExits();
  43. format(globFA4, 128, " ");
  44. globFA0 = TextDrawCreate(480.0, 420.0, globFA4);
  45. TextDrawLetterSize(globFA0, 0.4, 1.1);
  46. TextDrawSetShadow(globFA0, 0);
  47. TextDrawSetOutline(globFA0, 1);
  48. return 1;
  49. }
  50.  
  51. public OnPlayerRequestClass(playerid, classid)
  52. {
  53. SetPlayerWeather(playerid, 9);
  54. SetPlayerPos(playerid, 4480.9755, -2510.5552, 3.6747);
  55. SetPlayerCameraPos(playerid, 4475.0512, -2508.5027, 4.1532);
  56. SetPlayerCameraLookAt(playerid, 4480.9755, -2510.5552, 3.6747, 2);
  57. SetPlayerFacingAngle(playerid, 91.9195);
  58. switch(classid)
  59. {
  60. case 1:
  61. {
  62. GameTextForPlayer(playerid, "~b~Bodyguard", 999999, 6);
  63. glob0[playerid] = 1;
  64. }
  65. case 4:
  66. {
  67. GameTextForPlayer(playerid, "~r~Terrorist", 999999, 6);
  68. glob0[playerid] = 2;
  69. }
  70. case 8:
  71. {
  72. GameTextForPlayer(playerid, "~b~PoliceOfficer", 999999, 6);
  73. glob0[playerid] = 3;
  74. }
  75. case 19:
  76. {
  77. GameTextForPlayer(playerid, "~r~Psycho", 999999, 6);
  78. glob0[playerid] = 4;
  79. }
  80. }
  81. return 1;
  82. }
  83.  
  84. public OnPlayerRequestSpawn(playerid)
  85. {
  86. new var0[24], var1[128];
  87. GetPlayerName(playerid, var0, 24);
  88. format(var1, 128, "{FF0000}Dibra-Gaming: {FFFFFF}%s tani është një %s", var0, glob11A8[glob0[playerid]][0]);
  89. SendClientMessageToAll(0xFFFFFFAA, var1);
  90. return 1;
  91. }
  92.  
  93. public OnPlayerConnect(playerid)
  94. {
  95. new var0[24], var1[128];
  96. GetPlayerName(playerid, var0, 24);
  97. format(var1, 128, "{FF0000}Dibra-Gaming: {FFFFFF}%s eshtë ne server", var0);
  98. SendClientMessageToAll(0xA9A9A9AA, var1);
  99. SendDeathMessage(playerid, playerid, 200);
  100. glob0[playerid] = 0;
  101. glob7D0[playerid] = 0;
  102. SetPlayerColor(playerid, 0xA9A9A9AA);
  103. PlayerPlaySound(playerid, 1188, 0.0, 0.0, 0.0);
  104. GivePlayerMoney(playerid, 1000);
  105. return 1;
  106. }
  107.  
  108. public OnPlayerDisconnect(playerid, reason)
  109. {
  110. new var0[24], var1[128];
  111. GetPlayerName(playerid, var0, 24);
  112. format(var1, 128, "{FF0000}Dibra-Gaming: {FFFFFF}%s dul nga serveri.", var0);
  113. SendClientMessageToAll(0xA9A9A9AA, var1);
  114. SendDeathMessage(playerid, playerid, 201);
  115. return 1;
  116. }
  117.  
  118. public OnPlayerSpawn(playerid)
  119. {
  120. GameTextForPlayer(playerid, " ", 10, 3);
  121. SetPlayerWeather(playerid, 1);
  122. if(playerid == glob11A4)
  123. {
  124. TogglePlayerControllable(playerid, false);
  125. }
  126. switch(glob0[playerid]) {
  127. case 1:
  128. SetPlayerPos(playerid, -2787.6155 + random(66), -294.2366 + random(8), 7.0399);
  129. SetPlayerFacingAngle(playerid, random(360));
  130. SetPlayerColor(playerid, 0x87CEEBAA);
  131. case 2:
  132. SetPlayerPos(playerid, 1672.6181 + random(23), 1440.2609 + random(15), 10.7791);
  133. SetPlayerFacingAngle(playerid, random(360));
  134. SetPlayerColor(playerid, 0xFF0000AA);
  135. case 3:
  136. SetPlayerPos(playerid, -1639.0776 + random(66), 655.8917 + random(14), 7.1901);
  137. SetPlayerFacingAngle(playerid, random(360));
  138. SetPlayerColor(playerid, 0x0000FFAA);
  139. case 4:
  140. SetPlayerPos(playerid, 2471.2419 + random(36), -1684.1921 + random(30), 13.5459);
  141. SetPlayerFacingAngle(playerid, random(360));
  142. SetPlayerColor(playerid, 0x32CD32AA);
  143. }
  144. SetCameraBehindPlayer(playerid);
  145. return 1;
  146. }
  147.  
  148. public OnPlayerDeath(playerid, killerid, reason)
  149. {
  150. SendDeathMessage(killerid, playerid, reason);
  151. SendClientMessage(playerid, 0xAAAAAAAA, "{FF0000}Dibra-Gaming: {FFFFFF}Ti vdeke dhe humbe 1000$.");
  152. GivePlayerMoney(playerid, -1000);
  153. GivePlayerMoney(killerid, 2000);
  154. SendClientMessage(killerid, 0xAAAAAAAA, "{FF0000}Dibra-Gaming: {FFFFFF}Ti e mbyte armikun edhe fitove 2000$ plus 1 pik (score)");
  155. SetPlayerWantedLevel(killerid, 0);
  156. if(65535 != killerid)
  157. {
  158. SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
  159. }
  160. return 1;
  161. }
  162. public OnPlayerCommandText(playerid, cmdtext[])
  163. {
  164. if (strcmp("/plazhi", cmdtext, true, 10) == 0)
  165. {
  166. SetPlayerPos(playerid,312.8729,-1822.9288,6.5443);
  167. SendClientMessage(playerid, 0xFFFFFFFF, "Ti je tek plazhi");
  168. return 1;
  169. }
  170. return 0;
  171. }
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement