Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_RED 0xAA3333AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_BLUE 0x0000BBAA
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- #define COLOR_ORANGE 0xFF9900AA
- #define COLOR_RED 0xAA3333AA
- #define COLOR_LIME 0x10F441AA
- new God[MAX_PLAYERS] = 0;
- new VGod[MAX_PLAYERS] = 0;
- new pMoney[MAX_PLAYERS];
- new component;
- new bar1;
- new bar2;
- new a511;
- new a512;
- main()
- {
- }
- public OnGameModeInit()
- {
- DisableInteriorEnterExits();
- print("#-----------------#");
- print("#-Frosty-Gamemode-#");
- print("#----Made-by------#");
- print("#----kanersps-----#");
- //start
- SetGameModeText("Frosty FreeRoam");
- //map
- AddStaticVehicleEx(506,2509.10009766,-1665.09997559,13.19999981,8.00000000,76,117,15); //Super GT
- AddStaticVehicleEx(506,2508.10009766,-1677.09997559,13.30000019,332.00000000,76,117,15); //Super GT
- AddStaticVehicleEx(506,2499.39990234,-1683.09997559,13.19999981,276.00000000,76,117,15); //Super GT
- AddStaticVehicleEx(506,2491.69995117,-1683.09997559,13.10000038,266.00000000,76,117,15); //Super GT
- AddStaticVehicleEx(506,2483.60009766,-1683.09997559,13.10000038,264.00000000,76,117,15); //Super GT
- AddStaticVehicleEx(506,2468.69995117,-1671.00000000,13.30000019,0.00000000,76,117,15); //Super GT
- AddStaticVehicleEx(477,2005.19995117,-2550.60009766,13.39999962,244.00000000,212,200,15); //ZR-350
- AddStaticVehicleEx(477,2006.30004883,-2543.30004883,13.39999962,243.99536133,135,-1,15); //ZR-350
- AddStaticVehicleEx(411,2010.40002441,-2553.50000000,13.19999981,242.00000000,252,255,15); //Infernus
- AddStaticVehicleEx(560,2013.50000000,-2546.39990234,13.39999962,244.00000000,175,-1,15); //Sultan
- AddStaticVehicleEx(566,1717.40002441,-2545.89990234,13.39999962,268.00000000,77,98,15); //Tahoma
- AddStaticVehicleEx(566,1784.59997559,-2535.69995117,13.39999962,0.00000000,77,50,15); //Tahoma
- CreateObject(2912,2484.60009766,-1689.09997559,12.50000000,0.00000000,0.00000000,0.00000000); //object(temp_crate1) (1)
- CreateObject(2912,2484.60009766,-1689.09997559,13.19999981,0.00000000,0.00000000,0.00000000); //object(temp_crate1) (2)
- CreateObject(2912,2483.89990234,-1689.09997559,12.50000000,0.00000000,0.00000000,0.00000000); //object(temp_crate1) (3)
- CreateObject(2912,2484.10009766,-1689.19995117,13.19999981,0.00000000,0.00000000,0.00000000); //object(temp_crate1) (4)
- CreateObject(2912,2482.50000000,-1689.09997559,12.50000000,0.00000000,0.00000000,0.00000000); //object(temp_crate1) (5)
- CreateObject(2912,2480.50000000,-1689.00000000,13.19999981,0.00000000,0.00000000,0.00000000); //object(temp_crate1) (6)
- CreateObject(2912,2481.10009766,-1689.09997559,12.50000000,0.00000000,0.00000000,0.00000000); //object(temp_crate1) (7)
- CreateObject(2912,2480.50000000,-1689.00000000,12.50000000,0.00000000,0.00000000,0.00000000); //object(temp_crate1) (8)
- CreateObject(2912,2481.80004883,-1689.09997559,12.50000000,0.00000000,0.00000000,0.00000000); //object(temp_crate1) (9)
- CreateObject(2912,2483.19995117,-1689.09997559,12.50000000,0.00000000,0.00000000,0.00000000); //object(temp_crate1) (10)
- CreateObject(17699,1990.00000000,-2547.19995117,17.20000076,0.00000000,0.00000000,0.00000000); //object(mcstraps_lae2) (1)
- CreateObject(4553,1802.80004883,-2537.89990234,15.69999981,0.00000000,354.00000000,0.00000000); //object(road12_lan2) (1)
- CreateObject(4553,1855.30004883,-2539.00000000,26.10000038,0.00000000,349.99597168,0.00000000); //object(road12_lan2) (2)
- CreateObject(4553,1929.30004883,-2543.80004883,39.40000153,0.00000000,357.99243164,270.00000000); //object(road12_lan2) (3)
- AddStaticVehicleEx(535,2271.10009766,-1645.90002441,15.19999981,0.00000000,98,68,15); //Slamvan
- AddStaticVehicleEx(445,2235.60009766,-1639.50000000,15.50000000,340.00000000,95,10,15); //Admiral
- AddStaticVehicleEx(509,2309.30004883,-1677.40002441,13.60000038,0.00000000,96,26,15); //Bike
- AddStaticVehicleEx(545,2502.50000000,-1752.30004883,13.39999962,0.00000000,109,122,15); //Hustler
- AddStaticVehicleEx(545,2319.39990234,-1718.40002441,13.50000000,0.00000000,109,122,15); //Hustler
- AddStaticVehicleEx(401,2499.10009766,-1753.50000000,13.30000019,0.00000000,96,26,15); //Bravura
- AddStaticVehicleEx(559,2496.00000000,-1752.90002441,13.19999981,0.00000000,105,30,15); //Jester
- AddStaticVehicleEx(533,2657.50000000,-1691.69995117,9.10000038,270.00000000,30,46,15); //Feltzer
- AddStaticVehicleEx(518,2308.30004883,-1671.90002441,14.00000000,0.00000000,94,112,15); //Buccaneer
- AddStaticVehicleEx(575,2014.90002441,-1648.80004883,13.30000019,270.00000000,93,126,15); //Broadway
- AddStaticVehicleEx(470,2597.60009766,-1292.19995117,81.69999695,0.00000000,95,10,15); //Patriot
- CreateObject(1459,2347.39990234,-1574.69995117,23.39999962,0.00000000,0.00000000,0.00000000); //object(dyn_roadbarrier_6) (1)
- CreateObject(1459,2344.69995117,-1574.59997559,23.39999962,0.00000000,0.00000000,0.00000000); //object(dyn_roadbarrier_6) (2)
- CreateObject(1459,2342.00000000,-1574.50000000,23.39999962,0.00000000,0.00000000,0.00000000); //object(dyn_roadbarrier_6) (3)
- CreateObject(1459,2339.10009766,-1574.40002441,23.39999962,0.00000000,0.00000000,0.00000000); //object(dyn_roadbarrier_6) (4)
- CreateObject(1459,2346.39990234,-1632.50000000,16.10000038,0.00000000,0.00000000,0.00000000); //object(dyn_roadbarrier_6) (5)
- CreateObject(1459,2343.69995117,-1632.40002441,16.10000038,0.00000000,0.00000000,0.00000000); //object(dyn_roadbarrier_6) (6)
- CreateObject(1459,2341.00000000,-1632.40002441,16.10000038,0.00000000,0.00000000,0.00000000); //object(dyn_roadbarrier_6) (7)
- CreateObject(1459,2338.39990234,-1632.30004883,16.10000038,0.00000000,0.00000000,0.00000000); //object(dyn_roadbarrier_6) (8)
- CreateObject(3578,2342.80004883,-1638.30004883,15.10000038,0.00000000,0.00000000,0.00000000); //object(dockbarr1_la) (1)
- CreateObject(3578,2342.50000000,-1573.19995117,23.60000038,0.00000000,0.00000000,0.00000000); //object(dockbarr1_la) (2)
- CreateObject(4517,1974.69995117,-1240.90002441,26.10000038,0.00000000,0.00000000,184.00000000); //object(cn2_roadblock04ld) (1)
- CreateObject(1257,2077.60009766,-1320.59997559,24.29999924,0.00000000,0.00000000,0.00000000); //object(bustopm) (1)
- CreateObject(1257,2342.50000000,-1148.50000000,27.50000000,0.00000000,0.00000000,92.00000000); //object(bustopm) (2)
- CreateObject(1216,2278.50000000,-1309.00000000,82.09999847,0.00000000,0.00000000,0.00000000); //object(phonebooth1) (1)
- CreateObject(1216,2261.50000000,-1271.30004883,23.70000076,0.00000000,0.00000000,86.00000000); //object(phonebooth1) (2)
- CreateObject(1287,2157.00000000,-1346.19995117,23.60000038,0.00000000,0.00000000,272.00000000); //object(newstandnew3) (1)
- CreateObject(1776,2043.50000000,-1410.50000000,17.29999924,0.00000000,0.00000000,272.00000000); //object(cj_candyvendor) (1)
- CreateObject(3092,2044.50000000,-1717.59997559,13.50000000,0.00000000,88.00000000,0.00000000); //object(dead_tied_cop) (1)
- CreateObject(3928,1868.59997559,-1643.80004883,30.79999924,0.00000000,0.00000000,0.00000000); //object(helipad) (1)
- CreateObject(4874,1153.19995117,-1802.40002441,36.50000000,0.00000000,0.00000000,0.00000000); //object(helipad1_las) (1)
- CreateObject(18250,2597.00000000,-1281.50000000,86.50000000,0.00000000,0.00000000,0.00000000); //object(cuntwjunk06) (1)
- CreateObject(3934,2617.32714844,-1309.85644531,79.96509552,0.00000000,0.00000000,0.00000000); //object(helipad01) (1)
- CreateObject(3785,2583.60009766,-1267.69995117,83.50000000,0.00000000,0.00000000,0.00000000); //object(bulkheadlight) (1)
- CreateObject(18250,2597.00000000,-1281.50000000,86.50000000,0.00000000,0.00000000,0.00000000); //object(cuntwjunk06) (2)
- CreateObject(18250,2597.00000000,-1281.50000000,86.50000000,0.00000000,0.00000000,0.00000000); //object(cuntwjunk06) (3)
- //admin barrier
- bar1 = CreateObject(988,2720.69995117,-2402.60009766,12.50000000,0.00000000,0.00000000,268.00000000); //object(ws_apgate) (1)
- bar2 = CreateObject(988,2720.50000000,-2408.00000000,12.50000000,0.00000000,0.00000000,267.99499512); //object(ws_apgate) (2)
- //admin base
- AddStaticVehicleEx(522,2775.89990234,-2432.80004883,13.30000019,0.00000000,48,79,15); //NRG-500
- AddStaticVehicleEx(522,2777.50000000,-2432.69995117,13.30000019,0.00000000,48,79,15); //NRG-500
- AddStaticVehicleEx(522,2774.39990234,-2432.80004883,13.30000019,0.00000000,48,79,15); //NRG-500
- AddStaticVehicleEx(522,2782.00000000,-2432.50000000,13.30000019,0.00000000,48,79,15); //NRG-500
- AddStaticVehicleEx(522,2780.39990234,-2432.50000000,13.30000019,0.00000000,48,79,15); //NRG-500
- AddStaticVehicleEx(522,2779.00000000,-2432.69995117,13.30000019,0.00000000,48,79,15); //NRG-500
- AddStaticVehicleEx(533,2769.00000000,-2510.69995117,13.39999962,90.00000000,14,49,15); //Feltzer
- AddStaticVehicleEx(533,2769.00000000,-2513.50000000,13.39999962,89.99993896,14,49,15); //Feltzer
- AddStaticVehicleEx(533,2768.80004883,-2507.69995117,13.39999962,90.00000000,14,49,15); //Feltzer
- AddStaticVehicleEx(429,2745.10009766,-2473.50000000,13.39999962,270.00000000,93,126,15); //Banshee
- AddStaticVehicleEx(429,2744.80004883,-2462.69995117,13.39999962,270.00000000,93,126,15); //Banshee
- AddStaticVehicleEx(429,2744.80004883,-2466.10009766,13.39999962,270.00000000,93,126,15); //Banshee
- AddStaticVehicleEx(429,2744.60009766,-2459.19995117,13.39999962,270.00000000,93,126,15); //Banshee
- AddStaticVehicleEx(429,2745.00000000,-2469.50000000,13.39999962,270.00000000,93,126,15); //Banshee
- AddStaticVehicleEx(477,2758.60009766,-2374.19995117,13.50000000,182.00000000,76,-1,15); //ZR-350
- CreateObject(989,2719.69995117,-2490.10009766,14.50000000,0.00000000,0.00000000,195.99993896); //object(ac_apgate) (1)
- CreateObject(989,2719.60009766,-2495.60009766,14.50000000,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (2)
- CreateObject(989,2719.69995117,-2501.00000000,14.30000019,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (3)
- CreateObject(989,2719.60009766,-2506.39990234,14.30000019,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (4)
- CreateObject(989,2710.69995117,-2510.50000000,14.50000000,0.00000000,0.00000000,105.99603271); //object(ac_apgate) (5)
- CreateObject(989,2719.39990234,-2511.69995117,14.50000000,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (6)
- CreateObject(989,2707.89941406,-2513.29980469,14.50000000,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (7)
- CreateObject(989,2708.00000000,-2514.00000000,17.89999962,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (8)
- CreateObject(989,2707.80004883,-2516.39990234,18.20000076,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (9)
- CreateObject(989,2719.69995117,-2392.19995117,14.50000000,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (11)
- CreateObject(989,2719.69995117,-2397.60009766,14.50000000,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (12)
- CreateObject(989,2719.60009766,-2412.19995117,14.50000000,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (13)
- CreateObject(989,2719.69995117,-2415.39990234,14.50000000,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (14)
- CreateObject(989,2719.50000000,-2398.69995117,14.50000000,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (15)
- CreateObject(989,2719.89990234,-2386.69995117,14.50000000,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (16)
- CreateObject(989,2720.10009766,-2385.19995117,17.10000038,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (17)
- CreateObject(989,2719.89990234,-2381.10009766,18.20000076,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (18)
- CreateObject(2644,2788.00000000,-2463.80004883,13.00000000,0.00000000,0.00000000,0.00000000); //object(cj_burg_table) (1)
- CreateObject(2644,2778.89990234,-2463.30004883,13.00000000,0.00000000,0.00000000,0.00000000); //object(cj_burg_table) (2)
- CreateObject(2644,2779.39990234,-2448.89990234,13.00000000,0.00000000,0.00000000,0.00000000); //object(cj_burg_table) (3)
- CreateObject(2644,2788.10009766,-2448.89990234,13.00000000,0.00000000,0.00000000,0.00000000); //object(cj_burg_table) (4)
- CreateObject(2644,2796.00000000,-2462.89990234,13.00000000,0.00000000,0.00000000,0.00000000); //object(cj_burg_table) (5)
- CreateObject(1739,2797.10009766,-2462.89990234,13.50000000,0.00000000,0.00000000,0.00000000); //object(swank_din_chair_5) (1)
- CreateObject(1739,2789.19995117,-2448.69995117,13.50000000,0.00000000,0.00000000,0.00000000); //object(swank_din_chair_5) (2)
- CreateObject(1739,2789.00000000,-2463.89990234,13.50000000,0.00000000,0.00000000,0.00000000); //object(swank_din_chair_5) (3)
- CreateObject(1739,2779.80004883,-2463.19995117,13.50000000,0.00000000,0.00000000,0.00000000); //object(swank_din_chair_5) (4)
- CreateObject(1739,2777.89990234,-2463.19995117,13.50000000,0.00000000,0.00000000,178.00000000); //object(swank_din_chair_5) (5)
- CreateObject(1739,2795.00000000,-2463.00000000,13.50000000,0.00000000,0.00000000,177.99499512); //object(swank_din_chair_5) (6)
- CreateObject(1739,2778.39990234,-2448.80004883,13.50000000,0.00000000,0.00000000,177.99499512); //object(swank_din_chair_5) (7)
- CreateObject(1739,2787.10009766,-2448.89990234,13.50000000,0.00000000,0.00000000,177.99499512); //object(swank_din_chair_5) (8)
- CreateObject(1739,2787.10009766,-2463.89990234,13.50000000,0.00000000,0.00000000,177.99499512); //object(swank_din_chair_5) (9)
- CreateObject(1739,2780.39990234,-2448.80004883,13.50000000,0.00000000,0.00000000,0.00000000); //object(swank_din_chair_5) (10)
- CreateObject(3515,2785.00000000,-2456.50000000,14.60000038,0.00000000,0.00000000,0.00000000); //object(vgsfountain) (1)
- //big jump 1
- AddStaticVehicleEx(480,2592.60009766,-2108.80004883,86.30000305,0.00000000,154,167,15); //Comet
- AddStaticVehicleEx(480,2585.50000000,-2109.80004883,86.19999695,0.00000000,154,167,15); //Comet
- AddStaticVehicleEx(480,2589.39990234,-2109.39990234,86.30000305,0.00000000,154,167,15); //Comet
- AddStaticVehicleEx(480,2573.80004883,-2109.50000000,86.09999847,0.00000000,154,167,15); //Comet
- AddStaticVehicleEx(480,2582.00000000,-2109.50000000,86.19999695,0.00000000,154,167,15); //Comet
- AddStaticVehicleEx(480,2578.39990234,-2109.00000000,86.30000305,0.00000000,154,167,15); //Comet
- CreateObject(4553,2584.60009766,-2044.30004883,49.00000000,0.00000000,326.00000000,270.00000000); //object(road12_lan2) (1)
- CreateObject(8588,2591.10009766,-2106.39990234,85.30000305,0.00000000,0.00000000,0.00000000); //object(vgsrailroad15) (1)
- CreateObject(8588,2489.80004883,-2092.69995117,92.80000305,0.00000000,0.00000000,0.00000000); //object(vgsrailroad15) (2)
- CreateObject(8588,2500.60009766,-2111.19995117,73.00000000,0.00000000,0.00000000,0.00000000); //object(vgsrailroad15) (3)
- CreateObject(4553,2585.19995117,-1966.69995117,6.00000000,0.00000000,24.00000000,89.99441528); //object(road12_lan2) (2)
- CreateObject(4553,2585.39990234,-2011.09997559,6.80000019,0.00000000,25.99993896,271.99401855); //object(road12_lan2) (3)
- CreateObject(8588,2659.10009766,-2131.60009766,69.50000000,0.00000000,358.00000000,358.00000000); //object(vgsrailroad15) (4)
- CreateObject(8588,2577.00000000,-2106.89990234,85.19999695,0.00000000,0.00000000,0.00000000); //object(vgsrailroad15) (7)
- CreateObject(8588,2580.30004883,-2106.50000000,85.30000305,0.00000000,0.00000000,0.00000000); //object(vgsrailroad15) (8)
- //Area51 gate
- a511 = CreateObject(989,211.19999695,1875.09997559,14.00000000,0.00000000,0.00000000,107.99996948); //object(ac_apgate) (1)
- a512 = CreateObject(989,216.69999695,1875.19995117,14.00000000,0.00000000,0.00000000,107.99560547); //object(ac_apgate) (2)
- return 1;
- }
- public OnGameModeExit()
- {
- print("#-----------------#");
- print("#-Frosty-Gamemode-#");
- print("#----Made-by------#");
- print("#----kanersps-----#");
- }
- public OnPlayerConnect(playerid)
- {
- SendClientMessageToAll(COLOR_GREEN, "%A player joined the server");
- SendClientMessage(playerid, COLOR_GREEN, "Welcome to the server");
- SendClientMessage(playerid, COLOR_GREEN, "Type /help for a list of commands");
- pMoney[playerid] = 0;
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- VGod[playerid] = 0;
- pMoney[playerid] = 0;
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- if(God[playerid] == 1)
- {
- God[playerid] = 0;
- return 1;
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- if(IsPlayerAdmin(playerid))
- {
- new
- world = GetPlayerVirtualWorld(playerid),
- interior = GetPlayerInterior(playerid),
- Float:x, Float:y, Float:z, Float:angle;
- GetPlayerPos(clickedplayerid, x, y, z);
- GetPlayerFacingAngle(clickedplayerid, angle);
- if(IsPlayerInAnyVehicle(playerid))
- {
- new carid = GetPlayerVehicleID(playerid);
- SetVehiclePos(carid,x, y, z+0.2);
- SetVehicleZAngle(carid, angle);
- }
- else
- {
- SetPlayerPos(playerid, x, y, z+0.2);
- SetPlayerFacingAngle(playerid, angle);
- }
- SetPlayerVirtualWorld(playerid, world);
- SetPlayerInterior(playerid, interior);
- SetCameraBehindPlayer(playerid);
- }
- return 1;
- }
- public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
- {
- if(IsPlayerAdmin(playerid))
- {
- if(GetPlayerState(playerid) == 2)
- {
- new carid;
- carid=GetPlayerVehicleID(playerid);
- SetVehiclePos(carid,fX, fY, fZ+9);
- }
- else SetPlayerPosFindZ(playerid, fX, fY, fZ+9);
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- new cardriver;
- cardriver = GetPlayerVehicleID(playerid);
- if(dialogid == 1)
- {
- if(response)
- {
- if(listitem == 0)
- {
- ChangeVehicleColor(cardriver, 1, 1);
- return 1;
- }
- if(listitem == 1)
- {
- ChangeVehicleColor(cardriver, 0, 0);
- return 1;
- }
- if(listitem == 2)
- {
- ChangeVehicleColor(cardriver, 31, 31);
- return 1;
- }
- if(listitem == 3)
- {
- ChangeVehicleColor(cardriver, 151, 151);
- return 1;
- }
- if(listitem == 4)
- {
- ChangeVehicleColor(cardriver, 6, 6);
- return 1;
- }
- if(listitem == 5)
- {
- ChangeVehicleColor(cardriver, 79, 79);
- return 1;
- }
- }
- }
- if(dialogid == 2)
- {
- if(response)
- {
- if(listitem == 0)
- {
- new Float:x, Float:y, Float:z, Float:a;
- GetPlayerPos(playerid, x,y,z);
- GetPlayerFacingAngle(playerid, a);
- new vehicleid = CreateVehicle(411, x+3,y,z, a, -1, -1, -1);
- PutPlayerInVehicle(playerid, vehicleid, 0);
- return 1;
- }
- if(listitem == 1)
- {
- new Float:x, Float:y, Float:z, Float:a;
- GetPlayerPos(playerid, x,y,z);
- GetPlayerFacingAngle(playerid, a);
- new vehicleid = CreateVehicle(480, x+3,y,z, a, -1, -1, -1);
- PutPlayerInVehicle(playerid, vehicleid, 0);
- return 1;
- }
- if(listitem == 2)
- {
- new Float:x, Float:y, Float:z, Float:a;
- GetPlayerPos(playerid, x,y,z);
- GetPlayerFacingAngle(playerid, a);
- new vehicleid = CreateVehicle(402, x+3,y,z, a, -1, -1, -1);
- PutPlayerInVehicle(playerid, vehicleid, 0);
- return 1;
- }
- if(listitem == 3)
- {
- new Float:x, Float:y, Float:z, Float:a;
- GetPlayerPos(playerid, x,y,z);
- GetPlayerFacingAngle(playerid, a);
- new vehicleid = CreateVehicle(415, x+3,y,z, a, -1, -1, -1);
- PutPlayerInVehicle(playerid, vehicleid, 0);
- return 1;
- }
- if(listitem == 4)
- {
- new Float:x, Float:y, Float:z, Float:a;
- GetPlayerPos(playerid, x,y,z);
- GetPlayerFacingAngle(playerid, a);
- new vehicleid = CreateVehicle(430, x+3,y,z, a, -1, -1, -1);
- PutPlayerInVehicle(playerid, vehicleid, 0);
- return 1;
- }
- if(listitem == 5)
- {
- new Float:x, Float:y, Float:z, Float:a;
- GetPlayerPos(playerid, x,y,z);
- GetPlayerFacingAngle(playerid, a);
- new vehicleid = CreateVehicle(447, x+3,y,z, a, -1, -1, -1);
- PutPlayerInVehicle(playerid, vehicleid, 0);
- return 1;
- }
- if(listitem == 6)
- {
- new Float:x, Float:y, Float:z, Float:a;
- GetPlayerPos(playerid, x,y,z);
- GetPlayerFacingAngle(playerid, a);
- new vehicleid = CreateVehicle(451, x+3,y,z, a, -1, -1, -1);
- PutPlayerInVehicle(playerid, vehicleid, 0);
- return 1;
- }
- if(listitem == 7)
- {
- new Float:x, Float:y, Float:z, Float:a;
- GetPlayerPos(playerid, x,y,z);
- GetPlayerFacingAngle(playerid, a);
- new vehicleid = CreateVehicle(400, x+3,y,z, a, -1, -1, -1);
- PutPlayerInVehicle(playerid, vehicleid, 0);
- return 1;
- }
- if(listitem == 8)
- {
- new Float:x, Float:y, Float:z, Float:a;
- GetPlayerPos(playerid, x,y,z);
- GetPlayerFacingAngle(playerid, a);
- new vehicleid = CreateVehicle(461, x+3,y,z, a, -1, -1, -1);
- PutPlayerInVehicle(playerid, vehicleid, 0);
- return 1;
- }
- if(listitem == 9)
- {
- new Float:x, Float:y, Float:z, Float:a;
- GetPlayerPos(playerid, x,y,z);
- GetPlayerFacingAngle(playerid, a);
- new vehicleid = CreateVehicle(522, x+3,y,z, a, -1, -1, -1);
- PutPlayerInVehicle(playerid, vehicleid, 0);
- return 1;
- }
- if(listitem == 10)
- {
- new Float:x, Float:y, Float:z, Float:a;
- GetPlayerPos(playerid, x,y,z);
- GetPlayerFacingAngle(playerid, a);
- new vehicleid = CreateVehicle(535, x+3,y,z, a, -1, -1, -1);
- PutPlayerInVehicle(playerid, vehicleid, 0);
- return 1;
- }
- if(listitem == 11)
- {
- new Float:x, Float:y, Float:z, Float:a;
- GetPlayerPos(playerid, x,y,z);
- GetPlayerFacingAngle(playerid, a);
- new vehicleid = CreateVehicle(560, x+3,y,z, a, -1, -1, -1);
- PutPlayerInVehicle(playerid, vehicleid, 0);
- return 1;
- }
- if(listitem == 13)
- {
- if(!IsPlayerAdmin(playerid))
- {
- SendClientMessage(playerid, COLOR_RED, "Your not allowed to use this command!");
- }
- if(IsPlayerAdmin(playerid))
- {
- new Float:x, Float:y, Float:z, Float:a;
- GetPlayerPos(playerid, x,y,z);
- GetPlayerFacingAngle(playerid, a);
- new vehicleid = CreateVehicle(520, x+3,y,z, a, -1, -1, -1);
- PutPlayerInVehicle(playerid, vehicleid, 0);
- }
- return 1;
- }
- if(listitem == 14)
- {
- if(!IsPlayerAdmin(playerid))
- {
- SendClientMessage(playerid, COLOR_RED, "Your not allowed to use this command!");
- }
- if(IsPlayerAdmin(playerid))
- {
- new Float:x, Float:y, Float:z, Float:a;
- GetPlayerPos(playerid, x,y,z);
- GetPlayerFacingAngle(playerid, a);
- new vehicleid = CreateVehicle(432, x+3,y,z, a, -1, -1, -1);
- PutPlayerInVehicle(playerid, vehicleid, 0);
- }
- return 1;
- }
- }
- }
- if(dialogid == 3)
- {
- if(response)
- {
- if(listitem == 0)
- {
- SetPlayerPos(playerid,2191.8586,1677.7673,12.1887);
- return 1;
- }
- if(listitem == 1)
- {
- SetPlayerPos(playerid,-1981.7010,137.7410,27);
- return 1;
- }
- if(listitem == 2)
- {
- SetPlayerPos(playerid,2496.7319,-1667.7465,13.3438);
- return 1;
- }
- if(listitem == 3)
- {
- SetPlayerPos(playerid,99.8408,1920.3246,18.2519);
- return 1;
- }
- if(listitem == 4)
- {
- SetPlayerPos(playerid,2585.2725,-2104.1152,86.3317);
- return 1;
- }
- if(listitem == 5)
- {
- SetPlayerPos(playerid,1997.9998,-2546.2817,14.3172);
- return 1;
- }
- if(listitem == 6)
- {
- SetPlayerPos(playerid,1347.9437,1258.6233,10.8203);
- return 1;
- }
- }
- }
- if(dialogid == 4)
- {
- if(response)
- {
- if(!IsPlayerAdmin(playerid))
- {
- SendClientMessage(playerid, COLOR_RED, "You are not allowed to use this command!");
- }
- if(IsPlayerAdmin(playerid))
- {
- if(listitem == 0)
- {
- GivePlayerWeapon(playerid, 23, 9999999999);
- return 1;
- }
- if(listitem == 1)
- {
- GivePlayerWeapon(playerid, 24, 9999999999);
- return 1;
- }
- if(listitem == 2)
- {
- GivePlayerWeapon(playerid, 25, 9999999999);
- return 1;
- }
- if(listitem == 3)
- {
- GivePlayerWeapon(playerid, 26, 9999999999);
- return 1;
- }
- if(listitem == 4)
- {
- GivePlayerWeapon(playerid, 27, 9999999999);
- return 1;
- }
- if(listitem == 5)
- {
- GivePlayerWeapon(playerid, 28, 9999999999);
- return 1;
- }
- if(listitem == 6)
- {
- GivePlayerWeapon(playerid, 29, 9999999999);
- return 1;
- }
- if(listitem == 7)
- {
- GivePlayerWeapon(playerid, 30, 9999999999);
- return 1;
- }
- if(listitem == 8)
- {
- GivePlayerWeapon(playerid, 31, 9999999999);
- return 1;
- }
- if(listitem == 9)
- {
- GivePlayerWeapon(playerid, 32, 9999999999);
- return 1;
- }
- if(listitem == 10)
- {
- GivePlayerWeapon(playerid, 33, 9999999999);
- return 1;
- }
- if(listitem == 11)
- {
- GivePlayerWeapon(playerid, 34, 9999999999);
- return 1;
- }
- if(listitem == 12)
- {
- GivePlayerWeapon(playerid, 35, 9999999999);
- return 1;
- }
- if(listitem == 13)
- {
- GivePlayerWeapon(playerid, 36, 9999999999);
- return 1;
- }
- if(listitem == 14)
- {
- GivePlayerWeapon(playerid, 37, 9999999999);
- return 1;
- }
- }
- }
- }
- return 1;
- }
- new gate51 = 0;
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if(strcmp(cmdtext, "/aweapons", true, 10) == 0)
- {
- ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Weapons:", "Silenced 9mm \n Desert Eagle \n Shotgun \n Sawnoffshotgun \n Combat shotgun \n Micro Uzi \n MP5 \n AK-47 \n M4 \n TEC-9 \n Country Riffle \n Sniper Rifle \n RPG \n HS-ROCKET \n Flamethrower", "Select", "Cancel");
- return 1;
- }
- if(!strcmp(cmdtext, "/dveh", true)) return DestroyVehicle(GetPlayerVehicleID(playerid));
- if(strcmp("/51g", cmdtext, true, 10) == 0)
- {
- if (gate51 == 0)
- {
- gate51 = 1;
- MoveObject(a511,206.39999390,1875.59997559,14.00000000,1.50000000);
- MoveObject(a512,221.30000305,1875.59997559,14.00000000,1.50000000);
- }
- if (gate51 == 1)
- {
- gate51 = 0;
- MoveObject(a511,211.19999695,1875.09997559,14.00000000,1.50000000);
- MoveObject(a512,216.69999695,1875.19995117,14.00000000,1.50000000);
- return 1;
- }
- return 1;
- }
- if(strcmp("/god", cmdtext, true, 10) == 0)
- {
- if(!IsPlayerAdmin(playerid))
- {
- SendClientMessage(playerid, COLOR_RED, "You are not allowed to use this command!");
- return 1;
- }
- if (IsPlayerAdmin(playerid))
- {
- if (God[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_RED, "Godmode has been disabled!");
- SetPlayerArmour(playerid, 100);
- SetPlayerHealth(playerid, 100);
- VGod[playerid] = 0;
- God[playerid] = 0;
- ResetPlayerWeapons(playerid);
- return 1;
- }
- if (God[playerid] == 0)
- {
- SendClientMessage(playerid, COLOR_GREEN, "Godmode has been activated!");
- SetPlayerArmour(playerid, 99999999);
- SetPlayerHealth(playerid, 99999999);
- GivePlayerWeapon(playerid, 38, 10500);
- GivePlayerWeapon(playerid, 16, 10500);
- VGod[playerid] = 1;
- God[playerid] = 1;
- return 1;
- }
- }
- return 1;
- }
- if(strcmp(cmdtext, "/teles", true) == 0)
- {
- ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Teleport List", "Las Venturas \n San Fierro \n Los Santos(Grove) \n Area51 \n Big Jump 1 \n Los Santos Airport \n Las Venturas Airport", "Select", "Cancel");
- return 1;
- }
- if(strcmp(cmdtext, "/flip", true) == 0)
- {
- new currentveh;
- new Float:angle;
- currentveh = GetPlayerVehicleID(playerid);
- GetVehicleZAngle(currentveh, angle);
- SetVehicleZAngle(currentveh, angle);
- SendClientMessage(playerid, COLOR_GREEN, "Your vehicle has been flipped.");
- return 1;
- }
- if(strcmp(cmdtext, "/colorv", true) == 0)
- {
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Car color:", "White \n Black \n Brown \n Red \n Yellow \n Blue ", "Select", "Cancel");
- return 1;
- }
- if(strcmp(cmdtext, "/v", true) == 0)
- {
- ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Cars:", "Infernus \n Comet \n Buffalo \n Cheetah \n Predator \n Sparrow \n Turismo \n Landstalker \n PCJ-600 \n NRG-500 \n Slamvan \n Sultan \n --Admin Vehicles-- \n Hydra \n Rhino", "Select", "Cancel");
- return 1;
- }
- if (strcmp("/help", cmdtext, true, 10) == 0)
- {
- SendClientMessage(playerid, COLOR_WHITE, "Teleports: /teles");
- SendClientMessage(playerid, COLOR_WHITE, "Admin Teleports: /abase");
- SendClientMessage(playerid, COLOR_WHITE, "Commands: /nitro /heal /kill /suicide /paintjob /re /v /colorv");
- SendClientMessage(playerid, COLOR_WHITE, "Admin Commands: /god /go /gc ");
- return 1;
- }
- if (strcmp("/nitro", cmdtext, true, 10) == 0)
- {
- component = GetPlayerVehicleID(playerid);
- AddVehicleComponent(component, 1010);
- return 1;
- }
- if (strcmp("/paintjob", cmdtext, true, 10) == 0)
- {
- new rand = random(3);
- ChangeVehiclePaintjob(GetPlayerVehicleID(playerid), rand);
- SendClientMessage(playerid, COLOR_GREEN, "Here is your new paintjob");
- return 1;
- }
- if (strcmp("/onduty", cmdtext, true, 10) == 0)
- {
- if(!IsPlayerAdmin(playerid))
- {
- SendClientMessage(playerid, COLOR_RED, "You are not allowed to use this command!");
- }
- else
- {
- new pName[24];
- new onduty[128];
- GetPlayerName(playerid, pName, 24);
- format(onduty, 128, "%s Is on duty!", pName);
- SendClientMessageToAll(COLOR_GREEN, onduty);
- }
- return 1;
- }
- if (strcmp("/heal", cmdtext, true, 10) == 0)
- {
- if(God[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_GREY, "You have god enabled you dont have to heal!");
- return 1;
- }
- else
- {
- SetPlayerHealth(playerid, 100);
- SendClientMessage(playerid, COLOR_GREEN, "Your back to full lives");
- }
- return 1;
- }
- if (strcmp("/re", cmdtext, true, 10) == 0)
- {
- RepairVehicle(GetPlayerVehicleID(playerid));
- SendClientMessage(playerid, COLOR_GREEN, "Your car/boat/plain is repaired");
- return 1;
- }
- if(strcmp("/adminv", cmdtext, true) == 0)
- {
- if (!IsPlayerAdmin(playerid))
- {
- SendClientMessage(playerid, COLOR_RED, "Your not allowed to use this command!");
- }
- if (IsPlayerAdmin(playerid))
- {
- new Float:x, Float:y, Float:z, Float:a;
- GetPlayerPos(playerid, x,y,z);
- GetPlayerFacingAngle(playerid, a);
- new vehicleid = CreateVehicle(429, x+3,y,z, a, -1, -1, -1);
- PutPlayerInVehicle(playerid, vehicleid, 0);
- SendClientMessage(playerid, COLOR_GREEN, "Here is your car");
- return 1;
- }
- }
- if(strcmp("/adminp", cmdtext, true) == 0)
- {
- if (!IsPlayerAdmin(playerid))
- {
- SendClientMessage(playerid, COLOR_RED, "Your not allowed to use this command!");
- }
- if (IsPlayerAdmin(playerid))
- {
- new Float:x, Float:y, Float:z, Float:a;
- GetPlayerPos(playerid, x,y,z);
- GetPlayerFacingAngle(playerid, a);
- new vehicleid = CreateVehicle(520, x+3,y,z, a, -1, -1, -1);
- PutPlayerInVehicle(playerid, vehicleid, 0);
- SendClientMessage(playerid, COLOR_GREEN, "Here is your plain");
- return 1;
- }
- }
- if(strcmp("/playerv", cmdtext, true) == 0)
- {
- new Float:x, Float:y, Float:z, Float:a;
- GetPlayerPos(playerid, x,y,z);
- GetPlayerFacingAngle(playerid, a);
- new vehicleid = CreateVehicle(439, x+3,y,z, a, -1, -1, -1);
- PutPlayerInVehicle(playerid, vehicleid, 0);
- SendClientMessage(playerid, COLOR_GREEN, "Here is your car");
- return 1;
- }
- if(strcmp("/playerp", cmdtext, true) == 0)
- {
- new Float:x, Float:y, Float:z, Float:a;
- GetPlayerPos(playerid, x,y,z);
- GetPlayerFacingAngle(playerid, a);
- new vehicleid = CreateVehicle(519, x+3,y,z, a, -1, -1, -1);
- PutPlayerInVehicle(playerid, vehicleid, 0);
- SendClientMessage(playerid, COLOR_GREEN, "Here is your plain");
- return 1;
- }
- if(strcmp("/suicide", cmdtext, true) == 0)
- {
- SetPlayerHealth(playerid, 0);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Where did it go wrong?");
- return 1;
- }
- if(strcmp("/kill", cmdtext, true) == 0)
- {
- SetPlayerHealth(playerid, 0);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Where did it go wrong?");
- return 1;
- }
- if (strcmp("/go", cmdtext, true, 10) == 0)
- {
- if(!IsPlayerAdmin(playerid))
- {
- SendClientMessage(playerid, COLOR_RED, "Your not allowed to use this command!");
- }
- if(IsPlayerAdmin(playerid))
- {
- SendClientMessage(playerid, COLOR_GREEN, "The admin gate is open!");
- MoveObject(bar1, 2720.60009766,-2398.89990234,12.50000000,1.50000000);
- MoveObject(bar2, 2720.19995117,-2411.80004883,12.50000000,1.50000000);
- }
- return 1;
- }
- if(strcmp("/gc", cmdtext, true) == 0)
- {
- if(!IsPlayerAdmin(playerid))
- {
- SendClientMessage(playerid, COLOR_RED, "Your not allowed to use this command!");
- }
- if(IsPlayerAdmin(playerid))
- {
- SendClientMessage(playerid, COLOR_GREEN, "The admin gate is closed!");
- MoveObject(bar1, 2720.69995117,-2402.60009766,12.50000000,1.50000000);
- MoveObject(bar2, 2720.50000000,-2408.00000000,12.50000000,1.50000000);
- }
- return 1;
- }
- if(strcmp("/mc", cmdtext, true) == 0)
- {
- return 1;
- }
- if(strcmp("/abase", cmdtext, true) == 0)
- {
- if(!IsPlayerAdmin(playerid))
- {
- SendClientMessage(playerid, COLOR_RED, "Your not allowed to use this command!");
- }
- if(IsPlayerAdmin(playerid))
- {
- SendClientMessage(playerid, COLOR_GREEN, "Teleported!");
- SetPlayerPos(0,2785.9028,-2417.7285,13.6341);
- }
- return 1;
- }
- if(strcmp("/gma", cmdtext, true) == 0)
- {
- if(!IsPlayerAdmin(playerid))
- {
- SendClientMessage(playerid, COLOR_RED, "Your not allowed to use this command!");
- }
- if(IsPlayerAdmin(playerid))
- {
- a_GivePlayerMoney(playerid, 10000);
- }
- return 1;
- }
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- return 1;
- }
- stock a_GivePlayerMoney(playerid, money)
- {
- pMoney[playerid] += money;
- GivePlayerMoney(playerid, money);
- }
- stock a_SetPlayerMoney(playerid, money)
- {
- pMoney[playerid] = money; //Will set the string to the money ammount
- ResetPlayerMoney(playerid); //Reset's player money
- GivePlayerMoney(playerid); //Will give the player money. no a_GivePlayerMoney needed!
- }
- public OnPlayerUpdate(playerid)
- {
- if(GetPlayerMoney(playerid) > pMoney[playerid])
- {
- SendClientMessage(playerid, COLOR_GREY, "I dont like money hackers verry well...");
- }
- if(IsPlayerInAnyVehicle(playerid))
- {
- if(VGod[playerid] == 1)
- {
- new vid;
- vid = GetPlayerVehicleID(playerid);
- RepairVehicle(vid);
- }
- }
- return 1;
- }
- stock sscanf(string[], format[], {Float,_}:...)
- {
- #if defined isnull
- if (isnull(string))
- #else
- if (string[0] == 0 || (string[0] == 1 && string[1] == 0))
- #endif
- {
- return format[0];
- }
- #pragma tabsize 4
- new
- formatPos = 0,
- stringPos = 0,
- paramPos = 2,
- paramCount = numargs(),
- delim = ' ';
- while (string[stringPos] && string[stringPos] <= ' ')
- {
- stringPos++;
- }
- while (paramPos < paramCount && string[stringPos])
- {
- switch (format[formatPos++])
- {
- case '\0':
- {
- return 0;
- }
- case 'i', 'd':
- {
- new
- neg = 1,
- num = 0,
- ch = string[stringPos];
- if (ch == '-')
- {
- neg = -1;
- ch = string[++stringPos];
- }
- do
- {
- stringPos++;
- if ('0' <= ch <= '9')
- {
- num = (num * 10) + (ch - '0');
- }
- else
- {
- return -1;
- }
- }
- while ((ch = string[stringPos]) > ' ' && ch != delim);
- setarg(paramPos, 0, num * neg);
- }
- case 'h', 'x':
- {
- new
- num = 0,
- ch = string[stringPos];
- do
- {
- stringPos++;
- switch (ch)
- {
- case 'x', 'X':
- {
- num = 0;
- continue;
- }
- case '0' .. '9':
- {
- num = (num << 4) | (ch - '0');
- }
- case 'a' .. 'f':
- {
- num = (num << 4) | (ch - ('a' - 10));
- }
- case 'A' .. 'F':
- {
- num = (num << 4) | (ch - ('A' - 10));
- }
- default:
- {
- return -1;
- }
- }
- }
- while ((ch = string[stringPos]) > ' ' && ch != delim);
- setarg(paramPos, 0, num);
- }
- case 'c':
- {
- setarg(paramPos, 0, string[stringPos++]);
- }
- case 'f':
- {
- new changestr[16], changepos = 0, strpos = stringPos;
- while(changepos < 16 && string[strpos] && string[strpos] != delim)
- {
- changestr[changepos++] = string[strpos++];
- }
- changestr[changepos] = '\0';
- setarg(paramPos,0,_:floatstr(changestr));
- }
- case 'p':
- {
- delim = format[formatPos++];
- continue;
- }
- case '\'':
- {
- new
- end = formatPos - 1,
- ch;
- while ((ch = format[++end]) && ch != '\'') {}
- if (!ch)
- {
- return -1;
- }
- format[end] = '\0';
- if ((ch = strfind(string, format[formatPos], false, stringPos)) == -1)
- {
- if (format[end + 1])
- {
- return -1;
- }
- return 0;
- }
- format[end] = '\'';
- stringPos = ch + (end - formatPos);
- formatPos = end + 1;
- }
- case 'u':
- {
- new
- end = stringPos - 1,
- id = 0,
- bool:num = true,
- ch;
- while ((ch = string[++end]) && ch != delim)
- {
- if (num)
- {
- if ('0' <= ch <= '9')
- {
- id = (id * 10) + (ch - '0');
- }
- else
- {
- num = false;
- }
- }
- }
- if (num && IsPlayerConnected(id))
- {
- setarg(paramPos, 0, id);
- }
- else
- {
- #if !defined foreach
- #define foreach(%1,%2) for (new %2 = 0; %2 < MAX_PLAYERS; %2++) if (IsPlayerConnected(%2))
- #define __SSCANF_FOREACH__
- #endif
- string[end] = '\0';
- num = false;
- new
- name[MAX_PLAYER_NAME];
- id = end - stringPos;
- foreach (Player, playerid)
- {
- GetPlayerName(playerid, name, sizeof (name));
- if (!strcmp(name, string[stringPos], true, id))
- {
- setarg(paramPos, 0, playerid);
- num = true;
- break;
- }
- }
- if (!num)
- {
- setarg(paramPos, 0, INVALID_PLAYER_ID);
- }
- string[end] = ch;
- #if defined __SSCANF_FOREACH__
- #undef foreach
- #undef __SSCANF_FOREACH__
- #endif
- }
- stringPos = end;
- }
- case 's', 'z':
- {
- new
- i = 0,
- ch;
- if (format[formatPos])
- {
- while ((ch = string[stringPos++]) && ch != delim)
- {
- setarg(paramPos, i++, ch);
- }
- if (!i)
- {
- return -1;
- }
- }
- else
- {
- while ((ch = string[stringPos++]))
- {
- setarg(paramPos, i++, ch);
- }
- }
- stringPos--;
- setarg(paramPos, i, '\0');
- }
- default:
- {
- continue;
- }
- }
- while (string[stringPos] && string[stringPos] != delim && string[stringPos] > ' ')
- {
- stringPos++;
- }
- while (string[stringPos] && (string[stringPos] == delim || string[stringPos] <= ' '))
- {
- stringPos++;
- }
- paramPos++;
- }
- do
- {
- if ((delim = format[formatPos++]) > ' ')
- {
- if (delim == '\'')
- {
- while ((delim = format[formatPos++]) && delim != '\'') {}
- }
- else if (delim != 'z')
- {
- return delim;
- }
- }
- }
- while (delim > ' ');
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement