diff --git a/filterscripts/objects.pwn b/filterscripts/objects.pwn index 0432187..9c0e44f 100644 --- a/filterscripts/objects.pwn +++ b/filterscripts/objects.pwn @@ -565,6 +565,142 @@ public OnFilterScriptInit() SetDynamicObjectMaterial( CreateDynamicObject( 19464, -1911.466186, 638.112060, 141.774093, 0.000000, 0.000000, 90.000000 ), 0, 16150, "ufo_bar", "GEwhite1_64", -23296 ); SetDynamicObjectMaterial( CreateDynamicObject( 19464, -1911.466186, 634.112060, 141.774093, 0.000000, 0.000000, 90.000000 ), 0, 16150, "ufo_bar", "GEwhite1_64", -23296 ); SetDynamicObjectMaterial( CreateDynamicObject( 19464, -1911.466186, 630.112060, 141.774093, 0.000000, 0.000000, 90.000000 ), 0, 16150, "ufo_bar", "GEwhite1_64", -23296 ); + + // Brad Droxies LV + CreateDynamicObject( 1569, 2171.084716, 1106.430419, 11.610590, 0.000000, 0.000000, 63.300022 ); + CreateDynamicObject( 3525, 2170.707275, 1106.104492, 13.180599, 0.000000, 0.000000, -117.999977 ); + CreateDynamicObject( 3525, 2171.829833, 1108.281860, 13.180599, 0.000000, 0.000000, -117.999977 ); + CreateDynamicObject( 19861, 2150.657470, 1121.038085, 14.118433, 0.000000, 0.000000, -27.199998 ); + CreateDynamicObject( 19861, 2159.436035, 1138.125610, 14.118433, 0.000000, 0.000000, -27.199998 ); + + // Hono House + CreateDynamicObject( 16151, -1844.525146, -95.935111, 5.080673, 0.000000, -2.099997, 91.600006 ); + CreateDynamicObject( 14651, -1842.281616, -102.566673, 6.806251, 0.000000, 0.000000, 180.000000 ); + CreateDynamicObject( 1557, -1851.246459, -100.321586, 4.646242, 0.000000, 0.000000, 90.000000 ); + CreateDynamicObject( 1010, -1819.603027, -100.945579, 5.876251, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 1728, -1847.915039, -102.789962, 4.586245, 0.000000, 0.000000, -90.699966 ); + CreateDynamicObject( 1729, -1849.280639, -101.528144, 4.616240, 0.000000, 0.000000, -31.899999 ); + CreateDynamicObject( 2311, -1849.779174, -104.608230, 4.588049, 0.000000, 0.000000, 90.000000 ); + CreateDynamicObject( 2859, -1849.788330, -103.530876, 5.086238, 0.000000, 0.000000, -68.199966 ); + CreateDynamicObject( 3525, -1851.036743, -96.840385, 6.076253, 0.000000, 0.000000, 90.000000 ); + CreateDynamicObject( 19172, -1839.375244, -103.284538, 6.716253, 0.000000, 0.000000, -90.000000 ); + CreateDynamicObject( 19786, -1851.284301, -103.483947, 6.353543, 0.000000, 0.000000, 90.000000 ); + CreateDynamicObject( 1242, -1838.218994, -95.818328, 5.796251, 0.000000, 0.000000, -143.799972 ); + CreateDynamicObject( 1212, -1849.561279, -104.487716, 5.108304, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 1828, -1849.634399, -103.493682, 4.626242, 0.000000, 0.000000, 100.899971 ); + CreateDynamicObject( 19812, -1850.719116, -95.506767, 5.086241, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 1550, -1851.010864, -105.600028, 5.139303, 5.000011, 0.000000, -66.000030 ); + CreateDynamicObject( 1212, -1849.861206, -104.387718, 5.108304, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 1212, -1849.761230, -104.687713, 5.108304, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 19899, -1819.855834, -100.718238, 4.646245, 0.000000, 0.000000, 180.000000 ); + CreateDynamicObject( 19900, -1820.088623, -105.331848, 4.676240, 0.000000, 0.000000, 2.600008 ); + CreateDynamicObject( 19903, -1825.135375, -95.995094, 4.646244, 0.000000, 0.000000, -57.099998 ); + CreateDynamicObject( 19898, -1823.395385, -100.246383, 4.656245, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 19917, -1820.009521, -102.754264, 4.636248, 0.000000, 0.000000, -14.600000 ); + CreateDynamicObject( 19815, -1822.021118, -95.067527, 6.286249, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 19805, -1819.420654, -97.496971, 6.496253, 0.000000, 0.000000, -90.000000 ); + CreateDynamicObject( 19996, -1819.914306, -98.839027, 4.646241, 0.000000, 0.000000, -131.099960 ); + CreateDynamicObject( 19921, -1820.060302, -95.790336, 5.706250, 0.000000, 0.000000, -37.000019 ); + CreateDynamicObject( 19789, -1819.851684, -95.571319, 4.616242, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 19772, -1828.453369, -105.143341, 5.246243, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 19621, -1819.975708, -98.640075, 5.236248, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 19978, -1829.460083, -106.297401, 4.458158, 0.899999, 0.000000, 0.000000 ); + CreateDynamicObject( 12, -1833.814697, -90.953071, 5.656250, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 19812, -1849.958374, -95.506767, 5.106242, 0.000000, 0.000000, 17.600002 ); + CreateDynamicObject( 3087, -1829.336181, -102.530296, 5.656250, 0.000000, 0.000000, 90.999992 ); + CreateDynamicObject( 19812, -1850.346313, -95.441032, 6.076247, 0.000000, 0.000000, 17.600002 ); + CreateDynamicObject( 1985, -1813.196899, -97.427726, 7.866235, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 2035, -1835.800415, -96.042945, 5.656250, 0.000000, 0.000000, 64.100013 ); + SetDynamicObjectMaterial( CreateDynamicObject( 19362, -1829.289916, -96.998573, 7.374170, 6.100000, 0.099996, 0.000000 ), 0, 5631, "apartmentalpha", "aptsign01_LA", -1 ); + CreateDynamicObject( 2509, -1833.628417, -95.084915, 6.548245, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 2509, -1832.930908, -95.086914, 6.546247, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 2509, -1831.680908, -95.086914, 6.546247, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 1997, -1830.349487, -96.321884, 4.636240, 0.000000, 0.000000, -37.299980 ); + CreateDynamicObject( 2907, -1830.434570, -96.479957, 5.648437, 0.000000, 0.000000, 144.700057 ); + CreateDynamicObject( 2908, -1830.163085, -96.050376, 5.714435, -34.399997, 94.999992, 144.600006 ); + CreateDynamicObject( 2906, -1830.619140, -96.300712, 5.586247, 0.000000, 0.000000, 115.800102 ); + CreateDynamicObject( 2905, -1830.800170, -97.155586, 5.676188, 0.000000, 76.599998, 147.100051 ); + CreateDynamicObject( 2905, -1831.194824, -96.920303, 5.640107, 0.000000, 76.599998, 110.200103 ); + CreateDynamicObject( 2906, -1829.790405, -96.479736, 4.947120, -111.700042, -112.500061, 33.900115 ); + CreateDynamicObject( 18644, -1831.390991, -95.107307, 6.646252, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 18635, -1831.821533, -95.147727, 6.356253, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 18634, -1830.814086, -96.682708, 5.752888, 62.800083, -10.700025, -54.900001 ); + CreateDynamicObject( 19418, -1830.869995, -96.371276, 5.654789, 0.000000, 26.300016, -42.699989 ); + CreateDynamicObject( 19631, -1832.646606, -95.125473, 6.445608, -95.199974, 0.000000, -86.899971 ); + CreateDynamicObject( 19626, -1833.338989, -95.111183, 6.686251, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 19623, -1832.532836, -98.683593, 7.051072, 15.799987, 0.000000, 149.100006 ); + CreateDynamicObject( 11715, -1833.835815, -95.112640, 6.436936, 85.899986, 0.000000, 0.000000 ); + CreateDynamicObject( 11745, -1831.635253, -96.320045, 4.756240, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 19836, -1830.528076, -96.900520, 5.516248, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 19836, -1831.018310, -97.450523, 4.656250, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 19836, -1830.137939, -97.170516, 4.656250, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 19836, -1830.908081, -96.020523, 4.656250, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 19087, -1832.571777, -98.673194, 9.486261, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 19556, -1832.232421, -95.152000, 6.486252, 0.000000, 0.000000, 82.500015 ); + CreateDynamicObject( 2590, -1837.685302, -101.599967, 9.446266, 0.000000, 0.000000, -126.599990 ); + CreateDynamicObject( 2590, -1837.636962, -100.377769, 9.446266, 0.000000, 0.000000, -126.599990 ); + CreateDynamicObject( 2590, -1837.671752, -99.317985, 9.446266, 0.000000, 0.000000, -126.599990 ); + CreateDynamicObject( 2908, -1837.444946, -101.573440, 7.199101, 87.600021, 108.999946, 75.100112 ); + CreateDynamicObject( 2907, -1837.484252, -100.323577, 6.921369, -91.200004, 0.000000, -85.599998 ); + CreateDynamicObject( 2907, -1837.562988, -99.296592, 6.921369, -91.200004, 0.000000, -85.599998 ); + CreateDynamicObject( 321, -1833.758789, -95.133300, 6.696255, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 19583, -1830.776733, -96.937095, 5.868681, 135.400009, -95.499992, -28.799991 ); + CreateDynamicObject( 19872, -1827.236450, -98.670600, 2.956246, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 19087, -1813.193969, -97.457351, 10.296276, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 2045, -1836.671142, -95.994087, 5.656250, 0.000000, 0.000000, -21.399978 ); + SetDynamicObjectMaterial( CreateDynamicObject( 18633, -1829.411132, -101.432380, 7.116251, 6.199998, 270.000000, 0.000000 ), 0, 16150, "ufo_bar", "GEwhite1_64", -65536 ); + SetDynamicObjectMaterial( CreateDynamicObject( 18633, -1829.411132, -103.272384, 6.866250, 7.599997, 270.000000, 0.000000 ), 0, 16150, "ufo_bar", "GEwhite1_64", -65536 ); + SetDynamicObjectMaterial( CreateDynamicObject( 18633, -1829.411132, -103.365943, 7.165550, -12.399994, 270.000000, 0.000000 ), 0, 16150, "ufo_bar", "GEwhite1_64", -65536 ); + CreateDynamicObject( 1452, -1838.271118, -105.149658, 5.656250, 0.000000, 0.000000, 90.000000 ); + CreateDynamicObject( 3092, -1837.988403, -105.029190, 5.656250, 0.000000, 0.000000, -87.799957 ); + CreateDynamicObject( 3524, -1830.137939, -105.078376, 5.836253, 0.000000, 0.000000, -128.099884 ); + CreateDynamicObject( 1557, -1851.248413, -97.291542, 4.646242, 0.000000, 0.000000, -90.000000 ); + CreateDynamicObject( 1442, -1811.746337, -102.104736, 5.138433, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 1442, -1817.326782, -96.764732, 5.138433, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 1349, -1810.953857, -104.921806, 5.215517, 0.000000, 0.000000, 16.200000 ); + CreateDynamicObject( 1369, -1810.685668, -101.501777, 5.256245, 0.000000, 0.000000, -61.000000 ); + CreateDynamicObject( 1450, -1810.229614, -103.534744, 5.246243, 0.000000, 0.000000, -90.000000 ); + CreateDynamicObject( 1441, -1811.562744, -95.513999, 5.306244, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 1327, -1818.293579, -104.812889, 5.511715, 0.000000, -5.199997, 10.099988 ); + CreateDynamicObject( 1462, -1810.218872, -96.007980, 4.656242, 0.000000, 0.000000, -90.000000 ); + CreateDynamicObject( 2673, -1812.212646, -101.508201, 4.786246, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 2675, -1811.956787, -103.402236, 4.726243, 0.000000, 0.000000, -26.199996 ); + CreateDynamicObject( 933, -1810.850952, -99.798484, 4.556241, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 1429, -1810.293701, -99.402175, 5.776247, 0.000000, 0.000000, -55.699985 ); + CreateDynamicObject( 849, -1811.002563, -99.834037, 4.936244, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 1812, -1812.310546, -97.670471, 4.666246, 0.000000, 0.000000, -109.999931 ); + CreateDynamicObject( 1572, -1814.204956, -96.083251, 5.206250, 0.000000, 0.000000, 128.900024 ); + CreateDynamicObject( 1448, -1814.241088, -96.213684, 5.056245, 0.000000, 0.000000, 38.300003 ); + CreateDynamicObject( 1369, -1816.225708, -95.829902, 5.266242, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 1349, -1818.070556, -95.897438, 5.226243, 0.000000, 0.000000, -131.400009 ); + CreateDynamicObject( 1449, -1818.883056, -102.786972, 5.166245, 0.000000, 0.000000, 90.000000 ); + CreateDynamicObject( 1449, -1818.883056, -98.596969, 5.166245, 0.000000, 0.000000, 90.000000 ); + CreateDynamicObject( 1265, -1818.463500, -100.147232, 5.124674, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 1265, -1818.511840, -101.073257, 5.124674, 0.000000, 0.000000, 57.599990 ); + CreateDynamicObject( 2676, -1816.992797, -97.103805, 4.796247, 0.000000, 0.000000, -126.900001 ); + CreateDynamicObject( 2671, -1812.882812, -96.959899, 4.666237, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 19632, -1811.755737, -102.092208, 4.976244, 0.000000, 0.000000, 0.000000 ); + CreateDynamicObject( 19632, -1817.361450, -96.750335, 4.926243, 0.000000, 0.000000, -98.799980 ); + CreateDynamicObject( 14467, -1848.247314, -107.041481, 6.745827, 1.299999, 2.600001, 26.600013 ); + CreateDynamicObject( 3525, -1851.036743, -100.760368, 6.076253, 0.000000, 0.000000, 90.000000 ); + CreateDynamicObject( 3383, -1836.925048, -95.986099, 4.606236, 0.000000, 0.000000, 180.000000 ); + CreateDynamicObject( 1242, -1837.869018, -96.168327, 5.796251, 0.000000, 0.000000, -143.799972 ); + CreateDynamicObject( 1242, -1838.218994, -96.168327, 5.796251, 0.000000, 0.000000, -143.799972 ); + CreateDynamicObject( 1242, -1837.869018, -95.818328, 5.796251, 0.000000, 0.000000, -143.799972 ); + CreateDynamicObject( 2057, -1837.241088, -95.963127, 5.836251, 0.000000, 0.000000, 57.799995 ); + CreateDynamicObject( 2035, -1835.339843, -96.033134, 5.656250, 0.000000, 0.000000, 64.100013 ); + CreateDynamicObject( 3092, -1830.510986, -104.870292, 6.576251, 0.000000, 0.000000, 52.799999 ); + CreateDynamicObject( 19967, -1851.237426, -98.810737, 5.156421, 0.499999, 0.000000, 90.000000 ); + CreateDynamicObject( 1895, -1841.954467, -95.161605, 6.956254, 0.000000, 0.000000, 0.000000 ); + + // VIP Lounge Arntz Door Addition + CreateDynamicObject( 1566, -1886.679565, 748.005859, 45.936889, 0.000000, 0.000000, 90.000000 ); + CreateDynamicObject( 1566, -1886.679565, 751.175598, 45.936889, 0.000000, 0.000000, -90.000000 ); + CreateDynamicObject( 3525, -1886.837280, 747.516906, 45.995292, 0.000000, 0.000000, -90.000000 ); + CreateDynamicObject( 3525, -1886.837280, 751.716308, 45.995292, 0.000000, 0.000000, -90.000000 ); + SetDynamicObjectMaterial( CreateDynamicObject( 3524, -1886.196289, 749.614501, 45.882247, 18.500007, 0.000000, -90.000000 ), 1, 0, "none", "none", 0 ); + CreateDynamicObject( 1566, -1886.679565, 761.177734, 45.936889, 0.000000, 0.000000, 90.000000 ); + CreateDynamicObject( 1566, -1886.669555, 762.738281, 45.936889, 0.000000, 0.000000, -90.000000 ); return 1; } diff --git a/gamemodes/sf-cnr.pwn b/gamemodes/sf-cnr.pwn index 90f7e7f..10a47b2 100644 --- a/gamemodes/sf-cnr.pwn +++ b/gamemodes/sf-cnr.pwn @@ -13,7 +13,7 @@ */ #pragma dynamic 7200000 -// #define DEBUG_MODE +#define DEBUG_MODE /* ** SA-MP Includes ** */ #include < a_samp > @@ -506,7 +506,7 @@ stock const { "{8ADE47}Stephanie:"COL_WHITE" You can change your spawning city at the "COL_GREY"City Hall{FFFFFF}!" }, { "{8ADE47}Stephanie:"COL_WHITE" You can buy fancy toys at a "COL_GREY"Pawnshop{FFFFFF}!" }, { "{8ADE47}Stephanie:"COL_WHITE" Never share your password, not even with the server owner!" }, - { "{8ADE47}Stephanie:"COL_WHITE" You can access our Teamspeak 3 server with "COL_GREY"svr.irresistiblegaming.com"COL_WHITE"!" }, + { "{8ADE47}Stephanie:"COL_WHITE" You can access our Discord server at {7289da}discord.gg/Q7BkUd" }, { "{8ADE47}Stephanie:"COL_WHITE" Locate ChuffSec's security truck with "COL_GREY"/chuffloc{FFFFFF} and rob his security truck for cash!" }, { "{8ADE47}Stephanie:"COL_WHITE" Buy a "COL_GREY"Money Case{FFFFFF} to double up your robbery loot from Supa Save or a 24/7 store! " }, { "{8ADE47}Stephanie:"COL_WHITE" Grab a truck, connect it to a trailer then begin to "COL_GREY"/work{FFFFFF}! It's rewarding!" }, @@ -2666,7 +2666,7 @@ new { -2450.2261, 752.2170, 35.1719, 0xFFFF, "{FFFFFF}Buy materials that can help you complete missions such as meth production, or buy other neccessary items!" }, // Supa { -1589.4668, 115.8173, 3.54950, 0xFFFF, "{FFFFFF}Dirty Mechanics can export vehicles and receive money based on the material that can be taken from a vehicle!" }, // Car Jacker { -2767.3765, 1257.077, 11.7703, 0xFFFF, "{FFFFFF}You can mine ores and store your ores in dunes for exportation! Use the /ore command to see its usage!" }, // Mining - { 1954.71890, 1038.251, 992.859, 0xFFFF, "{FFFFFF}Test your luck on the slot machines, maybe you might win the mega jackpot!" }, // Slots + { 1954.71890, 1038.251, 992.859, 0xFFFF, "{FFFFFF}Test out your luck on the slot machines, maybe you might win the mega jackpot!" }, // Slots { 1955.69070, 1005.167, 992.468, 0xFFFF, "{FFFFFF}Roulette can payout up to $3.5M! Single bets return 35x your money whereas outside bets can return 2x to 3x!" } // Roulette } ; @@ -4154,7 +4154,7 @@ public OnGameModeInit() CreateNavigation( "Bank", 2442.1279, 2376.0293, 11.5376, CITY_LV ); // 6 CreateNavigation( "Autobahn", 1948.6851, 2068.7463, 11.0610, CITY_LV ); // 7 CreateNavigation( "Police Department", 2288.0063, 2429.8960, 10.8203, CITY_LV ); // 8 - CreateNavigation( "Four Dragons Casino", 2025.3047, 1008.4356, 10.3846, CITY_LV ); // 8 + CreateNavigation( "4 Dragons Casino", 2025.3047, 1008.4356, 10.3846, CITY_LV ); // 8 CreateNavigation( "Caligula's Casino", 2191.3186, 1677.9497, 11.9736, CITY_LV ); // 10 CreateNavigation( "Shipyard", 1633.7454, 2330.6860, 10.8203, CITY_LV ); // 11 CreateNavigation( "Stadium", 1099.3146, 1608.5789, 12.5469, CITY_LV ); // 12 @@ -4250,10 +4250,10 @@ public OnGameModeInit() CreateATM( 2431.131347, -1219.477539, 25.022165, 0.000000, 0.0 ); // 15 // Casinos - CreateATM( 1985.135253, 1003.277404, 994.097290, 180.000 ); // 4 Drags - CreateATM( 1986.635253, 1032.391113, 994.097290, 0.00000 ); // 4 Drags - CreateATM( 2230.132324, 1647.986816, 1007.97900, 90.0000 ); // Caligs - CreateATM( 2241.676269, 1649.486816, 1007.97900, -90.000 ); // Caligs + CreateATM( 1985.135253, 1003.277404, 994.097290, 0.000 ); // 4 Drags + CreateATM( 1986.635253, 1032.391113, 994.097290, 180.0 ); // 4 Drags + CreateATM( 2230.132324, 1647.986816, 1007.97900, -90.0 ); // Caligs + CreateATM( 2241.676269, 1649.486816, 1007.97900, 90.00 ); // Caligs /* ** Lumberjack ** */ CreateLumberjackTree( -2358.10000000, -84.60000000, 34.10000000 ); @@ -5828,13 +5828,13 @@ public ZoneTimer( ) } // Increment Variables Whilst Not AFK - if ( !IsPlayerAFK( playerid ) && ! IsPlayerOnRoulette( playerid ) && ! IsPlayerOnSlotMachine( playerid ) ) // New addition + if ( !IsPlayerAFK( playerid ) ) // New addition { // Increase Time Online p_Uptime[ playerid ]++; // Increase Irresistible Coins (1/20 = cred/min) - if ( GetPlayerKeys( playerid, iKeys, iUpDownKeys, iLeftRightKeys ) ) + if ( GetPlayerKeys( playerid, iKeys, iUpDownKeys, iLeftRightKeys ) && ! IsPlayerOnRoulette( playerid ) && ! IsPlayerOnSlotMachine( playerid ) && GetPlayerVehicleSeat( playerid ) <= 0 ) { if ( iKeys != 0 || iUpDownKeys != 0 || iLeftRightKeys != 0 ) { // GetPlayerScore( playerid ) > 10 && @@ -8556,6 +8556,436 @@ public OnPlayerCommandReceived(playerid, cmdtext[]) return 1; } +/* RACE SYSTEM*/ +#define MAX_RACES 20 + +#define DIALOG_RACE 30002 +#define DIALOG_RACE_MODE 30003 +#define DIALOG_RACE_FEE 30004 +#define DIALOG_RACE_POS 30005 +#define RACE_STREET_RACE 0 +#define RACE_OUTRUN 1 + +enum E_RACE_DATA +{ + E_LOBBY_HOST, + E_MODE, + E_ENTRY_FEE, + E_POOL, + E_RACE_FINISH_SET, + Float: E_FINISH_POS[ 3 ], + Float: E_POSITION_PRIZE[ 3 ], + E_LAST_ACTIVE, + E_FINISH_MAP_ICON, + E_START_CHECKPOINT, + E_FINISH_CHECKPOINT, + E_CD_TIMER, + E_FINISHED_COUNT +}; + +new + g_raceData[ MAX_RACES ] [ E_RACE_DATA ], + Iterator:races, + p_raceLobbyId[ MAX_PLAYERS ], + p_raceInvited[ MAX_PLAYERS ] [ MAX_RACES ] +; + +CMD:race( playerid, params[ ] ) +{ + if ( ! IsPlayerInAnyVehicle( playerid ) ) + return SendError( playerid, "You must be in a vehicle to use this command" ); + + if ( !strcmp( params, "create", false, 6 ) ) + { + new + prizePool; + + if ( sscanf( params[ 7 ], "d", prizePool ) ) + return SendUsage( playerid, "/race create [INITIAL PRIZE]" ); + + if ( prizePool > GetPlayerCash( playerid ) ) + return SendError( playerid, "You don't have this amount of money." ); + + if ( prizePool < 1 ) + return SendError( playerid, "Invalid amount of money." ); + + new + id = Iter_Free(races); + + // TODO: remove inactive races + + if ( id != -1 ) + { + // default race lobby data + g_raceData[ id ] [ E_LOBBY_HOST ] = playerid; + g_raceData[ id ] [ E_MODE ] = RACE_STREET_RACE; + g_raceData[ id ] [ E_ENTRY_FEE ] = 1000; + g_raceData[ id ] [ E_POOL ] = prizePool; + g_raceData[ id ] [ E_RACE_FINISH_SET ] = 0; + g_raceData[ id ] [ E_POSITION_PRIZE ] [ 0 ] = 1.0, g_raceData[ id ] [ E_POSITION_PRIZE ] [ 1 ] = 0.0, g_raceData[ id ] [ E_POSITION_PRIZE ] [ 2 ] = 0.0; + g_raceData[ id ] [ E_FINISH_POS ] [ 0 ] = 1.0, g_raceData[ id ] [ E_FINISH_POS ] [ 1 ] = 0.0, g_raceData[ id ] [ E_FINISH_POS ] [ 2 ] = 0.0; + + // reset user cash + p_raceLobbyId[ playerid ] = id; + GivePlayerCash( playerid, -prizePool ); + + // config + ShowRaceConfiguration( playerid, id ); + + // iter + Iter_Add( races, id ); + } + else return SendError( playerid, "Unable to create a race as there are too many currently on-going." ); + } + else if ( !strcmp( params, "invite", false, 6 ) ) + { + new + inviteid; + + if ( sscanf( params[ 7 ], #sscanf_u, inviteid ) ) + return SendUsage( playerid, "/race invite [PLAYER]" ); + + if ( ! IsPlayerConnected( inviteid ) ) + return SendServerMessage( playerid, "This player is not connected" ); + + if ( GetDistanceBetweenPlayers( inviteid, playerid ) > 50.0 ) + return SendError( playerid, "This player must be within 50 meters to you." ); + + if ( p_raceLobbyId[ inviteid ] != -1 ) + return SendError( playerid, "This player is currently already in a race lobby." ); + + new + raceid = p_raceLobbyId[ playerid ]; + + p_raceInvited[ inviteid ] [ raceid ] = true; + + SendClientMessageFormatted( playerid, COLOR_GREY, "[RACE]{FFFFFF} %s(%d) has invited you to their race, to join type \"/race join %d\"", ReturnPlayerName( playerid ), playerid, raceid ); + SendClientMessageFormatted( playerid, COLOR_GREY, "[RACE]{FFFFFF} You have invited %s(%d) to join your race.", ReturnPlayerName( inviteid ), inviteid ); + return 1; + } + else if ( !strcmp( params, "join", false, 4 ) ) + { + new + raceid; + + if ( sscanf( params, "d", raceid ) ) return SendUsage( playerid, "/race join [RACE_ID]" ); + else if ( ! Iter_Contains( races, raceid ) ) return SendError( playerid, "This race lobby does not exist." ); + else if ( ! p_raceInvited[ playerid ] [ raceid ] ) return SendError( playerid, "You have not been invited to this race lobby." ); + else if( GetDistanceBetweenPlayers( playerid, g_raceData[ raceid ] [ E_LOBBY_HOST ] ) > 50.0 ) return SendError( playerid, "This player must be within 50 meters to you." ); + else + { + // enter race lobby + p_raceLobbyId[ playerid ] = raceid; + p_raceInvited[ playerid ] [ raceid ] = false; + + // alert race players + foreach (new i : Player) if ( p_raceLobbyId[ i ] == raceid ) { + SendClientMessageFormatted( playerid, COLOR_GREY, "[RACE]{FFFFFF} %s(%d) has joined the race.", ReturnPlayerName( i ), i ); + } + } + return 1; + } + else if ( strmatch( params, "config" ) ) + { + new + raceid = p_raceLobbyId[ playerid ]; + + if ( ! Iter_Contains( races, raceid ) ) + return SendError( playerid, "You are not in any race." ); + + if ( g_raceData[ raceid ] [ E_LOBBY_HOST ] != playerid ) + return SendError( playerid, "Only the host of the race lobby can configure the race." ); + + return ShowRaceConfiguration( playerid, raceid ); + } + else if ( strmatch( params, "start" ) ) + { + new + raceid = p_raceLobbyId[ playerid ], + vehicleid = GetPlayerVehicleID( playerid ), + Float: X, Float: Y, Float: Z, Float: A + ; + + if ( IsRaceHost( playerid, raceid ) ) + return SendServerMessage( playerid, "You must be a race lobby host in order to use this command." ); + + // if ( E_RACE_FINISH_SET ) + + GetVehiclePos( vehicleid, X, Y, Z ); + GetVehicleZAngle( vehicleid, A ); + + // destroy checkpoint/icon again + DestroyDynamicRaceCP( g_raceData[ raceid ] [ E_START_CHECKPOINT ] ); + + // place checkpoint + g_raceData[ raceid ] [ E_START_CHECKPOINT ] = CreateDynamicRaceCP( 0, X, Y, Z, X + 20.0 * floatsin( -A, degrees ), Y + 20.0 * floatsin( -A, degrees ), Z, 5.0, -1, -1, 0 ); + + // reset players in map icon/cp + Streamer_RemoveArrayData( STREAMER_TYPE_RACE_CP, g_raceData[ raceid ] [ E_START_CHECKPOINT ], E_STREAMER_PLAYER_ID, 0 ); + + // stream to players + foreach (new i : Player) if ( p_raceLobbyId[ i ] == raceid ) { + Streamer_AppendArrayData( STREAMER_TYPE_RACE_CP, g_raceData[ raceid ] [ E_START_CHECKPOINT ], E_STREAMER_PLAYER_ID, i ); + } + + // restart timer + KillTimer( g_raceData[ raceid ] [ E_CD_TIMER ] ); + g_raceData[ raceid ] [ E_CD_TIMER ] = SetTimerEx( "OnRaceCountdown", 960, false, "dd", raceid, 15 ); + } + else if ( strmatch( params, "stop" ) ) + { + + } + return SendUsage( playerid, "/race [CREATE/INVITE/JOIN/CONFIG/START]" ); +} + + +stock SendClientMessageToRace( raceid, colour, format[ ], va_args<> ) +{ + va_format( szNormalString, sizeof( szNormalString ), format, va_start<3> ); + + foreach(new i : Player) + { + if ( p_raceLobbyId[ i ] == raceid ) + SendClientMessage( i, colour, szNormalString ); + } + return 1; +} + +function OnRaceCountdown( raceid, time ) +{ + if ( raceid == -1 || ! Iter_Contains( races, raceid ) ) + return; + + foreach (new playerid : Player) if ( p_raceLobbyId[ playerid ] == raceid ) { + if ( ! IsPlayerInDynamicRaceCP( playerid, g_raceData[ raceid ] [ E_START_CHECKPOINT ] ) ) { + SendClientMessageToRace( raceid, -1, ""COL_GREY"[RACE]"COL_WHITE" The race cannot be started as %s(%d) is not in the starting checkpoint.", ReturnPlayerName( playerid ), playerid ); + g_raceData[ raceid ] [ E_CD_TIMER ] = SetTimerEx( "OnRaceCountdown", 960, false, "dd", raceid, time - 1 ); + return; + } + } + + if ( ! time ) + { + foreach (new playerid : Player) if ( p_raceLobbyId[ playerid ] == raceid ) + { + GameTextForPlayer( playerid, "~g~GO!", 2000, 3 ); + PlayerPlaySound( playerid, 1057, 0.0, 0.0, 0.0 ); + } + g_raceData[ raceid ] [ E_CD_TIMER ] = -1; + } + else + { + foreach (new playerid : Player) if ( p_raceLobbyId[ playerid ] == raceid ) + { + GameTextForPlayer( playerid, sprintf( "~y~%d", time ), 2000, 3 ); + PlayerPlaySound( playerid, 1056, 0.0, 0.0, 0.0 ); + } + g_raceData[ raceid ] [ E_CD_TIMER ] = SetTimerEx( "OnRaceCountdown", 960, false, "dd", raceid, time - 1 ); + } +} + + +stock ShowRaceConfiguration( playerid, raceid ) +{ + format( szLargeString, sizeof( szLargeString ), ""COL_WHITE"The current prize pool is %s\t \n"COL_GREY"Race Mode\t%s\n"COL_GREY"Entry Fee\t%s\n"COL_GREY"Finish Destination\t%s\n"COL_GREY"Prize Distribution\t%0.0f-%0.0f-%0.0f", + + ConvertPrice( g_raceData[ raceid ] [ E_POOL ] ), g_raceData[ raceid ] [ E_MODE ] == RACE_STREET_RACE ? ( "Streetrace" ) : ( "Outrun" ), ConvertPrice( g_raceData[ raceid ] [ E_ENTRY_FEE ] ), + + g_raceData[ raceid ] [ E_MODE ] == RACE_STREET_RACE ? ( g_raceData[ raceid ] [ E_RACE_FINISH_SET ] == 1 ? ( ""COL_GREEN"ACTIVE" ) : ( ""COL_ORANGE"NOT SET" ) ) : ( ""COL_RED"DISABLED" ), + + 100.0 * g_raceData[ raceid ] [ E_POSITION_PRIZE ] [ 0 ], 100.0 * g_raceData[ raceid ] [ E_POSITION_PRIZE ] [ 1 ], 100.0 * g_raceData[ raceid ] [ E_POSITION_PRIZE ] [ 2 ] + ); + + SetPVarInt( playerid, "editing_race", raceid ); + ShowPlayerDialog( playerid, DIALOG_RACE, DIALOG_STYLE_TABLIST_HEADERS, ""COL_GOLD"Race Configuration", szLargeString, "Select", "Close" ); + return 1; +} + +#define positionToString(%0) (%0==1?("st"):(%0==2?("nd"):(%0==3?("rd"):("th")))) + +// public +raceOnPlayerEnterDynamicRaceCP( playerid, checkpointid ) +{ + new + raceid = p_raceLobbyId[ playerid ]; + + if( g_raceData[ raceid ] [ E_FINISH_CHECKPOINT ] == checkpointid ) + { + new + position = g_raceData[ raceid ] [ E_FINISHED_COUNT ] ++; + + // give prize and alert + if ( 1 <= position <= 3 ) + { + new + prizeMoney = floatround( float( g_raceData[ raceid ] [ E_POOL ] ) * g_raceData[ raceid ] [ E_POSITION_PRIZE ] [ ( g_raceData[ raceid ] [ E_FINISHED_COUNT ] - 1 ) ] ); + + GivePlayerCash( playerid, prizeMoney ); + SendClientMessageToRace( raceid, -1, ""COL_WHITE"[RACE]"COL_WHITE" %s(%d) has finished the race in %d%s position (prize %s).", position, positionToString( position ) ); + } + + // close race after members finished + new + members = GetRaceMemberCount( raceid ); + + if ( position >= 3 || position >= members ) { + // TODO: close race + print ("Shut race"); + } + } +} + +stock GetRaceMemberCount( raceid ) { + new + count = 0; + + foreach (new playerid : Player) if ( p_raceLobbyId[ playerid ] == raceid ) { + count ++; + } + return count; +} + +rOnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) +{ + if ( ( dialogid == DIALOG_RACE ) && response ) + { + new + raceid = GetPVarInt( playerid, "editing_race" ); + + switch ( listitem ) + { + case 0: ShowPlayerDialog( playerid, DIALOG_RACE_MODE, DIALOG_STYLE_TABLIST, ""COL_GOLD"Race Configuration - Race Mode", ""COL_GREY"Street Race\t"COL_WHITE"Racers must meet the final destination\n"COL_GREY"Outrun"COL_WHITE"\tRacer must outrun everyone by 100 metres", "Select", "Close" ); + case 1: ShowPlayerDialog( playerid, DIALOG_RACE_FEE, DIALOG_STYLE_INPUT, ""COL_GOLD"Race Configuration - Entry Fee", "Specify the required entry fee for this race (minimum $1,000 - max $10,000,000)", "Select", "Close" ); + case 2: + { + if ( g_raceData[ raceid ] [ E_MODE ] == RACE_OUTRUN ) { + ShowRaceConfiguration( playerid, raceid ); + return SendError( playerid, "The race does not require a final destination as the race mode is Outrun." ); + } + + g_raceData[ raceid ] [ E_RACE_FINISH_SET ] = 2; + g_raceData[ raceid ] [ E_FINISH_POS ] [ 0 ] = 0.0; + g_raceData[ raceid ] [ E_FINISH_POS ] [ 1 ] = 0.0; + g_raceData[ raceid ] [ E_FINISH_POS ] [ 2 ] = 0.0; + return SendServerMessage( playerid, "You are now setting the race destination. Use the MINIMAP to pick the finish position." ); + } + case 3 .. 5: ShowPlayerDialog( playerid, DIALOG_RACE_POS, DIALOG_STYLE_TABLIST_HEADERS, ""COL_GOLD"Race Configuration - Prize Distribution", ""COL_WHITE"1st Position\t"COL_WHITE"2nd Position\t"COL_WHITE"3rd Position\n100%\t0%\t0%\n90%\t5%\t5%\n80%\t10%\t10%\n70%\t15%\t15%\n60%\t20%\t20%\n", "Select", "Close" ); + } + } + if ( dialogid == DIALOG_RACE_MODE ) + { + new + raceid = GetPVarInt( playerid, "editing_race" ); + + if ( response ) + { + g_raceData[ raceid ] [ E_RACE_FINISH_SET ] = listitem; + SendServerMessage( playerid, "You have set the race mode to "COL_GREY"%s"COL_WHITE".", g_raceData[ raceid ] [ E_POOL ], g_raceData[ raceid ] [ E_MODE ] == RACE_STREET_RACE ? ( "Streetrace" ) : ( "Outrun" ) ); + } + return ShowRaceConfiguration( playerid, raceid ); + } + if ( dialogid == DIALOG_RACE_FEE ) + { + new + raceid = GetPVarInt( playerid, "editing_race" ); + + if ( ! response ) + return ShowRaceConfiguration( playerid, raceid ); + + new + fee; + + if ( sscanf( inputtext, "d", fee ) || ! ( 1000 < fee < 10000000 ) ) { + SendError( playerid, "Please specify an entry fee between $1,000 and $10,000,000." ); + return ShowPlayerDialog( playerid, DIALOG_RACE_FEE, DIALOG_STYLE_INPUT, ""COL_GOLD"Race Configuration - Entry Fee", "Specify the required entry fee for this race (minimum $1,000 - max $10,000,000)", "Select", "Close" ); + } + + g_raceData[ raceid ] [ E_ENTRY_FEE ] = fee; + SendServerMessage( playerid, "You have set the entry fee of the race to %s.", ConvertPrice( fee ) ); + return ShowRaceConfiguration( playerid, raceid ); + } + if ( dialogid == DIALOG_RACE_POS ) + { + new + raceid = GetPVarInt( playerid, "editing_race" ); + + if ( response ) + { + static const + Float: g_prizePoolDistribution[ ] [ 3 ] = + { + { 1.0, 0.0, 0.0 }, + { 0.9, 0.05, 0.05 }, + { 0.8, 0.1, 0.1 }, + { 0.7, 0.15, 0.15 }, + { 0.6, 0.2, 0.2 } + } + ; + + // position prize + g_raceData[ raceid ] [ E_POSITION_PRIZE ] [ 0 ] = g_prizePoolDistribution[ listitem ] [ 0 ]; + g_raceData[ raceid ] [ E_POSITION_PRIZE ] [ 1 ] = g_prizePoolDistribution[ listitem ] [ 1 ]; + g_raceData[ raceid ] [ E_POSITION_PRIZE ] [ 2 ] = g_prizePoolDistribution[ listitem ] [ 2 ]; + + // alert + SendServerMessage( playerid, "The prize pool distribution is now %0.0f%% for 1st, %0.0f%% for 2nd and %0.0f%% for 3rd place.", 100.0 * g_prizePoolDistribution[ listitem ] [ 0 ], 100.0 * g_prizePoolDistribution[ listitem ] [ 1 ], 100.0 * g_prizePoolDistribution[ listitem ] [ 2 ] ); + } + return ShowRaceConfiguration( playerid, raceid ); + } + return 1; +} + +public OnPlayerClickMap(playerid, Float:fX, Float:fY, Float:fZ) +{ + new + raceid = GetPVarInt( playerid, "editing_race" ); + + if ( IsRaceHost( playerid, raceid ) ) + { + if ( g_raceData[ raceid ] [ E_RACE_FINISH_SET ] == 2 ) + { + // set race position + g_raceData[ raceid ] [ E_FINISH_POS ] [ 0 ] = fX; + g_raceData[ raceid ] [ E_FINISH_POS ] [ 1 ] = fY; + g_raceData[ raceid ] [ E_FINISH_POS ] [ 2 ] = fZ; + g_raceData[ raceid ] [ E_RACE_FINISH_SET ] = 1; + + // destroy checkpoint/icon again + DestroyDynamicMapIcon( g_raceData[ raceid ] [ E_FINISH_MAP_ICON ] ); + DestroyDynamicRaceCP( g_raceData[ raceid ] [ E_FINISH_CHECKPOINT ] ); + + // place checkpoint + g_raceData[ raceid ] [ E_FINISH_MAP_ICON ] = CreateDynamicMapIcon( fX, fY, fZ, 53, -1, -1, -1, 0, 1000.0, MAPICON_GLOBAL ); + g_raceData[ raceid ] [ E_FINISH_CHECKPOINT ] = CreateDynamicRaceCP( 0, g_raceData[ raceid ] [ E_FINISH_POS ] [ 0 ], g_raceData[ raceid ] [ E_FINISH_POS ] [ 1 ], g_raceData[ raceid ] [ E_FINISH_POS ] [ 2 ], 0, 0, 0, 5.0, -1, -1, 0 ); + + // reset players in map icon/cp + Streamer_RemoveArrayData( STREAMER_TYPE_MAP_ICON, g_raceData[ raceid ] [ E_FINISH_MAP_ICON ], E_STREAMER_PLAYER_ID, 0 ); + Streamer_RemoveArrayData( STREAMER_TYPE_RACE_CP, g_raceData[ raceid ] [ E_FINISH_CHECKPOINT ], E_STREAMER_PLAYER_ID, 0 ); + + // stream to players + foreach (new i : Player) if ( p_raceLobbyId[ i ] == raceid ) { + Streamer_AppendArrayData( STREAMER_TYPE_MAP_ICON, g_raceData[ raceid ] [ E_FINISH_MAP_ICON ], E_STREAMER_PLAYER_ID, i ); + Streamer_AppendArrayData( STREAMER_TYPE_RACE_CP, g_raceData[ raceid ] [ E_FINISH_CHECKPOINT ], E_STREAMER_PLAYER_ID, i ); + } + + // alert user + SendServerMessage( playerid, "You have selected the final destination for the race, use "COL_GREY"/race start"COL_WHITE" to begin." ); + ShowRaceConfiguration( playerid, raceid ); + } + } + return 1; +} + +stock IsRaceHost( playerid, raceid ) { + if ( raceid == -1 || ! Iter_Contains( races, raceid ) ) + return false; + + return g_raceData[ raceid ] [ E_LOBBY_HOST ] == playerid; +} + +/* end race system */ + CMD:dw( playerid, params[ ] ) return cmd_disposeweapon( playerid, params ); CMD:disposeweapon(playerid, params[]) { @@ -9667,7 +10097,6 @@ CMD:robitems( playerid, params[ ] ) if ( IsPlayerKidnapped( playerid ) ) return SendError( playerid, "You cannot use this command since you're kidnapped." ); if ( IsPlayerInPaintBall( playerid ) ) return SendError( playerid, "You cannot use this command since you're inside the paintball arena." ); if ( IsPlayerInAnyVehicle( playerid ) ) return SendError( playerid, "You cannot use this command inside a vehicle." ); - if ( IsPlayerInCasino( victimid ) && ! p_WantedLevel[ victimid ] ) return SendError( playerid, "The innocent person you're trying to rob is in a casino." ); if ( IsPlayerGettingBlowed( playerid ) ) return SendError( playerid, "You cannot use this command since you're getting blowed." ); if ( IsPlayerBlowingCock( playerid ) ) return SendError( playerid, "You cannot use this command since you're giving oral sex." ); if ( IsPlayerAdminOnDuty( victimid ) ) return SendError( playerid, "You cannot use this command on admins that are on duty." ); @@ -13562,6 +13991,7 @@ CMD:rob( playerid, params[ ] ) if ( IsPlayerBlowingCock( playerid ) ) return SendError( playerid, "You cannot use this command since you're giving oral sex." ); if ( IsPlayerAdminOnDuty( victimid ) ) return SendError( playerid, "You cannot use this command on admins that are on duty." ); if ( IsPlayerJailed( victimid ) ) return SendError( playerid, "This player is jailed. He may be paused." ); + if ( IsPlayerInCasino( victimid ) && ! p_WantedLevel[ victimid ] ) return SendError( playerid, "The innocent person you're trying to rob is in a casino." ); if ( p_ClassSelection{ victimid } ) return SendError( playerid, "This player is currently in class selection." ); if ( IsPlayerInEvent( playerid ) ) return SendError( playerid, "You cannot use this command since you're in an event." ); if ( IsPlayerInPlayerGang( playerid, victimid ) ) return SendError( playerid, "You cannot use this command on your homies!" ); @@ -15482,8 +15912,7 @@ CMD:cc( playerid, params[ ] ) return cmd_clearchat( playerid, params ); CMD:clearchat( playerid, params[ ] ) { if ( p_AdminLevel[ playerid ] < 3 ) return SendError( playerid, ADMIN_COMMAND_REJECT ); - for( new i; i < 50; i++ ) - { + for( new i = 0; i < 50; i++ ) { SendClientMessageToAll( -1, " " ); } SendGlobalMessage( -1, ""COL_PINK"[ADMIN]{FFFFFF} %s cleared the chat.", ReturnPlayerName( playerid ) ); @@ -15560,7 +15989,7 @@ CMD:vforce( playerid, params[ ] ) SetPlayerVirtualWorld( pID, GetVehicleVirtualWorld( vID ) ); PutPlayerInVehicle( pID, vID, 0 ); - SendClientMessageFormatted( playerid, -1, ""COL_PINK"[ADMIN]"COL_WHITE" You have forced %s to enter the vehicle id %d.", ReturnPlayerName( playerid ), vID ); + SendClientMessageFormatted( playerid, -1, ""COL_PINK"[ADMIN]"COL_WHITE" You have forced %s(%d) to enter the vehicle id %d.", ReturnPlayerName( pID ), pID, vID ); AddAdminLogLineFormatted( "%s(%d) has forced %s to enter the vehicle id %d.", ReturnPlayerName( playerid ), playerid, ReturnPlayerName( pID ), vID ); } return 1; @@ -15956,6 +16385,7 @@ CMD:vcreate( playerid, params [ ] ) LinkVehicleToInterior( vCar, GetPlayerInterior( playerid ) ); SetVehicleVirtualWorld( vCar, GetPlayerVirtualWorld( playerid ) ); PutPlayerInVehicle( playerid, vCar, 0 ); + SendClientMessageFormatted( playerid, -1, ""COL_PINK"[ADMIN]"COL_WHITE" You have spawned an "COL_GREY"%s"COL_WHITE".", GetVehicleName( iCarModel ) ); } } else SendError( playerid, "Invalid vehicle name written." ); @@ -18722,7 +19152,7 @@ public OnPlayerEnterDynamicCP(playerid, checkpointid) g_containerData [ i ] [ E_CLOSED ] = true; g_LastExportModel [ playerid ] = vModel; - p_AntiExportCarSpam [ playerid ] = g_iTime + 180; + p_AntiExportCarSpam [ playerid ] = g_iTime + 120; MoveDynamicObject( g_containerData[ i ] [ E_DOOR ] [ 0 ], g_containerData[ i ] [ E_DOOR1_CORDS ] [ 0 ] + 0.05, g_containerData[ i ] [ E_DOOR1_CORDS ] [ 1 ] + 0.05, g_containerData[ i ] [ E_DOOR1_CORDS ] [ 2 ], ( 0.1 ), 0.0, 0.0, g_containerData[ i ] [ E_CLOSE_ANGLE ] [ 0 ] ); MoveDynamicObject( g_containerData[ i ] [ E_DOOR ] [ 1 ], g_containerData[ i ] [ E_DOOR2_CORDS ] [ 0 ] + 0.05, g_containerData[ i ] [ E_DOOR2_CORDS ] [ 1 ] + 0.05, g_containerData[ i ] [ E_DOOR2_CORDS ] [ 2 ], ( 0.1 ), 0.0, 0.0, g_containerData[ i ] [ E_CLOSE_ANGLE ] [ 1 ] ); @@ -18764,6 +19194,7 @@ public OnPlayerEnterDynamicArea( playerid, areaid ) public OnPlayerEnterDynamicRaceCP( playerid, checkpointid ) { static aPlayer[ 1 ]; aPlayer[ 0 ] = playerid; + raceOnPlayerEnterDynamicRaceCP( playerid, checkpointid ); if ( checkpointid == p_TruckingCheckPoint[ playerid ] ) { @@ -20862,6 +21293,7 @@ public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) if ( g_DialogLogging ) printf( "[DIALOG_LOG] %s(%d) - %d, %d, %d, %s", ReturnPlayerName( playerid ), playerid, dialogid, response, listitem, inputtext ); if ( strlen( inputtext ) ) strreplacechar( inputtext, '%', '#' ); // The percentage injection crasher (critical) + rOnDialogResponse(playerid, dialogid, response, listitem, inputtext); if ( dialogid == DIALOG_LOGIN ) { @@ -31254,7 +31686,7 @@ stock calculateVehicleSellPrice( vehicleid ) if ( fHealth < 0.0 ) fHealth = 0.0; - return floatround( float( g_aVehicleSellingPrice[ iModel - 400 ] ) * ( fHealth / 1000.0 ) ); + return floatround( float( g_aVehicleSellingPrice[ iModel - 400 ] ) * ( fHealth / 1000.0 ) * 0.75 ); } stock ArePlayersInHouse( houseid, owner )