Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //SAN FIERRO RPG GAMEMODE BY JAKKU
- //(C) COPYRIGHT 2010
- // DO NOT REMOVE THE CREDITS
- // DO NOT EDIT THE CODE
- #include <a_samp>
- #include <core>
- #include <float>
- #include <dini>
- #include <dudb>
- #pragma tabsize 0
- //Some color defines =)
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_RED 0xAA3333AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_POWDERBLUE 0xB0E0E6FF
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_BLUE 0x0000BBAA
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- #define COLOR_ORANGE 0xFF9900AA
- #define COLOR_GOLD 0xFFD700FF
- #define COLOR_LIGHTGREEN 0x90EE90FF
- #define COLOR_OLIVE 0x808000FF
- #define COLOR_SALMON 0xFA8072FF
- #define COLOR_GREEN 0x00F20096
- #define COLOR_ORED 0xFF0000FF
- #define COLOR_MAGENTA 0xFF00FFFF
- #define COLOR_TEAL 0x008080FF
- #define COLOR_BROWN 0xFFBB7796
- #define TXT_MESSAGE_COST -2 //Text message cost
- #define MAX_ZONE_NAME 28
- #if defined _zones_included
- #endinput
- #endif
- #define _zones_included
- #pragma library samp
- //Property-defines
- #define MAX_PROPERTIES 100 //Max amount of properties available (Don't change if you DON'T need more)
- #define MAX_PROPERTIES_PER_PLAYER 4 //How many props player can own at the same time
- #define ENABLE_MAP_ICON_STREAMER 1
- #define MAX_ZONE_NAME 28
- new PropertiesAmount;
- new InfoShowed[MAX_PLAYERS];
- new MP;
- enum propinfo
- {
- PropName[64],
- Float:PropX,
- Float:PropY,
- Float:PropZ,
- PropIsBought,
- PropUnbuyableTime,
- PropOwner[MAX_PLAYER_NAME],
- PropValue,
- PropEarning,
- PickupNr,
- }
- enum SAZONE_MAIN { //Betamaster
- SAZONE_NAME[28],
- Float:SAZONE_AREA[6]
- };
- static const gSAZones[][SAZONE_MAIN] = {
- //Zone name
- {"The Big Ear", {-410.00,1403.30,-3.00,-137.90,1681.20,200.00}},
- {"Aldea Malvada", {-1372.10,2498.50,0.00,-1277.50,2615.30,200.00}},
- {"Angel Pine", {-2324.90,-2584.20,-6.10,-1964.20,-2212.10,200.00}},
- {"Arco del Oeste", {-901.10,2221.80,0.00,-592.00,2571.90,200.00}},
- {"Avispa Country Club", {-2646.40,-355.40,0.00,-2270.00,-222.50,200.00}},
- {"Avispa Country Club", {-2831.80,-430.20,-6.10,-2646.40,-222.50,200.00}},
- {"Avispa Country Club", {-2361.50,-417.10,0.00,-2270.00,-355.40,200.00}},
- {"Avispa Country Club", {-2667.80,-302.10,-28.80,-2646.40,-262.30,71.10}},
- {"Avispa Country Club", {-2470.00,-355.40,0.00,-2270.00,-318.40,46.10}},
- {"Avispa Country Club", {-2550.00,-355.40,0.00,-2470.00,-318.40,39.70}},
- {"Back o Beyond", {-1166.90,-2641.10,0.00,-321.70,-1856.00,200.00}},
- {"Battery Point", {-2741.00,1268.40,-4.50,-2533.00,1490.40,200.00}},
- {"Bayside", {-2741.00,2175.10,0.00,-2353.10,2722.70,200.00}},
- {"Bayside Marina", {-2353.10,2275.70,0.00,-2153.10,2475.70,200.00}},
- {"Beacon Hill", {-399.60,-1075.50,-1.40,-319.00,-977.50,198.50}},
- {"Blackfield", {964.30,1203.20,-89.00,1197.30,1403.20,110.90}},
- {"Blackfield", {964.30,1403.20,-89.00,1197.30,1726.20,110.90}},
- {"Blackfield Chapel", {1375.60,596.30,-89.00,1558.00,823.20,110.90}},
- {"Blackfield Chapel", {1325.60,596.30,-89.00,1375.60,795.00,110.90}},
- {"Blackfield Intersection", {1197.30,1044.60,-89.00,1277.00,1163.30,110.90}},
- {"Blackfield Intersection", {1166.50,795.00,-89.00,1375.60,1044.60,110.90}},
- {"Blackfield Intersection", {1277.00,1044.60,-89.00,1315.30,1087.60,110.90}},
- {"Blackfield Intersection", {1375.60,823.20,-89.00,1457.30,919.40,110.90}},
- {"Blueberry", {104.50,-220.10,2.30,349.60,152.20,200.00}},
- {"Blueberry", {19.60,-404.10,3.80,349.60,-220.10,200.00}},
- {"Blueberry Acres", {-319.60,-220.10,0.00,104.50,293.30,200.00}},
- {"Caligula's Palace", {2087.30,1543.20,-89.00,2437.30,1703.20,110.90}},
- {"Caligula's Palace", {2137.40,1703.20,-89.00,2437.30,1783.20,110.90}},
- {"Calton Heights", {-2274.10,744.10,-6.10,-1982.30,1358.90,200.00}},
- {"Chinatown", {-2274.10,578.30,-7.60,-2078.60,744.10,200.00}},
- {"City Hall", {-2867.80,277.40,-9.10,-2593.40,458.40,200.00}},
- {"Come-A-Lot", {2087.30,943.20,-89.00,2623.10,1203.20,110.90}},
- {"Commerce", {1323.90,-1842.20,-89.00,1701.90,-1722.20,110.90}},
- {"Commerce", {1323.90,-1722.20,-89.00,1440.90,-1577.50,110.90}},
- {"Commerce", {1370.80,-1577.50,-89.00,1463.90,-1384.90,110.90}},
- {"Commerce", {1463.90,-1577.50,-89.00,1667.90,-1430.80,110.90}},
- {"Commerce", {1583.50,-1722.20,-89.00,1758.90,-1577.50,110.90}},
- {"Commerce", {1667.90,-1577.50,-89.00,1812.60,-1430.80,110.90}},
- {"Conference Center", {1046.10,-1804.20,-89.00,1323.90,-1722.20,110.90}},
- {"Conference Center", {1073.20,-1842.20,-89.00,1323.90,-1804.20,110.90}},
- {"Cranberry Station", {-2007.80,56.30,0.00,-1922.00,224.70,100.00}},
- {"Creek", {2749.90,1937.20,-89.00,2921.60,2669.70,110.90}},
- {"Dillimore", {580.70,-674.80,-9.50,861.00,-404.70,200.00}},
- {"Doherty", {-2270.00,-324.10,-0.00,-1794.90,-222.50,200.00}},
- {"Doherty", {-2173.00,-222.50,-0.00,-1794.90,265.20,200.00}},
- {"Downtown", {-1982.30,744.10,-6.10,-1871.70,1274.20,200.00}},
- {"Downtown", {-1871.70,1176.40,-4.50,-1620.30,1274.20,200.00}},
- {"Downtown", {-1700.00,744.20,-6.10,-1580.00,1176.50,200.00}},
- {"Downtown", {-1580.00,744.20,-6.10,-1499.80,1025.90,200.00}},
- {"Downtown", {-2078.60,578.30,-7.60,-1499.80,744.20,200.00}},
- {"Downtown", {-1993.20,265.20,-9.10,-1794.90,578.30,200.00}},
- {"Downtown Los Santos", {1463.90,-1430.80,-89.00,1724.70,-1290.80,110.90}},
- {"Downtown Los Santos", {1724.70,-1430.80,-89.00,1812.60,-1250.90,110.90}},
- {"Downtown Los Santos", {1463.90,-1290.80,-89.00,1724.70,-1150.80,110.90}},
- {"Downtown Los Santos", {1370.80,-1384.90,-89.00,1463.90,-1170.80,110.90}},
- {"Downtown Los Santos", {1724.70,-1250.90,-89.00,1812.60,-1150.80,110.90}},
- {"Downtown Los Santos", {1370.80,-1170.80,-89.00,1463.90,-1130.80,110.90}},
- {"Downtown Los Santos", {1378.30,-1130.80,-89.00,1463.90,-1026.30,110.90}},
- {"Downtown Los Santos", {1391.00,-1026.30,-89.00,1463.90,-926.90,110.90}},
- {"Downtown Los Santos", {1507.50,-1385.20,110.90,1582.50,-1325.30,335.90}},
- {"East Beach", {2632.80,-1852.80,-89.00,2959.30,-1668.10,110.90}},
- {"East Beach", {2632.80,-1668.10,-89.00,2747.70,-1393.40,110.90}},
- {"East Beach", {2747.70,-1668.10,-89.00,2959.30,-1498.60,110.90}},
- {"East Beach", {2747.70,-1498.60,-89.00,2959.30,-1120.00,110.90}},
- {"East Los Santos", {2421.00,-1628.50,-89.00,2632.80,-1454.30,110.90}},
- {"East Los Santos", {2222.50,-1628.50,-89.00,2421.00,-1494.00,110.90}},
- {"East Los Santos", {2266.20,-1494.00,-89.00,2381.60,-1372.00,110.90}},
- {"East Los Santos", {2381.60,-1494.00,-89.00,2421.00,-1454.30,110.90}},
- {"East Los Santos", {2281.40,-1372.00,-89.00,2381.60,-1135.00,110.90}},
- {"East Los Santos", {2381.60,-1454.30,-89.00,2462.10,-1135.00,110.90}},
- {"East Los Santos", {2462.10,-1454.30,-89.00,2581.70,-1135.00,110.90}},
- {"Easter Basin", {-1794.90,249.90,-9.10,-1242.90,578.30,200.00}},
- {"Easter Basin", {-1794.90,-50.00,-0.00,-1499.80,249.90,200.00}},
- {"Easter Bay Airport", {-1499.80,-50.00,-0.00,-1242.90,249.90,200.00}},
- {"Easter Bay Airport", {-1794.90,-730.10,-3.00,-1213.90,-50.00,200.00}},
- {"Easter Bay Airport", {-1213.90,-730.10,0.00,-1132.80,-50.00,200.00}},
- {"Easter Bay Airport", {-1242.90,-50.00,0.00,-1213.90,578.30,200.00}},
- {"Easter Bay Airport", {-1213.90,-50.00,-4.50,-947.90,578.30,200.00}},
- {"Easter Bay Airport", {-1315.40,-405.30,15.40,-1264.40,-209.50,25.40}},
- {"Easter Bay Airport", {-1354.30,-287.30,15.40,-1315.40,-209.50,25.40}},
- {"Easter Bay Airport", {-1490.30,-209.50,15.40,-1264.40,-148.30,25.40}},
- {"Easter Bay Chemicals", {-1132.80,-768.00,0.00,-956.40,-578.10,200.00}},
- {"Easter Bay Chemicals", {-1132.80,-787.30,0.00,-956.40,-768.00,200.00}},
- {"El Castillo del Diablo", {-464.50,2217.60,0.00,-208.50,2580.30,200.00}},
- {"El Castillo del Diablo", {-208.50,2123.00,-7.60,114.00,2337.10,200.00}},
- {"El Castillo del Diablo", {-208.50,2337.10,0.00,8.40,2487.10,200.00}},
- {"El Corona", {1812.60,-2179.20,-89.00,1970.60,-1852.80,110.90}},
- {"El Corona", {1692.60,-2179.20,-89.00,1812.60,-1842.20,110.90}},
- {"El Quebrados", {-1645.20,2498.50,0.00,-1372.10,2777.80,200.00}},
- {"Esplanade East", {-1620.30,1176.50,-4.50,-1580.00,1274.20,200.00}},
- {"Esplanade East", {-1580.00,1025.90,-6.10,-1499.80,1274.20,200.00}},
- {"Esplanade East", {-1499.80,578.30,-79.60,-1339.80,1274.20,20.30}},
- {"Esplanade North", {-2533.00,1358.90,-4.50,-1996.60,1501.20,200.00}},
- {"Esplanade North", {-1996.60,1358.90,-4.50,-1524.20,1592.50,200.00}},
- {"Esplanade North", {-1982.30,1274.20,-4.50,-1524.20,1358.90,200.00}},
- {"Fallen Tree", {-792.20,-698.50,-5.30,-452.40,-380.00,200.00}},
- {"Fallow Bridge", {434.30,366.50,0.00,603.00,555.60,200.00}},
- {"Fern Ridge", {508.10,-139.20,0.00,1306.60,119.50,200.00}},
- {"Financial", {-1871.70,744.10,-6.10,-1701.30,1176.40,300.00}},
- {"Fisher's Lagoon", {1916.90,-233.30,-100.00,2131.70,13.80,200.00}},
- {"Flint Intersection", {-187.70,-1596.70,-89.00,17.00,-1276.60,110.90}},
- {"Flint Range", {-594.10,-1648.50,0.00,-187.70,-1276.60,200.00}},
- {"Fort Carson", {-376.20,826.30,-3.00,123.70,1220.40,200.00}},
- {"Foster Valley", {-2270.00,-430.20,-0.00,-2178.60,-324.10,200.00}},
- {"Foster Valley", {-2178.60,-599.80,-0.00,-1794.90,-324.10,200.00}},
- {"Foster Valley", {-2178.60,-1115.50,0.00,-1794.90,-599.80,200.00}},
- {"Foster Valley", {-2178.60,-1250.90,0.00,-1794.90,-1115.50,200.00}},
- {"Frederick Bridge", {2759.20,296.50,0.00,2774.20,594.70,200.00}},
- {"Gant Bridge", {-2741.40,1659.60,-6.10,-2616.40,2175.10,200.00}},
- {"Gant Bridge", {-2741.00,1490.40,-6.10,-2616.40,1659.60,200.00}},
- {"Ganton", {2222.50,-1852.80,-89.00,2632.80,-1722.30,110.90}},
- {"Ganton", {2222.50,-1722.30,-89.00,2632.80,-1628.50,110.90}},
- {"Garcia", {-2411.20,-222.50,-0.00,-2173.00,265.20,200.00}},
- {"Garcia", {-2395.10,-222.50,-5.30,-2354.00,-204.70,200.00}},
- {"Garver Bridge", {-1339.80,828.10,-89.00,-1213.90,1057.00,110.90}},
- {"Garver Bridge", {-1213.90,950.00,-89.00,-1087.90,1178.90,110.90}},
- {"Garver Bridge", {-1499.80,696.40,-179.60,-1339.80,925.30,20.30}},
- {"Glen Park", {1812.60,-1449.60,-89.00,1996.90,-1350.70,110.90}},
- {"Glen Park", {1812.60,-1100.80,-89.00,1994.30,-973.30,110.90}},
- {"Glen Park", {1812.60,-1350.70,-89.00,2056.80,-1100.80,110.90}},
- {"Green Palms", {176.50,1305.40,-3.00,338.60,1520.70,200.00}},
- {"Greenglass College", {964.30,1044.60,-89.00,1197.30,1203.20,110.90}},
- {"Greenglass College", {964.30,930.80,-89.00,1166.50,1044.60,110.90}},
- {"Hampton Barns", {603.00,264.30,0.00,761.90,366.50,200.00}},
- {"Hankypanky Point", {2576.90,62.10,0.00,2759.20,385.50,200.00}},
- {"Harry Gold Parkway", {1777.30,863.20,-89.00,1817.30,2342.80,110.90}},
- {"Hashbury", {-2593.40,-222.50,-0.00,-2411.20,54.70,200.00}},
- {"Hilltop Farm", {967.30,-450.30,-3.00,1176.70,-217.90,200.00}},
- {"Hunter Quarry", {337.20,710.80,-115.20,860.50,1031.70,203.70}},
- {"Idlewood", {1812.60,-1852.80,-89.00,1971.60,-1742.30,110.90}},
- {"Idlewood", {1812.60,-1742.30,-89.00,1951.60,-1602.30,110.90}},
- {"Idlewood", {1951.60,-1742.30,-89.00,2124.60,-1602.30,110.90}},
- {"Idlewood", {1812.60,-1602.30,-89.00,2124.60,-1449.60,110.90}},
- {"Idlewood", {2124.60,-1742.30,-89.00,2222.50,-1494.00,110.90}},
- {"Idlewood", {1971.60,-1852.80,-89.00,2222.50,-1742.30,110.90}},
- {"Jefferson", {1996.90,-1449.60,-89.00,2056.80,-1350.70,110.90}},
- {"Jefferson", {2124.60,-1494.00,-89.00,2266.20,-1449.60,110.90}},
- {"Jefferson", {2056.80,-1372.00,-89.00,2281.40,-1210.70,110.90}},
- {"Jefferson", {2056.80,-1210.70,-89.00,2185.30,-1126.30,110.90}},
- {"Jefferson", {2185.30,-1210.70,-89.00,2281.40,-1154.50,110.90}},
- {"Jefferson", {2056.80,-1449.60,-89.00,2266.20,-1372.00,110.90}},
- {"Julius Thruway East", {2623.10,943.20,-89.00,2749.90,1055.90,110.90}},
- {"Julius Thruway East", {2685.10,1055.90,-89.00,2749.90,2626.50,110.90}},
- {"Julius Thruway East", {2536.40,2442.50,-89.00,2685.10,2542.50,110.90}},
- {"Julius Thruway East", {2625.10,2202.70,-89.00,2685.10,2442.50,110.90}},
- {"Julius Thruway North", {2498.20,2542.50,-89.00,2685.10,2626.50,110.90}},
- {"Julius Thruway North", {2237.40,2542.50,-89.00,2498.20,2663.10,110.90}},
- {"Julius Thruway North", {2121.40,2508.20,-89.00,2237.40,2663.10,110.90}},
- {"Julius Thruway North", {1938.80,2508.20,-89.00,2121.40,2624.20,110.90}},
- {"Julius Thruway North", {1534.50,2433.20,-89.00,1848.40,2583.20,110.90}},
- {"Julius Thruway North", {1848.40,2478.40,-89.00,1938.80,2553.40,110.90}},
- {"Julius Thruway North", {1704.50,2342.80,-89.00,1848.40,2433.20,110.90}},
- {"Julius Thruway North", {1377.30,2433.20,-89.00,1534.50,2507.20,110.90}},
- {"Julius Thruway South", {1457.30,823.20,-89.00,2377.30,863.20,110.90}},
- {"Julius Thruway South", {2377.30,788.80,-89.00,2537.30,897.90,110.90}},
- {"Julius Thruway West", {1197.30,1163.30,-89.00,1236.60,2243.20,110.90}},
- {"Julius Thruway West", {1236.60,2142.80,-89.00,1297.40,2243.20,110.90}},
- {"Juniper Hill", {-2533.00,578.30,-7.60,-2274.10,968.30,200.00}},
- {"Juniper Hollow", {-2533.00,968.30,-6.10,-2274.10,1358.90,200.00}},
- {"K.A.C.C. Military Fuels", {2498.20,2626.50,-89.00,2749.90,2861.50,110.90}},
- {"Kincaid Bridge", {-1339.80,599.20,-89.00,-1213.90,828.10,110.90}},
- {"Kincaid Bridge", {-1213.90,721.10,-89.00,-1087.90,950.00,110.90}},
- {"Kincaid Bridge", {-1087.90,855.30,-89.00,-961.90,986.20,110.90}},
- {"King's", {-2329.30,458.40,-7.60,-1993.20,578.30,200.00}},
- {"King's", {-2411.20,265.20,-9.10,-1993.20,373.50,200.00}},
- {"King's", {-2253.50,373.50,-9.10,-1993.20,458.40,200.00}},
- {"LVA Freight Depot", {1457.30,863.20,-89.00,1777.40,1143.20,110.90}},
- {"LVA Freight Depot", {1375.60,919.40,-89.00,1457.30,1203.20,110.90}},
- {"LVA Freight Depot", {1277.00,1087.60,-89.00,1375.60,1203.20,110.90}},
- {"LVA Freight Depot", {1315.30,1044.60,-89.00,1375.60,1087.60,110.90}},
- {"LVA Freight Depot", {1236.60,1163.40,-89.00,1277.00,1203.20,110.90}},
- {"Las Barrancas", {-926.10,1398.70,-3.00,-719.20,1634.60,200.00}},
- {"Las Brujas", {-365.10,2123.00,-3.00,-208.50,2217.60,200.00}},
- {"Las Colinas", {1994.30,-1100.80,-89.00,2056.80,-920.80,110.90}},
- {"Las Colinas", {2056.80,-1126.30,-89.00,2126.80,-920.80,110.90}},
- {"Las Colinas", {2185.30,-1154.50,-89.00,2281.40,-934.40,110.90}},
- {"Las Colinas", {2126.80,-1126.30,-89.00,2185.30,-934.40,110.90}},
- {"Las Colinas", {2747.70,-1120.00,-89.00,2959.30,-945.00,110.90}},
- {"Las Colinas", {2632.70,-1135.00,-89.00,2747.70,-945.00,110.90}},
- {"Las Colinas", {2281.40,-1135.00,-89.00,2632.70,-945.00,110.90}},
- {"Las Payasadas", {-354.30,2580.30,2.00,-133.60,2816.80,200.00}},
- {"Las Venturas Airport", {1236.60,1203.20,-89.00,1457.30,1883.10,110.90}},
- {"Las Venturas Airport", {1457.30,1203.20,-89.00,1777.30,1883.10,110.90}},
- {"Las Venturas Airport", {1457.30,1143.20,-89.00,1777.40,1203.20,110.90}},
- {"Las Venturas Airport", {1515.80,1586.40,-12.50,1729.90,1714.50,87.50}},
- {"Last Dime Motel", {1823.00,596.30,-89.00,1997.20,823.20,110.90}},
- {"Leafy Hollow", {-1166.90,-1856.00,0.00,-815.60,-1602.00,200.00}},
- {"Liberty City", {-1000.00,400.00,1300.00,-700.00,600.00,1400.00}},
- {"Lil' Probe Inn", {-90.20,1286.80,-3.00,153.80,1554.10,200.00}},
- {"Linden Side", {2749.90,943.20,-89.00,2923.30,1198.90,110.90}},
- {"Linden Station", {2749.90,1198.90,-89.00,2923.30,1548.90,110.90}},
- {"Linden Station", {2811.20,1229.50,-39.50,2861.20,1407.50,60.40}},
- {"Little Mexico", {1701.90,-1842.20,-89.00,1812.60,-1722.20,110.90}},
- {"Little Mexico", {1758.90,-1722.20,-89.00,1812.60,-1577.50,110.90}},
- {"Los Flores", {2581.70,-1454.30,-89.00,2632.80,-1393.40,110.90}},
- {"Los Flores", {2581.70,-1393.40,-89.00,2747.70,-1135.00,110.90}},
- {"Los Santos International", {1249.60,-2394.30,-89.00,1852.00,-2179.20,110.90}},
- {"Los Santos International", {1852.00,-2394.30,-89.00,2089.00,-2179.20,110.90}},
- {"Los Santos International", {1382.70,-2730.80,-89.00,2201.80,-2394.30,110.90}},
- {"Los Santos International", {1974.60,-2394.30,-39.00,2089.00,-2256.50,60.90}},
- {"Los Santos International", {1400.90,-2669.20,-39.00,2189.80,-2597.20,60.90}},
- {"Los Santos International", {2051.60,-2597.20,-39.00,2152.40,-2394.30,60.90}},
- {"Marina", {647.70,-1804.20,-89.00,851.40,-1577.50,110.90}},
- {"Marina", {647.70,-1577.50,-89.00,807.90,-1416.20,110.90}},
- {"Marina", {807.90,-1577.50,-89.00,926.90,-1416.20,110.90}},
- {"Market", {787.40,-1416.20,-89.00,1072.60,-1310.20,110.90}},
- {"Market", {952.60,-1310.20,-89.00,1072.60,-1130.80,110.90}},
- {"Market", {1072.60,-1416.20,-89.00,1370.80,-1130.80,110.90}},
- {"Market", {926.90,-1577.50,-89.00,1370.80,-1416.20,110.90}},
- {"Market Station", {787.40,-1410.90,-34.10,866.00,-1310.20,65.80}},
- {"Martin Bridge", {-222.10,293.30,0.00,-122.10,476.40,200.00}},
- {"Missionary Hill", {-2994.40,-811.20,0.00,-2178.60,-430.20,200.00}},
- {"Montgomery", {1119.50,119.50,-3.00,1451.40,493.30,200.00}},
- {"Montgomery", {1451.40,347.40,-6.10,1582.40,420.80,200.00}},
- {"Montgomery Intersection", {1546.60,208.10,0.00,1745.80,347.40,200.00}},
- {"Montgomery Intersection", {1582.40,347.40,0.00,1664.60,401.70,200.00}},
- {"Mulholland", {1414.00,-768.00,-89.00,1667.60,-452.40,110.90}},
- {"Mulholland", {1281.10,-452.40,-89.00,1641.10,-290.90,110.90}},
- {"Mulholland", {1269.10,-768.00,-89.00,1414.00,-452.40,110.90}},
- {"Mulholland", {1357.00,-926.90,-89.00,1463.90,-768.00,110.90}},
- {"Mulholland", {1318.10,-910.10,-89.00,1357.00,-768.00,110.90}},
- {"Mulholland", {1169.10,-910.10,-89.00,1318.10,-768.00,110.90}},
- {"Mulholland", {768.60,-954.60,-89.00,952.60,-860.60,110.90}},
- {"Mulholland", {687.80,-860.60,-89.00,911.80,-768.00,110.90}},
- {"Mulholland", {737.50,-768.00,-89.00,1142.20,-674.80,110.90}},
- {"Mulholland", {1096.40,-910.10,-89.00,1169.10,-768.00,110.90}},
- {"Mulholland", {952.60,-937.10,-89.00,1096.40,-860.60,110.90}},
- {"Mulholland", {911.80,-860.60,-89.00,1096.40,-768.00,110.90}},
- {"Mulholland", {861.00,-674.80,-89.00,1156.50,-600.80,110.90}},
- {"Mulholland Intersection", {1463.90,-1150.80,-89.00,1812.60,-768.00,110.90}},
- {"North Rock", {2285.30,-768.00,0.00,2770.50,-269.70,200.00}},
- {"Ocean Docks", {2373.70,-2697.00,-89.00,2809.20,-2330.40,110.90}},
- {"Ocean Docks", {2201.80,-2418.30,-89.00,2324.00,-2095.00,110.90}},
- {"Ocean Docks", {2324.00,-2302.30,-89.00,2703.50,-2145.10,110.90}},
- {"Ocean Docks", {2089.00,-2394.30,-89.00,2201.80,-2235.80,110.90}},
- {"Ocean Docks", {2201.80,-2730.80,-89.00,2324.00,-2418.30,110.90}},
- {"Ocean Docks", {2703.50,-2302.30,-89.00,2959.30,-2126.90,110.90}},
- {"Ocean Docks", {2324.00,-2145.10,-89.00,2703.50,-2059.20,110.90}},
- {"Ocean Flats", {-2994.40,277.40,-9.10,-2867.80,458.40,200.00}},
- {"Ocean Flats", {-2994.40,-222.50,-0.00,-2593.40,277.40,200.00}},
- {"Ocean Flats", {-2994.40,-430.20,-0.00,-2831.80,-222.50,200.00}},
- {"Octane Springs", {338.60,1228.50,0.00,664.30,1655.00,200.00}},
- {"Old Venturas Strip", {2162.30,2012.10,-89.00,2685.10,2202.70,110.90}},
- {"Palisades", {-2994.40,458.40,-6.10,-2741.00,1339.60,200.00}},
- {"Palomino Creek", {2160.20,-149.00,0.00,2576.90,228.30,200.00}},
- {"Paradiso", {-2741.00,793.40,-6.10,-2533.00,1268.40,200.00}},
- {"Pershing Square", {1440.90,-1722.20,-89.00,1583.50,-1577.50,110.90}},
- {"Pilgrim", {2437.30,1383.20,-89.00,2624.40,1783.20,110.90}},
- {"Pilgrim", {2624.40,1383.20,-89.00,2685.10,1783.20,110.90}},
- {"Pilson Intersection", {1098.30,2243.20,-89.00,1377.30,2507.20,110.90}},
- {"Pirates in Men's Pants", {1817.30,1469.20,-89.00,2027.40,1703.20,110.90}},
- {"Playa del Seville", {2703.50,-2126.90,-89.00,2959.30,-1852.80,110.90}},
- {"Prickle Pine", {1534.50,2583.20,-89.00,1848.40,2863.20,110.90}},
- {"Prickle Pine", {1117.40,2507.20,-89.00,1534.50,2723.20,110.90}},
- {"Prickle Pine", {1848.40,2553.40,-89.00,1938.80,2863.20,110.90}},
- {"Prickle Pine", {1938.80,2624.20,-89.00,2121.40,2861.50,110.90}},
- {"Queens", {-2533.00,458.40,0.00,-2329.30,578.30,200.00}},
- {"Queens", {-2593.40,54.70,0.00,-2411.20,458.40,200.00}},
- {"Queens", {-2411.20,373.50,0.00,-2253.50,458.40,200.00}},
- {"Randolph Industrial Estate", {1558.00,596.30,-89.00,1823.00,823.20,110.90}},
- {"Redsands East", {1817.30,2011.80,-89.00,2106.70,2202.70,110.90}},
- {"Redsands East", {1817.30,2202.70,-89.00,2011.90,2342.80,110.90}},
- {"Redsands East", {1848.40,2342.80,-89.00,2011.90,2478.40,110.90}},
- {"Redsands West", {1236.60,1883.10,-89.00,1777.30,2142.80,110.90}},
- {"Redsands West", {1297.40,2142.80,-89.00,1777.30,2243.20,110.90}},
- {"Redsands West", {1377.30,2243.20,-89.00,1704.50,2433.20,110.90}},
- {"Redsands West", {1704.50,2243.20,-89.00,1777.30,2342.80,110.90}},
- {"Regular Tom", {-405.70,1712.80,-3.00,-276.70,1892.70,200.00}},
- {"Richman", {647.50,-1118.20,-89.00,787.40,-954.60,110.90}},
- {"Richman", {647.50,-954.60,-89.00,768.60,-860.60,110.90}},
- {"Richman", {225.10,-1369.60,-89.00,334.50,-1292.00,110.90}},
- {"Richman", {225.10,-1292.00,-89.00,466.20,-1235.00,110.90}},
- {"Richman", {72.60,-1404.90,-89.00,225.10,-1235.00,110.90}},
- {"Richman", {72.60,-1235.00,-89.00,321.30,-1008.10,110.90}},
- {"Richman", {321.30,-1235.00,-89.00,647.50,-1044.00,110.90}},
- {"Richman", {321.30,-1044.00,-89.00,647.50,-860.60,110.90}},
- {"Richman", {321.30,-860.60,-89.00,687.80,-768.00,110.90}},
- {"Richman", {321.30,-768.00,-89.00,700.70,-674.80,110.90}},
- {"Robada Intersection", {-1119.00,1178.90,-89.00,-862.00,1351.40,110.90}},
- {"Roca Escalante", {2237.40,2202.70,-89.00,2536.40,2542.50,110.90}},
- {"Roca Escalante", {2536.40,2202.70,-89.00,2625.10,2442.50,110.90}},
- {"Rockshore East", {2537.30,676.50,-89.00,2902.30,943.20,110.90}},
- {"Rockshore West", {1997.20,596.30,-89.00,2377.30,823.20,110.90}},
- {"Rockshore West", {2377.30,596.30,-89.00,2537.30,788.80,110.90}},
- {"Rodeo", {72.60,-1684.60,-89.00,225.10,-1544.10,110.90}},
- {"Rodeo", {72.60,-1544.10,-89.00,225.10,-1404.90,110.90}},
- {"Rodeo", {225.10,-1684.60,-89.00,312.80,-1501.90,110.90}},
- {"Rodeo", {225.10,-1501.90,-89.00,334.50,-1369.60,110.90}},
- {"Rodeo", {334.50,-1501.90,-89.00,422.60,-1406.00,110.90}},
- {"Rodeo", {312.80,-1684.60,-89.00,422.60,-1501.90,110.90}},
- {"Rodeo", {422.60,-1684.60,-89.00,558.00,-1570.20,110.90}},
- {"Rodeo", {558.00,-1684.60,-89.00,647.50,-1384.90,110.90}},
- {"Rodeo", {466.20,-1570.20,-89.00,558.00,-1385.00,110.90}},
- {"Rodeo", {422.60,-1570.20,-89.00,466.20,-1406.00,110.90}},
- {"Rodeo", {466.20,-1385.00,-89.00,647.50,-1235.00,110.90}},
- {"Rodeo", {334.50,-1406.00,-89.00,466.20,-1292.00,110.90}},
- {"Royal Casino", {2087.30,1383.20,-89.00,2437.30,1543.20,110.90}},
- {"San Andreas Sound", {2450.30,385.50,-100.00,2759.20,562.30,200.00}},
- {"Santa Flora", {-2741.00,458.40,-7.60,-2533.00,793.40,200.00}},
- {"Santa Maria Beach", {342.60,-2173.20,-89.00,647.70,-1684.60,110.90}},
- {"Santa Maria Beach", {72.60,-2173.20,-89.00,342.60,-1684.60,110.90}},
- {"Shady Cabin", {-1632.80,-2263.40,-3.00,-1601.30,-2231.70,200.00}},
- {"Shady Creeks", {-1820.60,-2643.60,-8.00,-1226.70,-1771.60,200.00}},
- {"Shady Creeks", {-2030.10,-2174.80,-6.10,-1820.60,-1771.60,200.00}},
- {"Sobell Rail Yards", {2749.90,1548.90,-89.00,2923.30,1937.20,110.90}},
- {"Spinybed", {2121.40,2663.10,-89.00,2498.20,2861.50,110.90}},
- {"Starfish Casino", {2437.30,1783.20,-89.00,2685.10,2012.10,110.90}},
- {"Starfish Casino", {2437.30,1858.10,-39.00,2495.00,1970.80,60.90}},
- {"Starfish Casino", {2162.30,1883.20,-89.00,2437.30,2012.10,110.90}},
- {"Temple", {1252.30,-1130.80,-89.00,1378.30,-1026.30,110.90}},
- {"Temple", {1252.30,-1026.30,-89.00,1391.00,-926.90,110.90}},
- {"Temple", {1252.30,-926.90,-89.00,1357.00,-910.10,110.90}},
- {"Temple", {952.60,-1130.80,-89.00,1096.40,-937.10,110.90}},
- {"Temple", {1096.40,-1130.80,-89.00,1252.30,-1026.30,110.90}},
- {"Temple", {1096.40,-1026.30,-89.00,1252.30,-910.10,110.90}},
- {"The Camel's Toe", {2087.30,1203.20,-89.00,2640.40,1383.20,110.90}},
- {"The Clown's Pocket", {2162.30,1783.20,-89.00,2437.30,1883.20,110.90}},
- {"The Emerald Isle", {2011.90,2202.70,-89.00,2237.40,2508.20,110.90}},
- {"The Farm", {-1209.60,-1317.10,114.90,-908.10,-787.30,251.90}},
- {"The Four Dragons Casino", {1817.30,863.20,-89.00,2027.30,1083.20,110.90}},
- {"The High Roller", {1817.30,1283.20,-89.00,2027.30,1469.20,110.90}},
- {"The Mako Span", {1664.60,401.70,0.00,1785.10,567.20,200.00}},
- {"The Panopticon", {-947.90,-304.30,-1.10,-319.60,327.00,200.00}},
- {"The Pink Swan", {1817.30,1083.20,-89.00,2027.30,1283.20,110.90}},
- {"The Sherman Dam", {-968.70,1929.40,-3.00,-481.10,2155.20,200.00}},
- {"The Strip", {2027.40,863.20,-89.00,2087.30,1703.20,110.90}},
- {"The Strip", {2106.70,1863.20,-89.00,2162.30,2202.70,110.90}},
- {"The Strip", {2027.40,1783.20,-89.00,2162.30,1863.20,110.90}},
- {"The Strip", {2027.40,1703.20,-89.00,2137.40,1783.20,110.90}},
- {"The Visage", {1817.30,1863.20,-89.00,2106.70,2011.80,110.90}},
- {"The Visage", {1817.30,1703.20,-89.00,2027.40,1863.20,110.90}},
- {"Unity Station", {1692.60,-1971.80,-20.40,1812.60,-1932.80,79.50}},
- {"Valle Ocultado", {-936.60,2611.40,2.00,-715.90,2847.90,200.00}},
- {"Verdant Bluffs", {930.20,-2488.40,-89.00,1249.60,-2006.70,110.90}},
- {"Verdant Bluffs", {1073.20,-2006.70,-89.00,1249.60,-1842.20,110.90}},
- {"Verdant Bluffs", {1249.60,-2179.20,-89.00,1692.60,-1842.20,110.90}},
- {"Verdant Meadows", {37.00,2337.10,-3.00,435.90,2677.90,200.00}},
- {"Verona Beach", {647.70,-2173.20,-89.00,930.20,-1804.20,110.90}},
- {"Verona Beach", {930.20,-2006.70,-89.00,1073.20,-1804.20,110.90}},
- {"Verona Beach", {851.40,-1804.20,-89.00,1046.10,-1577.50,110.90}},
- {"Verona Beach", {1161.50,-1722.20,-89.00,1323.90,-1577.50,110.90}},
- {"Verona Beach", {1046.10,-1722.20,-89.00,1161.50,-1577.50,110.90}},
- {"Vinewood", {787.40,-1310.20,-89.00,952.60,-1130.80,110.90}},
- {"Vinewood", {787.40,-1130.80,-89.00,952.60,-954.60,110.90}},
- {"Vinewood", {647.50,-1227.20,-89.00,787.40,-1118.20,110.90}},
- {"Vinewood", {647.70,-1416.20,-89.00,787.40,-1227.20,110.90}},
- {"Whitewood Estates", {883.30,1726.20,-89.00,1098.30,2507.20,110.90}},
- {"Whitewood Estates", {1098.30,1726.20,-89.00,1197.30,2243.20,110.90}},
- {"Willowfield", {1970.60,-2179.20,-89.00,2089.00,-1852.80,110.90}},
- {"Willowfield", {2089.00,-2235.80,-89.00,2201.80,-1989.90,110.90}},
- {"Willowfield", {2089.00,-1989.90,-89.00,2324.00,-1852.80,110.90}},
- {"Willowfield", {2201.80,-2095.00,-89.00,2324.00,-1989.90,110.90}},
- {"Willowfield", {2541.70,-1941.40,-89.00,2703.50,-1852.80,110.90}},
- {"Willowfield", {2324.00,-2059.20,-89.00,2541.70,-1852.80,110.90}},
- {"Willowfield", {2541.70,-2059.20,-89.00,2703.50,-1941.40,110.90}},
- {"Yellow Bell Station", {1377.40,2600.40,-21.90,1492.40,2687.30,78.00}},
- {"Los Santos", {44.60,-2892.90,-242.90,2997.00,-768.00,900.00}},
- {"Las Venturas", {869.40,596.30,-242.90,2997.00,2993.80,900.00}},
- {"Bone County", {-480.50,596.30,-242.90,869.40,2993.80,900.00}},
- {"Tierra Robada", {-2997.40,1659.60,-242.90,-480.50,2993.80,900.00}},
- {"Tierra Robada", {-1213.90,596.30,-242.90,-480.50,1659.60,900.00}},
- {"San Fierro", {-2997.40,-1115.50,-242.90,-1213.90,1659.60,900.00}},
- {"Red County", {-1213.90,-768.00,-242.90,2997.00,596.30,900.00}},
- {"Flint County", {-1213.90,-2892.90,-242.90,44.60,-768.00,900.00}},
- {"Whetstone", {-2997.40,-2892.90,-242.90,-1213.90,-1115.50,900.00}}
- };
- new PropInfo[MAX_PROPERTIES][propinfo];
- new PlayerProps[MAX_PLAYERS];
- new EarningsForPlayer[MAX_PLAYERS];
- new Logged[MAX_PLAYERS];
- new HaveWatch[MAX_PLAYERS];
- new HaveMobilePhone[MAX_PLAYERS];
- new HaveMusicPlayer[MAX_PLAYERS];
- new HaveAlcohol[MAX_PLAYERS];
- new HaveDrink[MAX_PLAYERS];
- new HaveSnack[MAX_PLAYERS];
- new HaveDrivingLic[MAX_PLAYERS];
- new DTimer[MAX_PLAYERS];
- new Spawned[MAX_PLAYERS];
- new JustDied[MAX_PLAYERS];
- new HaveCigarette[MAX_PLAYERS];
- new FishTimer[MAX_PLAYERS];
- new DinerExit;
- new HaveFish[MAX_PLAYERS];
- new JailTimer[MAX_PLAYERS];
- new PlayerDiner[MAX_PLAYERS];
- new FishingLicense[MAX_PLAYERS];
- new DinerIn[15];
- new Restaurant;
- new PlayerBank[MAX_PLAYERS];
- new Text:SFRPg;
- new Market;
- new InfoDisplayed[MAX_PLAYERS];
- new CityhallGoIn;
- new DrivingSchoolLimit[MAX_PLAYERS];
- new Drivingschoolcar[MAX_PLAYERS];
- new Drivingschoolpickup;
- new DTestCompleted[MAX_PLAYERS];
- //
- #define INACTIVE_PLAYER_ID 255
- #define SPAWN_GAS_MIN 50 //Minimum amount of "Fuel" available when a vehicle spawns
- #define SPAWN_GAS_MAX 100 //Maximum amount of "Fuel" available when a vehicle spawns
- #define NUMVALUES 4
- forward Speedometer();
- forward Wage();
- forward Random(min, max);
- forward ReFill(playerid);
- forward IsPlayerInFuelStation(playerid);
- forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
- forward ExitArea();
- forward DSLimit(playerid);
- forward Fishing(playerid);
- forward LocationUpdate();
- //Org Things
- new SFPD[5];
- new SFPDPick;
- new SFFDPick;
- new SFFD[3];
- new TriadCars[5];
- new TriadsPick;
- //
- new ClothesShop[5];
- new ElectronicsDealer;
- new DoNOTDeleteThis;
- new BarPickup[2];
- new IsLogged[MAX_PLAYERS];
- new pBank[MAX_PLAYERS];
- new Job[MAX_PLAYERS];
- new OrgLeader[MAX_PLAYERS];
- new Text:Speedom[MAX_PLAYERS];
- new ReFuelTimer[MAX_PLAYERS], OldFuel[MAX_PLAYERS];
- new Refueling[MAX_PLAYERS];
- new Float:Fuel[MAX_VEHICLES];
- new Wanted[MAX_PLAYERS];
- new ShowSpeed[MAX_PLAYERS];
- new IsInJail[MAX_PLAYERS];
- new Float:OldCoordsX[MAX_PLAYERS], Float:OldCoordsY[MAX_PLAYERS];
- new FirstSpawn[MAX_PLAYERS];
- new PlayerWage[MAX_PLAYERS];
- new Firstvisit[MAX_PLAYERS];
- new Float:LoginPosX[MAX_PLAYERS],Float:LoginPosY[MAX_PLAYERS],Float:LoginPosZ[MAX_PLAYERS];
- new AdminLevel[MAX_PLAYERS];
- new Muted[MAX_PLAYERS];
- new PlayerOwnSkin[MAX_PLAYERS];
- new Bankin[5];
- new Text:location[MAX_PLAYERS];
- new PFStyle[MAX_PLAYERS];
- new Gym;
- //Vehicle names for speedometer
- new VehiclesName[][] = {
- "Landstalker","Bravura","Buffalo","Linerunner","Perennial","Sentinel","Dumper","Firetruck","Trashmaster","Stretch","Manana","Infernus",
- "Voodoo","Pony","Mule","Cheetah","Ambulance","Leviathan","Moonbeam","Esperanto","Taxi","Washington","Bobcat","Mr Whoopee","BF Injection",
- "Hunter","Premier","Enforcer","Securicar","Banshee","Predator","Bus","Rhino","Barracks","Hotknife","Trailer","Previon","Coach","Cabbie",
- "Stallion","Rumpo","RC Bandit","Romero","Packer","Monster","Admiral","Squalo","Seasparrow","Pizzaboy","Tram","Trailer","Turismo","Speeder",
- "Reefer","Tropic","Flatbed","Yankee","Caddy","Solair","Berkley's RC Van","Skimmer","PCJ-600","Faggio","Freeway","RC Baron","RC Raider",
- "Glendale","Oceanic","Sanchez","Sparrow","Patriot","Quad","Coastguard","Dinghy","Hermes","Sabre","Rustler","ZR-350","Walton","Regina",
- "Comet","BMX","Burrito","Camper","Marquis","Baggage","Dozer","Maverick","News Chopper","Rancher","FBI Rancher","Virgo","Greenwood",
- "Jetmax","Hotring","Sandking","Blista Compact","Police Maverick","Boxville","Benson","Mesa","RC Goblin","Hotring Racer","Hotring Racer",
- "Bloodring Banger","Rancher","Super GT","Elegant","Journey","Bike","Mountain Bike","Beagle","Cropdust","Stunt","Tanker","Roadtrain",
- "Nebula","Majestic","Buccaneer","Shamal","Hydra","FCR-900","NRG-500","HPV1000","Cement Truck","Tow Truck","Fortune","Cadrona","FBI Truck",
- "Willard","Forklift","Tractor","Combine","Feltzer","Remington","Slamvan","Blade","Freight","Streak","Vortex","Vincent","Bullet","Clover",
- "Sadler","Firetruck","Hustler","Intruder","Primo","Cargobob","Tampa","Sunrise","Merit","Utility","Nevada","Yosemite","Windsor","Monster A",
- "Monster B","Uranus","Jester","Sultan","Stratum","Elegy","Raindance","RC Tiger","Flash","Tahoma","Savanna","Bandito","Freight","Trailer",
- "Kart","Mower","Duneride","Sweeper","Broadway","Tornado","AT-400","DFT-30","Huntley","Stafford","BF-400","Newsvan","Tug","Trailer","Emperor",
- "Wayfarer","Euros","Hotdog","Club","Trailer B","Trailer C","Andromada","Dodo","RC Cam","Launch","Police Car","Police Car",
- "Police Car","Police Ranger","Picador","S.W.A.T.","Alpha","Phoenix","Glendale","Sadler","Luggage Trailer","Luggage Trailer",
- "Stair Trailer","Boxville","Farm Plow","Utility Trailer"
- };
- forward SetupPlayerForClassSelection(playerid);
- forward StatsSave();
- forward ScoreUpgrade();
- forward Unjail(playerid);
- //------------------------------------------------------------------------------------------------------
- main()
- {
- print("SAN FIERRO RPg- GAMEMODE");
- print("Coded by Jakku");
- print("Copyright (C) 2010");
- }
- //------------------------------------------------------------------------------------------------------
- public ExitArea()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if (IsPlayerInRangeOfPoint(i,2.0,4023.0314,-5358.7080,1750.7492))
- {
- SetPlayerInterior(i, 0);
- SetPlayerPos(i, -2761.8596,374.6866,5.3951);
- InfoDisplayed[i] = 0;
- }
- if (IsPlayerInRangeOfPoint(i,2.0,3994.6289,-5358.9160,1750.7192)) {
- if (InfoDisplayed[i] == 0) {
- ShowPlayerDialog(i, 7, DIALOG_STYLE_LIST, "Cityhall", "Fishing License\nBank Balance", "Ok", "Cancel");
- InfoDisplayed[i] = 1;
- }
- }
- if (IsPlayerInRangeOfPoint(i,2.0,4704.0083,-5835.2187,3382.0202))
- {
- PlayerBank[i] = 0;
- SetPlayerInterior(i, 0);
- SetPlayerPos(i,-1707.5295,786.3246,24.7343);
- }
- }
- }
- public LocationUpdate()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if (IsLogged[i] == 1) {
- new string[50];
- new zone[28];
- GetPlayerZone(i, zone,MAX_ZONE_NAME);
- format(string, sizeof(string), "%s", zone);
- TextDrawSetString(location[i],string);
- if (GetPlayerInterior(i) > 0) {
- TextDrawSetString(location[i],"~b~Inside a building");
- }
- }
- }
- }
- public Fishing(playerid)
- {
- new rand = random(5);
- if (IsPlayerInRangeOfPoint(playerid, 20.0,-1313.3784,1296.0788,1.5658)) {
- if (rand == 2) {
- HaveFish[playerid] = 1;
- SendClientMessage(playerid, COLOR_YELLOW,"You have caught a fish!");
- }
- if (rand == 5) {
- HaveFish[playerid] = 1;
- SendClientMessage(playerid, COLOR_YELLOW,"You have caught a fish!");
- }
- if (rand == 3) {
- HaveFish[playerid] = 1;
- SendClientMessage(playerid, COLOR_YELLOW,"You have caught a fish!");
- }
- if (rand == 1) {
- SendClientMessage(playerid, COLOR_YELLOW,"You caught nothing at this time. Better luck next time!");
- }
- if (rand == 4) {
- SendClientMessage(playerid, COLOR_YELLOW,"You caught nothing at this time. Better luck next time!");
- }
- KillTimer(FishTimer[playerid]);
- }
- }
- public DSLimit(playerid)
- {
- DrivingSchoolLimit[playerid] +=1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- Fuel[vehicleid] = Random(SPAWN_GAS_MIN, SPAWN_GAS_MAX);
- return true;
- }
- public StatsSave()
- {
- new file[128];
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- //
- if (IsLogged[i]) {
- new name[24];
- new Float:x,Float:y,Float:z;
- GetPlayerName(i, name,24);
- format(file,sizeof(file),"%s.ini",name);
- dini_Create(file);
- dini_IntSet(file,"Cash", GetPlayerMoney(i));
- dini_IntSet(file,"Score", GetPlayerScore(i));
- dini_IntSet(file,"Interior", GetPlayerInterior(i));
- dini_IntSet(file,"Bank", pBank[i]);
- dini_IntSet(file,"Org", Job[i]);
- dini_IntSet(file,"Org_leader", OrgLeader[i]);
- dini_IntSet(file,"Admin_level", AdminLevel[i]);
- dini_IntSet(file,"Earned_Wage", PlayerWage[i]);
- dini_IntSet(file,"Mobilephone", HaveMobilePhone[i]);
- dini_IntSet(file,"Musicplayer", HaveMusicPlayer[i]);
- dini_IntSet(file,"Watch", HaveWatch[i]);
- dini_IntSet(file,"AlcoholDrink", HaveAlcohol[i]);
- dini_IntSet(file,"Drink", HaveDrink[i]);
- dini_IntSet(file,"Driving_license", HaveDrivingLic[i]);
- dini_IntSet(file,"Have_fish", HaveFish[i]);
- dini_IntSet(file,"Snack", HaveSnack[i]);
- dini_IntSet(file,"Cigarette", HaveCigarette[i]);
- dini_IntSet(file,"Inside_diner", PlayerDiner[i]);
- dini_IntSet(file,"Inside_bank", PlayerBank[i]);
- dini_IntSet(file,"Fighting_style", PFStyle[i]);
- GetPlayerPos(i,x,y,z);
- dini_IntSet(file,"X",floatround(x));
- dini_IntSet(file,"Y",floatround(y));
- dini_IntSet(file,"Z",floatround(z));
- }
- }
- }
- public ScoreUpgrade()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if (IsLogged[i]) {
- new string[170];
- SetPlayerScore(i,GetPlayerScore(i)+1);
- GivePlayerMoney(i,5000);
- format(string, sizeof(string), "Your score has been upgraded. You have earned $5000!");
- SendClientMessage(i, COLOR_YELLOW,string);
- }
- }
- }
- public Unjail(playerid)
- {
- if (IsInJail[playerid]) {
- SendClientMessage(playerid, COLOR_POWDERBLUE,"You have been unjailed");
- TogglePlayerControllable(playerid,1);
- IsInJail[playerid] = 0;
- KillTimer(JailTimer[playerid]);
- }
- }
- public Wage()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if (Job[i]) {
- SendClientMessage(i, COLOR_POWDERBLUE,"You've earned from your organization");
- PlayerWage[i] +=150;
- }
- }
- }
- //------------------------------------------------------------------------------------------------------
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- new string[170];
- new propid = -1;
- for(new id; id<MAX_PROPERTIES; id++)
- {
- if(PropInfo[id][PickupNr] == pickupid)
- {
- propid = id;
- break;
- }
- }
- if(propid != -1)
- {
- new str[128];
- new name[24];
- GetPlayerName(playerid, name, 24);
- new ownerid = GetPlayerID(PropInfo[propid][PropOwner]);
- if(InfoShowed[playerid] == 0) {
- if (ownerid == playerid) {
- format(str, 128, "Welcome to your property %s!",name);
- SendClientMessage(playerid, 0xFFFF00AA, str);
- SendClientMessage(playerid, 0xFFFF00AA,"Type /propinfo for information about your property");
- InfoShowed[playerid] = 1;
- }
- if(ownerid != playerid) {
- if(PropInfo[propid][PropUnbuyableTime] == 0)
- {
- format(str, 128, "You can buy this property for $%d! Type /buyprop to buy it or /propinfo for more information", PropInfo[propid][PropValue]);
- SendClientMessage(playerid, 0xFFFF00AA, str);
- GameTextForPlayer(playerid, "~g~Property for sale", 3500, 3);
- InfoShowed[playerid] = 1;
- return 1;
- }
- format(str, 128, "Welcome to %s's property! Type /propinfo for information about this property",PropInfo[propid][PropOwner]);
- SendClientMessage(playerid, 0xFFFF00AA, str);
- GameTextForPlayer(playerid, "~r~Property owned", 3500, 3);
- InfoShowed[playerid] = 1;
- }
- }
- }
- if (pickupid == SFPDPick) {
- if (Job[playerid] != 1) SendClientMessage(playerid, COLOR_POWDERBLUE,"Welcome to the HQ of San Fierro Police Department!");
- if (Job[playerid] == 1) {
- format(string, sizeof(string), "Welcome back to your HQ. You have collected $%d wage!", PlayerWage[playerid]);
- GivePlayerMoney(playerid, PlayerWage[playerid]);
- PlayerWage[playerid] = 0;
- }
- }
- if (pickupid == SFFDPick) {
- if (Job[playerid] != 2) SendClientMessage(playerid, COLOR_POWDERBLUE,"Welcome to the HQ of San Fierro Fire Department!");
- if (Job[playerid] == 2) {
- format(string, sizeof(string), "Welcome back to your HQ. You have collected $%d wage!", PlayerWage[playerid]);
- GivePlayerMoney(playerid, PlayerWage[playerid]);
- PlayerWage[playerid] = 0;
- }
- }
- if (pickupid == TriadsPick) {
- if (Job[playerid] != 3) SendClientMessage(playerid, COLOR_POWDERBLUE,"Welcome to the HQ of The Triads!");
- if (Job[playerid] == 3) {
- if (PlayerWage[playerid] > 0) return SendClientMessage(playerid, COLOR_GREEN,"Welcome back to your HQ. You have no wage to collect. Come back later");
- format(string, sizeof(string), "Welcome back to your HQ. You have collected $%d wage!", PlayerWage[playerid]);
- GivePlayerMoney(playerid, PlayerWage[playerid]);
- PlayerWage[playerid] = 0;
- }
- }
- if (pickupid == ClothesShop[0]) {
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Victim", "Clothes 1\nClothes 2\nClothes 3", "Purchase", "Cancel");
- }
- if (pickupid == ClothesShop[1]) {
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "ZIP", "Clothes 1\nClothes 2\nClothes 3", "Purchase", "Cancel");
- }
- if (pickupid == ClothesShop[2]) {
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Binco", "Clothes 1\nClothes 2\nClothes 3", "Purchase", "Cancel");
- }
- if (pickupid == ClothesShop[3]) {
- ShowPlayerDialog(playerid, 1, DIALOG_STYLE_LIST, "Sub Urban", "Clothes 1\nClothes 2\nClothes 3", "Purchase", "Cancel");
- }
- if (pickupid == DoNOTDeleteThis) {
- //If you delete this pickup, the property system won't work properly!! SO DON'T DELETE THIS
- }
- if (pickupid == ElectronicsDealer) {
- ShowPlayerDialog(playerid, 2, DIALOG_STYLE_LIST, "Electronics Dealer", "Mobile Phone - $1000\nWatch - $300\nMusic Player - $200", "Purchase", "Cancel");
- }
- if (pickupid == BarPickup[0]) {
- ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Boozer", "Whiskey - $10\nVodka - $5\nBeer - $5\nCoke - $2\nWater - $1", "Purchase", "Cancel");
- }
- if (pickupid == BarPickup[1]) {
- ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Boozer", "Whiskey - $10\nVodka - $5\nBeer - $5\nCoke - $2\nWater - $1", "Purchase", "Cancel");
- }
- if (pickupid == CityhallGoIn) {
- SetPlayerInterior(playerid,2);
- SetPlayerPos(playerid,4015.8823,-5358.7812,1750.7492);
- SendClientMessage(playerid, COLOR_YELLOW, "Welcome to the Cityhall!");
- }
- if (pickupid == Drivingschoolpickup) {
- ShowPlayerDialog(playerid, 6, DIALOG_STYLE_LIST, "Driving School", "Take Test - $1000\nObtain License - $300", "Ok", "Cancel");
- }
- if (pickupid == Market) {
- ShowPlayerDialog(playerid, 8, DIALOG_STYLE_LIST, "24/7", "Snack - $5\nCigarette - $10", "Purchase", "Cancel");
- }
- if (pickupid == DinerExit) {
- if (PlayerDiner[playerid] == 1)
- {
- PlayerDiner[playerid] = 0;
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid,-2275.7365,596.2686,39.3008);
- }
- if (PlayerDiner[playerid] == 2)
- {
- PlayerDiner[playerid] = 0;
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid,-2094.5588,715.2969,69.5625);
- }
- if (PlayerDiner[playerid] == 3)
- {
- PlayerDiner[playerid] = 0;
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid,-2426.1252,-136.2638,35.1718);
- }
- if (PlayerDiner[playerid] == 4)
- {
- PlayerDiner[playerid] = 0;
- SetPlayerInterior(playerid, 0);
- SetPlayerPos(playerid,-2520.8500,1216.7348,37.4283);
- }
- //
- }
- for(new i=0; i<sizeof(DinerIn); i++)
- {
- if (pickupid == DinerIn[i])
- {
- if (IsPlayerInRangeOfPoint(playerid, 10.0,-2279.2070,595.8998,39.2132))
- {
- SetPlayerDiner(playerid, 1);
- }
- if (IsPlayerInRangeOfPoint(playerid, 10.0,-2099.2145,715.3974,69.5625))
- {
- SetPlayerDiner(playerid, 2);
- }
- if (IsPlayerInRangeOfPoint(playerid, 10.0,-2430.6308,-136.2021,35.3203))
- {
- SetPlayerDiner(playerid, 3);
- }
- if (IsPlayerInRangeOfPoint(playerid, 10.0,-2523.4770,1216.2227,37.4283))
- {
- SetPlayerDiner(playerid, 4);
- }
- }
- }
- for(new i=0; i<sizeof(Bankin); i++)
- {
- if (pickupid == Bankin[i])
- {
- if (IsPlayerInRangeOfPoint(playerid, 10.0,-1704.2038,785.6531,25.5571))
- {
- SetPlayerBank(playerid, 1);
- }
- }
- }
- if (pickupid == Restaurant)
- {
- ShowPlayerDialog(playerid, 9, DIALOG_STYLE_LIST, "Diner", "Juice - $5\nHamburger - $10\nChocolate - $5", "Purchase", "Cancel");
- }
- if (pickupid == Gym)
- {
- ShowPlayerDialog(playerid, 11, DIALOG_STYLE_LIST, "Gym", "Elbow\nGrabkick\nKneehead", "Purchase", "Cancel");
- }
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == 1 && response)
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, COLOR_ORED, "You don't have enough money!");
- if (PlayerOwnSkin[playerid] == 170) return SendClientMessage(playerid, COLOR_ORED, "You already own this skin!");
- SetPlayerSkin(playerid, 170);
- SendClientMessage(playerid, COLOR_YELLOW, "You have bought this skin for $50");
- GivePlayerMoney(playerid, -50);
- PlayerOwnSkin[playerid] = GetPlayerSkin(playerid);
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, COLOR_ORED, "You don't have enough money!");
- if (PlayerOwnSkin[playerid] == 184) return SendClientMessage(playerid, COLOR_ORED, "You already own this skin!");
- SetPlayerSkin(playerid, 184);
- GivePlayerMoney(playerid, -50);
- SendClientMessage(playerid, COLOR_YELLOW, "You have bought this skin for $50");
- PlayerOwnSkin[playerid] = GetPlayerSkin(playerid);
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) < 50) return SendClientMessage(playerid, COLOR_ORED, "You don't have enough money!");
- if (PlayerOwnSkin[playerid] == 188) return SendClientMessage(playerid, COLOR_ORED, "You already own this skin!");
- SetPlayerSkin(playerid, 188);
- GivePlayerMoney(playerid, -50);
- SendClientMessage(playerid, COLOR_YELLOW, "You have bought this skin for $50");
- PlayerOwnSkin[playerid] = GetPlayerSkin(playerid);
- }
- }
- }
- if(dialogid == 2 && response)
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 1000) return SendClientMessage(playerid, COLOR_ORED, "You don't have enough money!");
- if (HaveMobilePhone[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already have this item!");
- GivePlayerMoney(playerid,-1000);
- HaveMobilePhone[playerid] = 1;
- SendClientMessage(playerid, COLOR_YELLOW,"You have bought a mobile phone for $1000");
- SendClientMessage(playerid, COLOR_YELLOW,"Type /phonehelp for a guide");
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) < 300) return SendClientMessage(playerid, COLOR_ORED, "You don't have enough money!");
- if (HaveWatch[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already have this item!");
- GivePlayerMoney(playerid,-300);
- HaveWatch[playerid] = 1;
- SendClientMessage(playerid, COLOR_YELLOW,"You have bought a watch for $300");
- SendClientMessage(playerid, COLOR_YELLOW,"The time will now appear in the right up of your screen");
- TogglePlayerClock(playerid, 1);
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid, COLOR_ORED, "You don't have enough money!");
- if (HaveMusicPlayer[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already have this item!");
- GivePlayerMoney(playerid,-200);
- HaveMusicPlayer[playerid] = 1;
- SendClientMessage(playerid, COLOR_YELLOW,"You have bought a music player for $200");
- SendClientMessage(playerid, COLOR_YELLOW,"Type /mp to use it");
- }
- }
- }
- if(dialogid == 3 && response)
- {
- switch(listitem)
- {
- case 0:
- {
- SendClientMessage(playerid, COLOR_YELLOW,"Playing Track 1");
- PlayerPlaySound(playerid, 1187, 0.0, 0.0, 0.0);
- }
- case 1:
- {
- SendClientMessage(playerid, COLOR_YELLOW,"Playing Track 2");
- PlayerPlaySound(playerid, 1185, 0.0, 0.0, 0.0);
- }
- case 2:
- {
- SendClientMessage(playerid, COLOR_YELLOW,"Playing Track 3");
- PlayerPlaySound(playerid, 1183, 0.0, 0.0, 0.0);
- }
- case 3:
- {
- SendClientMessage(playerid, COLOR_YELLOW,"Playing Track 4");
- PlayerPlaySound(playerid, 1076, 0.0, 0.0, 0.0);
- }
- case 4:
- {
- SendClientMessage(playerid, COLOR_YELLOW,"Stopped");
- PlayerPlaySound(playerid, 1184, 0.0, 0.0, 0.0);
- }
- }
- }
- if(dialogid == 4 && response)
- {
- switch(listitem)
- {
- case 0:
- //ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Boozer", "Whiskey - $10\nVodka - $5\nBeer - $5\nCoke - $2\nWater - $1", "Purchase", "Cancel");
- {
- if (HaveAlcohol[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already have an alcohol drink! Use it first");
- SendClientMessage(playerid, COLOR_WHITE,"You have bought a bottle of Whiskey for $10");
- HaveAlcohol[playerid] = 1;
- GivePlayerMoney(playerid, -10);
- }
- case 1:
- {
- if (HaveAlcohol[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already have an alcohol drink! Use it first");
- SendClientMessage(playerid, COLOR_WHITE,"You have bought a bottle of Vodka for $5");
- HaveAlcohol[playerid] = 1;
- GivePlayerMoney(playerid, -5);
- }
- case 2:
- {
- if (HaveAlcohol[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already have an alcohol drink! Use it first");
- SendClientMessage(playerid, COLOR_WHITE,"You have bought a bottle of Beer for $5");
- HaveAlcohol[playerid] = 1;
- GivePlayerMoney(playerid, -5);
- }
- case 3:
- {
- if (HaveDrink[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already have a drink! Use it first");
- SendClientMessage(playerid, COLOR_WHITE,"You have bought a glass of Coke for $2");
- GivePlayerMoney(playerid, -2);
- HaveDrink[playerid] = 1;
- }
- case 4:
- {
- if (HaveDrink[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already have a drink! Use it first");
- SendClientMessage(playerid, COLOR_WHITE,"You have bought a glass of Water for $1");
- GivePlayerMoney(playerid, -1);
- HaveDrink[playerid] = 1;
- }
- }
- }
- if(dialogid == 5 && response)
- {
- switch(listitem)
- {
- case 0:
- {
- if (HaveAlcohol[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You do not have this item!");
- SendClientMessage(playerid, COLOR_YELLOW,"You took a bottle from your pocket");
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_WINE);
- HaveAlcohol[playerid] = 0;
- }
- case 1:
- {
- if (HaveDrink[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You do not have this item!");
- SendClientMessage(playerid, COLOR_YELLOW,"You took a cup from your pocket");
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
- HaveDrink[playerid] = 0;
- }
- case 2:
- {
- if (HaveFish[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You do not have this item!");
- SendClientMessage(playerid, COLOR_YELLOW,"You took a fish from your pocket");
- OnePlayAnim(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
- HaveFish[playerid] = 0;
- GivePlayerHealth(playerid, 10.0);
- }
- case 3:
- {
- new Float:php;
- GetPlayerHealth(playerid, php);
- if (HaveCigarette[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You do not have this item!");
- SendClientMessage(playerid, COLOR_YELLOW,"You took a cigarette from your pocket");
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_SMOKE_CIGGY);
- HaveCigarette[playerid] = 0;
- GivePlayerHealth(playerid, -10.0);
- }
- case 4:
- {
- new Float:php;
- GetPlayerHealth(playerid, php);
- if (HaveSnack[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You do not have this item!");
- SendClientMessage(playerid, COLOR_YELLOW,"You took a snack from your pocket");
- OnePlayAnim(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
- HaveSnack[playerid] = 0;
- GivePlayerHealth(playerid, 10.0);
- }
- }
- }
- if(dialogid == 6 && response)
- {
- switch(listitem)
- {
- case 0:
- {
- if (DTimer[playerid]) return Nothing();
- if (HaveDrivingLic[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already have your driving license!");
- SetPlayerInterior(playerid,0);
- Drivingschoolcar[playerid] = CreateVehicle(535,-2035.1599,-96.2303,34.9270,88.9819,69,1,-1);
- PutPlayerInVehicle(playerid, Drivingschoolcar[playerid],0);
- SetPlayerCheckpoint(playerid,-1875.4793,915.8572,35.0090,4.0);
- GivePlayerMoney(playerid, -1000);
- DTimer[playerid] = SetTimerEx("DSLimit", 1000, 1, "d", playerid);
- SendClientMessage(playerid, COLOR_GREEN,"Driving Test started, follow the red blip in your minimap. Don't hurry but don't drive too slow!");
- }
- case 1:
- {
- if (DTimer[playerid]) return Nothing();
- if (HaveDrivingLic[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already have your driving license!");
- if (DTestCompleted[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You haven't completed the test yet!");
- HaveDrivingLic[playerid] = 1;
- SendClientMessage(playerid, COLOR_GREEN,"You have obtained your driving license!");
- GivePlayerMoney(playerid, -300);
- DTestCompleted[playerid] = 0;
- }
- }
- }
- if(dialogid == 7 && response)
- {
- switch(listitem)
- {
- case 0:
- {
- if (FishingLicense[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already have your fishing license!");
- if (3000 > GetPlayerMoney(playerid)) {
- SendClientMessage(playerid, COLOR_ORED,"Error: You need at least $3000!");
- InfoDisplayed[playerid] = 0;
- return 1;
- }
- FishingLicense[playerid] = 1;
- SendClientMessage(playerid, COLOR_GREEN,"You have bought a fishing license for $3000!");
- GivePlayerMoney(playerid, -3000);
- InfoDisplayed[playerid] = 0;
- }
- case 1:
- {
- new string[170];
- format(string, sizeof(string), "You currently have $%d in your bank!", pBank[playerid]);
- SendClientMessage(playerid, COLOR_YELLOW,string);
- InfoDisplayed[playerid] = 0;
- }
- }
- }
- if (dialogid == 7 && !response) InfoDisplayed[playerid] = 0;
- if(dialogid == 8 && response)
- {
- switch(listitem)
- {
- case 0:
- {
- if (HaveSnack[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already have this item!");
- if (5 > GetPlayerMoney(playerid)) return SendClientMessage(playerid, COLOR_ORED,"Error: You don't have enough money to buy this item!");
- HaveSnack[playerid] = 1;
- GivePlayerMoney(playerid, -5);
- SendClientMessage(playerid, COLOR_GREEN,"You have bought a Snack for $5");
- }
- case 1:
- {
- if (HaveCigarette[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already have this item!");
- if (10 > GetPlayerMoney(playerid)) return SendClientMessage(playerid, COLOR_ORED,"Error: You don't have enough money to buy this item!");
- HaveCigarette[playerid] = 1;
- GivePlayerMoney(playerid, -10);
- SendClientMessage(playerid, COLOR_GREEN,"You have bought a Cigarette for $5");
- }
- }
- }
- if(dialogid == 9 && response)
- {
- switch(listitem)
- {
- case 0:
- {
- new Float:HP;
- HP = GetPlayerHealth(playerid, HP);
- GivePlayerMoney(playerid, -5);
- SendClientMessage(playerid, COLOR_GREEN,"You have bought a Juice for $5");
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_DRINK_SPRUNK);
- GivePlayerHealth(playerid, 10.0);
- }
- case 1:
- {
- new Float:HP;
- HP = GetPlayerHealth(playerid, HP);
- GivePlayerMoney(playerid, -10);
- SendClientMessage(playerid, COLOR_GREEN,"You have bought a Hamburger for $10");
- OnePlayAnim(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
- GivePlayerHealth(playerid, 10.0);
- }
- case 2:
- {
- new Float:HP;
- HP = GetPlayerHealth(playerid, HP);
- GivePlayerMoney(playerid, -5);
- SendClientMessage(playerid, COLOR_GREEN,"You have bought a Chocolate for $5");
- OnePlayAnim(playerid, "FOOD", "EAT_Burger", 3.0, 0, 0, 0, 0, 0);
- GivePlayerHealth(playerid, 10.0);
- }
- }
- }
- if(dialogid == 11 && response)
- {
- switch(listitem)
- {
- case 0:
- {
- if (PFStyle[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You already know this style!");
- if (2500 > GetPlayerMoney(playerid)) return SendClientMessage(playerid, COLOR_ORED,"Error: You don't have enough money!");
- PFStyle[playerid] = 1;
- SendClientMessage(playerid, COLOR_YELLOW,"You have learnt a fighting style ^Elbow^");
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_ELBOW);
- }
- case 1:
- {
- if (PFStyle[playerid] == 2) return SendClientMessage(playerid, COLOR_ORED,"Error: You already know this style!");
- if (2500 > GetPlayerMoney(playerid)) return SendClientMessage(playerid, COLOR_ORED,"Error: You don't have enough money!");
- PFStyle[playerid] = 2;
- SendClientMessage(playerid, COLOR_YELLOW,"You have learnt a fighting style ^Grabkick^");
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK);
- }
- case 2:
- {
- if (PFStyle[playerid] == 3) return SendClientMessage(playerid, COLOR_ORED,"Error: You already know this style!");
- if (2500 > GetPlayerMoney(playerid)) return SendClientMessage(playerid, COLOR_ORED,"Error: You don't have enough money!");
- SendClientMessage(playerid, COLOR_YELLOW,"You have learnt a fighting style ^Kneehead^");
- PFStyle[playerid] = 3;
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);
- }
- }
- }
- return 1;
- }
- //------------------------------------------------------------------------------------------------------
- //------------------------------------------------------------------------------------------------------
- stock GivePlayerHealth(playerid, Float:health)
- {
- new Float:pHealth;
- GetPlayerHealth(playerid, pHealth);
- SetPlayerHealth(playerid, pHealth + health);
- }
- stock GetPlayerNameEx(playerid) {
- new name[24];
- GetPlayerName(playerid, name, 24);
- return name;
- }
- stock Nothing()
- {
- // :/
- return 1;
- }
- stock GetPlayerZone(playerid, zone[], len) //Credits to Cueball, Betamaster, Mabako, and Simon (for finetuning).
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- for(new i = 0; i != sizeof(gSAZones); i++ )
- {
- if(x >= gSAZones[i][SAZONE_AREA][0] && x <= gSAZones[i][SAZONE_AREA][3] && y >= gSAZones[i][SAZONE_AREA][1] && y <= gSAZones[i][SAZONE_AREA][4])
- {
- return format(zone, len, gSAZones[i][SAZONE_NAME], 0);
- }
- }
- return 0;
- }
- //---------------------------------------------------------------------------------------------------
- stock IsPlayerInZone(playerid, zone[])
- {
- new TmpZone[MAX_ZONE_NAME];
- GetPlayer3DZone(playerid, TmpZone, sizeof(TmpZone));
- for(new i = 0; i != sizeof(gSAZones); i++)
- {
- if(strfind(TmpZone, zone, true) != -1)
- return 1;
- }
- return 0;
- }
- //------------------------------------------------------------------------------------------------------
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- if (vehicleid == Drivingschoolcar[playerid]) {
- DestroyVehicle(Drivingschoolcar[playerid]);
- GameTextForPlayer(playerid, "~r~Failed!",6000,1);
- SendClientMessage(playerid, COLOR_ORED,"Driving Test - Failed!");
- Drivingschoolcar[playerid] = 0;
- DisablePlayerCheckpoint(playerid);
- KillTimer(DTimer[playerid]);
- DrivingSchoolLimit[playerid] = 0;
- DTimer[playerid] = 0;
- }
- }
- public OnPlayerConnect(playerid)
- {
- Firstvisit[playerid] = 0;
- new Year, Month, Day;
- getdate(Year, Month, Day);
- new string[170];
- new name[24];
- new file[128];
- GetPlayerName(playerid, name,24);
- format(file,sizeof(file),"%s.ini",name);
- if (!dini_Exists(file)) {
- Firstvisit[playerid] = 1;
- }
- if (udb_Exists("donotuncomment.txt")) { } //If you uncomment this, you'll get "Symbol is never used:"ret_mempcy"- warning
- pBank[playerid] = 0;
- OrgLeader[playerid] = 0;
- JustDied[playerid] = 0;
- Job[playerid] = 0;
- PlayerBank[playerid] = 0;
- InfoDisplayed[playerid] = 0;
- Drivingschoolcar[playerid] = false;
- HaveMusicPlayer[playerid] = 0;
- HaveWatch[playerid] = 0;
- HaveMobilePhone[playerid] = 0;
- FishingLicense[playerid] = 0;
- DTimer[playerid] = 0;
- PFStyle[playerid] = 0;
- HaveSnack[playerid] = 0;
- HaveFish[playerid] = 0;
- DrivingSchoolLimit[playerid] = 0;
- DTestCompleted[playerid] = 0;
- TextDrawShowForPlayer(playerid,SFRPg);
- HaveCigarette[playerid] = 0;
- PlayerOwnSkin[playerid] = 0;
- HaveDrivingLic[playerid] = 0;
- IsInJail[playerid] = 0;
- AdminLevel[playerid] = 0;
- Spawned[playerid] = 1;
- Muted[playerid] = 0;
- HaveAlcohol[playerid] = 0;
- HaveDrink[playerid] = 0;
- PlayerDiner[playerid] = 0;
- ShowSpeed[playerid] = 1;
- PlayerWage[playerid]= 0;
- FirstSpawn[playerid] = 1;
- Wanted[playerid] = 0;
- GetPlayerName(playerid, name,24);
- format(string, sizeof(string), "**%s has joined the server",name);
- SendClientMessageToAllEx(playerid, COLOR_GREY,string);
- SendClientMessage(playerid, COLOR_YELLOW,"Welcome to San Fierro RPg server");
- SendClientMessage(playerid, COLOR_ORANGE,"This gamemode is coded by Jakku (C) 2010");
- SendClientMessage(playerid, COLOR_BROWN,"Type /help to get started on this server");
- format(string, sizeof(string), "Date: %02d.%02d.%d", Day, Month, Year);
- SendClientMessage(playerid, COLOR_GREEN,string);
- PlayerOwnSkin[playerid] = dini_Int(file, "Own_skin");
- PlayerProps[playerid] = 0;
- Logged[playerid] = 0;
- InfoShowed[playerid] = 0;
- EarningsForPlayer[playerid] = 0;
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
- for(new propid; propid < PropertiesAmount; propid++)
- {
- if(PropInfo[propid][PropIsBought] == 1)
- {
- if(strcmp(PropInfo[propid][PropOwner], pName, true)==0)
- {
- EarningsForPlayer[playerid] += PropInfo[propid][PropEarning];
- PlayerProps[playerid]++;
- }
- }
- }
- if(PlayerProps[playerid] > 0)
- {
- new str[128];
- format(str, 128, "You currently own %d properties!", PlayerProps[playerid]);
- SendClientMessage(playerid, 0x8080FFAA, str);
- }
- //Icons
- SetPlayerMapIcon(playerid, 1, -1620.0010,683.0117,7.1875, 30, 0);
- SetPlayerMapIcon(playerid, 2, -2024.8890,67.1163,28.4371, 20, 0);
- SetPlayerMapIcon(playerid, 3, -2243.1494,129.5778,35.3203, 56, 0);
- SetPlayerMapIcon(playerid, 4, -2243.8564,-87.8855,35.3203, 48 ,0);
- SetPlayerMapIcon(playerid, 5,-2552.7429,192.7399,6.1240,48,0);
- SetPlayerMapIcon(playerid, 6,-1884.9554,863.3033,35.1718,45,0);
- SetPlayerMapIcon(playerid, 7,-1696.5523,949.3828,24.8906,45,0);
- SetPlayerMapIcon(playerid, 8,-2376.4199,910.9675,45.4453,45,0);
- SetPlayerMapIcon(playerid, 9,-2493.7028,-29.5141,25.7656,45,0);
- SetPlayerMapIcon(playerid, 10,-1313.3784,1296.0788,1.5658,9,0);
- SetPlayerMapIcon(playerid, 11,-2658.5336,639.0750,14.4531,22,0);
- SetPlayerMapIcon(playerid, 12,-2765.8862,375.5025,6.3346,12,0);
- //DINER ICONS//
- SetPlayerMapIcon(playerid, 13,-2279.2070,595.8998,39.2132,17,0);
- SetPlayerMapIcon(playerid, 14,-2099.2145,715.3974,69.5625,17,0);
- SetPlayerMapIcon(playerid, 15,-2430.6308,-136.2021,35.3203,17,0);
- SetPlayerMapIcon(playerid, 16,-2523.4770,1216.2227,37.4283,17,0);
- //
- SetPlayerMapIcon(playerid, 17,-1704.2038,785.6531,25.5571,52,0);
- SetPlayerMapIcon(playerid, 18,-2268.9274,-155.7561,35.3203,54,0);
- //
- return 1;
- }
- public Random(min, max)
- {
- new a = random(max - min) + min;
- return a;
- }
- public Speedometer()
- {
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- new pState = GetPlayerState(i);
- new pVeh = GetPlayerVehicleID(i);
- new pModel = GetVehicleModel(pVeh);
- if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i) && pState == PLAYER_STATE_DRIVER && pModel != 509 && pModel != 510 && pModel != 481)
- {
- if(ShowSpeed[i] == 1)
- {
- #define MULTIPLY_SPEED 4
- new Float:x, Float:y, Float:z, Float:Dis, Float:health, string[256];
- GetPlayerPos(i, x, y, z); GetVehicleHealth(GetPlayerVehicleID(i), health); new getthecar = GetPlayerVehicleID(i);
- new VehicleModel = GetVehicleModel(GetPlayerVehicleID(i));
- Dis = floatsqroot(floatpower(floatabs(floatsub(OldCoordsX[i],x)),2) + floatpower(floatabs(floatsub(OldCoordsY[i],y)),2));
- if(Fuel[getthecar] <= 0){ RemovePlayerFromVehicle(i); SendClientMessage(i, COLOR_YELLOW, "Your vehicle has ran out of fuel! Have a nice walk");}
- if(VehicleModel==509||VehicleModel==481||VehicleModel==510) {SetVehicleHealth(GetPlayerVehicleID(i), 1000); Fuel[getthecar] = 100;}
- if(VehicleModel==520||VehicleModel==476||VehicleModel==593||VehicleModel==553||VehicleModel==513||VehicleModel==512||VehicleModel==577||VehicleModel==592||VehicleModel==511||VehicleModel==539||VehicleModel==464||VehicleModel==519 ||VehicleModel==538 ||VehicleModel==570) { Fuel[getthecar] = 100; }
- new speed = (floatround(Dis)*MULTIPLY_SPEED);
- if( speed == 0 ){
- format(string,sizeof(string),"~B~Vehicle: ~w~%s ~B~Speed: ~Y~%dkm/h ~n~ ~B~Fuel: ~W~%.1f",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[getthecar]);
- } else if( speed >= 1 && speed <= 99 ){
- format(string,sizeof(string),"~B~Vehicle: ~w~%s ~B~Speed: ~Y~%dkm/h ~n~ ~B~Fuel: ~W~%.1f",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[getthecar]);
- Fuel[getthecar] -= 0.02;
- } else if( speed >= 100 && speed <= 179 ){
- format(string,sizeof(string),"~B~Vehicle: ~w~%s ~B~Speed: ~Y~%dkm/h ~n~ ~B~Fuel: ~W~%.1f",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[getthecar]);
- Fuel[getthecar] -= 0.07;
- } else if( speed >= 179 && speed <= 200 ){
- format(string,sizeof(string),"~B~Vehicle: ~w~%s ~B~Speed: ~Y~%dkm/h ~n~ ~B~Fuel: ~W~%.1f",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[getthecar]);
- Fuel[getthecar] -= 0.07;
- } else if( speed >= 200 && speed <= 230 ){
- format(string,sizeof(string),"~B~Vehicle: ~w~%s ~B~Speed: ~Y~%dkm/h ~n~ ~B~Fuel: ~W~%.1f",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[getthecar]);
- Fuel[getthecar] -= 0.07;
- } else if( speed >= 230 && speed <= 270 ){
- format(string,sizeof(string),"~B~Vehicle: ~w~%s ~B~Speed: ~Y~%dkm/h ~n~ ~B~Fuel: ~W~%.1f",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[getthecar]);
- Fuel[getthecar] -= 0.07;
- } else if( speed >= 270 && speed <= 300 ){
- format(string,sizeof(string),"~B~Vehicle: ~w~%s ~B~Speed: ~Y~%dkm/h ~n~ ~B~Fuel: ~W~%.1f",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[getthecar]);
- Fuel[getthecar] -= 0.07;
- } else {
- format(string,sizeof(string),"~B~Vehicle: ~w~%s ~B~Speed: ~Y~%dkm/h ~n~ ~B~Fuel: ~W~%.1f",VehiclesName[GetVehicleModel(GetPlayerVehicleID(i))-400],speed,Fuel[getthecar]);
- Fuel[getthecar] -= 0.08;
- }
- TextDrawSetString(Speedom[i],string);
- TextDrawShowForPlayer(i, Speedom[i]);
- OldCoordsX[i] = x; OldCoordsY[i] = y;
- } else { TextDrawHideForPlayer(i,Speedom[i]); }
- }
- }
- return true;
- }
- public ReFill(playerid)
- {
- new string[200];
- new getthecar = GetPlayerVehicleID(playerid);
- new Float:x, Float:y, Float:z;
- if(IsPlayerConnected(playerid) && Fuel[getthecar] < 100){
- Fuel[getthecar] += 3;
- if(GetPlayerPos(playerid, x, y, z) != IsPlayerInFuelStation(playerid) || !IsPlayerInAnyVehicle(playerid) || Fuel[getthecar] >= 100){
- new RefueledAmount = floatround(Fuel[ getthecar]) - OldFuel[playerid];
- GivePlayerMoney(playerid, -RefueledAmount);
- format(string, sizeof(string),"Your refuel costs $%d. Have a nice day!", RefueledAmount);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- KillTimer(ReFuelTimer[playerid]); Refueling[playerid] = 0;}
- }
- return true;
- }
- public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
- {
- new Float:oldposx, Float:oldposy, Float:oldposz;
- new Float:tempposx, Float:tempposy, Float:tempposz;
- GetPlayerPos(playerid, oldposx, oldposy, oldposz);
- tempposx = (oldposx -x); tempposy = (oldposy -y); tempposz = (oldposz -z);
- if(((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
- { return true; }
- return false;
- }
- public IsPlayerInFuelStation(playerid)
- {
- if(PlayerToPoint(10,playerid,1595.5406, 2198.0520, 10.3863) || PlayerToPoint(10,playerid,2202.0649, 2472.6697, 10.5677) ||
- PlayerToPoint(10,playerid,2115.1929, 919.9908, 10.5266) || PlayerToPoint(10,playerid,2640.7209, 1105.9565, 10.5274) ||
- PlayerToPoint(10,playerid,608.5971, 1699.6238, 6.9922) || PlayerToPoint(10,playerid,618.4878, 1684.5792, 6.9922) ||
- PlayerToPoint(10,playerid,2146.3467, 2748.2893, 10.5245) || PlayerToPoint(10,playerid,-1679.4595, 412.5129, 6.9973) ||
- PlayerToPoint(10,playerid,-1327.5607, 2677.4316, 49.8093) || PlayerToPoint(10,playerid,-1470.0050, 1863.2375, 32.3521) ||
- PlayerToPoint(10,playerid,-2409.2200, 976.2798, 45.2969) || PlayerToPoint(10,playerid,-2244.1396, -2560.5833, 31.9219) ||
- PlayerToPoint(10,playerid,-1606.0544, -2714.3083, 48.5335) || PlayerToPoint(10,playerid,1937.4293, -1773.1865, 13.3828) ||
- PlayerToPoint(10,playerid,-91.3854, -1169.9175, 2.4213) || PlayerToPoint(10,playerid,1383.4221, 462.5385, 20.1506) ||
- PlayerToPoint(10,playerid,660.4590, -565.0394, 16.3359) || PlayerToPoint(10,playerid,1381.7206, 459.1907, 20.3452) ||
- PlayerToPoint(10,playerid,-1605.7156, -2714.4573, 48.5335) || PlayerToPoint(10,playerid,1338.4438,1398.4487,10.8203))
- { return true; }
- return false;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- if (IsPlayerInRangeOfPoint(playerid, 25.0,-1875.4793,915.8572,35.0090) && GetPlayerVehicleID(playerid) == Drivingschoolcar[playerid]) {
- DisablePlayerCheckpoint(playerid);
- SendClientMessage(playerid, COLOR_GREEN,"Now head back to the drivingschool");
- SetPlayerCheckpoint(playerid,-2035.6357,-95.1608,35.1640,5.0);
- }
- if (IsPlayerInRangeOfPoint(playerid, 25.0,-2035.6357,-95.1608,35.1640) && GetPlayerVehicleID(playerid) == Drivingschoolcar[playerid]) {
- if (DrivingSchoolLimit[playerid] > 120) {
- SendClientMessage(playerid, COLOR_ORED,"Failed: Too slow man, too slow!");
- DisablePlayerCheckpoint(playerid);
- DestroyVehicle(Drivingschoolcar[playerid]);
- DrivingSchoolLimit[playerid] = 0;
- KillTimer(DTimer[playerid]);
- DTimer[playerid] = 0;
- return 1;
- }
- new Float:vhp;
- GetVehicleHealth(GetPlayerVehicleID(playerid),vhp);
- if (vhp < 1000) {
- SendClientMessage(playerid, COLOR_ORED,"Failed: You damaged the vehicle!");
- DisablePlayerCheckpoint(playerid);
- DestroyVehicle(Drivingschoolcar[playerid]);
- DrivingSchoolLimit[playerid] = 0;
- KillTimer(DTimer[playerid]);
- DTimer[playerid] = 0;
- return 1;
- }
- DisablePlayerCheckpoint(playerid);
- SendClientMessage(playerid, COLOR_GREEN,"Test - Passed! Now collect your license from the depot!");
- DTestCompleted[playerid] = 1;
- DestroyVehicle(Drivingschoolcar[playerid]);
- KillTimer(DTimer[playerid]);
- DTimer[playerid] = 0;
- DrivingSchoolLimit[playerid] = 0;
- }
- return 1;
- }
- //------------------------------------------------------------------------------------------------------
- public OnPlayerDisconnect(playerid)
- {
- new name[24];
- new file[128];
- TextDrawHideForPlayer(playerid,SFRPg);
- new Float:x,Float:y,Float:z;
- GetPlayerName(playerid, name,24);
- format(file,sizeof(file),"%s.ini",name);
- if (IsLogged[playerid]) {
- dini_Create(file);
- dini_IntSet(file,"Cash", GetPlayerMoney(playerid));
- dini_IntSet(file,"Score", GetPlayerScore(playerid));
- dini_IntSet(file,"Interior", GetPlayerInterior(playerid));
- dini_IntSet(file,"Bank", pBank[playerid]);
- dini_IntSet(file,"Org", Job[playerid]);
- dini_IntSet(file,"Org_leader", OrgLeader[playerid]);
- dini_IntSet(file,"Earned_Wage", PlayerWage[playerid]);
- dini_IntSet(file,"Admin_level", AdminLevel[playerid]);
- dini_IntSet(file,"Own_skin", PlayerOwnSkin[playerid]);
- dini_IntSet(file,"Mobilephone", HaveMobilePhone[playerid]);
- DestroyVehicle(Drivingschoolcar[playerid]);
- dini_IntSet(file,"Musicplayer", HaveMusicPlayer[playerid]);
- dini_IntSet(file,"Watch", HaveWatch[playerid]);
- dini_IntSet(file,"AlcoholDrink", HaveAlcohol[playerid]);
- dini_IntSet(file,"Have_fish", HaveFish[playerid]);
- dini_IntSet(file,"Drink", HaveDrink[playerid]);
- dini_IntSet(file,"Driving_license", HaveDrivingLic[playerid]);
- dini_IntSet(file,"Fishing_license", FishingLicense[playerid]);
- dini_IntSet(file,"Snack", HaveSnack[playerid]);
- dini_IntSet(file,"Cigarette", HaveCigarette[playerid]);
- dini_IntSet(file,"Inside_diner", PlayerDiner[playerid]);
- dini_IntSet(file,"Inside_bank", PlayerBank[playerid]);
- dini_IntSet(file,"Fighting_style", PFStyle[playerid]);
- GetPlayerPos(playerid,x,y,z);
- dini_IntSet(file,"X",floatround(x));
- dini_IntSet(file,"Y",floatround(y));
- dini_IntSet(file,"Z",floatround(z));
- IsLogged[playerid] = 0;
- TextDrawDestroy(location[playerid]);
- }
- }
- //------------------------------------------------------------------------------------------------------
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- new string[256];
- new playermoney;
- new sendername[MAX_PLAYER_NAME];
- new giveplayer[MAX_PLAYER_NAME];
- new cmd[256];
- new gMessage[256];
- new giveplayerid, moneys, idx;
- new file[128], tmp[256], tmp2[256];
- cmd = strtok(cmdtext, idx);
- if (IsInJail[playerid] == 1) {
- SendClientMessage(playerid, COLOR_ORED,"Error: You can't use commands in the jail!");
- return 1;
- }
- if (Muted[playerid] == 1) {
- SendClientMessage(playerid, COLOR_ORED,"Error: You are not able to speak while muted!");
- return 1;
- }
- if(strcmp(cmd, "/help", true) == 0) {
- SendClientMessage(playerid, COLOR_GREEN,"Welcome to San Fierro RPg");
- SendClientMessage(playerid, COLOR_YELLOW,"This gamemode is coded by Jakku (C) 2010");
- SendClientMessage(playerid, COLOR_YELLOW,"Here are many great features, have fun with exploring them!");
- SendClientMessage(playerid, COLOR_YELLOW,"Some commands: /fish || /inventory || /ownskin || /orgcmds || /resign || /refuel");
- SendClientMessage(playerid, COLOR_YELLOW,"/deposit || /withdraw || /givecash || /admins || /wanted || /prophelp");
- SendClientMessage(playerid, COLOR_YELLOW,"You can buy new clothes at all clothes shops, some items at 24/7- Store & party in all bars around the city");
- return 1;
- }
- if(strcmp(cmd, "/bankhelp", true) == 0) {
- SendClientMessage(playerid, COLOR_GREEN,"~San Fierro Bank~");
- SendClientMessage(playerid, COLOR_YELLOW,"- Commands:");
- SendClientMessage(playerid, COLOR_YELLOW,"/withdraw || /deposit || /balance");
- return 1;
- }
- if(strcmp(cmd, "/ahelp", true) == 0) {
- if (AdminLevel[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You are not an admin!");
- SendClientMessage(playerid, COLOR_YELLOW,"/kick || /ban || /freeze || /unfreeze || /mute || /unmute || /createcash || /sfspawn");
- SendClientMessage(playerid, COLOR_YELLOW,"There are four admin levels, if nothing appears when you type a command, your admin level does not meet the required level");
- return 1;
- }
- if(strcmp(cmd, "/fish", true) == 0) {
- if (FishingLicense[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You need a fishing license to fish!");
- if (!IsPlayerInRangeOfPoint(playerid, 20.0,-1313.3784,1296.0788,1.5658)) return SendClientMessage(playerid, COLOR_ORED,"Error: You are not able to fish here!");
- if (HaveFish[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You are not able to carry any more fish!");
- FishTimer[playerid] = SetTimerEx("Fishing", 12000, 1, "d", playerid);
- SendClientMessage(playerid, COLOR_YELLOW,"You threw your rod to the water. Now please wait");
- return 1;
- }
- if(strcmp(cmd, "/phonehelp", true) == 0) {
- if (HaveMobilePhone[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You don't have a mobile phone");
- SendClientMessage(playerid, COLOR_YELLOW,"Phone help:");
- SendClientMessage(playerid, COLOR_YELLOW,"Thank you for buying this mobile phone. You can send text messages with this, use");
- SendClientMessage(playerid, COLOR_YELLOW,"/txt [playerid] [message]");
- return 1;
- }
- if(strcmp(cmd, "/mp", true) == 0) {
- if (HaveMusicPlayer[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You don't have a music player");
- ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Music Player", "Track 1\nTrack 2\nTrack 3\nTrack 4\nStop", "Ok", "Cancel");
- return 1;
- }
- if(strcmp(cmd, "/inventory", true) == 0) {
- ShowPlayerDialog(playerid, 5, DIALOG_STYLE_LIST, "Inventory", "Alcohol Drink\nNormal Drink\nFish\nCigarette\nSnack", "Use", "Cancel");
- return 1;
- }
- if(strcmp(cmd, "/leaderhelp", true) == 0) {
- if (OrgLeader[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You are not the leader of an organization!");
- SendClientMessage(playerid, COLOR_YELLOW,"Leader Help");
- SendClientMessage(playerid, COLOR_YELLOW,"Use /setmember to set an other player member of your organization");
- SendClientMessage(playerid, COLOR_YELLOW,"Use /kickmember to kick an other player from your organization");
- return 1;
- }
- if(strcmp(cmd, "/ownskin", true) == 0) {
- if (GetPlayerSkin(playerid) == PlayerOwnSkin[playerid]) return SendClientMessage(playerid, COLOR_ORED,"Error: You are already wearing your own skin!");
- SendClientMessage(playerid, COLOR_YELLOW,"You have worn your own skin");
- SetPlayerSkin(playerid, PlayerOwnSkin[playerid]);
- return 1;
- }
- if(strcmp(cmd, "/orgskin", true) == 0) {
- if (Job[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You do not belong to an organization!");
- if (Job[playerid] == 1) {
- SetPlayerSkin(playerid, 281);
- SendClientMessage(playerid, COLOR_YELLOW,"You have worn your organization skin");
- }
- if (Job[playerid] == 2) {
- SetPlayerSkin(playerid, 277);
- SendClientMessage(playerid, COLOR_YELLOW,"You have worn your organization skin");
- }
- if (Job[playerid] == 3) {
- SetPlayerSkin(playerid, 117);
- SendClientMessage(playerid, COLOR_YELLOW,"You have worn your organization skin");
- }
- return 1;
- }
- if(strcmp(cmd, "/orgcmds", true) == 0) {
- if (Job[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You are not a member of an organization!");
- SendClientMessage(playerid, COLOR_WHITE,"Your commands:");
- SendClientMessage(playerid, COLOR_YELLOW,"/resign || /orgskin");
- if (Job[playerid] == 1) {
- SendClientMessage(playerid, COLOR_YELLOW,"/pullover || /want || /takelic || /loc");
- }
- return 1;
- }
- if(strcmp(cmd, "/resign", true) == 0) {
- if (Job[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You are not a member of an organization!");
- SendClientMessage(playerid, COLOR_YELLOW,"You have successfully resigned from your organization");
- SendClientMessage(playerid, COLOR_ORED,"Note! If you did this accidentally, please contact your leader");
- Job[playerid] = 0;
- OrgLeader[playerid] = 0;
- ResetPlayerWeapons(playerid);
- RemovePlayerFromVehicle(playerid);
- SetPlayerSkin(playerid, 0);
- return 1;
- }
- if(strcmp(cmd, "/pullover", true) == 0) {
- if (Job[playerid] != 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You are not a law enforcer!");
- SendClientMessageToAll(COLOR_BLUE,"Police: Pull over immediately!");
- return 1;
- }
- if(strcmp(cmd, "/loc", true) == 0) {
- new ID = strval(cmdtext[4]);
- if(!strlen(cmdtext[4]))
- {
- SendClientMessage(playerid, COLOR_ORED, "Usage: /loc [playerid]");
- return 1;
- }
- if (Job[playerid] != 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You are not a law enforcer!");
- new receivername[24];
- new zone[28];
- if (IsPlayerConnected(ID)) {
- GetPlayerZone(ID,zone,MAX_ZONE_NAME);
- GetPlayerName(ID, receivername,24);
- if (Job[ID] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You cannot locate a law enforcer!");
- if (ID == playerid) return SendClientMessage(playerid, COLOR_ORED,"Error: You cannot locate yourself!");
- format(string, sizeof(string), "%s was last seen at %s", receivername,zone);
- }
- return 1;
- }
- if(strcmp(cmd, "/setmember", true) == 0) {
- new ID = strval(cmdtext[10]);
- new kickername[24];
- new receivername[24];
- GetPlayerName(playerid, kickername,24);
- GetPlayerName(ID, receivername,24);
- if (IsPlayerConnected(ID)) {
- if(!strlen(cmdtext[10]))
- {
- SendClientMessage(playerid, COLOR_ORED, "Usage: /setmember [playerid]");
- return 1;
- }
- if (OrgLeader[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You are not the leader of an organization!");
- if (ID == playerid) return SendClientMessage(playerid, COLOR_ORED, "Error: You can't hire yourself!");
- if (Job[playerid] == 1 && Job[ID] == 0) {
- format(string, sizeof(string), "You have set %s member of San Fierro Police Department", receivername);
- SendClientMessage(playerid, COLOR_GREEN, string);
- format(string, sizeof(string), "%s has set you as a member of San Fierro Police Department", kickername);
- SendClientMessage(ID, COLOR_YELLOW, string);
- Job[ID] = 1;
- ResetPlayerWeapons(ID);
- SetPlayerSkin(ID,281);
- GivePlayerWeapon(ID,3,-1);
- GivePlayerWeapon(ID,24,190);
- }
- if (Job[playerid] == 2 && Job[ID] == 0) {
- format(string, sizeof(string), "You have set %s member of San Fierro Fire Department", receivername);
- SendClientMessage(playerid, COLOR_GREEN, string);
- format(string, sizeof(string), "%s has set you as a member of San Fierro Fire Department", kickername);
- SendClientMessage(ID, COLOR_YELLOW, string);
- Job[ID] = 2;
- ResetPlayerWeapons(ID);
- SetPlayerSkin(ID,277);
- GivePlayerWeapon(ID,17,2);
- GivePlayerWeapon(ID,42,400);
- }
- if (Job[playerid] == 3 && Job[ID] == 0) {
- format(string, sizeof(string), "You have set %s member of The Triads", receivername);
- SendClientMessage(playerid, COLOR_GREEN, string);
- format(string, sizeof(string), "%s has set you as a member of The Triads", kickername);
- SendClientMessage(ID, COLOR_YELLOW, string);
- Job[ID] = 3;
- ResetPlayerWeapons(ID);
- SetPlayerSkin(ID,117);
- GivePlayerWeapon(ID,23,100);
- GivePlayerWeapon(ID,27,400);
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/want", true) == 0) {
- new ID = strval(cmdtext[5]);
- new kickername[24];
- new receivername[24];
- GetPlayerName(playerid, kickername,24);
- GetPlayerName(ID, receivername,24);
- if(!strlen(cmdtext[5]))
- {
- SendClientMessage(playerid, COLOR_ORED, "Usage: /want [playerid]");
- return 1;
- }
- if (IsPlayerConnected(ID)) {
- if (Job[playerid] != 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You are not a law enforcer!");
- if (Job[ID] == 1) return SendClientMessage(playerid, COLOR_ORED,"Error: You cannot want a law enforcer!");
- if (ID == playerid) return SendClientMessage(playerid, COLOR_ORED, "Error: You can't want yourself!");
- if (Wanted[ID] == 1) {
- format(string, sizeof(string), "You have unwanted %s", receivername);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- format(string, sizeof(string), "%s has unwanted you", kickername);
- SendClientMessage(ID, COLOR_BLUE, string);
- Wanted[ID] = 0;
- return 1;
- }
- Wanted[ID] = 1;
- format(string, sizeof(string), "You have wanted %s", receivername);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- format(string, sizeof(string), "%s has wanted you", kickername);
- SendClientMessage(ID, COLOR_BLUE, string);
- }
- return 1;
- }
- if(!strcmp(cmdtext, "/takelic", true, 8))
- {
- if(!strlen(cmdtext[9]))
- {
- SendClientMessage(playerid, COLOR_ORED, "Usage: /takelic [playerid]");
- return 1;
- }
- new ID = strval(cmdtext[9]);
- new pName[24], str[64];
- new Float:X,Float:Y,Float:Z;
- if(IsPlayerConnected(ID))
- {
- GetPlayerPos(ID,X,Y,Z);
- if(!IsPlayerInRangeOfPoint(playerid,10.0,X,Y,Z)) return SendClientMessage(playerid, COLOR_ORED, "Error: You must be near the player you are distraining the license from!");
- GetPlayerName(ID, pName, 24);
- if(Job[ID] == 1) return SendClientMessage(playerid, COLOR_ORED, "You cannot take a license of an other law enforcer!");
- format(string, sizeof(string), "You have distrained the driving license of %s", pName);
- SendClientMessage(giveplayerid, COLOR_YELLOW, string);
- format(str, 64, "~ Your Driving License has been distrained!");
- SendClientMessage(ID,COLOR_ORANGE, str);
- HaveDrivingLic[ID] = 0;
- }
- return 1;
- }
- if(strcmp(cmdtext, "/refuel", true) == 0)
- {
- if(IsPlayerConnected(playerid)){
- new getthecar = GetPlayerVehicleID(playerid);
- new m = GetVehicleModel(GetPlayerVehicleID(playerid));
- if(IsPlayerInFuelStation(playerid)){
- if(Refueling[playerid] == 0){
- if(!IsPlayerInAnyVehicle(playerid) && GetPlayerState(playerid) == PLAYER_STATE_DRIVER || GetVehicleModel(getthecar) == 481 || GetVehicleModel(getthecar) == 509 || GetVehicleModel(getthecar) == 510) return SendClientMessage(playerid,COLOR_YELLOW,"Error: You are not in a vehicle or this vehicle does not need fuel");
- if(Fuel[getthecar] >= 100){
- SendClientMessage(playerid,COLOR_YELLOW,"Your gas tank is already full.");
- } else {
- if (IsPlayerInRangeOfPoint(playerid,10.0,1338.4438,1398.4487,10.8203) && m != 592 && m != 577 && m != 511 && m != 512 && m != 593 && m != 520 && m != 553 && m != 476 && m != 519 && m != 460 && m != 513 && m != 425 && m != 417 && m != 487 && m != 488 && m != 497 && m != 563 && m != 447 && m != 469) {
- SendClientMessage(playerid,COLOR_ORED,"Error: You can only refuel aircraft here!");
- return 1;
- }
- OldFuel[playerid] = floatround(Fuel[getthecar]);
- ReFuelTimer[playerid] = SetTimerEx("ReFill", 1000, 1, "d", playerid);
- SendClientMessage(playerid,COLOR_YELLOW,"Re-fueling your vehicle..");
- Refueling[playerid] = 1;
- }
- } else { SendClientMessage(playerid,COLOR_YELLOW,"You are already refueling your car."); }
- } else { SendClientMessage(playerid,COLOR_YELLOW,"You must be at a gas station to refuel"); }
- }
- return true;
- }
- if(strcmp(cmd, "/kickmember", true) == 0) {
- new ID = strval(cmdtext[11]);
- new kickername[24];
- new receivername[24];
- GetPlayerName(playerid, kickername,24);
- GetPlayerName(ID, receivername,24);
- if (IsPlayerConnected(ID)) {
- if(!strlen(cmdtext[11]))
- {
- SendClientMessage(playerid, COLOR_ORED, "Usage: /kickmember [playerid]");
- return 1;
- }
- if (OrgLeader[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You are not the leader of an organization!");
- if (ID == playerid) return SendClientMessage(playerid, COLOR_ORED, "Error: You can't kick yourself!");
- if (Job[playerid] == 1 && Job[ID] == 1) {
- format(string, sizeof(string), "You have kicked %s from San Fierro Police Department", receivername);
- SendClientMessage(playerid, COLOR_GREEN, string);
- format(string, sizeof(string), "%s has kicked you from San Fierro Police Department", kickername);
- SendClientMessage(ID, COLOR_YELLOW, string);
- Job[ID] = 0;
- ResetPlayerWeapons(ID);
- SetPlayerSkin(ID,0);
- }
- if (Job[playerid] == 2 && Job[ID] == 2) {
- format(string, sizeof(string), "You have kicked %s from San Fierro Fire Department", receivername);
- SendClientMessage(playerid, COLOR_GREEN, string);
- format(string, sizeof(string), "%s has kicked you from San Fierro Fire Department", kickername);
- SendClientMessage(ID, COLOR_YELLOW, string);
- Job[ID] = 0;
- ResetPlayerWeapons(ID);
- SetPlayerSkin(ID,0);
- }
- if (Job[playerid] == 3 && Job[ID] == 3) {
- format(string, sizeof(string), "You have kicked %s from The Triads", receivername);
- SendClientMessage(playerid, COLOR_GREEN, string);
- format(string, sizeof(string), "%s has kicked you from The Triads", kickername);
- SendClientMessage(ID, COLOR_YELLOW, string);
- Job[ID] = 0;
- ResetPlayerWeapons(ID);
- SetPlayerSkin(ID,0);
- }
- }
- return 1;
- }
- if(strcmp(cmd, "/deposit", true) == 0) {
- if(!IsPlayerInRangeOfPoint(playerid, 7.0,4712.6201,-5846.4584,3382.0129)) {
- SendClientMessage(playerid, COLOR_ORED, "Error: You must be at a bank to use this command!");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_WHITE, "Usage: /deposit [amount]");
- return 1;
- }
- moneys = strval(tmp);
- if (moneys > GetPlayerMoney(playerid)) return SendClientMessage(playerid, COLOR_ORED,"You don't have that amount of money!");
- pBank[playerid] +=moneys;
- GivePlayerMoney(playerid, -moneys);
- format(string, sizeof(string), "You have deposited $%d, you currently have $%d in your bank account", moneys,pBank[playerid]);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- return 1;
- }
- if(strcmp(cmd, "/balance", true) == 0) {
- if(!IsPlayerInRangeOfPoint(playerid, 7.0,4712.6201,-5846.4584,3382.0129)) {
- SendClientMessage(playerid, COLOR_ORED, "Error: You must be at a bank to use this command!");
- return 1;
- }
- format(string, sizeof(string), "You have $%d in your bank account", pBank[playerid]);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- return 1;
- }
- if(strcmp(cmd, "/withdraw", true) == 0) {
- if(!IsPlayerInRangeOfPoint(playerid, 7.0,4712.6201,-5846.4584,3382.0129)) {
- SendClientMessage(playerid, COLOR_ORED, "Error: You must be at a bank to use this command!");
- return 1;
- }
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_WHITE, "Usage: /withdraw [amount]");
- return 1;
- }
- moneys = strval(tmp);
- if (moneys > pBank[playerid]) return SendClientMessage(playerid, COLOR_ORED,"You don't have that amount of money in your bank account!");
- pBank[playerid] -=moneys;
- GivePlayerMoney(playerid, moneys);
- format(string, sizeof(string), "You have withdrawn $%d, you currently have $%d in your bank account", moneys,pBank[playerid]);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- return 1;
- }
- if(strcmp(cmd, "/givecash", true) == 0) {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_WHITE, "Usage:: /givecash [playerid] [amount]");
- return 1;
- }
- giveplayerid = strval(tmp);
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_WHITE, "Usage: /givecash [playerid] [amount]");
- return 1;
- }
- moneys = strval(tmp);
- if (IsPlayerConnected(giveplayerid)) {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- playermoney = GetPlayerMoney(playerid);
- if (moneys > 0 && playermoney >= moneys) {
- if (giveplayerid == playerid) return SendClientMessage(playerid, COLOR_ORED,"You can't send money to yourself!");
- GivePlayerMoney(playerid, (0 - moneys));
- GivePlayerMoney(giveplayerid, moneys);
- format(string, sizeof(string), "You have sent %s $%d.", giveplayer, moneys);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- format(string, sizeof(string), "You have received $%d from %s", moneys, sendername);
- SendClientMessage(giveplayerid, COLOR_YELLOW, string);
- }
- else {
- SendClientMessage(playerid, COLOR_YELLOW, "Invalid amount");
- }
- }
- else {
- format(string, sizeof(string), "%d is not an active player.", giveplayerid);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- }
- return 1;
- }
- if(strcmp(cmd, "/register", true) == 0)
- {
- if (Spawned[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED, "Error: You must spawn to register!");
- new name[MAX_PLAYER_NAME];
- tmp = strtok(cmdtext, idx);
- GetPlayerName(playerid, name, sizeof(name));
- if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /register [password]");
- format(file,sizeof(file),"%s.ini",name);
- if (fexist(file))
- {
- SendClientMessage(playerid, COLOR_ORED, "This account is already registered!");
- PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
- return 1;
- }
- if(!fexist(file))
- {
- dini_Create(file);
- dini_IntSet(file,"Cash", GetPlayerMoney(playerid));
- dini_IntSet(file, "Password", udb_hash(tmp));
- SendClientMessage(playerid, COLOR_YELLOW, "Account successfully created. /login now");
- PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
- GetPlayerName(playerid, name, sizeof(name));
- printf("Account registered");
- }
- return 1;
- }
- if(strcmp(cmd, "/admins", true) == 0) {
- new adminname[24];
- new admins = 0;
- SendClientMessage(playerid, COLOR_YELLOW,"Currently online admins:");
- for(new i = 0; i < MAX_PLAYERS; i++)
- if (IsPlayerConnected(i)) {
- {
- if(AdminLevel[i] == 1)
- {
- GetPlayerName(i, adminname, 24);
- format(string,sizeof string,"%s - Level 1 (Mod)", adminname);
- SendClientMessage(playerid,COLOR_WHITE,string);
- admins++;
- }
- if(AdminLevel[i] == 2)
- {
- GetPlayerName(i, adminname, 24);
- format(string,sizeof string,"%s - Level 2 (Mod+)", adminname);
- SendClientMessage(playerid,COLOR_WHITE,string);
- admins++;
- }
- if(AdminLevel[i] == 3)
- {
- GetPlayerName(i, adminname, 24);
- format(string,sizeof string,"%s - Level 3 (Admin)", adminname);
- SendClientMessage(playerid,COLOR_WHITE,string);
- admins++;
- }
- if(AdminLevel[i] == 4)
- {
- GetPlayerName(i, adminname, 24);
- format(string,sizeof string,"%s - Level 4 (Server Owner)", adminname);
- SendClientMessage(playerid,COLOR_YELLOW,string);
- admins++;
- }
- }
- }
- if (admins == 0) SendClientMessage(playerid, COLOR_WHITE, "There are currently no admins online");
- return 1;
- }
- if(strcmp(cmd, "/wanted", true) == 0) {
- new wantedname[24];
- new wanted = 0;
- SendClientMessage(playerid, COLOR_YELLOW,"Currently wanted players:");
- for(new i = 0; i < MAX_PLAYERS; i++)
- if (IsPlayerConnected(i)) {
- {
- if(Wanted[i] == 1)
- {
- GetPlayerName(i, wantedname, 24);
- format(string,sizeof string,"%s", wantedname);
- SendClientMessage(playerid,COLOR_WHITE,string);
- wanted++;
- }
- }
- }
- if (wanted == 0) SendClientMessage(playerid, COLOR_WHITE, "There are currently no wanted players");
- return 1;
- }
- if(strcmp(cmd, "/login", true) == 0)
- {
- if (Spawned[playerid] == 1) return SendClientMessage(playerid, COLOR_ORED, "Error: You must spawn to login!");
- new PlayerName[24];
- tmp = strtok(cmdtext, idx);
- if(strlen(tmp) == 0) return SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /login [password]");
- new name[MAX_PLAYER_NAME];
- if(IsLogged[playerid] == 1)
- {
- SendClientMessage(playerid, COLOR_ORED, "You already are logged in!");
- return 1;
- }
- else
- {
- GetPlayerName(playerid, name, sizeof(name));
- format(file,sizeof(file),"%s.ini",name);
- if(fexist(file))
- {
- tmp2 = dini_Get(file, "Password");
- if(udb_hash(tmp) != strval(tmp2))
- {
- SendClientMessage(playerid, COLOR_ORED, "Login failed");
- GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
- printf("%s failed on login", name);
- }
- if (udb_hash(tmp) == strval(tmp2))
- {
- IsLogged[playerid] = 1;
- SetPlayerMoney(playerid, dini_Int(file, "Cash"));
- SetPlayerScore(playerid, dini_Int(file, "Score"));
- SetPlayerInterior(playerid, dini_Int(file, "Interior"));
- pBank[playerid] = dini_Int(file, "Bank");
- Job[playerid] = dini_Int(file, "Org");
- OrgLeader[playerid] = dini_Int(file, "Org_leader");
- PlayerWage[playerid] = dini_Int(file, "Earned_Wage");
- AdminLevel[playerid] = dini_Int(file, "Admin_level");
- HaveWatch[playerid] = dini_Int(file, "Watch");
- HaveFish[playerid] = dini_Int(file, "Have_fish");
- HaveAlcohol[playerid] = dini_Int(file, "AlcoholDrink");
- HaveDrink[playerid] = dini_Int(file, "Drink");
- HaveMobilePhone[playerid] = dini_Int(file, "Mobilephone");
- HaveMusicPlayer[playerid] = dini_Int(file, "Musicplayer");
- HaveDrivingLic[playerid] = dini_Int(file, "Driving_license");
- FishingLicense[playerid] = dini_Int(file, "Fishing_license");
- HaveSnack[playerid] = dini_Int(file, "Snack");
- HaveCigarette[playerid] = dini_Int(file, "Cigarette");
- PlayerDiner[playerid] = dini_Int(file, "Inside_diner");
- PlayerBank[playerid] = dini_Int(file, "Inside_bank");
- PFStyle[playerid] = dini_Int(file, "Fighting_style");
- if (HaveWatch[playerid] == 1) {
- TogglePlayerClock(playerid, 1);
- }
- LoginPosX[playerid] = dini_Int(file, "X");
- LoginPosY[playerid] = dini_Int(file, "Y");
- LoginPosZ[playerid] = dini_Int(file, "Z");
- SetPlayerPos(playerid, LoginPosX[playerid],LoginPosY[playerid],LoginPosZ[playerid]);
- if (Firstvisit[playerid] == 1) {
- SetPlayerPos(playerid, -1976.6405,458.3334,35.1718);
- SendClientMessage(playerid, COLOR_YELLOW, " ");
- SendClientMessage(playerid, COLOR_YELLOW, " ");
- SendClientMessage(playerid, COLOR_YELLOW, " ");
- SendClientMessage(playerid, COLOR_YELLOW, " ");
- SendClientMessage(playerid, COLOR_YELLOW, " ");
- SendClientMessage(playerid, COLOR_YELLOW, " ");
- SendClientMessage(playerid, COLOR_YELLOW, " ");
- SendClientMessage(playerid, COLOR_YELLOW, " ");
- SendClientMessage(playerid, COLOR_YELLOW, " ");
- SendClientMessage(playerid, COLOR_YELLOW, "Hello! We have noticed this is your first time on this server, we wish you welcome!");
- SendClientMessage(playerid, COLOR_WHITE, "Now, start exploring the features, we hope you enjoy your stay! We've given you $50000 to get started :)");
- SendClientMessage(playerid, COLOR_GREEN, "Regards, San Fierro RPg Management");
- GivePlayerMoney(playerid, 50000);
- }
- if (PFStyle[playerid] == 1) {
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_ELBOW);
- }
- if (PFStyle[playerid] == 2) {
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_GRABKICK);
- }
- if (PFStyle[playerid] == 3) {
- SetPlayerFightingStyle(playerid, FIGHT_STYLE_KNEEHEAD);
- }
- SendClientMessage(playerid, COLOR_YELLOW, "Login successful, data restored");
- TogglePlayerControllable(playerid, 1);
- printf("SERVER: %s has logged in", name);
- SetPlayerSkin(playerid, PlayerOwnSkin[playerid]);
- location[playerid] = TextDrawCreate(5.0, 433.0, "-");
- TextDrawSetOutline(location[playerid],1);
- TextDrawSetProportional(location[playerid],1);
- TextDrawSetShadow(location[playerid],1);
- TextDrawShowForPlayer(playerid,location[playerid]);
- // JOB STUFF
- if (Job[playerid] == 0) SendClientMessage(playerid, COLOR_ORED, "Organization: None");
- if (Job[playerid] == 1) {
- SendClientMessage(playerid, COLOR_WHITE, "Organization: San Fierro Police Department");
- GivePlayerWeapon(playerid,3,-1);
- GivePlayerWeapon(playerid,24,190);
- //
- }
- if (Job[playerid] == 2) {
- SendClientMessage(playerid, COLOR_WHITE, "Organization: San Fierro Fire Department");
- GivePlayerWeapon(playerid,17,2);
- GivePlayerWeapon(playerid,42,400);
- }
- if (Job[playerid] == 3) {
- SetPlayerSkin(playerid,117);
- GivePlayerWeapon(playerid,23,100);
- GivePlayerWeapon(playerid,27,400);
- SendClientMessage(playerid, COLOR_WHITE, "Organization: The Triads");
- }
- }
- }
- }
- return 1;
- }
- //ADMIN CMDS
- if (AdminLevel[playerid] == 1 || AdminLevel[playerid] == 2 || AdminLevel[playerid] == 3 || AdminLevel[playerid] == 4) {
- if(!strcmp(cmdtext, "/kick", true, 5))
- {
- if(!strlen(cmdtext[6]))
- {
- SendClientMessage(playerid, COLOR_ORED, "Usage: /kick [playerid] [reason]");
- return 1;
- }
- new ID = strval(cmdtext[6]);
- new pName[24], kickername[24], stri[64], strv[256];
- tmp = strtok(cmdtext,idx);
- gMessage = strrest(cmdtext,idx);
- if(IsPlayerConnected(ID))
- {
- GetPlayerName(ID, pName, 24);
- GetPlayerName(playerid, kickername, 24);
- if(IsPlayerNPC(ID))
- {
- SendClientMessage(playerid, COLOR_ORED, "Error: You cannot kick a NPC");
- return 1;
- }
- if(ID == playerid)
- {
- SendClientMessage(playerid, COLOR_ORED, "Error: You cannot kick yourself!");
- return 1;
- }
- format(strv, 64, "~ You have been kicked from the server for ^%s^", gMessage);
- SendClientMessage(ID,COLOR_ORANGE, strv);
- Kick(ID);
- format(stri, 64, "**%s has been kicked from the server for ^%s^", pName,gMessage);
- SendClientMessageToAll(COLOR_ORED, stri);
- printf("Admin Command: %s has kicked %s for ^%s^", kickername, pName,gMessage);
- }
- return 1;
- }
- else if(!strcmp(cmdtext, "/mute", true, 5))
- {
- if(!strlen(cmdtext[6]))
- {
- SendClientMessage(playerid, COLOR_ORED, "Usage: /mute [playerid]");
- return 1;
- }
- new ID = strval(cmdtext[6]);
- new pName[24], muteername[24], stri[64], strv[256];
- tmp = strtok(cmdtext,idx);
- gMessage = strrest(cmdtext,idx);
- if(IsPlayerConnected(ID))
- {
- GetPlayerName(ID, pName, 24);
- GetPlayerName(playerid, muteername, 24);
- if(IsPlayerNPC(ID))
- {
- SendClientMessage(playerid, COLOR_ORED, "Error: You cannot mute a NPC");
- return 1;
- }
- if(ID == playerid)
- {
- SendClientMessage(playerid, COLOR_ORED, "Error: You cannot mute yourself!");
- return 1;
- }
- format(strv, 64, "~ You have been muted");
- SendClientMessage(ID,COLOR_ORANGE, strv);
- Muted[ID] = 1;
- format(stri, 64, "**%s has been muted", pName);
- SendClientMessageToAll(COLOR_ORED, stri);
- printf("Admin Command: %s has muted %s", muteername, pName);
- }
- return 1;
- }
- else if(!strcmp(cmdtext, "/unmute", true, 7))
- {
- if(!strlen(cmdtext[8]))
- {
- SendClientMessage(playerid, COLOR_ORED, "Usage: /unmute [playerid]");
- return 1;
- }
- new ID = strval(cmdtext[8]);
- new pName[24], unmuteername[24], stri[64], strv[256];
- tmp = strtok(cmdtext,idx);
- gMessage = strrest(cmdtext,idx);
- if(IsPlayerConnected(ID))
- {
- GetPlayerName(ID, pName, 24);
- GetPlayerName(playerid, unmuteername, 24);
- if(IsPlayerNPC(ID))
- {
- SendClientMessage(playerid, COLOR_ORED, "Error: You cannot unmute a NPC");
- return 1;
- }
- if(ID == playerid)
- {
- SendClientMessage(playerid, COLOR_ORED, "Error: You cannot unmute yourself!");
- return 1;
- }
- format(strv, 64, "~ You have been unmuted");
- SendClientMessage(ID,COLOR_ORANGE, strv);
- Muted[ID] = 0;
- format(stri, 64, "**%s has been unmuted", pName);
- SendClientMessageToAll(COLOR_ORED, stri);
- printf("Admin Command: %s has unmuted %s", unmuteername, pName);
- }
- return 1;
- }
- else if(!strcmp(cmdtext, "/ban", true, 4))
- {
- if(!strlen(cmdtext[5]))
- {
- SendClientMessage(playerid, COLOR_ORED, "Usage: /ban [playerid] [reason]");
- return 1;
- }
- new ID = strval(cmdtext[5]);
- new pName[24], banername[24], stri[64], strv[256];
- tmp = strtok(cmdtext,idx);
- gMessage = strrest(cmdtext,idx);
- if(IsPlayerConnected(ID))
- {
- GetPlayerName(ID, pName, 24);
- GetPlayerName(playerid, banername, 24);
- if(IsPlayerNPC(ID))
- {
- SendClientMessage(playerid, COLOR_ORED, "Error: You cannot ban a NPC");
- return 1;
- }
- if(ID == playerid)
- {
- SendClientMessage(playerid, COLOR_ORED, "Error: You cannot ban yourself!");
- return 1;
- }
- format(strv, 64, "~ You have been banned from the server for ^%s^", gMessage);
- SendClientMessage(ID,COLOR_ORANGE, strv);
- Ban(ID);
- format(stri, 64, "**%s has been banned from the server for ^%s^", pName,gMessage);
- SendClientMessageToAll(COLOR_ORED, stri);
- printf("Admin Command: %s has banned %s for ^%s^", banername, pName,gMessage);
- }
- return 1;
- }
- }
- if (AdminLevel[playerid] == 2 || AdminLevel[playerid] == 3 || AdminLevel[playerid] == 4) {
- if(!strcmp(cmdtext, "/freeze", true, 7))
- {
- if(!strlen(cmdtext[8]))
- {
- SendClientMessage(playerid, COLOR_ORED, "Usage: /freeze [playerid]");
- return 1;
- }
- new ID = strval(cmdtext[8]);
- new pName[24], freezeername[24], strv[256];
- tmp = strtok(cmdtext,idx);
- gMessage = strrest(cmdtext,idx);
- if(IsPlayerConnected(ID))
- {
- GetPlayerName(ID, pName, 24);
- GetPlayerName(playerid, freezeername, 24);
- if(IsPlayerNPC(ID))
- {
- SendClientMessage(playerid, COLOR_ORED, "Error: You cannot freeze a NPC");
- return 1;
- }
- if(ID == playerid)
- {
- SendClientMessage(playerid, COLOR_ORED, "Error: You cannot freeze yourself!");
- return 1;
- }
- format(strv, 64, "~ You have been frozen by an admin");
- SendClientMessage(ID,COLOR_ORANGE, strv);
- TogglePlayerControllable(ID,0);
- printf("Admin Command: %s has freezed %s", freezeername, pName);
- }
- return 1;
- }
- else if(!strcmp(cmdtext, "/unfreeze", true, 9))
- {
- if(!strlen(cmdtext[10]))
- {
- SendClientMessage(playerid, COLOR_ORED, "Usage: /unfreeze [playerid]");
- return 1;
- }
- new ID = strval(cmdtext[10]);
- new pName[24], unfreezeername[24], strv[256];
- tmp = strtok(cmdtext,idx);
- gMessage = strrest(cmdtext,idx);
- if(IsPlayerConnected(ID))
- {
- GetPlayerName(ID, pName, 24);
- GetPlayerName(playerid, unfreezeername, 24);
- if(IsPlayerNPC(ID))
- {
- SendClientMessage(playerid, COLOR_ORED, "Error: You cannot unfreeze a NPC");
- return 1;
- }
- if(ID == playerid)
- {
- SendClientMessage(playerid, COLOR_ORED, "Error: You cannot unfreeze yourself!");
- return 1;
- }
- format(strv, 64, "~ You have been unfrozen by an admin");
- SendClientMessage(ID,COLOR_ORANGE, strv);
- TogglePlayerControllable(ID,1);
- printf("Admin Command: %s has unfreezed %s", unfreezeername, pName);
- }
- return 1;
- }
- if(strcmp(cmd, "/sfspawn", true) == 0) {
- SetPlayerPos(playerid,-1976.6405,458.3334,35.1718);
- return 1;
- }
- }
- if (AdminLevel[playerid] == 3 || AdminLevel[playerid] == 4) {
- if(strcmp(cmd, "/createcash", true) == 0) {
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_WHITE, "Usage: /createcash [playerid] [amount]");
- return 1;
- }
- giveplayerid = strval(tmp);
- tmp = strtok(cmdtext, idx);
- if(!strlen(tmp)) {
- SendClientMessage(playerid, COLOR_WHITE, "Usage: /createcash [playerid] [amount]");
- return 1;
- }
- moneys = strval(tmp);
- if (IsPlayerConnected(giveplayerid)) {
- GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
- GetPlayerName(playerid, sendername, sizeof(sendername));
- GivePlayerMoney(giveplayerid, moneys);
- format(string, sizeof(string), "Createcash: You have sent %s $%d.", giveplayer, moneys);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- format(string, sizeof(string), "An admin %s has given you $%d", sendername,moneys);
- SendClientMessage(giveplayerid, COLOR_YELLOW, string);
- }
- return 1;
- }
- }
- //
- if(strcmp(cmd, "/prophelp", true)==0)
- {
- SendClientMessage(playerid, 0x8080FFAA, "Property- Information");
- SendClientMessage(playerid, 0x66CCFFAA, "To buy a property, use /buyprop(erty)");
- SendClientMessage(playerid, 0x66CCFFAA, "To sell a property, use /sellprop(erty)");
- SendClientMessage(playerid, 0x66CCFFAA, "List of the properties of you own: /myprops");
- return 1;
- }
- if(strcmp("/txt", cmd, true) == 0)
- {
- // new tmp[256];
- tmp = strtok(cmdtext,idx);
- new Message[256];
- new pName[MAX_PLAYER_NAME+1];
- new iName[MAX_PLAYER_NAME+1];
- if (HaveMobilePhone[playerid] == 0) return SendClientMessage(playerid, COLOR_ORED,"Error: You don't have a mobile phone");
- if(!strlen(tmp) || strlen(tmp) > 5) {
- SendClientMessage(playerid,COLOR_WHITE,"Usage: /txt [playerid] [message]");
- return 1;
- }
- new id = strval(tmp);
- gMessage = strrest(cmdtext,idx);
- if(!strlen(gMessage)) {
- SendClientMessage(playerid,COLOR_WHITE,"Usage: /txt [playerid] [message]");
- return 1;
- }
- if(!IsPlayerConnected(id)) {
- SendClientMessage(playerid,COLOR_WHITE,"Invalid receiver ID");
- return 1;
- }
- if(playerid != id) {
- GetPlayerName(id,iName,sizeof(iName));
- GetPlayerName(playerid,pName,sizeof(pName));
- if (!HaveMobilePhone[id]) return SendClientMessage(playerid,COLOR_WHITE,"Unable to reach the other person");
- format(Message,sizeof(Message),"You have sent a text message *%s* to %s",gMessage,iName);
- SendClientMessage(playerid,COLOR_YELLOW,Message);
- GivePlayerMoney(playerid, TXT_MESSAGE_COST);
- printf("TXT-Message: %s sent %s: %s",pName,iName,gMessage);
- format(Message,sizeof(Message),"You have received a text message from %s: %s",pName,gMessage);
- SendClientMessage(id,COLOR_YELLOW,Message);
- PlayerPlaySound(id,1085,0.0,0.0,0.0);
- }
- else {
- SendClientMessage(playerid,COLOR_ORED,"Error: You cannot send a text message to yourself!");
- }
- return 1;
- }
- //================================================================================================================================
- //================================================================================================================================
- //================================================================================================================================
- if(strcmp(cmd, "/buyprop", true)==0)
- {
- new str[128];
- new propid = IsPlayerNearProperty(playerid);
- if(propid == -1)
- {
- SendClientMessage(playerid, 0xFF0000AA, "You are not close enough to a property");
- return 1;
- }
- if(PlayerProps[playerid] == MAX_PROPERTIES_PER_PLAYER)
- {
- format(str, 128, "You already have %d properties! You cannot buy more!", PlayerProps[playerid]);
- SendClientMessage(playerid, 0xFF0000AA, str);
- return 1;
- }
- if(PropInfo[propid][PropIsBought] == 1)
- {
- new ownerid = GetPlayerID(PropInfo[propid][PropOwner]);
- if(ownerid == playerid)
- {
- SendClientMessage(playerid, 0xFF0000AA, "You already own this property!");
- return 1;
- }
- else
- {
- if(PropInfo[propid][PropUnbuyableTime])
- {
- format(str, 128, "This property is already bought by %s!", PropInfo[propid][PropOwner]);
- SendClientMessage(playerid, 0xFF0000AA, str);
- return 1;
- }
- }
- }
- if(GetPlayerMoney(playerid) < PropInfo[propid][PropValue])
- {
- format(str, 128, "You don't have enough money! You need $%d at least", PropInfo[propid][PropValue]);
- SendClientMessage(playerid, 0xFF0000AA, str);
- return 1;
- }
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, sizeof(pName));
- if(PropInfo[propid][PropUnbuyableTime])
- {
- format(str, 128, "This property is already bought by %s!", PropInfo[propid][PropOwner]);
- SendClientMessage(playerid, 0xFF0000AA, str);
- return 1;
- }
- PropInfo[propid][PropOwner] = pName;
- PropInfo[propid][PropIsBought] = 1;
- PropInfo[propid][PropUnbuyableTime] = 1;
- EarningsForPlayer[playerid] += PropInfo[propid][PropEarning];
- GivePlayerMoney(playerid, (0-PropInfo[propid][PropValue]));
- format(str, 128, "You have bought the property \"%s\" for $%d", PropInfo[propid][PropName], PropInfo[propid][PropValue]);
- SendClientMessage(playerid, 0xFFFF00AA, str);
- PlayerPlaySound(playerid, 1149, 0.0, 0.0, 0.0);
- PlayerProps[playerid]++;
- SaveProperties();
- return 1;
- }
- //================================================================================================================================
- //================================================================================================================================
- //================================================================================================================================
- if(strcmp(cmd, "/sellprop", true) == 0)
- {
- new str[128];
- new propid = IsPlayerNearProperty(playerid);
- new ownerid = GetPlayerID(PropInfo[propid][PropOwner]);
- if(propid == -1)
- {
- SendClientMessage(playerid, 0xFF0000AA, "You are not close enough to a property");
- return 1;
- }
- if(PropInfo[propid][PropIsBought] == 1)
- {
- if(ownerid != playerid)
- {
- SendClientMessage(playerid, 0xFF0000AA, "You don't own this property, smart ass!");
- return 1;
- }
- }
- if(ownerid != playerid)
- {
- SendClientMessage(playerid, 0xFF0000AA, "You don't own this property, smart ass!");
- return 1;
- }
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, sizeof(pName));
- format(PropInfo[propid][PropOwner], MAX_PLAYER_NAME, "Nobody");
- PropInfo[propid][PropIsBought] = 0;
- PropInfo[propid][PropUnbuyableTime] = 0;
- GivePlayerMoney(playerid, (PropInfo[propid][PropValue]/2));
- format(str, 128, "You have sold your property \"%s\" for 50 percents of it's Price: $%d,-", PropInfo[propid][PropName], PropInfo[propid][PropValue]/2);
- SendClientMessage(playerid, 0xFFFF00AA, str);
- PlayerProps[playerid]--;
- EarningsForPlayer[playerid] -= PropInfo[propid][PropEarning];
- PropInfo[propid][PropUnbuyableTime] = 0;
- SaveProperties();
- return 1;
- }
- if(strcmp(cmd, "/propertyinfo", true) == 0 || strcmp(cmd, "/propinfo", true) == 0)
- {
- new str[128];
- new propid = IsPlayerNearProperty(playerid);
- new ownerid = GetPlayerID(PropInfo[propid][PropOwner]);
- if(propid == -1)
- {
- SendClientMessage(playerid, 0xFF0000AA, "You're not close enough to a property");
- return 1;
- }
- if(ownerid != playerid)
- {
- format(str, 128, "Property: %s",PropInfo[propid][PropName]);
- SendClientMessage(playerid, COLOR_BROWN, str);
- format(str, 128, "Price: $%d",PropInfo[propid][PropValue]);
- SendClientMessage(playerid, 0xFFFF00AA, str);
- format(str, 128, "Earning: $%d",PropInfo[propid][PropEarning]);
- SendClientMessage(playerid, 0xFFFF00AA, str);
- format(str, 128, "Owner: %s",PropInfo[propid][PropOwner]);
- SendClientMessage(playerid, 0xFFFF00AA, str);
- return 1;
- }
- if(ownerid == playerid)
- {
- format(str, 128, "Welcome to your Property: %s",PropInfo[propid][PropName]);
- SendClientMessage(playerid, COLOR_BROWN, str);
- format(str, 128, "Price: $%d",PropInfo[propid][PropValue]);
- SendClientMessage(playerid, 0xFFFF00AA, str);
- format(str, 128, "Earning: $%d",PropInfo[propid][PropEarning]);
- SendClientMessage(playerid, 0xFFFF00AA, str);
- return 1;
- }
- return 1;
- }
- //================================================================================================================================
- //================================================================================================================================
- //================================================================================================================================
- if(strcmp(cmd, "/myprops", true) == 0)
- {
- new str[128], ownerid;
- if(PlayerProps[playerid] == 0)
- {
- SendClientMessage(playerid, 0xFF0000AA, "Error: You don't own any properties!");
- return 1;
- }
- format(str, 128, "Your Properties (%d):", PlayerProps[playerid]);
- SendClientMessage(playerid, COLOR_BROWN, str);
- for(new propid; propid < PropertiesAmount; propid++)
- {
- if(PropInfo[propid][PropIsBought] == 1)
- {
- ownerid = GetPlayerID(PropInfo[propid][PropOwner]);
- if(ownerid == playerid)
- {
- format(str, 128, "\"%s\" Price: $%d,- Earnings: $%d,-", PropInfo[propid][PropName], PropInfo[propid][PropValue], PropInfo[propid][PropEarning]);
- SendClientMessage(playerid, COLOR_BROWN, str);
- }
- }
- }
- return 1;
- }
- return 0;
- }
- public OnPlayerText(playerid, text[])
- {
- if (Muted[playerid] == 1) {
- SendClientMessage(playerid, COLOR_ORED,"Error: You are not able to speak while muted!");
- return 0;
- }
- if (IsLogged[playerid] == 0) {
- SendClientMessage(playerid, COLOR_ORED,"Error: You must log in to speak!");
- return 0;
- }
- return 1;
- }
- //------------------------------------------------------------------------------------------------------
- public OnPlayerSpawn(playerid)
- {
- PlayerPlaySound(playerid, 1184, 0.0, 0.0, 0.0);
- if (IsInJail[playerid] == 1) {
- SetPlayerPos(playerid,264.8763,81.9862,1001.0390);
- SetPlayerInterior(playerid, 6);
- TogglePlayerControllable(playerid, 0);
- SendClientMessage(playerid, COLOR_BLUE,"You have been arrested for 2 minutes");
- JailTimer[playerid] = SetTimerEx("Unjail", 120000, 1, "d", playerid);
- ResetPlayerWeapons(playerid);
- return 1;
- }
- if (JustDied[playerid] == 1) {
- SetPlayerPos(playerid, -2658.4133,628.4344,14.4531);
- SendClientMessage(playerid, COLOR_GREEN,"Medical Bills: $500");
- GivePlayerMoney(playerid, -500);
- SetPlayerSkin(playerid, PlayerOwnSkin[playerid]);
- ResetPlayerWeapons(playerid);
- if (Job[playerid] == 1) {
- GivePlayerWeapon(playerid,3,-1);
- GivePlayerWeapon(playerid,24,190);
- //
- }
- if (Job[playerid] == 2) {
- GivePlayerWeapon(playerid,17,2);
- GivePlayerWeapon(playerid,42,400);
- }
- if (Job[playerid] == 3) {
- GivePlayerWeapon(playerid,23,100);
- GivePlayerWeapon(playerid,27,400);
- }
- } //
- if (FirstSpawn[playerid] == 1) {
- TogglePlayerControllable(playerid, 0);
- if (Firstvisit[playerid] == 1) ShowPlayerDialog(playerid,1,DIALOG_STYLE_MSGBOX,"San Fierro RPg","This seems to be your first visit here. Welcome! To start playing, type /register yourpassword, and then /login yourpassword","Continue"," ");
- Spawned[playerid] = 0;
- SetPlayerInterior(playerid, 0);
- ResetPlayerWeapons(playerid);
- SetPlayerPos(playerid,-1976.6405,458.3334,35.1718);
- SetPlayerFacingAngle(playerid, 90.0);
- SetCameraBehindPlayer(playerid);
- Speedom[playerid] = TextDrawCreate(350.000000,410.000000,"..");
- TextDrawUseBox(Speedom[playerid],0);
- TextDrawBoxColor(Speedom[playerid],0xFFFFFF85);
- TextDrawTextSize(Speedom[playerid],620.000000,0.000000);
- TextDrawAlignment(Speedom[playerid],0);
- TextDrawBackgroundColor(Speedom[playerid],0x000000FF);
- TextDrawFont(Speedom[playerid],1);
- TextDrawLetterSize(Speedom[playerid],0.4099985,1.400000);
- TextDrawColor(Speedom[playerid],0xFFFFFFFF);
- TextDrawSetOutline(Speedom[playerid],1);
- TextDrawSetProportional(Speedom[playerid],1);
- TextDrawSetShadow(Speedom[playerid],1);
- TextDrawHideForPlayer(playerid, Speedom[playerid]);
- FirstSpawn[playerid] = 0;
- }
- return 1;
- }
- //------------------------------------------------------------------------------------------------------
- public OnPlayerDeath(playerid, killerid, reason)
- {
- new string[120];
- new deadname[24];
- JustDied[playerid] = 1;
- GetPlayerName(playerid, deadname,24);
- format(string, sizeof(string), "**%s has died", deadname);
- SendClientMessageToAllEx(playerid, COLOR_GREY,string);
- if (Job[killerid] != 1) {
- Wanted[killerid] = 1;
- SendClientMessage(playerid, COLOR_BLUE,"You have been wanted for a murder");
- }
- if (killerid != playerid) {
- IsInJail[playerid] = 1;
- Wanted[playerid] = 0;
- }
- return 1;
- }
- //------------------------------------------------------------------------------------------------------
- public OnPlayerRequestClass(playerid, classid)
- {
- SetupPlayerForClassSelection(playerid);
- SetPlayerSkin(playerid, PlayerOwnSkin[playerid]);
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- new string[170];
- format(string, sizeof(string), "Welcome back %s! Now spawn & then login!", GetPlayerNameEx(playerid));
- if (Firstvisit[playerid] == 0) SendClientMessage(playerid, COLOR_GREEN,string);
- if (Firstvisit[playerid] == 1) SendClientMessage(playerid, COLOR_GREEN,"Welcome, newcomer! Press SHIFT to spawn, then you are able to REGISTER & LOGIN!");
- return 1;
- }
- public SetupPlayerForClassSelection(playerid)
- {
- SetPlayerInterior(playerid,0);
- SetPlayerPos(playerid,-2902.8886,-369.3730,3.5062);
- SetPlayerFacingAngle(playerid, 270.0);
- SetPlayerCameraPos(playerid,-2897.2358,-366.6657,3.5664);
- SetPlayerCameraLookAt(playerid,-2902.8886,-369.3730,3.5062);
- PlayerPlaySound(playerid,1183,0.0,0.0,0.0);
- }
- public OnGameModeInit()
- {
- SetGameModeText("San Fierro RPg");
- ShowPlayerMarkers(1);
- ShowNameTags(1);
- EnableStuntBonusForAll(0);
- UsePlayerPedAnims();
- SFRPg = TextDrawCreate(489.000000, 5.000000, " San Fierro RPg");
- TextDrawSetOutline(SFRPg,1);
- TextDrawFont(SFRPg,0);
- TextDrawSetProportional(SFRPg,1);
- TextDrawSetShadow(SFRPg,1);
- TextDrawColor(SFRPg,0x0FB1FF96);
- AddPlayerClass(0,1958.3783,1343.1572,15.3746,270.1425,0,0,24,300,-1,-1);
- DoNOTDeleteThis = CreatePickup(1239, 1, 0.0,0.0,0.0);
- Gym = CreatePickup(1239,23,768.1502,-37.6432,1000.6864);
- DinerExit = CreatePickup(1239,23,460.0875,-88.5422,999.5546);
- DinerIn[1] = CreatePickup(1239,23,-2279.2070,595.8998,39.2132);
- DinerIn[2] = CreatePickup(1239,23,-2099.2145,715.3974,69.5625);
- DinerIn[3] = CreatePickup(1239,23,-2430.6308,-136.2021,35.3203);
- DinerIn[4] = CreatePickup(1239,23,-2523.4770,1216.2227,37.4283);
- Bankin[1] = CreatePickup(1239,23,-1704.2038,785.6531,25.5571);
- Market = CreatePickup(1239,23,-21.4673,-56.3102,1003.5468);
- Restaurant = CreatePickup(1239,23,450.4185,-83.8341,999.5546);
- TriadsPick = CreatePickup(1239,23,-2155.3286,-224.1345,35.3203);
- Drivingschoolpickup = CreatePickup(1239,23,-2033.0300,-117.4337,1035.1718);
- ElectronicsDealer = CreatePickup(1239, 23, -2231.8823,128.7616,1035.4140);
- CityhallGoIn = CreatePickup(1239,23,-2765.8862,375.5025,6.3346);
- BarPickup[0] = CreatePickup(1239,23,501.1939,-75.3717,998.7578);
- BarPickup[1] = CreatePickup(1239,23,499.2912,-20.7353,1000.6796);
- SFPDPick = CreatePickup(1239, 23, -1620.0010,683.0117,7.1875);
- SFFDPick = CreatePickup(1239, 23, -2024.8890,67.1163,28.4371);
- ClothesShop[0] = CreatePickup(1275, 23, 208.8020,-3.6937,1001.2177);
- ClothesShop[1] = CreatePickup(1275, 23, 161.4568,-84.0934,1001.8046);
- ClothesShop[2] = CreatePickup(1275,23,207.7889,-100.9175,1005.2578);
- ClothesShop[3] = CreatePickup(1275,23,203.8927,-44.2191,1001.8046);
- AddStaticPickup(1240, 23, -2658.5336,639.0750,14.4531, 0); //Hospital health
- AddStaticVehicle(415,-2089.7454,-85.3183,34.9356,0.0900,36,1);
- AddStaticVehicle(415,-2076.7393,-84.4259,34.8911,357.8584,116,1) ;
- AddStaticVehicle(489,636.1039,-609.7283,16.4795,176.9169,14,123); // rancher Jail LS
- AddStaticVehicle(504,-2091.6350,-106.7603,35.1125,179.5832,45,29) ;
- AddStaticVehicle(560,-2396.2222,-594.7454,132.3533,123.1677,33,0) ;
- AddStaticVehicle(411,-2414.5781,-586.8558,132.3755,215.3865,112,1) ;//
- AddStaticVehicle(482,-2527.9175,-602.6952,132.6175,179.0378,41,20) ;
- AddStaticVehicle(451,-2517.0481,-601.8521,132.2690,179.6375,36,36 );
- AddStaticVehicle(522,-2494.2900,-601.8505,132.1326,178.4421,3,8) ;
- AddStaticVehicle(522,-2622.9067,-509.6570,70.9034,284.9871,3,8 );
- AddStaticVehicle(405,-2747.2739,-306.4048,6.9132,50.7011,24,1 );
- AddStaticVehicle(505,-2774.2708,-281.9049,6.7476,178.6849,37,0) ;
- AddStaticVehicle(409,-2738.0176,-322.8980,6.8391,313.5169,1,1) ;//
- AddStaticVehicle(457,-2657.9009,-290.8440,7.1044,313.4402,25,25) ;
- AddStaticVehicle(457,-2652.5388,-295.5096,7.1101,312.4090,86,86) ;
- AddStaticVehicle(457,-2644.5061,-290.4049,7.1283,139.4791,8,8) ;
- AddStaticVehicle(457,-2650.2507,-284.7023,7.1297,137.3287,2,1) ;
- AddStaticVehicle(475,-2718.7566,-181.6171,3.9922,269.6131,68,8 );
- AddStaticVehicle(411,-2692.3340,-83.6105,4.7104,90.7628,1,1) ;
- AddStaticVehicle(560,-2682.6699,-22.7128,4.3281,178.6174,1,31) ;
- AddStaticVehicle(560,-2627.3579,-34.8250,4.0417,181.9431,41,29) ;
- AddStaticVehicle(482,-2729.5671,76.7876,4.4511,87.5421,32,32) ;
- AddStaticVehicle(579,-2484.3000,5.7674,25.5544,91.3108,42,42 );
- AddStaticVehicle(567,-2528.8882,-5.5797,25.4875,271.5341,90,96) ;
- AddStaticVehicle(429,-2592.7732,-110.8420,3.9306,89.9971,2,1 );
- AddStaticVehicle(415,-2615.9045,-178.3203,4.1076,269.3111,40,1) ;
- AddStaticVehicle(480,-2352.2312,-124.4615,34.9708,179.3509,17,1) ;
- AddStaticVehicle(448,-2319.5144,-150.8684,35.1509,176.9124,3,6 );
- AddStaticVehicle(535,-2099.2341,-36.4293,35.1021,357.3710,77,26 );
- AddStaticVehicle(535,-2021.4100,-47.6897,35.1866,184.1009,69,1 );//
- AddStaticVehicle(535,-2085.3667,61.6716,34.2269,88.7158,28,1 );
- AddStaticVehicle(567,-2357.8167,-43.2394,35.1865,90.6814,97,96) ;
- AddStaticVehicle(403,-1855.5707,-176.4486,9.9250,270.1853,25,1 );
- AddStaticVehicle(492,-1821.1146,-161.7525,9.1874,164.9686,28,56 );
- AddStaticVehicle(530,-1694.7194,8.6605,3.3137,348.2751,111,1 );//
- AddStaticVehicle(530,-1712.0934,10.8106,3.3879,303.1499,112,1 );
- AddStaticVehicle(530,-1716.6062,19.1024,3.3437,273.4997,119,1 );
- AddStaticVehicle(530,-1700.6174,6.2953,3.3148,352.1077,114,1 );
- AddStaticVehicle(522,-1697.8990,63.3702,3.1263,301.0493,39,106) ;//
- AddStaticVehicle(522,-1682.4491,41.4261,3.1198,338.2361,51,118 );
- AddStaticVehicle(522,-1694.0885,48.6863,3.1207,317.3058,3,3) ;
- AddStaticVehicle(493,-1760.9098,-193.8202,-0.1219,266.3580,36,13) ;
- AddStaticVehicle(426,-1669.5262,-33.8696,3.3108,314.1520,42,42) ;
- AddStaticVehicle(403,-1837.5128,-15.2423,15.6987,271.1784,54,1 );
- AddStaticVehicle(426,-1839.7010,-21.5651,14.8602,265.8797,42,42 );
- AddStaticVehicle(421,-1885.3856,-161.3161,11.6546,355.7335,71,72 );
- AddStaticVehicle(482,-1861.0438,-140.4725,12.0201,87.6606,66,66 );//
- AddStaticVehicle(545,-2485.9868,97.9314,34.9680,268.0125,81,81) ;
- AddStaticVehicle(533,-2484.7358,65.7313,25.3992,358.7399,79,1 );
- AddStaticVehicle(462,-2694.2021,68.7381,3.9321,85.6921,2,1 );
- AddStaticVehicle(424,-2941.3359,-794.7429,6.8570,340.8897,2,2) ;
- AddStaticVehicle(424,-2938.8164,-818.2305,7.0451,13.5219,2,2) ;
- AddStaticVehicle(473,-2987.2434,-861.8030,-0.8947,144.9324,56,15) ;
- AddStaticVehicle(473,-2967.3806,-684.3901,0.0677,351.0859,56,15 );
- AddStaticVehicle(473,-2954.7388,-498.1349,0.0155,5.6709,56,15) ;
- AddStaticVehicle(493,-2947.7612,-364.1319,-0.5123,78.4238,36,13) ;
- AddStaticVehicle(461,-2068.5420,-503.7956,35.0035,182.6852,46,46) ;
- AddStaticVehicle(483,-1906.4901,-611.7231,24.5863,319.5491,17,0 );
- AddStaticVehicle(411,-2148.7424,-922.7524,31.7505,267.8838,106,1) ;
- AddStaticVehicle(411,-2125.3806,-885.7675,31.7505,270.2341,104,1 );
- AddStaticVehicle(482,-1871.7642,-874.4785,32.1329,90.1095,118,118) ;
- AddStaticVehicle(411,-1872.5656,-957.2282,31.7505,88.9793,80,1) ;
- AddStaticVehicle(400,-1821.8348,-886.4156,42.0592,175.1724,123,1) ;
- AddStaticVehicle(512,-1431.6896,-954.0375,201.2352,273.5343,15,123) ;//
- AddStaticVehicle(512,-1432.9872,-942.3373,201.3756,274.4437,32,112 );
- AddStaticVehicle(461,-2205.1782,-310.5668,35.2394,330.2716,46,46) ;
- AddStaticVehicle(482,-2216.4529,-85.7872,35.4346,1.2615,64,64) ;
- AddStaticVehicle(498,-2115.4626,-3.3854,35.3872,269.2903,13,120) ;
- AddStaticVehicle(437,-2092.6289,-381.4249,35.4662,89.8969,79,7) ;
- AddStaticVehicle(437,-2201.6951,-406.7657,35.4694,228.5155,79,7) ;
- AddStaticVehicle(437,-2047.2311,-528.4994,35.4647,286.8040,79,7 );
- AddStaticVehicle(455,-1578.2035,97.3175,4.1610,135.9403,37,1) ;
- AddStaticVehicle(443,-1747.0641,-164.1042,4.1860,39.5812,20,1) ;
- AddStaticVehicle(545,-2267.1362,85.5752,34.9679,269.1610,67,67) ;
- AddStaticVehicle(496,-2264.8977,200.3980,34.8805,89.9701,66,72 );
- AddStaticVehicle(536,-2216.8618,113.6911,35.0595,88.9417,12,1 );
- AddStaticVehicle(409,-2414.7739,331.6805,34.7672,331.1144,1,1) ;
- AddStaticVehicle(405,-2452.8604,138.2975,34.8354,46.6420,24,1) ;
- AddStaticVehicle(461,-2523.0012,338.5651,34.6932,250.6181,61,1) ;
- AddStaticVehicle(439,-2502.7300,382.2403,35.0181,235.8174,54,38) ;
- AddStaticVehicle(400,-2470.8625,407.1818,27.8697,139.4656,123,1 );
- AddStaticVehicle(496,-2522.4219,310.7949,27.4816,70.6665,20,20) ;
- AddStaticVehicle(428,-2440.9980,509.6792,30.0563,206.6596,4,75 );
- AddStaticVehicle(428,-2437.7600,510.8553,30.0507,202.1894,4,75 );
- AddStaticVehicle(560,-2425.6440,518.4800,29.6348,216.9742,9,39) ;
- AddStaticVehicle(463,-2473.4978,743.3479,34.5559,179.9892,84,84) ;
- AddStaticVehicle(561,-2412.3730,741.7964,34.8297,179.4121,8,17) ;
- AddStaticVehicle(463,-2451.2593,740.6838,34.7129,180.6275,79,39) ;
- AddStaticVehicle(467,-2248.2617,692.7663,49.1081,179.2399,58,8 );
- AddStaticVehicle(405,-2151.4058,637.0890,52.1898,182.3598,75,1 );
- AddStaticVehicle(405,-2134.6875,686.8921,63.7561,178.3476,123,1 );
- AddStaticVehicle(409,-1951.6525,724.5811,45.1672,270.0913,1,1) ;
- AddStaticVehicle(429,-1941.2656,585.4785,34.7953,359.2309,3,1) ;
- AddStaticVehicle(439,-1922.0646,303.6587,40.9425,177.2474,25,78) ;
- AddStaticVehicle(461,-1974.6830,170.9425,27.3574,271.5703,46,46 );
- AddStaticVehicle(420,-1987.9830,104.7278,27.3169,0.4059,6,1) ;
- AddStaticVehicle(420,-1988.1044,147.8747,27.3177,0.2008,6,1 );
- AddStaticVehicle(467,-2922.5259,428.7520,4.6539,276.2402,2,1) ;
- AddStaticVehicle(493,-2981.0247,496.3422,-0.6554,1.5943,36,13) ;
- AddStaticVehicle(549,-2578.6179,626.5599,27.4438,359.1449,117,1) ;
- AddStaticVehicle(575,-2610.8423,1405.6122,6.7507,270.0862,19,96) ;
- AddStaticVehicle(411,-1663.4688,1211.4713,6.9794,276.9535,12,1 );
- AddStaticVehicle(558,-1656.2698,1208.2489,20.7792,268.6007,42,42 );
- AddStaticVehicle(558,-1660.5311,1215.1492,20.7869,315.8402,24,1) ;
- AddStaticVehicle(451,-1650.9478,1208.6367,13.3797,247.0129,18,18) ;
- AddStaticVehicle(451,-1656.4871,1215.6764,13.4254,259.0972,101,1 );
- AddStaticVehicle(560,-2047.9236,901.2451,53.3068,356.4079,21,1 );
- AddStaticVehicle(560,-2105.8264,901.4780,76.3014,4.8684,36,1) ;
- AddStaticVehicle(500,-2927.3159,500.5060,5.0168,268.8409,28,119) ;
- AddStaticVehicle(409,-2752.1567,374.9532,3.9412,179.1495,1,1) ;
- AddStaticVehicle(405,-2657.6785,374.4564,4.1077,1.3494,75,1 );
- AddStaticVehicle(426,-2664.9829,267.9181,4.0801,0.0174,7,7 );
- AddStaticVehicle(439,-2681.6306,267.9998,4.2312,358.7699,65,79) ;
- AddStaticVehicle(462,-2636.0247,247.4894,3.9279,163.5248,2,1) ;
- AddStaticVehicle(559,-2691.8088,204.5243,3.9923,359.4068,68,8 );
- AddStaticVehicle(496,-2793.0317,229.3433,6.8049,89.8252,53,56) ;
- AddStaticVehicle(560,-2710.5635,128.6468,3.9600,177.1886,37,0) ;
- AddStaticVehicle(533,-2613.7000,205.8831,4.6949,1.1401,74,1 );
- AddStaticVehicle(526,-2616.9363,71.5616,4.1026,268.8823,17,1) ;
- AddStaticVehicle(436,-2546.9377,-142.7184,13.8009,0.8366,109,1 );
- AddStaticVehicle(517,-2459.4773,-150.5229,25.7609,1.8047,36,36) ;
- AddStaticVehicle(496,-2592.9810,-191.1821,3.9750,91.0989,31,31 );
- AddStaticVehicle(475,-2694.0012,-147.6346,4.0512,90.9210,76,1 );
- AddStaticVehicle(421,-2796.6199,-184.0407,6.8207,91.6072,42,42 );
- AddStaticVehicle(566,-2796.3052,-39.5262,7.0876,89.8012,8,17 );
- AddStaticVehicle(467,-2878.8960,734.5536,29.3162,280.5990,60,1 );
- AddStaticVehicle(482,-2462.1184,793.0873,35.2270,93.7908,28,28 );
- AddStaticVehicle(439,-2380.2781,1269.3492,25.1014,277.3688,37,78 );
- AddStaticVehicle(522,-1821.9445,1310.5370,59.3070,186.3879,3,8) ;
- AddStaticVehicle(475,-1829.7480,1289.9834,59.8258,21.8999,61,61) ;
- AddStaticVehicle(475,-1842.0276,1304.4764,59.5341,198.8919,37,0 );
- AddStaticVehicle(405,-1755.8068,953.2106,24.6171,84.9867,75,1 );
- AddStaticVehicle(480,-1686.7346,1007.9662,17.3024,92.5730,66,72) ;
- AddStaticVehicle(405,-1587.0150,859.0454,7.4098,90.4344,75,1) ;
- AddStaticVehicle(439,-1629.2559,870.3282,8.1322,177.2777,43,21 );
- AddStaticVehicle(533,-1707.0554,795.3817,24.5184,2.4475,77,1) ;
- AddStaticVehicle(453,-1463.8043,1023.7324,-0.2395,269.1420,56,56 );
- AddStaticVehicle(473,-1509.0499,1385.6211,-0.2875,114.2092,56,15 );
- AddStaticVehicle(417,-1468.1395,1490.9220,8.3433,92.3864,0,0 );
- AddStaticVehicle(417,-2311.2693,1544.9398,18.8852,183.6456,0,0 );
- AddStaticVehicle(469,-2514.7388,1545.1013,17.3351,349.7112,1,3 );
- AddStaticVehicle(473,-2432.8538,1568.3925,-0.0528,353.0695,56,53 );
- AddStaticVehicle(473,-2434.4873,1571.9756,-0.1826,348.1105,56,15) ;
- AddStaticVehicle(521,-2501.2534,1222.1891,36.9992,139.5936,87,118) ;
- AddStaticVehicle(496,-2867.3279,695.7776,23.2883,296.3333,22,22 );
- AddStaticVehicle(496,-2857.4624,830.0972,39.8342,238.8571,42,42 );
- AddStaticVehicle(401,-2836.6306,870.4559,43.7638,267.2119,83,1) ;
- AddStaticVehicle(401,-2839.8884,925.7379,43.8342,274.0428,47,47) ;
- AddStaticVehicle(410,-2855.1917,962.1486,43.6477,294.1936,9,1 );
- AddStaticVehicle(516,-2900.1345,1104.5038,26.8936,272.1553,9,1) ;
- AddStaticVehicle(418,-2898.4971,1161.4402,13.5039,272.4668,95,95) ;
- AddStaticVehicle(415,-2722.1973,980.1292,54.2327,9.4435,25,1 );
- AddStaticVehicle(411,-2728.2146,910.1182,67.3208,153.1185,112,1) ;
- AddStaticVehicle(421,-2634.7214,929.3314,71.3155,214.6021,30,1) ;
- AddStaticVehicle(405,-2680.4905,869.2202,76.4498,23.7850,91,1 );
- AddStaticVehicle(558,-2650.5452,856.2390,63.6388,312.0352,117,1 );
- AddStaticVehicle(418,-2205.7361,293.8083,35.2104,359.0113,119,119 );
- AddStaticVehicle(400,-2231.1545,293.4678,35.2612,1.3597,14,123) ;
- AddStaticVehicle(426,-2792.9805,785.0926,49.5488,17.1913,7,7 );
- AddStaticVehicle(533,-1997.0570,708.1403,45.0732,359.8203,52,39);
- AddStaticVehicle(536,-2098.6619,653.4818,52.1045,178.5289,57,96) ;
- AddStaticVehicle(475,-1772.8362,1205.1267,24.9264,128.7472,21,1) ;
- AddStaticVehicle(482,-1698.9235,1029.1211,45.2640,163.2027,28,28 );
- AddStaticVehicle(421,-1915.2972,792.2175,39.5330,271.2570,42,42 );
- AddStaticVehicle(482,-1830.3928,636.3265,30.5508,181.9362,62,62) ;
- AddStaticVehicle(551,-1767.2255,857.6757,24.6063,90.7746,72,1) ;
- AddStaticVehicle(533,-1996.7197,780.7192,45.0773,0.8333,74,1 );
- AddStaticVehicle(480,-2156.5957,781.6992,69.2316,271.9981,58,1 );
- AddStaticVehicle(561,-2206.7849,718.1914,49.4181,359.8657,101,1) ;
- AddStaticVehicle(482,-2287.0796,581.4111,34.9593,270.0385,59,36) ;
- AddStaticVehicle(482,-2586.3882,311.3461,4.9411,90.7013,88,1) ;
- AddStaticVehicle(439,-2586.3213,325.2354,4.7471,270.4281,65,79 );
- AddStaticVehicle(521,-2590.9128,484.1599,14.1862,58.1234,75,13) ;
- AddStaticVehicle(463,-2454.1155,638.9645,32.6119,266.5039,74,1 );
- AddStaticVehicle(475,-2588.4861,632.4481,14.2561,269.3260,9,39 );
- AddStaticVehicle(479,-2546.5293,647.5505,14.1927,90.1881,109,100) ;
- AddStaticVehicle(405,-2566.9233,556.1500,14.3396,294.3413,36,1) ;
- AddStaticVehicle(461,-2621.0337,137.8928,4.0045,266.5985,46,46 );
- AddStaticVehicle(408,-2655.6912,-194.1583,4.7043,359.8855,26,26 );
- AddStaticVehicle(479,-2274.9456,-119.1158,35.1114,266.5583,54,31 );
- AddStaticVehicle(496,-2263.0579,18.8142,34.8656,354.0030,42,42) ;
- AddStaticVehicle(475,-2167.6179,86.2425,35.0484,172.0044,21,1 );
- AddStaticVehicle(579,-2265.7461,452.6116,34.9076,250.2149,95,105 );
- AddStaticVehicle(405,-2379.3401,625.8353,33.0000,1.2157,36,1 );
- AddStaticVehicle(579,-2213.2063,416.5867,35.0997,357.7801,7,7 );
- AddStaticVehicle(582,-2123.9011,428.0708,34.6792,356.2318,14,1 );
- AddStaticVehicle(482,-2123.8403,380.5338,35.2907,87.8615,64,64 );
- AddStaticVehicle(582,-2044.8904,460.4015,35.2268,304.5739,56,123 );
- AddStaticVehicle(405,-2308.2900,673.6360,44.3038,90.5505,65,79 );
- AddStaticVehicle(480,-2175.9424,654.7142,49.2104,181.1464,12,12 );
- AddStaticVehicle(405,-2650.2134,703.3293,27.7206,270.0416,11,1 );
- AddStaticVehicle(496,-2694.9968,719.9131,34.2360,176.1588,42,42 );
- AddStaticVehicle(482,-1612.3462,1284.5171,7.3010,90.9943,85,85) ;
- AddStaticVehicle(445,-1630.5129,1289.7798,6.9140,135.4144,37,37 );
- AddStaticVehicle(482,-1834.8303,1425.0577,7.2412,179.1661,57,57) ;
- AddStaticVehicle(411,-1975.7601,1224.7452,31.4079,272.5271,106,1 );
- AddStaticVehicle(560,-1971.0621,1185.6659,45.0734,89.7986,37,0 );
- AddStaticVehicle(480,-1847.4036,1165.1617,39.5751,356.2450,73,45 );
- AddStaticVehicle(428,-1833.1833,1096.2388,45.4880,89.0391,4,75) ;
- AddStaticVehicle(439,-1730.7964,1089.0475,45.3416,271.8883,57,8 );
- AddStaticVehicle(455,-1944.7908,1001.1067,35.6111,269.5481,32,74 );
- AddStaticVehicle(482,-1673.3295,1090.5961,8.0443,269.4953,10,10 );
- AddStaticVehicle(400,-2124.6316,-935.2519,32.1158,268.5499,62,1) ;
- AddStaticVehicle(506,-2150.3098,-772.5972,31.6486,270.1075,37,37) ;
- AddStaticVehicle(506,-2134.1143,-760.7621,31.7280,90.9188,7,7) ;
- AddStaticVehicle(421,-2124.5564,-847.0036,31.9059,270.5157,95,1 );
- AddStaticVehicle(405,-1736.9055,1053.4701,17.4609,267.5370,40,1 );
- AddStaticVehicle(439,-1696.8990,977.2657,17.4815,359.7377,67,8 );
- AddStaticVehicle(496,-1474.2157,-137.3864,5.6264,270.1316,62,62 );
- AddStaticVehicle(400,-1337.5870,-128.9230,6.0923,88.6881,62,1) ;
- AddStaticVehicle(482,-1426.0374,-212.6052,6.0536,88.9253,57,57) ;
- AddStaticVehicle(516,-1369.8975,-216.2965,5.8337,88.8366,122,1) ;
- AddStaticVehicle(517,-1337.3739,-37.7222,5.8549,87.8366,36,36) ;
- AddStaticVehicle(480,-2645.6714,1375.8912,6.9395,268.6650,12,12) ;
- AddStaticVehicle(411,-2618.2075,1349.1384,6.9411,0.7610,81,1 );
- AddStaticVehicle(477,-2617.5005,1376.3701,6.8800,180.0679,94,1) ;
- AddStaticVehicle(411,-2646.4983,1334.4966,6.9009,0.6167,106,1) ;
- AddStaticVehicle(487,-1637.0043,1381.6923,18.5907,137.6304,29,42) ;
- AddStaticVehicle(487,-2632.1711,1417.5526,24.9424,235.3438,29,42 );
- AddStaticVehicle(480,-1623.0930,817.0657,6.5923,2.0322,6,6) ;
- AddStaticVehicle(493,-1409.9961,917.3229,-0.3734,301.5048,1,5 );
- AddStaticVehicle(493,-1403.3783,888.8575,-0.1041,328.1305,36,13 );
- AddStaticVehicle(480,-1488.3904,666.5170,6.9579,92.0792,2,2 );
- AddStaticVehicle(484,-1475.4053,703.6797,0.2567,181.1956,50,32 );
- AddStaticVehicle(482,-1487.4949,758.5935,7.5513,89.3724,32,53);
- AddStaticVehicle(403,-1654.6354,452.5728,8.2105,212.2164,24,77) ;
- AddStaticVehicle(455,-1701.2188,407.8390,7.6164,221.8163,84,58) ;
- AddStaticVehicle(461,-1673.6534,399.1507,6.7568,311.2735,37,1) ;
- AddStaticVehicle(421,-1665.1743,351.3592,6.8215,345.8147,42,42) ;
- AddStaticVehicle(455,-1622.2393,84.3414,3.9898,147.7921,1,31 );
- AddStaticVehicle(453,-1632.5704,161.8541,-0.2770,315.6891,56,56 );
- AddStaticVehicle(460,-1446.9373,96.2603,1.8018,313.8602,1,30 );
- AddStaticVehicle(421,-1319.0929,-337.8624,14.0309,260.0551,25,1) ;
- AddStaticVehicle(553,-1622.4431,-311.8704,15.4839,27.5372,55,23) ;
- AddStaticVehicle(417,-1712.1791,-456.0522,14.2207,1.9482,0,0 );
- AddStaticVehicle(447,-1756.1366,-444.6548,0.7483,5.0545,75,2) ;
- AddStaticVehicle(507,-1236.8948,33.3595,13.9733,221.5421,7,7 );
- AddStaticVehicle(411,-1426.3220,-13.7968,5.7271,90.1829,116,1 );
- AddStaticVehicle(411,-1459.3002,-5.4454,5.7914,271.8837,45,32) ;
- AddStaticVehicle(424,-2906.0566,58.3788,4.3926,5.7181,119,122 );
- AddStaticVehicle(568,-2897.8433,330.0730,4.6656,170.8635,9,39) ;
- AddStaticVehicle(444,-2930.2214,711.2976,6.4082,7.0339,32,53 );
- AddStaticVehicle(579,-2885.2395,1243.7937,7.0338,261.2170,7,7 );
- AddStaticVehicle(462,-2810.1172,1325.5194,6.7011,143.9079,3,1 );
- AddStaticVehicle(446,-2747.4805,1399.5426,-0.7690,32.7627,3,3 );
- AddStaticVehicle(447,-2676.2593,1897.6268,0.9115,93.0397,75,2 );
- AddStaticVehicle(508,-2065.7258,1423.1896,7.4764,145.1099,1,1) ;
- AddStaticVehicle(461,-2092.5718,1432.6520,6.6750,193.9025,87,118) ;
- AddStaticVehicle(536,-2091.5598,1392.6028,6.8385,217.0096,30,96) ;
- AddStaticVehicle(452,-1902.7883,1400.2579,-0.2510,76.7538,1,5 );
- AddStaticVehicle(461,-1794.8903,1405.5066,6.7728,203.9249,61,1 );
- AddStaticVehicle(472,-1720.9418,1436.0170,0.3172,356.6591,56,53) ;
- AddStaticVehicle(454,-1467.0510,1503.8058,0.1585,110.2544,26,26 );
- AddStaticVehicle(473,-1570.9440,1263.8746,-0.0779,276.0413,56,15) ;
- AddStaticVehicle(506,-1554.5819,1068.4961,6.8919,359.0276,52,52) ;
- AddStaticVehicle(562,-1614.6351,1007.8853,6.8478,250.5691,17,1) ;
- AddStaticVehicle(553,-1566.2198,-255.4555,15.4835,41.4339,61,74) ;
- AddStaticVehicle(586,-1871.2375,-893.5937,31.5430,91.2748,122,1);
- AddStaticVehicle(586,-1912.6022,-918.9386,31.7413,353.5594,46,46) ;
- AddStaticVehicle(541,-1897.6475,-823.9932,31.8346,272.8453,44,96 );
- AddStaticVehicle(541,-1886.8457,-759.9957,31.6483,270.8408,60,1) ;
- AddStaticVehicle(533,-1761.6075,613.7797,26.9520,89.3371,79,1) ;
- AddStaticVehicle(429,-2019.1703,1029.0781,55.1885,272.6768,13,13) ;
- AddStaticVehicle(442,-2041.7661,1116.0492,53.1165,175.0672,11,105) ;
- AddStaticVehicle(421,-2052.5154,1112.8059,53.1715,181.2767,13,1) ;
- AddStaticVehicle(560,-2557.4421,1143.5118,55.4319,165.8663,9,39) ;
- AddStaticVehicle(402,-2541.8601,1141.0548,55.3862,170.3531,35,1) ;
- AddStaticVehicle(496,-2499.5383,1137.9291,55.4432,180.4333,53,56 );
- AddStaticVehicle(536,-2485.8357,1137.9993,55.4642,180.9101,12,1);
- AddStaticVehicle(541,-2458.5952,1138.3412,55.3516,178.5045,58,8) ;
- AddStaticVehicle(541,-2431.1118,1136.0994,55.5330,175.6763,69,1) ;
- AddStaticVehicle(541,-2377.0164,1122.4816,55.3515,340.0099,60,1) ;
- AddStaticVehicle(508,-2413.5251,1026.2301,50.7658,0.0956,1,1) ;
- AddStaticVehicle(575,-2408.1653,974.7092,44.9025,182.2524,19,96) ;
- AddStaticVehicle(575,-2406.2703,944.5644,44.9790,266.8056,72,1) ;
- AddStaticVehicle(559,-2352.3479,981.5965,50.3515,5.7404,58,8) ;
- AddStaticVehicle(437,-2366.8171,1023.6387,50.8246,181.9107,79,7) ;
- AddStaticVehicle(405,-2239.0337,893.4630,66.5312,89.8170,24,1) ;
- AddStaticVehicle(426,-2233.8440,930.8287,66.3919,180.1113,10,10 );
- AddStaticVehicle(587,-2220.6704,813.1365,49.0857,90.0399,53,1 );
- AddStaticVehicle(500,-2292.3335,812.4420,49.0650,88.5746,9,39 );
- AddStaticVehicle(466,-2273.5481,1038.3989,83.5060,179.7762,68,76 );
- AddStaticVehicle(436,-2135.5122,1036.8539,79.6184,0.2546,87,1) ;
- AddStaticVehicle(547,-2285.7629,1101.4392,79.8592,268.6749,123,1) ;
- AddStaticVehicle(480,-2238.0720,1184.7144,55.3492,91.5899,2,2) ;
- AddStaticVehicle(561,-2233.6113,1104.8516,79.8828,180.3517,101,1) ;
- AddStaticVehicle(521,-2034.3132,167.2029,28.4100,276.3217,75,13) ;
- AddStaticVehicle(549,-2033.3455,177.7978,28.7383,266.0410,57,8) ;
- AddStaticVehicle(486,-2122.9641,176.7403,35.5823,269.0041,1,1) ;
- AddStaticVehicle(486,-2128.7603,292.7856,35.0132,268.8581,1,1) ;
- AddStaticVehicle(486,-2066.6992,295.1810,35.3575,185.6239,18,20) ;
- AddStaticVehicle(482,-2126.2490,202.0597,35.4645,271.6610,102,65) ;
- AddStaticVehicle(493,-2941.2458,500.9425,1.9118,356.2562,1,9 );
- AddStaticVehicle(421,-2151.0249,835.4579,69.2326,181.8154,71,72) ;
- AddStaticVehicle(516,-1892.3840,823.9651,34.9240,1.1847,119,1) ;
- AddStaticVehicle(500,-1983.7811,896.3951,45.3164,161.2541,28,119) ;
- AddStaticVehicle(482,-1878.1260,1073.6155,45.3833,1.0803,88,1) ;
- AddStaticVehicle(518,-2027.1711,1228.7698,31.3190,268.9391,9,39 );
- AddStaticVehicle(424,-2051.5183,1160.1519,45.2263,15.6148,2,2) ;
- AddStaticVehicle(558,-2143.7021,1221.0677,46.9019,92.5564,24,1) ;
- AddStaticVehicle(496,-2354.3687,1323.6498,14.6058,77.0716,42,42) ;
- AddStaticVehicle(603,-2697.6223,783.2014,49.8749,267.5988,87,74 );
- AddStaticVehicle(603,-2637.6653,802.7455,49.7702,1.1551,34,1 );
- AddStaticVehicle(522,-2594.9675,841.6440,49.9161,84.3496,51,118) ;
- AddStaticVehicle(463,-2464.2109,919.5464,62.5336,160.6213,7,7) ;
- AddStaticVehicle(428,-1893.1501,878.8957,35.1399,0.5215,4,75) ;
- AddStaticVehicle(500,-1920.9349,900.0209,35.5579,206.1858,14,123) ;
- AddStaticVehicle(409,-1736.3384,947.9546,24.5472,65.3048,1,1 );
- AddStaticVehicle(540,-1502.9904,938.4938,7.0463,124.6396,62,62) ;
- AddStaticVehicle(550,-1788.1842,802.8976,24.7103,359.7563,42,42) ;
- AddStaticVehicle(561,-1784.4341,692.7875,34.9859,182.2400,57,8 );
- AddStaticVehicle(443,-1851.9319,116.8267,15.7521,284.3587,20,1) ;
- AddStaticVehicle(482,-1855.5973,146.2494,15.2417,277.9544,85,85 );
- AddStaticVehicle(549,-2048.1506,124.8951,28.6802,182.0321,47,76 );
- AddStaticVehicle(600,-2160.9421,515.2612,34.8894,119.1082,32,8) ;
- AddStaticVehicle(582,-2089.2358,479.1807,35.1022,78.0878,62,62 );
- AddStaticVehicle(461,-1962.3229,466.2146,34.8407,64.7884,53,53 );
- AddStaticVehicle(401,-1905.3840,710.6555,45.0761,179.5601,47,47) ;
- AddStaticVehicle(401,-2539.3262,939.0101,64.2301,90.3424,47,47) ;
- AddStaticVehicle(401,-2569.1545,981.8585,78.1545,358.0872,25,1 );
- AddStaticVehicle(541,-2692.8362,455.8668,3.9608,87.0999,13,8 );
- AddStaticVehicle(400,-2279.4724,-247.3415,42.5332,18.4825,40,1 );
- AddStaticVehicle(444,-2354.2649,-371.5601,69.0405,313.2816,32,42) ;
- AddStaticVehicle(461,-1704.8201,1339.3179,6.7801,93.7506,3,6) ;
- AddStaticVehicle(405,-1696.4670,1348.2159,7.0546,99.7830,4,1) ;
- AddStaticVehicle(461,-1648.1644,1307.4525,6.6986,130.5739,3,3) ;
- AddStaticVehicle(479,-1915.3132,1256.0265,19.2396,89.3746,95,105) ;
- AddStaticVehicle(402,-2178.9719,1227.6172,33.7613,358.4316,22,22 );
- AddStaticVehicle(482,-1987.7301,1338.3241,7.2635,176.6010,105,1 );
- AddStaticVehicle(405,-1977.9648,-1020.8948,32.0504,332.2476,36,1 );
- AddStaticVehicle(487,-1970.8481,-829.0056,39.7330,1.5030,26,3) ;
- AddStaticVehicle(421,-2148.8938,-879.1363,31.9059,269.8967,24,118 );
- AddStaticVehicle(461,-1720.9136,1007.3600,17.1706,91.6206,37,1) ;
- AddStaticVehicle(439,-1703.6799,1028.5684,17.2701,271.2751,68,1 );
- AddStaticVehicle(516,-1385.4271,-207.9932,5.6252,269.5264,60,1 );
- AddStaticVehicle(400,-1370.5370,-108.5120,5.7368,90.5826,30,96) ;
- AddStaticVehicle(410,-1427.6842,-71.5402,5.6544,92.1527,9,1) ;
- AddStaticVehicle(516,-1338.1565,-175.1089,5.7248,267.4071,2,62 );
- AddStaticVehicle(496,-2436.2021,1257.5581,30.2190,90.0063,11,11) ;
- AddStaticVehicle(579,-1643.6743,-1049.7825,102.4422,184.7762,62,62 );
- AddStaticVehicle(468,-1539.1002,-988.9670,159.2563,171.1934,46,46) ;
- AddStaticVehicle(457,-2477.0815,-310.3790,41.1381,313.3356,10,1 );
- AddStaticVehicle(560,-2486.6094,262.4621,34.8724,271.1458,17,1 );
- AddStaticVehicle(549,-2585.9888,712.8341,27.5820,89.5528,84,36 );
- AddStaticVehicle(466,-1837.0461,339.5637,16.9045,331.3646,78,76 );
- AddStaticVehicle(558,-1956.2533,297.6264,35.0939,64.6876,116,1) ;
- AddStaticVehicle(560,-1957.6255,276.9994,35.1773,132.1875,9,39 );
- AddStaticVehicle(561,-1950.4956,259.6261,35.2702,53.4263,8,17) ;
- AddStaticVehicle(562,-1952.4977,265.6259,40.7239,292.5037,35,1 );
- AddStaticVehicle(567,-1952.7600,258.7500,40.9200,258.7441,88,64 );
- //Bank
- CreateObject(13007, 4710.8979492188, -5842.5405273438, 3382.8020019531, 0, 0, 0);
- CreateObject(2946, 4703.7958984375, -5834.1953125, 3381.0129394531, 0, 0, 89.324493408203);
- CreateObject(2946, 4705.3662109375, -5834.2016601563, 3381.0129394531, 0, 0, 89.324340820313);
- CreateObject(3062, 4720.7329101563, -5846.0717773438, 3382.41015625, 0, 0, 91.309509277344);
- //
- //CITYHALL
- CreateObject(14602, 4008.908203125, -5358.7646484375, 1755.1164550781, 0, 0, 0);
- CreateObject(2190, 3993.146484375, -5359.306640625, 1750.4758300781, 0, 0, 242.1689453125);
- CreateObject(1715, 3991.5048828125, -5358.9448242188, 1749.7557373047, 0, 0, 89.324493408203);
- CreateObject(1715, 3991.0209960938, -5357.6235351563, 1749.7557373047, 0, 0, 132.994140625);
- CreateObject(1715, 3991.068359375, -5360.13671875, 1749.7492675781, 0, 0, 45.653686523438);
- CreateObject(1776, 3995.6254882813, -5373.9526367188, 1750.8486328125, 0, 0, 180.63439941406);
- CreateObject(1491, 4003.6220703125, -5365.8803710938, 1749.7999267578, 0, 0, 0);
- CreateObject(5302, 4004.1730957031, -5372.58203125, 1752.0794677734, 0, 0, 87.339508056641);
- CreateObject(2525, 4004.3830566406, -5372.08203125, 1749.7557373047, 0, 0, 178.6494140625);
- CreateObject(2523, 4005.5417480469, -5370.33203125, 1749.7557373047, 0, 0, 264.720703125);
- CreateObject(2967, 3992.8630371094, -5358.3227539063, 1750.4758300781, 0, 0, 83.369506835938);
- CreateObject(2163, 3986.216796875, -5357.4467773438, 1749.8468017578, 0, 0, 89.324340820313);
- CreateObject(2163, 3986.2001953125, -5359.2158203125, 1749.8481445313, 0, 0, 89.31884765625);
- CreateObject(2162, 3986.1801757813, -5360.9697265625, 1749.8481445313, 0, 0, 89.32080078125);
- CreateObject(2685, 3986.2006835938, -5371.5810546875, 1752.6325683594, 0, 0, 87.339508056641);
- CreateObject(1808, 3986.2006835938, -5372.3842773438, 1749.6058349609, 0, 0, 89.324493408203);
- CreateObject(1808, 4008.3984375, -5343.3940429688, 1749.6058349609, 0, 0, 5.9547119140625);
- CreateObject(1507, 3998.1889648438, -5343.0517578125, 1749.7602539063, 0, 0, 358.01501464844);
- CreateObject(2315, 4004.8039550781, -5348.001953125, 1749.7557373047, 0, 0, 0);
- CreateObject(1715, 4004.5270996094, -5349.2475585938, 1749.7492675781, 0, 0, 178.6484375);
- CreateObject(1715, 4006.3420410156, -5349.2060546875, 1749.7492675781, 0, 0, 182.61511230469);
- CreateObject(1715, 4007.3774414063, -5347.9721679688, 1749.7557373047, 0, 0, 271.93841552734);
- CreateObject(1715, 4003.6606445313, -5347.9228515625, 1749.7557373047, 0, 0, 89.314575195313);
- CreateObject(1715, 4004.8591308594, -5346.685546875, 1749.7557373047, 0, 0, 358.00366210938);
- CreateObject(1715, 4006.1540527344, -5346.6215820313, 1749.7557373047, 0, 0, 358.00048828125);
- CreateObject(1510, 4004.7404785156, -5348.001953125, 1750.2513427734, 0, 0, 0);
- CreateObject(1520, 4005.8889160156, -5348.0771484375, 1750.2513427734, 0, 0, 0);
- CreateObject(1667, 4006.3151855469, -5347.6801757813, 1750.3399658203, 0, 0, 0);
- CreateObject(1667, 4005.0300292969, -5347.646484375, 1750.3399658203, 0, 0, 0);
- CreateObject(1667, 4004.5419921875, -5348.328125, 1750.3399658203, 0, 0, 0);
- CreateObject(1667, 4006.1853027344, -5348.318359375, 1750.3399658203, 0, 0, 0);
- //
- //Organization vehicles
- SFPD[0] = CreateVehicle(597,-1588.4078,673.0458,7.3151,176.8283,0,1,800) ; //SFPD
- SFPD[1] = CreateVehicle(597,-1594.1102,673.2027,7.3152,178.9346,0,1,800); // SFPD
- SFPD[2] = CreateVehicle(597,-1599.9313,673.6658,7.3142,178.6316,0,1,800); // SFPD
- SFPD[3] = CreateVehicle(523,-1606.1407,673.7606,7.3155,179.0799,0,1,800); // HPV1000
- SFFD[0] = CreateVehicle(407,-2020.7155,75.7732,27.7179,273.7722,79,1,800); // Firetruck
- SFFD[1] = CreateVehicle(407,-2020.1428,84.7187,27.6232,272.7130,79,1,800); // Firetruck
- SFFD[2] = CreateVehicle(407,-2020.0581,93.4380,27.6339,272.2723,79,1,800); // Firetruck
- TriadCars[0] = CreateVehicle(567,-2124.6729,-242.8121,35.2262,18.3732,99,81,800); // Triads Savanna
- TriadCars[1] = CreateVehicle(410,-2162.8362,-196.4179,35.1883,181.1792,99,81,800); // Triads Manana
- TriadCars[2] = CreateVehicle(411,-2156.5271,-196.8876,35.1877,181.1676,99,81,800); // Triads Infernus
- LoadProperties();
- MP = GetMaxPlayers();
- for(new i; i<MP; i++)
- {
- if(IsPlayerConnected(i))
- {
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(i, pName, MAX_PLAYER_NAME);
- for(new propid; propid < PropertiesAmount; propid++)
- {
- if(PropInfo[propid][PropIsBought] == 1)
- {
- if(strcmp(PropInfo[propid][PropOwner], pName, true)==0)
- {
- EarningsForPlayer[i] += PropInfo[propid][PropEarning];
- PlayerProps[i]++;
- }
- }
- }
- }
- }
- #if ENABLE_MAP_ICON_STREAMER == 1
- SetTimer("MapIconStreamer", 500, 1);
- SetTimer("InfoDelete", 4500, 1);
- #endif
- SetTimer("PropertyPayout", 1800000, 1);
- //
- AddStaticVehicle(490,-1574.3214,718.2319,-5.1140,89.8176,0,0) ;
- AddStaticVehicle(472,-1076.0149,-207.4982,0.0197,201.3848,56,53) ;
- for(new Vehicles = 0; Vehicles < MAX_VEHICLES; Vehicles++)
- {
- Fuel[Vehicles] = Random(SPAWN_GAS_MIN, SPAWN_GAS_MAX); //Set vehicles fuel
- }
- SetTimer("StatsSave",3000,1);
- SetTimer("ScoreUpgrade",700000,1);
- SetTimer("Speedometer", 700, 1);
- SetTimer("Wage", 350000, 1);
- SetTimer("ExitArea", 500, 1);
- SetTimer("LocationUpdate", 500, 1);
- return 1;
- }
- public OnGameModeExit()
- {
- SaveProperties();
- }
- public OnPlayerStateChange(playerid, newstate,oldstate)
- {
- if (newstate == PLAYER_STATE_ONFOOT) {
- TextDrawHideForPlayer(playerid, Speedom[playerid]);
- }
- if (newstate == PLAYER_STATE_DRIVER) {
- new getthecar = GetPlayerVehicleID(playerid);
- if (HaveDrivingLic[playerid] == 0 && GetVehicleModel(GetPlayerVehicleID(playerid)) !=481 && GetVehicleModel(GetPlayerVehicleID(playerid)) !=510 && GetVehicleModel(GetPlayerVehicleID(playerid)) !=509 && GetPlayerVehicleID(playerid) != Drivingschoolcar[playerid]) {
- SendClientMessage(playerid, COLOR_ORED,"Error: You must complete your driving test first!");
- RemovePlayerFromVehicle(playerid);
- }
- for(new i=0; i<sizeof(SFPD); i++)
- {
- if (getthecar == SFPD[i]) {
- if (Job[playerid] != 1) {
- SendClientMessage(playerid, COLOR_WHITE,"Error: This vehicle is property of San Fierro Police Department");
- RemovePlayerFromVehicle(playerid);
- }
- }
- }
- for(new i=0; i<sizeof(SFFD); i++)
- {
- if (getthecar == SFFD[i]) {
- if (Job[playerid] != 2) {
- SendClientMessage(playerid, COLOR_WHITE,"Error: This vehicle is property of San Fierro Fire Department");
- RemovePlayerFromVehicle(playerid);
- }
- }
- }
- for(new i=0; i<sizeof(TriadCars); i++)
- {
- if (getthecar == TriadCars[i]) {
- if (Job[playerid] != 3) {
- SendClientMessage(playerid, COLOR_WHITE,"Error: This vehicle is property of The Triads");
- RemovePlayerFromVehicle(playerid);
- }
- }
- }
- }
- return 0;
- }
- stock SendClientMessageToAllEx(exception, clr, const message[])
- {
- for(new i; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(i != exception)
- {
- SendClientMessage(i, clr, message);
- }
- }
- }
- }
- stock SetPlayerDiner(playerid,dinerid)
- {
- SetPlayerPos(playerid,457.304748,-88.428497,999.554687);
- PlayerDiner[playerid] = dinerid;
- SetPlayerInterior(playerid, 4);
- SendClientMessage(playerid, COLOR_BROWN,"Diner - Welcome!");
- }
- stock SetPlayerBank(playerid,bankid)
- {
- SetPlayerPos(playerid,4704.7026,-5838.9965,3382.0129);
- PlayerBank[playerid] = bankid;
- SetPlayerInterior(playerid, 1);
- SendClientMessage(playerid, COLOR_GREEN,"San Fierro Bank - Type /bankhelp to get started using the bank");
- }
- OnePlayAnim(playerid,animlib[],animname[], Float:Speed, looping, lockx, locky, lockz, lp)
- {
- ApplyAnimation(playerid, animlib, animname, Speed, looping, lockx, locky, lockz, lp);
- }
- stock strrest(const string[], &index)
- {
- new length = strlen(string);
- while ((index < length) && (string[index] <= ' '))
- {
- index++;
- }
- new offset = index;
- new result[128];
- while ((index < length) && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = string[index];
- index++;
- }
- result[index - offset] = EOS;
- return result;
- }
- stock LoadProperties()
- {
- if(fexist("PropertyFolder/PropertyInfo.txt"))
- {
- CountProperties();
- new Argument[9][70];
- new entry[256], BoughtProps;
- new tlabe[256];
- new File: propfile = fopen("PropertyFolder/PropertyInfo.txt", io_read);
- if (propfile)
- {
- for(new id; id<PropertiesAmount; id++)
- {
- fread(propfile, entry);
- split(entry, Argument, ',');
- format(PropInfo[id][PropName], 64, "%s", Argument[0]);
- PropInfo[id][PropX] = floatstr(Argument[1]);
- PropInfo[id][PropY] = floatstr(Argument[2]);
- PropInfo[id][PropZ] = floatstr(Argument[3]);
- PropInfo[id][PropValue] = strval(Argument[4]);
- PropInfo[id][PropEarning] = strval(Argument[5]);
- format(PropInfo[id][PropOwner], MAX_PLAYER_NAME, "%s", Argument[6]);
- PropInfo[id][PropIsBought] = strval(Argument[7]);
- PropInfo[id][PropUnbuyableTime] = strval(Argument[8]);
- PropInfo[id][PickupNr] = CreatePickup(1272, 1, PropInfo[id][PropX], PropInfo[id][PropY], PropInfo[id][PropZ]);
- format(tlabe, 128, "Property: %s || Owner: %s",PropInfo[id][PropName],PropInfo[id][PropOwner]);
- Create3DTextLabel(tlabe,0xFFFFFFAA,PropInfo[id][PropX], PropInfo[id][PropY], PropInfo[id][PropZ]+1,60.0,0,1);
- if(PropInfo[id][PropIsBought] == 1)
- {
- BoughtProps++;
- }
- }
- fclose(propfile);
- printf("==Properties Info:==");
- printf("==Total properties: %d==", PropertiesAmount);
- printf("==Bought properties: %d / %d==", BoughtProps,PropertiesAmount);
- }
- }
- }
- stock SaveProperties()
- {
- new entry[256];
- new File: propfile = fopen("PropertyFolder/PropertyInfo.txt", io_write);
- for(new id; id<PropertiesAmount; id++)
- {
- format(entry, 128, "%s,%.2f,%.2f,%.2f,%d,%d,%s,%d,%d \r\n",PropInfo[id][PropName], PropInfo[id][PropX], PropInfo[id][PropY], PropInfo[id][PropZ], PropInfo[id][PropValue], PropInfo[id][PropEarning], PropInfo[id][PropOwner], PropInfo[id][PropIsBought], PropInfo[id][PropUnbuyableTime]);
- fwrite(propfile, entry);
- }
- printf("Saved %d Properties!", PropertiesAmount);
- fclose(propfile);
- }
- forward split(const strsrc[], strdest[][], delimiter);
- public split(const strsrc[], strdest[][], delimiter)
- {
- new i, li;
- new aNum;
- new len;
- while(i <= strlen(strsrc)){
- if(strsrc[i]==delimiter || i==strlen(strsrc)){
- len = strmid(strdest[aNum], strsrc, li, i, 128);
- strdest[aNum][len] = 0;
- li = i+1;
- aNum++;
- }
- i++;
- }
- return 1;
- }
- stock CountProperties()
- {
- new entry[256];
- new File: propfile = fopen("PropertyFolder/PropertyInfo.txt", io_read);
- while(fread(propfile, entry, 256))
- {
- PropertiesAmount++;
- }
- fclose(propfile);
- }
- forward IsPlayerNearProperty(playerid);
- public IsPlayerNearProperty(playerid)
- {
- new Float:Distance;
- for(new prop; prop<PropertiesAmount; prop++)
- {
- Distance = GetDistanceToProperty(playerid, prop);
- if(Distance < 1.0)
- {
- return prop;
- }
- }
- return -1;
- }
- forward Float:GetDistanceToProperty(playerid, Property);
- public Float:GetDistanceToProperty(playerid, Property)
- {
- new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
- GetPlayerPos(playerid,x1,y1,z1);
- x2 = PropInfo[Property][PropX];
- y2 = PropInfo[Property][PropY];
- z2 = PropInfo[Property][PropZ];
- return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
- }
- stock GetPlayerID(const Name[])
- {
- for(new i; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(i, pName, sizeof(pName));
- if(strcmp(Name, pName, true)==0)
- {
- return i;
- }
- }
- }
- return -1;
- }
- stock encodepass(buf[]) {
- new length=strlen(buf);
- new s1 = 1;
- new s2 = 0;
- new n;
- for (n=0; n<length; n++)
- {
- s1 = (s1 + buf[n]) % 65521;
- s2 = (s2 + s1) % 65521;
- }
- return (s2 << 16) + s1;
- }
- forward MapIconStreamer();
- public MapIconStreamer()
- {
- for(new i; i<MP; i++)
- {
- if(IsPlayerConnected(i))
- {
- new Float:SmallestDistance = 99999.9;
- new CP, Float:OldDistance;
- for(new propid; propid<PropertiesAmount; propid++)
- {
- OldDistance = GetDistanceToProperty(i, propid);
- if(OldDistance < SmallestDistance)
- {
- SmallestDistance = OldDistance;
- CP = propid;
- }
- }
- RemovePlayerMapIcon(i, 31);
- if(PropInfo[CP][PropIsBought] == 1)
- {
- SetPlayerMapIcon(i, 31, PropInfo[CP][PropX], PropInfo[CP][PropY], PropInfo[CP][PropZ], 32, 0);
- }
- else
- {
- SetPlayerMapIcon(i, 31, PropInfo[CP][PropX], PropInfo[CP][PropY], PropInfo[CP][PropZ], 31, 0);
- }
- }
- }
- }
- forward PropertyPayout();
- public PropertyPayout()
- {
- new str[64];
- for(new i; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- if(PlayerProps[i] > 0)
- {
- GivePlayerMoney(i, EarningsForPlayer[i]);
- format(str, 64, "You have earned $%d profit from your properties!", EarningsForPlayer[i]);
- SendClientMessage(i, 0xFFFF00AA, str);
- }
- }
- }
- }
- forward InfoDelete();
- public InfoDelete()
- {
- // new str[64];
- for(new i; i<MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i))
- {
- InfoShowed[i] = 0;
- }
- }
- }
- stock Wait(time)
- {
- new stamp = tickcount();
- while (tickcount() - stamp < time)
- {
- }
- return 1;
- }
- //DO NOT REMOVE THE CREDITS! IT IS ILLEGAL AS YOU KNOW (COPYRIGHT) J/a/k/k/u (C) 2010
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement