Advertisement
IvancheBG

/v Command

Mar 30th, 2011
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.69 KB | None | 0 0
  1. /*
  2. -
  3. -
  4. -
  5. - @author DaRk_SouL
  6. - @copyright 2011
  7. - @license GPL/GNU v3.0
  8. -
  9. -
  10. -
  11. */
  12.  
  13. #include <a_samp>
  14. #include <sscanf2>
  15. #define vmenu 12356
  16.  
  17. new Float:x,Float:y,Float:z;
  18. new Float:X, Float:Y, Float:Z, Float:Angle, pInt;
  19. new CurrentVeh[MAX_PLAYERS];
  20.  
  21. main()
  22. {
  23. print("\n----------------------------------");
  24. print(" Test by DaRk_SouL");
  25. print("----------------------------------\n");
  26.  
  27.  
  28.  
  29. // THIS WAS DOEN BY ME
  30.  
  31.  
  32.  
  33. }
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42. // DONT CARE ABOUT THE BELOW
  43.  
  44.  
  45. public OnGameModeInit()
  46. {
  47. CreatePickup(342, 3, 2493.0647, -1667.7250, 13.3438);
  48. AddPlayerClass(1, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0);
  49. AddPlayerClass(107, 1958.33, 1343.12, 15.36, 0, 26, 100, 28, 150, 0, 0);
  50. AddPlayerClass(106, 1958.33, 1343.12, 15.36, 0, 16, 25, 28, 150, 0, 0);
  51. AddPlayerClass(288, 1958.33, 1343.12, 15.36, 0, 27, 100, 32, 150, 24, 100);
  52. AddPlayerClass(274, 1958.33, 1343.12, 15.36, 0, 4, 0, 18, 25, 25, 50);
  53. AddPlayerClass(178, 1958.33, 1343.12, 15.36, 0, 13, 0, 14, 0, 44, 0);
  54. AddPlayerClass(45, 1958.33, 1343.12, 15.36, 0, 30, 100, 24, 50, 0, 0);
  55. AddPlayerClass(115, 1958.33, 1343.12, 15.36, 0, 26, 150, 0, 0, 0, 0);
  56. AddStaticVehicle(411,-81.9835,1340.8245,10.6145,184.3696,64,1);
  57. AddStaticVehicle(424,-88.5091,1340.0566,10.4176,190.8839,2,2);
  58. AddStaticVehicle(522,-84.2759,1369.5834,9.8386,101.9494,3,8);
  59. SetGameModeText("Test");
  60. SetTimer("spawnvehicle",1000,true);
  61. print("\n--------------------------------------");
  62. print(" Test");
  63. print("--------------------------------------\n");
  64. UsePlayerPedAnims();
  65. return 1;
  66. }
  67.  
  68. public OnGameModeExit()
  69. {
  70. return 1;
  71. }
  72.  
  73. public OnPlayerRequestClass(playerid, classid)
  74. {
  75. SetPlayerPos(playerid,11.9577,1716.7191,22.6222);
  76. SetPlayerFacingAngle(playerid, 128.0980);
  77. SetPlayerInterior(playerid, 0);
  78. SetPlayerCameraPos(playerid,9.6063,1715.1882,22.6113);
  79. SetPlayerCameraLookAt(playerid,11.9577,1716.7191,22.6222);
  80. return 1;
  81. }
  82.  
  83. public OnPlayerConnect(playerid)
  84. {
  85. CreateObject(3269, 1749.684082, -2559.906250, 13.370020, 0.0000, 0.0000, 0.0000);
  86. CreateObject(13641, 1798.133179, -2596.736572, 14.266119, 0.0000, 0.0000, 0.0000);
  87. CreateObject(13604, 1815.301514, -2561.565918, 14.254892, 0.0000, 0.0000, 0.0000);
  88. CreateObject(12956, 1607.663818, -2451.933105, 16.382927, 0.0000, 0.0000, 0.0000);
  89. CreateObject(6052, 1557.625000, -2631.130615, 15.294515, 0.0000, 0.0000, 0.0000);
  90. CreateObject(4656, 1484.029907, -2487.649414, 17.886879, 0.0000, 0.0000, 0.0000);
  91. CreateObject(1634, 1481.170410, -2562.911865, 26.759121, 0.0000, 0.0000, 170.9235);
  92. CreateObject(1634, 1464.752197, -2561.237061, 26.812862, 0.0000, 0.0000, 170.9235);
  93. CreateObject(969, -1346.568115, 479.319458, 6.354377, 0.0000, 0.0000, 279.2130);
  94. CreateObject(969, -1344.629150, 481.604736, 6.354377, 0.0000, 0.0000, 0.0000);
  95. CreateObject(969, -1338.749756, 434.110657, 6.354377, 0.0000, 0.0000, 0.0000);
  96. CreateObject(969, -1329.626465, 434.094482, 6.354377, 0.0000, 0.0000, 0.0000);
  97. CreateObject(969, -1321.019775, 433.961548, 6.354377, 0.0000, 0.0000, 0.0000);
  98. CreateObject(969, -1311.996826, 433.985718, 6.354377, 0.0000, 0.0000, 0.0000);
  99. CreateObject(969, -1303.237671, 434.070007, 6.354377, 0.0000, 0.0000, 0.0000);
  100. CreateObject(969, -1294.200317, 434.112000, 6.354377, 0.0000, 0.0000, 0.0000);
  101. CreateObject(969, -1285.134277, 434.110352, 6.354377, 0.0000, 0.0000, 0.0000);
  102. CreateObject(969, -1276.280273, 433.951904, 6.354377, 0.0000, 0.0000, 0.0000);
  103. CreateObject(969, -1267.354248, 434.065613, 6.354377, 0.0000, 0.0000, 0.0000);
  104. CreateObject(969, -1258.429565, 434.109070, 6.354377, 0.0000, 0.0000, 0.0000);
  105. CreateObject(969, -1249.541748, 434.066772, 6.354377, 0.0000, 0.0000, 0.0000);
  106. CreateObject(969, -1240.696899, 434.120850, 6.354377, 0.0000, 0.0000, 0.0000);
  107. CreateObject(969, -1240.696899, 434.120850, 6.354377, 0.0000, 0.0000, 0.0000);
  108. CreateObject(969, -1231.933105, 434.222626, 6.347794, 0.0000, 0.0000, 15.4699);
  109. CreateObject(969, -1223.442749, 436.590637, 6.354377, 0.0000, 0.0000, 73.9115);
  110. CreateObject(969, -1221.317627, 445.072998, 6.354377, 0.0000, 0.0000, 94.5380);
  111. CreateObject(969, -1221.893799, 453.471405, 6.354377, 0.0000, 0.0000, 0.0000);
  112. CreateObject(969, -1220.900879, 453.517670, 6.354377, 0.0000, 0.0000, 88.5219);
  113. CreateObject(969, -1220.555420, 462.358795, 6.354377, 0.0000, 0.0000, 97.1163);
  114. CreateObject(969, -1221.762817, 469.241516, 6.354377, 0.0000, 0.0000, 136.6505);
  115. CreateObject(969, -1228.020508, 475.189941, 6.354377, 0.0000, 0.0000, 137.5099);
  116. CreateObject(980, -1240.759888, 481.650970, 8.960892, 0.0000, 0.0000, 0.0000);
  117. CreateObject(980, -1252.278198, 481.628326, 8.960892, 0.0000, 0.0000, 0.0000);
  118. CreateObject(980, -1263.945068, 481.613922, 8.960892, 0.0000, 0.0000, 0.0000);
  119. CreateObject(980, -1275.409058, 481.388641, 8.960892, 0.0000, 0.0000, 0.0000);
  120. CreateObject(980, -1287.071777, 481.394714, 8.960892, 0.0000, 0.0000, 0.0000);
  121. CreateObject(980, -1298.484009, 481.519958, 8.960892, 0.0000, 0.0000, 0.0000);
  122. CreateObject(980, -1309.152344, 481.379639, 8.960892, 0.0000, 0.0000, 0.0000);
  123. CreateObject(980, -1320.770508, 481.341156, 8.960892, 0.0000, 0.0000, 0.0000);
  124. CreateObject(980, -1332.258545, 481.510315, 8.960892, 0.0000, 0.0000, 0.0000);
  125. CreateObject(980, -1343.641479, 481.365143, 8.960890, 0.0000, 0.0000, 0.0000);
  126. CreateObject(980, -1349.246582, 475.481445, 8.960892, 0.0000, 0.0000, 91.1002);
  127. CreateObject(980, -1348.501953, 464.042328, 8.960892, 0.0000, 0.0000, 96.2569);
  128. CreateObject(980, -1347.113647, 452.354492, 8.960892, 0.0000, 0.0000, 96.2569);
  129. CreateObject(980, -1338.792480, 437.266174, 9.220301, 0.0000, 0.0000, 89.3814);
  130. CreateObject(980, -1333.036255, 434.147125, 12.529253, 0.0000, 0.0000, 180.4820);
  131. CreateObject(980, -1321.643066, 433.981873, 12.385839, 0.0000, 0.0000, 180.4820);
  132. CreateObject(980, -1310.095093, 434.402832, 12.610867, 0.0000, 0.0000, 180.4820);
  133. CreateObject(980, -1298.356201, 435.226776, 12.825809, 0.0000, 0.0000, 180.4820);
  134. CreateObject(980, -1287.022461, 434.524078, 12.454308, 0.0000, 0.0000, 180.4820);
  135. CreateObject(980, -1275.792847, 434.090454, 12.410892, 0.0000, 0.0000, 180.4820);
  136. CreateObject(980, -1264.265747, 434.247559, 12.429304, 0.0000, 0.0000, 180.4820);
  137. CreateObject(980, -1252.748779, 434.369568, 12.504313, 0.0000, 0.0000, 180.4820);
  138. CreateObject(980, -1229.640503, 434.631287, 12.454306, 0.0000, 0.0000, 186.4982);
  139. CreateObject(980, -1241.056152, 434.202118, 12.354305, 0.0000, 0.0000, 180.4820);
  140. CreateObject(980, -1221.180298, 440.380463, 12.210892, 0.0000, 0.0000, 247.5183);
  141. CreateObject(980, -1220.663208, 451.446960, 12.210892, 0.0000, 0.0000, 263.8475);
  142. CreateObject(980, -1221.397949, 462.817627, 12.460892, 0.0000, 0.0000, 278.4577);
  143. CreateObject(980, -1223.503052, 469.762207, 12.460892, 0.0000, 0.0000, 311.9755);
  144. CreateObject(980, -1232.127319, 477.817322, 11.960890, 1.7189, 0.0000, 330.8829);
  145. CreateObject(980, -1242.371338, 481.609802, 14.404377, 1.7189, 0.0000, 359.2441);
  146. CreateObject(980, -1263.977051, 481.572754, 14.238756, 1.7189, 0.0000, 359.2441);
  147. CreateObject(980, -1253.912109, 481.587158, 14.486509, 1.7189, 0.0000, 359.2441);
  148. CreateObject(980, -1297.376099, 480.409302, 14.210602, 1.7189, 0.0000, 0.1036);
  149. CreateObject(980, -1287.274170, 481.353546, 14.454994, 1.7189, 0.0000, 359.2441);
  150. CreateObject(980, -1275.822754, 481.347473, 14.505878, 1.7189, 0.0000, 359.2441);
  151. CreateObject(980, -1320.135620, 481.299988, 14.484430, 0.0000, 0.0000, 354.0875);
  152. CreateObject(980, -1306.090942, 481.338470, 14.326921, 0.0000, 0.0000, 356.6658);
  153. CreateObject(980, -1343.520752, 481.323975, 14.460707, 0.0000, 0.0000, 1.8225);
  154. CreateObject(980, -1331.697876, 481.469147, 14.410763, 0.0000, 0.0000, 357.5252);
  155. CreateObject(980, -1349.213135, 475.885956, 14.135775, 0.0000, 0.0000, 95.3974);
  156. CreateObject(980, -1348.484253, 464.258545, 14.428900, 0.0000, 0.0000, 93.7821);
  157. CreateObject(980, -1346.249756, 454.681122, 15.107450, 0.0000, 0.0000, 93.7821);
  158. SendClientMessage(playerid, 0x7BDDA5AA, "SERVER: Welcome To Our Server,Have Fun!");
  159. CurrentVeh[playerid] = -1;
  160. return 1;
  161. }
  162.  
  163. public OnPlayerDisconnect(playerid, reason)
  164. {
  165. return 1;
  166. }
  167.  
  168. public OnPlayerSpawn(playerid)
  169. {
  170. GivePlayerMoney(playerid, 10000);
  171. return 1;
  172. }
  173.  
  174. public OnPlayerDeath(playerid, killerid, reason)
  175. {
  176. ResetPlayerMoney(playerid);
  177. SendDeathMessage(killerid, playerid, reason);
  178. return 1;
  179. }
  180.  
  181. public OnVehicleSpawn(vehicleid)
  182. {
  183. return 1;
  184. }
  185.  
  186. public OnVehicleDeath(vehicleid, killerid)
  187. {
  188. return 1;
  189. }
  190.  
  191. public OnPlayerText(playerid, text[])
  192. {
  193. return 1;
  194. }
  195.  
  196. public OnPlayerCommandText(playerid, cmdtext[])
  197. {
  198. if (strcmp("/vinewood", cmdtext, true, 10) == 0)
  199. {
  200. new playername[MAX_PLAYER_NAME], string[90];
  201. SetPlayerPos(playerid, 1387.4211, -819.5637, 73.9426);
  202. GetPlayerName(playerid, playername, sizeof(playername));
  203. format(string, sizeof(string), "%s has been teleported to VineWood.", playername);
  204. SendClientMessageToAll(0xAA3333AA, string);
  205. return 1;
  206. }
  207. if(strcmp(cmdtext, "/para", true) == 0)
  208. {
  209. GivePlayerWeapon(playerid,46,1);
  210. SendClientMessage(playerid, 0xAA3333AA, "You've Received a Parachute.");
  211. return 1;
  212. }
  213. if (strcmp("/ls", cmdtext, true, 10) == 0)
  214. {
  215. if(IsPlayerInAnyVehicle(playerid))
  216. {
  217. SetVehiclePos(GetPlayerVehicleID(playerid), 2493.0647, -1667.7250, 13.3438);
  218. LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
  219. }
  220. else
  221. {
  222. SetPlayerPos(playerid, 2493.0647, -1667.7250, 13.3438);
  223. }
  224. new playername[MAX_PLAYER_NAME], string[128];
  225. GetPlayerName(playerid, playername, sizeof(playername));
  226. format(string, sizeof(string), "%s has been teleported to LosSantos.", playername);
  227. SendClientMessageToAll(0xAA3333AA, string);
  228. return 1;
  229. }
  230. if (strcmp("/lv", cmdtext, true, 10) == 0)
  231. {
  232. if(IsPlayerInAnyVehicle(playerid))
  233. {
  234. SetVehiclePos(GetPlayerVehicleID(playerid), 1907.3214, 951.7858, 10.8203);
  235. LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
  236. }
  237. else
  238. {
  239. SetPlayerPos(playerid, 1907.3214, 951.7858, 10.8203);
  240. }
  241. new playername[MAX_PLAYER_NAME], string[90];
  242. GetPlayerName(playerid, playername, sizeof(playername));
  243. format(string, sizeof(string), "%s has been teleported to LasVenturas.", playername);
  244. SendClientMessageToAll(0xAA3333AA, string);
  245. return 1;
  246. }
  247. if (strcmp("/sf", cmdtext, true, 10) == 0)
  248. {
  249. if(IsPlayerInAnyVehicle(playerid))
  250. {
  251. SetVehiclePos(GetPlayerVehicleID(playerid), -2038.9034, 135.9883, 28.8359);
  252. LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
  253. }
  254. else
  255. {
  256. SetPlayerPos(playerid, -2038.9034, 135.9883, 28.8359);
  257. }
  258. new playername[MAX_PLAYER_NAME], string[90];
  259. GetPlayerName(playerid, playername, sizeof(playername));
  260. format(string, sizeof(string), "%s has been teleported to SanFiero.", playername);
  261. SendClientMessageToAll(0xAA3333AA, string);
  262. return 1;
  263. }
  264. if (strcmp("/ufo", cmdtext, true, 10) == 0)
  265. {
  266. if(IsPlayerInAnyVehicle(playerid))
  267. {
  268. SetVehiclePos(GetPlayerVehicleID(playerid),-79.9514, 1385.3988, 16.9950);
  269. LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
  270. }
  271. else
  272. {
  273. SetPlayerPos(playerid, -79.9514, 1385.3988, 16.9950);
  274. }
  275. new playername[MAX_PLAYER_NAME], string[90];
  276. GetPlayerName(playerid, playername, sizeof(playername));
  277. format(string, sizeof(string), "%s has been teleported to the SecretUFO.", playername);
  278. SendClientMessageToAll(0xAA3333AA, string);
  279. return 1;
  280. }
  281. if (strcmp("/help", cmdtext, true, 10) == 0)
  282. {
  283. SendClientMessage(playerid, 0x33AA33AA,"/ls, /lv, /sf, /casino1, transls, /translv");
  284. return 1;
  285. }
  286. if (strcmp("/transls", cmdtext, true, 10) == 0)
  287. {
  288. if(IsPlayerInAnyVehicle(playerid))
  289. {
  290. SetVehiclePos(GetPlayerVehicleID(playerid),1040.6638, -1032.8633, 31.9673);
  291. LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
  292. }
  293. else
  294. {
  295. SetPlayerPos(playerid, 1040.6638, -1032.8633, 31.9673);
  296. }
  297. new playername[MAX_PLAYER_NAME], string[90];
  298. GetPlayerName(playerid, playername, sizeof(playername));
  299. format(string, sizeof(string), "%s has been teleported to TransLs.", playername);
  300. SendClientMessageToAll(0xAA3333AA, string);
  301. return 1;
  302. }
  303. if (strcmp("/translv", cmdtext, true, 10) == 0)
  304. {
  305. if(IsPlayerInAnyVehicle(playerid))
  306. {
  307. SetVehiclePos(GetPlayerVehicleID(playerid),2387.2725, 1038.7333, 10.820);
  308. LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
  309. }
  310. else
  311. {
  312. SetPlayerPos(playerid, 2387.2725, 1038.7333, 10.820);
  313. }
  314. new playername[MAX_PLAYER_NAME], string[90];
  315. GetPlayerName(playerid, playername, sizeof(playername));
  316. format(string, sizeof(string), "%s has been teleported to TransLv.", playername);
  317. SendClientMessageToAll(0xAA3333AA, string);
  318. return 1;
  319. }
  320. if (strcmp("/casino1", cmdtext, true, 10) == 0)
  321. {
  322. if(IsPlayerInAnyVehicle(playerid))
  323. {
  324. SetVehiclePos(GetPlayerVehicleID(playerid),2030.4504, 1006.8763, 10.8203);
  325. LinkVehicleToInterior(GetPlayerVehicleID(playerid), 0);
  326. }
  327. else
  328. {
  329. SetPlayerPos(playerid, 2030.4504, 1006.8763, 10.8203);
  330. }
  331. new playername[MAX_PLAYER_NAME], string[90];
  332. GetPlayerName(playerid, playername, sizeof(playername));
  333. format(string, sizeof(string), "%s has been teleported to Casino1.", playername);
  334. SendClientMessageToAll(0xAA3333AA, string);
  335. return 1;
  336. }
  337. if (strcmp("/dm3", cmdtext, true, 10) == 0)
  338. {
  339. if(IsPlayerInAnyVehicle(playerid))
  340. {
  341. SendClientMessage(playerid,0xFF0000FF,"No Vehicles In /Dm3");
  342. RemovePlayerFromVehicle(playerid);
  343. }
  344. else
  345. {
  346. GetPlayerPos(playerid,x,y,z);
  347. SetPlayerPos(playerid, -1244.0353, 452.9524, 7.1875);
  348. new playername[MAX_PLAYER_NAME], string[90];
  349. GetPlayerName(playerid, playername, sizeof(playername));
  350. ResetPlayerWeapons(playerid);
  351. GivePlayerWeapon(playerid, 26, 100);
  352. format(string, sizeof(string), "%s has been teleported to Sawn-OffDeathMatch.", playername);
  353. SendClientMessageToAll(0xAA3333AA, string);
  354. }
  355. return 1;
  356. }
  357. if (strcmp("/cancel", cmdtext, true, 10) == 0)
  358. {
  359. SetPlayerPos(playerid, x,y,z);
  360. new name[MAX_PLAYER_NAME], string[128];
  361. GetPlayerName(playerid, name, sizeof(name));
  362. format(string, sizeof(string), "%s has Left The Sawn-Off-DeathMatch.", name);
  363. SendClientMessageToAll(0xFF0000FF, string);
  364. return 1;
  365. }
  366. if(!strcmp(cmdtext, "/v", true))
  367. {
  368. ShowPlayerDialog(playerid, vmenu, DIALOG_STYLE_LIST, "Vehicles", "Infernus \nNRG-500 \nBF Injection \nTurismo \nMaverick \nPhoenix \nKart \nElegy \nSultan", "Spawn", "Cancel");
  369. return 1;
  370. }
  371. return 0;
  372. }
  373.  
  374. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  375. {
  376. return 1;
  377. }
  378.  
  379. public OnPlayerExitVehicle(playerid, vehicleid)
  380. {
  381. return 1;
  382. }
  383.  
  384. public OnPlayerStateChange(playerid, newstate, oldstate)
  385. {
  386. return 1;
  387. }
  388.  
  389. public OnPlayerEnterCheckpoint(playerid)
  390. {
  391. return 1;
  392. }
  393.  
  394. public OnPlayerLeaveCheckpoint(playerid)
  395. {
  396. return 1;
  397. }
  398.  
  399. public OnPlayerEnterRaceCheckpoint(playerid)
  400. {
  401. return 1;
  402. }
  403.  
  404. public OnPlayerLeaveRaceCheckpoint(playerid)
  405. {
  406. return 1;
  407. }
  408.  
  409. public OnRconCommand(cmd[])
  410. {
  411. return 1;
  412. }
  413.  
  414. public OnPlayerRequestSpawn(playerid)
  415. {
  416. return 1;
  417. }
  418.  
  419. public OnObjectMoved(objectid)
  420. {
  421. return 1;
  422. }
  423.  
  424. public OnPlayerObjectMoved(playerid, objectid)
  425. {
  426. return 1;
  427. }
  428.  
  429. public OnPlayerPickUpPickup(playerid, pickupid)
  430. {
  431. return 1;
  432. }
  433.  
  434. public OnVehicleMod(playerid, vehicleid, componentid)
  435. {
  436. return 1;
  437. }
  438.  
  439. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  440. {
  441. return 1;
  442. }
  443.  
  444. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  445. {
  446. return 1;
  447. }
  448.  
  449. public OnPlayerSelectedMenuRow(playerid, row)
  450. {
  451. return 1;
  452. }
  453.  
  454. public OnPlayerExitedMenu(playerid)
  455. {
  456. return 1;
  457. }
  458.  
  459. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  460. {
  461. return 1;
  462. }
  463.  
  464. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  465. {
  466. return 1;
  467. }
  468.  
  469. public OnRconLoginAttempt(ip[], password[], success)
  470. {
  471. return 1;
  472. }
  473.  
  474. public OnPlayerUpdate(playerid)
  475. {
  476. return 1;
  477. }
  478.  
  479. public OnPlayerStreamIn(playerid, forplayerid)
  480. {
  481. return 1;
  482. }
  483.  
  484. public OnPlayerStreamOut(playerid, forplayerid)
  485. {
  486. return 1;
  487. }
  488.  
  489. public OnVehicleStreamIn(vehicleid, forplayerid)
  490. {
  491. return 1;
  492. }
  493.  
  494. public OnVehicleStreamOut(vehicleid, forplayerid)
  495. {
  496. return 1;
  497. }
  498.  
  499. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  500. {
  501. GetPlayerPos(playerid, X, Y, Z);
  502. GetPlayerFacingAngle(playerid, Angle);
  503. GetPlayerInterior(playerid);
  504.  
  505. if(dialogid == vmenu)
  506. {
  507. if(response)
  508. {
  509. if(listitem == 0) // INFERNUS
  510. {
  511. CreateVehicle(411, X+5, Y, Z+1, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
  512. }
  513. if(listitem == 1) // NRG-500
  514. {
  515. CreateVehicle(522, X+5, Y, Z+1, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
  516. }
  517. if(listitem == 2) // BF Injection
  518. {
  519. CreateVehicle(424, X+5, Y, Z+1, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
  520. }
  521. if(listitem == 3) // Turismo
  522. {
  523. CreateVehicle(451, X+5, Y, Z+1, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
  524. }
  525. if(listitem == 4) // Maverick
  526. {
  527. CreateVehicle(487, X+5, Y, Z+1, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
  528. }
  529. if(listitem == 5) // Phoenix
  530. {
  531. CreateVehicle(603, X+5, Y, Z+1, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
  532. }
  533. if(listitem == 6) // Kart
  534. {
  535. CreateVehicle(571, X+5, Y, Z+1, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
  536. }
  537. if(listitem == 7) // Elegy
  538. {
  539. CreateVehicle(562, X+5, Y, Z+1, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
  540. }
  541. if(listitem == 8) // Sultan
  542. {
  543. CreateVehicle(560, X+5, Y, Z+1, Angle, random(100), random(100), -1); LinkVehicleToInterior(GetPlayerVehicleID(playerid), pInt);
  544. }
  545. }
  546. return 1;
  547. }
  548. return 0;
  549. }
  550.  
  551. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  552. {
  553. return 1;
  554. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement