Advertisement
Kanersps

Frosty version 1.2.5

Nov 17th, 2012
628
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 42.84 KB | None | 0 0
  1. #include <a_samp>
  2. #define COLOR_GREY 0xAFAFAFAA
  3. #define COLOR_GREEN 0x33AA33AA
  4. #define COLOR_RED 0xAA3333AA
  5. #define COLOR_YELLOW 0xFFFF00AA
  6. #define COLOR_WHITE 0xFFFFFFAA
  7. #define COLOR_BLUE 0x0000BBAA
  8. #define COLOR_LIGHTBLUE 0x33CCFFAA
  9. #define COLOR_ORANGE 0xFF9900AA
  10. #define COLOR_RED 0xAA3333AA
  11. #define COLOR_LIME 0x10F441AA
  12.  
  13. new God[MAX_PLAYERS] = 0;
  14. new VGod[MAX_PLAYERS] = 0;
  15. new pMoney[MAX_PLAYERS];
  16.  
  17.  
  18. new component;
  19.  
  20.  
  21. new bar1;
  22. new bar2;
  23. new a511;
  24. new a512;
  25. main()
  26. {
  27.  
  28.  
  29.  
  30.  
  31. }
  32. public OnGameModeInit()
  33. {
  34.     DisableInteriorEnterExits();
  35.     print("#-----------------#");
  36.     print("#-Frosty-Gamemode-#");
  37.     print("#----Made-by------#");
  38.     print("#----kanersps-----#");
  39.     //start
  40.     SetGameModeText("Frosty FreeRoam");
  41.     //map
  42.     AddStaticVehicleEx(506,2509.10009766,-1665.09997559,13.19999981,8.00000000,76,117,15); //Super GT
  43.     AddStaticVehicleEx(506,2508.10009766,-1677.09997559,13.30000019,332.00000000,76,117,15); //Super GT
  44.     AddStaticVehicleEx(506,2499.39990234,-1683.09997559,13.19999981,276.00000000,76,117,15); //Super GT
  45.     AddStaticVehicleEx(506,2491.69995117,-1683.09997559,13.10000038,266.00000000,76,117,15); //Super GT
  46.     AddStaticVehicleEx(506,2483.60009766,-1683.09997559,13.10000038,264.00000000,76,117,15); //Super GT
  47.     AddStaticVehicleEx(506,2468.69995117,-1671.00000000,13.30000019,0.00000000,76,117,15); //Super GT
  48.     AddStaticVehicleEx(477,2005.19995117,-2550.60009766,13.39999962,244.00000000,212,200,15); //ZR-350
  49.     AddStaticVehicleEx(477,2006.30004883,-2543.30004883,13.39999962,243.99536133,135,-1,15); //ZR-350
  50.     AddStaticVehicleEx(411,2010.40002441,-2553.50000000,13.19999981,242.00000000,252,255,15); //Infernus
  51.     AddStaticVehicleEx(560,2013.50000000,-2546.39990234,13.39999962,244.00000000,175,-1,15); //Sultan
  52.     AddStaticVehicleEx(566,1717.40002441,-2545.89990234,13.39999962,268.00000000,77,98,15); //Tahoma
  53.     AddStaticVehicleEx(566,1784.59997559,-2535.69995117,13.39999962,0.00000000,77,50,15); //Tahoma
  54.     CreateObject(2912,2484.60009766,-1689.09997559,12.50000000,0.00000000,0.00000000,0.00000000); //object(temp_crate1) (1)
  55.     CreateObject(2912,2484.60009766,-1689.09997559,13.19999981,0.00000000,0.00000000,0.00000000); //object(temp_crate1) (2)
  56.     CreateObject(2912,2483.89990234,-1689.09997559,12.50000000,0.00000000,0.00000000,0.00000000); //object(temp_crate1) (3)
  57.     CreateObject(2912,2484.10009766,-1689.19995117,13.19999981,0.00000000,0.00000000,0.00000000); //object(temp_crate1) (4)
  58.     CreateObject(2912,2482.50000000,-1689.09997559,12.50000000,0.00000000,0.00000000,0.00000000); //object(temp_crate1) (5)
  59.     CreateObject(2912,2480.50000000,-1689.00000000,13.19999981,0.00000000,0.00000000,0.00000000); //object(temp_crate1) (6)
  60.     CreateObject(2912,2481.10009766,-1689.09997559,12.50000000,0.00000000,0.00000000,0.00000000); //object(temp_crate1) (7)
  61.     CreateObject(2912,2480.50000000,-1689.00000000,12.50000000,0.00000000,0.00000000,0.00000000); //object(temp_crate1) (8)
  62.     CreateObject(2912,2481.80004883,-1689.09997559,12.50000000,0.00000000,0.00000000,0.00000000); //object(temp_crate1) (9)
  63.     CreateObject(2912,2483.19995117,-1689.09997559,12.50000000,0.00000000,0.00000000,0.00000000); //object(temp_crate1) (10)
  64.     CreateObject(17699,1990.00000000,-2547.19995117,17.20000076,0.00000000,0.00000000,0.00000000); //object(mcstraps_lae2) (1)
  65.     CreateObject(4553,1802.80004883,-2537.89990234,15.69999981,0.00000000,354.00000000,0.00000000); //object(road12_lan2) (1)
  66.     CreateObject(4553,1855.30004883,-2539.00000000,26.10000038,0.00000000,349.99597168,0.00000000); //object(road12_lan2) (2)
  67.     CreateObject(4553,1929.30004883,-2543.80004883,39.40000153,0.00000000,357.99243164,270.00000000); //object(road12_lan2) (3)
  68.     AddStaticVehicleEx(535,2271.10009766,-1645.90002441,15.19999981,0.00000000,98,68,15); //Slamvan
  69.     AddStaticVehicleEx(445,2235.60009766,-1639.50000000,15.50000000,340.00000000,95,10,15); //Admiral
  70.     AddStaticVehicleEx(509,2309.30004883,-1677.40002441,13.60000038,0.00000000,96,26,15); //Bike
  71.     AddStaticVehicleEx(545,2502.50000000,-1752.30004883,13.39999962,0.00000000,109,122,15); //Hustler
  72.     AddStaticVehicleEx(545,2319.39990234,-1718.40002441,13.50000000,0.00000000,109,122,15); //Hustler
  73.     AddStaticVehicleEx(401,2499.10009766,-1753.50000000,13.30000019,0.00000000,96,26,15); //Bravura
  74.     AddStaticVehicleEx(559,2496.00000000,-1752.90002441,13.19999981,0.00000000,105,30,15); //Jester
  75.     AddStaticVehicleEx(533,2657.50000000,-1691.69995117,9.10000038,270.00000000,30,46,15); //Feltzer
  76.     AddStaticVehicleEx(518,2308.30004883,-1671.90002441,14.00000000,0.00000000,94,112,15); //Buccaneer
  77.     AddStaticVehicleEx(575,2014.90002441,-1648.80004883,13.30000019,270.00000000,93,126,15); //Broadway
  78.     AddStaticVehicleEx(470,2597.60009766,-1292.19995117,81.69999695,0.00000000,95,10,15); //Patriot
  79.     CreateObject(1459,2347.39990234,-1574.69995117,23.39999962,0.00000000,0.00000000,0.00000000); //object(dyn_roadbarrier_6) (1)
  80.     CreateObject(1459,2344.69995117,-1574.59997559,23.39999962,0.00000000,0.00000000,0.00000000); //object(dyn_roadbarrier_6) (2)
  81.     CreateObject(1459,2342.00000000,-1574.50000000,23.39999962,0.00000000,0.00000000,0.00000000); //object(dyn_roadbarrier_6) (3)
  82.     CreateObject(1459,2339.10009766,-1574.40002441,23.39999962,0.00000000,0.00000000,0.00000000); //object(dyn_roadbarrier_6) (4)
  83.     CreateObject(1459,2346.39990234,-1632.50000000,16.10000038,0.00000000,0.00000000,0.00000000); //object(dyn_roadbarrier_6) (5)
  84.     CreateObject(1459,2343.69995117,-1632.40002441,16.10000038,0.00000000,0.00000000,0.00000000); //object(dyn_roadbarrier_6) (6)
  85.     CreateObject(1459,2341.00000000,-1632.40002441,16.10000038,0.00000000,0.00000000,0.00000000); //object(dyn_roadbarrier_6) (7)
  86.     CreateObject(1459,2338.39990234,-1632.30004883,16.10000038,0.00000000,0.00000000,0.00000000); //object(dyn_roadbarrier_6) (8)
  87.     CreateObject(3578,2342.80004883,-1638.30004883,15.10000038,0.00000000,0.00000000,0.00000000); //object(dockbarr1_la) (1)
  88.     CreateObject(3578,2342.50000000,-1573.19995117,23.60000038,0.00000000,0.00000000,0.00000000); //object(dockbarr1_la) (2)
  89.     CreateObject(4517,1974.69995117,-1240.90002441,26.10000038,0.00000000,0.00000000,184.00000000); //object(cn2_roadblock04ld) (1)
  90.     CreateObject(1257,2077.60009766,-1320.59997559,24.29999924,0.00000000,0.00000000,0.00000000); //object(bustopm) (1)
  91.     CreateObject(1257,2342.50000000,-1148.50000000,27.50000000,0.00000000,0.00000000,92.00000000); //object(bustopm) (2)
  92.     CreateObject(1216,2278.50000000,-1309.00000000,82.09999847,0.00000000,0.00000000,0.00000000); //object(phonebooth1) (1)
  93.     CreateObject(1216,2261.50000000,-1271.30004883,23.70000076,0.00000000,0.00000000,86.00000000); //object(phonebooth1) (2)
  94.     CreateObject(1287,2157.00000000,-1346.19995117,23.60000038,0.00000000,0.00000000,272.00000000); //object(newstandnew3) (1)
  95.     CreateObject(1776,2043.50000000,-1410.50000000,17.29999924,0.00000000,0.00000000,272.00000000); //object(cj_candyvendor) (1)
  96.     CreateObject(3092,2044.50000000,-1717.59997559,13.50000000,0.00000000,88.00000000,0.00000000); //object(dead_tied_cop) (1)
  97.     CreateObject(3928,1868.59997559,-1643.80004883,30.79999924,0.00000000,0.00000000,0.00000000); //object(helipad) (1)
  98.     CreateObject(4874,1153.19995117,-1802.40002441,36.50000000,0.00000000,0.00000000,0.00000000); //object(helipad1_las) (1)
  99.     CreateObject(18250,2597.00000000,-1281.50000000,86.50000000,0.00000000,0.00000000,0.00000000); //object(cuntwjunk06) (1)
  100.     CreateObject(3934,2617.32714844,-1309.85644531,79.96509552,0.00000000,0.00000000,0.00000000); //object(helipad01) (1)
  101.     CreateObject(3785,2583.60009766,-1267.69995117,83.50000000,0.00000000,0.00000000,0.00000000); //object(bulkheadlight) (1)
  102.     CreateObject(18250,2597.00000000,-1281.50000000,86.50000000,0.00000000,0.00000000,0.00000000); //object(cuntwjunk06) (2)
  103.     CreateObject(18250,2597.00000000,-1281.50000000,86.50000000,0.00000000,0.00000000,0.00000000); //object(cuntwjunk06) (3)
  104.     //admin barrier
  105.     bar1 = CreateObject(988,2720.69995117,-2402.60009766,12.50000000,0.00000000,0.00000000,268.00000000); //object(ws_apgate) (1)
  106.     bar2 = CreateObject(988,2720.50000000,-2408.00000000,12.50000000,0.00000000,0.00000000,267.99499512); //object(ws_apgate) (2)
  107.     //admin base
  108.     AddStaticVehicleEx(522,2775.89990234,-2432.80004883,13.30000019,0.00000000,48,79,15); //NRG-500
  109.     AddStaticVehicleEx(522,2777.50000000,-2432.69995117,13.30000019,0.00000000,48,79,15); //NRG-500
  110.     AddStaticVehicleEx(522,2774.39990234,-2432.80004883,13.30000019,0.00000000,48,79,15); //NRG-500
  111.     AddStaticVehicleEx(522,2782.00000000,-2432.50000000,13.30000019,0.00000000,48,79,15); //NRG-500
  112.     AddStaticVehicleEx(522,2780.39990234,-2432.50000000,13.30000019,0.00000000,48,79,15); //NRG-500
  113.     AddStaticVehicleEx(522,2779.00000000,-2432.69995117,13.30000019,0.00000000,48,79,15); //NRG-500
  114.     AddStaticVehicleEx(533,2769.00000000,-2510.69995117,13.39999962,90.00000000,14,49,15); //Feltzer
  115.     AddStaticVehicleEx(533,2769.00000000,-2513.50000000,13.39999962,89.99993896,14,49,15); //Feltzer
  116.     AddStaticVehicleEx(533,2768.80004883,-2507.69995117,13.39999962,90.00000000,14,49,15); //Feltzer
  117.     AddStaticVehicleEx(429,2745.10009766,-2473.50000000,13.39999962,270.00000000,93,126,15); //Banshee
  118.     AddStaticVehicleEx(429,2744.80004883,-2462.69995117,13.39999962,270.00000000,93,126,15); //Banshee
  119.     AddStaticVehicleEx(429,2744.80004883,-2466.10009766,13.39999962,270.00000000,93,126,15); //Banshee
  120.     AddStaticVehicleEx(429,2744.60009766,-2459.19995117,13.39999962,270.00000000,93,126,15); //Banshee
  121.     AddStaticVehicleEx(429,2745.00000000,-2469.50000000,13.39999962,270.00000000,93,126,15); //Banshee
  122.     AddStaticVehicleEx(477,2758.60009766,-2374.19995117,13.50000000,182.00000000,76,-1,15); //ZR-350
  123.     CreateObject(989,2719.69995117,-2490.10009766,14.50000000,0.00000000,0.00000000,195.99993896); //object(ac_apgate) (1)
  124.     CreateObject(989,2719.60009766,-2495.60009766,14.50000000,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (2)
  125.     CreateObject(989,2719.69995117,-2501.00000000,14.30000019,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (3)
  126.     CreateObject(989,2719.60009766,-2506.39990234,14.30000019,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (4)
  127.     CreateObject(989,2710.69995117,-2510.50000000,14.50000000,0.00000000,0.00000000,105.99603271); //object(ac_apgate) (5)
  128.     CreateObject(989,2719.39990234,-2511.69995117,14.50000000,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (6)
  129.     CreateObject(989,2707.89941406,-2513.29980469,14.50000000,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (7)
  130.     CreateObject(989,2708.00000000,-2514.00000000,17.89999962,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (8)
  131.     CreateObject(989,2707.80004883,-2516.39990234,18.20000076,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (9)
  132.     CreateObject(989,2719.69995117,-2392.19995117,14.50000000,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (11)
  133.     CreateObject(989,2719.69995117,-2397.60009766,14.50000000,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (12)
  134.     CreateObject(989,2719.60009766,-2412.19995117,14.50000000,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (13)
  135.     CreateObject(989,2719.69995117,-2415.39990234,14.50000000,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (14)
  136.     CreateObject(989,2719.50000000,-2398.69995117,14.50000000,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (15)
  137.     CreateObject(989,2719.89990234,-2386.69995117,14.50000000,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (16)
  138.     CreateObject(989,2720.10009766,-2385.19995117,17.10000038,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (17)
  139.     CreateObject(989,2719.89990234,-2381.10009766,18.20000076,0.00000000,0.00000000,195.99609375); //object(ac_apgate) (18)
  140.     CreateObject(2644,2788.00000000,-2463.80004883,13.00000000,0.00000000,0.00000000,0.00000000); //object(cj_burg_table) (1)
  141.     CreateObject(2644,2778.89990234,-2463.30004883,13.00000000,0.00000000,0.00000000,0.00000000); //object(cj_burg_table) (2)
  142.     CreateObject(2644,2779.39990234,-2448.89990234,13.00000000,0.00000000,0.00000000,0.00000000); //object(cj_burg_table) (3)
  143.     CreateObject(2644,2788.10009766,-2448.89990234,13.00000000,0.00000000,0.00000000,0.00000000); //object(cj_burg_table) (4)
  144.     CreateObject(2644,2796.00000000,-2462.89990234,13.00000000,0.00000000,0.00000000,0.00000000); //object(cj_burg_table) (5)
  145.     CreateObject(1739,2797.10009766,-2462.89990234,13.50000000,0.00000000,0.00000000,0.00000000); //object(swank_din_chair_5) (1)
  146.     CreateObject(1739,2789.19995117,-2448.69995117,13.50000000,0.00000000,0.00000000,0.00000000); //object(swank_din_chair_5) (2)
  147.     CreateObject(1739,2789.00000000,-2463.89990234,13.50000000,0.00000000,0.00000000,0.00000000); //object(swank_din_chair_5) (3)
  148.     CreateObject(1739,2779.80004883,-2463.19995117,13.50000000,0.00000000,0.00000000,0.00000000); //object(swank_din_chair_5) (4)
  149.     CreateObject(1739,2777.89990234,-2463.19995117,13.50000000,0.00000000,0.00000000,178.00000000); //object(swank_din_chair_5) (5)
  150.     CreateObject(1739,2795.00000000,-2463.00000000,13.50000000,0.00000000,0.00000000,177.99499512); //object(swank_din_chair_5) (6)
  151.     CreateObject(1739,2778.39990234,-2448.80004883,13.50000000,0.00000000,0.00000000,177.99499512); //object(swank_din_chair_5) (7)
  152.     CreateObject(1739,2787.10009766,-2448.89990234,13.50000000,0.00000000,0.00000000,177.99499512); //object(swank_din_chair_5) (8)
  153.     CreateObject(1739,2787.10009766,-2463.89990234,13.50000000,0.00000000,0.00000000,177.99499512); //object(swank_din_chair_5) (9)
  154.     CreateObject(1739,2780.39990234,-2448.80004883,13.50000000,0.00000000,0.00000000,0.00000000); //object(swank_din_chair_5) (10)
  155.     CreateObject(3515,2785.00000000,-2456.50000000,14.60000038,0.00000000,0.00000000,0.00000000); //object(vgsfountain) (1)
  156.     //big jump 1
  157.     AddStaticVehicleEx(480,2592.60009766,-2108.80004883,86.30000305,0.00000000,154,167,15); //Comet
  158.     AddStaticVehicleEx(480,2585.50000000,-2109.80004883,86.19999695,0.00000000,154,167,15); //Comet
  159.     AddStaticVehicleEx(480,2589.39990234,-2109.39990234,86.30000305,0.00000000,154,167,15); //Comet
  160.     AddStaticVehicleEx(480,2573.80004883,-2109.50000000,86.09999847,0.00000000,154,167,15); //Comet
  161.     AddStaticVehicleEx(480,2582.00000000,-2109.50000000,86.19999695,0.00000000,154,167,15); //Comet
  162.     AddStaticVehicleEx(480,2578.39990234,-2109.00000000,86.30000305,0.00000000,154,167,15); //Comet
  163.     CreateObject(4553,2584.60009766,-2044.30004883,49.00000000,0.00000000,326.00000000,270.00000000); //object(road12_lan2) (1)
  164.     CreateObject(8588,2591.10009766,-2106.39990234,85.30000305,0.00000000,0.00000000,0.00000000); //object(vgsrailroad15) (1)
  165.     CreateObject(8588,2489.80004883,-2092.69995117,92.80000305,0.00000000,0.00000000,0.00000000); //object(vgsrailroad15) (2)
  166.     CreateObject(8588,2500.60009766,-2111.19995117,73.00000000,0.00000000,0.00000000,0.00000000); //object(vgsrailroad15) (3)
  167.     CreateObject(4553,2585.19995117,-1966.69995117,6.00000000,0.00000000,24.00000000,89.99441528); //object(road12_lan2) (2)
  168.     CreateObject(4553,2585.39990234,-2011.09997559,6.80000019,0.00000000,25.99993896,271.99401855); //object(road12_lan2) (3)
  169.     CreateObject(8588,2659.10009766,-2131.60009766,69.50000000,0.00000000,358.00000000,358.00000000); //object(vgsrailroad15) (4)
  170.     CreateObject(8588,2577.00000000,-2106.89990234,85.19999695,0.00000000,0.00000000,0.00000000); //object(vgsrailroad15) (7)
  171.     CreateObject(8588,2580.30004883,-2106.50000000,85.30000305,0.00000000,0.00000000,0.00000000); //object(vgsrailroad15) (8)
  172.     //Area51 gate
  173.    
  174.     a511 = CreateObject(989,211.19999695,1875.09997559,14.00000000,0.00000000,0.00000000,107.99996948); //object(ac_apgate) (1)
  175.     a512 = CreateObject(989,216.69999695,1875.19995117,14.00000000,0.00000000,0.00000000,107.99560547); //object(ac_apgate) (2)
  176.     return 1;
  177. }
  178.  
  179.  
  180.  
  181. public OnGameModeExit()
  182. {
  183.     print("#-----------------#");
  184.     print("#-Frosty-Gamemode-#");
  185.     print("#----Made-by------#");
  186.     print("#----kanersps-----#");
  187.  
  188. }
  189.  
  190. public OnPlayerConnect(playerid)
  191. {
  192.     SendClientMessageToAll(COLOR_GREEN, "%A player joined the server");
  193.     SendClientMessage(playerid, COLOR_GREEN, "Welcome to the server");
  194.     SendClientMessage(playerid, COLOR_GREEN, "Type /help for a list of commands");
  195.     pMoney[playerid] = 0;
  196.  
  197.     return 1;
  198. }
  199. public OnPlayerDisconnect(playerid, reason)
  200. {
  201.     VGod[playerid] = 0;
  202.     pMoney[playerid] = 0;
  203.     return 1;
  204. }
  205.  
  206.  
  207. public OnPlayerRequestClass(playerid, classid)
  208. {
  209.    
  210.     return 1;
  211. }
  212.  
  213. public OnPlayerText(playerid, text[])
  214. {
  215.     return 1;
  216. }
  217.  
  218. public OnPlayerDeath(playerid, killerid, reason)
  219. {
  220.     if(God[playerid] == 1)
  221.         {
  222.             God[playerid] = 0;
  223.             return 1;
  224.         }
  225.     return 1;
  226. }
  227. public OnPlayerClickPlayer(playerid, clickedplayerid, source)
  228. {
  229.     if(IsPlayerAdmin(playerid))
  230.     {
  231.         new
  232.             world = GetPlayerVirtualWorld(playerid),
  233.             interior = GetPlayerInterior(playerid),
  234.             Float:x, Float:y, Float:z, Float:angle;
  235.  
  236.         GetPlayerPos(clickedplayerid, x, y, z);
  237.         GetPlayerFacingAngle(clickedplayerid, angle);
  238.  
  239.         if(IsPlayerInAnyVehicle(playerid))
  240.         {
  241.             new carid = GetPlayerVehicleID(playerid);
  242.             SetVehiclePos(carid,x, y, z+0.2);
  243.             SetVehicleZAngle(carid, angle);
  244.         }
  245.         else
  246.         {
  247.             SetPlayerPos(playerid, x, y, z+0.2);
  248.             SetPlayerFacingAngle(playerid, angle);
  249.         }
  250.         SetPlayerVirtualWorld(playerid, world);
  251.         SetPlayerInterior(playerid, interior);
  252.         SetCameraBehindPlayer(playerid);
  253.     }
  254.     return 1;
  255. }
  256. public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ)
  257. {
  258.     if(IsPlayerAdmin(playerid))
  259.     {
  260.         if(GetPlayerState(playerid) == 2)
  261.         {
  262.             new carid;
  263.             carid=GetPlayerVehicleID(playerid);
  264.             SetVehiclePos(carid,fX, fY, fZ+9);
  265.         }
  266.         else SetPlayerPosFindZ(playerid, fX, fY, fZ+9);
  267.     }
  268.     return 1;
  269. }
  270. public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
  271. {
  272.     new cardriver;
  273.     cardriver = GetPlayerVehicleID(playerid);
  274.     if(dialogid == 1)
  275.         {
  276.             if(response)
  277.             {
  278.  
  279.                 if(listitem == 0)
  280.                 {
  281.  
  282.                     ChangeVehicleColor(cardriver, 1, 1);
  283.                     return 1;
  284.                 }
  285.                 if(listitem == 1)
  286.                 {
  287.  
  288.                     ChangeVehicleColor(cardriver, 0, 0);
  289.                     return 1;
  290.                 }
  291.                 if(listitem == 2)
  292.                 {
  293.  
  294.                     ChangeVehicleColor(cardriver, 31, 31);
  295.                     return 1;
  296.                 }
  297.                 if(listitem == 3)
  298.                 {
  299.                     ChangeVehicleColor(cardriver, 151, 151);
  300.                     return 1;
  301.                 }
  302.                 if(listitem == 4)
  303.                 {
  304.                     ChangeVehicleColor(cardriver, 6, 6);
  305.                     return 1;
  306.                 }
  307.                 if(listitem == 5)
  308.                 {
  309.                     ChangeVehicleColor(cardriver, 79, 79);
  310.                     return 1;
  311.                 }
  312.             }
  313.         }
  314.     if(dialogid == 2)
  315.         {
  316.             if(response)
  317.             {
  318.  
  319.                 if(listitem == 0)
  320.                 {
  321.                     new Float:x, Float:y, Float:z, Float:a;
  322.                     GetPlayerPos(playerid, x,y,z);
  323.                     GetPlayerFacingAngle(playerid, a);
  324.                     new vehicleid = CreateVehicle(411, x+3,y,z, a, -1, -1, -1);
  325.                     PutPlayerInVehicle(playerid, vehicleid, 0);
  326.                     return 1;
  327.                 }
  328.                 if(listitem == 1)
  329.                 {
  330.                     new Float:x, Float:y, Float:z, Float:a;
  331.                     GetPlayerPos(playerid, x,y,z);
  332.                     GetPlayerFacingAngle(playerid, a);
  333.                     new vehicleid = CreateVehicle(480, x+3,y,z, a, -1, -1, -1);
  334.                     PutPlayerInVehicle(playerid, vehicleid, 0);
  335.                     return 1;
  336.                 }
  337.                 if(listitem == 2)
  338.                 {
  339.                     new Float:x, Float:y, Float:z, Float:a;
  340.                     GetPlayerPos(playerid, x,y,z);
  341.                     GetPlayerFacingAngle(playerid, a);
  342.                     new vehicleid = CreateVehicle(402, x+3,y,z, a, -1, -1, -1);
  343.                     PutPlayerInVehicle(playerid, vehicleid, 0);
  344.                     return 1;
  345.                 }
  346.                 if(listitem == 3)
  347.                 {
  348.                     new Float:x, Float:y, Float:z, Float:a;
  349.                     GetPlayerPos(playerid, x,y,z);
  350.                     GetPlayerFacingAngle(playerid, a);
  351.                     new vehicleid = CreateVehicle(415, x+3,y,z, a, -1, -1, -1);
  352.                     PutPlayerInVehicle(playerid, vehicleid, 0);
  353.                     return 1;
  354.                 }
  355.                 if(listitem == 4)
  356.                 {
  357.                     new Float:x, Float:y, Float:z, Float:a;
  358.                     GetPlayerPos(playerid, x,y,z);
  359.                     GetPlayerFacingAngle(playerid, a);
  360.                     new vehicleid = CreateVehicle(430, x+3,y,z, a, -1, -1, -1);
  361.                     PutPlayerInVehicle(playerid, vehicleid, 0);
  362.                     return 1;
  363.                 }
  364.                 if(listitem == 5)
  365.                 {
  366.                     new Float:x, Float:y, Float:z, Float:a;
  367.                     GetPlayerPos(playerid, x,y,z);
  368.                     GetPlayerFacingAngle(playerid, a);
  369.                     new vehicleid = CreateVehicle(447, x+3,y,z, a, -1, -1, -1);
  370.                     PutPlayerInVehicle(playerid, vehicleid, 0);
  371.                     return 1;
  372.                 }
  373.                 if(listitem == 6)
  374.                 {
  375.                     new Float:x, Float:y, Float:z, Float:a;
  376.                     GetPlayerPos(playerid, x,y,z);
  377.                     GetPlayerFacingAngle(playerid, a);
  378.                     new vehicleid = CreateVehicle(451, x+3,y,z, a, -1, -1, -1);
  379.                     PutPlayerInVehicle(playerid, vehicleid, 0);
  380.                     return 1;
  381.                 }
  382.                 if(listitem == 7)
  383.                 {
  384.                     new Float:x, Float:y, Float:z, Float:a;
  385.                     GetPlayerPos(playerid, x,y,z);
  386.                     GetPlayerFacingAngle(playerid, a);
  387.                     new vehicleid = CreateVehicle(400, x+3,y,z, a, -1, -1, -1);
  388.                     PutPlayerInVehicle(playerid, vehicleid, 0);
  389.                     return 1;
  390.                 }
  391.                 if(listitem == 8)
  392.                 {
  393.                     new Float:x, Float:y, Float:z, Float:a;
  394.                     GetPlayerPos(playerid, x,y,z);
  395.                     GetPlayerFacingAngle(playerid, a);
  396.                     new vehicleid = CreateVehicle(461, x+3,y,z, a, -1, -1, -1);
  397.                     PutPlayerInVehicle(playerid, vehicleid, 0);
  398.                     return 1;
  399.                 }
  400.                 if(listitem == 9)
  401.                 {
  402.                     new Float:x, Float:y, Float:z, Float:a;
  403.                     GetPlayerPos(playerid, x,y,z);
  404.                     GetPlayerFacingAngle(playerid, a);
  405.                     new vehicleid = CreateVehicle(522, x+3,y,z, a, -1, -1, -1);
  406.                     PutPlayerInVehicle(playerid, vehicleid, 0);
  407.                     return 1;
  408.                 }
  409.                 if(listitem == 10)
  410.                 {
  411.                     new Float:x, Float:y, Float:z, Float:a;
  412.                     GetPlayerPos(playerid, x,y,z);
  413.                     GetPlayerFacingAngle(playerid, a);
  414.                     new vehicleid = CreateVehicle(535, x+3,y,z, a, -1, -1, -1);
  415.                     PutPlayerInVehicle(playerid, vehicleid, 0);
  416.                     return 1;
  417.                 }
  418.                 if(listitem == 11)
  419.                 {
  420.                     new Float:x, Float:y, Float:z, Float:a;
  421.                     GetPlayerPos(playerid, x,y,z);
  422.                     GetPlayerFacingAngle(playerid, a);
  423.                     new vehicleid = CreateVehicle(560, x+3,y,z, a, -1, -1, -1);
  424.                     PutPlayerInVehicle(playerid, vehicleid, 0);
  425.                     return 1;
  426.                 }
  427.                 if(listitem == 13)
  428.                 {
  429.                     if(!IsPlayerAdmin(playerid))
  430.                     {
  431.                         SendClientMessage(playerid, COLOR_RED, "Your not allowed to use this command!");
  432.                     }
  433.                     if(IsPlayerAdmin(playerid))
  434.                     {
  435.                     new Float:x, Float:y, Float:z, Float:a;
  436.                     GetPlayerPos(playerid, x,y,z);
  437.                     GetPlayerFacingAngle(playerid, a);
  438.                     new vehicleid = CreateVehicle(520, x+3,y,z, a, -1, -1, -1);
  439.                     PutPlayerInVehicle(playerid, vehicleid, 0);
  440.                     }
  441.                     return 1;
  442.                 }
  443.                 if(listitem == 14)
  444.                 {
  445.                     if(!IsPlayerAdmin(playerid))
  446.                     {
  447.                         SendClientMessage(playerid, COLOR_RED, "Your not allowed to use this command!");
  448.                     }
  449.                     if(IsPlayerAdmin(playerid))
  450.                     {
  451.                     new Float:x, Float:y, Float:z, Float:a;
  452.                     GetPlayerPos(playerid, x,y,z);
  453.                     GetPlayerFacingAngle(playerid, a);
  454.                     new vehicleid = CreateVehicle(432, x+3,y,z, a, -1, -1, -1);
  455.                     PutPlayerInVehicle(playerid, vehicleid, 0);
  456.                     }
  457.                     return 1;
  458.                 }
  459.             }
  460.         }
  461.     if(dialogid == 3)
  462.         {
  463.             if(response)
  464.             {
  465.  
  466.                 if(listitem == 0)
  467.                 {
  468.                     SetPlayerPos(playerid,2191.8586,1677.7673,12.1887);
  469.                     return 1;
  470.                 }
  471.                 if(listitem == 1)
  472.                 {
  473.                     SetPlayerPos(playerid,-1981.7010,137.7410,27);
  474.                     return 1;
  475.                 }
  476.                 if(listitem == 2)
  477.                 {
  478.                     SetPlayerPos(playerid,2496.7319,-1667.7465,13.3438);
  479.                     return 1;
  480.                 }
  481.                 if(listitem == 3)
  482.                 {
  483.                     SetPlayerPos(playerid,99.8408,1920.3246,18.2519);
  484.                     return 1;
  485.                 }
  486.                 if(listitem == 4)
  487.                 {
  488.                     SetPlayerPos(playerid,2585.2725,-2104.1152,86.3317);
  489.                     return 1;
  490.                 }
  491.                 if(listitem == 5)
  492.                 {
  493.                     SetPlayerPos(playerid,1997.9998,-2546.2817,14.3172);
  494.                     return 1;
  495.                 }
  496.                 if(listitem == 6)
  497.                 {
  498.                     SetPlayerPos(playerid,1347.9437,1258.6233,10.8203);
  499.                     return 1;
  500.                 }
  501.  
  502.             }
  503.         }
  504.     if(dialogid == 4)
  505.         {
  506.             if(response)
  507.             {
  508.                 if(!IsPlayerAdmin(playerid))
  509.                 {
  510.                     SendClientMessage(playerid, COLOR_RED, "You are not allowed to use this command!");
  511.                 }
  512.                 if(IsPlayerAdmin(playerid))
  513.                 {
  514.                 if(listitem == 0)
  515.                 {
  516.                     GivePlayerWeapon(playerid, 23, 9999999999);
  517.                     return 1;
  518.                 }
  519.                 if(listitem == 1)
  520.                 {
  521.                     GivePlayerWeapon(playerid, 24, 9999999999);
  522.                     return 1;
  523.                 }
  524.                 if(listitem == 2)
  525.                 {
  526.                     GivePlayerWeapon(playerid, 25, 9999999999);
  527.                     return 1;
  528.                 }
  529.                 if(listitem == 3)
  530.                 {
  531.                     GivePlayerWeapon(playerid, 26, 9999999999);
  532.                     return 1;
  533.                 }
  534.                 if(listitem == 4)
  535.                 {
  536.                     GivePlayerWeapon(playerid, 27, 9999999999);
  537.                     return 1;
  538.                 }
  539.                 if(listitem == 5)
  540.                 {
  541.                     GivePlayerWeapon(playerid, 28, 9999999999);
  542.                     return 1;
  543.                 }
  544.                 if(listitem == 6)
  545.                 {
  546.                     GivePlayerWeapon(playerid, 29, 9999999999);
  547.                     return 1;
  548.                 }
  549.                 if(listitem == 7)
  550.                 {
  551.                     GivePlayerWeapon(playerid, 30, 9999999999);
  552.                     return 1;
  553.                 }
  554.                 if(listitem == 8)
  555.                 {
  556.                     GivePlayerWeapon(playerid, 31, 9999999999);
  557.                     return 1;
  558.                 }
  559.                 if(listitem == 9)
  560.                 {
  561.                     GivePlayerWeapon(playerid, 32, 9999999999);
  562.                     return 1;
  563.                 }
  564.                 if(listitem == 10)
  565.                 {
  566.                     GivePlayerWeapon(playerid, 33, 9999999999);
  567.                     return 1;
  568.                 }
  569.                 if(listitem == 11)
  570.                 {
  571.                     GivePlayerWeapon(playerid, 34, 9999999999);
  572.                     return 1;
  573.                 }
  574.                 if(listitem == 12)
  575.                 {
  576.                     GivePlayerWeapon(playerid, 35, 9999999999);
  577.                     return 1;
  578.                 }
  579.                 if(listitem == 13)
  580.                 {
  581.                     GivePlayerWeapon(playerid, 36, 9999999999);
  582.                     return 1;
  583.                 }
  584.                 if(listitem == 14)
  585.                 {
  586.                     GivePlayerWeapon(playerid, 37, 9999999999);
  587.                     return 1;
  588.                 }
  589.                 }
  590.             }
  591.         }
  592.     return 1;
  593. }
  594. new gate51 = 0;
  595. public OnPlayerCommandText(playerid, cmdtext[])
  596. {
  597.     if(strcmp(cmdtext, "/aweapons", true, 10) == 0)
  598.     {
  599.         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");
  600.         return 1;
  601.     }
  602.  
  603.     if(!strcmp(cmdtext, "/dveh", true)) return DestroyVehicle(GetPlayerVehicleID(playerid));
  604.     if(strcmp("/51g", cmdtext, true, 10) == 0)
  605.     {
  606.         if (gate51 == 0)
  607.         {
  608.             gate51 = 1;
  609.             MoveObject(a511,206.39999390,1875.59997559,14.00000000,1.50000000);
  610.             MoveObject(a512,221.30000305,1875.59997559,14.00000000,1.50000000);
  611.            
  612.         }
  613.         if (gate51 == 1)
  614.         {
  615.             gate51 = 0;
  616.             MoveObject(a511,211.19999695,1875.09997559,14.00000000,1.50000000);
  617.             MoveObject(a512,216.69999695,1875.19995117,14.00000000,1.50000000);
  618.             return 1;
  619.         }
  620.  
  621.         return 1;
  622.     }
  623.     if(strcmp("/god", cmdtext, true, 10) == 0)
  624.     {
  625.         if(!IsPlayerAdmin(playerid))
  626.         {
  627.             SendClientMessage(playerid, COLOR_RED, "You are not allowed to use this command!");
  628.             return 1;
  629.         }
  630.         if (IsPlayerAdmin(playerid))
  631.         {
  632.         if (God[playerid] == 1)
  633.         {
  634.             SendClientMessage(playerid, COLOR_RED, "Godmode has been disabled!");
  635.             SetPlayerArmour(playerid, 100);
  636.             SetPlayerHealth(playerid, 100);
  637.             VGod[playerid] = 0;
  638.             God[playerid] = 0;
  639.             ResetPlayerWeapons(playerid);
  640.             return 1;
  641.         }
  642.         if (God[playerid] == 0)
  643.         {
  644.             SendClientMessage(playerid, COLOR_GREEN, "Godmode has been activated!");
  645.             SetPlayerArmour(playerid, 99999999);
  646.             SetPlayerHealth(playerid, 99999999);
  647.             GivePlayerWeapon(playerid, 38, 10500);
  648.             GivePlayerWeapon(playerid, 16, 10500);
  649.             VGod[playerid] = 1;
  650.             God[playerid] = 1;
  651.             return 1;
  652.         }
  653.         }
  654.         return 1;
  655.     }
  656.     if(strcmp(cmdtext, "/teles", true) == 0)
  657.     {
  658.         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");
  659.  
  660.         return 1;
  661.     }
  662.     if(strcmp(cmdtext, "/flip", true) == 0)
  663.     {
  664.         new currentveh;
  665.         new Float:angle;
  666.         currentveh = GetPlayerVehicleID(playerid);
  667.         GetVehicleZAngle(currentveh, angle);
  668.         SetVehicleZAngle(currentveh, angle);
  669.         SendClientMessage(playerid, COLOR_GREEN, "Your vehicle has been flipped.");
  670.  
  671.  
  672.         return 1;
  673.     }
  674.     if(strcmp(cmdtext, "/colorv", true) == 0)
  675.     {
  676.         ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Car color:", "White \n Black \n Brown \n Red \n Yellow \n Blue ", "Select", "Cancel");
  677.  
  678.         return 1;
  679.     }
  680.     if(strcmp(cmdtext, "/v", true) == 0)
  681.     {
  682.         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");
  683.  
  684.         return 1;
  685.     }
  686.     if (strcmp("/help", cmdtext, true, 10) == 0)
  687.     {
  688.         SendClientMessage(playerid, COLOR_WHITE, "Teleports: /teles");
  689.         SendClientMessage(playerid, COLOR_WHITE, "Admin Teleports: /abase");
  690.         SendClientMessage(playerid, COLOR_WHITE, "Commands: /nitro /heal /kill /suicide /paintjob /re /v /colorv");
  691.         SendClientMessage(playerid, COLOR_WHITE, "Admin Commands: /god /go /gc ");
  692.         return 1;
  693.     }
  694.     if (strcmp("/nitro", cmdtext, true, 10) == 0)
  695.     {
  696.  
  697.         component = GetPlayerVehicleID(playerid);
  698.         AddVehicleComponent(component, 1010);
  699.         return 1;
  700.     }
  701.     if (strcmp("/paintjob", cmdtext, true, 10) == 0)
  702.     {
  703.         new rand = random(3);
  704.         ChangeVehiclePaintjob(GetPlayerVehicleID(playerid), rand);
  705.         SendClientMessage(playerid, COLOR_GREEN, "Here is your new paintjob");
  706.         return 1;
  707.     }
  708.     if (strcmp("/onduty", cmdtext, true, 10) == 0)
  709.     {
  710.         if(!IsPlayerAdmin(playerid))
  711.         {
  712.             SendClientMessage(playerid, COLOR_RED, "You are not allowed to use this command!");
  713.         }
  714.         else
  715.         {
  716.         new pName[24];
  717.         new onduty[128];
  718.         GetPlayerName(playerid, pName, 24);
  719.         format(onduty, 128, "%s Is on duty!", pName);
  720.         SendClientMessageToAll(COLOR_GREEN, onduty);
  721.         }
  722.         return 1;
  723.     }
  724.     if (strcmp("/heal", cmdtext, true, 10) == 0)
  725.     {
  726.         if(God[playerid] == 1)
  727.         {
  728.             SendClientMessage(playerid, COLOR_GREY, "You have god enabled you dont have to heal!");
  729.             return 1;
  730.         }
  731.         else
  732.         {
  733.             SetPlayerHealth(playerid, 100);
  734.             SendClientMessage(playerid, COLOR_GREEN, "Your back to full lives");
  735.         }
  736.         return 1;
  737.     }
  738.     if (strcmp("/re", cmdtext, true, 10) == 0)
  739.     {
  740.         RepairVehicle(GetPlayerVehicleID(playerid));
  741.         SendClientMessage(playerid, COLOR_GREEN, "Your car/boat/plain is repaired");
  742.         return 1;
  743.     }
  744.     if(strcmp("/adminv", cmdtext, true) == 0)
  745.     {
  746.         if (!IsPlayerAdmin(playerid))
  747.         {
  748.         SendClientMessage(playerid, COLOR_RED, "Your not allowed to use this command!");
  749.         }
  750.         if (IsPlayerAdmin(playerid))
  751.         {
  752.         new Float:x, Float:y, Float:z, Float:a;
  753.         GetPlayerPos(playerid, x,y,z);
  754.         GetPlayerFacingAngle(playerid, a);
  755.         new vehicleid = CreateVehicle(429, x+3,y,z, a, -1, -1, -1);
  756.         PutPlayerInVehicle(playerid, vehicleid, 0);
  757.         SendClientMessage(playerid, COLOR_GREEN, "Here is your car");
  758.         return 1;
  759.         }
  760.     }
  761.     if(strcmp("/adminp", cmdtext, true) == 0)
  762.     {
  763.         if (!IsPlayerAdmin(playerid))
  764.         {
  765.         SendClientMessage(playerid, COLOR_RED, "Your not allowed to use this command!");
  766.         }
  767.         if (IsPlayerAdmin(playerid))
  768.         {
  769.         new Float:x, Float:y, Float:z, Float:a;
  770.         GetPlayerPos(playerid, x,y,z);
  771.         GetPlayerFacingAngle(playerid, a);
  772.         new vehicleid = CreateVehicle(520, x+3,y,z, a, -1, -1, -1);
  773.         PutPlayerInVehicle(playerid, vehicleid, 0);
  774.         SendClientMessage(playerid, COLOR_GREEN, "Here is your plain");
  775.         return 1;
  776.         }
  777.     }
  778.     if(strcmp("/playerv", cmdtext, true) == 0)
  779.     {
  780.         new Float:x, Float:y, Float:z, Float:a;
  781.         GetPlayerPos(playerid, x,y,z);
  782.         GetPlayerFacingAngle(playerid, a);
  783.         new vehicleid = CreateVehicle(439, x+3,y,z, a, -1, -1, -1);
  784.         PutPlayerInVehicle(playerid, vehicleid, 0);
  785.         SendClientMessage(playerid, COLOR_GREEN, "Here is your car");
  786.         return 1;
  787.     }
  788.     if(strcmp("/playerp", cmdtext, true) == 0)
  789.     {
  790.         new Float:x, Float:y, Float:z, Float:a;
  791.         GetPlayerPos(playerid, x,y,z);
  792.         GetPlayerFacingAngle(playerid, a);
  793.         new vehicleid = CreateVehicle(519, x+3,y,z, a, -1, -1, -1);
  794.         PutPlayerInVehicle(playerid, vehicleid, 0);
  795.         SendClientMessage(playerid, COLOR_GREEN, "Here is your plain");
  796.         return 1;
  797.  
  798.     }
  799.     if(strcmp("/suicide", cmdtext, true) == 0)
  800.     {
  801.         SetPlayerHealth(playerid, 0);
  802.         SendClientMessage(playerid, COLOR_LIGHTBLUE, "Where did it go wrong?");
  803.         return 1;
  804.     }
  805.     if(strcmp("/kill", cmdtext, true) == 0)
  806.     {
  807.         SetPlayerHealth(playerid, 0);
  808.         SendClientMessage(playerid, COLOR_LIGHTBLUE, "Where did it go wrong?");
  809.         return 1;
  810.     }
  811.     if (strcmp("/go", cmdtext, true, 10) == 0)
  812.     {
  813.         if(!IsPlayerAdmin(playerid))
  814.         {
  815.             SendClientMessage(playerid, COLOR_RED, "Your not allowed to use this command!");
  816.         }
  817.         if(IsPlayerAdmin(playerid))
  818.         {
  819.         SendClientMessage(playerid, COLOR_GREEN, "The admin gate is open!");
  820.         MoveObject(bar1, 2720.60009766,-2398.89990234,12.50000000,1.50000000);
  821.         MoveObject(bar2, 2720.19995117,-2411.80004883,12.50000000,1.50000000);
  822.         }
  823.         return 1;
  824.  
  825.     }
  826.     if(strcmp("/gc", cmdtext, true) == 0)
  827.     {
  828.         if(!IsPlayerAdmin(playerid))
  829.      {
  830.         SendClientMessage(playerid, COLOR_RED, "Your not allowed to use this command!");
  831.      }
  832.         if(IsPlayerAdmin(playerid))
  833.         {
  834.         SendClientMessage(playerid, COLOR_GREEN, "The admin gate is closed!");
  835.         MoveObject(bar1, 2720.69995117,-2402.60009766,12.50000000,1.50000000);
  836.         MoveObject(bar2, 2720.50000000,-2408.00000000,12.50000000,1.50000000);
  837.         }
  838.         return 1;
  839.     }
  840.     if(strcmp("/mc", cmdtext, true) == 0)
  841.     {
  842.         return 1;
  843.     }
  844.     if(strcmp("/abase", cmdtext, true) == 0)
  845.     {
  846.         if(!IsPlayerAdmin(playerid))
  847.         {
  848.         SendClientMessage(playerid, COLOR_RED, "Your not allowed to use this command!");
  849.         }
  850.         if(IsPlayerAdmin(playerid))
  851.         {
  852.         SendClientMessage(playerid, COLOR_GREEN, "Teleported!");
  853.         SetPlayerPos(0,2785.9028,-2417.7285,13.6341);
  854.         }
  855.         return 1;
  856.     }
  857.     if(strcmp("/gma", cmdtext, true) == 0)
  858.     {
  859.         if(!IsPlayerAdmin(playerid))
  860.         {
  861.         SendClientMessage(playerid, COLOR_RED, "Your not allowed to use this command!");
  862.         }
  863.         if(IsPlayerAdmin(playerid))
  864.         {
  865.             a_GivePlayerMoney(playerid, 10000);
  866.         }
  867.         return 1;
  868.     }
  869.  
  870.  
  871.  
  872.     return 1;
  873. }
  874. public OnPlayerSpawn(playerid)
  875.     {
  876.        
  877.         return 1;
  878.     }
  879. stock a_GivePlayerMoney(playerid, money)
  880. {
  881.     pMoney[playerid] += money;
  882.     GivePlayerMoney(playerid, money);
  883. }
  884. stock a_SetPlayerMoney(playerid, money)
  885. {
  886.     pMoney[playerid] = money; //Will set the string to the money ammount
  887.     ResetPlayerMoney(playerid); //Reset's player money
  888.     GivePlayerMoney(playerid); //Will give the player money. no a_GivePlayerMoney needed!
  889. }
  890. public OnPlayerUpdate(playerid)
  891. {
  892.     if(GetPlayerMoney(playerid) > pMoney[playerid])
  893.     {
  894.         SendClientMessage(playerid, COLOR_GREY, "I dont like money hackers verry well...");
  895.        
  896.     }
  897.     if(IsPlayerInAnyVehicle(playerid))
  898.         {
  899.             if(VGod[playerid] == 1)
  900.             {
  901.                 new vid;
  902.                 vid = GetPlayerVehicleID(playerid);
  903.                 RepairVehicle(vid);
  904.             }
  905.         }
  906.     return 1;
  907. }
  908. stock sscanf(string[], format[], {Float,_}:...)
  909. {
  910.     #if defined isnull
  911.         if (isnull(string))
  912.     #else
  913.         if (string[0] == 0 || (string[0] == 1 && string[1] == 0))
  914.     #endif
  915.         {
  916.             return format[0];
  917.         }
  918.     #pragma tabsize 4
  919.     new
  920.         formatPos = 0,
  921.         stringPos = 0,
  922.         paramPos = 2,
  923.         paramCount = numargs(),
  924.         delim = ' ';
  925.     while (string[stringPos] && string[stringPos] <= ' ')
  926.     {
  927.         stringPos++;
  928.     }
  929.     while (paramPos < paramCount && string[stringPos])
  930.     {
  931.         switch (format[formatPos++])
  932.         {
  933.             case '\0':
  934.             {
  935.                 return 0;
  936.             }
  937.             case 'i', 'd':
  938.             {
  939.                 new
  940.                     neg = 1,
  941.                     num = 0,
  942.                     ch = string[stringPos];
  943.                 if (ch == '-')
  944.                 {
  945.                     neg = -1;
  946.                     ch = string[++stringPos];
  947.                 }
  948.                 do
  949.                 {
  950.                     stringPos++;
  951.                     if ('0' <= ch <= '9')
  952.                     {
  953.                         num = (num * 10) + (ch - '0');
  954.                     }
  955.                     else
  956.                     {
  957.                         return -1;
  958.                     }
  959.                 }
  960.                 while ((ch = string[stringPos]) > ' ' && ch != delim);
  961.                 setarg(paramPos, 0, num * neg);
  962.             }
  963.             case 'h', 'x':
  964.             {
  965.                 new
  966.                     num = 0,
  967.                     ch = string[stringPos];
  968.                 do
  969.                 {
  970.                     stringPos++;
  971.                     switch (ch)
  972.                     {
  973.                         case 'x', 'X':
  974.                         {
  975.                             num = 0;
  976.                             continue;
  977.                         }
  978.                         case '0' .. '9':
  979.                         {
  980.                             num = (num << 4) | (ch - '0');
  981.                         }
  982.                         case 'a' .. 'f':
  983.                         {
  984.                             num = (num << 4) | (ch - ('a' - 10));
  985.                         }
  986.                         case 'A' .. 'F':
  987.                         {
  988.                             num = (num << 4) | (ch - ('A' - 10));
  989.                         }
  990.                         default:
  991.                         {
  992.                             return -1;
  993.                         }
  994.                     }
  995.                 }
  996.                 while ((ch = string[stringPos]) > ' ' && ch != delim);
  997.                 setarg(paramPos, 0, num);
  998.             }
  999.             case 'c':
  1000.             {
  1001.                 setarg(paramPos, 0, string[stringPos++]);
  1002.             }
  1003.             case 'f':
  1004.             {
  1005.  
  1006.                 new changestr[16], changepos = 0, strpos = stringPos;
  1007.                 while(changepos < 16 && string[strpos] && string[strpos] != delim)
  1008.                 {
  1009.                     changestr[changepos++] = string[strpos++];
  1010.                     }
  1011.                 changestr[changepos] = '\0';
  1012.                 setarg(paramPos,0,_:floatstr(changestr));
  1013.             }
  1014.             case 'p':
  1015.             {
  1016.                 delim = format[formatPos++];
  1017.                 continue;
  1018.             }
  1019.             case '\'':
  1020.             {
  1021.                 new
  1022.                     end = formatPos - 1,
  1023.                     ch;
  1024.                 while ((ch = format[++end]) && ch != '\'') {}
  1025.                 if (!ch)
  1026.                 {
  1027.                     return -1;
  1028.                 }
  1029.                 format[end] = '\0';
  1030.                 if ((ch = strfind(string, format[formatPos], false, stringPos)) == -1)
  1031.                 {
  1032.                     if (format[end + 1])
  1033.                     {
  1034.                         return -1;
  1035.                     }
  1036.                     return 0;
  1037.                 }
  1038.                 format[end] = '\'';
  1039.                 stringPos = ch + (end - formatPos);
  1040.                 formatPos = end + 1;
  1041.             }
  1042.             case 'u':
  1043.             {
  1044.                 new
  1045.                     end = stringPos - 1,
  1046.                     id = 0,
  1047.                     bool:num = true,
  1048.                     ch;
  1049.                 while ((ch = string[++end]) && ch != delim)
  1050.                 {
  1051.                     if (num)
  1052.                     {
  1053.                         if ('0' <= ch <= '9')
  1054.                         {
  1055.                             id = (id * 10) + (ch - '0');
  1056.                         }
  1057.                         else
  1058.                         {
  1059.                             num = false;
  1060.                         }
  1061.                     }
  1062.                 }
  1063.                 if (num && IsPlayerConnected(id))
  1064.                 {
  1065.                     setarg(paramPos, 0, id);
  1066.                 }
  1067.                 else
  1068.                 {
  1069.                     #if !defined foreach
  1070.                         #define foreach(%1,%2) for (new %2 = 0; %2 < MAX_PLAYERS; %2++) if (IsPlayerConnected(%2))
  1071.                         #define __SSCANF_FOREACH__
  1072.                     #endif
  1073.                     string[end] = '\0';
  1074.                     num = false;
  1075.                     new
  1076.                         name[MAX_PLAYER_NAME];
  1077.                     id = end - stringPos;
  1078.                     foreach (Player, playerid)
  1079.                     {
  1080.                         GetPlayerName(playerid, name, sizeof (name));
  1081.                         if (!strcmp(name, string[stringPos], true, id))
  1082.                         {
  1083.                             setarg(paramPos, 0, playerid);
  1084.                             num = true;
  1085.                             break;
  1086.                         }
  1087.                     }
  1088.                     if (!num)
  1089.                     {
  1090.                         setarg(paramPos, 0, INVALID_PLAYER_ID);
  1091.                     }
  1092.                     string[end] = ch;
  1093.                     #if defined __SSCANF_FOREACH__
  1094.                         #undef foreach
  1095.                         #undef __SSCANF_FOREACH__
  1096.                     #endif
  1097.                 }
  1098.                 stringPos = end;
  1099.             }
  1100.             case 's', 'z':
  1101.             {
  1102.                 new
  1103.                     i = 0,
  1104.                     ch;
  1105.                 if (format[formatPos])
  1106.                 {
  1107.                     while ((ch = string[stringPos++]) && ch != delim)
  1108.                     {
  1109.                         setarg(paramPos, i++, ch);
  1110.                     }
  1111.                     if (!i)
  1112.                     {
  1113.                         return -1;
  1114.                     }
  1115.                 }
  1116.                 else
  1117.                 {
  1118.                     while ((ch = string[stringPos++]))
  1119.                     {
  1120.                         setarg(paramPos, i++, ch);
  1121.                     }
  1122.                 }
  1123.                 stringPos--;
  1124.                 setarg(paramPos, i, '\0');
  1125.             }
  1126.             default:
  1127.             {
  1128.                 continue;
  1129.             }
  1130.         }
  1131.         while (string[stringPos] && string[stringPos] != delim && string[stringPos] > ' ')
  1132.         {
  1133.             stringPos++;
  1134.         }
  1135.         while (string[stringPos] && (string[stringPos] == delim || string[stringPos] <= ' '))
  1136.         {
  1137.             stringPos++;
  1138.         }
  1139.         paramPos++;
  1140.     }
  1141.     do
  1142.     {
  1143.         if ((delim = format[formatPos++]) > ' ')
  1144.         {
  1145.             if (delim == '\'')
  1146.             {
  1147.                 while ((delim = format[formatPos++]) && delim != '\'') {}
  1148.             }
  1149.             else if (delim != 'z')
  1150.             {
  1151.                 return delim;
  1152.             }
  1153.         }
  1154.     }
  1155.     while (delim > ' ');
  1156.     return 0;
  1157. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement