Hyland

[FS] Start the Party!

Nov 27th, 2014
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.68 KB | None | 0 0
  1. #include <a_samp>
  2. #include zcmd
  3. #include <Streamer>
  4. #include foreach
  5.  
  6. #define GUNGAME 0xD86EFFFF
  7. #define GUNGAME_ "{E0B6F0}"
  8. #define WHITE 0xFFFFFFFF
  9. #define GREEN 0x255F17FF
  10. #define GRAY 0xBEBEBEFF
  11. #define RED 0xE62525FF
  12. #define RED2_ "{9E1010}"
  13. #define RED2 0x9E1010FF
  14. #define LIGHTRED 0xFF975EFF
  15.  
  16. #define YELLOW 0xFFA600FF
  17. #define YELLOW2 0xFF3C00FF
  18. #define YELLOW3 0xFF5500FF
  19.  
  20. //format(str,sizeof(str),"Teleport - "YELLOW_"%s has teleported to San Fierro "YELLOW3_"(/sf)",pName[playerid]);
  21. #define YELLOW_ "{FFA600}"
  22. #define YELLOW2_ "{FF3C00}"
  23. #define YELLOW3_ "{FF5500}"
  24.  
  25. #define DmCol1 0x419E28FF
  26. #define DmCol1_ "{419E28}"
  27. #define DmCol2 0x70AB5CFF
  28. #define DmCol2_ "{70AB5C}"
  29. #define DmCol3 0xB7FF00FF
  30. #define DmCol3_ "{B7FF00}"
  31.  
  32. #define JOBINFO 0xC8F1FAFF
  33. #define BLUE 0x168BFFFF
  34. #define DARKORANGE 0xC03A00FF
  35. #define ORANGE 0xFF9200FF
  36. #define BLUE2 0x001F6AFF //dark blue
  37. #define LIME 0x9DFF00FF
  38.  
  39. #define PURPLE 0xB10F4EFF
  40. #define SKIN 0xFFA863FF
  41. #define SKIN2 0xB77259FF
  42. #define LIGHTYELLOW 0xFFFF6DFF
  43. #define PINK 0xEB1CC1FF
  44. #define WOOD 0x8B5A2BFF
  45. #define GREENBLUE 0x1FC4A6FF
  46. #define LIGHTBLUE 0x00E5EEFF
  47. #define DARKBLUE 0x0040FFFF
  48. #define BLACK 0x7A7A7AFF
  49. #define DOOM 0xF4A460FF
  50. //#define AdminInfo 0x02EBB8FF
  51. #define AdminInfo 0x00D799FF
  52. #define RACE 0x46E01BFF
  53. #define LIME_ "{9DFF00}"
  54. #define DOOM_ "{F4A460}"
  55. #define WHITE_ "{FFFFFF}"
  56. #define RED_ "{E62525}"
  57. #define LIGHTRED_ "{FF975E}"
  58. #define JOBINFO_ "{C8F1FA}"
  59. #define BLUE_ "{168BFF}"
  60. #define DARK_ORANGE "{C03A00}"
  61. #define ORANGE_ "{FF9200}"
  62. #define BLUE2_ "{001F6A}"
  63. #define PURPLE_ "{B50D61}"
  64. #define SKIN_ "{FFA863}"
  65. #define SKIN2_ "{B77259}"
  66. #define LIGHTYELLOW_ "{FFFF6D}"
  67. #define PINK_ "{EB1CC1}"
  68. #define WOOD_ "{8B5A2B}"
  69. #define GREENBLUE_ "{1FC4A6}"
  70. #define GREEN_ "{255F17}"
  71. #define GRAY_ "{BEBEBE}"
  72. #define LIGHTBLUE_ "{00E5EE}"
  73. #define DARKBLUE_ "{0040FF}"
  74. #define BLACK_ "{7A7A7A}"
  75. #define AdminInfo_ "{00D799}"
  76. #define RACE_ "{46E01B}"
  77.  
  78. #define cornsilk 0xFFED83AA
  79. #define lime 0x9CD13FFF
  80. #define gray 0x9C9C9CAA
  81. #define warning 0xFF0000FF
  82. #define coolblue 0x009DFFAA
  83. #define orange 0xDB9428AA
  84. #define lblue 0xADDEFFFF
  85. #define CWCOL1 0xFF6A00FF
  86. #define CWCOL2 0xFFA666FF
  87.  
  88. #define cornsilk2 "{FBDF89}"
  89. #define lime2 "{9CD13F}"
  90. #define g2 "{9C9C9C}"
  91. #define orange2 "{DB9428}"
  92. #define cb2 "{009DFF}"
  93. #define lblue2 "{ADDEFF}"
  94. #define warning2 "{FF0000}"
  95. #define CWCOL1_ "{FF6A00}"
  96. #define CWCOL2_ "{FFA666}"
  97.  
  98. new xMasPickUp[6];
  99. new Party;
  100. new ShipPartyCount;
  101. new Float:partyX,Float:partyY,Float:partyZ,partyVw;
  102. new Ship1,Ship2,Ship3;
  103. #if defined FILTERSCRIPT
  104. public OnFilterScriptInit()
  105. {
  106.  
  107. return 1;
  108. }
  109.  
  110. public OnFilterScriptExit()
  111. {
  112. return 1;
  113. }
  114.  
  115. #else
  116.  
  117.  
  118. #endif
  119.  
  120. public OnGameModeInit()
  121. {
  122. for(new x=0; x<sizeof(xMasPickUp); x++) xMasPickUp[x]=-255;
  123. Ship1 = CreateObject(10793, -1604.04, 22.73, 35.57, 0.00, 0.00, 45.00);
  124. Ship2 = CreateObject(10794, -1550.83, 75.93, 7.00, 0.00, 0.00, 45.00);
  125. Ship3 = CreateObject(10795, -1552.314, 74.4206, 17.05, 0.00, 0.00, 45.00);
  126. AttachObjectToObject(Ship1, Ship2, -75.65, 0.0, 28.5, 0.0, 0.0, 0.0, 1);
  127. AttachObjectToObject(Ship2, Ship3, 2.8, 0, -10.0, 0.0, 0.0, 0.0, 1);
  128. return 1;
  129. }
  130. forward resetship();
  131. public resetship()
  132. {
  133. SetObjectPos(Ship1,-1604.04, 22.73, 35.57);
  134. SetObjectPos(Ship2,-1550.83, 75.93, 7.00);
  135. SetObjectPos(Ship3,-1552.314, 74.4206, 17.05);
  136.  
  137. SetObjectRot(Ship1,0.00, 0.00, 45.00);
  138. SetObjectRot(Ship2,0.00, 0.00, 45.00);
  139. SetObjectRot(Ship3,0.00, 0.00, 45.00);
  140. AttachObjectToObject(Ship1, Ship2, -75.65, 0.0, 28.5, 0.0, 0.0, 0.0, 1);
  141. AttachObjectToObject(Ship2, Ship3, 2.7, 0, -10.0, 0.0, 0.0, 0.0, 1);
  142. Party = 0;
  143. return 1;
  144. }
  145.  
  146. public OnGameModeExit()
  147. {
  148. return 1;
  149. }
  150.  
  151. public OnPlayerRequestClass(playerid, classid)
  152. {
  153.  
  154. return 1;
  155. }
  156.  
  157. public OnPlayerConnect(playerid)
  158. {
  159. return 1;
  160. }
  161.  
  162. public OnPlayerDisconnect(playerid, reason)
  163. {
  164. return 1;
  165. }
  166.  
  167. public OnPlayerSpawn(playerid)
  168. {
  169. return 1;
  170. }
  171.  
  172. public OnPlayerDeath(playerid, killerid, reason)
  173. {
  174. return 1;
  175. }
  176.  
  177. public OnVehicleSpawn(vehicleid)
  178. {
  179. return 1;
  180. }
  181.  
  182. public OnVehicleDeath(vehicleid, killerid)
  183. {
  184. return 1;
  185. }
  186.  
  187. public OnPlayerText(playerid, text[])
  188. {
  189. return 1;
  190. }
  191.  
  192. public OnPlayerCommandText(playerid, cmdtext[])
  193. {
  194.  
  195. return 0;
  196. }
  197. CMD:startparty(playerid)
  198. {
  199. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1,"{FF0000}<$> -Warning-<#> {00FF00}You must be {0000FF}Rcon {FF00FF}admin {FFFF33}to use this command!");
  200.  
  201. ShowPlayerDialog(playerid,4544,DIALOG_STYLE_LIST,"Start Party","1.Start a normal party in your position \n2.Start the THE TITANIC party\n3.xMas party","Start","Exit");
  202. return 1;
  203. }
  204. CMD:party(playerid)
  205. {
  206. if(Party == 0) return SendClientMessage(playerid,RED,"No party has been started yet");
  207. else if(Party == 2) return SendClientMessage(playerid,RED,"The party has already been started");
  208. else
  209. {
  210. switch(random(5))
  211. {
  212. case 0:SetPlayerPos(playerid,partyX,partyY,partyZ);
  213. case 1:SetPlayerPos(playerid,partyX+1,partyY,partyZ);
  214. case 2:SetPlayerPos(playerid,partyX,partyY+1,partyZ);
  215. case 3:SetPlayerPos(playerid,partyX-1,partyY,partyZ);
  216. case 4:SetPlayerPos(playerid,partyX,partyY-1,partyZ);
  217.  
  218. }
  219. }
  220. SetPlayerVirtualWorld(playerid,partyVw);
  221.  
  222. return 1;
  223. }
  224.  
  225. new Float:Titanic1Coords[][6] = //93
  226. {
  227. {-1415.2278, 178.8590, 35.5700 , 0.0000, 0.0000, 45.0000},
  228. {-1046.8055, 545.8651, 35.5700, 0.0000, 0.0000, 45.0000},
  229. {-1068.0116, 597.9653, 35.5700, 0.0000, 0.0000, 0.0000},
  230. {-984.4982, 597.2338, 35.5700,0.0000, 0.0000, -14.0000},
  231. {-693.9249, 514.3314, 35.5700, 0.0000, 0.0000, -16.0000},
  232. {-343.6650, 386.5757, 35.5700,0.0000, 0.0000, -5.0000}, //start the shit
  233. {99.7249, 310.9523, 35.5700,0.0000, 0.0000, 10.0000},//crashed
  234. {115.8157, 276.7807, 35.5700,0.0000, 0.0000, 40.0000},
  235. {290.2462, 418.0674, 71.3000,0.0000, 50.0000, 40.0000},
  236. {290.2462, 418.0674, 29.9000,0.0000, 50.0000, 40.0000}
  237. };
  238. new Float:Titanic2Coords[][6] = //94
  239. {
  240. {-1361.5927, 232.4753, 7.0000, 0.0000, 0.0000, 45.0000},
  241. {-993.9478, 598.6451, 7.0000, 0.0000, 0.0000, 45.0000},
  242. {-993.3140, 597.5258, 7.0000, 0.0000, 0.0000, 0.0000},
  243. {-911.5853, 578.8046, 7.0000,0.0000, 0.0000, -14.0000},
  244. {-621.7428, 493.4192, 7.0000,0.0000, 0.0000, -16.0000},
  245. {-268.5040, 379.8922, 7.0000,0.0000, 0.0000, -5.0000}, //start the shit
  246. {174.1780, 324.1174, 7.0000,0.0000, 0.0000, 10.0000},//crashed
  247. {173.6760, 324.8739, 7.0000,0.0000, 0.0000, 40.0000},
  248. {313.2526, 437.4551, 1.0000,0.0000, 50.0000, 40.0000},
  249. {313.2526, 437.4551, -39.0000,0.0000, 50.0000, 40.0000}
  250. };
  251. new Float:Titanic3Coords[][6] = //95
  252. {
  253. {-1363.3668, 230.5191, 17.0500, 0.0000, 0.0000, 45.0000},
  254. {-995.2252, 597.4672, 17.0500, 0.0000, 0.0000, 45.0000},
  255. {-995.1288, 597.9356, 17.0500, 0.0000, 0.0000, 0.0000},
  256. {-913.5530, 579.4688, 17.0500,0.0000, 0.0000, -14.0000},
  257. {-624.0149, 494.0974, 17.0500,0.0000, 0.0000, -16.0000},
  258. {-270.9716, 380.1544, 17.0500, 0.0000, 0.0000, -5.0000}, // start the shit
  259. {171.8441, 323.7453, 17.0500,0.0000, 0.0000, 10.0000}, //crashed
  260. {171.8441, 323.7453, 17.0500,0.0000, 0.0000, 40.0000},
  261. {315.9788, 439.8584, 4.0000,0.0000, 50.0000, 40.0000},
  262. {315.9645, 439.8445, -37.0000,0.0000, 50.0000, 40.0000}
  263. };
  264. stock PlayerName(playerid)
  265. {
  266. new pname[MAX_PLAYER_NAME];
  267. GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
  268. return pname;
  269. }
  270. CMD:endparty(playerid)
  271. {
  272. if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1,"{FF0000}<$> -Warning-<#> {00FF00}You must be {0000FF}Rcon {FF00FF}admin {FFFF33}to use this command!");
  273.  
  274. if((Party == 0)) return SendClientMessage(playerid,RED,"No party has been started yet");
  275. new str[75];
  276. format(str,sizeof(str),"%s has ended the party",PlayerName(playerid));
  277. SendClientMessageToAll(GREENBLUE,str);
  278. Party=0;
  279. for(new x=0; x<sizeof(xMasPickUp); x++) DestroyPickup(xMasPickUp[x]),xMasPickUp[x]=-255;
  280. return 1;
  281. }
  282. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  283. {
  284. return 1;
  285. }
  286.  
  287. public OnPlayerExitVehicle(playerid, vehicleid)
  288. {
  289. return 1;
  290. }
  291.  
  292. public OnPlayerStateChange(playerid, newstate, oldstate)
  293. {
  294. return 1;
  295. }
  296.  
  297. public OnPlayerEnterCheckpoint(playerid)
  298. {
  299. return 1;
  300. }
  301.  
  302. public OnPlayerLeaveCheckpoint(playerid)
  303. {
  304. return 1;
  305. }
  306.  
  307. public OnPlayerEnterRaceCheckpoint(playerid)
  308. {
  309. return 1;
  310. }
  311.  
  312. public OnPlayerLeaveRaceCheckpoint(playerid)
  313. {
  314. return 1;
  315. }
  316.  
  317. public OnRconCommand(cmd[])
  318. {
  319. return 1;
  320. }
  321.  
  322. public OnPlayerRequestSpawn(playerid)
  323. {
  324. return 1;
  325. }
  326.  
  327. public OnObjectMoved(objectid)
  328. {
  329. if(objectid == Ship2)
  330. {
  331. ShipPartyCount++;
  332. MoveObject(Ship1,Titanic1Coords[ShipPartyCount][0],Titanic1Coords[ShipPartyCount][1],Titanic1Coords[ShipPartyCount][2],10.00,Titanic1Coords[ShipPartyCount][3],Titanic1Coords[ShipPartyCount][4],Titanic1Coords[ShipPartyCount][5]);
  333. MoveObject(Ship2,Titanic2Coords[ShipPartyCount][0],Titanic2Coords[ShipPartyCount][1],Titanic2Coords[ShipPartyCount][2],10.00,Titanic2Coords[ShipPartyCount][3],Titanic2Coords[ShipPartyCount][4],Titanic2Coords[ShipPartyCount][5]);
  334. MoveObject(Ship3,Titanic3Coords[ShipPartyCount][0],Titanic3Coords[ShipPartyCount][1],Titanic3Coords[ShipPartyCount][2],10.00,Titanic3Coords[ShipPartyCount][3],Titanic3Coords[ShipPartyCount][4],Titanic3Coords[ShipPartyCount][5]);
  335. if(ShipPartyCount == 5)
  336. {
  337. new Float:x,Float:y,Float:z;
  338. GetObjectPos(Ship2,x,y,z);
  339. foreach(Player,playerid)
  340. {
  341. if(IsPlayerInRangeOfPoint(playerid,100.00,x,y,z))
  342. {
  343. SetPlayerWeather(playerid ,16);
  344. SendClientMessage(playerid,RED,"the weather has started to change");
  345. }
  346. }
  347. }
  348. if(ShipPartyCount == 6)
  349. {
  350. new Float:x,Float:y,Float:z;
  351. GetObjectPos(Ship2,x,y,z);
  352. foreach(Player,playerid)
  353. {
  354. if(IsPlayerInRangeOfPoint(playerid,100.00,x,y,z))
  355. {
  356. StopAudioStreamForPlayer(playerid);
  357. PlayAudioStreamForPlayer(playerid,"http://dl.dropbox.com/u/52869044/Alarm%20Sound%20Navy.mp3");
  358. SendClientMessage(playerid,RED,"DANGER......The Ship Has Crashed ");
  359. }
  360.  
  361. }
  362. }
  363. if(ShipPartyCount == 9)
  364. {
  365. SetTimer("resetship",10*1000,false);
  366.  
  367. }
  368. }
  369. return 1;
  370. }
  371.  
  372. forward moveship(playerid);
  373. public moveship(playerid)
  374. {
  375. SendClientMessageToAll(BLUE,"The titanic party has been started");
  376. MoveObject(Ship1,Titanic1Coords[0][0],Titanic1Coords[0][1],Titanic1Coords[0][2],5.00,Titanic1Coords[0][3],Titanic1Coords[0][4],Titanic1Coords[0][5]);
  377. MoveObject(Ship2,Titanic2Coords[0][0],Titanic2Coords[0][1],Titanic2Coords[0][2],5.00,Titanic2Coords[0][3],Titanic2Coords[0][4],Titanic2Coords[0][5]);
  378. MoveObject(Ship3,Titanic3Coords[0][0],Titanic3Coords[0][1],Titanic3Coords[0][2],5.00,Titanic3Coords[0][3],Titanic3Coords[0][4],Titanic3Coords[0][5]);
  379. ShipPartyCount = 1;
  380. Party = 2;
  381. new Float:x,Float:y,Float:z;
  382. GetObjectPos(Ship2,x,y,z);
  383. foreach(Player,playerid)
  384. {
  385. if(IsPlayerInRangeOfPoint(playerid,100.00,x,y,z))
  386. {
  387. StopAudioStreamForPlayer(playerid);
  388. PlayAudioStreamForPlayer(playerid,"http://dl.dropbox.com/u/52869044/Server%20Songs/Titanic%20remix%20THE%20BEST%20EVER%21.mp3");
  389. }
  390. }
  391. }
  392.  
  393. stock StartShipParty(playerid)
  394. {
  395. new str[128];
  396. format(str,sizeof(str),"%s has started "BLUE_"THE TITANIC"LIGHTBLUE_" party",PlayerName(playerid));
  397. SendClientMessageToAll(LIGHTBLUE,str);
  398. SendClientMessageToAll(GREENBLUE,"The ship will move in 30 seconds, type "PINK_"(/party)"GREENBLUE_" to join" );
  399. SetTimer("moveship",30*1000,false);
  400. if(IsValidObject(Ship1))DestroyObject(Ship1);
  401. if(IsValidObject(Ship2))DestroyObject(Ship2);
  402. if(IsValidObject(Ship3))DestroyObject(Ship3);
  403. Ship1 = CreateObject(10793, -1604.04, 22.73, 35.57, 0.00, 0.00, 45.00);
  404. Ship2 = CreateObject(10794, -1550.83, 75.93, 7.00, 0.00, 0.00, 45.00);
  405. Ship3 = CreateObject(10795, -1552.314, 74.4206, 17.05, 0.00, 0.00, 45.00);
  406. AttachObjectToObject(Ship1, Ship2, -75.65, 0.0, 28.5, 0.0, 0.0, 0.0, 1);
  407. AttachObjectToObject(Ship2, Ship3, 2.7, 0, -10.0, 0.0, 0.0, 0.0, 1);
  408. }
  409. stock StartxMasParty(playerid)
  410. {
  411. new str[128];
  412. format(str,sizeof(str),"%s has started the"BLUE_" xMas"LIGHTBLUE_" party",PlayerName(playerid));
  413. SendClientMessageToAll(LIGHTBLUE,str);
  414.  
  415. xMasPickUp[0] = CreateDynamicObject(19057, 972.8822,-2483.4968,70.5924,0.0,0.0,0.0,0);
  416. xMasPickUp[1] = CreateDynamicObject(19057, 981.8885,-2495.0662,70.7624,0.0,0.0,0.0,0);
  417. xMasPickUp[2] = CreateDynamicObject(19056, 973.0527,-2510.1470,70.8676,0.0,0.0,0.0,0);
  418. xMasPickUp[3] = CreateDynamicObject(19058, 961.7491,-2507.1165,70.8982,0.0,0.0,0.0,0);
  419. xMasPickUp[4] = CreateDynamicObject(19055, 955.5288,-2497.6960,70.2119,0.0,0.0,0.0,0);
  420. xMasPickUp[5] = CreateDynamicObject(19055, 962.6249,-2495.0610,70.2687,0.0,0.0,0.0,0);
  421. for(new i=0;i<6;i++)
  422. {
  423. new Float:x,Float:y,Float:z;
  424. GetDynamicObjectPos(xMasPickUp[i],x,y,z);
  425. MoveDynamicObject(xMasPickUp[i],x,y,55.0,2.00);
  426. }
  427. }
  428.  
  429. public OnPlayerObjectMoved(playerid, objectid)
  430. {
  431. return 1;
  432. }
  433.  
  434. public OnPlayerPickUpPickup(playerid, pickupid)
  435. {
  436. for(new x=0;x<6;x++)
  437. {
  438. if(pickupid ==xMasPickUp[x])
  439. {
  440. switch(random(5))
  441. {
  442. case 0:
  443. {
  444. GivePlayerMoney(playerid,50000);
  445. }
  446. case 1:
  447. {
  448. GameTextForPlayer(playerid,"~b~Santa Hat",1000, 0);
  449. SetPlayerAttachedObject(playerid, 2, 19065, 2, 0.120000, 0.040000, -0.003500, 0, 100, 100, 1.4, 1.4, 1.4);
  450. }
  451. case 2:
  452. {
  453. GivePlayerWeapon(playerid, 16, 64);
  454. GameTextForPlayer(playerid,"~r~BOMB",1000, 0);
  455. }
  456. case 3:
  457. {
  458. GameTextForPlayer(playerid,"~p~Dildo",1000, 0);
  459. SetPlayerAttachedObject( playerid, 2, 19086, 8, -0.049768, -0.014062, -0.108385, 87.458297, 263.478149, 184.123764, 0.622413, 1.041609, 1.012785 ); // ChainsawDildo1 - lolatdick
  460.  
  461. }
  462. case 4:
  463. {
  464. GivePlayerWeapon(playerid, 26, 64);
  465. }
  466. }
  467. break;
  468. }
  469. }
  470. return 1;
  471. }
  472.  
  473. public OnVehicleMod(playerid, vehicleid, componentid)
  474. {
  475. return 1;
  476. }
  477.  
  478. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  479. {
  480. return 1;
  481. }
  482.  
  483. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  484. {
  485. return 1;
  486. }
  487.  
  488. public OnPlayerSelectedMenuRow(playerid, row)
  489. {
  490. return 1;
  491. }
  492.  
  493. public OnPlayerExitedMenu(playerid)
  494. {
  495. return 1;
  496. }
  497.  
  498. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  499. {
  500. return 1;
  501. }
  502.  
  503. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  504. {
  505. return 1;
  506. }
  507.  
  508. public OnRconLoginAttempt(ip[], password[], success)
  509. {
  510. return 1;
  511. }
  512.  
  513. public OnPlayerUpdate(playerid)
  514. {
  515. return 1;
  516. }
  517.  
  518. public OnPlayerStreamIn(playerid, forplayerid)
  519. {
  520. return 1;
  521. }
  522.  
  523. public OnPlayerStreamOut(playerid, forplayerid)
  524. {
  525. return 1;
  526. }
  527.  
  528. public OnVehicleStreamIn(vehicleid, forplayerid)
  529. {
  530. return 1;
  531. }
  532.  
  533. public OnVehicleStreamOut(vehicleid, forplayerid)
  534. {
  535. return 1;
  536. }
  537. public OnDynamicObjectMoved(objectid)
  538. {
  539.  
  540. return 1;
  541. }
  542. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  543. {
  544. if(response)// They pressed the first button.
  545. {
  546. switch(dialogid)// If you only have one dialog, then this isn't required, but it's neater for when you implement more dialogs.
  547. {
  548. case 4544:// Our dialog!
  549. {
  550. switch(listitem)// Checking which listitem was selected
  551. {
  552. case 0:
  553. {
  554. new Float:x,Float:y,Float:z;
  555. GetPlayerPos(playerid,x,y,z);
  556. partyX = x,partyY = y, partyZ = z,partyVw = GetPlayerVirtualWorld(playerid);
  557. Party = 1;
  558. new str[74];
  559. format(str,sizeof(str),"%s has started a party",PlayerName(playerid));
  560. SendClientMessageToAll(LIGHTBLUE,str);
  561. SendClientMessageToAll(LIGHTBLUE,"Type (/party) to join it");
  562. }
  563. case 1:
  564. {
  565. partyX = -1563.1523,partyY = 63.7251, partyZ = 17.3312;
  566. partyVw=0;
  567. StartShipParty(playerid);
  568. Party = 1;
  569. }
  570. case 2:
  571. {
  572. partyX = 961.3387,partyY = -2487.3472, partyZ = 55.2720;
  573. partyVw=0;
  574. StartxMasParty(playerid);
  575. Party = 1;
  576. }
  577. }
  578. }
  579. }
  580. }
  581. return 1;
  582. }
  583.  
  584. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  585. {
  586. return 1;
  587. }
Advertisement
Add Comment
Please, Sign In to add comment