Guest User

Untitled

a guest
Mar 17th, 2016
312
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.35 KB | None | 0 0
  1. // - DMZone Sistemi
  2. // - Versiyon: 1.0
  3.  
  4. // - Kodlayan: Victory
  5. // - Kodlama Başlangıç: 16.03.2016 - 18.50
  6. // - Kodlama Bitiş: 16.03.2016 - 21.00
  7.  
  8. // - İyi Kullanımlar!
  9.  
  10. // - Includeler
  11. #include <a_samp> // Include by SA-MP Team
  12. #include <zcmd> // Include by Zeex
  13.  
  14. // - Defineler
  15. #define FILTERSCRIPT
  16.  
  17. #define DIALOG_DMZONE 0
  18.  
  19.  
  20. // - Değişkenler
  21. new DMZoneOyuncuOyunda[MAX_PLAYERS];
  22.  
  23. // - DMZonePickup
  24. new DMZonePickup;
  25.  
  26. // - DM Spawnları
  27. new Float:MinigunSpawn[6][4] =
  28. {
  29. {2228.6646, 1593.4689, 999.9614, 87.1686},
  30. {2208.4910, 1554.1073, 1007.1915, 267.1686},
  31. {2197.8369, 1580.6329, 999.9792, 354.9028},
  32. {2173.7100, 1589.5176, 999.9778, 274.0853},
  33. {2180.4531, 1623.8534, 999.9740, 266.2518},
  34. {2218.2578, 1615.6497, 999.9827, 357.1194}
  35. };
  36.  
  37. new Float:DeagleSpawn[][4] =
  38. {
  39. {1359.9059, 5.8356, 1000.9219, 231.4720},
  40. {1359.9272, -47.7895, 1000.9254, 310.4327},
  41. {1418.6469, -47.6120, 1000.9300, 44.4335},
  42. {1411.7236, 6.0314, 1000.9268, 131.7298},
  43. {1392.6874, -23.4132, 1000.9187, 179.9837}
  44. };
  45.  
  46. new Float:RPGSpawn[][4] =
  47. {
  48. {246.9303,1385.9288,23.3703,0.0000},
  49. {165.2390,1357.2312,26.2036,0.0000},
  50. {165.9894,1426.7672,26.2623,0.0000},
  51. {132.4376,1355.1686,26.1223,134.3979},
  52. {203.1333,1398.6799,43.0946,0.0000}
  53. };
  54.  
  55. public OnFilterScriptInit()
  56. {
  57. print("----------------------------\n");
  58. print("# DMZone Başarıyla Yüklendi #");
  59. print("----------------------------\n");
  60.  
  61. // - DMZone Pickup
  62. DMZonePickup = CreatePickup(1314, 2, -36.1312, 2350.5173, 24.3026, -1);
  63. Create3DTextLabel("{FF0000}DMZone\n{FFFFFF}DM alanına girmek için {FF0000}/dmzone {FFFFFF}yazınız.", -1, -36.1312, 2350.5173, 24.3026, 40.0, 0, 1);
  64. return 1;
  65. }
  66.  
  67. public OnFilterScriptExit()
  68. {
  69. print("----------------------------\n");
  70. print("# DMZone Kapatıldı! #");
  71. print("----------------------------\n");
  72. return 1;
  73. }
  74.  
  75. public OnPlayerConnect(playerid)
  76. {
  77. DMZoneOyuncuOyunda[playerid] = 0;
  78. return 1;
  79. }
  80.  
  81. public OnPlayerDisconnect(playerid, reason)
  82. {
  83. DMZoneOyuncuOyunda[playerid] = 0;
  84. return 1;
  85. }
  86.  
  87. public OnPlayerSpawn(playerid)
  88. {
  89. if(DMZoneOyuncuOyunda[playerid] == 1)
  90. {
  91. ResetPlayerWeapons(playerid);
  92. GivePlayerWeapon(playerid, 38, 1000000000);
  93.  
  94. SetPlayerHealth(playerid, 100);
  95. SetPlayerArmour(playerid, 0);
  96.  
  97. SetPlayerSkin(playerid, 123);
  98.  
  99. new RandomSpawn = random(sizeof(MinigunSpawn));
  100. SetPlayerPos(playerid, MinigunSpawn[RandomSpawn][0], MinigunSpawn[RandomSpawn][1], MinigunSpawn[RandomSpawn][2]);
  101. SetPlayerInterior(playerid, 1);
  102. SetPlayerFacingAngle(playerid, 0);
  103. }
  104. if(DMZoneOyuncuOyunda[playerid] == 2)
  105. {
  106. ResetPlayerWeapons(playerid);
  107. GivePlayerWeapon(playerid, 24, 1000000000);
  108.  
  109. SetPlayerHealth(playerid, 100);
  110. SetPlayerArmour(playerid, 0);
  111.  
  112. SetPlayerSkin(playerid, 121);
  113.  
  114. new RandomSpawn = random(sizeof(DeagleSpawn));
  115. SetPlayerPos(playerid, DeagleSpawn[RandomSpawn][0], DeagleSpawn[RandomSpawn][1], DeagleSpawn[RandomSpawn][2]);
  116. SetPlayerInterior(playerid, 1);
  117. SetPlayerFacingAngle(playerid, 0);
  118. }
  119. if(DMZoneOyuncuOyunda[playerid] == 3)
  120. {
  121. ResetPlayerWeapons(playerid);
  122. GivePlayerWeapon(playerid, 35, 1000000000);
  123.  
  124. SetPlayerHealth(playerid, 100);
  125. SetPlayerArmour(playerid, 0);
  126.  
  127. SetPlayerSkin(playerid, 33);
  128.  
  129. new RandomSpawn = random(sizeof(RPGSpawn));
  130. SetPlayerPos(playerid, RPGSpawn[RandomSpawn][0], RPGSpawn[RandomSpawn][1], RPGSpawn[RandomSpawn][2]);
  131. SetPlayerInterior(playerid, 0);
  132. SetPlayerFacingAngle(playerid, 0);
  133. }
  134. return 1;
  135. }
  136.  
  137.  
  138. public OnPlayerDeath(playerid, killerid, reason)
  139. {
  140. if(DMZoneOyuncuOyunda[playerid] == 1)
  141. {
  142. if(DMZoneOyuncuOyunda[playerid] == 2)
  143. {
  144. if(DMZoneOyuncuOyunda[playerid] == 3)
  145. {
  146. GivePlayerMoney(killerid, 200);
  147. SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
  148. GameTextForPlayer(killerid, "~g~$200 +1 Skor", 2000, 1);
  149.  
  150. SendClientMessage(playerid, -1, "{00FF00}Bilgi: {FFFFFF}DM alanından çıkmak istiyorsanız, {00FF00}/dmayril {FFFFFF}yazabilirsiniz.");
  151. GivePlayerMoney(playerid, -1);
  152. GameTextForPlayer(playerid, "~r~-$1", 2000, 1);
  153. }
  154. }
  155. }
  156. return 1;
  157. }
  158.  
  159. public OnPlayerPickUpPickup(playerid, pickupid)
  160. {
  161. if(pickupid == DMZonePickup)
  162. {
  163. }
  164. return 1;
  165. }
  166.  
  167. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  168. {
  169. if(dialogid == DIALOG_DMZONE)
  170. {
  171. if(response)
  172. {
  173. if(listitem == 0)
  174. {
  175. new string[128];
  176. format(string, sizeof(string), "{FF0000}DMZone: {FFFFFF}Minigun adlı DM alanına spawn oldunuz.");
  177. SendClientMessage(playerid, -1, string);
  178. SendClientMessage(playerid, -1, "{00FF00}Bilgi: {FFFFFF}DM alanından çıkmak istiyorsanız, {00FF00}/dmayril {FFFFFF}yazabilirsiniz.");
  179.  
  180. DMZoneOyuncuOyunda[playerid] = 1;
  181.  
  182. ResetPlayerWeapons(playerid);
  183. GivePlayerWeapon(playerid, 38, 1000000000);
  184.  
  185. SetPlayerHealth(playerid, 100);
  186. SetPlayerArmour(playerid, 0);
  187.  
  188. SetPlayerSkin(playerid, 123);
  189.  
  190. new RandomSpawn = random(sizeof(MinigunSpawn));
  191. SetPlayerPos(playerid, MinigunSpawn[RandomSpawn][0], MinigunSpawn[RandomSpawn][1], MinigunSpawn[RandomSpawn][2]);
  192. SetPlayerInterior(playerid, 1);
  193. SetPlayerFacingAngle(playerid, 0);
  194. return 1;
  195. }
  196. if(listitem == 1)
  197. {
  198. new string[128];
  199. format(string, sizeof(string), "{FF0000}DMZone: {FFFFFF}Deagle adlı DM alanına spawn oldunuz.");
  200. SendClientMessage(playerid, -1, string);
  201. SendClientMessage(playerid, -1, "{00FF00}Bilgi: {FFFFFF}DM alanından çıkmak istiyorsanız, {00FF00}/dmayril {FFFFFF}yazabilirsiniz.");
  202.  
  203. DMZoneOyuncuOyunda[playerid] = 2;
  204.  
  205. ResetPlayerWeapons(playerid);
  206. GivePlayerWeapon(playerid, 24, 1000000000);
  207.  
  208. SetPlayerHealth(playerid, 100);
  209. SetPlayerArmour(playerid, 0);
  210.  
  211. SetPlayerSkin(playerid, 121);
  212.  
  213. new RandomSpawn = random(sizeof(DeagleSpawn));
  214. SetPlayerPos(playerid, DeagleSpawn[RandomSpawn][0], DeagleSpawn[RandomSpawn][1], DeagleSpawn[RandomSpawn][2]);
  215. SetPlayerInterior(playerid, 1);
  216. SetPlayerFacingAngle(playerid, 0);
  217. return 1;
  218. }
  219. if(listitem == 2)
  220. {
  221. new string[128];
  222. format(string, sizeof(string), "{FF0000}DMZone: {FFFFFF}RPG adlı DM alanına spawn oldunuz.");
  223. SendClientMessage(playerid, -1, string);
  224. SendClientMessage(playerid, -1, "{00FF00}Bilgi: {FFFFFF}DM alanından çıkmak istiyorsanız, {00FF00}/dmayril {FFFFFF}yazabilirsiniz.");
  225.  
  226. DMZoneOyuncuOyunda[playerid] = 3;
  227.  
  228. ResetPlayerWeapons(playerid);
  229. GivePlayerWeapon(playerid, 35, 1000000000);
  230.  
  231. SetPlayerHealth(playerid, 100);
  232. SetPlayerArmour(playerid, 0);
  233.  
  234. SetPlayerSkin(playerid, 33);
  235.  
  236. new RandomSpawn = random(sizeof(RPGSpawn));
  237. SetPlayerPos(playerid, RPGSpawn[RandomSpawn][0], RPGSpawn[RandomSpawn][1], RPGSpawn[RandomSpawn][2]);
  238. SetPlayerInterior(playerid, 0);
  239. SetPlayerFacingAngle(playerid, 0);
  240. return 1;
  241. }
  242. }
  243. }
  244. return 0;
  245. }
  246.  
  247. CMD:dmzone(playerid, params[])
  248. {
  249. if(!IsPlayerInRangeOfPoint(playerid, 7.0, -36.1312, 2350.5173, 24.3026)) return SendClientMessage(playerid, -1, "{FF0000}Hata: {FFFFFF}Bu komutu sadece DMZone alanında kullanabilirsiniz!");
  250. ShowPlayerDialog(playerid, DIALOG_DMZONE, DIALOG_STYLE_LIST, "{00FF00}DMZone", "Minigun DM\nDeagle DM\nRPG DM", "Gir", "Kapat");
  251. return 1;
  252. }
  253.  
  254. CMD:dmayril(playerid, params[])
  255. {
  256. if(DMZoneOyuncuOyunda[playerid] == 0) return SendClientMessage(playerid, -1, "{FF0000}Hata: {FFFFFF}DMZone alanında değil iken, bu komutu kullanamazsınız!");
  257. DMZoneOyuncuOyunda[playerid] = 0;
  258. ResetPlayerWeapons(playerid);
  259. SpawnPlayer(playerid);
  260. SetPlayerInterior(playerid, 0);
  261. return 1;
  262. }
Advertisement
Add Comment
Please, Sign In to add comment