Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <dcmd>
- // ===== Edit from here ========================================================
- #define OBJ_AMOUNT 144 // Object Amount - Needed for destroying on filter script exit
- #define VEH_AMOUNT 14 // Vehicle Amount - Needed for destroying on filter script exit
- #define RES_TIME 60 // respawn time of vehicles in minutes
- #define COLOR_GREEN 0x3CB371FF
- #define COLOR_RED 0xDD0000FF
- #define COLOR_YELLOW 0xFFD700FF
- #define COLOR_BLUE 0x00BFFFFF
- // ===== Stop here, unless you know what you're doing ==========================
- new vehicle[VEH_AMOUNT];
- new northgate;
- new southgate;
- new respawn = RES_TIME*1000*60;
- public OnFilterScriptInit()
- {
- // MAIN
- print("|=======================|");
- print("| *** ISLAND MAP ***|");
- print("| By Vince V. |");
- print("| Version 1.0 |");
- print("|=======================|");
- // CREATE OBJECTS
- CreateObject(4847, -661.210632, 3099.671387, -5.329028, 0.0000, 0.0000, 360.0000);
- CreateObject(4847, -661.210632, 3198.771973, -5.329028, 0.0000, 0.0000, 180.0000);
- CreateObject(4847, -661.210632, 3221.151367, -5.329028, 0.0000, 0.0000, 180.0000);
- CreateObject(4847, -661.210632, 3243.758789, -5.329028, 0.0000, 0.0000, 180.0000);
- CreateObject(4847, -663.412781, 3336.819336, -5.329028, 0.0000, 0.0000, 0.000);
- CreateObject(4847, -663.412781, 3359.987793, -5.329028, 0.0000, 0.0000, 0.000);
- CreateObject(4847, -663.412781, 3383.039551, -5.329028, 0.0000, 0.0000, 0.000);
- CreateObject(4847, -662.937317, 3481.514648, -5.329028, 0.0000, 0.0000, 180.0000);
- CreateObject(16113, -860.057312, 3479.263916, -3.757406, 0.0000, 0.0000, 45.0000);
- CreateObject(16113, -819.691040, 3477.566895, -1.773360, 0.0000, 0.0000, 33.7500);
- CreateObject(16113, -799.922668, 3346.586426, -3.244095, 0.0000, 0.0000, 281.2500);
- CreateObject(16118, -814.461609, 3322.239990, -5.232672, 0.0000, 0.0000, 180.0000);
- CreateObject(16118, -893.912109, 3305.523438, -5.765920, 0.0000, 0.0000, 360.0000);
- CreateObject(16118, -843.603760, 3128.814697, -4.411238, 0.0000, 0.0000, 90.0003);
- CreateObject(16122, -680.847473, 3350.265381, -15.337959, 0.0000, 0.0000, 292.5000);
- CreateObject(16120, -488.178162, 3123.821533, -3.466859, 0.0000, 0.0000, 146.2500);
- CreateObject(16120, -488.178162, 3169.071533, -3.466859, 0.0000, 0.0000, 146.2500);
- CreateObject(16120, -488.678162, 3216.071533, -3.466859, 0.0000, 0.0000, 146.2500);
- CreateObject(16120, -488.678162, 3349.122314, -3.466859, 0.0000, 0.0000, 146.2500);
- CreateObject(16120, -488.678162, 3396.004639, -3.466859, 0.0000, 0.0000, 146.2500);
- CreateObject(16120, -488.678162, 3441.554443, -3.466859, 0.0000, 0.0000, 146.2500);
- CreateObject(16118, -674.339966, 3183.838623, -1.908910, 0.0000, 0.0000, 146.2500);
- CreateObject(16120, -779.942139, 3186.924805, 0.741369, 0.0000, 0.0000, 11.2500);
- CreateObject(16133, -574.776245, 3178.629395, 0.738403, 0.0000, 0.0000, 11.2500);
- CreateObject(16133, -803.773804, 3233.090820, -6.051337, 0.0000, 0.0000, 258.7502);
- CreateObject(16122, -616.440002, 3399.976074, -8.404417, 0.0000, 0.0000, 123.7499);
- CreateObject(16121, -569.003235, 3361.662842, -2.567182, 0.0000, 0.0000, 123.7500);
- CreateObject(16120, -737.398193, 3402.584717, -1.158629, 0.0000, 0.0000, 281.2500);
- CreateObject(16116, -634.942078, 3227.709717, -12.321949, 0.0000, 0.0000, 67.5000);
- CreateObject(624, -656.244507, 3380.969971, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -611.109314, 3415.432617, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -622.844543, 3381.950684, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -639.877319, 3366.779297, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -658.606567, 3359.422363, 2.024508, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -686.638367, 3373.939453, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -719.886902, 3368.937744, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -724.662231, 3358.228516, 1.592750, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -763.882263, 3357.287109, 1.270759, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -610.731323, 3355.052979, 0.582931, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -565.993713, 3411.342285, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -532.105957, 3380.199219, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -544.955811, 3214.602051, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -537.063965, 3169.586426, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -557.059326, 3203.570557, 3.301078, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -541.008301, 3192.581055, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -566.987366, 3210.010254, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -591.586304, 3224.080322, 1.579860, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -603.072021, 3148.851074, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -606.927551, 3201.094482, 3.301085, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -655.830933, 3194.601807, 3.301078, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -670.122437, 3223.083984, 1.951312, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -710.446289, 3185.660400, 3.301084, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -684.919922, 3207.966797, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -722.090820, 3161.755615, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -659.379211, 3156.422852, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -799.878784, 3192.905029, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -808.099487, 3172.684814, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -755.796936, 3208.971436, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -722.527771, 3210.060791, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -786.049683, 3151.517822, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -785.066528, 3399.075684, 3.301078, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -744.246704, 3429.959717, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -788.032288, 3376.507813, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -687.522400, 3418.059814, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -636.264709, 3430.210205, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -684.513916, 3406.770996, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(710, -682.185913, 3389.654785, 19.523262, 0.0000, 0.0000, 0.0000);
- CreateObject(710, -728.104309, 3389.061768, 19.523262, 0.0000, 0.0000, 0.0000);
- CreateObject(710, -771.522400, 3372.383545, 19.523262, 0.0000, 0.0000, 0.0000);
- CreateObject(710, -768.170654, 3411.288330, 19.523262, 0.0000, 0.0000, 0.0000);
- CreateObject(710, -582.692810, 3371.866943, 19.198267, 0.0000, 0.0000, 0.0000);
- CreateObject(710, -502.867065, 3421.767090, 19.523262, 0.0000, 0.0000, 0.0000);
- CreateObject(710, -521.146362, 3391.812744, 19.523262, 0.0000, 0.0000, 0.0000);
- CreateObject(710, -593.809082, 3206.317139, 19.523262, 0.0000, 0.0000, 0.0000);
- CreateObject(710, -665.094299, 3177.718018, 19.523262, 0.0000, 0.0000, 0.0000);
- CreateObject(710, -638.986938, 3204.436279, 19.523262, 0.0000, 0.0000, 0.0000);
- CreateObject(710, -546.590576, 3168.375244, 19.523262, 0.0000, 0.0000, 0.0000);
- CreateObject(710, -784.423157, 3166.822754, 19.523262, 0.0000, 0.0000, 0.0000);
- CreateObject(710, -761.832275, 3200.790771, 19.523262, 0.0000, 0.0000, 0.0000);
- CreateObject(710, -727.535095, 3181.545654, 19.523262, 0.0000, 0.0000, 0.0000);
- CreateObject(710, -754.353333, 3147.335449, 19.523262, 0.0000, 0.0000, 0.0000);
- CreateObject(3406, -674.860901, 3348.172363, -1.310426, 0.0000, 0.0000, 270.0000);
- CreateObject(3406, -674.860901, 3339.377441, -1.310426, 0.0000, 0.0000, 270.0000);
- CreateObject(3406, -679.790710, 3334.518066, -1.310426, 0.0000, 0.0000, 180.0000);
- CreateObject(3406, -671.014954, 3334.518066, -1.310426, 0.0000, 0.0000, 180.0000);
- CreateObject(3406, -662.288269, 3334.518066, -1.310426, 0.0000, 0.0000, 180.0000);
- CreateObject(3406, -688.489929, 3334.518066, -1.310426, 0.0000, 0.0000, 180.0000);
- CreateObject(9958, -658.332458, 3329.911377, 4.736447, 0.0000, 0.0000, 270.0000);
- CreateObject(10230, -647.460327, 3079.044434, 7.021509, 0.0000, 0.0000, 0.0000);
- CreateObject(10140, -632.755615, 3077.973633, 7.143681, 0.0000, 0.0000, 0.0000);
- CreateObject(10227, -602.596558, 3078.821777, 11.974551, 0.0000, 0.0000, 0.0000);
- CreateObject(10226, -603.060181, 3079.779785, 6.027600, 0.0000, 0.0000, 0.0000);
- CreateObject(10229, -647.723206, 3077.683350, 5.783188, 0.0000, 0.0000, 0.0000);
- CreateObject(11495, -671.099243, 3103.544678, 0.524325, 0.0000, 0.0000, 0.0000);
- CreateObject(11495, -671.099243, 3125.549561, 0.524325, 0.0000, 0.0000, 0.0000);
- CreateObject(10231, -648.387451, 3077.508545, 8.364725, 0.0000, 0.0000, 0.0000);
- CreateObject(16774, -521.788635, 3430.393799, 5.430385, 0.0000, 0.0000, 0.0000);
- CreateObject(16690, -680.996704, 3410.311279, 8.147412, 0.0000, 0.0000, 270.0000);
- CreateObject(16689, -645.839966, 3413.197266, 6.803027, 0.0000, 0.0000, 360.0000);
- CreateObject(4847, -887.013123, 3305.191895, -5.329028, 0.0000, 0.0000, 270.0001);
- CreateObject(4847, -662.937317, 3504.581055, -5.329028, 0.0000, 0.0000, 180.0000);
- CreateObject(4847, -787.817078, 3305.191895, -5.254028, 0.0000, 0.0000, 90.0000);
- CreateObject(4847, -910.211853, 3305.191895, -5.329028, 0.0000, 0.0000, 270.0001);
- CreateObject(16685, -854.235474, 3323.655518, 4.116433, 0.0000, 0.0000, 270.0000);
- CreateObject(11490, -782.745300, 3428.181885, 3.932280, 0.0000, 0.0000, 270.0000);
- CreateObject(11491, -793.802551, 3428.176758, 5.360598, 0.0000, 0.0000, 270.0000);
- CreateObject(16327, -819.469055, 3365.402100, 3.901917, 0.0000, 0.0000, 0.0000);
- CreateObject(9241, -628.311279, 3163.140381, 5.295501, 0.0000, 0.0000, 90.0000);
- CreateObject(16098, -853.853516, 3156.826172, 8.925133, 0.0000, 0.0000, 269.9999);
- CreateObject(3279, -788.062500, 3208.982666, 3.712213, 0.0000, 0.0000, 56.2500);
- CreateObject(3279, -694.209290, 3365.390381, 3.787213, 0.0000, 0.0000, 90.0000);
- CreateObject(3406, -663.039001, 3348.172363, -1.310426, 0.0000, 0.0000, 270.0000);
- CreateObject(3406, -663.039001, 3339.382324, -1.310426, 0.0000, 0.0000, 270.0000);
- CreateObject(3406, -653.512024, 3334.518066, -1.310426, 0.0000, 0.0000, 180.0000);
- CreateObject(16093, -692.830994, 3395.412354, 7.917440, 0.0000, 0.0000, 0.0000);
- CreateObject(5005, -810.403748, 3375.661377, 5.938107, 0.0000, 0.0000, 90.0000);
- CreateObject(5005, -810.403748, 3253.894287, 5.938107, 0.0000, 0.0000, 270.0000);
- CreateObject(16118, -816.186829, 3138.941162, -1.158914, 0.0000, 0.0000, 157.5002);
- CreateObject(3450, -710.986084, 3380.175293, 5.832482, 0.0000, 0.0000, 11.2500);
- CreateObject(3450, -674.236084, 3389.923340, 5.832482, 0.0000, 0.0000, 270.0000);
- CreateObject(818, -666.402100, 3340.351074, 0.121347, 0.0000, 0.0000, 0.0000);
- CreateObject(818, -670.501221, 3342.351074, 0.121347, 0.0000, 0.0000, 0.0000);
- CreateObject(3364, -798.738098, 3213.391113, 3.742617, 0.0000, 0.0000, 11.2500);
- CreateObject(3625, -688.185364, 3143.452637, 6.771773, 0.0000, 0.0000, 180.0000);
- CreateObject(16134, -797.144287, 3388.985596, -1.176992, 0.0000, 0.0000, 135.0000);
- CreateObject(16638, -692.745422, 3394.441895, 6.144045, 0.0000, 0.0000, 0.0000);
- CreateObject(3279, -563.675171, 3391.358398, 3.737213, 0.0000, 0.0000, 191.2501);
- CreateObject(3279, -631.857971, 3213.531250, 3.762213, 0.0000, 0.0000, 270.0000);
- CreateObject(3279, -583.908447, 3169.365234, 3.637214, 0.0000, 0.0000, 236.2501);
- CreateObject(9245, -570.730469, 3139.291016, 15.581306, 0.0000, 0.0000, 270.0000);
- CreateObject(6295, -502.464203, 3378.534180, 27.168995, 0.0000, 0.0000, 33.7500);
- CreateObject(624, -605.647827, 3451.889404, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -678.034302, 3444.810059, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -683.129700, 3432.240234, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -589.251038, 3433.713623, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -577.684937, 3413.666504, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(624, -535.664185, 3435.131836, 3.301082, 0.0000, 0.0000, 0.0000);
- CreateObject(710, -537.122803, 3394.039063, 19.523262, 0.0000, 0.0000, 0.0000);
- CreateObject(710, -567.244263, 3454.691406, 19.523262, 0.0000, 0.0000, 0.0000);
- CreateObject(710, -659.486633, 3441.636719, 21.552471, 0.0000, 0.0000, 0.0000);
- CreateObject(710, -634.453247, 3456.528809, 19.152458, 0.0000, 0.0000, 0.0000);
- CreateObject(710, -740.664978, 3451.988281, 19.523266, 0.0000, 0.0000, 0.0000);
- southgate = CreateObject(980, -810.699341, 3165.052246, 6.709988, 0.0000, 0.0000, 270.0000); // gate south closed
- // CreateObject(980, -810.699341, 3175.733887, 6.709988, 0.0000, 0.0000, 270.0000); // gate south open
- northgate = CreateObject(980, -810.699341, 3464.542969, 6.709988, 0.0000, 0.0000, 270.0000); // gate north closed
- // CreateObject(980, -810.699341, 3453.656250, 6.709988, 0.0000, 0.0000, 270.0000); // gate north open
- // CREATE VEHICLES
- vehicle[0] = CreateVehicle(487,-628.4602,3164.6860,7.3014,181.3041,-1,-1, respawn); // maverick
- vehicle[1] = CreateVehicle(468,-578.5208,3138.7239,4.6058,24.5638,-1,-1, respawn); // sanchez
- vehicle[2] = CreateVehicle(468,-632.8090,3209.2627,4.6058,73.8310,-1,-1, respawn); // sanchez
- vehicle[3] = CreateVehicle(476,-870.8140,3158.8887,5.6472,359.6698,-1,-1, respawn); // rustler
- vehicle[4] = CreateVehicle(476,-836.5609,3161.1702,5.6900,3.2582,-1,-1, respawn); // rustler
- vehicle[5] = CreateVehicle(470,-794.2286,3439.2231,4.9290,75.9995,-1,-1, respawn); // patriot
- vehicle[6] = CreateVehicle(470,-692.0249,3389.0393,4.9320,114.3462,-1,-1, respawn); // patriot
- vehicle[7] = CreateVehicle(470,-766.3683,3206.5784,4.9305,46.9547,-1,-1, respawn); // patriot
- vehicle[8] = CreateVehicle(470,-707.7210,3134.9141,4.9322,259.4565,-1,-1, respawn); // patriot
- vehicle[9] = CreateVehicle(470,-701.7493,3143.0891,4.9298,222.2624,-1,-1, respawn); // patriot
- vehicle[10] = CreateVehicle(433,-676.8920,3146.2173,5.3737,255.4659,-1,-1, respawn); // barracks
- vehicle[11] = CreateVehicle(452,-683.3962,3238.6382,-0.7003,93.9248,-1,-1, respawn); // speeder
- vehicle[12] = CreateVehicle(452,-548.5395,3335.7002,0.0406,266.9805,-1,-1, respawn); // speeder
- vehicle[13] = CreateVehicle(452,-674.6299,3098.3391,-0.4166,1.3261,-1,-1, respawn); // speeder
- print("*** Init Complete");
- return 1;
- }
- public OnFilterScriptExit()
- {
- new idx;
- while(IsValidObject(idx))
- {
- DestroyObject(idx);
- idx++;
- }
- idx = 0;
- while(idx < sizeof(vehicle))
- {
- DestroyVehicle(vehicle[idx]);
- idx++;
- }
- idx = 0;
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- dcmd(gate, 4, cmdtext);
- dcmd(island, 6, cmdtext);
- return 0;
- }
- dcmd_island(playerid, params[])
- {
- #pragma unused params
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid, -687.8810,3083.8823,8.3106);
- SetPlayerFacingAngle(playerid, 0.0);
- SendClientMessage(playerid, COLOR_BLUE, "* You have teleported to the island!");
- return 1;
- }
- dcmd_gate(playerid, params[])
- {
- if(!strlen(params))
- {
- SendClientMessage(playerid, COLOR_RED, "* USAGE: /gate [north|south] [open|close]");
- return 1;
- }
- new northsouth[64], openclose[64];
- if(sscanf(params, "ss", northsouth, openclose))
- {
- SendClientMessage(playerid, COLOR_RED, "* USAGE: /gate [north|south] [open|close]");
- return 1;
- }
- if(!strcmp(northsouth, "north", true))
- {
- if(!strcmp(openclose, "open", true))
- {
- MoveObject(northgate, -810.699341, 3453.656250, 6.709988, 1.2);
- SendClientMessage(playerid, COLOR_BLUE, "* Opening northern gate ..");
- return 1;
- }
- else if(!strcmp(openclose, "close", true))
- {
- MoveObject(northgate, -810.699341, 3464.542969, 6.709988, 1.2);
- SendClientMessage(playerid, COLOR_BLUE, "* Closing northern gate ..");
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "* USAGE: /gate [north|south] [open|close]");
- return 1;
- }
- }
- else if(!strcmp(northsouth, "south", true))
- {
- if(!strcmp(openclose, "open", true))
- {
- MoveObject(southgate, -810.699341, 3175.733887, 6.709988, 1.2);
- SendClientMessage(playerid, COLOR_BLUE, "* Opening southern gate ..");
- return 1;
- }
- else if(!strcmp(openclose, "close", true))
- {
- MoveObject(southgate, -810.699341, 3165.052246, 6.709988, 1.2);
- SendClientMessage(playerid, COLOR_BLUE, "* Closing southern gate ..");
- return 1;
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "* USAGE: /gate [north|south] [open|close]");
- return 1;
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "* USAGE: /gate [north|south] [open|close]");
- return 1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement