Guest User

scriptz

a guest
Sep 29th, 2013
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.43 KB | None | 0 0
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. //define filterscript
  4.  
  5. #include <core>
  6. #include <float>
  7. #include <a_samp>
  8. #include <zcmd>
  9. #pragma tabsize 0
  10.  
  11. main ()
  12. {
  13. }
  14.  
  15. #define COLOR_WHITE 0xFFFFFFFF
  16. #define COL_GREEN "{6EF83C}"
  17. #define COL_WHITE "{FFFFFF}"
  18. #define COLOR_RED 0xAA3333AA
  19. #define COLOR_GREEN 0x33AA33AA
  20. #define GROVE 1
  21. #define BALLA 2
  22. #define AZTECAS 3
  23. #define AMMUNITION 4
  24. #define SLUT 5
  25. #define BOSS 6
  26. #define VAGOS 7
  27. #define DIALOG_TEAM 123
  28.  
  29. new gPlayerTeam[MAX_PLAYERS];
  30. new gPlayerClass[MAX_PLAYERS];
  31. new PickedClass[MAX_PLAYERS];
  32.  
  33. public OnGameModeInit()
  34. {
  35. // Don't use these lines if it's a filterscript
  36. SetGameModeText("Just Testin'");
  37. AddPlayerClass(107,2521.2722,-1678.7083,15.3522,82.8959,31,500,24,999,32,400);
  38. AddPlayerClass(106,2521.2722,-1678.7083,15.3522,82.8959,31,500,24,999,32,400);
  39. AddPlayerClass(105,2521.2722,-1678.7083,15.3522,82.8959,31,500,24,999,32,400);
  40. AddPlayerClass(108,2521.2722,-1678.7083,15.3522,82.8959,37,900,18,2020,30,999);
  41. AddPlayerClass(109,2521.2722,-1678.7083,15.3522,82.8959,37,900,18,2020,30,999);
  42. AddPlayerClass(110,2521.2722,-1678.7083,15.3522,82.8959,37,900,18,2020,30,999);
  43. AddPlayerClass(102,2521.2722,-1678.7083,15.3522,82.8959,22,9999,31,999,30,999);
  44. AddPlayerClass(103,2521.2722,-1678.7083,15.3522,82.8959,27,2700,22,9999,31,999);
  45. AddPlayerClass(104,2521.2722,-1678.7083,15.3522,82.8959,27,2700,22,9999,31,999);
  46. AddPlayerClass(114,2521.2722,-1678.7083,15.3522,82.8959,26,200,23,400,32,999);
  47. AddPlayerClass(115,2521.2722,-1678.7083,15.3522,82.8959,26,200,23,400,32,999);
  48. AddPlayerClass(116,2521.2722,-1678.7083,15.3522,82.8959,26,200,23,400,32,999);
  49. AddPlayerClass(120,2521.2722,-1678.7083,15.3522,82.8959,8,0,31,999,24,999);
  50. AddPlayerClass(179,2521.2722,-1678.7083,15.3522,82.8959,30,500,22,490,29,800);
  51. AddPlayerClass(194,2521.2722,-1678.7083,15.3522,82.8959,10,0,31,2000,30,2000);
  52.  
  53. AddStaticVehicle(447,2529.5759,-1678.2296,19.9419,91.5106,75,2);
  54. AddStaticVehicle(490,2494.3008,-1654.5840,13.5311,249.8709,0,0);
  55. AddStaticVehicle(451,2473.8311,-1700.7242,13.2273,177.6675,125,125);
  56. AddStaticVehicle(522,2528.0742,-1689.7404,13.2581,80.6985,6,25);
  57. AddStaticVehicle(522,2527.1887,-1689.2676,13.2201,63.1784,6,25);
  58. return 1;
  59. }
  60.  
  61. public OnGameModeExit()
  62. {
  63. return 1;
  64. }
  65.  
  66. public OnPlayerRequestClass(playerid, classid)
  67. {
  68. if(gPlayerTeam[playerid] == -1)
  69. {
  70. TogglePlayerSpectating(playerid, 1);
  71. ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Grove Class\nBalla Class\nVagos Class\nAztecas Class\nSlut Class\nAmmunution class\nBoss Class", "Choose","");
  72. return 0;
  73. }
  74. else
  75. {
  76. SetPlayerPos(playerid,2519.8140,-1678.8607,14.8426);
  77. SetPlayerFacingAngle(playerid,63.1557);
  78. SetPlayerCameraPos(playerid,2513.6995,-1675.4047,13.5563);
  79. SetPlayerCameraLookAt(playerid,2519.8140,-1678.8607,14.8426);
  80. return 1;
  81. }
  82. }
  83.  
  84. public OnPlayerConnect(playerid)
  85. {
  86. gPlayerTeam[playerid] = -1;
  87. GameTextForPlayer(playerid, "Hello, Welcome to our server, remember to read /rules!",15000,6);
  88. return 1;
  89. }
  90.  
  91. public OnPlayerDisconnect(playerid, reason)
  92. {
  93. return 1;
  94. }
  95.  
  96. public OnPlayerSpawn(playerid)
  97. {
  98. if(gPlayerClass[playerid] == GROVE)
  99. {
  100. TogglePlayerControllable(playerid, 1);
  101. ResetPlayerWeapons(playerid);
  102. GivePlayerWeapon(playerid, 31, 1000);//m4
  103. GivePlayerWeapon(playerid, 25, 1000);//mp5
  104. GivePlayerWeapon(playerid, 24, 7000);//deagle
  105. }
  106. else if(gPlayerClass[playerid] == BALLA)//This is for the Second Sniper class.
  107. {
  108. TogglePlayerControllable(playerid, 1);
  109. ResetPlayerWeapons(playerid);
  110. GivePlayerWeapon(playerid, 30, 2250);//sniper
  111. GivePlayerWeapon(playerid, 29, 2250);//mp5
  112. GivePlayerWeapon(playerid, 4, 1);//knife
  113. }
  114. else if(gPlayerClass[playerid] == AZTECAS)//This is for the Second Engineer class.
  115. {
  116. TogglePlayerControllable(playerid, 1);
  117. ResetPlayerWeapons(playerid);
  118. GivePlayerWeapon(playerid, 27, 700);//spas12
  119. GivePlayerWeapon(playerid, 23, 8000);//silent pistol
  120. GivePlayerWeapon(playerid, 30, 2000);//rpg
  121. GivePlayerWeapon(playerid, 16, 5);//grenade
  122. }
  123. else if(gPlayerClass[playerid] == VAGOS)//This is for the Second Jetrooper class.
  124. {
  125. TogglePlayerControllable(playerid, 1);
  126. ResetPlayerWeapons(playerid);
  127. GivePlayerWeapon(playerid, 32, 500);//tec-9
  128. GivePlayerWeapon(playerid, 30, 500);//colt
  129. GivePlayerWeapon(playerid, 25, 200);//knife
  130. }
  131. else if(gPlayerClass[playerid] == SLUT)//This is for the Second Pilot class.
  132. {
  133. TogglePlayerControllable(playerid, 1);
  134. ResetPlayerWeapons(playerid);
  135. GivePlayerWeapon(playerid, 27, 1000);//deagle
  136. GivePlayerWeapon(playerid, 29, 1000);//moltove
  137. GivePlayerWeapon(playerid, 10, 1);//shotgun
  138. }
  139. else if(gPlayerClass[playerid] == AMMUNITION)//This is for the Second Spy class.
  140. {
  141. TogglePlayerControllable(playerid, 1);
  142. ResetPlayerWeapons(playerid);
  143. GivePlayerWeapon(playerid, 29, 990);//mp5
  144. GivePlayerWeapon(playerid, 26, 100);//silent pistol
  145. GivePlayerWeapon(playerid, 4, 1);//knife
  146. GivePlayerWeapon(playerid, 30, 500);//moltove
  147. }
  148. else if(gPlayerClass[playerid] == BOSS)//This is for the Second Spy class.
  149. {
  150. TogglePlayerControllable(playerid, 1);
  151. ResetPlayerWeapons(playerid);
  152. GivePlayerWeapon(playerid, 31, 990);//mp5
  153. GivePlayerWeapon(playerid, 22, 100);//silent pistol
  154. GivePlayerWeapon(playerid, 16, 3);//knife
  155. GivePlayerWeapon(playerid, 32, 500);//moltove
  156. }
  157. return 1;
  158. }
  159.  
  160. CMD:dildo(playerid,params[])
  161. {
  162. if(gPlayerClass[playerid] == SLUT)//if the player is slut
  163. {
  164. SetPlayerHealth(playerid, 80);
  165. }
  166. return 1;
  167. }
  168.  
  169. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  170. {
  171. if(dialogid == DIALOG_TEAM)
  172. {
  173. if(response)
  174. {
  175. gPlayerTeam[playerid] = listitem; // Set team ID
  176.  
  177. TogglePlayerSpectating(playerid, 0); // Quit spectating -> Will send the player back to the class selection
  178. if(dialogid == 999)//dialog id response
  179. {
  180. if(response)
  181. {
  182. if(listitem == 0)//the listitem0, defines the number one option of the dialog
  183. {
  184. if(GetPlayerScore(playerid) >= 0)//if player have 0 score then he can choose this class
  185. {
  186. SendClientMessage(playerid, COLOR_WHITE, "You chose the Grove as your class.");
  187. ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Grove Class:", "{F81414}Abilities:\n{FFFFFF}Gang class. Good at shooting.\n\n{F81414}Weapons:\n\n{FFFFFF}M4\n{FFFFFF}Shotgun\n{FFFFFF}Deagle", "Play","");
  188. gPlayerClass[playerid] = GROVE;//setting the class to soldier
  189. PickedClass[playerid] = 1;
  190. SetPlayerVirtualWorld(playerid, 0);
  191. TogglePlayerControllable(playerid, 1);
  192. ResetPlayerWeapons(playerid);
  193. GivePlayerWeapon(playerid, 31, 1000);//m4
  194. GivePlayerWeapon(playerid, 25, 1000);//mp5
  195. GivePlayerWeapon(playerid, 24, 7000);//deagle
  196. }
  197. }
  198.  
  199. if(listitem == 1)//the listitem1, defines the number one option of the dialog
  200. {
  201. if(GetPlayerScore(playerid) >= 0)//if player have 0 score then he can choose this class
  202. {
  203. SendClientMessage(playerid, COLOR_WHITE, "You chose the Ballas as your class.");
  204. ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Ballas Class:", "{F81414}Abilities:\n{FFFFFF}You're invisible on map.You don't have much foes.Ammunition and slut are your friends.\n\n{F81414}Weapons:\n\n{FFFFFF}AK-47\n{FFFFFF}Mp5\n{FFFFFF}Knife", "Play","");
  205. gPlayerClass[playerid] = BALLA;//setting the class to Sniper
  206. PickedClass[playerid] = 1;
  207. RemovePlayerMapIcon(playerid, 0);
  208. SetPlayerVirtualWorld(playerid, 0);
  209. TogglePlayerControllable(playerid, 1);
  210. ResetPlayerWeapons(playerid);
  211. GivePlayerWeapon(playerid, 30, 2250);//sniper
  212. GivePlayerWeapon(playerid, 29, 2250);//mp5
  213. GivePlayerWeapon(playerid, 4, 1);//knife
  214. }
  215. }
  216.  
  217. if(listitem == 2)//the listitem2, defines the number one option of the dialog
  218. {
  219. if(GetPlayerScore(playerid) >= 0)//if player have 0 score then he can choose this class
  220. {
  221. SendClientMessage(playerid, COLOR_WHITE, "You chose the Aztecas as your class.");
  222. ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Azteca Class:", "{F81414}Abilities:\n{FFFFFF}You fight against BALLAS and VAGOS. They are your only enemies..\n\n{F81414}Weapons:\n\n{FFFFFF}Spas12\n{FFFFFF}Silent Pistol\n{FFFFFF}M4\n{FFFFFF}Grenade", "Play","");
  223. gPlayerClass[playerid] = AZTECAS;//setting the class to engineer
  224. PickedClass[playerid] = 1;
  225. SetPlayerVirtualWorld(playerid, 0);
  226. TogglePlayerControllable(playerid, 1);
  227. ResetPlayerWeapons(playerid);
  228. GivePlayerWeapon(playerid, 27, 700);//spas12
  229. GivePlayerWeapon(playerid, 23, 8000);//silent pistol
  230. GivePlayerWeapon(playerid, 30, 2000);//rpg
  231. GivePlayerWeapon(playerid, 16, 5);//grenade
  232. }
  233. }
  234.  
  235. if(listitem == 3)//the listitem3, defines the number one option of the dialog
  236. {
  237. if(GetPlayerScore(playerid) >= 0)//if player have 0 score then he can choose this class
  238. {
  239. SendClientMessage(playerid, COLOR_WHITE, "You chose the Vagos as your class.");
  240. ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Vagos Class:", "{F81414}Abilities:\n{FFFFFF}Good class if you want to go solo.\n\n{F81414}Weapons:\n\n{FFFFFF}Shotgun\n{FFFFFF}M4\n{FFFFFF}Mp5", "Play","");
  241. gPlayerClass[playerid] = VAGOS;//setting the class to jettrooper
  242. PickedClass[playerid] = 1;
  243. SetPlayerVirtualWorld(playerid, 0);
  244. TogglePlayerControllable(playerid, 1);
  245. ResetPlayerWeapons(playerid);
  246. GivePlayerWeapon(playerid, 32, 500);//tec-9
  247. GivePlayerWeapon(playerid, 30, 500);//colt
  248. GivePlayerWeapon(playerid, 25, 200);//knife
  249. }
  250. }
  251.  
  252. if(listitem == 4)//the listitem4, defines the number one option of the dialog
  253. {
  254. if(GetPlayerScore(playerid) >= 20)//if player have 0 score then he can choose this class
  255. {
  256. SendClientMessage(playerid, COLOR_WHITE, "You chose the Slut as your class.");
  257. ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Slut Class:", "{F81414}Abilities:\n{FFFFFF}Best class: You can heal yourself with /dildo.\n\n{F81414}Weapons:\n\n{FFFFFF}Combat Shotgun\n{FFFFFF}Mp5\n{FFFFFF}Dildo", "Play","");
  258. gPlayerClass[playerid] = SLUT;//setting the class to pilot
  259. PickedClass[playerid] = 1;
  260. SetPlayerVirtualWorld(playerid, 0);
  261. TogglePlayerControllable(playerid, 1);
  262. ResetPlayerWeapons(playerid);
  263. GivePlayerWeapon(playerid, 27, 10000);//deagle
  264. GivePlayerWeapon(playerid, 29, 10000);//moltove
  265. GivePlayerWeapon(playerid, 10, 1);//shotgun
  266. }
  267. }
  268.  
  269. if(listitem == 5)//the listitem5, defines the number one option of the dialog
  270. {
  271. if(GetPlayerScore(playerid) >= 0)//if player have 0 score then he can choose this class
  272. {
  273. SendClientMessage(playerid, COLOR_WHITE, "You chose the Ammunition as your class.");
  274. ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Ammunition Class:", "{F81414}Abilities:\n{FFFFFF}You sell weapons, do you really need a description? /dis\n\n{F81414}Weapons:\n\n{FFFFFF}Sawnoff\n{FFFFFF}Mp5\n{FFFFFF}Knife\n{FFFFFF}AK-47", "Play","");
  275. gPlayerClass[playerid] = AMMUNITION;//setting the class to Spy
  276. PickedClass[playerid] = 1;
  277. SetPlayerVirtualWorld(playerid, 0);
  278. TogglePlayerControllable(playerid, 1);
  279. ResetPlayerWeapons(playerid);
  280. GivePlayerWeapon(playerid, 29, 990);//mp5
  281. GivePlayerWeapon(playerid, 26, 100);//silent pistol
  282. GivePlayerWeapon(playerid, 4, 1);//knife
  283. GivePlayerWeapon(playerid, 30, 500);//moltove
  284. }
  285. }
  286.  
  287. if(listitem == 5)//the listitem5, defines the number one option of the dialog
  288. {
  289. if(GetPlayerScore(playerid) >= 0)//if player have 0 score then he can choose this class
  290. {
  291. SendClientMessage(playerid, COLOR_WHITE, "You chose the Boss as your class.");
  292. ShowPlayerDialog(playerid, 11, DIALOG_STYLE_MSGBOX, "{6EF83C}Boss Class:", "{F81414}Abilities:\n{FFFFFF}You're the boss. You choose your enemies. /dis\n\n{F81414}Weapons:\n\n{FFFFFF}M4\n{FFFFFF}Grenade\n{FFFFFF}Pistol\n{FFFFFF}Molotov", "Play","");
  293. gPlayerClass[playerid] = BOSS;//setting the class to Spy
  294. PickedClass[playerid] = 1;
  295. SetPlayerVirtualWorld(playerid, 0);
  296. TogglePlayerControllable(playerid, 1);
  297. ResetPlayerWeapons(playerid);
  298. GivePlayerWeapon(playerid, 31, 990);//mp5
  299. GivePlayerWeapon(playerid, 22, 100);//silent pistol
  300. GivePlayerWeapon(playerid, 16, 3);//knife
  301. GivePlayerWeapon(playerid, 32, 500);//moltove
  302. }
  303. }
  304. }
  305. }
  306. }
  307. }
  308. return 1;
  309. }
Advertisement
Add Comment
Please, Sign In to add comment