Guest User

Untitled

a guest
Jul 14th, 2014
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.56 KB | None | 0 0
  1. /////////////////////////////////////////// Includovi
  2.  
  3. #include <a_samp>
  4. #include <zcmd>
  5. #include <streamer>
  6.  
  7. /////////////////////////////////////////// Kraj Include
  8.  
  9.  
  10. ////////////////////////////////////////// Dialozi
  11.  
  12. #define DIALOG_WEAPONS 0
  13.  
  14.  
  15.  
  16. ///////////////////////////////////////// Dialog Kraj
  17.  
  18.  
  19. //// Za lakse uporebu
  20.  
  21. #define SCM SendClientMessage
  22.  
  23. /// Newovi za poslove
  24.  
  25.  
  26.  
  27. main()
  28. {
  29. print("\n----------------------------------");
  30. print(" Prvi RP mod,Ademir Džaferović");
  31. print("----------------------------------\n");
  32. }
  33.  
  34.  
  35.  
  36. public OnGameModeInit()
  37. {
  38.  
  39.  
  40.  
  41. DisableInteriorEnterExits();
  42. AddPlayerClass(1,1726.8204, -1911.9888, 13.5637, 88.9696,0,0,0,0,0,0);
  43. SetGameModeText("RP v.0.1 b");
  44. return 1;
  45.  
  46.  
  47.  
  48. //// 3D LABELI
  49.  
  50. Create3DTextLabel("Za kupovinu\n/{FFFFFF}kupioruzije", -1,295.2658,-38.3113,1001.5156, 40.0, 0, 0);
  51. Create3DTextLabel("Gunshop\n/{FFFFFF}ulaz", -1,1368.2145,-1279.8103,13.5469, 40.0, 0, 0);
  52.  
  53.  
  54.  
  55.  
  56.  
  57. return 1;
  58. }
  59.  
  60.  
  61. public OnGameModeExit()
  62. {
  63. return 1;
  64. }
  65.  
  66. public OnPlayerRequestClass(playerid, classid)
  67. {
  68. SetPlayerPos(playerid, 1726.8204,-1911.9888,13.5637);
  69. SetPlayerCameraPos(playerid, 1728.4236,-1911.8496,13.5633);
  70. SetPlayerCameraLookAt(playerid, 1958.3783, 1343.1572, 15.3746);
  71. return 1;
  72. }
  73.  
  74. public OnPlayerConnect(playerid)
  75. {
  76. return 1;
  77. }
  78.  
  79. public OnPlayerDisconnect(playerid, reason)
  80. {
  81. return 1;
  82. }
  83.  
  84. public OnPlayerSpawn(playerid)
  85. {
  86. return 1;
  87. }
  88.  
  89. public OnPlayerDeath(playerid, killerid, reason)
  90. {
  91. return 1;
  92. }
  93.  
  94. public OnVehicleSpawn(vehicleid)
  95. {
  96. return 1;
  97. }
  98.  
  99. public OnVehicleDeath(vehicleid, killerid)
  100. {
  101. return 1;
  102. }
  103.  
  104. public OnPlayerText(playerid, text[])
  105. {
  106. return 1;
  107. }
  108.  
  109. public OnPlayerCommandText(playerid, cmdtext[])
  110. {
  111. if (strcmp("/mycommand", cmdtext, true, 10) == 0)
  112. {
  113. // Do something here
  114. return 1;
  115. }
  116. return 0;
  117. }
  118.  
  119. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  120. {
  121. return 1;
  122. }
  123.  
  124. public OnPlayerExitVehicle(playerid, vehicleid)
  125. {
  126. return 1;
  127. }
  128.  
  129. public OnPlayerStateChange(playerid, newstate, oldstate)
  130. {
  131. return 1;
  132. }
  133.  
  134. public OnPlayerEnterCheckpoint(playerid)
  135. {
  136. return 1;
  137. }
  138.  
  139. public OnPlayerLeaveCheckpoint(playerid)
  140. {
  141. return 1;
  142. }
  143.  
  144. public OnPlayerEnterRaceCheckpoint(playerid)
  145. {
  146. return 1;
  147. }
  148.  
  149. public OnPlayerLeaveRaceCheckpoint(playerid)
  150. {
  151. return 1;
  152. }
  153.  
  154. public OnRconCommand(cmd[])
  155. {
  156. return 1;
  157. }
  158.  
  159. public OnPlayerRequestSpawn(playerid)
  160. {
  161. return 1;
  162. }
  163.  
  164. public OnObjectMoved(objectid)
  165. {
  166. return 1;
  167. }
  168.  
  169. public OnPlayerObjectMoved(playerid, objectid)
  170. {
  171. return 1;
  172. }
  173.  
  174. public OnPlayerPickUpPickup(playerid, pickupid)
  175. {
  176. return 1;
  177. }
  178.  
  179. public OnVehicleMod(playerid, vehicleid, componentid)
  180. {
  181. return 1;
  182. }
  183.  
  184. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  185. {
  186. return 1;
  187. }
  188.  
  189. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  190. {
  191. return 1;
  192. }
  193.  
  194. public OnPlayerSelectedMenuRow(playerid, row)
  195. {
  196. return 1;
  197. }
  198.  
  199. public OnPlayerExitedMenu(playerid)
  200. {
  201. return 1;
  202. }
  203.  
  204. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  205. {
  206. return 1;
  207. }
  208.  
  209. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  210. {
  211. return 1;
  212. }
  213.  
  214. public OnRconLoginAttempt(ip[], password[], success)
  215. {
  216. return 1;
  217. }
  218.  
  219. public OnPlayerUpdate(playerid)
  220. {
  221. return 1;
  222. }
  223.  
  224. public OnPlayerStreamIn(playerid, forplayerid)
  225. {
  226. return 1;
  227. }
  228.  
  229. public OnPlayerStreamOut(playerid, forplayerid)
  230. {
  231. return 1;
  232. }
  233.  
  234. public OnVehicleStreamIn(vehicleid, forplayerid)
  235. {
  236. return 1;
  237. }
  238.  
  239. public OnVehicleStreamOut(vehicleid, forplayerid)
  240. {
  241. return 1;
  242. }
  243.  
  244. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  245. {
  246.  
  247. if(dialogid == DIALOG_WEAPONS)
  248. {
  249. if(response) //
  250. {
  251.  
  252. switch(listitem)
  253. {
  254. case 0: { GivePlayerWeapon(playerid, WEAPON_DEAGLE, 100); SCM(playerid, -1, "Prodavač: Kupili ste desert eagle"); }
  255. case 1: { GivePlayerWeapon(playerid, WEAPON_AK47, 100); SCM(playerid, -1, "Prodavač: Kupili ste AK47"); }
  256. case 2: { GivePlayerWeapon(playerid, WEAPON_SHOTGSPA, 100); SCM(playerid, -1, "Prodavač: Kupili ste shotgun"); }
  257. case 3: { GivePlayerWeapon(playerid, WEAPON_KNIFE, 1); SCM(playerid, -1, "Prodavač: Kupili ste noz"); }
  258. case 4: { GivePlayerWeapon(playerid, WEAPON_MP5, 100); SCM(playerid, -1, "Prodavač: Kupili ste MP5"); }
  259.  
  260. }
  261.  
  262. }
  263. return 1;
  264. }
  265.  
  266. return 1;
  267. }
  268.  
  269. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  270. {
  271. return 1;
  272. }
  273.  
  274.  
  275. //////////////////// CMD - Komande 1. /kupioruzije//////////////////////////////////
  276.  
  277.  
  278. CMD:kupioruzije(playerid, params[])
  279.  
  280. {
  281. if(IsPlayerInRangeOfPoint(playerid,2.0, 295.2658,-38.3113,1001.5156))
  282.  
  283. ShowPlayerDialog(playerid, DIALOG_WEAPONS, DIALOG_STYLE_LIST, "Oruzije", "Desert Eagle\nAK-47\nCombat Shotgun\nKnife\nMP5", "Odaberi", "Odustani");
  284.  
  285.  
  286.  
  287. return 1;
  288. }
  289.  
  290. /////////////////////////// CMD - Ulaz GunShop //////////////////////////////
  291.  
  292.  
  293. CMD:ulaz(playerid, params [])
  294.  
  295. {
  296. if(IsPlayerInRangeOfPoint(playerid, 2.0, 1368.2145,-1279.8103,13.5469))
  297. {
  298. SetPlayerPos(playerid, 286.1490,-40.6444,1001.5156); SendClientMessage(playerid,-1 ,"Nalazite se u GunShopu!");
  299. SetPlayerInterior(playerid, 1);
  300. return 1;
  301.  
  302. }
  303.  
  304. return 0;
  305. }
  306.  
  307. CMD:izlaz(playerid, params [])
  308.  
  309. {
  310.  
  311. if(IsPlayerInRangeOfPoint(playerid, 7.0, 286.1490,-40.6444,1001.5156))
  312. {
  313. SetPlayerPos(playerid, 1368.2145,-1279.8103,13.5469);
  314. SetPlayerInterior(playerid, 0);
  315. return 1;
  316.  
  317. }
  318.  
  319. return 0;
  320. }
Advertisement
Add Comment
Please, Sign In to add comment