20.04.2014, 14:50
(
Последний раз редактировалось GeekSiMo; 02.06.2014 в 17:55.
)
-Deleted-
/*================================================= ================================= === Los Santos Turf Wars === === === ================================================== ================================*/ #include <a_samp> #include <core> #include <float> #define dcmd(%1,%2,%3) if ((strcmp((%3)[1], #%1, true, (%2)) == 0) && ((((%3)[(%2) + 1] == 0) && (dcmd_%1(playerid, "")))||(((%3)[(%2) + 1] == 32) && (dcmd_%1(playerid, (%3)[(%2) + 2]))))) return 1 #define SLOTS 100 // how many slots the server got. #define ATTACK_TIME 180000 // Three minutes. (60000 = 1 minute) #define STANDINTURF_TIME 20000 // Twenty secs. (Always some extra secs are added because of the CheckPlayers timer) #define ATTACK_KILLS 5 // Kills to start a turfwar. #define MEMBERS_NEEDED 10 // Members in turf to start turfwar. #define TEAMSCORE 500 // Teamscore to take over all the opponends turf. #define DROP_WEAPONS 1 #define DROP_LENGTH 10000 // 10 Seconds. #define MAX_TEAMS 11 #define MAX_TURFS 60 //================================== COLORS ==================================== #define COLOR_GREY 0xAFAFAFAA #define COLOR_WHITE 0xFFFFFFAA #define COLOR_YELLOW 0xFFFF00AA #define COLOR_GREEN 0x00B000FF #define COLOR_ORANGE 0xFF9900AA #define COLOR_RED 0xFF4646FF #define COLOR_WHITE 0xFFFFFFAA #define COLOR_ME 0x62F821FF #define COLOR_INACTIVE 0xC8BEBEFF #define COLOR_FLASH 0xFF000080 #define COLOR_FLASH2 0xFFFFFF80 #define COLOR_ACHAT 0x8080FFFF #define COLOR_TPM 0x53A6A6FF //Team Colors #define AZTECAS_COLOR 0x18D6E480 #define VAGOS_COLOR 0xF5BE1880 #define BALLAS_COLOR 0x9245AB80 #define GROVE_COLOR 0x007D0080 #define DEALERS_COLOR 0x5E2F2F80 #define COPS_COLOR 0x0080FF80 #define BIKERS_COLOR 0xAAAA0080 #define RAPPERS_COLOR 0x91000080 #define GUARDS_COLOR 0x41414180 #define HOODLUMS_COLOR 0xFFAD5B80 #define WORKERS_COLOR 0x1D584A80 //================================================== ============================ static gTeam[ SLOTS ]; new bounty[ SLOTS ]; new playerCheckpoint[ SLOTS ]; new ShowPM[ SLOTS ]; new ShowTPM[ SLOTS ]; new Spawned[ SLOTS ]; new TeamKills[ SLOTS ]; new Float:X250[ SLOTS ], Float:Y250[ SLOTS ], Float:Z250[ SLOTS ]; new PlayerOnDuty[ SLOTS ]; new lTMoney[ SLOTS ]; new lSMoney[ SLOTS ]; new TimerStarted[ MAX_TURFS ]; new gDropPickup[101] = -1; new savePos; new worldTime; new gDenyWeaponDrop[] = {1,8,11,12,13,17,19,20,35,36,37,38,39,40,41,43,44, 45}; #pragma unused gDenyWeaponDrop //==================================== TEAM STUFF ============================== enum { TEAM_AZTECAS, TEAM_VAGOS, TEAM_BALLAS, TEAM_GROVE, TEAM_DEALERS, TEAM_COPS, TEAM_BIKERS, TEAM_RAPPERS, TEAM_GUARDS, TEAM_HOODLUMS, TEAM_WORKERS }; enum teaminfo { TeamName[ 32 ], TeamColor, TurfWarsWon, TurfWarsLost, RivalsKilled, HomiesDied, TeamScore } new TeamInfo[ MAX_TEAMS ][ teaminfo ]= { { "Aztecas", AZTECAS_COLOR, 0, 0, 0, 0, 0}, { "Vagos", VAGOS_COLOR, 0, 0, 0, 0, 0}, { "Ballas", BALLAS_COLOR, 0, 0, 0, 0, 0}, { "O.G.F.", GROVE_COLOR, 0, 0, 0, 0, 0}, { "Dealers", DEALERS_COLOR, 0, 0, 0, 0, 0}, { "Cops", COPS_COLOR, 0, 0, 0, 0, 0}, { "Bikers", BIKERS_COLOR, 0, 0, 0, 0, 0}, { "Rappers", RAPPERS_COLOR, 0, 0, 0, 0, 0}, { "Guards", GUARDS_COLOR, 0, 0, 0, 0, 0}, { "Hoodlums", HOODLUMS_COLOR, 0, 0, 0, 0, 0}, { "Workers", WORKERS_COLOR, 0, 0, 0, 0, 0} }; //=================================== TURF STUFF =============================== enum tinfo { turfID, turfName[ 40 ], Float:zMinX, Float:zMinY, Float:zMaxX, Float:zMaxY, TurfColor, TurfOwner, TurfAttacker, TurfKills, TurfAttackKills, TurfWarStarted, MIT // Members In Turf } new turfs[ MAX_TURFS ][ tinfo ] = { { 0, "Ganton", 2222.50, -1852.80, 2632.80, -1722.30, GROVE_COLOR, TEAM_GROVE, -1, 0, 0, 0, 0}, { 1, "Ganton", 2222.50, -1722.30, 2632.80, -1628.50, GROVE_COLOR, TEAM_GROVE, -1, 0, 0, 0, 0}, { 2, "Idlewood", 1812.60, -1852.80, 1971.60, -1742.30, COPS_COLOR, TEAM_COPS, -1, 0, 0, 0, 0}, { 3, "Idlewood", 1951.60, -1742.30, 2124.60, -1602.30, COPS_COLOR, TEAM_COPS, -1, 0, 0, 0, 0}, { 4, "Idlewood", 1812.60, -1602.30, 2124.60, -1449.60, COPS_COLOR, TEAM_COPS, -1, 0, 0, 0, 0}, { 5, "Idlewood", 2124.60, -1742.30, 2222.50, -1494.00, GROVE_COLOR, TEAM_GROVE, -1, 0, 0, 0, 0}, { 6, "Idlewood", 1971.60, -1852.80, 2222.50, -1742.30, GROVE_COLOR, TEAM_GROVE, -1, 0, 0, 0, 0}, { 7, "Idlewood", 1812.60, -1742.30, 1951.60, -1602.30, COPS_COLOR, TEAM_COPS, -1, 0, 0, 0, 0}, { 8, "Willow Field", 1970.60, -2179.20, 2089.00, -1852.80, AZTECAS_COLOR, TEAM_AZTECAS, -1, 0, 0, 0, 0}, { 9, "Willow Field", 2089.00, -1989.90, 2324.00, -1852.80, AZTECAS_COLOR, TEAM_AZTECAS, -1, 0, 0, 0, 0}, { 10, "Willow Field", 2089.00, -2235.80, 2201.80, -1989.90, AZTECAS_COLOR, TEAM_AZTECAS, -1, 0, 0, 0, 0}, { 11, "Willow Field", 2324.00, -2059.20, 2541.70, -1852.80, GROVE_COLOR, TEAM_GROVE, -1, 0, 0, 0, 0}, { 12, "Jefferson", 2056.80, -1372.00, 2281.40, -1210.70, BALLAS_COLOR, TEAM_BALLAS, -1, 0, 0, 0, 0}, { 13, "Jefferson", 2056.80, -1210.70, 2185.30, -1126.30, BALLAS_COLOR, TEAM_BALLAS, -1, 0, 0, 0, 0}, { 14, "Jefferson", 2056.80, -1449.60, 2266.20, -1372.00, BALLAS_COLOR, TEAM_BALLAS, -1, 0, 0, 0, 0}, { 15, "East Los Santos", 2421.00, -1628.50, 2632.80, -1454.30, GROVE_COLOR, TEAM_GROVE, -1, 0, 0, 0, 0}, { 16, "East Los Santos", 2222.50, -1628.50, 2421.00, -1494.00, GROVE_COLOR, TEAM_GROVE, -1, 0, 0, 0, 0}, { 17, "East Los Santos", 2266.20, -1494.00, 2381.60, -1372.00, BALLAS_COLOR, TEAM_BALLAS, -1, 0, 0, 0, 0}, { 18, "East Los Santos", 2281.60, -1372.00, 2381.60, -1135.00, BALLAS_COLOR, TEAM_BALLAS, -1, 0, 0, 0, 0}, { 19, "East Los Santos", 2381.60, -1454.30, 2462.10, -1135.00, BALLAS_COLOR, TEAM_BALLAS, -1, 0, 0, 0, 0}, { 20, "East Los Santos", 2462.10, -1454.30, 2581.70, -1135.00, BALLAS_COLOR, TEAM_BALLAS, -1, 0, 0, 0, 0}, { 21, "East Beach", 2632.80, -1852.80, 2959.30, -1668.10, DEALERS_COLOR, TEAM_DEALERS, -1, 0, 0, 0, 0}, { 22, "East Beach", 2632.80, -1668.10, 2747.70, -1393.40, DEALERS_COLOR, TEAM_DEALERS, -1, 0, 0, 0, 0}, { 23, "East Beach", 2747.70, -1668.10, 2959.30, -1498.60, DEALERS_COLOR, TEAM_DEALERS, -1, 0, 0, 0, 0}, { 24, "East Beach", 2747.70, -1498.60, 2959.30, -1120.00, VAGOS_COLOR, TEAM_VAGOS, -1, 0, 0, 0, 0}, { 25, "Playa Del Seville", 2703.50, -2126.90, 2959.30, -1852.80, DEALERS_COLOR, TEAM_DEALERS, -1, 0, 0, 0, 0}, { 26, "El Corona", 1812.60, -2179.20, 1970.60, -1852.80, AZTECAS_COLOR, TEAM_AZTECAS, -1, 0, 0, 0, 0}, { 27, "El Corona", 1692.60, -2179.20, 1812.60, -1842.20, AZTECAS_COLOR, TEAM_AZTECAS, -1, 0, 0, 0, 0}, { 28, "Glen Park", 1812.60, -1350.70, 2056.80, -1100.80, BALLAS_COLOR, TEAM_BALLAS, -1, 0, 0, 0, 0}, { 29, "Los Flores", 2581.70, -1393.40, 2747.70, -1135.00, VAGOS_COLOR, TEAM_VAGOS, -1, 0, 0, 0, 0}, { 30, "Las Colinas", 1994.30, -1100.80, 2056.80, -920.80, VAGOS_COLOR, TEAM_VAGOS, -1, 0, 0, 0, 0}, { 31, "Las Colinas", 2056.80, -1126.30, 2126.80, -920.80, VAGOS_COLOR, TEAM_VAGOS, -1, 0, 0, 0, 0}, { 32, "Las Colinas", 2185.30, -1154.50, 2281.40, -934.40, VAGOS_COLOR, TEAM_VAGOS, -1, 0, 0, 0, 0}, { 33, "Las Colinas", 2126.80, -1126.30, 2185.30, -934.40, VAGOS_COLOR, TEAM_VAGOS, -1, 0, 0, 0, 0}, { 34, "Las Colinas", 2632.70, -1135.00, 2747.70, -945.00, VAGOS_COLOR, TEAM_VAGOS, -1, 0, 0, 0, 0}, { 35, "Las Colinas", 2281.40, -1135.00, 2632.70, -945.00, VAGOS_COLOR, TEAM_VAGOS, -1, 0, 0, 0, 0}, { 36, "Verona Beach", 930.20, -2006.70, 1073.20, -1804.20, BIKERS_COLOR, TEAM_BIKERS, -1, 0, 0, 0, 0}, { 37, "Verona Beach", 851.40, -1804.20, 1046.10, -1577.50, BIKERS_COLOR, TEAM_BIKERS, -1, 0, 0, 0, 0}, { 38, "Verona Beach", 1161.50, -1722.20, 1323.90, -1577.50, BIKERS_COLOR, TEAM_BIKERS, -1, 0, 0, 0, 0}, { 39, "Verona Beach", 1046.10, -1722.20, 1161.50, -1577.50, BIKERS_COLOR, TEAM_BIKERS, -1, 0, 0, 0, 0}, { 40, "Mulholland", 1169.10, -910.10, 1318.10, -768.00, RAPPERS_COLOR, TEAM_RAPPERS, -1, 0, 0, 0, 0}, { 41, "Mulholland", 1318.10, -910.10, 1357.00, -768.00, RAPPERS_COLOR, TEAM_RAPPERS, -1, 0, 0, 0, 0}, { 42, "Mulholland", 1357.00, -926.90, 1463.90, -768.00, RAPPERS_COLOR, TEAM_RAPPERS, -1, 0, 0, 0, 0}, { 43, "Mulholland", 1185.58, -767.09, 1462.02, -641.76, RAPPERS_COLOR, TEAM_RAPPERS, -1, 0, 0, 0, 0}, { 44, "Pershing Square", 1327.8929,-1729.3352,1821.7725,-1573.5878, COPS_COLOR, TEAM_COPS, -1, 0, 0, 0, 0}, { 45, "LS International", 1249.60, -2394.30, 1852.00, -2179.20, GUARDS_COLOR, TEAM_GUARDS, -1, 0, 0, 0, 0}, { 46, "LS International", 1852.00, -2394.30, 2089.00, -2179.20, GUARDS_COLOR, TEAM_GUARDS, -1, 0, 0, 0, 0}, { 47, "LS International", 1382.70, -2730.80, 2201.80, -2394.30, GUARDS_COLOR, TEAM_GUARDS, -1, 0, 0, 0, 0}, { 48, "Ocean Docks", 2373.70, -2697.00, 2809.20, -2330.40, HOODLUMS_COLOR, TEAM_HOODLUMS, -1, 0, 0, 0, 0}, { 49, "Ocean Docks", 2201.80, -2418.30, 2324.00, -2095.00, HOODLUMS_COLOR, TEAM_HOODLUMS, -1, 0, 0, 0, 0}, { 50, "Ocean Docks", 2324.00, -2302.30, 2703.50, -2145.10, HOODLUMS_COLOR, TEAM_HOODLUMS, -1, 0, 0, 0, 0}, { 51, "Ocean Docks", 2089.00, -2394.30, 2201.80, -2235.80, HOODLUMS_COLOR, TEAM_HOODLUMS, -1, 0, 0, 0, 0}, { 52, "Ocean Docks", 2201.80, -2730.80, 2324.00, -2418.30, HOODLUMS_COLOR, TEAM_HOODLUMS, -1, 0, 0, 0, 0}, { 53, "Ocean Docks", 2703.50, -2302.30, 2959.30, -2126.90, DEALERS_COLOR, TEAM_DEALERS, -1, 0, 0, 0, 0}, { 54, "Ocean Docks", 2324.00, -2145.10, 2703.50, -2059.20, HOODLUMS_COLOR, TEAM_HOODLUMS, -1, 0, 0, 0, 0}, { 55, "Market", 787.40, -1416.20, 1072.60, -1310.20, WORKERS_COLOR, TEAM_WORKERS, -1, 0, 0, 0, 0}, { 56, "Market", 952.60, -1310.20, 1072.60, -1130.80, WORKERS_COLOR, TEAM_WORKERS, -1, 0, 0, 0, 0}, { 57, "Market", 1072.60, -1416.20, 1370.80, -1130.80, WORKERS_COLOR, TEAM_WORKERS, -1, 0, 0, 0, 0}, { 58, "Market", 926.90, -1577.50, 1370.80, -1416.20, BIKERS_COLOR, TEAM_BIKERS, -1, 0, 0, 0, 0}, { 59, "Downtown LS", 1370.80, -1384.90, 1463.90, -1170.80, WORKERS_COLOR, TEAM_WORKERS, -1, 0, 0, 0, 0} }; new TurfInfo[ MAX_TURFS ][ MAX_TEAMS ][ tinfo ]; //============================= AMMUNATION STUFF =============================== #define CP_AMMU 0 #define CP_AMMU_2 1 #define MAX_POINTS 2 new Float:checkCoords[ MAX_POINTS ][ 4 ] = { { 284.2472, -41.8122, 300.0394, -31.2338 }, //AMMUNATION { 284.0852, -112.7093, 298.1693, -102.9225 } //AMMUNATION_2 }; new Float:checkpoints[ MAX_POINTS ][ 4 ] = { { 289.9959, -40.4220, 1001.5156, 40.0}, { 296.3686, -105.0054, 1001.5156, 40.0} }; new checkpointType[ MAX_POINTS ] = { CP_AMMU, CP_AMMU_2 }; #define MAX_WEAPONS 14 new weaponNames[ MAX_WEAPONS ][ 32 ] = { "Pistol", "Silenced Pistol", "Desert Eagle", "Shotgun", "Combat Shotgun", "Micro Uzi", "Tec9", "MP5", "AK47", "M4", "Sniper Rifle", "Grenade", "Molotov", "Chainsaw" }; new weaponIDs[ MAX_WEAPONS ] = { 22, //Pistol 23, //Silenced Pistol 24, //Desert Eagle 25, //Shotgun 27, //Combat shotgun 28, //Micro Uzi 32, //Tec9 29, //MP5 30, //AK47 31, //M4 34, //Sniper Rifle 16, //Grenade 18, //Molotov 9 //Chainsaw }; new weaponCost[ MAX_WEAPONS ] = { 5000, 6000, 10000, 10000, 25000, 17500, 15000, 12500, 25000, 27500, 22500, 20000, 20000, 7500 }; new weaponAmmo[ MAX_WEAPONS ] = { 100, 50, 50, 30, 30, 100, 100, 100, 100, 100, 15, 5, 5, 1 }; new playerWeapons[ SLOTS ][ MAX_WEAPONS ]; //=========================== SPAWNPOINTS ====================================== new Float:gAztecasSP[ 5 ][ 4 ] = { {1782.4652, -2125.8149, 14.0679, 2.1458}, {1802.0015, -2099.5906, 14.0210, 178.8617}, {1733.7253, -2098.3542, 14.0366, 179.5071}, {1674.3099, -2122.3008, 14.1460, 309.0879}, {1734.5999, -2129.7507, 14.0210, 359.1053} }; new Float:gVagosSP[ 5 ][ 4 ] = { {2626.2966, -1112.7968, 67.8459, 268.0490}, {2628.5859, -1068.0347, 69.6129, 270.7647}, {2576.2104, -1070.5781, 69.8322, 90.3136}, {2526.9141, -1061.0150, 69.5673, 276.0494}, {2579.2810, -1033.8696, 69.5804, 182.8840} }; new Float:gBallasSP[ 5 ][ 4 ] = { {1999.8577, -1114.6553, 27.1250, 182.0473}, {2022.9449, -1120.9398, 26.4210, 176.7813}, {2045.8439, -1115.7263, 26.3617, 273.3338}, {2093.7844, -1123.7844, 27.6899, 85.9610}, {2094.6392, -1145.1943, 26.5929, 90.0567} }; new Float:gGroveSP[ 5 ][ 4 ] = { {2486.3970, -1645.1057, 14.0772, 179.9111}, {2522.4792, -1678.8976, 15.4970, 84.5245}, {2459.4883, -1690.7766, 13.5447, 4.4374}, {2512.8555, -1650.1726, 14.3557, 144.0457}, {2452.1179, -1642.6036, 13.7357, 185.5197} }; new Float:gDealersSP[ 5 ][ 4 ] = { {2751.8059, -1962.7186, 13.5469, 275.6328}, {2786.4072, -1926.2677, 13.5469, 93.7698}, {2801.9312, -1962.5712, 13.5469, 265.4980}, {2736.3562, -1926.6581, 13.5469, 88.0278}, {2782.5354, -2020.5160, 13.5620, 18.5249} }; new Float:gCopsSP[ 5 ][ 4 ] = { {1580.5128, -1634.4861, 13.5617, 130.4118}, {1568.6759, -1690.4570, 5.8906, 176.6791}, {1525.1227, -1678.2502, 5.8906, 273.1760}, {1549.9097, -1639.7108, 6.2188, 140.2159}, {1552.8384, -1675.1357, 16.1953, 89.8920} }; new Float:gBikersSP[ 5 ][ 4 ] = { {865.1617, -1634.7625, 14.9297, 176.2746}, {851.1503, -1688.4281, 14.9478, 270.6273}, {892.3436, -1638.1572, 14.9494, 179.3978}, {936.1555, -1612.9193, 14.9414, 182.2190}, {986.8895, -1624.1165, 14.9297, 85.0584} }; new Float:gRappersSP[ 5 ][ 4 ] = { {1299.7562, -799.9611, 84.1406, 194.2108}, {1242.5406, -801.9774, 84.1406, 184.6465}, {1257.8717, -785.9609, 92.0302, 94.8174}, {1294.2952, -768.8214, 95.9635, 138.9095}, {1300.6792, -788.9683, 88.3125, 137.6236} }; new Float:gGuardsSP[ 5 ][ 4 ] = { {2057.1948, -2369.3684, 16.1250, 233.0575}, {2059.3333, -2378.7324, 16.1250, 271.5332}, {2085.9832, -2368.4207, 15.7088, 95.6059}, {2078.2334, -2375.8376, 13.5469, 151.6155}, {2056.1616, -2382.3760, 13.5469, 214.3861} }; new Float:gHoodlumsSP[ 5 ][ 4 ] = { {2730.7947, -2477.1145, 17.5937, 357.1576}, {2730.7314, -2425.7117, 17.5937, 180.2173}, {2721.3579, -2380.8623, 17.3403, 181.0635}, {2719.7244, -2516.8755, 17.3672, 359.3862}, {2731.4517, -2488.0862, 13.6530, 187.1712} }; new Float:gWorkersSP[ 5 ][ 4 ] = { {1227.4185, -1243.5392, 19.6232, 222.0879}, {1247.9486, -1230.1859, 13.6797, 311.5554}, {1281.2274, -1232.5288, 13.9053, 142.7271}, {1284.2473, -1253.5109, 13.5469, 327.8930}, {1227.2406, -1269.6855, 13.5765, 317.0280} }; //================================================== ============================ forward TimeUpdate( ); forward MoneyTimer( ); forward GameModeExitFunc( ); forward getCheckpointType( playerID ); forward isPlayerInArea( playerID, Float:data[ 4 ] ); forward IsPlayerInTurf( playerid, Float:min_x, Float:min_y, Float:max_x, Float:max_y ); forward checkpointUpdate( ); forward SavedUpdate( ); forward TeamFix( ); forward CheckPlayers( ); forward StartWar( turf, attacker ); forward EndWar( turf, attacker, defender ); forward PickupDestroy( pickupid ); forward TimeTextForPlayer( playerid, Text:text, time ); forward DestroyTextTimer( Text:text ); forward GameModeInitExitFunc( ); forward OnPlayerTeamPrivmsg( playerid, msg[] ); forward SendAdminMessage( color, string[] ); forward OnPlayerPrivmsg ( playerid, recieverid, text[] ) ; //================================================== ============================ #define MAX_SAVE 64 new savedInfo[ MAX_SAVE ][ 3 ]; new savedNames[ MAX_SAVE ][ MAX_PLAYER_NAME ]; new savedWeapons[ MAX_SAVE ][ MAX_WEAPONS ]; //================================================== ============================ main() { print("\n\n-----------------------------------------\n"); print("------ Los Santos Turf Wars ------\n"); print("-----------------------------------------\n\n"); worldTime = 12; } //================================================== ============================ public TimeUpdate( ) { worldTime++; worldTime%=24; SetWorldTime( worldTime ); } //================================================== ============================ public OnGameModeInit( ) { SetGameModeText( "Turf Wars" ); SetTeamCount( 11 ); ShowPlayerMarkers( 1 ); ShowNameTags( 1 ); EnableZoneNames( 1 ); EnableTirePopping( 1 ); UsePlayerPedAnims( ); AllowAdminTeleport( 1 ); // SetDisabledWeapons( 8,10,11,12,13,14,17,19,20,21,35,36,37,38,39,40,41, 42,43,44,45 ); // PlayerClasses // Aztecas // AddPlayerClassEx(0, 292, 1673.6190, -2122.3142, 14.1460, 296.6250, 24,100, 27,100, 16,5);//D.Eagle AddPlayerClassEx(0, 115, 1673.6190, -2122.3142, 14.1460, 296.6250, 24,100, 27,100, 16,5);//C.shotgun AddPlayerClassEx(0, 116, 1673.6190, -2122.3142, 14.1460, 296.6250, 24,100, 27,100, 16,5);//Grenades AddPlayerClassEx(0, 41, 1673.6190, -2122.3142, 14.1460, 296.6250, 24,100, 27,100, 16,5); // Vagos // AddPlayerClassEx(1, 108, 2626.4180, -1098.8073, 69.3514, 280.0232, 24,100, 27,100, 16,5); AddPlayerClassEx(1, 109, 2626.4180, -1098.8073, 69.3514, 280.0232, 24,100, 27,100, 16,5); AddPlayerClassEx(1, 110, 2626.4180, -1098.8073, 69.3514, 280.0232, 24,100, 27,100, 16,5); AddPlayerClassEx(1, 215, 2626.4180, -1098.8073, 69.3514, 280.0232, 24,100, 27,100, 16,5); // Ballas // AddPlayerClassEx(2, 102, 2277.6997, -1134.3367, 1050.8984, 264.2271, 24,100, 27,100, 18,5);//D.Eagle AddPlayerClassEx(2, 103, 2277.6997, -1134.3367, 1050.8984, 264.2271, 24,100, 27,100, 18,5);//C.shotgun AddPlayerClassEx(2, 104, 2277.6997, -1134.3367, 1050.8984, 264.2271, 24,100, 27,100, 18,5);//Molotovs AddPlayerClassEx(2, 13, 2277.6997, -1134.3367, 1050.8984, 264.2271, 24,100, 27,100, 18,5); // Grove // AddPlayerClassEx(3, 269, 2525.9170, -1674.7805, 1015.4986, 270.4626, 24,100, 27,100, 18,5); AddPlayerClassEx(3, 270, 2525.9170, -1674.7805, 1015.4986, 270.4626, 24,100, 27,100, 18,5); AddPlayerClassEx(3, 271, 2525.9170, -1674.7805, 1015.4986, 270.4626, 24,100, 27,100, 18,5); AddPlayerClassEx(3, 195, 2525.9170, -1674.7805, 1015.4986, 270.4626, 24,100, 27,100, 18,5); // Dealers // AddPlayerClassEx(4, 28, 2744.3135, -1960.9834, 21.7099, 262.9126, 24,100, 27,100, 16,5); AddPlayerClassEx(4, 29, 2744.3135, -1960.9834, 21.7099, 262.9126, 24,100, 27,100, 16,5); AddPlayerClassEx(4, 30, 2744.3135, -1960.9834, 21.7099, 262.9126, 24,100, 27,100, 16,5); AddPlayerClassEx(4, 12, 2744.3135, -1960.9834, 21.7099, 262.9126, 24,100, 27,100, 16,5); // Cops // AddPlayerClassEx(5, 265, 218.3181, 69.2598, 1005.0391, 272.1958, 24,100, 27,100, 16,5); AddPlayerClassEx(5, 266, 218.3181, 69.2598, 1005.0391, 272.1958, 24,100, 27,100, 16,5); AddPlayerClassEx(5, 267, 218.3181, 69.2598, 1005.0391, 272.1958, 24,100, 27,100, 16,5); AddPlayerClassEx(5, 246, 218.3181, 69.2598, 1005.0391, 272.1958, 24,100, 27,100, 16,5); // Bikers // AddPlayerClassEx(6, 100, 865.1848, -1634.4077, 14.9297, 176.2746, 24,100, 27,100, 18,5); AddPlayerClassEx(6, 247, 865.1848, -1634.4077, 14.9297, 176.2746, 24,100, 27,100, 18,5); AddPlayerClassEx(6, 248, 865.1848, -1634.4077, 14.9297, 176.2746, 24,100, 27,100, 18,5); AddPlayerClassEx(6, 201, 865.1848, -1634.4077, 14.9297, 176.2746, 24,100, 27,100, 18,5); // Rappers // AddPlayerClassEx(7, 293, 1252.9651, -795.6196, 1084.2344, 313.6620, 24,100, 27,100, 18,5); AddPlayerClassEx(7, 297, 1252.9651, -795.6196, 1084.2344, 313.6620, 24,100, 27,100, 18,5); AddPlayerClassEx(7, 19, 1252.9651, -795.6196, 1084.2344, 313.6620, 24,100, 27,100, 18,5); AddPlayerClassEx(7, 233, 1252.9651, -795.6196, 1084.2344, 313.6620, 24,100, 27,100, 18,5); // Guards // AddPlayerClassEx(8, 163, 1197.1981, -1180.4625, 31.8125, 264.0207, 24,100, 27,100, 16,5); AddPlayerClassEx(8, 164, 1197.1981, -1180.4625, 31.8125, 264.0207, 24,100, 27,100, 16,5); AddPlayerClassEx(8, 71, 1197.1981, -1180.4625, 31.8125, 264.0207, 24,100, 27,100, 16,5); AddPlayerClassEx(8, 141, 1197.1981, -1180.4625, 31.8125, 264.0207, 24,100, 27,100, 16,5); // Hoodlums // AddPlayerClassEx(9, 183, 2746.2112, -2454.1011, 16.6562, 271.6301, 24,100, 27,100, 16,5); AddPlayerClassEx(9, 21, 2746.2112, -2454.1011, 16.6562, 271.6301, 24,100, 27,100, 16,5); AddPlayerClassEx(9, 22, 2746.2112, -2454.1011, 16.6562, 271.6301, 24,100, 27,100, 16,5); AddPlayerClassEx(9, 190, 2746.2112, -2454.1011, 16.6562, 271.6301, 24,100, 27,100, 16,5); // Workers // AddPlayerClassEx(10, 27, 1227.4185, -1243.5392, 19.6232, 222.0879, 24,100, 27,100, 18,5); AddPlayerClassEx(10,153, 1227.4185, -1243.5392, 19.6232, 222.0879, 24,100, 27,100, 18,5); AddPlayerClassEx(10, 16, 1227.4185, -1243.5392, 19.6232, 222.0879, 24,100, 27,100, 18,5); AddPlayerClassEx(10,192, 1227.4185, -1243.5392, 19.6232, 222.0879, 24,100, 27,100, 18,5); //---------------------------- Team Vehicles ----------------------------------- // Heli's Respawn after 30 secs AddStaticVehicleEx(487, 1802.5719, -2147.0588, 17.7954, 87.9824, 97, 1, 30); // az AddStaticVehicleEx(487, 1715.4847, -2144.8665, 17.4541, 271.2545, 97, 1, 30); AddStaticVehicleEx(487, 2529.1804, -1678.0981, 20.1069, 90.5616, 86, 1, 30); // gr AddStaticVehicleEx(487, 2376.1848, -1642.3527, 13.6877, 179.3587, 86, 1, 30); AddStaticVehicleEx(487, 1291.0372, -782.1488, 96.6349, 181.5480, 30, 1, 30); // ra AddStaticVehicleEx(487, 1291.2373, -795.5877, 96.6350, 358.7492, 30, 1, 30); AddStaticVehicleEx(487, 2042.5867, -2415.4641, 13.7237, 88.0966, 25, 1, 30); // gu AddStaticVehicleEx(487, 2082.5244, -2292.3137, 18.8407, 181.5882, 25, 1, 30); AddStaticVehicleEx(487, 883.4486, -1707.7190, 13.0928, 179.8443, 65, 1, 30); // bi AddStaticVehicleEx(487, 883.0782, -1735.2272, 13.0994, 0.6590, 65, 1, 30); AddStaticVehicleEx(497, 1565.4097, -1612.9707, 13.5594, 179.9088, 0, 1, 30); // co AddStaticVehicleEx(497, 1553.0725, -1612.7714, 13.5617, 180.4659, 0, 1, 30); AddStaticVehicleEx(487, 2040.1948, -1113.9559, 30.0394, 269.5649, 54, 1, 30); // ba AddStaticVehicleEx(487, 2098.3293, -1186.9663, 30.7324, 90.5505, 54, 1, 30); AddStaticVehicleEx(487, 2579.1829, -1030.6965, 73.3895, 268.4893, 6, 1, 30); // va AddStaticVehicleEx(487, 2596.3777, -1117.7544, 66.8571, 345.4225, 6, 1, 30); AddStaticVehicleEx(487, 2774.7979, -2540.2712, 19.0990, 359.3782, 102, 1, 30); // ho AddStaticVehicleEx(487, 2767.4480, -2372.3940, 19.0984, 89.4405, 102, 1, 30); AddStaticVehicleEx(487, 2744.1221, -1961.5730, 21.7922, 359.9515, 113, 1, 30); // de AddStaticVehicleEx(487, 2794.3784, -1925.2078, 21.7925, 179.7559, 113, 1, 30); AddStaticVehicleEx(487, 1257.0879, -1237.7987, 18.2206, 179.1622, 51, 1, 30); // wo AddStaticVehicleEx(487, 1255.4160, -1184.6429, 23.7554, 179.5271, 51, 1, 30); // Cars Respawn after 30 secs // Aztecas // AddStaticVehicleEx(466, 1705.0120, -2128.7627, 13.2887, 359.7284, 97, 96, 30); // glendale AddStaticVehicleEx(474, 1667.9630, -2111.1350, 13.3098, 269.6416, 97, 96, 30); // hermes AddStaticVehicleEx(575, 1724.8003, -2097.8608, 13.1508, 179.8669, 97, 96, 30); // broadway AddStaticVehicleEx(466, 1773.0240, -2097.1389, 13.2892, 180.2724, 97, 96, 30); // glendale AddStaticVehicleEx(474, 1744.9988, -2127.5525, 13.3096, 359.7272, 97, 96, 30); // hermes AddStaticVehicleEx(567, 1793.4592, -2129.3376, 13.4168, 359.8183, 3, 3, 30); // savanna AddStaticVehicleEx(471, 1772.1758, -2125.4370, 13.0279, 359.0490, 96, 97, 30); // quad // Grove // AddStaticVehicleEx(492, 2508.3440, -1666.1531, 13.1820, 11.7864, 100, 96, 30); // greenwood AddStaticVehicleEx(600, 2473.1553, -1691.6614, 13.2278, 359.3989, 113, 96, 30); // picador AddStaticVehicleEx(567, 2443.2261, -1643.5012, 13.3333, 178.8905, 86, 96, 30); // savanna AddStaticVehicleEx(412, 2486.0669, -1654.5834, 13.2305, 89.3584, 86, 96, 30); // voodoo AddStaticVehicleEx(471, 2507.9875, -1650.4827, 13.2595, 136.9348, 96, 86, 30); // quad AddStaticVehicleEx(412, 2479.0452, -1748.4788, 13.3856, 359.3116, 86, 96, 30); // voodoo // Rappers // AddStaticVehicleEx(579, 1254.8761, -804.2604, 84.0739, 179.7531, 30, 96, 30); // huntley AddStaticVehicleEx(580, 1258.6738, -814.9005, 83.9366, 90.1519, 30, 96, 30); // stafford AddStaticVehicleEx(521, 1305.8616, -796.8700, 83.7083, 193.9615, 30, 96, 30); // fcr900 AddStaticVehicleEx(533, 1248.9216, -803.8434, 83.8497, 179.9391, 30, 96, 30); // feltzer AddStaticVehicleEx(471, 1302.3571, -812.6957, 83.6223, 359.2730, 96, 30, 30); // quad // Guards // AddStaticVehicleEx(507, 2058.8191, -2325.0425, 13.3715, 269.9650, 25, 96, 30); // elegant AddStaticVehicleEx(426, 2087.5754, -2392.3960, 13.2899, 90.3086, 25, 96, 30); // premier AddStaticVehicleEx(426, 2086.3909, -2316.6287, 13.2902, 90.7526, 25, 96, 30); // premier AddStaticVehicleEx(507, 2058.7661, -2385.1228, 13.3706, 270.5188, 25, 96, 30); // elegant AddStaticVehicleEx(471, 2092.9546, -2358.0488, 13.0282, 89.3856, 96, 25, 30); // qaud // Bikers // AddStaticVehicleEx(463, 892.5114, -1670.0753, 13.0932, 359.0870, 65, 96, 30); // freeway AddStaticVehicleEx(463, 874.5585, -1657.5487, 13.0870, 180.3009, 65, 96, 30); // freeway AddStaticVehicleEx(463, 883.1781, -1645.7882, 13.0868, 270.2893, 65, 96, 30); // freeway AddStaticVehicleEx(471, 883.5585, -1669.6713, 13.0297, 358.2961, 96, 65, 30); // quad AddStaticVehicleEx(483, 892.6470, -1678.4722, 13.5393, 179.7223, 65, 96, 30); // camper AddStaticVehicleEx(483, 856.1459, -1649.7294, 13.5450, 269.4443, 65, 96, 30); // camper // Cops // AddStaticVehicleEx(596, 1536.1616, -1678.4150, 13.1024, 0.7176, 0, 1, 30); //lspd AddStaticVehicleEx(596, 1536.0039, -1667.0995, 13.1044, 179.5686, 0, 1, 30); // lspd AddStaticVehicleEx(523, 1602.3197, -1704.0796, 5.4609, 90.3475, 0, 0, 30); // hpv1000 AddStaticVehicleEx(523, 1545.8175, -1668.0481, 5.4610, 89.3934, 0, 0, 30); // hpv1000 AddStaticVehicleEx(596, 1570.4269, -1710.7415, 5.6099, 359.4638, 0, 1, 30); // lspd AddStaticVehicleEx(596, 1545.3386, -1680.2294, 5.6108, 90.8227, 0, 1, 30); // lspd // Ballas // AddStaticVehicleEx(566, 2050.7302, -1112.2198, 25.2511, 179.3903, 54, 96, 30); // tahoma AddStaticVehicleEx(517, 2092.5071, -1141.2423, 25.4409, 90.3768, 54, 96, 30); // majestic AddStaticVehicleEx(517, 1997.4957, -1119.4990, 26.6240, 238.9880, 54, 96, 30); // majestic AddStaticVehicleEx(566, 2014.4319, -1101.7258, 24.6692, 73.8224, 54, 96, 30); // tahoma AddStaticVehicleEx(471, 2090.8159, -1171.1304, 25.0758, 88.2568, 96, 54, 30); // quad // Vagos // AddStaticVehicleEx(467, 2570.5310, -1032.9722, 69.3204, 177.8111, 6, 1, 30); // oceanic AddStaticVehicleEx(474, 2604.4324, -1069.1321, 69.3482, 6.8428, 6, 1, 30); // hermes AddStaticVehicleEx(467, 2596.6460, -1077.2358, 69.3248, 180.5385, 6, 1, 30); // oceanic AddStaticVehicleEx(576, 2530.5186, -1065.2362, 69.1801, 0.7576, 6, 1, 30); // tornado AddStaticVehicleEx(471, 2629.8889, -1094.3588, 69.0961, 215.4930, 1, 6, 30); // quad AddStaticVehicleEx(576, 2535.4871, -1030.2832, 69.1921, 178.4364, 6, 1, 30); // tornado // Hoodlums // AddStaticVehicleEx(536, 2785.0857, -2455.9561, 13.3718, 89.3076, 102, 102, 30); // blade AddStaticVehicleEx(567, 2736.7261, -2465.7773, 13.5147, 270.4129, 102, 102, 30); // savanna AddStaticVehicleEx(534, 2766.2952, -2386.4956, 13.3560, 178.4640, 102, 96, 30); // remington AddStaticVehicleEx(492, 2736.1907, -2422.0134, 13.4108, 358.4986, 102, 96, 30); // greenwood AddStaticVehicleEx(535, 2784.8284, -2494.3149, 13.4165, 89.4226, 102, 96, 30); // slamvan AddStaticVehicleEx(471, 2785.2021, -2417.9648, 13.1141, 89.5588, 96, 102, 30); // quad // Dealers // AddStaticVehicleEx(567, 2684.5813, -1990.4877, 13.4226, 180.7511, 113, 113, 30); // savanna AddStaticVehicleEx(566, 2787.6191, -1992.1963, 13.1642, 90.1024, 113, 96, 30); // tahoma AddStaticVehicleEx(517, 2774.2568, -1930.2064, 13.2658, 359.4717, 113, 96, 30); // majestic AddStaticVehicleEx(535, 2764.6045, -1958.2736, 13.1780, 180.1994, 113, 96, 30); // slamvan AddStaticVehicleEx(471, 2735.1990, -1936.2517, 13.0279, 89.0335, 96, 113, 30); // quad AddStaticVehicleEx(536, 2772.9712, -1875.9406, 9.5048, 359.7028, 113, 113, 30); // blade // Workers // AddStaticVehicleEx(552, 1292.8713, -1251.0560, 13.2479, 0.1342, 51, 51, 30); // utility AddStaticVehicleEx(489, 1276.5681, -1213.2157, 13.8232, 269.7596, 51, 123, 30); // rancher AddStaticVehicleEx(486, 1277.5309, -1253.9189, 14.3162, 136.6396, 1, 1, 30); // dozer AddStaticVehicleEx(406, 1242.2900, -1266.4226, 14.9331, 270.7672, 1, 1, 30); // dumper AddStaticVehicleEx(524, 1266.7992, -1227.1768, 14.6131, 269.4213, 51, 51, 30); // cement AddStaticVehicleEx(560, 1290.8965, -1213.1510, 13.3845, 180.1363, 51, 51, 30); // sultan //--------------------------------- Random Vehicles ---------------------------- // Respawn after 50 secs except airplanes those are 30 secs AddStaticVehicleEx(515,2001.9824,-1940.0975,14.3743,270.7258,-1,-1,50); // roadtrain_5 AddStaticVehicleEx(515,2206.9868,-2522.4387,14.5869,269.8065,-1,-1,50); AddStaticVehicleEx(515,2099.6655,-2077.5313,14.5885,180.8334,-1,-1,50); AddStaticVehicleEx(515,2432.8206,-2109.6555,14.5652,359.6463,-1,-1,50); AddStaticVehicleEx(515,2500.6555,-2209.1882,14.5620,178.6679,-1,-1,50); AddStaticVehicleEx(450,2061.0474,-1939.7745,13.2006,90.2122,-1,-1,50); // trailer_5 AddStaticVehicleEx(435,2027.0923,-1939.9590,13.2064,269.6728,-1,-1,50); AddStaticVehicleEx(591,2458.3452,-2078.2278,13.2523,180.9549,-1,-1,50); AddStaticVehicleEx(450,2282.8433,-2351.3801,13.2523,224.2315,-1,-1,50); AddStaticVehicleEx(435,2208.4968,-2597.3840,13.2506,270.0967,-1,-1,50); AddStaticVehicleEx(446,2503.8308,-2268.1306,-0.6851,271.0656,-1,-1,50); // squalo_4 AddStaticVehicleEx(446,2443.0024,-2715.0647,-0.2478,270.5447,-1,-1,50); AddStaticVehicleEx(446,2355.9438,-2521.3450,-0.7666,178.3984,-1,-1,50); AddStaticVehicleEx(446,2932.6929,-2057.4172,-0.7016,269.0194,-1,-1,50); AddStaticVehicleEx(592,1488.6454,-2593.2637,14.7407,270.0806,1,1,30); // andromada_2 AddStaticVehicleEx(592,1488.3427,-2493.9607,14.7487,269.9044,1,1,30); AddStaticVehicleEx(519,1823.1643,-2630.5415,14.4654,359.6695,1,1,30); // shamal_2 AddStaticVehicleEx(519,1889.6864,-2629.3171,14.4656,359.4183,1,1,30); AddStaticVehicleEx(513,1856.8051,-2411.1489,14.1093,197.3260,-1,-1,30); // stuntplane_2 AddStaticVehicleEx(513,1814.5001,-2437.5330,14.0975,239.6807,-1,-1,30); AddStaticVehicleEx(553,2050.2764,-2637.4497,14.8787,61.8532,-1,-1,30); // nevada_2 AddStaticVehicleEx(553,1941.2543,-2451.5334,14.8658,128.1360,-1,-1,30); AddStaticVehicleEx(476,2124.6965,-2458.1074,14.2599,120.1050,-1,-1,30); // rustler_3 AddStaticVehicleEx(476,1984.8978,-2638.3120,14.2599,65.0431,-1,-1,30); AddStaticVehicleEx(476,1923.2277,-2241.2700,14.2527,180.2805,-1,-1,30); AddStaticVehicleEx(466,2052.0728,-1694.7084,13.2964,270.0654,16,16,50); // glendale_2 AddStaticVehicleEx(567,2452.3054,-1102.5942,43.0857,357.9726,-1,-1,50); AddStaticVehicleEx(542,2327.4827,-1677.3326,14.1673,269.8396,-1,-1,50); // clover_5 AddStaticVehicleEx(542,2495.2571,-1995.9064,13.2625,179.2733,-1,-1,50); AddStaticVehicleEx(542,2411.0503,-1390.7070,24.0663,359.3449,-1,-1,50); AddStaticVehicleEx(542,2161.7957,-1172.8940,23.5625,90.2493,-1,-1,50); AddStaticVehicleEx(542,1947.4548,-2120.5735,13.2899,269.9948,-1,-1,50); AddStaticVehicleEx(535,1844.4076,-1871.1821,13.1508,359.8899,-1,-1,50); // slamvan_3 AddStaticVehicleEx(535,2192.6365,-1465.4865,25.3018,270.1690,-1,-1,50); AddStaticVehicleEx(535,2853.0518,-1330.1758,10.8295,279.3965,-1,-1,50); AddStaticVehicleEx(536,2399.3892,-1134.3718,29.8696,181.0839,-1,-1,50); // blade_3 AddStaticVehicleEx(536,2373.8125,-1927.3652,13.1202,359.1471,-1,-1,50); AddStaticVehicleEx(536,2025.6007,-1648.8838,13.2912,90.3605,-1,-1,50); AddStaticVehicleEx(534,1921.1251,-1788.4198,13.1127,268.3328,-1,-1,50); // remington_3 AddStaticVehicleEx(534,2822.3770,-1553.1898,10.6504,89.9093,-1,-1,50); AddStaticVehicleEx(534,2426.5911,-1243.1105,23.8694,359.6307,-1,-1,50); AddStaticVehicleEx(576,2817.3174,-1183.5714,24.8551,270.9797,-1,-1,50); // tornado_3 AddStaticVehicleEx(576,2271.0046,-1032.8309,51.4856,136.4009,-1,-1,50); AddStaticVehicleEx(576,2475.3682,-1526.3867,23.6049,359.2925,-1,-1,50); AddStaticVehicleEx(566,2196.5745,-1283.0890,24.1231,179.5897,-1,-1,50); // tahoma_3 AddStaticVehicleEx(566,2052.5330,-1904.4730,13.3282,179.1011,-1,-1,50); AddStaticVehicleEx(566,2390.1199,-1718.7175,13.3790,179.2825,-1,-1,50); AddStaticVehicleEx(567,2229.7876,-1363.0439,23.8577,90.2294,-1,-1,50); // savanna_4 AddStaticVehicleEx(567,2805.7119,-1428.5934,16.1224,178.4703,-1,-1,50); AddStaticVehicleEx(567,2350.7051,-2000.0120,13.2338,359.9185,-1,-1,50); AddStaticVehicleEx(567,2454.1021,-1014.1890,59.6425,176.1889,-1,-1,50); AddStaticVehicleEx(589,2489.2539,-1953.6476,13.0816,1.0010,-1,-1,50); // club_4 AddStaticVehicleEx(589,2694.3064,-1119.9226,69.2362,180.5238,-1,-1,50); AddStaticVehicleEx(589,2164.1445,-1793.6271,13.0189,180.5116,-1,-1,50); AddStaticVehicleEx(589,2256.8760,-1939.6943,13.2044,89.4820,-1,-1,50); AddStaticVehicleEx(492,1964.9985,-1719.2476,15.7505,359.4735,-1,-1,50); // greenwood_4 AddStaticVehicleEx(492,1999.4695,-1275.2704,23.6021,180.5423,-1,-1,50); AddStaticVehicleEx(492,1879.1167,-2020.9791,13.1724,180.6543,-1,-1,50); AddStaticVehicleEx(492,2613.1377,-2380.0427,13.4068,179.5431,-1,-1,50); AddStaticVehicleEx(509,1947.1716,-1991.0991,13.0587,271.1580,-1,-1,50); // bike_6 AddStaticVehicleEx(509,2130.0039,-1595.3577,13.8617,161.5534,-1,-1,50); AddStaticVehicleEx(509,2542.6423,-1354.5869,30.1054,178.9754,-1,-1,50); AddStaticVehicleEx(509,2508.5757,-1773.3990,13.0594,266.9215,-1,-1,50); AddStaticVehicleEx(509,2804.7268,-1252.8588,46.4658,142.1307,-1,-1,50); AddStaticVehicleEx(509,2023.4795,-962.4792,39.2699,21.0140,-1,-1,50); AddStaticVehicleEx(416,2037.2390,-1423.4762,17.1416,180.3667,1,3,50); // ambulance_2 AddStaticVehicleEx(416,1179.3715,-1338.9187,13.9725,271.0954,1,3,50); AddStaticVehicleEx(560,1130.0643,-1689.4120,13.3153,180.3318,-1,-1,50); // sultan_3 AddStaticVehicleEx(560,1040.7117,-1056.4841,31.4088,1.2718,-1,-1,50); AddStaticVehicleEx(560,1657.6219,-1089.1050,23.6119,270.4426,-1,-1,50); AddStaticVehicleEx(560,1012.6143,-1461.4174,13.2568,0.3901,-1,-1,50); AddStaticVehicleEx(579,981.2479,-1306.9004,13.3182,269.4426,-1,-1,50); // huntley_2 AddStaticVehicleEx(579,1098.7172,-1763.8140,13.2781,89.8239,-1,-1,50); AddStaticVehicleEx(521,782.0196,-1612.4509,12.9532,270.1972,-1,-1,50); // fcr900_3 AddStaticVehicleEx(521,1183.8922,-1263.9352,14.7461,181.1518,-1,-1,50); AddStaticVehicleEx(521,1279.5542,-1667.3218,13.1171,179.6212,-1,-1,50); AddStaticVehicleEx(521,1712.7981,-1005.5743,23.4843,171.1206,-1,-1,50); AddStaticVehicleEx(451,1464.1157,-903.3469,54.5425,0.0953,-1,-1,50); // turismo_1 AddStaticVehicleEx(411,1517.6372,-694.6029,94.4771,89.4996,-1,-1,50); // infernus_2 AddStaticVehicleEx(411,1193.0533,-1020.2946,32.2740,186.7821,-1,-1,50); AddStaticVehicleEx(541,1100.1062,-820.5209,86.5702,115.0450,-1,-1,50); // bullet_2 AddStaticVehicleEx(541,1640.6359,-1281.9531,14.4353,256.6248,-1,-1,50); AddStaticVehicleEx(477,1231.4021,-1020.1202,32.3558,187.0757,-1,-1,50); // zr350_3 AddStaticVehicleEx(477,826.6736,-1545.4895,13.3071,270.2256,-1,-1,50); AddStaticVehicleEx(477,1503.8798,-1321.1948,13.9002,0.7865,-1,-1,50); AddStaticVehicleEx(426,1108.3026,-1024.7616,31.6530,181.6333,-1,-1,50); // premier_1 AddStaticVehicleEx(507,1001.4642,-1105.2848,23.6533,91.1393,-1,-1,50); // elegant_1 AddStaticVehicleEx(402,1658.9725,-1695.1852,20.2898,180.1059,-1,-1,50); // buffalo_3 AddStaticVehicleEx(402,2010.6484,-2203.4685,13.3786,0.4120,-1,-1,50); AddStaticVehicleEx(402,2102.4797,-1273.2668,25.3218,179.2833,-1,-1,50); AddStaticVehicleEx(437,1749.3578,-1858.4083,13.5473,270.0417,-1,-1,50); // coach_2 AddStaticVehicleEx(437,2676.8569,-1673.6639,9.5299,179.6113,-1,-1,50); AddStaticVehicleEx(561,1401.4670,-2347.9583,13.3526,359.3793,-1,-1,50); // stratum_2 AddStaticVehicleEx(561,957.8749,-1449.3049,13.3096,271.0958,-1,-1,50); AddStaticVehicleEx(558,1401.4198,-2225.3242,13.1763,179.6696,-1,-1,50); // uranus_1 AddStaticVehicleEx(420,1691.5933,-2250.2534,13.1612,90.2945,6,1,50); // taxi_2 AddStaticVehicleEx(420,1674.1932,-2322.7227,13.1630,269.8391,6,1,50); AddStaticVehicleEx(500,977.2274,-1847.8711,12.4171,88.1356,-1,-1,50); // mesa_2 AddStaticVehicleEx(500,741.0170,-1866.4719,4.8683,240.8761,-1,-1,50); AddStaticVehicleEx(596,1015.7095,-1354.9799,13.0935,90.0699,0,1,50); // lspd_1 AddStaticVehicleEx(444,1245.8824,-2022.2595,60.2011,269.7729,-1,-1,50); // monster_2 AddStaticVehicleEx(444,1273.3865,-2010.0261,59.4094,180.2513,-1,-1,50); AddStaticVehicleEx(448,2116.2781,-1822.6934,13.1571,270.2033,3,6,50); // pizzaboy_2 AddStaticVehicleEx(448,2124.0410,-1795.8849,13.1502,0.1300,3,6,50); AddStaticVehicleEx(518,2116.8557,-1783.0336,13.0587,359.6252,-1,-1,50); // buccaneer_3 AddStaticVehicleEx(518,2706.6162,-1843.0298,9.1662,158.7779,-1,-1,50); AddStaticVehicleEx(518,2398.7065,-1545.8726,23.6661,270.0880,-1,-1,50); AddStaticVehicleEx(400,1358.4578,-1752.2974,13.4604,90.1414,-1,-1,50); // landstalker_2 AddStaticVehicleEx(400,1468.4294,-1232.5582,13.7444,89.0040,-1,-1,50); AddStaticVehicleEx(581,2236.3997,-1637.8600,15.1748,159.7275,-1,-1,50); // bf400_4 AddStaticVehicleEx(581,2633.3040,-1221.5355,49.6119,358.8300,-1,-1,50); AddStaticVehicleEx(581,2177.1533,-993.3595,62.5770,167.8490,-1,-1,50); AddStaticVehicleEx(581,2098.6597,-1359.5281,23.5625,270.9590,-1,-1,50); AddStaticVehicleEx(581,1214.8021,-1470.3621,13.1436,90.1879,-1,-1,50); AddStaticVehicleEx(481,1946.7832,-1364.9180,18.0948,124.3683,-1,-1,50); // bmx_3 AddStaticVehicleEx(481,1883.9183,-1369.9069,13.0857,138.9769,-1,-1,50); AddStaticVehicleEx(481,1915.8243,-1437.6688,13.0706,230.1378,-1,-1,50); AddStaticVehicleEx(475,1696.4769,-1508.5443,13.1852,359.2828,-1,-1,50); // sabre_3 AddStaticVehicleEx(475,1627.3304,-1038.1265,23.7035,359.3652,-1,-1,50); AddStaticVehicleEx(475,1910.5804,-1115.8199,25.4690,179.9177,-1,-1,50); AddStaticVehicleEx(588,1775.8020,-1896.7933,13.2893,180.6083,1,1,50); // hotdog_1 AddStaticVehicleEx(423,2861.8750,-1951.5374,10.9619,0.4270,-1,-1,50); // mrwhoopee_1 AddStaticVehicleEx(455,2174.1794,-2266.8301,13.8141,225.1139,-1,-1,50); // flatbed_3 AddStaticVehicleEx(455,2506.7410,-2627.9053,14.0830,89.6795,-1,-1,50); AddStaticVehicleEx(455,2515.9543,-2355.0374,14.0669,226.4995,-1,-1,50); AddStaticVehicleEx(483,1279.7465,-1815.5831,13.3775,90.2054,-1,-1,50); // camper_3 AddStaticVehicleEx(483,1951.4786,-1563.3632,13.6084,134.7018,-1,-1,50); AddStaticVehicleEx(483,2534.2007,-1474.1321,23.9917,269.1452,-1,-1,50); AddStaticVehicleEx(522,1425.6019,-1313.0128,13.1256,359.1056,-1,-1,50); // nrg500_3 AddStaticVehicleEx(522,2819.5659,-1454.4861,39.6325,89.2029,-1,-1,50); AddStaticVehicleEx(522,1560.6329,-2321.9302,13.1249,268.9026,-1,-1,50); // for (new t=0; t<MAX_TURFS; t++) { GangZoneCreate( turfs[ t ][zMinX], turfs[ t ][zMinY], turfs[ t ][zMaxX], turfs[ t ][zMaxY] ); for (new teams=0; teams<MAX_TEAMS; teams++) TurfInfo[ t ][ teams ][ MIT ]=0; } // for(new x=0; x<=100; x++) gDropPickup[x] = -1; SetTimer( "MoneyTimer", 1000, 1 ); SetTimer( "checkpointUpdate", 1100, 1 ); SetTimer( "CheckPlayers", 10000, 1 ); SetTimer( "TimeUpdate", 60009, 1 ); SetTimer( "SavedUpdate", 60017, 1 ); return 1; } //================================================== ============================ public getCheckpointType( playerID ) { return checkpointType[ playerCheckpoint[playerID] ]; } //================================================== ============================ public isPlayerInArea(playerID, Float:data[4]) { new Float:X, Float:Y, Float:Z; GetPlayerPos(playerID, X, Y, Z); if(X >= data[0] && X <= data[2] && Y >= data[1] && Y <= data[3]) { return 1; } return 0; } //================================================== ============================ public IsPlayerInTurf(playerid,Float:min_x,Float:min_y,Fl oat:max_x,Float:max_y) { new Float:X,Float:Y,Float:Z; GetPlayerPos(playerid, X, Y, Z); if((X <= max_x && X >= min_x) && (Y <= max_y && Y >= min_y)) return 1; return 0; } //================================================== ============================ public checkpointUpdate( ) { for(new i=0; i<SLOTS; i++) { if(IsPlayerConnected(i)) { for(new j=0; j < MAX_POINTS; j++) { if(isPlayerInArea(i, checkCoords[j])) { if(playerCheckpoint[i]!=j) { DisablePlayerCheckpoint(i); SetPlayerCheckpoint(i, checkpoints[j][0],checkpoints[j][1],checkpoints[j][2],checkpoints[j][3]); playerCheckpoint[i] = j; } } else { if(playerCheckpoint[i]==j) { DisablePlayerCheckpoint(i); playerCheckpoint[i] = 999; } } } } } } //================================================== ============================ public SavedUpdate( ) { for(new i = 0; i < MAX_SAVE; i++) { if(savedInfo[i][2] < 5) { if(savedInfo[i][2]==3) { savedInfo[i][0]=savedInfo[i][1]=0; savedNames[i][0]=0; } savedInfo[i][2]++; } } } //================================================== ============================ public MoneyTimer( ) { for ( new playerid = 0, mp = GetMaxPlayers( ); playerid < mp; playerid++ ) { if ( !IsPlayerConnected( playerid ) ) continue; new pMoney = GetPlayerMoney( playerid ); if ( !lSMoney[ playerid ] && pMoney > ( lTMoney[ playerid ] + 1499 ) ) { GetPlayerPos( playerid, X250[ playerid ], Y250[ playerid ], Z250[ playerid ] ); if (X250[playerid] >= 1924.0562 && X250[playerid] <= 2019.0679 && Y250[playerid] >= 967.1267 && Y250[playerid] <= 1029.9370 ) { new tString[ 128 ]; GetPlayerName( playerid, tString, MAX_PLAYER_NAME ); format( tString, 128, "* %s's (%d) cash just increased by $%d (from $%d to $%d | Location: 4Dragons)", tString, playerid, pMoney - lTMoney[ playerid ], lTMoney[ playerid ],pMoney ); SendAdminMessage( COLOR_ORANGE, tString ); } else if (X250[playerid] >= 2147.1572 && X250[playerid] <= 2259.6709 && Y250[playerid] >= 1573.1588 && Y250[playerid] <= 1714.0790 ) { new tString[ 128 ]; GetPlayerName( playerid, tString, MAX_PLAYER_NAME ); format( tString, 128, "* %s's (%d) cash just increased by $%d (from $%d to $%d | Location: Caligulas)", tString, playerid, pMoney - lTMoney[ playerid ], lTMoney[ playerid ],pMoney ); SendAdminMessage( COLOR_ORANGE, tString ); } else { new tString[ 128 ]; GetPlayerName( playerid, tString, MAX_PLAYER_NAME ); format( tString, 128, "* %s's (%d) cash just increased by $%d (from $%d to $%d | Location: Unknown)", tString, playerid, pMoney - lTMoney[ playerid ], lTMoney[ playerid ],pMoney ); SendAdminMessage( COLOR_ORANGE, tString ); } } // Set the last script money to the current // real money (to stop the increase showing many times). lTMoney[ playerid ] = pMoney; lSMoney[ playerid ] = 0; } } //================================================== ============================ public OnPlayerConnect( playerid ) { new playrname[ MAX_PLAYER_NAME ], string[ 256 ]; SetPlayerColor( playerid, COLOR_INACTIVE ); GameTextForPlayer( playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~w~Los Santos Turf Wars", 5000, 3 ); SendClientMessage( playerid, COLOR_RED, "Welcome to Los Santos Turf Wars, type /help for more info." ); GetPlayerName(playerid, playrname, sizeof(playrname)); format(string, 256, "*** %s(ID: %d) has joined the server.", playrname, playerid); SendClientMessageToAll( COLOR_INACTIVE, string ); // SendDeathMessage( INVALID_PLAYER_ID, playerid, 200 ); // Connect message in kill chart playerCheckpoint[ playerid ] =999; AllowPlayerTeleport( playerid, 0 ); SetPlayerWantedLevel( playerid, 0 ); TeamKills[ playerid ] =0; Spawned [ playerid ] =0; ShowPM[ playerid ] =0; ShowTPM[ playerid ] =0; PlayerOnDuty[ playerid ]=0; lTMoney[ playerid ] = 0; lSMoney[ playerid ] = 0; GetPlayerName(playerid, playrname, sizeof(playrname)); for(new i = 0; i < MAX_SAVE; i++) { if(isStringSame(savedNames[i], playrname, MAX_PLAYER_NAME)) { bounty[playerid] = savedInfo[i][0]; savedInfo[i][0]=savedInfo[i][1]=0; savedNames[i][0]=0; for(new j = 0; j < MAX_WEAPONS; j++) { playerWeapons[playerid][j]=savedWeapons[i][j]; savedWeapons[i][j]=0; } } } for (new i = 0; i < MAX_TURFS; i++) GangZoneShowForPlayer(playerid, turfs[ i ][turfID], turfs[ i ][TurfColor]); return 1; } //================================================== ============================ public OnPlayerDisconnect( playerid, reason ) { new playername[ MAX_PLAYER_NAME ]; GetPlayerName(playerid, playername, sizeof(playername)); SendDeathMessage(INVALID_PLAYER_ID, playerid, 201); //Save temp info for timeouts/crashes GetPlayerName(playerid, playername, sizeof(playername)); format(savedNames[savePos], MAX_PLAYER_NAME, "%s",playername); savedInfo[savePos][0] = bounty[playerid]; savedInfo[savePos][1] = 0; for(new i = 0; i < MAX_WEAPONS; i++) savedWeapons[savePos][i]=playerWeapons[playerid][i]; // savePos++; if(savePos >= MAX_SAVE) savePos = 0; bounty[playerid] = 0; for(new i = 0; i < MAX_WEAPONS;i++) { playerWeapons[playerid][i]=0; } SetPlayerColor( playerid, COLOR_INACTIVE ); } //================================================== ============================ public OnPlayerRequestClass( playerid, classid ) { SetPlayerClass( playerid, classid ); SetPlayerColor( playerid, COLOR_INACTIVE ); PlayerPlaySound( playerid, 1068, 0.0, 0.0, 0.0 ); switch(classid) { case 0..3: { SetPlayerPos(playerid,1810.5295,-2103.0408,13.5469); SetPlayerCameraPos(playerid,1814.3398,-2100.5222,13.5469); SetPlayerCameraLookAt(playerid,1810.5295,-2103.0408,13.5469); SetPlayerFacingAngle(playerid,300.0); GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Aztecas", 3000, 3); ApplyAnimation(playerid,"RIOT", "RIOT_ANGRY",4.0,1,1,1,1,1); } case 4..7: { SetPlayerPos(playerid,2654.5081,-1063.5448,69.5937); SetPlayerCameraPos(playerid,2658.3940,-1060.7126,69.5209); SetPlayerCameraLookAt(playerid,2654.5081,-1063.5448,69.5937); SetPlayerFacingAngle(playerid,300.0); GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Vagos", 3000, 3); ApplyAnimation(playerid,"RIOT", "RIOT_CHANT",4.0,1,1,1,1,1); } case 8..11: { SetPlayerPos(playerid,1979.8929,-1143.1704,25.985; SetPlayerCameraPos(playerid,1975.8948,-1145.9689,25.9895); SetPlayerCameraLookAt(playerid,1979.8929,-1143.1704,25.985; SetPlayerFacingAngle(playerid,120.0); GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Ballas", 3000, 3); ApplyAnimation(playerid,"GHANDS", "gsign2LH",4.0,1,1,1,1,1); } case 12..15: { SetPlayerPos(playerid,2498.2249,-1644.6326,18.8751); SetPlayerCameraPos(playerid,2498.2676,-1640.1935,18.6116); SetPlayerCameraLookAt(playerid,2498.2249,-1644.6326,18.8751); SetPlayerFacingAngle(playerid,0.0); GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Orange Grove Families", 3000, 3); ApplyAnimation(playerid,"LOWRIDER", "RAP_B_Loop",4.0,1,1,1,1,1); } case 16..19: { SetPlayerPos(playerid,2785.7817,-1956.1940,20.4537); SetPlayerCameraPos(playerid,2791.5693,-1956.3384,21.3124); SetPlayerCameraLookAt(playerid,2785.7817,-1956.1940,20.4537); SetPlayerFacingAngle(playerid,270.0); GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Dealers", 3000, 3); ApplyAnimation(playerid,"DEALER", "DEALER_IDLE",4.0,1,1,1,1,1); } case 20..23: { SetPlayerPos(playerid,1524.5602,-1581.9534,23.5469); SetPlayerCameraPos(playerid,1524.6063,-1577.8397,23.5469); SetPlayerCameraLookAt(playerid,1524.5602,-1581.9534,23.5469); SetPlayerFacingAngle(playerid,0.0); GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Cops", 3000, 3); ApplyAnimation(playerid,"ped", "ARRESTgun", 4.0, 0, 1, 1, 1, -1); } case 24..27: { SetPlayerPos(playerid,953.6748,-1696.7352,20.3672); SetPlayerCameraPos(playerid,958.7288,-1701.0875,20.9513); SetPlayerCameraLookAt(playerid,953.6748,-1696.7352,20.3672); SetPlayerFacingAngle(playerid,225.0); GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Bikers", 3000, 3); ApplyAnimation(playerid,"GANGS", "Invite_Yes",4.0,1,1,1,1,1); } case 28..31: { SetPlayerPos(playerid,1288.2465,-800.1273,96.4609); SetPlayerCameraPos(playerid,1285.2930,-795.5814,96.4609); SetPlayerCameraLookAt(playerid,1288.2465,-800.1273,96.4609); SetPlayerFacingAngle(playerid,20.0); GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Rappers", 3000, 3); ApplyAnimation(playerid,"LOWRIDER", "RAP_A_Loop",4.0,1,1,1,1,1); } case 32..35: { SetPlayerPos(playerid,2080.7639,-2377.9961,18.4061); SetPlayerCameraPos(playerid,2082.9263,-2373.7207,18.4061); SetPlayerCameraLookAt(playerid,2080.7639,-2377.9961,18.4061); SetPlayerFacingAngle(playerid,325.0); GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Guards", 3000, 3); ApplyAnimation(playerid,"COP_AMBIENT", "Coplook_think",4.0,1,1,1,1,1); } case 36..39: { SetPlayerPos(playerid,2752.8835,-2513.6389,25.7914); SetPlayerCameraPos(playerid,2753.1050,-2519.0244,26.6926); SetPlayerCameraLookAt(playerid,2752.8835,-2513.6389,25.7914); SetPlayerFacingAngle(playerid,180.0); GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Hoodlums", 3000, 3); ApplyAnimation(playerid,"GYMNASIUM", "GYMshadowbox",4.0,1,1,1,1,1); } case 40..43: { SetPlayerPos(playerid,1262.5465,-1260.1057,13.2015); SetPlayerCameraPos(playerid,1265.7855,-1262.5286,13.2771); SetPlayerCameraLookAt(playerid,1262.5465,-1260.1057,13.2015); SetPlayerFacingAngle( playerid,230.0 ); GameTextForPlayer( playerid, "~n~~n~~n~~n~~n~~n~~n~~n~~n~~y~Workers", 3000, 3 ); ApplyAnimation( playerid, "STRIP", "PUN_HOLLER", 4.0, 1, 1, 1, 1, 1 ); } } return 1; } //================================================== ============================ SetPlayerClass(playerid, classid) { switch(classid) { case 0..3: gTeam[playerid] = TEAM_AZTECAS; case 4..7: gTeam[playerid] = TEAM_VAGOS; case 8..11: gTeam[playerid] = TEAM_BALLAS; case 12..15: gTeam[playerid] = TEAM_GROVE; case 16..19: gTeam[playerid] = TEAM_DEALERS; case 20..23: gTeam[playerid] = TEAM_COPS; case 24..27: gTeam[playerid] = TEAM_BIKERS; case 28..31: gTeam[playerid] = TEAM_RAPPERS; case 32..35: gTeam[playerid] = TEAM_GUARDS; case 36..39: gTeam[playerid] = TEAM_HOODLUMS; case 40..43: gTeam[playerid] = TEAM_WORKERS; } } //================================================== ============================ public OnPlayerSpawn(playerid) { new rand = random( 5 ); SetPlayerInterior( playerid, 0 ); SetPlayerToTeamColor( playerid ); TeamFix( ); SetPlayerHealth( playerid, 100 ); Spawned[ playerid ] =1; FlashZoneForPlayer( playerid ); PlayerPlaySound( playerid, 1069, 0.0, 0.0, 0.0) ; SetCameraBehindPlayer( playerid ); switch(gTeam[playerid]) { case TEAM_AZTECAS: { SetPlayerPos(playerid,gAztecasSP[rand][0],gAztecasSP[rand][1],gAztecasSP[rand][2]); SetPlayerFacingAngle(playerid,gAztecasSP[rand][3]); } case TEAM_VAGOS: { SetPlayerPos(playerid,gVagosSP[rand][0],gVagosSP[rand][1],gVagosSP[rand][2]); SetPlayerFacingAngle(playerid,gVagosSP[rand][3]); } case TEAM_BALLAS: { SetPlayerPos(playerid,gBallasSP[rand][0],gBallasSP[rand][1],gBallasSP[rand][2]); SetPlayerFacingAngle(playerid,gBallasSP[rand][3]); } case TEAM_GROVE: { SetPlayerPos(playerid,gGroveSP[rand][0],gGroveSP[rand][1],gGroveSP[rand][2]); SetPlayerFacingAngle(playerid,gGroveSP[rand][3]); } case TEAM_DEALERS: { SetPlayerPos(playerid,gDealersSP[rand][0],gDealersSP[rand][1],gDealersSP[rand][2]); SetPlayerFacingAngle(playerid,gDealersSP[rand][3]); } case TEAM_COPS: { SetPlayerPos(playerid,gCopsSP[rand][0],gCopsSP[rand][1],gCopsSP[rand][2]); SetPlayerFacingAngle(playerid,gCopsSP[rand][3]); } case TEAM_BIKERS: { SetPlayerPos(playerid,gBikersSP[rand][0],gBikersSP[rand][1],gBikersSP[rand][2]); SetPlayerFacingAngle(playerid,gBikersSP[rand][3]); } case TEAM_RAPPERS: { SetPlayerPos(playerid,gRappersSP[rand][0],gRappersSP[rand][1],gRappersSP[rand][2]); SetPlayerFacingAngle(playerid,gRappersSP[rand][3]); } case TEAM_GUARDS: { SetPlayerPos(playerid,gGuardsSP[rand][0],gGuardsSP[rand][1],gGuardsSP[rand][2]); SetPlayerFacingAngle(playerid,gGuardsSP[rand][3]); } case TEAM_HOODLUMS: { SetPlayerPos(playerid,gHoodlumsSP[rand][0],gHoodlumsSP[rand][1],gHoodlumsSP[rand][2]); SetPlayerFacingAngle(playerid,gHoodlumsSP[rand][3]); } case TEAM_WORKERS: { SetPlayerPos(playerid,gWorkersSP[rand][0],gWorkersSP[rand][1],gWorkersSP[rand][2]); SetPlayerFacingAngle(playerid,gWorkersSP[rand][3]); } } for (new i = 0; i < MAX_WEAPONS; i++) { if (playerWeapons[playerid][ i ] > 0) { GivePlayerWeapon(playerid, weaponIDs[ i ], weaponAmmo[ i ]*playerWeapons[playerid][ i ]); } } if (PlayerOnDuty[playerid] == 1) SetPlayerColor(playerid, COLOR_WHITE); return 1; } //================================================== ============================ SetPlayerToTeamColor(playerid) { switch(gTeam[playerid]) { case TEAM_AZTECAS: SetPlayerColor( playerid, AZTECAS_COLOR); case TEAM_VAGOS: SetPlayerColor( playerid, VAGOS_COLOR); case TEAM_BALLAS: SetPlayerColor( playerid, BALLAS_COLOR); case TEAM_GROVE: SetPlayerColor( playerid, GROVE_COLOR); case TEAM_DEALERS: SetPlayerColor( playerid, DEALERS_COLOR); case TEAM_COPS: SetPlayerColor( playerid, COPS_COLOR); case TEAM_BIKERS: SetPlayerColor( playerid, BIKERS_COLOR); case TEAM_RAPPERS: SetPlayerColor( playerid, RAPPERS_COLOR); case TEAM_GUARDS: SetPlayerColor( playerid, GUARDS_COLOR); case TEAM_HOODLUMS: SetPlayerColor( playerid, HOODLUMS_COLOR); case TEAM_WORKERS: SetPlayerColor( playerid, WORKERS_COLOR); } } //================================================== ============================ public TeamFix( ) { for (new i; i < SLOTS; i++) { switch(gTeam[ i ]) { case TEAM_AZTECAS: { SetPlayerTeam( i, 999 ); SetPlayerTeam( i, 0 ); } case TEAM_VAGOS: { SetPlayerTeam( i, 998 ); SetPlayerTeam( i, 1 ); } case TEAM_BALLAS: { SetPlayerTeam( i, 997 ); SetPlayerTeam( i, 2 ); } case TEAM_GROVE: { SetPlayerTeam( i, 996 ); SetPlayerTeam( i, 3 ); } case TEAM_DEALERS: { SetPlayerTeam( i, 995 ); SetPlayerTeam( i, 4 ); } case TEAM_COPS: { SetPlayerTeam( i, 994 ); SetPlayerTeam( i, 5 ); } case TEAM_BIKERS: { SetPlayerTeam( i, 993 ); SetPlayerTeam( i, 6 ); } case TEAM_RAPPERS: { SetPlayerTeam( i, 992 ); SetPlayerTeam( i, 7 ); } case TEAM_GUARDS: { SetPlayerTeam( i, 991 ); SetPlayerTeam( i, 8 ); } case TEAM_HOODLUMS:{ SetPlayerTeam( i, 990 ); SetPlayerTeam( i, 9 ); } case TEAM_WORKERS: { SetPlayerTeam( i, 989 ); SetPlayerTeam( i, 10 ); } } } } //================================================== ============================ FlashZoneForPlayer( playerid ) { for (new i = 0; i < MAX_TURFS; i++) { if (turfs[ i ][ TurfWarStarted ] == 1) { if (gTeam[playerid] == turfs[ i ][ TurfAttacker ]) GangZoneFlashForPlayer( playerid, i, COLOR_FLASH ); else if (gTeam[playerid] == turfs[ i ][ TurfOwner ]) GangZoneFlashForPlayer( playerid, i, COLOR_FLASH ); else GangZoneFlashForPlayer( playerid, i, COLOR_FLASH2 ); } } } //================================================== ============================ public OnPlayerDeath( playerid, killerid, reason ) { new killedplayer[ MAX_PLAYER_NAME ]; new Float, Float:y, Float:z; new string[ 256 ]; Spawned[ playerid ] =0; SetPlayerArmour( playerid, 0 ); if (killerid == INVALID_PLAYER_ID) { SendDeathMessage( INVALID_PLAYER_ID, playerid, reason ); SetPlayerWantedLevel( playerid, 0 ); TeamInfo[ gTeam[playerid] ][ HomiesDied ]++; TeamInfo[ gTeam[playerid] ][ TeamScore ]--; } else { SendDeathMessage( killerid, playerid, reason ); #if DROP_WEAPONS if (!GetPlayerInterior(playerid) && !IsPlayerInAnyVehicle(playerid)) DropPlayerWeapons(playerid); #endif if (gTeam[ killerid ] != gTeam[ playerid ]) // Valid kill { SetPlayerScore( killerid, GetPlayerScore( killerid ) +1 ); GivePlayerMoney( killerid, 500 ); SetPlayerWantedLevel( killerid, GetPlayerWantedLevel( killerid )+1 ); TeamInfo[ gTeam[killerid] ][ RivalsKilled ]++; TeamInfo[ gTeam[playerid] ][ HomiesDied ]++; TeamInfo[ gTeam[killerid] ][ TeamScore ]++; TeamInfo[ gTeam[playerid] ][ TeamScore ]--; //----------------------------- player was killed in a turf? ------------------- GetPlayerPos(playerid, x, y, z); GetPlayerPos(killerid, x, y, z); for (new i = 0; i < MAX_TURFS; i++) { if (IsPlayerInTurf(playerid, turfs[i][zMinX], turfs[i][zMinY], turfs[i][zMaxX], turfs[i][zMaxY]) && IsPlayerInTurf(killerid, turfs[i][zMinX], turfs[i][zMinY], turfs[i][zMaxX], turfs[i][zMaxY]) ) { if (turfs[ i ][ TurfWarStarted ] != 1 && !IsPlayerInAnyVehicle(killerid)) { TurfInfo[ i ][ gTeam[killerid] ][ TurfKills ]++; if (TurfInfo[ i ][ gTeam[killerid] ][ TurfKills ] == ATTACK_KILLS) { if (turfs[ i ][ TurfOwner ] == gTeam[killerid]) { for (new a=0; a<MAX_TEAMS; a++) { TurfInfo[ i ][ a ][ TurfKills ] =0; } return 1; } turfs[ i ][ TurfAttacker ] = gTeam[killerid]; for (new b=0; b<SLOTS; b++) { if (gTeam[ b ] == turfs[ i ][ TurfAttacker ]) { new msg1[ 256 ]; format(msg1,sizeof(msg1), "~w~We have provoked a turfwar ~w~in ~y~%s ~w~against the ~r~%s", turfs[ i ][ turfName ], TeamInfo[ turfs[ i ][ TurfOwner ] ][ TeamName ]); new Text:txt1 = TextDrawCreate( 200.0, 385.0, msg1 ); TextDrawFont( txt1, 0 ); TextDrawSetShadow( txt1, 0 ); TextDrawSetOutline( txt1, 1 ); TextDrawColor( txt1, 0xDFDFDFFF ); TimeTextForPlayer( b, txt1, 6000 ); GangZoneFlashForPlayer( b, turfs[ i ][turfID], COLOR_FLASH ); } else if (gTeam[b] == turfs[ i ][ TurfOwner ]) { new msg2[ 256 ]; format(msg2,sizeof(msg2), "~r~The ~y~%s ~r~have attacked our turf in ~y~%s!", TeamInfo[ turfs[ i ][ TurfAttacker ] ][ TeamName ], turfs[ i ][ turfName ]); new Text:txt2 = TextDrawCreate( 200.0, 370.0, msg2 ); TextDrawFont( txt2, 0 ); TextDrawSetShadow( txt2, 0 ); TextDrawSetOutline( txt2, 1 ); TextDrawColor( txt2, COLOR_RED ); TimeTextForPlayer( b, txt2, 6000 ); GangZoneFlashForPlayer( b, turfs[ i ][turfID], COLOR_FLASH ); } else GangZoneFlashForPlayer( b, turfs[ i ][turfID], COLOR_FLASH2 ); } SetTimerEx("EndWar", ATTACK_TIME, false ,"iii", i, turfs[ i ][ TurfAttacker ], turfs[ i ][ TurfOwner ] ); turfs[ i ][ TurfWarStarted ] =1; for(new c=0; c<MAX_TEAMS; c++) { TurfInfo[ i ][ c ][ TurfKills ] =0; TurfInfo[ i ][ c ][ TurfAttackKills ] =0; } return 1; } } else if (turfs[ i ][ TurfWarStarted ] == 1 && !IsPlayerInAnyVehicle(killerid) && (turfs[ i ][ TurfAttacker ] == gTeam[killerid]) || turfs[ i ][ TurfOwner ] == gTeam[killerid]) { TurfInfo[ i ][ gTeam[killerid] ][ TurfAttackKills ]++; } } } //------------------------ Was there a bounty on players head ------------------- if (bounty[ playerid ] > 0) { GetPlayerName( playerid, killedplayer, sizeof( killedplayer ) ); format(string, sizeof(string), "* Bounty reward: %d for killing %s.", bounty[playerid], killedplayer); SendClientMessage( killerid, COLOR_YELLOW, string ); GivePlayerMoney( killerid, bounty[ playerid ] ); bounty[ playerid ] = 0; } //------------------------ Did player had a wanted level ----------------------- if (GetPlayerWantedLevel( playerid ) > 0) { switch( GetPlayerWantedLevel( playerid ) ) { case 1: { SendClientMessage( killerid, COLOR_YELLOW, "* Bonus for killing a player with a wanted level: $1000 + 1 point." ); GivePlayerMoney( killerid, 1000 ); SetPlayerScore( killerid, GetPlayerScore( killerid ) +1 ); SetPlayerWantedLevel( playerid, 0 ); } case 2: { SendClientMessage( killerid, COLOR_YELLOW, "* Bonus for killing a player with a wanted level: $2000 + 2 points." ); GivePlayerMoney( killerid, 2000); SetPlayerScore( killerid, GetPlayerScore( killerid ) +2 ); SetPlayerWantedLevel( playerid, 0 ); } case 3: { SendClientMessage( killerid, COLOR_YELLOW, "* Bonus for killing a player with a wanted level: $3000 + 3 points." ); GivePlayerMoney( killerid, 3000 ); SetPlayerScore( killerid, GetPlayerScore( killerid ) +3 ); SetPlayerWantedLevel( playerid, 0 ); } case 4: { SendClientMessage( killerid, COLOR_YELLOW, "* Bonus for killing a player with a wanted level: $4000 + 4 points." ); GivePlayerMoney( killerid, 4000 ); SetPlayerScore( killerid, GetPlayerScore( killerid ) +4 ); SetPlayerWantedLevel( playerid, 0 ); } case 5: { SendClientMessage( killerid, COLOR_YELLOW, "* Bonus for killing a player with a wanted level: $5000 + 5 points." ); GivePlayerMoney( killerid, 5000 ); SetPlayerScore( killerid, GetPlayerScore( killerid ) +5 ); SetPlayerWantedLevel( playerid, 0 ); } case 6..200: { SendClientMessage( killerid, COLOR_YELLOW, "* Bonus for killing a player with a wanted level: $6000 + 6 points." ); GivePlayerMoney( killerid, 6000 ); SetPlayerScore( killerid, GetPlayerScore( killerid ) +6 ); SetPlayerWantedLevel( playerid, 0 ); } } } //------------------------------------------------------------------------------ } else //Team Killer! { new warning[ 256 ]; format( warning, sizeof( warning ), "* Be careful! No teamkilling." ); SendClientMessage( killerid, COLOR_RED, warning ); TeamKills[ killerid ]++; if (TeamKills[ killerid ] == 3) { SetPlayerInterior( killerid, 6 ); SetPlayerPos( killerid, 264.6296, 77.1372, 1001.0390); ResetPlayerWeapons( killerid ); GivePlayerMoney( killerid, -2500 ); SetPlayerScore( killerid, GetPlayerScore( killerid ) -5 ); SendClientMessage( killerid, COLOR_RED, "*** You've been jailed for teamkilling!" ); TeamKills[ killerid ] = 0; } } } return 1; } //================================================== ============================ public CheckPlayers( ) { new Float, Float:y, Float:z; for (new i = 0; i < MAX_TURFS; i++) { for (new c = 0; c < MAX_TEAMS; c++) TurfInfo[ i ][ c ][ MIT ]=0; for (new b=0; b<SLOTS; b++) { if (Spawned[b] == 1 && !GetPlayerInterior(b)) { GetPlayerPos(b, x, y, z); if (IsPlayerInTurf(b, turfs[i][zMinX], turfs[i][zMinY], turfs[i][zMaxX], turfs[i][zMaxY])) { if (turfs[ i ][ TurfWarStarted ] != 1 && gTeam[b] != turfs[i][TurfOwner]) { TurfInfo[ i ][ gTeam[b] ][ MIT ]++; if (TurfInfo[ i ][ gTeam[b] ][ MIT ] >= MEMBERS_NEEDED) { if (TimerStarted[i] != 1) { TimerStarted[i] = 1; SetTimerEx("StartWar", STANDINTURF_TIME, 0, "ii", i, gTeam[b]); } } } } } } } } //================================================== ============================ public StartWar( turf, attacker ) { new Float, Float:y, Float:z; TimerStarted[turf] = 0; for (new c=0; c<MAX_TEAMS; c++) { TurfInfo[ turf ][ c ][ TurfKills ] =0; TurfInfo[ turf ][ c ][ TurfAttackKills ] =0; TurfInfo[ turf ][ c ][ MIT ]=0; } for (new id=0; id<SLOTS; id++) { if (Spawned[id] == 1 && !GetPlayerInterior(id)) { GetPlayerPos(id, x, y, z); if (IsPlayerInTurf(id, turfs[turf][zMinX], turfs[turf][zMinY], turfs[turf][zMaxX], turfs[turf][zMaxY])) { if (turfs[ turf ][ TurfWarStarted ] != 1) { if (gTeam[id] == attacker) { TurfInfo[ turf ][ attacker ][ MIT ]++; if (TurfInfo[ turf ][ attacker ][ MIT ] >= MEMBERS_NEEDED) { turfs[ turf ][ TurfAttacker ] = attacker; for (new t=0; t<SLOTS; t++) { if (gTeam[ t ] == turfs[ turf ][ TurfAttacker ]) { new msg1[ 256 ]; format(msg1,sizeof(msg1), "~w~We have provoked a turfwar ~w~in ~y~%s ~w~against the ~r~%s", turfs[ turf ][ turfName ], TeamInfo[ turfs[ turf ][ TurfOwner ] ][ TeamName ]); new Text:txt1 = TextDrawCreate( 200.0, 385.0, msg1 ); TextDrawFont( txt1, 0 ); TextDrawSetShadow( txt1, 0 ); TextDrawSetOutline( txt1, 1 ); TextDrawColor( txt1, 0xDFDFDFFF ); TimeTextForPlayer( t, txt1, 6000 ); GangZoneFlashForPlayer( t, turfs[ turf ][turfID], COLOR_FLASH ); } else if (gTeam[t] == turfs[ turf ][ TurfOwner ]) { new msg2[ 256 ]; format(msg2,sizeof(msg2), "~r~The ~y~%s ~r~have attacked our turf in ~y~%s!", TeamInfo[ turfs[ turf ][ TurfAttacker ] ][ TeamName ], turfs[ turf ][ turfName ]); new Text:txt2 = TextDrawCreate( 200.0, 370.0, msg2 ); TextDrawFont( txt2, 0 ); TextDrawSetShadow( txt2, 0 ); TextDrawSetOutline( txt2, 1 ); TextDrawColor( txt2, COLOR_RED ); TimeTextForPlayer( t, txt2, 6000 ); GangZoneFlashForPlayer( t, turfs[ turf ][turfID], COLOR_FLASH ); } else GangZoneFlashForPlayer( t, turfs[ turf ][turfID], COLOR_FLASH2 ); } turfs[ turf ][ TurfWarStarted ] =1; SetTimerEx("EndWar", ATTACK_TIME, false ,"iii", turf, turfs[ turf ][ TurfAttacker ], turfs[ turf ][ TurfOwner ] ); } } } } } } } //================================================== ============================ public EndWar( turf, attacker, defender ) { new string[ 256 ]; new Float, Float:y, Float:z; if (turfs[ turf ][ TurfWarStarted ] == 1) { GangZoneStopFlashForAll( turf ); turfs[ turf ][ TurfWarStarted ] =0; // when attackers have more kills if (TurfInfo[ turf ][ attacker ][ TurfAttackKills ] > TurfInfo[ turf ][ defender ][ TurfAttackKills ]) { for (new a=0; a<SLOTS; a++) { if (gTeam[ a ] == defender) { // send the message to losers new msg1[ 256 ]; format(msg1,sizeof(msg1), "~r~The ~y~%s ~r~have taken over our turf in ~y~%s!", TeamInfo[ attacker ][ TeamName ], turfs[ turf ][ turfName ]); new Text:txt1 = TextDrawCreate(200.0, 400.0, msg1); TextDrawFont( txt1, 0 ); TextDrawSetShadow( txt1, 0 ); TextDrawSetOutline( txt1, 1 ); TextDrawColor( txt1, COLOR_RED ); TimeTextForPlayer( a, txt1, 6000 ); // send message with final score format (string, sizeof(string), "Final score from the turfwar in %s. %s %d - %s %d.", turfs[ turf ][ turfName ], TeamInfo[ attacker ][ TeamName ], TurfInfo[ turf ][ attacker ][ TurfAttackKills ], TeamInfo[ defender ][ TeamName ], TurfInfo[ turf ][ defender ][ TurfAttackKills ]); SendClientMessage(a, TeamInfo[ defender ][ TeamColor ], string); TeamInfo[ defender ][ TurfWarsLost ]++; TeamInfo[ defender ][ TeamScore ]--; } else if (gTeam[ a ] == attacker) { // send the message to winners new msg2[ 256 ]; format(msg2,sizeof(msg2), "~g~We won the turf war against the ~y~%s ~g~in ~y~%s!", TeamInfo[ defender ][ TeamName ], turfs[ turf ][ turfName ]); new Text:txt2 = TextDrawCreate(200.0, 415.0, msg2); TextDrawFont(txt2, 0); TextDrawSetShadow(txt2, 0); TextDrawSetOutline(txt2, 1); TextDrawColor(txt2, COLOR_GREEN); TimeTextForPlayer(a, txt2, 6000); // send message with final score format (string, sizeof(string), "Final score from the turfwar in %s. %s %d - %s %d.", turfs[ turf ][ turfName ], TeamInfo[ attacker ][ TeamName ], TurfInfo[ turf ][ attacker ][ TurfAttackKills ], TeamInfo[ defender ][ TeamName ], TurfInfo[ turf ][ defender ][ TurfAttackKills ]); SendClientMessage(a, TeamInfo[ attacker ][ TeamColor ], string); TeamInfo[ attacker ][ TurfWarsWon ]++; TeamInfo[ attacker ][ TeamScore ]++; // give winners prize SendClientMessage( a, COLOR_GREEN, "Well done. You received $1000 + 1 point."); GivePlayerMoney( a, 1000 ); SetPlayerScore( a, GetPlayerScore(a)+1 ); // if teamscore >= TEAMSCORE give them all the turfs the defenders owns. if (TeamInfo[ attacker ][ TeamScore ] >= TEAMSCORE) { for (new i = 0; i < MAX_TURFS; i++) { if (turfs[ i ][ TurfOwner ] == defender) { if (turfs[ i ][ TurfWarStarted ] != 1) { turfs[ i ][ TurfOwner ] = attacker; turfs[ i ][ TurfColor ] = TeamInfo[ attacker ][ TeamColor ]; GangZoneShowForAll( i, turfs[ i ][ TurfColor ] ); new msg[ 256 ]; format(msg,sizeof(msg), "Excellent! Because of our teamscore: %d.~n~All their turfs belongs to us now.", TeamInfo[ attacker ][ TeamScore ]); new Text:txt = TextDrawCreate( 23.0, 125.0, msg ); TextDrawUseBox( txt, 1 ); TextDrawBoxColor( txt, 0x00000066 ); TextDrawTextSize( txt, 248.0, 0.0 ); TextDrawAlignment( txt, 0 ); TextDrawBackgroundColor( txt, 0x000000ff ); TextDrawFont( txt, 1 ); TextDrawLetterSize( txt, 0.29, 1.0 ); TextDrawColor( txt, 0xffffffff ); TextDrawSetOutline( txt, 1 ); TextDrawSetProportional( txt, 1 ); TimeTextForPlayer(a, txt, 6000); } } } } } } // change the zone colour and reset the counters turfs[ turf ][ TurfOwner ] = attacker; turfs[ turf ][ TurfColor ] = TeamInfo[ attacker ][ TeamColor ]; GangZoneShowForAll( turf, turfs[ turf ][ TurfColor ] ); turfs[ turf ][ TurfAttacker ] = -1; for (new c=0; c<MAX_TEAMS; c++) { TurfInfo[ turf ][ c ][ TurfKills ] =0; TurfInfo[ turf ][ c ][ TurfAttackKills ] =0; } } // when there are no kills in the turf else if (TurfInfo[ turf ][ attacker ][ TurfAttackKills ] == 0 && TurfInfo[ turf ][ defender ][ TurfAttackKills ] == 0) { for (new id=0; id<SLOTS; id++) { if (Spawned[id] == 1 && !GetPlayerInterior(id)) { GetPlayerPos(id, x, y, z); if (IsPlayerInTurf(id, turfs[turf][zMinX], turfs[turf][zMinY], turfs[turf][zMaxX], turfs[turf][zMaxY])) { if (gTeam[id] == attacker) TurfInfo[ turf ][ attacker ][ MIT ]++; if (gTeam[id] == defender) TurfInfo[ turf ][ defender ][ MIT ]++; } } } if (TurfInfo[ turf ][ attacker ][ MIT ] > TurfInfo[ turf ][ defender ][ MIT ]) { for (new a=0; a<SLOTS; a++) { if (gTeam[ a ] == defender) { // send the message to losers new msg1[ 256 ]; format(msg1,sizeof(msg1), "~r~The ~y~%s ~r~have taken over our turf in ~y~%s!", TeamInfo[ attacker ][ TeamName ], turfs[ turf ][ turfName ]); new Text:txt1 = TextDrawCreate(200.0, 400.0, msg1); TextDrawFont( txt1, 0 ); TextDrawSetShadow( txt1, 0 ); TextDrawSetOutline( txt1, 1 ); TextDrawColor( txt1, COLOR_RED ); TimeTextForPlayer( a, txt1, 6000 ); // send message format (string, sizeof(string), "They beated us with their overwhelming presence. They had %d members on our turf.", TurfInfo[ turf ][ attacker ][ MIT ]); SendClientMessage(a, TeamInfo[ defender ][ TeamColor ], string); TeamInfo[ defender ][ TurfWarsLost ]++; TeamInfo[ defender ][ TeamScore ]--; } else if (gTeam[ a ] == attacker) { // send the message to winners new msg2[ 256 ]; format(msg2,sizeof(msg2), "~g~We won the turf war against the ~y~%s ~g~in ~y~%s!", TeamInfo[ defender ][ TeamName ], turfs[ turf ][ turfName ]); new Text:txt2 = TextDrawCreate(200.0, 415.0, msg2); TextDrawFont(txt2, 0); TextDrawSetShadow(txt2, 0); TextDrawSetOutline(txt2, 1); TextDrawColor(txt2, COLOR_GREEN); TimeTextForPlayer(a, txt2, 6000); // send message format (string, sizeof(string), "We beated them with our overwhelming presence. We had %d members on their turf.", TurfInfo[ turf ][ attacker ][ MIT ]); SendClientMessage(a, TeamInfo[ attacker ][ TeamColor ], string); TeamInfo[ attacker ][ TurfWarsWon ]++; TeamInfo[ attacker ][ TeamScore ]++; // give winners prize SendClientMessage( a, COLOR_GREEN, "Well done. You received $1000 + 1 point."); GivePlayerMoney( a, 1000 ); SetPlayerScore( a, GetPlayerScore(a)+1 ); } } // change the zone colour and reset the counters turfs[ turf ][ TurfOwner ] = attacker; turfs[ turf ][ TurfColor ] = TeamInfo[ attacker ][ TeamColor ]; GangZoneShowForAll( turf, turfs[ turf ][ TurfColor ] ); turfs[ turf ][ TurfAttacker ] = -1; for (new c=0; c<MAX_TEAMS; c++) { TurfInfo[ turf ][ c ][ TurfKills ] =0; TurfInfo[ turf ][ c ][ TurfAttackKills ] =0; } } else { for (new a=0; a<SLOTS; a++) { if (gTeam[ a ] == defender) { // send the message to winners new msg3[ 256 ]; format(msg3,sizeof(msg3), "~g~That showed them. The turf in ~y~%s ~g~remain ours.", turfs[ turf ][ turfName ]); new Text:txt3 = TextDrawCreate(200.0, 355.0, msg3); TextDrawFont( txt3, 0 ); TextDrawSetShadow( txt3, 0 ); TextDrawSetOutline( txt3, 1 ); TextDrawColor( txt3, COLOR_GREEN ); TimeTextForPlayer( a, txt3, 6000 ); // send message SendClientMessage( a, TeamInfo[ defender ][ TeamColor ], "Those fools thinking they can take over our turf."); TeamInfo[ defender ][ TurfWarsWon ]++; TeamInfo[ defender ][ TeamScore ]++; // give winners prize SendClientMessage( a, COLOR_GREEN, "Well done. You received $1000 + 1 point."); GivePlayerMoney( a, 1000 ); SetPlayerScore( a,GetPlayerScore(a)+1 ); } else if (gTeam[ a ] == attacker) { // send the message to losers new msg4[ 256 ]; format(msg4,sizeof(msg4), "~r~We lost the turfwar against the ~y~%s ~r~in ~y~%s!", TeamInfo[ defender ][ TeamName ], turfs[ turf ][ turfName ]); new Text:txt4 = TextDrawCreate(200.0, 430.0, msg4); TextDrawFont( txt4, 0 ); TextDrawSetShadow( txt4, 0 ); TextDrawSetOutline( txt4, 1 ); TextDrawColor( txt4, COLOR_RED ); TimeTextForPlayer( a, txt4, 6000 ); // send message SendClientMessage( a, TeamInfo[ attacker ][ TeamColor ], "Pity, we were in the minority."); TeamInfo[ attacker ][ TurfWarsLost ]++; TeamInfo[ attacker ][ TeamScore ]--; } } // change the zone colour and reset the counters turfs[ turf ][ TurfOwner ] = defender; turfs[ turf ][ TurfColor ] = TeamInfo[ defender ][ TeamColor ]; GangZoneShowForAll( turf, turfs[ turf ][ TurfColor ] ); turfs[ turf ][ TurfAttacker ] = -1; for (new c=0; c<MAX_TEAMS; c++) { TurfInfo[ turf ][ c ][ TurfKills ] =0; TurfInfo[ turf ][ c ][ TurfAttackKills ] =0; } } } // when it's a draw (not 0-0) or defenders have more kills else { for (new a=0; a<SLOTS; a++) { if (gTeam[ a ] == defender) { // send the message to winners new msg3[ 256 ]; format(msg3,sizeof(msg3), "~g~That showed them. The turf in ~y~%s ~g~remain ours.", turfs[ turf ][ turfName ]); new Text:txt3 = TextDrawCreate(200.0, 355.0, msg3); TextDrawFont( txt3, 0 ); TextDrawSetShadow( txt3, 0 ); TextDrawSetOutline( txt3, 1 ); TextDrawColor( txt3, COLOR_GREEN ); TimeTextForPlayer( a, txt3, 6000 ); // send message with final score format (string, sizeof(string), "Final score from the turfwar in %s. %s %d - %s %d.", turfs[ turf ][ turfName ], TeamInfo[ defender ][ TeamName ], TurfInfo[ turf ][ defender ][ TurfAttackKills ], TeamInfo[ attacker ][ TeamName ], TurfInfo[ turf ][ attacker ][ TurfAttackKills ]); SendClientMessage(a, TeamInfo[ defender ][ TeamColor ], string); TeamInfo[ defender ][ TurfWarsWon ]++; TeamInfo[ defender ][ TeamScore ]++; // give winners prize SendClientMessage( a, COLOR_GREEN, "Well done. You received $1000 + 1 point."); GivePlayerMoney( a, 1000 ); SetPlayerScore( a,GetPlayerScore(a)+1 ); } else if (gTeam[ a ] == attacker) { // send the message to losers new msg4[ 256 ]; format(msg4,sizeof(msg4), "~r~We lost the turfwar against the ~y~%s ~r~in ~y~%s!", TeamInfo[ defender ][ TeamName ], turfs[ turf ][ turfName ]); new Text:txt4 = TextDrawCreate(200.0, 430.0, msg4); TextDrawFont( txt4, 0 ); TextDrawSetShadow( txt4, 0 ); TextDrawSetOutline( txt4, 1 ); TextDrawColor( txt4, COLOR_RED ); TimeTextForPlayer( a, txt4, 6000 ); // send message with final score format (string, sizeof(string), "Final score from the turfwar in %s. %s %d - %s %d.", turfs[ turf ][ turfName ], TeamInfo[ defender ][ TeamName ], TurfInfo[ turf ][ defender ][ TurfAttackKills ], TeamInfo[ attacker ][ TeamName ], TurfInfo[ turf ][ attacker ][ TurfAttackKills ]); SendClientMessage(a, TeamInfo[ attacker ][ TeamColor ], string); TeamInfo[ attacker ][ TurfWarsLost ]++; TeamInfo[ attacker ][ TeamScore ]--; } } // if teamscore >= TEAMSCORE reset the teamscore. if (TeamInfo[ attacker ][ TeamScore ] >= TEAMSCORE) TeamInfo[ attacker ][ TeamScore ] =0; // change the zone colour and reset the counters turfs[ turf ][ TurfOwner ] = defender; turfs[ turf ][ TurfColor ] = TeamInfo[ defender ][ TeamColor ]; GangZoneShowForAll( turf, turfs[ turf ][ TurfColor ] ); turfs[ turf ][ TurfAttacker ] = -1; for (new c=0; c<MAX_TEAMS; c++) { TurfInfo[ turf ][ c ][ TurfKills ] =0; TurfInfo[ turf ][ c ][ TurfAttackKills ] =0; } } } } //================================================== ============================ public OnPlayerCommandText(playerid, cmdtext[]) { if (!IsPlayerConnected(playerid)) return 0; // Check for undisconnected bug. new i, c; while ((c = cmdtext[i++])) if (c < 0x20 || c > 0x7E) return 0; // Check for illegal characters. dcmd(kill, 4, cmdtext); dcmd(help, 4, cmdtext); dcmd(turfhelp, 8, cmdtext); dcmd(commands, 8, cmdtext); dcmd(rules, 5, cmdtext); dcmd(credits, 7, cmdtext); dcmd(report, 6, cmdtext); dcmd(me, 2, cmdtext); dcmd(hitman, 6, cmdtext); dcmd(bounties, 8, cmdtext); dcmd(buyweapon, 9, cmdtext); dcmd(list, 4, cmdtext); dcmd(list2, 5, cmdtext); dcmd(seepm, 5, cmdtext); dcmd(hidepm, 6, cmdtext); dcmd(seetpm, 6, cmdtext); dcmd(hidetpm, 7, cmdtext); dcmd(on, 2, cmdtext); dcmd(off, 3, cmdtext); dcmd(a, 1, cmdtext); dcmd(teamids, 7, cmdtext); dcmd(teamstats, 9, cmdtext); dcmd(sellpoints, 10, cmdtext); return 0; } //================================================== ============================ dcmd_kill(playerid, cmdtext[]) { #pragma unused cmdtext SetPlayerHealth( playerid, 0 ); return 1; } dcmd_help(playerid, cmdtext[]) { #pragma unused cmdtext SendClientMessage(playerid, COLOR_RED,"Los Santos Turf Wars Help"); SendClientMessage(playerid, COLOR_YELLOW,"This is a Team Death Match gamemode where you can kill players to receive money and points."); SendClientMessage(playerid, COLOR_YELLOW,"You can take over turfs with your team. Type /turfhelp for more info."); SendClientMessage(playerid, COLOR_YELLOW,"You can purchase weapons in the ammunation that you will have every time you spawn."); SendClientMessage(playerid, COLOR_YELLOW,"Type /tpm <message> to talk in Team-Chat. And see your teams stats: /teamstats (teamid)"); SendClientMessage(playerid, COLOR_YELLOW,"See a rulebreaker? Use /report <id> <reason>."); SendClientMessage(playerid, COLOR_YELLOW,"You can see the server rules under /rules."); SendClientMessage(playerid, COLOR_ORANGE,"Type /commands for a full list of commands."); return 1; } dcmd_turfhelp(playerid, cmdtext[]) { #pragma unused cmdtext SendClientMessage(playerid, COLOR_RED,"Los Santos Turf Wars Help"); SendClientMessage(playerid, COLOR_YELLOW,"There are 2 ways to provoke a turfwar. 1) Kill 5 players in a specific area."); SendClientMessage(playerid, COLOR_YELLOW,"2) Or get at least 10 members in a turf for a short amount of time."); SendClientMessage(playerid, COLOR_YELLOW,"The turf youґve attacked, will flash with a red color on your radar."); SendClientMessage(playerid, COLOR_YELLOW,"If you see a turf flashing with a white color, it means the turf"); SendClientMessage(playerid, COLOR_YELLOW,"is under attack, but not by your team."); SendClientMessage(playerid, COLOR_YELLOW,"After 3 minutes the team with the most kills in that area wins the turfwar."); SendClientMessage(playerid, COLOR_YELLOW,"Or when there are no kills in a turf the team with the most members on it wins!"); SendClientMessage(playerid, COLOR_GREEN,"The winners will receive $1000 + 1 point."); return 1; } dcmd_commands(playerid, cmdtext[]) { #pragma unused cmdtext SendClientMessage(playerid, COLOR_RED,"Los Santos Turf Wars Commands"); SendClientMessage(playerid, COLOR_YELLOW,"/help | /turfhelp | /commands | /admins |/config | /credits"); SendClientMessage(playerid, COLOR_YELLOW,"/pm <playerid> <message> | /tpm <message>"); SendClientMessage(playerid, COLOR_YELLOW,"/buyweapon <weaponid> <amount> | /list | /list2"); SendClientMessage(playerid, COLOR_YELLOW,"/teamstats (teamid) | /teamids | /sellpoints <amount>"); SendClientMessage(playerid, COLOR_YELLOW,"/hitman <playerid> <amount> | /bounties"); SendClientMessage(playerid, COLOR_YELLOW,"/report <playerid> <reason> | /me <message>"); return 1; } dcmd_rules(playerid, cmdtext[]) { #pragma unused cmdtext SendClientMessage(playerid, COLOR_RED,"Los Santos Turf Wars Rules"); SendClientMessage(playerid, COLOR_YELLOW,"There are several rules which you need to follow to avoid a kick or a ban."); SendClientMessage(playerid, COLOR_YELLOW,"1. No cheating/hacking or spamming/flaming."); SendClientMessage(playerid, COLOR_YELLOW,"2. No bug abuse."); SendClientMessage(playerid, COLOR_YELLOW,"3. Obey the admins and show them some respect."); SendClientMessage(playerid, COLOR_YELLOW,"4. Don't annoy the admins."); SendClientMessage(playerid, COLOR_YELLOW,"5. Don't abuse or spam, /me and /report commands."); SendClientMessage(playerid, COLOR_YELLOW,"6. Don't camp exit doors continuously."); SendClientMessage(playerid, COLOR_YELLOW,"7. Don't fight in ammunation and food places."); SendClientMessage(playerid, COLOR_YELLOW,"8. No racism."); return 1; } dcmd_credits(playerid, cmdtext[]) { #pragma unused cmdtext SendClientMessage(playerid, COLOR_RED,"Los Santos Turf Wars Credits"); SendClientMessage(playerid, COLOR_YELLOW,"Scripted By Geek-SiMo"); return 1; } dcmd_report(playerid, text[]) { if(strlen(text) > 0) { new string[256], playername[MAX_PLAYER_NAME]; GetPlayerName(playerid, playername, sizeof(playername)); format(string, sizeof(string), "Report from %s(%d): %s", playername, playerid, text[0]); SendAdminMessage(COLOR_RED, string); format(string, sizeof(string), "Report sent to currently online admins."); SendClientMessage(playerid, COLOR_ORANGE, string); } else { new string[256]; format(string, sizeof(string), "Usage: /report [id] [reason]"); SendClientMessage(playerid, COLOR_WHITE, string); } return 1; } dcmd_me(const playerid, message[]) { if (!strlen(message)) { SendClientMessage(playerid,COLOR_RED,"USAGE : /me [message]"); } else { new pname[ MAX_PLAYER_NAME ], string[ 256 ]; GetPlayerName( playerid, pname, sizeof( pname )); format( string, 256, "%s %s", pname, message ); SendClientMessageToAll( COLOR_ME, string ); } return 1; } dcmd_hitman(playerid, cmdtext[]) { #pragma unused cmdtext new string[256]; new sendername[MAX_PLAYER_NAME]; new giveplayer[MAX_PLAYER_NAME]; new giveplayerid, moneys, idx; new tmp[256]; tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /hitman [playerid] [amount]"); return 1; } giveplayerid = strval(tmp); tmp = strtok(cmdtext, idx); if(!strlen(tmp)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /hitman [playerid] [amount]"); return 1; } moneys = strval(tmp); if(moneys > AC_GetPlayerMoney(playerid)) { SendClientMessage(playerid, COLOR_RED, "You don't have enough money!"); return 1; } if(moneys < 100) { SendClientMessage(playerid, COLOR_RED, "A bounty must be $100 at least!"); return 1; } if(bounty[giveplayerid] == 100000) { SendClientMessage(playerid, COLOR_RED, "A bounty can't be more than $100000!"); return 1; } if(IsPlayerConnected(giveplayerid)==0) { SendClientMessage(playerid, COLOR_RED, "No such player exists."); return 1; } bounty[giveplayerid]+=moneys; GivePlayerMoney(playerid, 0-moneys); GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer)); GetPlayerName(playerid, sendername, sizeof(sendername)); format(string, sizeof(string), "%s has had a $%d bounty put on his head from %s (total: $%d).", giveplayer, moneys, sendername, bounty[giveplayerid]); SendClientMessageToAll(COLOR_ORANGE, string); format(string, sizeof(string), "You have had a $%d bounty put on you from %s (id: %d).", moneys, sendername, playerid); SendClientMessage(giveplayerid, COLOR_RED, string); return 1; } dcmd_bounties(playerid, cmdtext[]) { #pragma unused cmdtext new string[256]; new giveplayer[MAX_PLAYER_NAME]; // new tmp[256]; new x; SendClientMessage(playerid, COLOR_GREEN, "Current Bounties:"); for(new i=0; i < SLOTS; i++) { if(IsPlayerConnected(i) && bounty[i] > 0) { GetPlayerName(i, giveplayer, sizeof(giveplayer)); format(string, sizeof(string), "%s%s(%d): $%d", string,giveplayer,i,bounty[i]); x++; if(x > 3) { SendClientMessage(playerid, COLOR_YELLOW, string); x = 0; format(string, sizeof(string), ""); } else { format(string, sizeof(string), "%s, ", string); } } } if(x <= 3 && x > 0) { string[strlen(string)-2] = '.'; SendClientMessage(playerid, COLOR_YELLOW, string); } return 1; } dcmd_buyweapon(playerid, cmdtext[]) { #pragma unused cmdtext new string[256]; new idx, weaponid; new tmp[256], tmp2[256]; tmp = strtok(cmdtext, idx); tmp2 = strtok(cmdtext, idx); if(!strlen(tmp) || !strlen(tmp2)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /buyweapon [weapon_number] [amount]"); return 1; } weaponid = strval(tmp); new ammos = strval(tmp2); if(IsPlayerInCheckpoint(playerid)==0 || playerCheckpoint[playerid]!=CP_AMMU && playerCheckpoint[playerid]!=CP_AMMU_2) { SendClientMessage(playerid, COLOR_YELLOW, "You need to be in an Ammunation to buy weapons."); return 1; } if(AC_GetPlayerMoney(playerid) < weaponCost[weaponid]*ammos) { SendClientMessage(playerid, COLOR_RED, "You don't have enough money!"); return 1; } if(weaponid < 0 || weaponid > MAX_WEAPONS-1){ SendClientMessage(playerid, COLOR_RED, "Invalid weapon number."); return 1; } if(ammos < 1) { SendClientMessage(playerid, COLOR_RED, "Invalid weapon amount."); return 1; } format (string, sizeof(string), "You bought %d %s's for when you spawn.",ammos,weaponNames[weaponid]); SendClientMessage(playerid, COLOR_GREEN, string); GivePlayerWeapon(playerid, weaponIDs[weaponid], weaponAmmo[weaponid]*ammos); playerWeapons[playerid][weaponid] += ammos; GivePlayerMoney(playerid, 0-(weaponCost[weaponid]*ammos)); return 1; } dcmd_list(playerid, cmdtext[]) { #pragma unused cmdtext new string[256]; new weaponstemp = MAX_WEAPONS; if(IsPlayerInCheckpoint(playerid)==0 || playerCheckpoint[playerid]!=CP_AMMU && playerCheckpoint[playerid]!=CP_AMMU_2) { SendClientMessage(playerid, COLOR_YELLOW, "You need to be in an ammunation checkpoint."); return 1; } if(weaponstemp> { weaponstemp = 8; } SendClientMessage(playerid, COLOR_GREEN, "Weapon List 1/2:"); for(new i = 0; i < weaponstemp; i++) { format (string, sizeof(string), "%d. %s - $%d",i,weaponNames[i],weaponCost[i]); SendClientMessage(playerid, COLOR_YELLOW, string); } return 1; } dcmd_list2(playerid, cmdtext[]) { #pragma unused cmdtext new string[256]; if(IsPlayerInCheckpoint(playerid)==0 || playerCheckpoint[playerid]!=CP_AMMU && playerCheckpoint[playerid]!=CP_AMMU_2) { SendClientMessage(playerid, COLOR_YELLOW, "You need to be in an ammunation checkpoint."); return 1; } SendClientMessage(playerid, COLOR_GREEN, "Weapon List 2/2:"); for(new i = 8; i < MAX_WEAPONS; i++) { format (string, sizeof(string), "%d. %s - $%d",i,weaponNames[i],weaponCost[i]); SendClientMessage(playerid, COLOR_YELLOW, string); } return 1; } dcmd_seepm(playerid, cmdtext[]) { #pragma unused cmdtext if (!IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_RED, "You're not an admin."); else { ShowPM[playerid]= 1; SendClientMessage(playerid, COLOR_GREEN, "You can see PM's now."); } return 1; } dcmd_hidepm(playerid, cmdtext[]) { #pragma unused cmdtext if (!IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_RED, "You're not an admin."); else { ShowPM[playerid]= 0; SendClientMessage(playerid, COLOR_RED, "You can't see PM's anymore."); } return 1; } dcmd_seetpm(playerid, cmdtext[]) { #pragma unused cmdtext if (!IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_RED, "You're not an admin."); else { ShowTPM[playerid]= 1; SendClientMessage(playerid, COLOR_GREEN, "You can see TPM's now."); } return 1; } dcmd_hidetpm(playerid, cmdtext[]) { #pragma unused cmdtext if (!IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_RED, "You're not an admin."); else { ShowTPM[playerid]= 0; SendClientMessage(playerid, COLOR_RED, "You can't see TPM's anymore."); } return 1; } dcmd_on(playerid, cmdtext[]) { #pragma unused cmdtext if (!IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_RED, "You're not an admin."); else { SetPlayerColor(playerid, COLOR_WHITE); PlayerOnDuty[playerid] =1; } return 1; } dcmd_off(playerid, cmdtext[]) { #pragma unused cmdtext if (!IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_RED, "You're not an admin."); else { SetPlayerToTeamColor(playerid); PlayerOnDuty[playerid]=0; } return 1; } dcmd_a(playerid, cmdtext[]) { #pragma unused cmdtext new sendername[MAX_PLAYER_NAME]; new string[256], idx; if (!IsPlayerAdmin(playerid)) SendClientMessage(playerid, COLOR_RED, "You're not an admin."); else { GetPlayerName(playerid, sendername, sizeof(sendername)); new length = strlen(cmdtext); while ((idx < length) && (cmdtext[idx] <= ' ')) { idx++; } new offset = idx; new result[64]; while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) { result[idx - offset] = cmdtext[idx]; idx++; } result[idx - offset] = EOS; if(!strlen(result)) { SendClientMessage(playerid, COLOR_WHITE, "USAGE: /a <message>"); return 1; } format(string, sizeof(string), "[AdminChat]%s: %s", sendername, result); SendAdminMessage(COLOR_ACHAT,string); return 1; } return 1; } dcmd_teamids(playerid, cmdtext[]) { #pragma unused cmdtext SendClientMessage(playerid, COLOR_RED, "These are the teamid's."); SendClientMessage(playerid, COLOR_WHITE, "Aztecas: 0 | Vagos: 1 | Ballas: 2 | O.G.F: 3 | Dealers: 4"); SendClientMessage(playerid, COLOR_WHITE, "Cops: 5 | Bikers: 6 | Rappers: 7 | Guards: 8 | Hoodlums: 9 | Workers: 10"); return 1; } dcmd_teamstats(playerid, cmdtext[]) { #pragma unused cmdtext new giveteamid, idx, tmp[256]; tmp = strtok(cmdtext, idx); if (!strlen(tmp)) { for (new i = 0; i < MAX_TURFS; i++) { new msg[ 256 ]; format(msg, sizeof(msg), "~w~%s stats:~n~~g~Turfwars Won: %d~n~~r~Turfwars Lost: %d~n~~w~Rivals killed: %d~n~Homies lost: %d~n~~y~Turfs: %d~n~~w~Teamscore: %d", TeamInfo[ gTeam[playerid] ][ TeamName ], TeamInfo[ gTeam[playerid] ][ TurfWarsWon ], TeamInfo[ gTeam[playerid] ][ TurfWarsLost ], TeamInfo[ gTeam[playerid] ][ RivalsKilled ], TeamInfo[ gTeam[playerid] ][ HomiesDied ], OwnedTurfs(), TeamInfo[ gTeam[playerid] ][ TeamScore ]); new Text:txt = TextDrawCreate( 33.0, 261.0, msg); TextDrawUseBox( txt, 1 ); TextDrawBoxColor( txt, 0x00000066 ); TextDrawTextSize( txt, 141.0, 0.0 ); TextDrawAlignment( txt, 0 ); TextDrawBackgroundColor( txt, 0x000000ff ); TextDrawFont( txt, 1 ); TextDrawLetterSize( txt, 0.29, 1.0 ); TextDrawColor( txt, 0xffffffff ); TextDrawSetOutline( txt, 1 ); TextDrawSetProportional( txt, 1 ); TextDrawSetShadow( txt, 1 ); TimeTextForPlayer( playerid, txt, 6000 ); return 1; } } giveteamid = strval(tmp); if ((giveteamid < 0 || giveteamid > 14)) { SendClientMessage(playerid, COLOR_RED, "No such teamid! Look at the teamid's."); SendClientMessage(playerid, COLOR_WHITE, "Azteca: 0 | Vagos: 1 | Balla: 2 | O.G.F: 3 | Dealer: 4"); SendClientMessage(playerid, COLOR_WHITE, "Cop: 5 | Biker: 6 | Rapper: 7 | Guard: 8 | Hoodlum: 9 | Worker: 10"); return 1; } for (new i = 0; i < MAX_TURFS; i++) { new msg[ 256 ]; format(msg, sizeof(msg), "~w~%s stats:~n~~g~Turfwars Won: %d~n~~r~Turfwars Lost: %d~n~~w~Rivals killed: %d~n~Homies lost: %d~n~~y~Turfs: %d~n~~w~Teamscore: %d", TeamInfo[ giveteamid ][ TeamName ], TeamInfo[ giveteamid ][ TurfWarsWon ], TeamInfo[ giveteamid ][ TurfWarsLost ], TeamInfo[ giveteamid ][ RivalsKilled ], TeamInfo[ giveteamid ][ HomiesDied ], OwnedTurfs2(giveteamid), TeamInfo[ giveteamid ][ TeamScore ]); new Text:txt = TextDrawCreate( 33.0, 261.0, msg); TextDrawUseBox( txt, 1 ); TextDrawBoxColor( txt, 0x00000066 ); TextDrawTextSize( txt, 141.0, 0.0 ); TextDrawAlignment( txt, 0 ); TextDrawBackgroundColor( txt, 0x000000ff ); TextDrawFont( txt, 1 ); TextDrawLetterSize( txt, 0.29, 1.0 ); TextDrawColor( txt, 0xffffffff ); TextDrawSetOutline( txt, 1 ); TextDrawSetProportional( txt, 1 ); TextDrawSetShadow( txt, 1 ); TimeTextForPlayer( playerid, txt, 6000 ); return 1; } return 1; } dcmd_sellpoints(playerid, cmdtext[]) { #pragma unused cmdtext new string[ 256 ], tmp[ 256 ]; new sendername[ MAX_PLAYER_NAME ]; new idx; tmp = strtok(cmdtext,idx); new setting = strval(tmp); if (!strlen(tmp)){ SendClientMessage(playerid, COLOR_WHITE, "USAGE: /sellpoints [amount]"); return 1; } else if (GetPlayerScore( playerid ) <= 0 ) { SendClientMessage( playerid, COLOR_RED, "You don't have enough points." ); return 1; } else if (setting > 0) { GetPlayerName(playerid, sendername, sizeof(sendername)); SetPlayerScore( playerid, GetPlayerScore(playerid)-setting ); GivePlayerMoney( playerid, setting*250 ); format(string,sizeof(string),"*** You've sold %d points.", setting); SendClientMessage( playerid, COLOR_GREEN, string ); format(string,sizeof(string),"*** %s(%d) sold %d points.", sendername, playerid, setting); SendAdminMessage( COLOR_RED, string ); } else SendClientMessage( playerid, COLOR_WHITE, "USAGE: /sellpoints [amount]" ); return 1; } //================================================== ============================ public OnPlayerEnterCheckpoint(playerid) { switch(getCheckpointType(playerid)) { case CP_AMMU: { SendClientMessage(playerid, COLOR_GREEN, "You can purchase weapons here so that you have them every"); SendClientMessage(playerid, COLOR_GREEN, "time you spawn. You can purchase more than once for more ammo."); SendClientMessage(playerid, COLOR_YELLOW, "Type /buyweapon <weapon number> <weapon_amount> and /list or /list2 for a list of weapons."); } case CP_AMMU_2: { SendClientMessage(playerid, COLOR_GREEN, "You can purchase weapons here so that you have them every"); SendClientMessage(playerid, COLOR_GREEN, "time you spawn. You can purchase more than once for more ammo."); SendClientMessage(playerid, COLOR_YELLOW, "Type /buyweapon <weapon number> <weapon_amount> and /list or /list2 for a list of weapons."); } } return 1; } //================================================== ============================ public OnPlayerPickUpPickup(playerid, pickupid) { if(gDropPickup[pickupid] != -1) { DestroyPickup(pickupid); KillTimer(gDropPickup[pickupid]); gDropPickup[pickupid] = -1; } return 1; } //================================================== ============================ public PickupDestroy(pickupid) { DestroyPickup(pickupid); gDropPickup[pickupid] = -1; } //================================================== ============================ public TimeTextForPlayer( playerid, Text:text, time ) { TextDrawShowForPlayer( playerid, text ); SetTimerEx( "DestroyTextTimer", time, 0, "i", _:text ); } public DestroyTextTimer( Text:text ) TextDrawDestroy( text ); //================================================== ============================ public OnPlayerText( playerid, text[] ) { if (!IsPlayerConnected( playerid )) return 0; // Check for undisconnected bug. new i, c; while ((c = text[i++])) if (c < 0x20 || c > 0x7E) return 0; // Check for illegal characters. return 1; } //================================================== ============================ public OnPlayerPrivmsg( playerid, recieverid, text[] ) { if (!IsPlayerConnected( playerid )) return 0; // Check for undisconnected bug. new i, c; while ((c = text[i++])) if (c < 0x20 || c > 0x7E) return 0; // Check for illegal characters. new string[ 256 ], name[ 24 ], name2[ 24 ]; GetPlayerName( recieverid, name, 24 ); GetPlayerName( playerid, name2, 24 ); format( string, sizeof(string),"*** [PM] %s(%d) to %s(%d): %s", name2, playerid, name, recieverid, text); for (new k = 0; k < SLOTS; k ++) { if (IsPlayerConnected( k )) { if (IsPlayerAdmin( k )) { if (ShowPM[ k ] != 0) { if (k != playerid && k != recieverid) { SendClientMessage(k, COLOR_GREY, string); } } } } } return 1; } //================================================== ============================ public OnPlayerTeamPrivmsg( playerid, msg[] ) { new string[256], name[24]; GetPlayerName(playerid, name, 24); format(string, sizeof(string),"*** [TPM] %s(%d): %s", name, playerid, msg); for (new k = 0; k < SLOTS; k ++) { if (IsPlayerConnected(k)) { if (IsPlayerAdmin( k )) { if (ShowTPM[ k ] != 0) { if (k != playerid && gTeam[playerid] != gTeam[k]) { SendClientMessage(k, COLOR_TPM, string); } } } } } return 1; } //================================================== ============================ public GameModeInitExitFunc( ) { for (new i = 0; i < SLOTS; i++) { if (IsPlayerConnected( i )) { PlayerPlaySound( i, 1069, 0.0, 0.0, 0.0 ); } } SetTimer( "GameModeExitFunc", 4000, 0 ); return 1; } //================================================== ============================ public GameModeExitFunc( ) { GameModeExit( ); return 1; } //================================================== ============================ public SendAdminMessage( color, string[] ) { for (new i = 0; i < SLOTS; i++) { if (IsPlayerConnected( i )) { if (IsPlayerAdmin( i )) { SendClientMessage( i, color, string ); } } } } //================================================== ============================ stock AC_ResetPlayerMoney( playerid ) { lTMoney[ playerid ] = 0; lSMoney[ playerid ] = 0; ResetPlayerMoney( playerid ); return 1; } stock AC_GivePlayerMoney( playerid, money ) { lTMoney[ playerid ] += money; lSMoney[ playerid ] = 0; GivePlayerMoney( playerid, money ); return 1; } stock AC_GetPlayerMoney( playerid ) return lTMoney[ playerid ]; //--------------------------------- stock DropPlayerWeapons(playerid) { new Float, Float:y, Float:z, Float:nx, Float:ny; new wep, val, pickupid, ammo, temp[10], bool:deny; GetPlayerPos(playerid,x,y,z); for(new i=0; i<13; i++) { deny = false; GetPlayerWeaponData(playerid, i, wep, ammo); for(new m=0; m<sizeof(gDenyWeaponDrop); m++) { if(gDenyWeaponDrop[m] == wep) { deny = true; break; } } if (!deny && wep != 0 && ammo > 0) { format(temp,sizeof(temp),"%.0f", x); val = strval(temp); nx = RandomEx(val-2,val+2); format(temp,sizeof(temp),"%.0f", y); val = strval(temp); ny = RandomEx(val-2,val+2); pickupid = CreatePickup(GetWeaponPickupID(wep),3,nx,ny,z); gDropPickup[pickupid] = SetTimerEx("PickupDestroy",DROP_LENGTH,0,"i",picku pid); } } return 1; } stock GetWeaponPickupID(weaponid) { new pickupid; switch(weaponid) { case 1: { pickupid = 331; } case 2: { pickupid = 333; } case 3: { pickupid = 334; } case 4: { pickupid = 335; } case 5: { pickupid = 336; } case 6: { pickupid = 337; } case 7: { pickupid = 338; } case 8: { pickupid = 339; } case 9: { pickupid = 341; } case 10: { pickupid = 321; } case 11: { pickupid = 322; } case 12: { pickupid = 323; } case 13: { pickupid = 324; } case 14: { pickupid = 325; } case 15: { pickupid = 326; } case 16: { pickupid = 342; } case 17: { pickupid = 343; } case 18: { pickupid = 344; } case 22: { pickupid = 346; } case 23: { pickupid = 347; } case 24: { pickupid = 348; } case 25: { pickupid = 349; } case 26: { pickupid = 350; } case 27: { pickupid = 351; } case 28: { pickupid = 352; } case 29: { pickupid = 353; } case 30: { pickupid = 355; } case 31: { pickupid = 356; } case 32: { pickupid = 372; } case 33: { pickupid = 357; } case 34: { pickupid = 358; } case 35: { pickupid = 359; } case 36: { pickupid = 360; } case 37: { pickupid = 361; } case 38: { pickupid = 362; } case 39: { pickupid = 363; } case 40: { pickupid = 364; } case 41: { pickupid = 365; } case 42: { pickupid = 366; } default: { pickupid = 0; } } return pickupid; } stock RandomEx(min, max) { new output; output = max-min; output = random(output); output = min+output; return output; } //------------------------------- stock OwnedTurfs( ) { new turf, playerid; for (new i = 0; i < MAX_TURFS; i++) if (turfs[ i ][TurfOwner] == gTeam[playerid]) turf++; return turf; } stock OwnedTurfs2( teamid ) { new turf; for (new i = 0; i < MAX_TURFS; i++) if (turfs[ i ][TurfOwner] == teamid) turf++; return turf; } //================================================== ============================ strtok(const string[], &index) { new length = strlen(string); while ((index < length) && (string[index] <= ' ')) { index++; } new offset = index; new result[20]; while ((index < length) && (string[index] > ' ') && ((index - offset) < (sizeof(result) - 1))) { result[index - offset] = string[index]; index++; } result[index - offset] = EOS; return result; } //------------------------------------------------------------------------------ isStringSame(const string1[], const string2[], len) { for(new i = 0; i < len; i++) { if(string1[i]!=string2[i]) return 0; if(string1[i] == 0 || string1[i] == '\n') return 1; } return 1; } |