Advertisement
Guest User

interior help

a guest
Apr 3rd, 2011
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 9.53 KB | None | 0 0
  1. #include <a_samp>
  2. #include <streamer>
  3.  
  4. #define COLOUR_SAMP 0xA9C4E4FF
  5. #define COLOUR_DEBUG 0x88AA62FF
  6. #define COLOR_GRAD1 0xB4B5B7FF
  7. #define COLOR_GRAD2 0xBFC0C2FF
  8. #define COLOR_GRAD3 0xCBCCCEFF
  9. #define COLOR_GRAD4 0xD8D8D8FF
  10. #define COLOR_GRAD5 0xE3E3E3FF
  11. #define COLOR_GRAD6 0xF0F0F0FF
  12. #define COLOR_GREY 0xAFAFAFAA
  13. #define COLOR_GREEN 0x9EC73DAA
  14. #define COLOR_GROVE 0x00FF00FF
  15. #define COLOR_RED 0xAA3333AA
  16. #define COLOR_COOLRED 0xB35959AA
  17. #define COLOR_ORANGE 0xFF9900AA
  18. #define COLOR_PINK 0xFF66FFAA
  19. #define COLOR_DARKRED 0x660000AA
  20. #define COLOR_BRIGHTRED 0xFF0000AA
  21. #define COLOR_INDIGO 0x4B00B0AA
  22. #define COLOR_VIOLET 0x9955DEEE
  23. #define COLOR_GRAYWHITE 0xEEEEFFC4
  24. #define COLOR_LIGHTNEUTRALBLUE 0xabcdef66
  25. #define COLOR_GREENISHGOLD 0xCCFFDD56
  26. #define COLOR_LIGHTBLUEGREEN 0x0FFDD349
  27. #define COLOR_NEUTRALBLUE 0xABCDEF01
  28. #define COLOR_LIGHTCYAN 0xAAFFCC33
  29. #define COLOR_LEMON 0xDDDD2357
  30. #define COLOR_LIGHTRED 0xFF6347AA
  31. #define COLOR_LIGHTBLUE 0x33CCFFAA
  32. #define COLOR_LIGHTGREEN 0x9ACD32AA
  33. #define COLOR_YELLOW 0xFFFF00AA
  34. #define COLOR_YELLOW2 0xFFFF00AA
  35. #define COLOR_WHITE 0xFFFFFFAA
  36. #define COLOR_FADE1 0xE6E6E6E6
  37. #define COLOR_FADE2 0xC8C8C8C8
  38. #define COLOR_FADE3 0xAAAAAAAA
  39. #define COLOR_FADE4 0x8C8C8C8C
  40. #define COLOR_LIGHTYELLOW 0xFFFF91FF
  41. #define COLOR_FADE5 0x6E6E6E6E
  42. #define COLOR_PURPLE 0xC2A2DAAA
  43. #define COLOR_CHAT1 0xF9B7FFAA
  44. #define COLOR_CHAT2 0xE6A9ECAA
  45. #define COLOR_CHAT3 0xC38EC7AA
  46. #define COLOR_CHAT4 0xD2B9D3AA
  47. #define COLOR_CHAT5 0xC6AEC7AA
  48. #define COLOR_ALLDEPT 0xFF8282AA
  49. #define COLOR_NEWS 0x458E1DAA
  50. #define COLOR_OOC 0xE0FFFFAA
  51. #define COLOR_BLUE 0x2641FEAA
  52. #define COLOR_DBLUE 0x3333CCAA
  53. #define COLOR_DARKNICERED 0x9D000096
  54.  
  55.  
  56. #define COLOR_LIGHT_BLUE 0xa9c4e4FF
  57. #define COLOR_SIMPSONS 0xFFD90FAA
  58. #define COLOR_SEA 0x00808000
  59. #define COLOR_INVIS 0xAFAFAF00
  60. #define COLOR_SPEC 0xBFC0C200
  61. #define COL_EASY "{FFF1AF}"
  62. #define COL_WHITE "{FFFFFF}"
  63. #define COL_BLACK "{0E0101}"
  64. #define COL_GREY "{C3C3C3}"
  65. #define COL_GREEN "{6EF83C}"
  66. #define COL_RED "{F81414}"
  67. #define COL_YELLOW "{F3FF02}"
  68. #define COL_ORANGE "{FFAF00}"
  69. #define COL_LIME "{B7FF00}"
  70. #define COL_CYAN "{00FFEE}"
  71. #define COL_LIGHTBLUE "{00C0FF}"
  72. #define COL_BLUE "{0049FF}"
  73. #define COL_MAGENTA "{F300FF}"
  74. #define COL_VIOLET "{B700FF}"
  75. #define COL_PINK "{FF00EA}"
  76. #define COL_MARONE "{A90202}"
  77. #define COL_CMD "{B8FF02}"
  78. #define COL_PARAM "{3FCD02}"
  79. #define COL_SERVER "{AFE7FF}"
  80. #define COL_VALUE "{A3E4FF}"
  81. #define COL_RULE "{F9E8B7}"
  82. #define COL_RULE2 "{FBDF89}"
  83. #define COL_RWHITE "{FFFFFF}"
  84. #define COL_LGREEN "{C9FFAB}"
  85. #define COL_LRED "{FFA1A1}"
  86. #define COL_LRED2 "{C77D87}"
  87.  
  88. new Gate;
  89. new Float:saveX[MAX_PLAYERS],Float:saveY[MAX_PLAYERS],Float:saveZ[MAX_PLAYERS];
  90. new CityHall;
  91.  
  92. main()
  93. {
  94. print("\n----------------------------------");
  95. print("gta server");
  96. print("----------------------------------\n");
  97. }
  98.  
  99. public OnGameModeInit()
  100. {
  101. // Player Selection Classes
  102. SetGameModeText("LV CARTELLS");
  103. AddPlayerClass(29,-3509.5193,799.9101,2.5338,41.3702,28,1000,26,200,0,0); //drug
  104.  
  105. //----------------------------------------------------------------------------
  106.  
  107.  
  108. // Gate stuff
  109. CreateObject(710,2090.149414,2463.698486,10.671875,0.000000,0.000000,0.000000); // entrance gates trees
  110. CreateObject(710,2115.380126,2463.694091,10.671875,0.000000,0.000000,0.000000); // cpy_entrance gates trees
  111.  
  112. //gates
  113. Gate = CreateObject(972,2100.707519,2466.819335,9.561320,0.000000,0.000000,-90.000000); // closed gate
  114. return 1;
  115. }
  116.  
  117. public OnGameModeExit()
  118. {
  119. return 1;
  120. }
  121.  
  122. public OnPlayerRequestClass(playerid, classid)
  123. {
  124. SetPlayerPos(playerid, -3515.6458,805.4797,2.5353);
  125. SetPlayerCameraPos(playerid, -3509.5193,799.9101,2.5338);
  126. SetPlayerCameraLookAt(playerid, -3515.6458,805.4797,2.5353);
  127. return 1;
  128. }
  129.  
  130. public OnPlayerConnect(playerid)
  131. {
  132. new pName[MAX_PLAYER_NAME], string[128];
  133. GetPlayerName(playerid, pName, sizeof(pName));
  134. format(string, sizeof(string), "%s(%d) has joined the server.", pName, playerid);
  135. SendClientMessageToAll(0xAFAFAFAA, string);
  136. return 1;
  137. }
  138.  
  139. public OnPlayerDisconnect(playerid, reason)
  140. {
  141. new pName[MAX_PLAYER_NAME], string[128];
  142. GetPlayerName(playerid, pName, sizeof(pName));
  143. switch(reason)
  144. {
  145. case 0: format(string, sizeof(string), "%s(%d) has left the server. (Lost Connection)", pName, playerid);
  146. case 1: format(string, sizeof(string), "%s(%d) has left the server. (Disconnected)", pName, playerid);
  147. case 2: format(string, sizeof(string), "%s(%d) has left the server. (Kicked)", pName, playerid);
  148. }
  149. SendClientMessageToAll(0xAFAFAFAA, string);
  150. return 1;
  151. }
  152.  
  153. public OnPlayerSpawn(playerid)
  154. {
  155. return 1;
  156. }
  157.  
  158. public OnPlayerDeath(playerid, killerid, reason)
  159. {
  160. SendDeathMessage(killerid, playerid, reason);
  161. return 1;
  162. }
  163.  
  164. public OnVehicleSpawn(vehicleid)
  165. {
  166. return 1;
  167. }
  168.  
  169. public OnVehicleDeath(vehicleid, killerid)
  170. {
  171. return 1;
  172. }
  173.  
  174. public OnPlayerText(playerid, text[])
  175. {
  176. return 1;
  177. }
  178.  
  179. public OnPlayerCommandText(playerid, cmdtext[])
  180. {
  181. //Teleports
  182. if (strcmp("/1", cmdtext, true, 10) == 0)
  183. {
  184. SetPlayerPos(playerid,-3464.0693,723.0591,2.8897);
  185. SetPlayerInterior(playerid,0);
  186. return 1;
  187. }
  188. if (strcmp("/2", cmdtext, true, 10) == 0)
  189. {
  190. SetPlayerPos(playerid,-665.3836,1975.3628,13.6719);
  191. SetPlayerInterior(playerid,0);
  192. return 2;
  193. }
  194. if (strcmp("/3", cmdtext, true, 10) == 0)
  195. {
  196. SetPlayerPos(playerid,2095.3274,2471.6055,10.8203);
  197. SetPlayerInterior(playerid,0);
  198. return 3;
  199. }
  200. if (strcmp("/4", cmdtext, true, 10) == 0)
  201. {
  202. SetPlayerPos(playerid,1699.6018,2313.6892,10.8203);
  203. SetPlayerInterior(playerid,0);
  204. return 4;
  205. }
  206. if (strcmp("/5", cmdtext, true, 10) == 0)
  207. {
  208. SetPlayerPos(playerid,-3304.7668,9.0324,2.8674);
  209. SetPlayerInterior(playerid,0);
  210. return 5;
  211. }
  212. //Gates
  213. if(strcmp("/opengate", cmdtext, true) == 0)
  214. {
  215. if(IsPlayerInRangeOfPoint(playerid, 10.0, 2100.707519,2466.819335,2.561320))
  216. {
  217. MoveObject(Gate, 2100.707519,2466.819335,2.561320, 1);
  218. SendClientMessage(playerid, COLOR_YELLOW, "Remote: Signal received: Opening Gate..");
  219. return 1;
  220. }
  221. else return SendClientMessage(playerid, COLOR_RED, "Remote: No signal found..");
  222. }
  223.  
  224. if(strcmp("/closegate", cmdtext, true) == 0)
  225. {
  226. if(IsPlayerInRangeOfPoint(playerid, 10.0, 2100.707519,2466.819335,9.561320))
  227. {
  228. MoveObject(Gate, 2100.707519,2466.819335,9.561320, 1);
  229. SendClientMessage(playerid, COLOR_YELLOW, "Remote: Signal received: Closing Gate..");
  230. return 1;
  231. }
  232. else return SendClientMessage(playerid, COLOR_RED, "Remote: No signal found..");
  233. }
  234.  
  235.  
  236. //Enter cmds
  237. if(strcmp(cmdtext,"/enter", true)==0)
  238. {
  239. if(IsPlayerInRangeOfPoint(playerid,5.0,1559,1,2067.6037597656,2484.482421875,11.078125))
  240. {
  241. GetPlayerPos(playerid,saveX[playerid],saveY[playerid],saveZ[playerid]);
  242. SetPlayerPos(playerid,460.49603271484,-88.599998474121,998.45471191406);
  243. SetPlayerInterior(playerid, 3);
  244. }
  245. return 1;
  246. }
  247. if(strcmp(cmdtext,"/exit", true)==0)
  248. {
  249. SetPlayerPos(playerid,saveX[playerid],saveY[playerid],saveZ[playerid]);
  250. SetPlayerInterior(playerid, 0);
  251.  
  252. return 1;
  253. }
  254. return 0;
  255. }
  256.  
  257. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  258. {
  259. return 1;
  260. }
  261.  
  262. public OnPlayerExitVehicle(playerid, vehicleid)
  263. {
  264. return 1;
  265. }
  266.  
  267. public OnPlayerStateChange(playerid, newstate, oldstate)
  268. {
  269. return 1;
  270. }
  271.  
  272. public OnPlayerEnterCheckpoint(playerid)
  273. {
  274. return 1;
  275. }
  276.  
  277. public OnPlayerLeaveCheckpoint(playerid)
  278. {
  279. return 1;
  280. }
  281.  
  282. public OnPlayerEnterRaceCheckpoint(playerid)
  283. {
  284. return 1;
  285. }
  286.  
  287. public OnPlayerLeaveRaceCheckpoint(playerid)
  288. {
  289. return 1;
  290. }
  291.  
  292. public OnRconCommand(cmd[])
  293. {
  294. return 1;
  295. }
  296.  
  297. public OnPlayerRequestSpawn(playerid)
  298. {
  299. return 1;
  300. }
  301.  
  302. public OnObjectMoved(objectid)
  303. {
  304. return 1;
  305. }
  306.  
  307. public OnPlayerObjectMoved(playerid, objectid)
  308. {
  309. return 1;
  310. }
  311.  
  312. public OnPlayerPickUpPickup(playerid, pickupid)
  313. {
  314. if(pickupid == CityHall)
  315. {
  316. GameTextForPlayer(Playerid, "type /enter", 5000, 5);
  317. return 1;
  318. }
  319.  
  320. public OnVehicleMod(playerid, vehicleid, componentid)
  321. {
  322. return 1;
  323. }
  324.  
  325. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  326. {
  327. return 1;
  328. }
  329.  
  330. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  331. {
  332. return 1;
  333. }
  334.  
  335. public OnPlayerSelectedMenuRow(playerid, row)
  336. {
  337. return 1;
  338. }
  339.  
  340. public OnPlayerExitedMenu(playerid)
  341. {
  342. return 1;
  343. }
  344.  
  345. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  346. {
  347. return 1;
  348. }
  349.  
  350. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  351. {
  352. return 1;
  353. }
  354.  
  355. public OnRconLoginAttempt(ip[], password[], success)
  356. {
  357. return 1;
  358. }
  359.  
  360. public OnPlayerUpdate(playerid)
  361. {
  362. if(IsPlayerInRangeOfPoint(playerid,5.0,460.49603271484,-88.599998474121,998.45471191406)
  363. {
  364. GameTextForPlayer(playerid,"Type /exit",5000,5);
  365. }
  366. return 1;
  367. }
  368.  
  369. public OnPlayerStreamIn(playerid, forplayerid)
  370. {
  371. return 1;
  372. }
  373.  
  374. public OnPlayerStreamOut(playerid, forplayerid)
  375. {
  376. return 1;
  377. }
  378.  
  379. public OnVehicleStreamIn(vehicleid, forplayerid)
  380. {
  381. return 1;
  382. }
  383.  
  384. public OnVehicleStreamOut(vehicleid, forplayerid)
  385. {
  386. return 1;
  387. }
  388.  
  389. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  390. {
  391. return 1;
  392. }
  393.  
  394. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  395. {
  396. return 1;
  397. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement