15.12.2012, 16:19
Hi I have some problems with my gates ...
Has even made them and I've seen them work but now when I put them into my game mode they turn on and come back in a brand new x .. y .. z
here is it
Has even made them and I've seen them work but now when I put them into my game mode they turn on and come back in a brand new x .. y .. z
here is it
PHP код:
/*
=~==~=~==~=~==~=~==~=~==~=~==~=~==~=~==~=~==~=~==~=~==~=~==~
=~==~=~==COPYRIGHT - 2012 - LYNET=~==~=~==~=~==~=~==~=~==~
*/
#include <a_samp>
#include <sscanf2>
// Colors
#define COLOR_BRIGHTRED 0xFF000AAA
#define COLOR_AQUA 0x00FFFFAA
#define COLOR_GREYs 0xAFAFAFAA
#define COLOR_BEIGE 0xFFF8DCAA
#define COLOR_BLACK 0x000000AA
#define COLOR_BLUE 0x0000FFAA
#define COLOR_BLUELIGHTER 0x00BFFFAA
#define COLOR_BLUELIGHT 0x1E90FFAA
#define COLOR_BLUEMEDIUM 0x0000CDAA
#define COLOR_BLUEDARK 0x00008BAA
#define COLOR_PINK 0xFF1493AA
#define COLOR_PINKDARK 0xFF00FFAA
#define COLOR_FADE 0xE6E6E6E6
#define COLOR_GREEN 0x00FF00CE
#define COLOR_DARKGREEN 0x008040C8
#define COLOR_MAROON 0x800000AA
#define COLOR_OKER 0x808000AA
#define COLOR_ORANGE 0xFF4500AA
#define COLOR_PURPLE 0x800080AA
#define COLOR_VIOLETDARK 0x9400D3AA
#define COLOR_INDIGO 0xAB0082AA
#define COLOR_RED 0xFF0000AA
#define COLOR_SAND 0xFFDEADAA
#define COLOR_SILVER 0xC0C0C0AA
#define COLOR_TEAL 0x008080AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_GOLD 0xFFD700AA
#define COLOR_BROWN 0x8B4513AA
#define COLOR_BROWNLIGHT 0xA0522DAA
#define COLOR_GRAY 0xA9A9A9AA
#define COLOR_GRAYDARK 0x696969AA
#define COLOR_INVISIBLE 0xFFFFFF00
#define COLOR_GREY 0xBEBEBEAA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_GREENs 0x33AA33AA
#define COLOR_GRAD5 0xE3E3E3FF
#define COLOR_GRAD1 0xB4B5B7FF
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_RED1 0xFF0000AA
#define COLOR_LIGHTGREEN 0x80FF80C3
#define COLOR_FADE1 0xE6E6E6E6
#define COLOR_FADE2 0xC8C8C8C8
#define COLOR_FADE3 0xAAAAAAAA
#define COLOR_FADE4 0x8C8C8C8C
#define COLOR_FADE5 0x6E6E6E6E
#define COLOR_ORANGE 0xFF8000C8
#define COLOR_CRIPBLUE 0x004080C8
#define COLOR_LIGHTBLUE 0x00FFFFC8
#define COLOR_ERROR 0xFF0000AA
#define COLOR_PM 0xFF0000AA
// news
new pTyped[MAX_PLAYERS];
new gTeam[MAX_PLAYERS];
new gPlayerClass[MAX_PLAYERS];
new TogPM[MAX_PLAYERS];
//Gangzones
//Gates
new GD;
//Gangzones
new Ballas;
new V;
new TDB;
new TDF;
new GS;
new Crip;
new Bloods;
new KTB;
new SVI;
// teams
#define TEAM_GROVE 1
#define TEAM_SEVILLE 2
#define TEAM_TEMPLA 3
#define TEAM_MARKET 4
#define TEAM_FRONT 5
#define TEAM_ROLLIN 6
#define TEAM_KILO 7
#define TEAM_VAGOS 8
#define TEAM_SURENOS 9
#define TEAM_LSPD 10
#define TEAM_CRIPS 11
#define TEAM_GD 12
#define TEAM_BLOODS 13
//
forward MoneyTimer(playerid, amount); //this can go anywhere
main()
{
print("\n----------------------------------");
print(" CAL v1.0a");
print("----------------------------------\n");
}
public OnGameModeInit()
{
GD = CreateObject(7657,2233.8999023,-2215.3000488,14.3000002,0.0000000,0.0000000,135.0000000);
ShowPlayerMarkers(0);
SetGameModeText("Craft And Live v1.0a");
AddPlayerClass(105,2527.0571,-1665.5991,15.1674,178.4007,0,0,0,0,0,0); // GroveS1
AddPlayerClass(106,2526.5723,-1670.1118,15.1707,8.5724,0,0,0,0,0,0); // GroveS3
AddPlayerClass(107,2522.4578,-1667.3949,15.0311,81.5798,0,0,0,0,0,0); // GroveS2
AddPlayerClass(4,944.7029,-1103.1993,24.2823,268.2669,0,0,0,0,0,0); // LockedLynS1
AddPlayerClass(105,2763.3481,-2009.5632,13.5547,268.8925,0,0,0,0,0,0); // SevilleS1
AddPlayerClass(106,2761.5015,-2004.0840,13.5547,359.7601,0,0,0,0,0,0); // SevilleS2
AddPlayerClass(107,2791.1216,-2002.5958,13.5496,95.6410,0,0,0,0,0,0); // SevilleS3
AddPlayerClass(280,1552.3428,-1675.3177,16.1953,91.2550,0,0,0,0,0,0); // PoliceS1
AddPlayerClass(281,1543.9805,-1672.2512,13.5575,182.4593,0,0,0,0,0,0); // PoliceS2
AddPlayerClass(282,1544.2592,-1678.9026,13.5581,359.4944,0,0,0,0,0,0); // PoliceS3
AddPlayerClass(283,1552.7506,-1673.3557,16.1953,182.7728,0,0,0,0,0,0); // PoliceS4
AddPlayerClass(270,2523.1541,-1679.2279,15.4970,83.4216,0,0,0,0,0,0); // Sweet
AddPlayerClass(271,2459.7266,-1689.7200,13.5403,357.2542,0,0,0,0,0,0); // Ryder
AddPlayerClass(106,972.2834,-1109.5889,23.8628,90.7643,0,0,0,0,0,0); // TempleS1
AddPlayerClass(107,973.1506,-1107.5162,23.9063,10.5736,0,0,0,0,0,0); // TempleS2
AddPlayerClass(28,950.3957,-1110.0876,24.0032,329.9940,0,0,0,0,0,0); // TDFleader
AddPlayerClass(104,1998.4884,-1282.4579,23.9729,2.4897,0,0,0,0,0,0); // GlenParkS1
AddPlayerClass(103,2222.3318,-1178.9467,25.7266,358.1200,0,0,0,0,0,0); // JBS1
AddPlayerClass(177,2131.7727,-2282.5488,20.6719,48.9548,0,0,0,0,0,0); // GDS1
AddPlayerClass(176,2128.1980,-2281.3105,20.6643,323.1006,0,0,0,0,0,0); // GDS2
AddPlayerClass(29,2135.8110,-2275.8364,20.6719,319.6541,0,0,0,0,0,0); // GDS3
AddPlayerClass(28,2131.8906,-2272.9407,20.6719,221.5798,0,0,0,0,0,0); // GDS4
AddPlayerClass(22,2137.7917,-2278.6865,20.6719,44.5682,0,0,0,0,0,0); // GDS5
AddPlayerClass(116,1888.3419,-1982.4648,13.5469,97.7957,0,0,0,0,0,0); // VariosS1
AddPlayerClass(114,1888.9197,-1985.2821,13.5469,72.7522,0,0,0,0,0,0); // VariosS2
AddPlayerClass(115,1890.5846,-1986.8605,13.5469,178.3231,0,0,0,0,0,0); // VariosS3
AddPlayerClass(108,2481.7690,-1332.0035,28.3008,81.4431,0,0,0,0,0,0); // VagosS1
AddPlayerClass(109,2481.7661,-1334.4506,28.1057,82.0698,0,0,0,0,0,0); // VagosS2
AddPlayerClass(110,2480.5901,-1337.5275,27.8479,82.0698,0,0,0,0,0,0); // VagosS3
AddPlayerClass(24,690.2208,-1601.6458,14.1068,11.2644,0,0,0,0,0,0); // CripsS1
AddPlayerClass(182,690.9964,-1600.9813,14.1096,78.6317,0,0,0,0,0,0); // CripsS2
AddPlayerClass(19,948.5309,-697.0748,122.1606,29.4515,0,0,0,0,0,0); // BloodsS1
AddPlayerClass(22,938.2957,-707.7256,122.2109,300.1506,0,0,0,0,0,0); // BloodsS2
AddPlayerClass(183,2672.8118,-1989.4850,14.3240,181.1826,0,0,0,0,0,0); // LockedSkinMAKA
AddPlayerClass(102,2128.2683,-1736.6476,13.5595,178.5103,0,0,0,0,0,0); // IBS1
// objects
//Objects
CreateObject(1468,2100.0000000,-1767.4000244,13.8000002,0.0000000,0.0000000,78.0000000); //object(dyn_mesh_05) (1)
CreateObject(1468,2098.8999023,-1772.5000000,13.8000002,0.0000000,0.0000000,77.9974365); //object(dyn_mesh_05) (2)
CreateObject(1468,2097.8000488,-1777.5999756,13.8000002,0.0000000,0.0000000,77.9974365); //object(dyn_mesh_05) (3)
CreateObject(1468,2096.6999512,-1782.6999512,13.8000002,0.0000000,0.0000000,77.9974365); //object(dyn_mesh_05) (4)
CreateObject(982,2251.0000000,-1742.0000000,13.1999998,0.0000000,0.0000000,89.5000000); //object(fenceshit) (1)
CreateObject(982,2276.5000000,-1742.1999512,13.1999998,0.0000000,0.0000000,89.4946289); //object(fenceshit) (2)
CreateObject(982,2290.8000488,-1742.3000488,13.1999998,0.0000000,0.0000000,89.4946289); //object(fenceshit) (3)
CreateObject(982,2238.0000000,-1741.9000244,13.1999998,0.0000000,0.0000000,89.4946289); //object(fenceshit) (4)
CreateObject(983,2482.6999512,-1722.0000000,13.1999998,0.0000000,0.0000000,88.0000000); //object(fenceshit3) (1)
CreateObject(1411,2425.8000488,-1669.0000000,14.1000004,0.0000000,0.0000000,0.0000000); //object(dyn_mesh_1) (1)
CreateObject(1411,2436.1999512,-1669.0000000,14.1000004,0.0000000,0.0000000,0.0000000); //object(dyn_mesh_1) (3)
CreateObject(1411,2439.1000977,-1671.8000488,14.1000004,0.0000000,0.0000000,271.2500000); //object(dyn_mesh_1) (4)
CreateObject(1411,2439.1999512,-1677.0000000,14.3000002,0.0000000,0.0000000,271.2469482); //object(dyn_mesh_1) (5)
CreateObject(1411,2439.1999512,-1678.4000244,14.3000002,0.0000000,0.0000000,271.2469482); //object(dyn_mesh_1) (6)
CreateObject(1411,2423.0000000,-1671.6999512,14.1999998,0.0000000,0.0000000,90.7469482); //object(dyn_mesh_1) (7)
CreateObject(1411,2423.0000000,-1676.9000244,14.3000002,0.0000000,0.0000000,90.7415771); //object(dyn_mesh_1) (8)
CreateObject(1411,2423.0000000,-1682.0999756,14.3999996,0.0000000,0.0000000,90.7415771); //object(dyn_mesh_1) (9)
CreateObject(1712,2426.0000000,-1670.0999756,12.6000004,0.0000000,0.0000000,0.0000000); //object(kb_couch05) (1)
CreateObject(1709,2429.3000488,-1679.0999756,12.8000002,0.0000000,0.0000000,181.0000000); //object(kb_couch08) (1)
CreateObject(1710,2433.5000000,-1680.0999756,12.8000002,0.0000000,0.0000000,180.7500153); //object(kb_couch07) (1)
CreateObject(2315,2425.8000488,-1678.0999756,12.6999998,0.0000000,0.0000000,0.0000000); //object(cj_tv_table4) (1)
CreateObject(2315,2428.0000000,-1678.0999756,12.6999998,0.0000000,0.0000000,0.0000000); //object(cj_tv_table4) (2)
CreateObject(2315,2430.3999023,-1678.0999756,12.6999998,0.0000000,0.0000000,359.5000000); //object(cj_tv_table4) (3)
CreateObject(14820,2431.1999512,-1678.1999512,13.3000002,0.0000000,0.0000000,0.0000000); //object(dj_stuff) (1)
CreateObject(1421,2437.6999512,-1670.5999756,13.3000002,0.0000000,0.0000000,128.0000000); //object(dyn_boxes) (1)
CreateObject(982,2248.6000977,-2229.8999023,16.8999996,0.0000000,0.0000000,45.0000000); //object(fenceshit) (5)
CreateObject(982,2230.5000000,-2211.8000488,16.8999996,0.0000000,0.0000000,44.9945068); //object(fenceshit) (6)
CreateObject(982,2212.3999023,-2193.6999512,16.8999996,0.0000000,0.0000000,44.9945068); //object(fenceshit) (7)
CreateObject(983,2201.1000977,-2182.3999023,16.8999996,0.0000000,0.0000000,45.0000000); //object(fenceshit3) (2)
CreateObject(982,2189.5000000,-2189.1000977,16.8999996,0.0000000,0.0000000,134.7445068); //object(fenceshit) (8)
CreateObject(982,2171.5000000,-2207.1000977,16.8999996,0.0000000,0.0000000,134.7418213); //object(fenceshit) (9)
CreateObject(982,2153.3999023,-2225.1999512,16.8999996,0.0000000,0.0000000,134.7418213); //object(fenceshit) (10)
CreateObject(982,2135.1999512,-2243.3000488,16.8999996,0.0000000,0.0000000,134.7418213); //object(fenceshit) (11)
CreateObject(982,2124.5000000,-2254.0000000,16.8999996,0.0000000,0.0000000,134.7418213); //object(fenceshit) (12)
CreateObject(984,2113.3000488,-2268.6999512,16.7999992,0.0000000,0.0000000,337.2500000); //object(fenceshit2) (1)
CreateObject(984,2110.8999023,-2281.0000000,16.7999992,0.0000000,0.0000000,359.9973145); //object(fenceshit2) (2)
CreateObject(984,2110.8999023,-2293.8000488,16.7999992,0.0000000,0.0000000,359.9945068); //object(fenceshit2) (3)
CreateObject(984,2110.8999023,-2305.5000000,16.8999996,0.0000000,0.0000000,359.9945068); //object(fenceshit2) (4)
CreateObject(984,2117.1999512,-2313.0000000,16.7999992,0.0000000,0.0000000,80.0000000); //object(fenceshit2) (5)
CreateObject(984,2125.0000000,-2314.3999023,16.7999992,0.0000000,0.0000000,79.9969482); //object(fenceshit2) (6)
CreateObject(984,2137.0000000,-2318.3999023,16.7999992,0.0000000,0.0000000,63.4969482); //object(fenceshit2) (7)
CreateObject(984,2143.6000977,-2321.6000977,16.7999992,0.0000000,0.0000000,63.4954834); //object(fenceshit2) (8)
CreateObject(982,2159.3999023,-2332.3000488,16.8999996,0.0000000,0.0000000,51.2500000); //object(fenceshit) (15)
CreateObject(982,2175.6000977,-2345.3000488,16.8999996,0.0000000,0.0000000,51.2457275); //object(fenceshit) (16)
CreateObject(982,2194.8999023,-2344.5000000,16.8999996,0.0000000,0.0000000,134.4957275); //object(fenceshit) (17)
CreateObject(982,2213.1000977,-2326.6000977,16.8999996,0.0000000,0.0000000,134.7444153); //object(fenceshit) (18)
CreateObject(982,2229.6999512,-2309.8999023,16.8999996,0.0000000,0.0000000,134.9917603); //object(fenceshit) (19)
CreateObject(983,2255.3999023,-2241.3000488,16.8999996,0.0000000,0.0000000,133.9945068); //object(fenceshit3) (3)
CreateObject(10184,2264.5000000,-2254.6999512,15.1000004,0.0000000,0.0000000,45.0000000); //object(sfcopdr) (1)
CreateObject(17010,2199.8000488,-2236.5000000,12.5000000,0.0000000,0.0000000,224.5000458); //object(truth_barn03) (1)
CreateObject(939,2129.0000000,-2261.6999512,16.2000008,0.0000000,0.0000000,43.0000000); //object(cj_df_unit) (1)
CreateObject(939,2134.3999023,-2256.1999512,14.6999998,0.0000000,0.0000000,42.9949951); //object(cj_df_unit) (2)
CreateObject(3052,2149.3999023,-2267.1999512,13.6000004,0.0000000,0.0000000,88.0000000); //object(db_ammo) (1)
CreateObject(3052,2148.3000488,-2266.1000977,13.6000004,0.0000000,0.0000000,34.0000000); //object(db_ammo) (2)
CreateObject(3052,2147.0000000,-2264.8000488,13.6000004,0.0000000,0.0000000,0.0000000); //object(db_ammo) (3)
CreateObject(3052,2150.8000488,-2268.6000977,13.6000004,0.0000000,0.0000000,324.0000000); //object(db_ammo) (4)
CreateObject(3015,2151.0000000,-2269.6999512,13.5000000,0.0000000,0.0000000,62.0000000); //object(cr_cratestack) (1)
CreateObject(3015,2149.3999023,-2268.1999512,13.5000000,0.0000000,0.0000000,0.0000000); //object(cr_cratestack) (2)
CreateObject(3015,2148.3999023,-2266.5000000,13.5000000,0.0000000,0.0000000,272.0000000); //object(cr_cratestack) (3)
CreateObject(3015,2146.8000488,-2265.5000000,13.5000000,0.0000000,0.0000000,26.0000000); //object(cr_cratestack) (4)
CreateObject(1431,2157.3000488,-2267.1000977,12.8999996,0.0000000,0.0000000,316.0000000); //object(dyn_box_pile) (1)
CreateObject(2669,2202.5000000,-2233.1000977,13.8999996,0.0000000,0.0000000,44.5000000); //object(cj_chris_crate) (1)
CreateObject(2669,2200.1999512,-2235.3999023,13.8999996,0.0000000,0.0000000,44.4946289); //object(cj_chris_crate) (2)
CreateObject(2669,2197.8999023,-2237.6999512,13.8999996,0.0000000,0.0000000,44.4946289); //object(cj_chris_crate) (3)
CreateObject(2678,2199.1999512,-2240.1999512,13.8000002,0.0000000,0.0000000,44.5000000); //object(cj_chris_crate_ld) (1)
CreateObject(2679,2200.3000488,-2239.1000977,13.8000002,0.0000000,0.0000000,45.7500000); //object(cj_chris_crate_rd) (1)
CreateObject(3632,2197.0000000,-2235.8000488,13.1999998,0.0000000,0.0000000,0.0000000); //object(imoildrum_las) (1)
CreateObject(3632,2197.0000000,-2236.8000488,13.1999998,0.0000000,0.0000000,0.0000000); //object(imoildrum_las) (2)
CreateObject(3632,2195.8999023,-2236.8999023,13.1999998,0.0000000,0.0000000,0.0000000); //object(imoildrum_las) (3)
CreateObject(3633,2198.8999023,-2234.8000488,13.1999998,0.0000000,0.0000000,0.0000000); //object(imoildrum4_las) (1)
CreateObject(3633,2200.1000977,-2234.6000977,13.1999998,0.0000000,0.0000000,58.0000000); //object(imoildrum4_las) (2)
CreateObject(3633,2199.3000488,-2234.6000977,14.1000004,0.0000000,0.0000000,121.9968262); //object(imoildrum4_las) (3)
CreateObject(8886,2252.1000977,-2238.3999023,15.8999996,0.0000000,0.0000000,313.7500000); //object(vgsefrght04) (1)
CreateObject(3361,2247.1000977,-2233.0000000,17.2999992,0.0000000,0.0000000,133.7500305); //object(cxref_woodstair) (1)
CreateObject(3361,2242.8000488,-2228.3999023,13.3000002,0.0000000,0.0000000,133.7475891); //object(cxref_woodstair) (2)
CreateObject(966,1986.3000488,-1597.8000488,12.6000004,0.0000000,0.0000000,219.7499695); //object(bar_gatebar01) (1)
CreateObject(974,1994.4000244,-1591.4000244,15.3000002,0.0000000,0.0000000,35.7500000); //object(tall_fence) (1)
CreateObject(974,2026.4000244,-1590.3000488,15.3999996,0.0000000,0.0000000,35.7495117); //object(tall_fence) (2)
CreateObject(974,1944.6999512,-1565.3000488,15.3999996,0.0000000,0.0000000,314.4995117); //object(tall_fence) (3)
CreateObject(974,1949.4000244,-1570.0000000,15.3999996,0.0000000,0.0000000,314.4946289); //object(tall_fence) (4)
CreateObject(974,1951.6999512,-1572.3000488,15.3999996,0.0000000,0.0000000,314.4946289); //object(tall_fence) (5)
CreateObject(974,1973.5000000,-1594.0000000,15.3000002,0.0000000,0.0000000,314.4946289); //object(tall_fence) (6)
CreateObject(974,1971.5999756,-1592.0000000,15.3999996,0.0000000,0.0000000,314.4946289); //object(tall_fence) (7)
CreateObject(3749,1542.0000000,-1627.5000000,18.2000008,0.0000000,0.0000000,90.7500000); //object(clubgate01_lax) (1)
CreateObject(974,1543.8000488,-1639.0000000,15.8000002,0.0000000,0.0000000,113.7500000); //object(tall_fence) (1)
CreateObject(974,1539.6999512,-1614.6999512,18.7000008,0.0000000,0.0000000,270.2500000); //object(tall_fence) (2)
CreateObject(974,1539.6999512,-1608.0000000,18.7000008,0.0000000,0.0000000,270.2471924); //object(tall_fence) (3)
CreateObject(974,1539.6999512,-1605.5999756,18.7000008,0.0000000,0.0000000,270.2471924); //object(tall_fence) (4)
CreateObject(974,1549.8000488,-1602.4000244,18.6000004,0.0000000,0.0000000,180.2419434); //object(tall_fence) (6)
CreateObject(974,1543.0999756,-1602.4000244,18.7000008,0.0000000,0.0000000,180.2416992); //object(tall_fence) (7)
CreateObject(974,1556.5000000,-1602.3000488,18.7000008,0.0000000,0.0000000,180.2416992); //object(tall_fence) (8)
CreateObject(974,1563.0999756,-1602.4000244,18.7000008,0.0000000,0.0000000,179.7416992); //object(tall_fence) (9)
CreateObject(974,1569.6999512,-1602.4000244,18.7000008,0.0000000,0.0000000,179.7363281); //object(tall_fence) (10)
CreateObject(974,1576.4000244,-1602.4000244,18.7000008,0.0000000,0.0000000,179.7363281); //object(tall_fence) (11)
CreateObject(974,1583.0000000,-1602.4000244,18.7000008,0.0000000,0.0000000,179.7363281); //object(tall_fence) (12)
CreateObject(974,1589.5999756,-1602.4000244,18.7000008,0.0000000,0.0000000,179.7363281); //object(tall_fence) (13)
CreateObject(974,1596.1999512,-1602.4000244,18.7000008,0.0000000,0.0000000,179.7363281); //object(tall_fence) (14)
CreateObject(974,1602.8000488,-1602.4000244,18.7000008,0.0000000,0.0000000,179.7363281); //object(tall_fence) (15)
CreateObject(974,1604.6999512,-1602.4000244,18.7000008,0.0000000,0.0000000,179.7363281); //object(tall_fence) (16)
CreateObject(974,1608.0999756,-1605.6999512,18.7000008,0.0000000,0.0000000,270.2471924); //object(tall_fence) (17)
CreateObject(974,1608.0999756,-1612.3000488,18.7000008,0.0000000,0.0000000,270.2471924); //object(tall_fence) (18)
CreateObject(974,1608.0999756,-1618.9000244,18.7000008,0.0000000,0.0000000,270.2471924); //object(tall_fence) (19)
CreateObject(974,1608.0999756,-1625.5000000,18.7000008,0.0000000,0.0000000,270.2471924); //object(tall_fence) (20)
CreateObject(974,1608.0000000,-1631.9000244,18.7000008,0.0000000,0.0000000,269.4971924); //object(tall_fence) (21)
CreateObject(974,1608.0000000,-1634.5999756,18.7000008,0.0000000,0.0000000,269.4946289); //object(tall_fence) (23)
CreateObject(974,1604.6999512,-1637.9000244,18.7000008,0.0000000,0.0000000,179.7363281); //object(tall_fence) (24)
CreateObject(1491,1577.3000488,-1637.3000488,12.5000000,0.0000000,0.0000000,91.0000000); //object(gen_doorint01) (1)
CreateObject(996,1550.1999512,-1617.5999756,13.3000002,0.0000000,0.0000000,0.0000000); //object(lhouse_barrier1) (1)
CreateObject(996,1558.3000488,-1617.5999756,13.3000002,0.0000000,0.0000000,0.0000000); //object(lhouse_barrier1) (2)
CreateObject(996,1566.4000244,-1617.5999756,13.3000002,0.0000000,0.0000000,0.0000000); //object(lhouse_barrier1) (3)
CreateObject(973,1537.6999512,-1667.6999512,13.3000002,0.0000000,0.0000000,90.0000000); //object(sub_roadbarrier) (2)
CreateObject(973,1537.6999512,-1677.0000000,13.3000002,0.0000000,0.0000000,90.0000000); //object(sub_roadbarrier) (3)
// objects ends here
///////GangZones//////
//Gangzones
Ballas = GangZoneCreate(1833.984375, -1505.859375, 2285.15625, -1042.96875);
V = GangZoneCreate(2291.016, -1570.313, 2736.328, -1048.828);
TDB = GangZoneCreate(1054.6875, -1582.03125, 1218.75, -1154.296875);
TDF = GangZoneCreate(785.15625, -1160.15625, 1359.375, -1001.953125);
GS = GangZoneCreate(2197.265625, -1839.84375, 2560.546875, -1628.90625);
Crip = GangZoneCreate(544.921875, -1681.640625, 808.59375, -1417.96875);
Bloods = GangZoneCreate(843.75, -949.21875, 1505.859375, -667.96875);
KTB = GangZoneCreate(1804.6875, -1939.453125, 2185.546875, -1476.5625);
SVI = GangZoneCreate(2607.421875, -2179.6875, 2835.9375, -1880.859375);
SetTimer("MoneyTimer", 10000, true); //this sets a timer for the mentioned public function to set the score to the players money amount
return 1;
}
public OnGameModeExit()
{
return 1;
}
public OnPlayerDeath(playerid, killerid, reason)
{
if(killerid != INVALID_PLAYER_ID && killerid != playerid)
{
SendDeathMessage(killerid, playerid, reason);
}
else SendDeathMessage(INVALID_PLAYER_ID, playerid, reason);
return 1;
}
public OnPlayerRequestClass(playerid, classid)
{
gPlayerClass[playerid] = classid;
gTeam[playerid] = classid;
switch (classid) {
case 0,1,2:
{
gTeam[playerid] = TEAM_GROVE;
GameTextForPlayer(playerid, "~g~ Grove Street Families", 5500, 5);
SetPlayerColor(playerid, COLOR_GREEN);
}
case 3:
{
gTeam[playerid] = TEAM_SEVILLE;
GameTextForPlayer(playerid, "~w~ - Server Owner -~n~ ~r~[TDF]Lyn ONLY",5500,5);
SetPlayerColor(playerid, COLOR_DARKGREEN);
}
case 4,5,6:
{
gTeam[playerid] = TEAM_SEVILLE;
GameTextForPlayer(playerid, "~h~ ~g~Seville Boulevard Families",5500,5);
SetPlayerColor(playerid, COLOR_LIGHTGREEN);
}
case 7,8,9,10:
{
gTeam[playerid] = TEAM_LSPD;
GameTextForPlayer(playerid, "~w~Only for Official Members~n~ ~b~ LSPD Department!",5500,5);
SetPlayerColor(playerid, COLOR_BLUE);
}
case 11:
{
gTeam[playerid] = TEAM_GROVE;
GameTextForPlayer(playerid, "~w~ - Leader -~n~ ~r~[GSF]Chuko ONLY!~",5550,5);
SetPlayerColor(playerid, COLOR_GREEN);
}
case 12:
{
gTeam[playerid] = TEAM_GROVE;
GameTextForPlayer(playerid, "~w~ - ShotCaller -~n~ ~r~[GSF]N/A ONLY!~",5550,5);
SetPlayerColor(playerid,COLOR_GREEN);
}
case 13,14:
{
gTeam[playerid] = TEAM_TEMPLA;
GameTextForPlayer(playerid, "~h~~g~Temple Drive Families",5500,5);
SetPlayerColor(playerid, COLOR_DARKGREEN);
}
case 15:
{
gTeam[playerid] = TEAM_TEMPLA;
GameTextForPlayer(playerid, "~w~ - LEADER - ~n~ ~r~ [TDF]Lance ONLY!",5500,5);
SetPlayerColor(playerid, COLOR_DARKGREEN);
}
case 16:
{
gTeam[playerid] = TEAM_KILO;
GameTextForPlayer(playerid, "~p~ Kilo Tray Ballas",5500,5);
SetPlayerColor(playerid, COLOR_PURPLE);
}
case 17:
{
gTeam[playerid] = TEAM_ROLLIN;
GameTextForPlayer(playerid, "~p~ Jefferson Ballas",5500,5);
SetPlayerColor(playerid, COLOR_PURPLE);
}
case 18,19,20,21,22:
{
gTeam[playerid] = TEAM_GD;
GameTextForPlayer(playerid, "~w~ Gundealers",5500,5);
SetPlayerColor(playerid, COLOR_ORANGE);
}
case 23,24,25:
{
gTeam[playerid] = TEAM_SURENOS;
GameTextForPlayer(playerid, "~b~ Los Varios",5500,5);
SetPlayerColor(playerid, COLOR_LIGHTBLUE);
}
case 26,27,28:
{
gTeam[playerid] = TEAM_VAGOS;
GameTextForPlayer(playerid, "~y~ Los Vagos",5500,5);
SetPlayerColor(playerid, COLOR_YELLOW);
}
case 29,30:
{
gTeam[playerid] = TEAM_CRIPS;
GameTextForPlayer(playerid, "~b~ Verona Beach Crips",5500,5);
SetPlayerColor(playerid, COLOR_CRIPBLUE);
}
case 31,32:
{
gTeam[playerid] = TEAM_BLOODS;
GameTextForPlayer(playerid, "~r~ Vinewood Bloods",5500,5);
SetPlayerColor(playerid, COLOR_RED);
}
case 33:
{
gTeam[playerid] = TEAM_SEVILLE;
GameTextForPlayer(playerid, "~w~ - Leader - ~n~ ~r~ [SBF]Makaveli ONLY",6000,5);
SetPlayerColor(playerid, COLOR_LIGHTGREEN);
}
case 34:
{
gTeam[playerid] = TEAM_FRONT;
GameTextForPlayer(playerid, "~p~ Idlewood Ballas",5500,5);
SetPlayerColor(playerid, COLOR_PURPLE);
}
}
SetPlayerInterior(playerid,9);
SetPlayerPos(playerid, 369.7185,-4.4895,1001.8147);
SetPlayerFacingAngle(playerid,180.9218);
SetPlayerCameraPos(playerid, 369.53,-7.95,1001.86);
SetPlayerCameraLookAt(playerid, 369.72,-4.49,1001.86);
ApplyAnimation(playerid, "GANGS", "DEALER_DEAL", 4.1, 0, 1, 1, 1, 1, 1);
return 1;
}
public OnPlayerSpawn(playerid)
{
new Name[MAX_PLAYER_NAME];
GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
if( GetPlayerSkin (playerid) == 4) // edit to the private skin
{
if(!strcmp(Name,"[TDF]Lyn")) // Edit this
{
SendClientMessage(playerid,COLOR_RED,"SERVER: Sup.");
}
else
{
ForceClassSelection(playerid);
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, COLOR_RED ,"SERVER: This skin is locked for [TDF]Lyn Press FR");
}
}
GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
if( GetPlayerSkin (playerid) == 270) // edit to the private skin
{
if(!strcmp(Name,"[GSF]Chuko")) // Edit this
{
SendClientMessage(playerid,COLOR_RED,"SERVER: Sup.");
}
else
{
ForceClassSelection(playerid);
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, COLOR_RED ,"SERVER: This skin is locked for the leader!");
}
}
GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
if( GetPlayerSkin (playerid) == 271) // edit to the private skin
{
if(!strcmp(Name,"[GSF]NA")) // Edit this
{
SendClientMessage(playerid,COLOR_RED,"SERVER: Sup.");
}
else
{
ForceClassSelection(playerid);
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, COLOR_RED ,"SERVER: This skin is locked for the ShotCaller!");
}
}
GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
if( GetPlayerSkin (playerid) == 28) // edit to the private skin
{
if(!strcmp(Name,"[TDF]Lance")) // Edit this
{
SendClientMessage(playerid,COLOR_RED,"SERVER: Sup.");
}
else
{
ForceClassSelection(playerid);
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, COLOR_RED ,"SERVER: This skin is locked for the leader!");
}
}
GetPlayerName(playerid, Name, MAX_PLAYER_NAME);
if( GetPlayerSkin (playerid) == 183) // edit to the private skin
{
if(!strcmp(Name,"[SBF]Makaveli")) // Edit this
{
SendClientMessage(playerid,COLOR_RED,"SERVER: Sup.");
}
else
{
ForceClassSelection(playerid);
SetPlayerHealth(playerid, 0);
SendClientMessage(playerid, COLOR_RED ,"SERVER: This skin is locked for the leader!");
}
}
SendClientMessage(playerid,COLOR_YELLOW, "SERVER: /commands /factions /myfaction");
//
SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 500);
SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 500);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1);
SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 500);
SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 500);
SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 500);
GangZoneShowForAll(Ballas, 0x80008096);
GangZoneShowForAll(V, 0xFFFF0096);
GangZoneShowForAll(TDB, 0xFF80FF96);
GangZoneShowForAll(TDF, 0x00800096);
GangZoneShowForAll(GS, 0x00FF0096);
GangZoneShowForAll(Crip, 0x00408096);
GangZoneShowForAll(Bloods, 0xFF000096);
GangZoneShowForAll(SVI, 0x80FF8096);
GangZoneShowForAll(KTB, 0x80008096);
return 1;
}
public OnPlayerText(playerid, text[])
{
new pname[24], str[128];
GetPlayerName(playerid, pname, 24);
format(str, sizeof(str), "%s: %s", pname, text);
ProxDetector(10.0, playerid, str, COLOR_FADE1, COLOR_FADE2, COLOR_FADE3, COLOR_FADE4, COLOR_FADE5);
return 0;
}
forward ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5);
public ProxDetector(Float:radi, playerid, string[],col1,col2,col3,col4,col5)
{
if(IsPlayerConnected(playerid))
{
new Float:posx, Float:posy, Float:posz;
new Float:oldposx, Float:oldposy, Float:oldposz;
new Float:tempposx, Float:tempposy, Float:tempposz;
GetPlayerPos(playerid, oldposx, oldposy, oldposz);
//radi = 2.0; //Trigger Radius
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && (GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i)))
{
GetPlayerPos(i, posx, posy, posz);
tempposx = (oldposx -posx);
tempposy = (oldposy -posy);
tempposz = (oldposz -posz);
//printf("DEBUG: X:%f Y:%f Z:%f",posx,posy,posz);
if (((tempposx < radi/16) && (tempposx > -radi/16)) && ((tempposy < radi/16) && (tempposy > -radi/16)) && ((tempposz < radi/16) && (tempposz > -radi/16)))
{
SendClientMessage(i, col1, string);
}
else if (((tempposx < radi/8) && (tempposx > -radi/8)) && ((tempposy < radi/8) && (tempposy > -radi/8)) && ((tempposz < radi/8) && (tempposz > -radi/8)))
{
SendClientMessage(i, col2, string);
}
else if (((tempposx < radi/4) && (tempposx > -radi/4)) && ((tempposy < radi/4) && (tempposy > -radi/4)) && ((tempposz < radi/4) && (tempposz > -radi/4)))
{
SendClientMessage(i, col3, string);
}
else if (((tempposx < radi/2) && (tempposx > -radi/2)) && ((tempposy < radi/2) && (tempposy > -radi/2)) && ((tempposz < radi/2) && (tempposz > -radi/2)))
{
SendClientMessage(i, col4, string);
}
else if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi)))
{
SendClientMessage(i, col5, string);
}
}
else
{
SendClientMessage(i, col1, string);
}
}
}//not connected
return 1;
}
public MoneyTimer(playerid) //this can go anywhere, as long as it isnt in a callback
{
SetPlayerScore(playerid, GetPlayerMoney(playerid));
}
stock NAMEGET(playerid)
{
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
for(new i = 0; i < MAX_PLAYER_NAME; i++)
{
if(name[i] == '_') name[i] = ' ';
}
return name;
}
stock AntiAdv(playerid, text[])
{
new strR[255], is1=0, r=0;
while(strlen(text[is1]))
{
if('0'<=text[is1]<='9')
{
new is2=is1+1, p=0;
while(p==0)
{
if('0'<=text[is2]<='9'&&strlen(text[is2]))
{
is2++;
}
else
{
strmid(strR[r],text,is1,is2,255);
if(strval(strR[r])<255) r++;
is1=is2;
p=1;
}
}
}
is1++;
}
if(r>=4)
{
new strMy[255];
format(strMy, sizeof(strMy), " \"Your server name here\": %s is attempting to Server Advertise", NAMEGET(playerid));
SendClientMessage(COLOR_GOVERNMENT, 1, strMy);
new pr2;
for(new z=0;z<r;z++)
{
while((pr2=strfind(text,strR[z],true))!=-1)
{
for(new i=pr2,j=pr2+strlen(strR[z]);i<j;i++)
{
text[i]='*';
}
}
}
return 1;
}
return 0;
}
stock IsPlayerNearPlayer(playerid, targetid, Float:radius)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(targetid, x, y, z);
if(IsPlayerInRangeOfPoint(playerid, radius ,x, y, z))
{
return 1;
}
return 0;
}
stock NearMessageSender(playerid, Float:radius, string[], col1, col2, col3, col4, col5)
{
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
new Float:ix, Float:iy, Float:iz;
new Float:cx, Float:cy, Float:cz;
foreach(Player, i)
{
if(GetPlayerInterior(playerid) == GetPlayerInterior(i) && GetPlayerVirtualWorld(playerid) == GetPlayerVirtualWorld(i))
{
GetPlayerPos(i, ix, iy, iz);
cx = (x - ix);
cy = (y - iy);
cz = (z - iz);
if(((cx < radius/16) && (cx > -radius/16)) && ((cy < radius/16) && (cy > -radius/16)) && ((cz < radius/16) && (cz > -radius/16)))
{
SendClientMessage(i, col1, string);
}
else if(((cx < radius/8) && (cx > -radius/8)) && ((cy < radius/8) && (cy > -radius/8)) && ((cz < radius/8) && (cz > -radius/8)))
{
SendClientMessage(i, col2, string);
}
else if(((cx < radius/4) && (cx > -radius/4)) && ((cy < radius/4) && (cy > -radius/4)) && ((cz < radius/4) && (cz > -radius/4)))
{
SendClientMessage(i, col3, string);
}
else if(((cx < radius/2) && (cx > -radius/2)) && ((cy < radius/2) && (cy > -radius/2)) && ((cz < radius/2) && (cz > -radius/2)))
{
SendClientMessage(i, col4, string);
}
else if(((cx < radius) && (cx > -radius)) && ((cy < radius) && (cy > -radius)) && ((cz < radius) && (cz > -radius)))
{
SendClientMessage(i, col5, string);
}
}
}
return 1;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/opengd", cmdtext, true, 10) == 0)
{
MoveObject(GD,2222.50000000,-2203.69995117,14.30000019,4.00000000);//Open Gate
SendClientMessage(playerid, 0xFF0000AA, "Gate: You just opened the gate!");
return 1;
}
if (strcmp("/closegd", cmdtext, true, 10) == 0)
{
MoveObject(GD,2234.10009766,-2215.19995117,14.30000019,4.00000000);//Close Gate
SendClientMessage(playerid, 0xFF0000AA, "Gate: You just closed the gate!");
return 1;
}
return 0;
}