SHARE
TWEET

Untitled

a guest Jul 15th, 2016 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // This is a comment
  2. // uncomment the line below if you want to write a filterscript
  3. #include <a_samp>
  4. #include <streamer>
  5. #include <zcmd>
  6. #if defined FILTERSCRIPT
  7. new TollPaid[MAX_PLAYERS];
  8.  
  9. public OnFilterScriptInit()
  10. {
  11.     print("\n--------------------------------------");
  12.     print("Moving Objects by Spongegar");
  13.     print("--------------------------------------\n");
  14.     return 1;
  15. }
  16.  
  17. public OnFilterScriptExit()
  18. {
  19.     return 1;
  20. }
  21.  
  22. #else
  23. //ROCKY MOUNTAIN
  24. new nb;
  25. new sb;
  26. //FORT CALHOUN
  27. new eb;
  28. new wb;
  29. new cg;
  30. new mg;
  31. main()
  32. {
  33.     print("\n----------------------------------");
  34.     print("Moving Objects by Spongegar");
  35.     print("----------------------------------\n");
  36. }
  37.  
  38. #endif
  39. //ROCKY MOUNTAIN Gates
  40. forward close();
  41. public close ()//close for North Bound Gate
  42. {
  43. new playerid;
  44. MoveObject(nb, 1839.9758300,-3562.6206100,24.8720000,3); //after 3 seconds of opened gate it will now closed and will return to it's original position. Closed Position.
  45. TollPaid[playerid] = 0;
  46. return 1;
  47. }//Southbound Closing Blocker
  48. forward close2();
  49. public close2 ()
  50. {
  51. MoveObject(sb, 1852.3601100,-3552.4511700,24.8720000,3);
  52. return 1;
  53. //FORT CALHOUN TOLL GATES
  54. }
  55. forward close3();
  56. public close3 ()
  57. {
  58. MoveObject(eb, 3618.0732, 3150.8486, 26.3476,3);
  59. }
  60. forward close4();
  61. public close4 ()
  62. {
  63.  MoveObject(wb, 3606.4448, 3159.7026, 26.3491, 3);
  64. }
  65. forward close5();
  66. public close5 ()
  67. {
  68.  MoveObject(cg, 3379.5000, 3716.4387, 15.8885, 3);
  69. }
  70. forward close6();
  71. public close6 ()
  72. {
  73.  MoveObject(mg, 3000.0281, 3166.0081, 17.7003, 3);
  74. }
  75. public OnGameModeInit()
  76. {
  77. //ROCKY MOUNTAIN TOLL GATES
  78. nb = CreateObject(3578,1839.9758300,-3562.6206100,24.8720000,0.0000000,0.0000000,90.0000000); // North Bound Closed Blocker/Original Position
  79. sb = CreateObject(3578,1852.3601100,-3552.4511700,24.8720000,0.0000000,0.0000000,90.0000000); // South Bound Closed Blocker /Original Position
  80. //FORT CALHOUN TOLL GATES
  81. eb = CreateObject(3578, 3618.0732, 3150.8486, 26.3476,0.0000000,0.0000000,90.0000000); // East Bound Closed Blocker/Original Position
  82. wb = CreateObject(3578, 3606.4448, 3159.7026, 26.3491, 0.0000000,0.0000000,90.0000000); //West Bound Closed Clobker/Original Position
  83. cg = CreateObject (976, 3379.5000, 3716.4387, 15.8885, 0.0000000,0.0000000,180.0000000); //City Hall Closed Gate/Original Position
  84. mg = CreateObject (985, 3000.0281, 3166.0081, 17.7003, 0.0000000,0.0000000,180.0000000); //Mansion Closed Gate/Original Position
  85. return 1;
  86. }
  87.  
  88. public OnGameModeExit()
  89. {
  90.     return 1;
  91. }
  92.  
  93. public OnPlayerRequestClass(playerid, classid)
  94. {
  95.     return 1;
  96. }
  97.  
  98. public OnPlayerConnect(playerid)
  99. {
  100.  TollPaid[playerid]=0;
  101.  SetPlayerTime(playerid, 0, 0);
  102.  SetWeather(1);
  103.  GivePlayerMoney(playerid, 16000);
  104.  SetPlayerHealth(playerid, 50000);
  105.  Create3DTextLabel("West Emerald Expressway to Rocky Mountain", 0xFFFFFF, 1331.5966, -2286.1479, 14.8848, 100.0, 0, 0);
  106.  Create3DTextLabel("Stonefield Town", 0xFFFFFF, 1562.4888, -3574.3423, 13.4243, 100.0, 0, 0);
  107.  Create3DTextLabel("Stonefield View", 0xFFFFFF, 1930.9447, -3674.2808, 139.6094, 100.0, 0, 0);
  108.  Create3DTextLabel("Rocky Mountain's Junk Site", 0xFFFFFF, 3040.9128, -4346.4385, 274.6297, 100.0, 0, 0);
  109.  Create3DTextLabel("Rocky Mountain's Farm Village", 0xFFFFFF, 2738.7590, -3780.2832, 379.6364, 100.0, 0, 0);
  110.  Create3DTextLabel("Rocky Mountain's Truck Depot", 0xFFFFFF, 3176.8823, -3659.9016, 464.5526, 100.0, 0, 0);
  111.  Create3DTextLabel("Rocky Mountain's Airport", 0xFFFFFF, 3652.7754, -4394.2158, 587.2219, 100.0, 0, 0);
  112.  Create3DTextLabel("Rocky Mountain's Power Plant", 0xFFFFFF, 3374.9431, -3993.7437 ,552.4988, 100.0, 0, 0);
  113.  Create3DTextLabel("Falcon Haven Town", 0xFFFFFF, 2960.6812, -4901.0659, 562.6208, 100.0, 0, 0);
  114.  Create3DTextLabel("Expressway to Eagle Island", 0xFFFFFF, 3867.6941, -5866.0063, 773.7996, 100.0, 0, 0);
  115.  Create3DTextLabel("Rocky Mountain's Warehouse", 0xFFFFFF, 4013.0901, -6055.3540, 753.6495, 100.0, 0, 0);
  116.  Create3DTextLabel("Rocky Mountain's Military Base", 0xFFFFFF, 2332.7107, -4021.9839, 206.1573, 100.0, 0, 0);
  117.  Create3DTextLabel("Springcrest Town", 0xFFFFFF, 2246.9746, -4843.9668, 118.7989, 100.0, 0, 0);
  118.  Create3DTextLabel("Springcrest Fuel Factory", 0xFFFFFF, 2160.2498, -4418.3823, 118.8131, 100.0, 0, 0);
  119.  Create3DTextLabel("Springcrest Town", 0xFFFFFF, 2737.4978, -5595.0020, 118.7390, 100.0, 0, 0);
  120.  Create3DTextLabel("Road to Jonestown", 0xFFFFFF, 4474.8960, -6962.2734, 39.9894, 100.0, 0, 0);
  121.  Create3DTextLabel("Rocky Mountain's Dump Site", 0xFFFFFF, 2953.4185, -2695.4202, 4.1022, 100.0, 0, 0);
  122.  Create3DTextLabel("Rocky Mountain's Dock", 0xFFFFFF, 1378.6476, -5599.5273, 18.0278, 100.0, 0, 0);
  123.  Create3DTextLabel ("Coming Soon! Grand Canyon :D ", 0xFFFFFF, 6891.2197, -5305.1851, 98.9425, 100.0, 0, 0);
  124.  Create3DTextLabel ("Jonestown. Get out of Here before they come to you! Visit: https://en.wikipedia.org/wiki/Jonestown", 0xFFFFFF, 5630.8755, -8487.4531, 40.8300, 100.0, 0, 0);
  125.  return 1;
  126. }
  127.  
  128. public OnPlayerDisconnect(playerid, reason)
  129. {
  130.     return 1;
  131. }
  132.  
  133. public OnPlayerSpawn(playerid)
  134. {
  135.     return 1;
  136. }
  137.  
  138. public OnPlayerDeath(playerid, killerid, reason)
  139. {
  140.     SendClientMessage(playerid, 0x00FF00FF, "Respawned!");
  141.     return 1;
  142. }
  143.  
  144. public OnVehicleSpawn(vehicleid)
  145. {
  146.     return 1;
  147. }
  148.  
  149. public OnVehicleDeath(vehicleid, killerid)
  150. {
  151.     return 1;
  152. }
  153.  
  154. public OnPlayerText(playerid, text[])
  155. {
  156.     return 1;
  157. }
  158.  
  159. public OnPlayerCommandText(playerid, cmdtext[])
  160. {
  161.   return 0;
  162. }
  163.  
  164. public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
  165. {
  166.     return 1;
  167. }
  168.  
  169. public OnPlayerExitVehicle(playerid, vehicleid)
  170. {
  171.     return 1;
  172. }
  173.  
  174. public OnPlayerStateChange(playerid, newstate, oldstate)
  175. {
  176.     return 1;
  177. }
  178.  
  179. public OnPlayerEnterCheckpoint(playerid)
  180. {
  181.     return 1;
  182. }
  183.  
  184. public OnPlayerLeaveCheckpoint(playerid)
  185. {
  186.     return 1;
  187. }
  188.  
  189. public OnPlayerEnterRaceCheckpoint(playerid)
  190. {
  191.     return 1;
  192. }
  193.  
  194. public OnPlayerLeaveRaceCheckpoint(playerid)
  195. {
  196.     return 1;
  197. }
  198.  
  199. public OnRconCommand(cmd[])
  200. {
  201.     return 1;
  202. }
  203.  
  204. public OnPlayerRequestSpawn(playerid)
  205. {
  206.     return 1;
  207. }
  208.  
  209. public OnObjectMoved(objectid)
  210. {
  211.     return 1;
  212. }
  213.  
  214. public OnPlayerObjectMoved(playerid, objectid)
  215. {
  216.     new playerid;
  217.     SendClientMessage(playerid, 0x00FF00FF, "You paid 8$ for Toll Fee! Be careful on driving and enjoy your trip!");
  218.     GivePlayerMoney(playerid, -8);
  219.     return 1;
  220. }
  221.  
  222. public OnPlayerPickUpPickup(playerid, pickupid)
  223. {
  224.     return 1;
  225. }
  226.  
  227. public OnVehicleMod(playerid, vehicleid, componentid)
  228. {
  229.     return 1;
  230. }
  231.  
  232. public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
  233. {
  234.     return 1;
  235. }
  236.  
  237. public OnVehicleRespray(playerid, vehicleid, color1, color2)
  238. {
  239.     return 1;
  240. }
  241.  
  242. public OnPlayerSelectedMenuRow(playerid, row)
  243. {
  244.     return 1;
  245. }
  246.  
  247. public OnPlayerExitedMenu(playerid)
  248. {
  249.     return 1;
  250. }
  251.  
  252. public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
  253. {
  254.     return 1;
  255. }
  256.  
  257. public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
  258. {
  259.     return 1;
  260. }
  261.  
  262. public OnRconLoginAttempt(ip[], password[], success)
  263. {
  264.     return 1;
  265. }
  266.  
  267. public OnPlayerUpdate(playerid)
  268. {
  269.     //ROCKY MOUNTAIN TOLL GATES
  270.     if(IsPlayerInRangeOfPoint(playerid, 6, 1839.9758300,-3562.6206100,24.8720000) && TollPaid[playerid] == 0) //Range/area same with the Gate
  271.     {
  272.     MoveObject(nb, 1839.9956, -3562.6233, 23.4365, 3); // if the player is in range/area this line will move the gate's Z position in other words the gates will lower in order to open. This is now the OPEN Position of gate
  273.     TollPaid[playerid] = 1;
  274.     SetTimer("close", 3000, 0);//Timer before closing (3,000 milliseconds = 3 seconds) and will call the close function
  275.     }
  276.     if(IsPlayerInRangeOfPoint(playerid, 6, 1852.3601,-3552.4512,24.8720000))//Range/area same with the Gate
  277.     {
  278.     MoveObject(sb, 1852.3601, -3552.4512, 23.3609, 3);// if the player is in range/area this line will move the gate's Z position in other words the gates will lower in order to open. This is now the OPEN Position of gate
  279.     SetTimer("close2", 3000, 0);//Timer before closing and will call the close2 function
  280.     }
  281.     //FORT CALHOUN TOLL GATES
  282.     if(IsPlayerInRangeOfPoint(playerid, 6, 3618.0732, 3150.8486, 26.3476)) //Range/area same with the Gate
  283.     {
  284.     MoveObject(eb, 3618.0732, 3150.8486, 25.0366, 3); // if the player is in range/area this line will move the gate's Z position in other words the gates will lower in order to open. This is now the OPEN Position of gate
  285.     SetTimer("close3", 3000, 0);//Timer before closing and will call the close function
  286.     }
  287.     if(IsPlayerInRangeOfPoint(playerid, 6,  3606.4448, 3159.7026, 26.3491)) //Range/area same with the Gate
  288.     {
  289.     MoveObject(wb, 3606.4448, 3159.7026, 25.0208, 3); // if the player is in range/area this line will move the gate's Z position in other words the gates will lower in order to open. This is now the OPEN Position of gate
  290.     SetTimer("close4", 3000, 0);//Timer before closing and will call the close function
  291.     }
  292.     if(IsPlayerInRangeOfPoint(playerid, 6, 3379.5000, 3716.4387, 15.8885)) //Range/area same with the Gate
  293.     {
  294.     MoveObject(cg, 3371.5000, 3716.4387, 15.8885, 3); // if the player is in range/area this line will move the gate's Z position in other words the gates will lower in order to open. This is now the OPEN Position of gate
  295.     SetTimer("close5", 3000, 0);//Timer before closing and will call the close function
  296.     }
  297.     if(IsPlayerInRangeOfPoint(playerid, 6,  3000.0281, 3166.0081, 17.7003)) //Range/area same with the Gate
  298.     {
  299.     MoveObject(mg, 2992.5681, 3166.0081, 17.7003, 3); // if the player is in range/area this line will move the gate's Z position in other words the gates will lower in order to open. This is now the OPEN Position of gate
  300.     SetTimer("close6", 3000, 0);//Timer before closing and will call the close function
  301.     }
  302.     return 1;
  303. }
  304. public OnPlayerStreamIn(playerid, forplayerid)
  305. {
  306.     return 1;
  307. }
  308.  
  309. public OnPlayerStreamOut(playerid, forplayerid)
  310. {
  311.     return 1;
  312. }
  313.  
  314. public OnVehicleStreamIn(vehicleid, forplayerid)
  315. {
  316.     return 1;
  317. }
  318.  
  319. public OnVehicleStreamOut(vehicleid, forplayerid)
  320. {
  321.     return 1;
  322. }
  323.  
  324. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  325. {
  326.     return 1;
  327. }
  328.  
  329. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  330. {
  331.     return 1;
  332. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top