Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //------------------------------------------------
- /*
- World War III (dm.pwn)
- * An awesome TEAM-DEATH-MATCH mode based on Las Venturas Deserts.
- * Loads of features, dynamic team system, dynamic capture zone system, textdraws, fun and events.
- * Works with Gammix's personal admin script. Look in filterscripts folder 'admin.pwn'
- Author: (creator)
- * Gammix
- Contributors:
- * Y_Less - foreach, sscanf2
- * Incognito - Streamer plugin, used dynamic areas
- * Southclaw - Progress bar v2 include
- * joe staff - scren fader include
- * unknown - cuff include
- * Zeex - zcmd include
- * fixes team - samp fixes include
- * Kalcor - Mapandreaas plugin
- * SAMP team
- (c) Copyright 2015
- * This file is provided as is (no warranties).
- */
- //------------------------------------------------
- #include <a_samp> //SAMP team
- #include <fixes> //The fixes team
- #include <sscanf2> //Y_Less
- #include <foreach> //Y_Less
- #include <streamer> //Incognito
- #include <progress2> //Southclaw
- #include <fader> //joe staff
- #include <utils> //Gammix
- #include <textdraws> //Gammix
- #include <gangzones> //Gammix
- #include <playerstates> //Gammix
- #include <playerstats> //Gammix
- #include <playerfuncs> //Gammix
- #include <playercalls> //Gammix
- #include <colors> //Gammix
- #include <dialogs> //Gammix
- #include <gadmin> //Gammix
- #include <a_OPSVP> //Admigo
- #include <zcmd> //Zeex
- #include <mapandreas> //Kalcor
- //remove default game objects
- #include "removebuildings"
- //------------------------------------------------
- //adjust dialog ids!
- #define DIALOG_COMMON 0
- #define DIALOG_CLASS 100
- #define DIALOG_DIS 110
- #define DIALOG_HELP 120
- #define DIALOG_DEATHMATCH 130
- #define DIALOG_SHOP 140
- #define DIALOG_NUKE 150
- #define DIALOG_ANTHRAX 160
- #define DIALOG_INVENTORY 170
- #define DIALOG_PRESTIGE 180
- #define DIALOG_DUEL_WEAPON 190
- #define DIALOG_DUEL 195
- #define DIALOG_SPAWN 200
- #define DIALOG_TIME 210
- #define DIALOG_WEATHER 220
- //------------------------------------------------
- new Text:gClassBGTD;
- new PlayerText:gPlayerClassTD[MAX_PLAYERS][2];
- new PlayerText:gPlayerStatsTD[MAX_PLAYERS];
- new Text:gStatsBGTD[5];
- //------------------------------------------------
- //Team system!
- enum TeamEnum
- {
- E_NAME[28],
- E_COLOR,
- E_SKIN
- };
- //Add as many teams you want, don't worry about rest of the script, ADVANCE!
- new gTeam[][TeamEnum] =
- {
- //team name //color //skin
- {"USA", 0xA0BCFB50, 287}, //team id 0
- {"EUROPE", 0x00FF0050, 285},
- {"LATINO", 0x00CED150, 24},
- {"RUSSIA", 0x8B008B50, 111},
- {"ASIA", 0xFFD70050, 122},
- {"AUSTRALIA", 0x03399950, 73},
- {"INDIA", 0xFF450050, 46},
- {"AFRICA", 0xFFA50050, 102} //8
- };
- new gPlayerTeam[MAX_PLAYERS] = NO_TEAM;
- //------------------------------------------------
- //team spawns
- new Float:gUSASpawn[3][4] =
- {
- {-250.4795,2598.2092,62.8582,272.7238},
- {-173.5874,2707.8867,62.5998,92.8921},
- {-264.5746,2672.8818,62.6875,271.4703}
- };
- new Float:gEuropeSpawn[3][4] =
- {
- {-98.0148,1087.5673,19.8500,359.5242},
- {-193.4192,1154.9584,19.7969,269.5552},
- {-88.3727,1218.6669,19.7422,181.8614}
- };
- new Float:gRussiaSpawn[3][4] =
- {
- {-897.6913,1523.8655,25.7980,270.9159},
- {-741.5120,1578.4148,26.9609,86.3843},
- {-763.1891,1485.2632,24.5426,1.4936}
- };
- new Float:gLatinoSpawn[3][4] =
- {
- {-1410.0948,2670.5869,55.8284,101.9383},
- {-1476.1375,2586.2461,55.8359,356.0307},
- {-1492.8325,2694.5264,55.8359,177.7658}
- };
- new Float:gAsiaSpawn[3][4] =
- {
- {-2218.5012,2304.6387,20.7381,59.4455},
- {-2300.9004,2348.2734,5.0311,273.7676},
- {-2261.7930,2382.8735,5.0088,128.7164}
- };
- new Float:gAustraliaSpawn[3][4] =
- {
- {1383.4690,1038.4839,10.8203,270.6458},
- {1437.4845,973.4548,10.8203,355.8732},
- {1432.3402,1114.3719,10.8203,91.4641}
- };
- new Float:gIndiaSpawn[3][4] =
- {
- {997.9725,2515.9270,10.8163,337.0003},
- {1049.8199,2595.4063,10.8203,323.3996},
- {951.9250,2695.5950,10.8203,251.9590}
- };
- new Float:gAfricaSpawn[3][4] =
- {
- {1066.0150,1727.5500,10.8203,359.8485},
- {1130.3274,1859.8813,10.5688,80.0626},
- {1051.7714,1927.9229,10.8203}
- };
- //------------------------------------------------
- //Capture zone system!
- #define CAPTURE_TIME 30//in seconds, the maximum time after which the zone will be off the attacker team!
- enum CaptureZoneEnum
- {
- E_ZONENAME[28],
- Float:E_ZONEMINX,
- Float:E_ZONEMINY,
- Float:E_ZONEMAXX,
- Float:E_ZONEMAXY,
- E_ZONEOWNER,
- Float:E_CPX,
- Float:E_CPY,
- Float:E_CPZ,
- E_ZONEATTACKER,
- bool:E_ZONEATTACKED,
- E_ZONEID,
- E_ZONECP,
- E_ZONEICON,
- E_ZONETIMER,
- E_ZONERATE,
- E_ZONERATEI,
- Text3D:E_ZONELABEL
- };
- //Add as many Capture zones you want, don't worry about rest of the script, ADVANCE!
- new gCaptureZone[][CaptureZoneEnum] =
- {
- //zone name //minX //minY //maxX //maxY //owner //CPx //CPy //CPz //others - not to be changed
- {"Big Ear", -420.4035, 1471.412, -245.2354, 1646.58, 0, -298.1169, 1538.4077, 75.5625, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
- {"Desert Airport", 163.4902, 2382.287, 467.115, 2627.522, 0, 384.8239, 2535.1963, 16.5391, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
- {"Embassy", 969.2637, 945.9079, 1179.465, 1156.11, 0, 1050.5947, 1011.1202, 11.0000, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
- {"Area51", 81.74512, 1763.359, 326.9805, 1973.561, 1, 254.7359, 1802.2224, 7.4411, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
- {"Gas Station", 517.8044, 1639.581, 689.6177, 1759.491, 1, 671.8925, 1705.6340, 7.1875, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
- {"Abandoned Settlement", -478.7929, 2160.407, -338.6584, 2277.186, 1, -422.8697, 2227.8984, 42.4297, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
- {"Beach Shack", 213.8855, 2853.3789, 298.1382, 2946.1755, 1, 259.7926, 2889.9695, 11.1329, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
- {"Oil Pump", 1015.975, 2861.08, 1097.72, 2977.858, 2, 1048.8944, 2907.4792, 47.8231, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
- {"Oil Refinery", 81.74512, 1307.922, 280.269, 1494.768, 2, 220.3940, 1423.1903, 10.5859, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
- {"Shooting Range", 759.0619, 1658.258, 840.807, 1716.648, 2, 791.0085, 1676.8516, 5.2813, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
- {"Snake Farm", -65.2373, 2311.1003, 10.0603, 2393.9177, 2, -25.3876, 2346.2954, 24.1347, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
- {"Cluckin Bell", -1249.533, 1763.359, -1144.432, 1868.46, 3, -1195.8038, 1814.1815, 41.8190, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
- {"Motel", -802.8551, 2720.7478, -741.8143, 2777.7239, 3, -782.1253, 2751.1729, 45.6628, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
- {"Electronics Grid", -1845.104, 1950.205, -1786.715, 2090.34, 3, -1820.7186, 2051.1123, 9.4018, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
- {"Jays Diner", -1985.239, 2300.542, -1903.494, 2405.642, 3, -1949.5081, 2395.0173, 49.5000, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
- {"Spread Ranch", 668.1707, 1920.2765, 732.9704, 2021.4883, 4, 681.7109, 1947.3749, 5.5391, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
- {"Caravan Park", -46.0147, 1325.4503, 48.4686, 1414.3330, 4, -8.5448, 1394.0792, 9.1719, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
- {"Quarry", 502.1487, 782.4177, 735.7062, 934.23, 4, 620.5497, 859.8751, -42.9534, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
- {"Mountain Outpost", -842.8987, 2264.4333, -654.6287, 2454.2888, 4, -720.1762, 2338.0137, 126.3180, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},//mountain outpost
- {"Bait Shop", -1403.6534, 2042.1500, -1320.6107, 2148.6382, 5, -1376.0591, 2108.4932, 42.2000, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
- {"Farmville", -735.7062, 852.4849, -607.2495, 1004.297, 5, -688.0816, 937.4944, 13.6328, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
- {"Cargo Ship", -1494.768, 1448.057, -1319.6, 1529.802, 5, -1468.1112, 1488.9058, 8.2501, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
- {"Bio Ship", -2534.099, 1494.768, -2253.83, 1599.869, 5, -2471.2327, 1538.4662, 33.2344, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
- {"Fire Department", -572.0619, 2528.5586, -491.7644, 2646.3560, 6, -550.6154, 2593.6748, 53.9348, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},//25
- {"Black Market", -341.4373, 1714.3163, -264.2661, 1842.1420, 6, -317.9809, 1758.1349, 42.7524, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
- {"Fuel Depot", 540.2973, 1165.4449, 694.1926, 1308.1895, 6, 589.7242, 1243.9127, 11.7188, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
- {"Las Venturas Airport", 1267.5743, 1363.3995, 1520.3319, 1780.0334, 7, 1315.6771, 1588.1575, 10.8203, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
- {"Ghost Ship", -562.3872, 361.8078, -264.1497, 455.0224, 7, -485.4115, 423.5143, 32.1677, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1},
- {"Shipment", -531.2891, 819.4126, -422.2399, 861.9582, 7, -483.2408, 851.7081, 1.8081, NO_TEAM, false, -1, -1, -1, -1, -1, 0, Text3D:-1}//shipment
- };
- new PlayerBar:gPlayerCaptureBar[MAX_PLAYERS];
- new PlayerText:gPlayerCaptureTD[MAX_PLAYERS];
- #define BONUS_INTERVAL 60//in seconds
- new gBonusTimer;
- //------------------------------------------------
- #define NUKE_INTERVAL 5 * 60//in seconds
- #define NUKE_COST 100000
- #define NUKE_ZONE 3
- enum NukeEnum
- {
- NUKE_TIME,
- NUKE_PICKUP,
- NUKE_MAPICON,
- Text3D:NUKE_LABEL,
- NUKE_BASE
- };
- new gNuke[NukeEnum];
- //------------------------------------------------
- #define ANTHRAX_INTERVAL 5 * 60//in seconds
- #define ANTHRAX_COST 300000
- #define ANTHRAX_ZONE 22
- enum AnthraxEnum
- {
- ANTHRAX_TIME,
- ANTHRAX_PICKUP,
- ANTHRAX_MAPICON,
- Text3D:ANTHRAX_LABEL
- };
- new gAnthrax[AnthraxEnum];
- //------------------------------------------------
- #define HEALTH_ZONE 11
- #define ARMOUR_ZONE 28
- #define AMMO_ZONE 9
- //------------------------------------------------
- new bool:gStopTimeUpdate;
- //------------------------------------------------
- //Team bases system - Limit is set to Total number of teams
- enum baseinfo
- {
- b_name[25],
- Float:b_minx,
- Float:b_miny,
- Float:b_maxx,
- Float:b_maxy,
- b_owner,
- b_base,//this array store the main gangzone
- };
- //Add as many team bases you want, don't worry about rest of the script, ADVANCE!
- //-These can't be captured and have a anti-base RAPE system
- new gTeamBase[][baseinfo] =
- {
- //name //minX //minY //maxX //maxY //team //not to change
- {"USA Base", -397.0478, 2545.777, -128.4566, 2791.012, 0, -1},
- {"Europe Base", -316.3498, 984.9357, 39.2611, 1260.4496, 1, -1},
- {"Latino Base", -882.0419, 1395.7887, -577.5707, 1643.1394, 2, -1},
- {"Russia Base", -1635.9943, 2483.5520, -1351.7336, 2737.8857, 3, -1},
- {"Asia Base", -2375.6184, 2157.7810, -2091.4629, 2457.7959, 4, -1},
- {"Australia Base", 1268.6326, 871.1526, 1535.1027, 1222.7874, 5, -1},
- {"India Base", 889.2269, 2469.5754, 1146.2012, 2785.0034, 6, -1},
- {"African Base", 1010.8282, 1703.0718, 1160.0896, 1981.1257, 7, -1}
- };
- //------------------------------------------------
- //team prototypes system
- enum PrototypeEnum
- {
- p_owner,
- Float:p_x,
- Float:p_y,
- Float:p_z,
- Float:p_a,
- p_attacker,
- bool:p_attacked,
- p_vehicle,
- Text3D:p_label
- };
- //Add as many Prototype vehicles you want, don't worry about rest of the script, ADVANCE!
- new gPrototype[][PrototypeEnum] =
- {
- {0, -207.02456665, 2788.74633789, 62.20212173, 180.0, INVALID_PLAYER_ID, false, -1},
- {1, -98.50000000, 1136.40002441, 20.00000000, 0.00000000, INVALID_PLAYER_ID, false, -1},
- {2, -786.8142, 1618.1665, 27.2423, 178.4472, INVALID_PLAYER_ID, false, -1},
- {3, -1452.5732, 2531.9304, 55.9176, 0.0000, INVALID_PLAYER_ID, false, -1},
- {4, -2363.5737, 2336.2415, 5.3080, 0.0000, INVALID_PLAYER_ID, false, -1},
- {5, 1327.60119629, 1081.08190918, 11.07010269, 180.0, INVALID_PLAYER_ID, false, -1},
- {6, 1079.92883301, 2659.00097656, 10.83643150, 60.0, INVALID_PLAYER_ID, false, -1}, // saflag
- {7, 1147.6825, 1969.8088, 10.9441, 179.7380, INVALID_PLAYER_ID, false, -1}
- };
- new gPlayerLastVehicle[MAX_PLAYERS];
- //--------------
- //final prototype CPs system
- //If you want more prototype fina;l CP than number of teams, then remove the "sizeof(gTeam)"
- new Float:gPrototypeCP[][3] =
- {
- {-250.2719, 2763.9314, 62.5413},
- {-110.8036, 1142.8986, 19.7422},
- {-1461.2549,2621.8860, 55.8359},
- {-645.7891, 1460.2233, 13.4283},
- {-2258.8186,2361.8535, 4.9791},
- {1450.4971, 1108.5300, 10.8203},
- {952.3654, 2733.2458, 10.8203},
- {1109.3235, 1764.7069, 10.8203}
- };
- //------------------------------------------------
- //rank system
- enum RankEnum
- {
- r_name[30],
- r_score
- };
- //Add as many rnaks you want, don't worry about rest of the script, ADVANCE!
- //If you want to edit the bonus of ranks, then go to OnPlayerSpawn
- new gRank[][RankEnum] =
- {
- {"Newbie", 0},
- {"Begginer", 50},
- {"Specialist", 100},
- {"Super Specialist", 200},
- {"Gunnery", 500},
- {"Chief", 1000},
- {"Master Chief", 1500},
- {"Ensign", 2500},
- {"Killer", 4500},
- {"Lieutenant", 8000},
- {"Captain", 10000},
- {"Commander", 13000},
- {"Major", 15000},
- {"Sexy Major", 20000},
- {"Brigadier", 25000},
- {"General", 40000},
- {"Field Marshal", 55000},
- {"Killer", 70000},
- {"Warlord", 150000},
- {"Master Of War", 200000},
- {"God Of War", 999999999}
- };
- //------------------------------------------------
- new Text:gNotifyTD[3];
- new gNotifyTimer[3];
- new PlayerText:gPNotifyTD[MAX_PLAYERS];
- new gPNotifyTimer[MAX_PLAYERS];
- #define SERVER_WEBSITE "www.samptdm.com" //change this to your server website address
- #define SERVER_IP "127.109.1.2:7777" //chaange this to your server ip address
- new Text:gServerTD[3];
- //------------------------------------------------
- new gClass[MAX_PLAYERS];
- new bool:gClassSelection[MAX_PLAYERS];
- #define CLASS_MEDIC 1
- #define CLASS_JETRUNNER 3
- #define CLASS_PILOT 4
- #define CLASS_SPY 5
- new gHealed[MAX_PLAYERS][MAX_PLAYERS];
- new gDis[MAX_PLAYERS];
- new gPainkillers[MAX_PLAYERS];
- new bool:gArmour[MAX_PLAYERS];
- //------------------------------------------------
- new Text:gAnnouncementTD;
- new server_time;
- new server_weather;
- //------------------------------------------------
- #define MODE_TEAM_DEATHMATCH 0
- //
- #define MODE_MINIGUN 1
- new Float:gMinigunSpawn[][4] =
- {
- {2173.5723,1577.8872,999.9675,358.7795},
- {2205.8892,1580.4723,999.9788,37.6098},
- {2206.0720,1549.6593,1008.0951,296.3788},
- {2232.4290,1589.0771,999.9567,140.0240},
- {2199.4785,1613.1299,999.9723,305.1288}
- };
- //
- #define MODE_MONEYBAG 2
- new Float:gMoneybagSpawn[][4] =
- {
- {1301.7788,-785.7610,1084.0078,349.9862},
- {1233.7123,-762.2798,1084.0088,198.0181},
- {1277.9406,-792.4418,1084.0078,357.4828},
- {1247.2562,-803.8536,1084.0151,267.8687},
- {1279.7694,-781.3691,1089.9375,219.3016}
- };
- enum MoneyBagEnum
- {
- MONEYBAG_PICKUPID,
- MONEYBAG_PLAYER
- };
- new gMoneyBag[MoneyBagEnum];
- //
- #define MODE_RPG 3
- new Float:gRPGSpawn[][4] =
- {
- {246.9303,1385.9288,23.3703,0.0000},
- {165.2390,1357.2312,26.2036,0.0000},
- {165.9894,1426.7672,26.2623,0.0000},
- {132.4376,1355.1686,26.1223,134.3979},
- {203.1333,1398.6799,43.0946,0.0000}
- };
- //
- #define MODE_GLASS 4
- new Float:gGlassSpawn[][4] =
- {
- {67.3965,1553.5461,63.2100,135.7074},
- {41.8477,1517.2374,63.2500,320.5758},
- {68.7605,1553.4050,74.3600,146.1037},
- {42.5923,1514.3993,74.3600,322.1987},
- {47.5731,1526.2106,85.4100,324.7054}
- };
- //
- new gPlayerGamemode[MAX_PLAYERS];
- new gPlayerSkin[MAX_PLAYERS];
- //------------------------------------------------
- new Text3D:gPlayerLabel[MAX_PLAYERS];
- new Text3D:gDonorLabel[MAX_PLAYERS];
- new gWeaponKills[MAX_PLAYERS][45];
- //------------------------------------------------
- enum ShopEnum
- {
- Float:SHOP_X,
- Float:SHOP_Y,
- Float:SHOP_Z,
- SHOP_MAPICON,
- SHOP_PICKUP,
- Text3D:SHOP_LABEL,
- SHOP_TEAM
- };
- new gShop[][ShopEnum] =
- {
- {-249.5979, 2607.7800, 62.8582, -1, -1, Text3D:-1, 0}, //usa
- {-72.8491, 1212.3497, 19.7422, -1, -1, Text3D:-1, 1},
- {-749.5848, 1585.8888, 26.9609, -1, -1, Text3D:-1, 2},
- {-1399.7037, 2621.4133, 55.8359, -1, -1, Text3D:-1, 3},//russia
- {-2279.0632, 2333.4534, 4.9650, -1, -1, Text3D:-1, 4},//asia
- {1423.6886, 1093.9211, 10.8203, -1, -1, Text3D:-1, 5},
- {1005.8577, 2692.3618, 10.8203, -1, -1, Text3D:-1, 6},
- {1153.5768, 1916.5431, 10.8203, -1, -1, Text3D:-1, 7}, //africa briefcase
- {205.3770, 1871.9420, 13.1470, -1, -1, Text3D:-1, NO_TEAM},
- {1316.2604, 1611.9146, 10.8203, -1, -1, Text3D:-1, NO_TEAM},
- {413.7192, 2531.1372, 19.1721, -1, -1, Text3D:-1, NO_TEAM},
- {694.4229, 1925.4303, 5.6872, -1, -1, Text3D:-1, NO_TEAM},
- {-312.6868, 1768.5308, 43.6406, -1, -1, Text3D:-1, NO_TEAM},
- {-478.3294, 420.9321, 13.2134, -1, -1, Text3D:-1, NO_TEAM},
- {-2466.7185, 1535.9565, 23.6710, -1, -1, Text3D:-1, NO_TEAM},//pred's zone
- {-735.8380, 2414.0786, 127.9244, -1, -1, Text3D:-1, NO_TEAM},//Bio ship
- {-1226.4960, 1834.9684, 41.6455, -1, -1, Text3D:-1, NO_TEAM},
- {-691.3802, 942.0988, 13.6328, -1, -1, Text3D:-1, NO_TEAM},
- {-1377.3949, 1493.2915, 11.2031, -1, -1, Text3D:-1, NO_TEAM},
- {1092.1471, 996.8791, 11.0000, -1, -1, Text3D:-1, NO_TEAM},
- {638.1120, 1683.6479, 6.9922, -1, -1, Text3D:-1, NO_TEAM}
- };
- #define SLOT_SUIT 1
- new bool:gHelmet[MAX_PLAYERS];
- new bool:gMask[MAX_PLAYERS];
- new bool:gBomb[MAX_PLAYERS];
- new weapons[] =
- {
- 335,//knife
- 339,//katana
- 341,//chainsaw
- 342,//grenade
- 343,//teargas
- 344,//moltove
- 346,//9mm
- 347,//silenced 9mm
- 348,//deagle
- 349,//shotgun
- 350,//sawnoff shotgun
- 351,//combat shotgun
- 352,//UZI
- 353,//MP5
- 355,//ak-47
- 356,//m4
- 372,//tec-9
- 357,//rifle
- 358,//sniper rifle
- 359,//RPG,
- 358,//H.S. rockets
- 361,//flamethrower
- 363//satchel
- };
- new miscitems[] =
- {
- 365,//spray
- 366,//fire estinguisher
- 367,//camera
- 368,//night vision goggles
- 369,//thermal vision goggles
- 371//parachute
- };
- new gListitem[MAX_PLAYERS];
- //------------------------------------------------
- new gRandomMessage[][98] =
- {
- {"Want to get 3x Ammo? Purchase our cheap DONOR rank!"},
- {"We give full health & armour for donors! Purchase today!"},
- {"Type /Pm to privately message a player and /Dnd to disable PM.s!"},
- {"Are you bored of team deathmatch, go for deathmatch /Dm!"},
- {"Want to duel (1 vs. 1), try /Duel to challenge other players!"},
- {"Want to unlock classes, ranks, bonuses, and more? Get a DONOR rank!"},
- {"You can view your weapons skills with /skills!"},
- {"Checkout your overall stats of game, /stats!"},
- {"Go and register on our forums today, http://forum.sa-mp.com"},
- {"Shoot enemies, kill them and earn money to buy and unlock new stuff!"},
- {"Found a rule breaker, report that asshole; /report (id) (reason)!"},
- {"Are you aware of the rules, if not, then first visit /rules!"},
- {"ADMIN APPLICATION OPEN, apply on forums if you complete the requirements!"}
- };
- new gRandomMessageIndex;
- //------------------------------------------------
- enum AntiSpawnkillEnum
- {
- A_TIMER,
- Float:A_HP,
- Float:A_AR,
- Text3D:A_LABEL
- };
- new gAntiSpawnkill[MAX_PLAYERS][AntiSpawnkillEnum];
- #if !defined FLOAT_INFINITY
- #define FLOAT_INFINITY (Float:0x7F800000)
- #endif
- #if ! defined IsValidWeapon
- #define IsValidWeapon(%0) (%0 < 47)
- #endif
- //------------------------------------------------
- //duel system
- enum DuelEnum
- {
- bool:d_induel,
- d_opponent,
- d_weapon,
- d_bet
- };
- new gDuel[MAX_PLAYERS][DuelEnum];
- //------------------------------------------------
- new prestigeweapons[] =
- {
- 346,//9mm
- 347,//silenced 9mm
- 348,//deagle
- 349,//shotgun
- 350,//sawnoff shotgun
- 351,//combat shotgun
- 352,//UZI
- 353,//MP5
- 355,//ak-47
- 356,//m4
- 372,//tec-9
- 357,//rifle
- 358,//sniper rifle
- 361//flamethrower
- };
- //------------------------------------------------
- new duelweapons[] =
- {
- 341,//chainsaw
- 342,//grenade
- 343,//teargas
- 344,//moltove
- 346,//9mm
- 347,//silenced 9mm
- 348,//deagle
- 349,//shotgun
- 350,//sawnoff shotgun
- 351,//combat shotgun
- 352,//UZI
- 353,//MP5
- 355,//ak-47
- 356,//m4
- 372,//tec-9
- 357,//rifle
- 358,//sniper rifle
- 361//flamethrower
- };
- //------------------------------------------------
- enum SpawnEnum
- {
- Float:s_x,
- Float:s_y,
- Float:s_z,
- Float:s_a,
- s_zoneid
- };
- new gSpawn[][SpawnEnum] =
- {
- {424.9814, 2536.4038, 16.1484, 263.9873, 1}, //DA
- {166.5437, 1907.8031, 18.4831, 291.8274, 3}, //area51
- {-343.6802, 1542.7212, 75.5625, 185.6064, 0}, //big ear
- {997.6724, 1071.5734, 10.8203, 346.3479, 2}, //hospital
- {1340.6506, 1739.8250, 10.8203, 193.7531, 26}, //lv air
- {661.8121, 1719.2596, 6.9922, 31.1416, 4}, //gas station
- {-681.0104, 965.1415, 12.1328, 81.7329, 20}, //farmville
- {-2434.0388,1554.8348, 2.1172, 125.4610, 22}, //bio ship
- {-324.6687, 408.5620, 19.1164, 68.0201, 27}, //ship
- {-696.5515, 2344.1467, 127.5709, 75.9108, 18} //mountain outpost
- };
- #define SPAWN_BASE sizeof(gSpawn)
- new gPlayerSpawn[MAX_PLAYERS];
- new gPlayerMoneyTimer[MAX_PLAYERS];
- //------------------------------------------------
- //airdrop system (stor object id)
- #define MAX_AIRDROPS 100
- //
- enum AirdropEnum
- {
- AIRDROP_OBJECT,
- bool:AIRDROP_EXIST,
- Float:AIRDROP_POS[3],
- AIRDROP_EXPIRE,
- bool:AIRDROP_PICKED
- };
- new gAirdrop[MAX_AIRDROPS][AirdropEnum];
- //------------------------------------------------
- new gPlayerVehicle[MAX_PLAYERS];
- new gDonorSupply[MAX_PLAYERS];
- new gPlayerTimer[MAX_PLAYERS];
- new gCaptureSpree[MAX_PLAYERS];
- //------------------------------------------------
- main()
- {
- print("\n------------------------------------------");
- print("Running... | WORLD WAR III | By Gammix\n");
- print("------------------------------------------\n");
- }
- //------------------------------------------------
- public OnGameModeInit()
- {
- //
- print(" ");
- print("Initializing gamemode...");
- print(" ");
- //
- MapAndreas_Init(MAP_ANDREAS_MODE_FULL);
- //adding prestige weapons in DB
- GAdmin_VerifyColoumn("weapon1", BUD::TYPE_NUMBER);
- GAdmin_VerifyColoumn("weapon2", BUD::TYPE_NUMBER);
- GAdmin_VerifyColoumn("weapon3", BUD::TYPE_NUMBER);
- for(new i; i < MAX_AIRDROPS; i++) gAirdrop[i][AIRDROP_EXIST] = false;
- SetGameModeText("Tdm/Dm/Freeroam - Build 1");//My fav gamemode name!
- EnableVehicleFriendlyFire();//Anti team vehicle damaging
- DisableInteriorEnterExits();
- FadeInit();
- //add the class selection background box
- gClassBGTD = TextDrawCreateEx(324.000000, 331.000000, "bg", 255, 2, 0.000000, 5.699997, -1, 2, 0, true, 1, true, 100, 410.000000, 175.000000);
- //stats Background TDs
- gStatsBGTD[0] = TextDrawCreateEx(-4.000000, 443.000000, "box", 255,1, 0.000000, 1.100000, -1, 1, 1, true, 1, true, 180, 640.000000, 0.000000);
- gStatsBGTD[1] = TextDrawCreateEx(-4.000000, 440.000000, "box", 255,1, 0.000000, -0.099999, -1, 1, 1, true, 1, true, 175, 640.000000, 0.000000);
- gStatsBGTD[2] = TextDrawCreateEx(-4.000000, 437.000000, "box", 255,1, 0.000000, -0.099999, -1, 1, 1, true, 1, true, 150, 640.000000, 0.000000);
- gStatsBGTD[3] = TextDrawCreateEx(-4.000000, 434.000000, "box", 255,1, 0.000000, -0.099999, -1, 1, 1, true, 1, true, 50, 640.000000, 0.000000);
- gStatsBGTD[4] = TextDrawCreateEx(-4.000000, 430.000000, "box", 255,1, 0.000000, -0.099999, -1, 1, 1, true, 1, true, 30, 640.000000, 0.000000);
- //ann TD
- gAnnouncementTD = TextDrawCreateEx(4.000000, 442.000000, "~r~~h~~h~~h~Yuri(2) is now participating in /minigun deathmatch with 17 other players. Join in if you want to change gamemode!", 0 , 2, 0.150000, 0.599999, -1, 1 , 1, true);
- //add notification TDs
- gNotifyTD[0] = TextDrawCreateEx(330.000000, 358.000000, "-", 255, 1, 0.179997, 0.799997, -1, 1, 1, true);
- gNotifyTimer[0] = -1;
- gNotifyTD[1] = TextDrawCreateEx(330.000000, 366.000000, "-", 255, 1, 0.179997, 0.799997, -1, 1, 1, true);
- gNotifyTimer[1] = -1;
- gNotifyTD[2] = TextDrawCreateEx(330.000000, 374.000000, "-", 255, 1, 0.179997, 0.799997, -1, 1, 1, true);
- gNotifyTimer[2] = -1;
- //adding server TDs
- gServerTD[0] = TextDrawCreateEx(580.000000, -92.000000, "LD_POOL:ball", 255, 4, 0.500000, 1.000000, 150, 1, 0, true, 1, true, 0, 108.000000, 131.000000);
- gServerTD[1] = TextDrawCreateEx(637.000000, 3.000000, "~y~~h~~h~WORLD WAR ~g~~h~~h~~h~III", 255, 1, 0.119999, 0.799999, -1, 3, 1, true);
- gServerTD[2] = TextDrawCreateEx(637.000000, 3.000000, "~n~"SERVER_WEBSITE"~n~"SERVER_IP"~n~", 255, 1, 0.149999, 0.899999, -1, 3, 1, true);
- //moneybag dm
- gMoneyBag[MONEYBAG_PICKUPID] = CreateDynamicPickup(1550, 1, 1226.6163, -809.7188, 1084.0078, MODE_MONEYBAG, 5);
- gMoneyBag[MONEYBAG_PLAYER] = INVALID_PLAYER_ID;
- //bonus timer
- gBonusTimer = 0;
- gStopTimeUpdate = true;
- //nuke system
- gNuke[NUKE_TIME] = 0;
- gNuke[NUKE_PICKUP] = CreateDynamicPickup(1254, 1, 213.6032, 1822.6310, 6.4141, MODE_TEAM_DEATHMATCH, -1);
- gNuke[NUKE_MAPICON] = CreateDynamicMapIcon(213.6032, 1822.6310, 6.4141, 23, -1, MODE_TEAM_DEATHMATCH, -1, -1, 500.0, MAPICON_GLOBAL);
- gNuke[NUKE_LABEL] = CreateDynamic3DTextLabel("Nuke Station", COLOR_SetTransparency(COLOR_LIGHT_BLUE, 200), 213.6032, 1822.6310, 6.4141, 25.0, _, _, 0, MODE_TEAM_DEATHMATCH);
- gNuke[NUKE_BASE] = 0;
- //anthrax system
- gAnthrax[ANTHRAX_TIME] = 0;
- gAnthrax[ANTHRAX_PICKUP] = CreateDynamicPickup(1254, 1, -2471.7590, 1552.6415, 33.2273, MODE_TEAM_DEATHMATCH, -1);
- gAnthrax[ANTHRAX_MAPICON] = CreateDynamicMapIcon(-2471.7590, 1552.6415, 33.2273, 23, -1, MODE_TEAM_DEATHMATCH, -1, -1, 500.0, MAPICON_GLOBAL);
- gAnthrax[ANTHRAX_LABEL] = CreateDynamic3DTextLabel("Anthrax Station", COLOR_SetTransparency(COLOR_LIGHT_BLUE, 200), -2471.7590, 1552.6415, 33.2273, 25.0, _, _, 0, MODE_TEAM_DEATHMATCH);
- server_time = 1;
- server_weather = 1;
- //Add teams and print result
- print(" ");
- for(new i; i < sizeof(gTeam); i++)
- {
- AddPlayerClass(gTeam[i][E_SKIN], 0,0,0,0,0,0,0,0,0,0);
- printf("** Team created %s, id: %i", gTeam[i][E_NAME], i);
- if(i == (sizeof(gTeam) - 1)) printf("-> Total %i teams created from gamemode!", (i + 1));
- }
- //Add team bases and print result
- print(" ");
- for(new i; i < sizeof(gTeamBase); i++)
- {
- gTeamBase[i][b_base] = GangZoneCreate(gTeamBase[i][b_minx], gTeamBase[i][b_miny], gTeamBase[i][b_maxx], gTeamBase[i][b_maxy], gTeam[ gTeamBase[i][b_owner] ][E_COLOR], 2.0, COLOR_SetTransparency(COLOR_RED, 0xAA));//this creates the main gangzone
- printf("** Base created %s, base id: %i", gTeamBase[i][b_name], i);
- if(i == (sizeof(gTeamBase) - 1)) printf("-> Total %i bases created from gamemode!", (i + 1));
- }
- //Add team prototype vehicles and print result
- print(" ");
- new string[56];
- for(new i; i < sizeof(gPrototype); i++)
- {
- gPrototype[i][p_vehicle] = CreateVehicle(428, gPrototype[i][p_x], gPrototype[i][p_y], gPrototype[i][p_z], gPrototype[i][p_a], gTeam[ gPrototype[i][p_owner] ][E_COLOR], random(10), 60);
- SetVehicleVirtualWorld(gPrototype[i][p_vehicle], MODE_TEAM_DEATHMATCH);
- format(string, sizeof(string), "%s Prototype", gTeam[ gPrototype[i][p_owner] ][E_NAME]);
- gPrototype[i][p_label] = CreateDynamic3DTextLabel(string, gTeam[ gPrototype[i][p_owner] ][E_COLOR], 0.0, 0.0, 2.5, 50.0, _, gPrototype[i][p_vehicle], 0, MODE_TEAM_DEATHMATCH, -1);
- printf("** Prototype vehicle created for team %s, id: %i", gTeam[ gPrototype[i][p_owner] ][E_NAME], i);
- if(i == (sizeof(gPrototype) - 1)) printf("-> Total %i prototype vehicles created from gamemode!", (i + 1));
- }
- //Add capture zones and print result
- print(" ");
- for(new i; i < sizeof(gCaptureZone); i++)
- {
- gCaptureZone[i][E_ZONEID] = GangZoneCreate(gCaptureZone[i][E_ZONEMINX], gCaptureZone[i][E_ZONEMINY], gCaptureZone[i][E_ZONEMAXX], gCaptureZone[i][E_ZONEMAXY], gTeam[ gCaptureZone[i][E_ZONEOWNER] ][E_COLOR], 2.0);
- gCaptureZone[i][E_ZONECP] = CreateDynamicCP(gCaptureZone[i][E_CPX], gCaptureZone[i][E_CPY], gCaptureZone[i][E_CPZ], 5.0, MODE_TEAM_DEATHMATCH, -1, -1, 400.0);
- gCaptureZone[i][E_ZONEICON] = CreateDynamicMapIcon(gCaptureZone[i][E_CPX], gCaptureZone[i][E_CPY], gCaptureZone[i][E_CPZ], 19, -1, MODE_TEAM_DEATHMATCH, -1, -1, 500.0, MAPICON_GLOBAL);
- format(string, sizeof(string), "%s's\n%s(%i)", gTeam[ gCaptureZone[i][E_ZONEOWNER] ][E_NAME], gCaptureZone[i][E_ZONENAME], i);
- gCaptureZone[i][E_ZONELABEL] = CreateDynamic3DTextLabel(string, COLOR_SetTransparency(gTeam[ gCaptureZone[i][E_ZONEOWNER] ][E_COLOR], 200), gCaptureZone[i][E_CPX], gCaptureZone[i][E_CPY], gCaptureZone[i][E_CPZ], 25.0, _, _, 0, MODE_TEAM_DEATHMATCH);
- gCaptureZone[i][E_ZONETIMER] = SetTimerEx("OnCaptureZoneUpdate", 1000, true, "i", i);
- printf("** Capture zone created %s, id: %i, owner team: %s", gCaptureZone[i][E_ZONENAME], i, gTeam[ gCaptureZone[i][E_ZONEOWNER] ][E_NAME]);
- if(i == (sizeof(gCaptureZone) - 1)) printf("-> Total %i capture zones created from gamemode!", (i + 1));
- }
- //Add shops and print result
- print(" ");
- for(new i; i < sizeof(gShop); i++)
- {
- gShop[i][SHOP_MAPICON] = CreateDynamicMapIcon(gShop[i][SHOP_X], gShop[i][SHOP_Y], gShop[i][SHOP_Z], 6, -1, 0, -1, -1, 500.0, MAPICON_GLOBAL);
- gShop[i][SHOP_PICKUP] = CreateDynamicPickup(2358, 1, gShop[i][SHOP_X], gShop[i][SHOP_Y], gShop[i][SHOP_Z], MODE_TEAM_DEATHMATCH, -1);
- gShop[i][SHOP_LABEL] = CreateDynamic3DTextLabel("Ammuntaion Point", COLOR_SetTransparency(COLOR_LIGHT_BLUE, 200), gShop[i][SHOP_X], gShop[i][SHOP_Y], gShop[i][SHOP_Z], 25.0, _, _, 0, MODE_TEAM_DEATHMATCH);
- printf("** Shop created, id: %i", i);
- if(i == (sizeof(gShop) - 1)) printf("-> Total %i shops created from gamemode!", (i + 1));
- }
- //Add ranks and print result
- print(" ");
- for(new i; i < sizeof(gRank); i++)
- {
- printf("** Rank created %s, id: %i, score: %i", gRank[i][r_name], i, gRank[i][r_score]);
- if(i == (sizeof(gRank) - 1)) printf("-> Total %i ranks created from gamemode!", (i + 1));
- }
- return 1;
- }
- //------------------------------------------------
- public OnGameModeExit()
- {
- MapAndreas_Unload();
- for(new i; i < 3; i++) KillTimer(gNotifyTimer[i]);
- FadeExit();
- //destory all capture zones created
- for(new i; i < sizeof(gCaptureZone); i++)
- {
- GangZoneDestroy(gCaptureZone[i][E_ZONEID]);
- DestroyDynamicCP(gCaptureZone[i][E_ZONECP]);
- DestroyDynamicCP(gCaptureZone[i][E_ZONEICON]);
- DestroyDynamic3DTextLabel(gCaptureZone[i][E_ZONELABEL]);
- KillTimer(gCaptureZone[i][E_ZONETIMER]);
- }
- //destroy all team prototypes
- for(new i; i < sizeof(gPrototype); i++)
- {
- DestroyVehicle(gPrototype[i][p_vehicle]);
- DestroyDynamic3DTextLabel(gPrototype[i][p_label]);
- }
- //destory all team bases
- for(new i; i < sizeof(gTeamBase); i++)
- {
- GangZoneDestroy(gTeamBase[i][b_base]);
- }
- //destroy all shops
- for(new i; i < sizeof(gShop); i++)
- {
- DestroyDynamicMapIcon(gShop[i][SHOP_MAPICON]);
- DestroyDynamicPickup(gShop[i][SHOP_PICKUP]);
- DestroyDynamic3DTextLabel(gShop[i][SHOP_LABEL]);
- }
- //destroy moneybag
- DestroyDynamicPickup(gMoneyBag[MONEYBAG_PICKUPID]);
- //nuke system
- DestroyDynamicPickup(gNuke[NUKE_PICKUP]);
- DestroyDynamicMapIcon(gNuke[NUKE_MAPICON]);
- DestroyDynamic3DTextLabel(gNuke[NUKE_LABEL]);
- //anthrax system
- DestroyDynamicPickup(gAnthrax[ANTHRAX_PICKUP]);
- DestroyDynamicMapIcon(gAnthrax[ANTHRAX_MAPICON]);
- DestroyDynamic3DTextLabel(gAnthrax[ANTHRAX_LABEL]);
- return 1;
- }
- //------------------------------------------------
- NotifyAll(text[], expiretime = 10000)
- {
- new slot = -1;
- for(new i = 0; i < 3; i++)
- {
- if(gNotifyTimer[i] == -1)
- {
- slot = i;
- break;
- }
- }
- if(slot == -1) slot = 0;
- if(gNotifyTimer[slot] != -1) KillTimer(gNotifyTimer[slot]);
- gNotifyTimer[slot] = SetTimerEx("OnNotificationExpire", expiretime, false, "i", slot);
- TextDrawSetString(gNotifyTD[slot], text);
- foreach(new i : Player)
- {
- if(IsPlayerSpawned(i))
- {
- TextDrawShowForPlayer(i, gNotifyTD[slot]);
- }
- }
- return true;
- }
- forward OnNotificationExpire(slot);
- public OnNotificationExpire(slot)
- {
- gNotifyTimer[slot] = -1;
- TextDrawSetString(gNotifyTD[slot], "");
- foreach(new i : Player)
- {
- TextDrawHideForPlayer(i, gNotifyTD[slot]);
- }
- return 1;
- }
- NotifyPlayer(playerid, text[], expiretime = 10000)
- {
- if(! IsPlayerSpawned(playerid)) return false;
- if(gPNotifyTimer[playerid] != -1) KillTimer(gPNotifyTimer[playerid]);
- gPNotifyTimer[playerid] = SetTimerEx("OnPlayerNotificationExpire", expiretime, false, "i", playerid);
- PlayerTextDrawSetString(playerid, gPNotifyTD[playerid], text);
- PlayerTextDrawShow(playerid, gPNotifyTD[playerid]);
- return true;
- }
- forward OnPlayerNotificationExpire(playerid);
- public OnPlayerNotificationExpire(playerid)
- {
- gPNotifyTimer[playerid] = -1;
- PlayerTextDrawSetString(playerid, gPNotifyTD[playerid], "-");
- PlayerTextDrawHide(playerid, gPNotifyTD[playerid]);
- return 1;
- }
- //------------------------------------------------
- ReturnWeaponName(weaponid)
- {
- new weaponstr[45];
- switch(weaponid)
- {
- case 0: weaponstr = "Fist";
- case 18: weaponstr = "Molotov Cocktail";
- case 44: weaponstr = "Night Vision Goggles";
- case 45: weaponstr = "Thermal Goggles";
- default: GetWeaponName(weaponid, weaponstr, sizeof(weaponstr));
- }
- return weaponstr;
- }
- //------------------------------------------------
- public OnPlayerConnect(playerid)
- {
- for(new i; i < 45; i++) gWeaponKills[playerid][i] = 0;
- gPlayerTimer[playerid] = SetTimerEx("OnPlayerTimeUpdate", 1000, true, "i", playerid);
- gPlayerSpawn[playerid] = SPAWN_BASE;
- gAntiSpawnkill[playerid][A_TIMER] = -1;
- gDuel[playerid][d_induel] = false;
- gDuel[playerid][d_opponent] = INVALID_PLAYER_ID;
- gDuel[playerid][d_weapon] = 0;
- gDuel[playerid][d_bet] = 0;
- gPlayerVehicle[playerid] = -1;
- gDonorSupply[playerid] = -1;
- gCaptureSpree[playerid] = 0;
- //3d text label
- gPlayerLabel[playerid] = CreateDynamic3DTextLabel("Support", 0, 0.0, 0.0, 0.5, 20.0, playerid, _, 1);
- gDonorLabel[playerid] = CreateDynamic3DTextLabel("DONOR", 0, 0.0, 0.0, 0.3, 20.0, playerid, _, 1);
- DisablePlayerRaceCheckpoint(playerid);
- gPlayerMoneyTimer[playerid] = -1;
- gPNotifyTimer[playerid] = -1;
- //class
- gClass[playerid] = 0;
- for(new i; i < MAX_PLAYERS; i++) gHealed[playerid][i] = -1;
- gDis[playerid] = 0;
- gListitem[playerid] = -1;
- gPainkillers[playerid] = 0;
- gArmour[playerid] = false;
- //add player class selection team skin based on classid
- gPlayerClassTD[playerid][0] = CreatePlayerTextDrawEx(playerid, 237.000000, 332.000000, "model", 169090710, 5, 0.500000, 1.000000, -1, 1, 0, true, 1, true, 0, 70.000000, 50.000000, 0, 0.000000, 0.000000, 0.000000, 0.899999);
- //add player class selection team info based on classid
- gPlayerClassTD[playerid][1] = CreatePlayerTextDrawEx(playerid, 310.000000, 332.000000, "team info", 0, 1, 0.180000, 1.000000, -56, 1, 0, true, 1);
- //add player notification TD
- gPNotifyTD[playerid] = CreatePlayerTextDrawEx(playerid, 330.000000, 388.000000, "Welcome user!", 255, 1, 0.199998, 0.999997, -1, 1, 1, true);
- //add player stats TD
- gPlayerStatsTD[playerid] = CreatePlayerTextDrawEx(playerid, 4.000000, 436.000000,"~g~~h~~h~Doraemon ~h~Latino's Begginer Medic ~w~~h~- /Help, /Cmds, /Duel, /Dm, /Teles, /Pm, /Object - ~b~~h~~h~~h~Skills!", 0 , 2, 0.150000, 0.599999, -1, 1 , 1, true);
- FadePlayerConnect(playerid);
- gPlayerCaptureBar[playerid] = CreatePlayerProgressBar(playerid, 44.000000, 318.000000, 89.500000, 3.700000, -1429936641, CAPTURE_TIME, 0);
- gPlayerCaptureTD[playerid] = CreatePlayerTextDrawEx(playerid, 87.000000, 308.000000, "Capturing 23...", 255, 1, 0.290000, 1.099999, -1, 2, 1, true, 1, true);
- gPlayerTeam[playerid] = NO_TEAM;
- //random message!
- SendClientMessage(playerid, COLOR_WHITE, "Welcome to the legendary "ORANGE_RED"WORLD WAR III "WHITE"server.");
- SendClientMessage(playerid, COLOR_HOT_PINK, "Try out our new player country lookups with "LIGHT_BLUE"/country"HOT_PINK"; find all friends from your country.");
- SendClientMessage(playerid, COLOR_HOT_PINK, "Type "LIGHT_BLUE"/hi "HOT_PINK"for enabling or disabling hit indicator or editing it.");
- //notifications
- new string[145];
- format(string, sizeof(string), "~g~%s(%i) have joined the server", ReturnPlayerName(playerid), playerid);
- NotifyAll(string, 5000);
- return 1;
- }
- //------------------------------------------------
- public OnPlayerDisconnect(playerid, reason)
- {
- KillTimer(gPlayerTimer[playerid]);
- if(gDuel[playerid][d_induel])
- {
- GivePlayerMoney(gDuel[playerid][d_opponent], gDuel[playerid][d_bet]);
- new string[144];
- format(string, sizeof(string), "%s have won the duel against opponent %s [weapon: %s, bet: $%i]", ReturnPlayerName(gDuel[playerid][d_opponent]), ReturnPlayerName(playerid), ReturnWeaponName(gDuel[playerid][d_weapon]), gDuel[playerid][d_bet]);
- SendClientMessageToAll(COLOR_AQUA, string);
- format(string, sizeof(string), "%s have won the duel against opponent %s", ReturnPlayerName(gDuel[playerid][d_opponent]), ReturnPlayerName(playerid));
- NotifyAll(string);
- gDuel[gDuel[playerid][d_opponent]][d_induel] = false;
- gDuel[gDuel[playerid][d_opponent]][d_opponent] = INVALID_PLAYER_ID;
- gDuel[gDuel[playerid][d_opponent]][d_weapon] = 0;
- gDuel[gDuel[playerid][d_opponent]][d_bet] = 0;
- gDuel[playerid][d_induel] = false;
- gDuel[playerid][d_opponent] = INVALID_PLAYER_ID;
- gDuel[playerid][d_weapon] = 0;
- gDuel[playerid][d_bet] = 0;
- }
- //3d text label
- DestroyDynamic3DTextLabel(gPlayerLabel[playerid]);
- //money bag droping
- if(playerid == gMoneyBag[MONEYBAG_PLAYER])
- {
- RemovePlayerAttachedObject(playerid, 1);
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- gMoneyBag[MONEYBAG_PICKUPID] = CreateDynamicPickup(1550, 1, x, y, z, MODE_MONEYBAG);
- gMoneyBag[MONEYBAG_PLAYER] = INVALID_PLAYER_ID;
- new string[145];
- foreach(new i : Player)
- {
- if(gPlayerGamemode[i] == MODE_MONEYBAG)
- {
- format(string, sizeof(string), "~r~%s(%d) have lost the~n~~r~money bag", ReturnPlayerName(playerid), playerid);
- GameTextForPlayer(i, string, 5000, 3);
- }
- }
- }
- //destoy all player textdraws
- DestroyAllPlayerTextDraws(playerid);
- FadePlayerDisconnect(playerid);
- //hiding all capture zones
- for(new i; i < sizeof(gCaptureZone); i++) GangZoneHideForPlayer(playerid, gCaptureZone[i][E_ZONEID]);
- //hiding all team bases
- for(new i; i < sizeof(gTeamBase); i++) GangZoneHideForPlayer(playerid, gTeamBase[i][b_base]);
- DestroyPlayerProgressBar(playerid, gPlayerCaptureBar[playerid]);
- gPlayerTeam[playerid] = NO_TEAM;
- //notifications
- new string[145];
- switch(reason)
- {
- case 0: format(string, sizeof(string), "~r~%s(%i) have left the server [Timeout/Crashed]", ReturnPlayerName(playerid), playerid);
- case 1: format(string, sizeof(string), "~r~%s(%i) have left the server [Quit]", ReturnPlayerName(playerid), playerid);
- case 2: format(string, sizeof(string), "~r~%s(%i) have left the server [Kicked/Banned]", ReturnPlayerName(playerid), playerid);
- }
- NotifyAll(string, 5000);
- return 1;
- }
- //------------------------------------------------
- stock CountTeamPlayers(team)
- {
- new count;
- foreach(new i : Player)
- {
- if( IsPlayerConnected(i)//if player is connected
- && GetPlayerTeam(i) == team)//if team id matches
- {
- count++;//add one to the count
- }
- }
- return count;
- }
- //------------------------------------------------
- stock CountTeamFlags(team)
- {
- new count;
- for(new i; i < sizeof(gCaptureZone); i++)
- {
- if(gCaptureZone[i][E_ZONEOWNER] == team)
- {
- count++;
- }
- }
- return count;
- }
- //------------------------------------------------
- stock CountEventPlayers(event)
- {
- new count = 0;
- foreach(new i : Player)
- {
- if(gPlayerGamemode[i] == event)//if event id matches
- {
- count++;//add one to the count
- }
- }
- return count;
- }
- //------------------------------------------------
- GetPlayerRank(playerid)
- {
- for(new i = 0; i < sizeof(gRank); i++)
- {
- if(GetPlayerScore(playerid) <= 0)
- {
- return 0;
- }
- else if(GetPlayerScore(playerid) >= gRank[(sizeof(gRank) - 1)][r_score])
- {
- return (sizeof(gRank) - 1);
- }
- else if(GetPlayerScore(playerid) < gRank[i][r_score])
- {
- return (i - 1);
- }
- }
- return 0;
- }
- //------------------------------------------------
- ReturnPlayerClassName(playerid)
- {
- new classstr[28] = "Unknown";
- switch(gClass[playerid])
- {
- case 0: classstr = "Support";
- case 1: classstr = "Medic";
- case 2: classstr = "Scout";
- case 3: classstr = "Jetrunner";
- case 4: classstr = "Pilot";
- case 5: classstr = "Spy";
- case 6: classstr = "Terminator";
- }
- return classstr;
- }
- //------------------------------------------------
- ShowPlayerClassSelectionDialog(playerid)
- {
- new dialogstr[556];
- new rank = GetPlayerRank(playerid);
- strcat(dialogstr, ""LIGHT_BLUE"Support (Rank 0+)\n");
- strcat(dialogstr, ""LIGHT_BLUE"Medic (Rank 0+)\n");
- if(rank >= 1) strcat(dialogstr, ""LIGHT_BLUE"Scout (Rank 1+)\n");
- else strcat(dialogstr, ""GRAY"Scout (Rank 1+)\n");
- if(rank >= 3) strcat(dialogstr, ""LIGHT_BLUE"Jetrunner (Rank 3+)\n");
- else strcat(dialogstr, ""GRAY"Jetrunner (Rank 3+)\n");
- if(rank >= 5) strcat(dialogstr, ""LIGHT_BLUE"Pilot (Rank 5+)\n");
- else strcat(dialogstr, ""GRAY"Pilot (Rank 5+)\n");
- if(rank >= 8) strcat(dialogstr, ""LIGHT_BLUE"Spy (Rank 8+)\n");
- else strcat(dialogstr, ""GRAY"Spy (Rank 8+)\n");
- if(rank >= 12) strcat(dialogstr, ""LIGHT_BLUE"Terminator (Rank 12+)\n");
- else strcat(dialogstr, ""GRAY"Terminator (Rank 12+)\n");
- return ShowPlayerDialog(playerid, DIALOG_CLASS, DIALOG_STYLE_LIST, "Class selection (/sc)", dialogstr, "Spawn", "Last Class");
- }
- //------------------------------------------------
- ShowPlayerShopDialog(playerid)
- {
- new dialogstr[556];
- strcat(dialogstr, ""LIGHT_BLUE"Full Health ($2500)\n");
- strcat(dialogstr, ""LIGHT_BLUE"Full Armour ($2500)\n");
- strcat(dialogstr, ""CORAL"- Weapons List\n");
- strcat(dialogstr, ""CORAL"- Misc. Items\n");
- strcat(dialogstr, ""CORAL"- Inventory Items");
- return ShowPlayerDialog(playerid, DIALOG_SHOP, DIALOG_STYLE_LIST, "Shop!", dialogstr, "Select", "Close");
- }
- //------------------------------------------------
- public OnPlayerRequestClass(playerid, classid)
- {
- gAntiSpawnkill[playerid][A_TIMER] = -1;
- gClassSelection[playerid] = true;
- gPlayerGamemode[playerid] = MODE_TEAM_DEATHMATCH;
- SetPlayerPos(playerid,398.4077,2540.5049,19.6311);
- SetPlayerCameraPos(playerid,398.4077,2530.5049,19.6311);
- SetPlayerCameraLookAt(playerid,398.4077,2540.5049,19.6311);
- SetPlayerFacingAngle(playerid, 180.0);
- //show the class selc background box. not for whole screen, just a small section
- TextDrawShowForPlayer(playerid, gClassBGTD);
- //set and show model textdraw with team skin
- PlayerTextDrawSetPreviewModel(playerid, gPlayerClassTD[playerid][0], gTeam[classid][E_SKIN]);
- PlayerTextDrawShow(playerid, gPlayerClassTD[playerid][0]);
- //display team info textdraw
- PlayerTextDrawShow(playerid, gPlayerClassTD[playerid][1]);
- //hide player rank & stats TDs
- PlayerTextDrawHide(playerid, gPlayerStatsTD[playerid]);
- //hide notification TDs
- for(new i; i < 3; i++) TextDrawHideForPlayer(playerid, gNotifyTD[i]);
- //hide player notification TDs
- PlayerTextDrawHide(playerid, gPNotifyTD[playerid]);
- //hide stats TDs
- for(new i; i < 5; i++) TextDrawHideForPlayer(playerid, gStatsBGTD[i]);
- TextDrawHideForPlayer(playerid, gAnnouncementTD);
- //hide server TDs
- for(new i; i < 3; i++) TextDrawHideForPlayer(playerid, gServerTD[i]);
- SetPlayerTeam(playerid, classid);
- gPlayerTeam[playerid] = classid;
- SetPlayerPos(playerid,398.4077,2540.5049,19.6311);
- SetPlayerCameraPos(playerid,398.4077,2530.5049,19.6311);
- SetPlayerCameraLookAt(playerid,398.4077,2540.5049,19.6311);
- SetPlayerFacingAngle(playerid, 180.0);
- new string[156];
- format(string, sizeof(string), "%s ~w~~h~[~g~~h~%d~w~~h~]~n~- Players: ~y~~h~%d~n~~w~~h~- Flags: ~y~~h~%d/%d~n~~w~~h~- Bonus: ~y~~h~Full health!", gTeam[classid][E_NAME], (classid + 1), CountTeamPlayers(classid), CountTeamFlags(classid), sizeof(gCaptureZone));
- PlayerTextDrawSetString(playerid, gPlayerClassTD[playerid][1], string);
- HidePlayerProgressBar(playerid, gPlayerCaptureBar[playerid]);
- PlayerTextDrawHide(playerid, gPlayerCaptureTD[playerid]);
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- if(gPlayerTeam[playerid] == 7) gPlayerSpawn[playerid] = SPAWN_BASE;
- return 1;
- }
- //------------------------------------------------
- public OnPlayerSpawn(playerid)
- {
- gDonorSupply[playerid] = 3;
- gCaptureSpree[playerid] = 0;
- for(new i; i < MAX_PLAYER_ATTACHED_OBJECTS; i++) RemovePlayerAttachedObject(playerid, i);
- if(gDuel[playerid][d_induel])
- {
- GivePlayerMoney(gDuel[playerid][d_opponent], gDuel[playerid][d_bet]);
- new string[144];
- format(string, sizeof(string), "%s have won the duel against opponent %s [weapon: %s, bet: $%i]", ReturnPlayerName(gDuel[playerid][d_opponent]), ReturnPlayerName(playerid), ReturnWeaponName(gDuel[playerid][d_weapon]), gDuel[playerid][d_bet]);
- SendClientMessageToAll(COLOR_AQUA, string);
- format(string, sizeof(string), "%s have won the duel against opponent %s", ReturnPlayerName(gDuel[playerid][d_opponent]), ReturnPlayerName(playerid));
- NotifyAll(string);
- gDuel[gDuel[playerid][d_opponent]][d_induel] = false;
- gDuel[gDuel[playerid][d_opponent]][d_opponent] = INVALID_PLAYER_ID;
- gDuel[gDuel[playerid][d_opponent]][d_weapon] = 0;
- gDuel[gDuel[playerid][d_opponent]][d_bet] = 0;
- gDuel[playerid][d_induel] = false;
- gDuel[playerid][d_opponent] = INVALID_PLAYER_ID;
- gDuel[playerid][d_weapon] = 0;
- gDuel[playerid][d_bet] = 0;
- }
- gDuel[playerid][d_induel] = false;
- gDuel[playerid][d_opponent] = INVALID_PLAYER_ID;
- gDuel[playerid][d_weapon] = 0;
- gDuel[playerid][d_bet] = 0;
- gAntiSpawnkill[playerid][A_TIMER] = -1;
- for(new i; i < 45; i++) gWeaponKills[playerid][i] = 0;
- for(new i; i < MAX_PLAYERS; i++)
- {
- if(gHealed[playerid][i] != -1) KillTimer(gHealed[playerid][i]);
- gHealed[playerid][i] = -1;
- }
- gDis[playerid] = 0;
- gPlayerLastVehicle[playerid] = -1;
- gPainkillers[playerid] = 0;
- gArmour[playerid] = false;
- gHelmet[playerid] = false;
- gMask[playerid] = false;
- gBomb[playerid] = false;
- gListitem[playerid] = -1;
- //hide the class selc background box. not for whole screen, just a small section
- TextDrawHideForPlayer(playerid, gClassBGTD);
- //hide model textdraw with team skin
- PlayerTextDrawHide(playerid, gPlayerClassTD[playerid][0]);
- //hide team info textdraw
- PlayerTextDrawHide(playerid, gPlayerClassTD[playerid][1]);
- //show player rank & stats TDs
- PlayerTextDrawShow(playerid, gPlayerStatsTD[playerid]);
- //show stats TDs
- for(new i; i < 5; i++) TextDrawShowForPlayer(playerid, gStatsBGTD[i]);
- TextDrawShowForPlayer(playerid, gAnnouncementTD);
- //show server TDs
- for(new i; i < 3; i++) TextDrawShowForPlayer(playerid, gServerTD[i]);
- //showing all zones
- ShowAllGangZonesForPlayer(playerid);
- //Set player capture zones status
- for(new i; i < sizeof(gCaptureZone); i++)
- {
- if(gCaptureZone[i][E_ZONEATTACKED])
- {
- GangZoneFlashForPlayer(playerid, gCaptureZone[i][E_ZONEID], gTeam[ GetPlayerTeam(gCaptureZone[i][E_ZONEATTACKER]) ][E_COLOR]);
- }
- }
- HidePlayerProgressBar(playerid, gPlayerCaptureBar[playerid]);
- PlayerTextDrawHide(playerid, gPlayerCaptureTD[playerid]);
- DisablePlayerRaceCheckpoint(playerid);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, 0);
- switch(gPlayerGamemode[playerid])
- {
- case MODE_MINIGUN://if the player is in minigun deathmatch mode
- {
- //hiding all zones
- HideAllGangZonesForPlayer(playerid);
- //team messages
- SendClientMessage(playerid, COLOR_WHITE, " ");
- new string[156];
- format(string, sizeof(string), "You have spawned as a "RED"Minigun deathmatcher"WHITE"! There are "LIGHT_BLUE"%i "WHITE"others playing here!", CountEventPlayers(MODE_MINIGUN));
- SendClientMessage(playerid, COLOR_WHITE, string);
- SendClientMessage(playerid, COLOR_WHITE, "Your mission is to eliminate the other players (expcept admins) as soon as you see them.");
- SendClientMessage(playerid, COLOR_WHITE, "Type /minigunhelp to get help about the deathmatch.");
- SetPlayerTeam(playerid, NO_TEAM);
- SetPlayerColor(playerid, COLOR_RED);
- SetPlayerInterior(playerid, 1);
- SetPlayerVirtualWorld(playerid, MODE_MINIGUN);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 38, 999999999);
- new randomspawn = random(sizeof(gMinigunSpawn));
- SetPlayerPos(playerid, gMinigunSpawn[randomspawn][0], gMinigunSpawn[randomspawn][1], gMinigunSpawn[randomspawn][2]);
- SetPlayerFacingAngle(playerid, gMinigunSpawn[randomspawn][3]);
- SetPlayerHealth(playerid, 100.0);
- SetPlayerArmour(playerid, 0.0);
- SetPlayerSkin(playerid, gPlayerSkin[playerid]);
- TogglePlayerMarker(playerid, true);
- }
- case MODE_MONEYBAG://if the player is in moneybag deathmatch mode
- {
- //hiding all capture zones
- HideAllGangZonesForPlayer(playerid);
- //team messages
- SendClientMessage(playerid, COLOR_WHITE, " ");
- new string[156];
- format(string, sizeof(string), "You have spawned as a "RED"Moneybag deathmatcher"WHITE"! There are "LIGHT_BLUE"%i "WHITE"others playing here!", CountEventPlayers(MODE_MONEYBAG));
- SendClientMessage(playerid, COLOR_WHITE, string);
- SendClientMessage(playerid, COLOR_WHITE, "Your mission is to eliminate the other players (expcept admins) as soon as you see them.");
- SendClientMessage(playerid, COLOR_WHITE, "Type /moneybaghelp to get help about the deathmatch.");
- TogglePlayerControllable(playerid, true);
- SetPlayerTeam(playerid, NO_TEAM);
- SetPlayerColor(playerid, COLOR_RED);
- SetPlayerInterior(playerid, 5);
- SetPlayerVirtualWorld(playerid, MODE_MONEYBAG);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 24, 999999999);
- GivePlayerWeapon(playerid, 27, 999999999);
- GivePlayerWeapon(playerid, 29, 999999999);
- new randomspawn = random(sizeof(gMoneybagSpawn));
- SetPlayerPos(playerid, gMoneybagSpawn[randomspawn][0], gMoneybagSpawn[randomspawn][1], gMoneybagSpawn[randomspawn][2]);
- SetPlayerFacingAngle(playerid, gMoneybagSpawn[randomspawn][3]);
- SetPlayerHealth(playerid, 100.0);
- SetPlayerArmour(playerid, 0.0);
- SetPlayerSkin(playerid, gPlayerSkin[playerid]);
- TogglePlayerMarker(playerid, true);
- }
- case MODE_RPG://if the player is in RPG deathmatch mode
- {
- //hiding all capture zones
- HideAllGangZonesForPlayer(playerid);
- //team messages
- SendClientMessage(playerid, COLOR_WHITE, " ");
- new string[156];
- format(string, sizeof(string), "You have spawned as a "RED"RPG deathmatcher"WHITE"! There are "LIGHT_BLUE"%i "WHITE"others playing here!", CountEventPlayers(MODE_RPG));
- SendClientMessage(playerid, COLOR_WHITE, string);
- SendClientMessage(playerid, COLOR_WHITE, "Your mission is to eliminate the other players (expcept admins) as soon as you see them.");
- SendClientMessage(playerid, COLOR_WHITE, "Type /minigunhelp to get help about the deathmatch.");
- SetPlayerTeam(playerid, NO_TEAM);
- SetPlayerColor(playerid, COLOR_RED);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, MODE_RPG);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 35, 999999999);
- new randomspawn = random(sizeof(gRPGSpawn));
- SetPlayerPos(playerid, gRPGSpawn[randomspawn][0], gRPGSpawn[randomspawn][1], gRPGSpawn[randomspawn][2]);
- SetPlayerFacingAngle(playerid, gRPGSpawn[randomspawn][3]);
- SetPlayerHealth(playerid, 20.0);
- SetPlayerArmour(playerid, 0.0);
- SetPlayerSkin(playerid, gPlayerSkin[playerid]);
- TogglePlayerMarker(playerid, true);
- }
- case MODE_GLASS://if the player is in RPG deathmatch mode
- {
- //hiding all capture zones
- HideAllGangZonesForPlayer(playerid);
- //team messages
- SendClientMessage(playerid, COLOR_WHITE, " ");
- new string[156];
- format(string, sizeof(string), "You have spawned as a "RED"Glass break deathmatcher"WHITE"! There are "LIGHT_BLUE"%i "WHITE"others playing here!", CountEventPlayers(MODE_GLASS));
- SendClientMessage(playerid, COLOR_WHITE, string);
- SendClientMessage(playerid, COLOR_WHITE, "Your mission is to eliminate the other players (expcept admins) as soon as you see them.");
- SendClientMessage(playerid, COLOR_WHITE, "Type /minigunhelp to get help about the deathmatch.");
- SetPlayerTeam(playerid, NO_TEAM);
- SetPlayerColor(playerid, COLOR_RED);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, MODE_GLASS);
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, 25, 999999999);
- GivePlayerWeapon(playerid, 23, 999999999);
- GivePlayerWeapon(playerid, 1, 1);
- new randomspawn = random(sizeof(gGlassSpawn));
- Streamer_UpdateEx(playerid, gGlassSpawn[randomspawn][0], gGlassSpawn[randomspawn][1], gGlassSpawn[randomspawn][2], MODE_GLASS, 0, STREAMER_TYPE_OBJECT);
- SetPlayerPos(playerid, gGlassSpawn[randomspawn][0], gGlassSpawn[randomspawn][1], gGlassSpawn[randomspawn][2]);
- SetPlayerFacingAngle(playerid, gGlassSpawn[randomspawn][3]);
- SetPlayerHealth(playerid, 100.0);
- SetPlayerArmour(playerid, 0.0);
- SetPlayerSkin(playerid, gPlayerSkin[playerid]);
- TogglePlayerMarker(playerid, true);
- }
- case MODE_TEAM_DEATHMATCH:
- {
- if(GetPlayerTeam(playerid) != 100)
- {
- //bag object
- SetPlayerAttachedObject(playerid, 1, 3026, 1, -0.133000, -0.094000, 0.000000, 0.000000, 0.000000, 0.000000, 1.000000, 1.289000, 1.000000);
- SetPlayerTeam(playerid, gPlayerTeam[playerid]);
- SetPlayerColor(playerid, gTeam[GetPlayerTeam(playerid)][E_COLOR]);
- TogglePlayerMarker(playerid, true);
- //team messages
- SendClientMessage(playerid, COLOR_WHITE, " ");
- new string[156];
- format(string, sizeof(string), "You have spawned as team: {%06x}%s", ( gTeam[ GetPlayerTeam(playerid) ][E_COLOR] >>> 8 ), gTeam[ GetPlayerTeam(playerid) ][E_NAME]);
- SendClientMessage(playerid, COLOR_WHITE, string);
- SendClientMessage(playerid, COLOR_WHITE, "You can't attack your team mates, can't jack their vehicle, can't damage their vehicles either.");
- SendClientMessage(playerid, COLOR_WHITE, "Type /teams to get info. about all teams.");
- if(gPlayerSpawn[playerid] != SPAWN_BASE)
- {
- if(gCaptureZone[gSpawn[gPlayerSpawn[playerid]][s_zoneid]][E_ZONEOWNER] != GetPlayerTeam(playerid))
- {
- format(string, sizeof(string), "ERROR: Your team don't own %s anymore! You are spawned in base", gCaptureZone[gSpawn[gPlayerSpawn[playerid]][s_zoneid]][E_ZONENAME]);
- SendClientMessage(playerid, COLOR_FIREBRICK, string);
- gPlayerSpawn[playerid] = SPAWN_BASE;
- }
- else
- {
- format(string, sizeof(string), "* You have spawned in %s.", gCaptureZone[gSpawn[gPlayerSpawn[playerid]][s_zoneid]][E_ZONENAME]);
- SendClientMessage(playerid, COLOR_WHITE, string);
- SetPlayerPos(playerid, gSpawn[gPlayerSpawn[playerid]][s_x], gSpawn[gPlayerSpawn[playerid]][s_y], gSpawn[gPlayerSpawn[playerid]][s_z]);
- SetPlayerFacingAngle(playerid, gSpawn[gPlayerSpawn[playerid]][s_a]);
- }
- }
- if(gPlayerSpawn[playerid] == SPAWN_BASE)
- {
- SendClientMessage(playerid, COLOR_WHITE, "* You have spawned in your BASE.");
- new randomspawn = 0;
- switch(GetPlayerTeam(playerid))
- {
- case 0:
- {
- randomspawn = random(sizeof(gUSASpawn));
- SetPlayerPos(playerid, gUSASpawn[randomspawn][0], gUSASpawn[randomspawn][1], gUSASpawn[randomspawn][2]);
- SetPlayerFacingAngle(playerid, gUSASpawn[randomspawn][3]);
- }
- case 1:
- {
- randomspawn = random(sizeof(gEuropeSpawn));
- SetPlayerPos(playerid, gEuropeSpawn[randomspawn][0], gEuropeSpawn[randomspawn][1], gEuropeSpawn[randomspawn][2]);
- SetPlayerFacingAngle(playerid, gEuropeSpawn[randomspawn][3]);
- }
- case 2:
- {
- randomspawn = random(sizeof(gRussiaSpawn));
- SetPlayerPos(playerid, gRussiaSpawn[randomspawn][0], gRussiaSpawn[randomspawn][1], gRussiaSpawn[randomspawn][2]);
- SetPlayerFacingAngle(playerid, gRussiaSpawn[randomspawn][3]);
- }
- case 3:
- {
- randomspawn = random(sizeof(gLatinoSpawn));
- SetPlayerPos(playerid, gLatinoSpawn[randomspawn][0], gLatinoSpawn[randomspawn][1], gLatinoSpawn[randomspawn][2]);
- SetPlayerFacingAngle(playerid, gLatinoSpawn[randomspawn][3]);
- }
- case 4:
- {
- randomspawn = random(sizeof(gAsiaSpawn));
- SetPlayerPos(playerid, gAsiaSpawn[randomspawn][0], gAsiaSpawn[randomspawn][1], gAsiaSpawn[randomspawn][2]);
- SetPlayerFacingAngle(playerid, gAsiaSpawn[randomspawn][3]);
- }
- case 5:
- {
- randomspawn = random(sizeof(gAustraliaSpawn));
- SetPlayerPos(playerid, gAustraliaSpawn[randomspawn][0], gAustraliaSpawn[randomspawn][1], gAustraliaSpawn[randomspawn][2]);
- SetPlayerFacingAngle(playerid, gAustraliaSpawn[randomspawn][3]);
- }
- case 6:
- {
- randomspawn = random(sizeof(gIndiaSpawn));
- SetPlayerPos(playerid, gIndiaSpawn[randomspawn][0], gIndiaSpawn[randomspawn][1], gIndiaSpawn[randomspawn][2]);
- SetPlayerFacingAngle(playerid, gIndiaSpawn[randomspawn][3]);
- }
- case 7:
- {
- randomspawn = random(sizeof(gAfricaSpawn));
- SetPlayerPos(playerid, gAfricaSpawn[randomspawn][0], gAfricaSpawn[randomspawn][1], gAfricaSpawn[randomspawn][2]);
- SetPlayerFacingAngle(playerid, gAfricaSpawn[randomspawn][3]);
- }
- }
- }
- //push to class selection dialog
- if( gClassSelection[playerid] &&
- GetPlayerTeam(playerid) != 7)
- {
- TogglePlayerControllable(playerid, false);
- SendClientMessage(playerid, COLOR_ORANGE_RED, "> Please select your favourite class and click SPAWN; Go for LAST CLASS if in a hurry!");
- return ShowPlayerClassSelectionDialog(playerid);
- }
- new rank = GetPlayerRank(playerid);
- switch(GetPlayerTeam(playerid))
- {
- case 0..6:
- {
- //class setup
- switch(gClass[playerid])
- {
- case 0:
- {
- NotifyPlayer(playerid, "You have selected class ~g~Support", 5000);
- SendClientMessage(playerid, COLOR_CORAL, "- Your class is "LIGHT_BLUE"Support "HOT_PINK"(You recieve class bonus according to your rank!)");
- switch(rank)
- {
- case 0..2:
- {
- GivePlayerWeapon(playerid, 30, 100 * (rank + 1));
- GivePlayerWeapon(playerid, 8, 1);
- GivePlayerWeapon(playerid, 17, 3);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Ak-47, Katana, Teargas.");
- }
- case 3..5:
- {
- GivePlayerWeapon(playerid, 30, 300);
- GivePlayerWeapon(playerid, 24, 100);
- GivePlayerWeapon(playerid, 8, 1);
- GivePlayerWeapon(playerid, 17, 5);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Ak-47, Desert Eagle, Katana, Teargas.");
- }
- default:
- {
- GivePlayerWeapon(playerid, 31, 300);
- GivePlayerWeapon(playerid, 24, 200);
- GivePlayerWeapon(playerid, 8, 1);
- GivePlayerWeapon(playerid, 17, 5);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: M4, Desert Eagle, Katana, Teargas.");
- }
- }
- }
- case 1:
- {
- NotifyPlayer(playerid, "You have selected class ~g~Medic", 5000);
- SendClientMessage(playerid, COLOR_CORAL, "- Your class is "LIGHT_BLUE"Medic "HOT_PINK"(You recieve class bonus according to your rank!)");
- switch(rank)
- {
- case 0..2:
- {
- GivePlayerWeapon(playerid, 29, 100 * (rank + 1));
- GivePlayerWeapon(playerid, 9, 1);
- GivePlayerWeapon(playerid, 18, 2);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Ak-47, Chainsaw, Moltove.");
- }
- case 3..5:
- {
- GivePlayerWeapon(playerid, 29, 500);
- GivePlayerWeapon(playerid, 9, 1);
- GivePlayerWeapon(playerid, 18, 3);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Ak-47, Chainsaw, Moltove.");
- }
- default:
- {
- GivePlayerWeapon(playerid, 29, 500);
- GivePlayerWeapon(playerid, 23, 200);
- GivePlayerWeapon(playerid, 9, 1);
- GivePlayerWeapon(playerid, 18, 4);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Ak-47, Silenced 9mm, Chainsaw, Moltove.");
- }
- }
- gPainkillers[playerid] = 3;
- }
- case 2:
- {
- NotifyPlayer(playerid, "You have selected class ~g~Scout", 5000);
- SendClientMessage(playerid, COLOR_CORAL, "- Your class is "LIGHT_BLUE"Scout "HOT_PINK"(You recieve class bonus according to your rank!)");
- switch(rank)
- {
- case 1..2:
- {
- GivePlayerWeapon(playerid, 33, 100 * (rank + 1));
- GivePlayerWeapon(playerid, 4, 1);
- GivePlayerWeapon(playerid, 17, 2);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Country Rifle, Knife, Teargas.");
- }
- case 3..5:
- {
- GivePlayerWeapon(playerid, 34, 500);
- GivePlayerWeapon(playerid, 4, 1);
- GivePlayerWeapon(playerid, 17, 4);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Sniper Rifle, Knife, Teargas.");
- }
- default:
- {
- GivePlayerWeapon(playerid, 34, 500);
- GivePlayerWeapon(playerid, 22, 200);
- GivePlayerWeapon(playerid, 4, 1);
- GivePlayerWeapon(playerid, 17, 5);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Sniper Rifle, 9mm, Knife, Teargas.");
- }
- }
- TogglePlayerMarker(playerid, false);
- }
- case 3:
- {
- NotifyPlayer(playerid, "You have selected class ~g~Jetrunner", 5000);
- SendClientMessage(playerid, COLOR_CORAL, "- Your class is "LIGHT_BLUE"Jetrunner "HOT_PINK"(You recieve class bonus according to your rank!)");
- switch(rank)
- {
- case 3:
- {
- GivePlayerWeapon(playerid, 32, 300);
- GivePlayerWeapon(playerid, 3, 1);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Tec-9, Baseball bat.");
- }
- case 4..7:
- {
- GivePlayerWeapon(playerid, 32, 500);
- GivePlayerWeapon(playerid, 22, 100);
- GivePlayerWeapon(playerid, 3, 1);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Tec-9, 9mm, Baseball bat.");
- }
- default:
- {
- GivePlayerWeapon(playerid, 32, 500);
- GivePlayerWeapon(playerid, 26, 100);
- GivePlayerWeapon(playerid, 3, 1);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Tec-9, Sawnoff Shotgun, Baseball bat.");
- }
- }
- }
- case 4:
- {
- NotifyPlayer(playerid, "You have selected class ~g~Pilot", 5000);
- SendClientMessage(playerid, COLOR_CORAL, "- Your class is "LIGHT_BLUE"Pilot "HOT_PINK"(You recieve class bonus according to your rank!)");
- switch(rank)
- {
- case 5:
- {
- GivePlayerWeapon(playerid, 25, 200);
- GivePlayerWeapon(playerid, 24, 50);
- GivePlayerWeapon(playerid, 17, 3);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Shotgun, Desert eagle, Teargas.");
- }
- case 6..8:
- {
- GivePlayerWeapon(playerid, 25, 200);
- GivePlayerWeapon(playerid, 24, 100);
- GivePlayerWeapon(playerid, 17, 3);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Shotgun, Desert eagle, Teargas.");
- }
- default:
- {
- GivePlayerWeapon(playerid, 25, 200);
- GivePlayerWeapon(playerid, 24, 200);
- GivePlayerWeapon(playerid, 18, 3);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Shotgun, Desert eagle, Moltoves.");
- }
- }
- }
- case 5:
- {
- NotifyPlayer(playerid, "You have selected class ~g~Spy", 5000);
- SendClientMessage(playerid, COLOR_CORAL, "- Your class is "LIGHT_BLUE"Spy "HOT_PINK"(You recieve class bonus according to your rank!)");
- switch(rank)
- {
- case 8:
- {
- GivePlayerWeapon(playerid, 29, 200);
- GivePlayerWeapon(playerid, 23, 100);
- GivePlayerWeapon(playerid, 18, 3);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: MP4, Silenced 9mm, Moltove.");
- }
- case 9..10:
- {
- GivePlayerWeapon(playerid, 29, 300);
- GivePlayerWeapon(playerid, 23, 200);
- GivePlayerWeapon(playerid, 18, 3);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: MP4, Silenced 9mm, Moltove.");
- }
- default:
- {
- GivePlayerWeapon(playerid, 29, 300);
- GivePlayerWeapon(playerid, 23, 200);
- GivePlayerWeapon(playerid, 25, 200);
- GivePlayerWeapon(playerid, 18, 3);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: MP4, Silenced 9mm, Shotgun, Moltove.");
- }
- }
- gDis[playerid] = 3;
- }
- case 6:
- {
- NotifyPlayer(playerid, "You have selected class ~g~Terminator", 5000);
- SendClientMessage(playerid, COLOR_CORAL, "- Your class is "LIGHT_BLUE"Terminator");
- GivePlayerWeapon(playerid, 38, 100);
- GivePlayerWeapon(playerid, 24, 300);
- GivePlayerWeapon(playerid, 9, 1);
- GivePlayerWeapon(playerid, 18, 10);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Minigun, Desert Eagle, Chainsaw Moltoves.");
- }
- }
- }
- default:
- {
- NotifyPlayer(playerid, "~r~There is no classes for team AFRICA!", 5000);
- switch(rank)
- {
- case 0..3:
- {
- GivePlayerWeapon(playerid, 30, 200);
- GivePlayerWeapon(playerid, 24, 100);
- GivePlayerWeapon(playerid, 4, 1);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Ak-47, Desert Eagle, Knife.");
- }
- case 4..7:
- {
- GivePlayerWeapon(playerid, 30, 500);
- GivePlayerWeapon(playerid, 24, 300);
- GivePlayerWeapon(playerid, 4, 1);
- GivePlayerWeapon(playerid, 18, 5);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Ak-47, Desert Eagle, Knife, Moltove.");
- }
- default:
- {
- GivePlayerWeapon(playerid, 30, 500);
- GivePlayerWeapon(playerid, 24, 300);
- GivePlayerWeapon(playerid, 4, 1);
- GivePlayerWeapon(playerid, 18, 5);
- GivePlayerWeapon(playerid, 35, 1);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Ak-47, Desert Eagle, Knife, Moltove, RPG.");
- }
- }
- }
- }
- if(GetPlayerTeam(playerid) != 7) SendClientMessage(playerid, COLOR_WHITE, "Type /chelp to get info. about your class; Type /sc to switch class in next spawn.");
- //anti spawnkill system
- switch(rank)
- {
- case 0: gAntiSpawnkill[playerid][A_HP] = 100.0, gAntiSpawnkill[playerid][A_AR] = 100.0;
- case 1: gAntiSpawnkill[playerid][A_HP] = 75.0, gAntiSpawnkill[playerid][A_AR] = 0.0;
- case 2: gAntiSpawnkill[playerid][A_HP] = 90.0, gAntiSpawnkill[playerid][A_AR] = 0.0;
- case 3: gAntiSpawnkill[playerid][A_HP] = 100.0, gAntiSpawnkill[playerid][A_AR] = 0.0;
- case 4..5: gAntiSpawnkill[playerid][A_HP] = 100.0, gAntiSpawnkill[playerid][A_AR] = 10.0;
- case 6..7: gAntiSpawnkill[playerid][A_HP] = 100.0, gAntiSpawnkill[playerid][A_AR] = 25.0;
- case 8..10: gAntiSpawnkill[playerid][A_HP] = 100.0, gAntiSpawnkill[playerid][A_AR] = 45.0;
- case 11..13: gAntiSpawnkill[playerid][A_HP] = 100.0, gAntiSpawnkill[playerid][A_AR] = 60.0;
- case 14..15: gAntiSpawnkill[playerid][A_HP] = 100.0, gAntiSpawnkill[playerid][A_AR] = 75.0;
- default: gAntiSpawnkill[playerid][A_HP] = 100.0, gAntiSpawnkill[playerid][A_AR] = 100.0;
- }
- format(string, sizeof(string), "* Your current rank is %s! Recieved a bonus of %0.2f% HEALTH and %0.2f% ARMOUR!", gRank[rank][r_name], gAntiSpawnkill[playerid][A_HP], gAntiSpawnkill[playerid][A_AR]);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- SendClientMessage(playerid, COLOR_RED, "-> You have Anti - Spawnkill protection for 10 seconds !");
- gAntiSpawnkill[playerid][A_LABEL] = CreateDynamic3DTextLabel("Anti - Spawnkill protected", COLOR_RED, 0.0, 0.0, 0.3, 20.0, playerid, _, 1);
- gAntiSpawnkill[playerid][A_TIMER] = 10;
- SetPlayerHealth(playerid, FLOAT_INFINITY);
- //prestige weapons
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) > 2 || rank >= 10)
- {
- new weaponid;
- GAdmin_RetrieveUserData(ReturnPlayerName(playerid), "i", "weapon1", weaponid);
- if(IsValidWeapon(weaponid) && weaponid != 0)
- {
- format(string, sizeof(string), "* You recieved a %s as your prestige weapon I!", ReturnWeaponName(weaponid));
- SendClientMessage(playerid, COLOR_YELLOW, string);
- GivePlayerWeapon(playerid, weaponid, 200);
- }
- }
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) > 2 || rank >= 15)
- {
- new weaponid;
- GAdmin_RetrieveUserData(ReturnPlayerName(playerid), "i", "weapon2", weaponid);
- if(IsValidWeapon(weaponid) && weaponid != 0)
- {
- format(string, sizeof(string), "* You recieved a %s as your prestige weapon II!", ReturnWeaponName(weaponid));
- SendClientMessage(playerid, COLOR_YELLOW, string);
- GivePlayerWeapon(playerid, weaponid, 200);
- }
- }
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) > 2 || rank >= 20)
- {
- new weaponid;
- GAdmin_RetrieveUserData(ReturnPlayerName(playerid), "i", "weapon3", weaponid);
- if(IsValidWeapon(weaponid) && weaponid != 0)
- {
- format(string, sizeof(string), "* You recieved a %s as your prestige weapon III!", ReturnWeaponName(weaponid));
- SendClientMessage(playerid, COLOR_YELLOW, string);
- GivePlayerWeapon(playerid, weaponid, 200);
- }
- }
- }
- }
- }
- return 1;
- }
- //------------------------------------------------
- public OnPlayerDeath(playerid, killerid, reason)
- {
- new string[144];
- if(gDuel[playerid][d_induel])
- {
- GivePlayerMoney(gDuel[playerid][d_opponent], gDuel[playerid][d_bet]);
- format(string, sizeof(string), "%s have won the duel against opponent %s [weapon: %s, bet: $%i]", ReturnPlayerName(gDuel[playerid][d_opponent]), ReturnPlayerName(playerid), ReturnWeaponName(gDuel[playerid][d_weapon]), gDuel[playerid][d_bet]);
- SendClientMessageToAll(COLOR_AQUA, string);
- format(string, sizeof(string), "%s have won the duel against opponent %s", ReturnPlayerName(gDuel[playerid][d_opponent]), ReturnPlayerName(playerid));
- NotifyAll(string);
- gDuel[gDuel[playerid][d_opponent]][d_induel] = false;
- gDuel[gDuel[playerid][d_opponent]][d_opponent] = INVALID_PLAYER_ID;
- gDuel[gDuel[playerid][d_opponent]][d_weapon] = 0;
- gDuel[gDuel[playerid][d_opponent]][d_bet] = 0;
- gDuel[playerid][d_induel] = false;
- gDuel[playerid][d_opponent] = INVALID_PLAYER_ID;
- gDuel[playerid][d_weapon] = 0;
- gDuel[playerid][d_bet] = 0;
- }
- if(gBomb[playerid])
- {
- if(IsPlayerAttachedObjectSlotUsed(playerid, 4))
- {
- new Float:pos[3];
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- CreateExplosion(pos[0], pos[1], pos[2], 6, 1.00);
- gBomb[playerid] = false;
- GameTextForPlayer(playerid, "~g~DEMOLISHED", 3000, 3);
- foreach(new i : Player)
- {
- if(gPlayerGamemode[i] == MODE_TEAM_DEATHMATCH)
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(i, x, y, z);
- if(IsPlayerInRangeOfPoint(playerid, 3.0, x, y, z))
- {
- if(GetPlayerTeam(i) != GetPlayerTeam(i))
- {
- SetPlayerHealth(i, 0.0);
- GameTextForPlayer(i, "~b~DEMOLISHED", 3000, 3);
- format(string, sizeof(string), "* You got demolished by %s (Sucide Bomb)", ReturnPlayerName(playerid));
- SendClientMessage(i, COLOR_YELLOW, string);
- format(string, sizeof(string), "* You demolished %s with your Sucide Bomb!", ReturnPlayerName(i));
- SendClientMessage(playerid, COLOR_YELLOW, string);
- SendDeathMessage(playerid, i, 49);
- new kills;
- GAdmin_RetrieveUserData(ReturnPlayerName(playerid), "i", "kills", kills);
- GAdmin_ChangeUserData(ReturnPlayerName(playerid), "i", "kills", kills + 1);
- }
- }
- }
- }
- }
- }
- PlayAudioStreamForPlayer(playerid,"http://k003.kiwi6.com/hotlink/vn2ctdhha3/game_over.mp3");
- new money = random(2000);
- GivePlayerMoney(playerid, - money);
- format(string, sizeof(string), "You lost -$%i!", money);
- SendClientMessage(playerid, COLOR_RED, string);
- //money bag droping
- if(playerid == gMoneyBag[MONEYBAG_PLAYER])
- {
- RemovePlayerAttachedObject(playerid, 1);
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- gMoneyBag[MONEYBAG_PICKUPID] = CreateDynamicPickup(1550, 1, x, y, z, MODE_MONEYBAG);
- gMoneyBag[MONEYBAG_PLAYER] = INVALID_PLAYER_ID;
- foreach(new i : Player)
- {
- if(gPlayerGamemode[i] == MODE_MONEYBAG)
- {
- format(string, sizeof(string), "~r~%s(%d) have lost the~n~~r~money bag", ReturnPlayerName(playerid), playerid);
- GameTextForPlayer(i, string, 5000, 3);
- }
- }
- }
- gPlayerLastVehicle[playerid] = -1;
- HidePlayerProgressBar(playerid, gPlayerCaptureBar[playerid]);
- PlayerTextDrawHide(playerid, gPlayerCaptureTD[playerid]);
- //our fading effect on screen!
- FadeColorForPlayer(playerid, 0, 0, 0, 200, 0, 0, 0, 0, 20, 10);
- return 1;
- }
- //------------------------------------------------
- public OnFadeComplete(playerid, beforehold)
- {
- return 1;
- }
- //------------------------------------------------
- public OnPlayerTimeUpdate(playerid)
- {
- new rank = GetPlayerRank(playerid);
- new hours, minutes, seconds;
- GetPlayerConnectedTime(playerid, hours, minutes, seconds);
- new string[256];
- if( gPlayerGamemode[playerid] == MODE_TEAM_DEATHMATCH &&
- GetPlayerTeam(playerid) < sizeof(gTeam))
- {
- format(string, sizeof(string), "%s\n\n%s", gRank[rank][r_name], ReturnPlayerClassName(playerid));
- UpdateDynamic3DTextLabelText(gPlayerLabel[playerid], GetPlayerColor(playerid), string);
- format(string, sizeof(string), "~g~~h~%s ~h~%s's ~h~%s ~h~%s ~w~~h~- /Help, /Cmds, /Duel, /Minigun, /Moneybag, /Glass, /Rpg - ~b~~h~~h~~h~%s~y~- ~w~~h~%i : %i : %i", ReturnPlayerName(playerid), gTeam[GetPlayerTeam(playerid)][E_NAME], gRank[rank][r_name], ReturnPlayerClassName(playerid), gRandomMessage[gRandomMessageIndex], hours, minutes, seconds);
- }
- else if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH)
- {
- format(string, sizeof(string), "Killed %i players", GetPlayerKills(playerid));
- UpdateDynamic3DTextLabelText(gPlayerLabel[playerid], GetPlayerColor(playerid), string);
- format(string, sizeof(string), "~g~~h~%s ~h~%s ~h~Deathmatcher ~w~~h~- /Help, /Cmds, /Duel, /Exit, /Dm, /Teles, /Pm, /Players - ~b~~h~~h~~h~Type /exit to return to team deathmatch!~y~- ~w~~h~%i : %i : %i", ReturnPlayerName(playerid), gRank[rank][r_name], hours, minutes, seconds);
- }
- else
- {
- UpdateDynamic3DTextLabelText(gPlayerLabel[playerid], GetPlayerColor(playerid), "-");
- format(string, sizeof(string), "~g~~h~%s ~h~%s ~h~Deathmatcher ~w~~h~- /Help, /Cmds, /Duel, /Minigun, /Moneybag, /Glass, /Rpg - ~b~~h~~h~~h~%s~y~- ~w~~h~%i : %i : %i", ReturnPlayerName(playerid), gRank[rank][r_name], gRandomMessage[gRandomMessageIndex], hours, minutes, seconds);
- }
- PlayerTextDrawSetString(playerid, gPlayerStatsTD[playerid], string);
- //anti spawnkill
- if(gAntiSpawnkill[playerid][A_TIMER] != -1)
- {
- gAntiSpawnkill[playerid][A_TIMER] -= 1;
- if(gAntiSpawnkill[playerid][A_TIMER] <= 0)
- {
- gAntiSpawnkill[playerid][A_TIMER] = -1;
- SetPlayerHealth(playerid, gAntiSpawnkill[playerid][A_HP]);
- SetPlayerArmour(playerid, gAntiSpawnkill[playerid][A_AR]);
- DestroyDynamic3DTextLabel(gAntiSpawnkill[playerid][A_LABEL]);
- SendClientMessage(playerid, COLOR_RED, "-> Anti - Spawnkill protection over !");
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) > 2)
- {
- ResetPlayerWeapons(playerid);
- new weapon, ammo;
- for(new i; i < 11; i++)
- {
- GetPlayerWeaponData(playerid, i, weapon, ammo);
- GivePlayerWeapon(playerid, weapon, ammo * 3);
- }
- SendClientMessage(playerid, COLOR_ORANGE_RED, "* You have recieved 3x additional ammo for each weapon (DONOR Level 3).");
- }
- }
- }
- //airdrop system
- if( ! GetPlayerVirtualWorld(playerid) &&
- ! GetPlayerInterior(playerid) &&
- IsPlayerSpawned(playerid) &&
- ! IsPlayerInAnyVehicle(playerid))
- {
- for(new i; i < MAX_AIRDROPS; i++)
- {
- if(gAirdrop[i][AIRDROP_EXIST])
- {
- if(! gAirdrop[i][AIRDROP_PICKED])
- {
- if(IsPlayerInRangeOfPoint(playerid, 5.0, gAirdrop[i][AIRDROP_POS][0], gAirdrop[i][AIRDROP_POS][1], gAirdrop[i][AIRDROP_POS][2]))
- {
- GameTextForPlayer(playerid, "~n~~n~~n~~n~~n~~b~~h~~h~~h~Press ~h~~k~~CONVERSATION_NO~ ~b~~h~~h~~h~to pick", 1000, 3);
- break;
- }
- }
- }
- }
- }
- return 1;
- }
- public OnTimeUpdate()
- {
- new hours, minutes, seconds;
- gettime(hours, minutes, seconds);
- if( server_time != hours &&
- gStopTimeUpdate)
- {
- server_time = hours;
- switch(server_weather)
- {
- case 1: server_weather = 2;
- case 2: server_weather = 3;
- case 3: server_weather = 4;
- case 4: server_weather = 5;
- case 5: server_weather = 6;
- case 6: server_weather = 10;
- case 10: server_weather = 11;
- case 11: server_weather = 12;
- case 12: server_weather = 13;
- case 13: server_weather = 14;
- case 14: server_weather = 15;
- case 15: server_weather = 17;
- case 17: server_weather = 18;
- case 18: server_weather = 23;
- case 23: server_weather = 24;
- case 24: server_weather = 25;
- case 25: server_weather = 26;
- case 26: server_weather = 27;
- case 27: server_weather = 28;
- case 29: server_weather = 33;
- case 33: server_weather = 34;
- case 34: server_weather = 35;
- case 35: server_weather = 36;
- case 36: server_weather = 37;
- case 37: server_weather = 40;
- case 40: server_weather = 41;
- case 41: server_weather = 46;
- case 46: server_weather = 47;
- case 47: server_weather = 48;
- case 48: server_weather = 49;
- default: server_weather = 1;
- }
- SetWorldTime(server_time);
- SetWeather(server_weather);
- new string[144];
- format(string, sizeof(string), "* Server Time: %i:%i:%i", hours, minutes, seconds);
- SendClientMessageToAll(COLOR_LIGHT_BLUE, string);
- }
- if(gNuke[NUKE_TIME] > 0)
- {
- gNuke[NUKE_TIME] -= 1;
- if(gNuke[NUKE_TIME] <= 0)
- {
- new string[144];
- format(string, sizeof(string), "* The nuclear missle is ready to launch now!", hours, minutes, seconds);
- SendClientMessageToAll(COLOR_LIGHT_BLUE, string);
- }
- }
- gBonusTimer += 1;
- if(gBonusTimer >= BONUS_INTERVAL)
- {
- gBonusTimer = 0;
- gRandomMessageIndex = random(sizeof(gRandomMessage));
- new Float:val, intval;
- foreach(new i : Player)
- {
- if(GetPlayerTeam(i) == gCaptureZone[HEALTH_ZONE][E_ZONEOWNER])
- {
- SendClientMessage(i, COLOR_KHAKI, "* Your team recieved +5 HP. from Cluckin bell.");
- GetPlayerHealth(i, val);
- if((val + 5.0) >= 100.0) SetPlayerHealth(i, 100.0);
- else SetPlayerHealth(i, (val + 5.0));
- }
- if(GetPlayerTeam(i) == gCaptureZone[ARMOUR_ZONE][E_ZONEOWNER])
- {
- SendClientMessage(i, COLOR_KHAKI, "* Your team recieved +5 AR. from Shipment.");
- GetPlayerArmour(i, val);
- if((val + 5.0) >= 100.0) SetPlayerArmour(i, 100.0);
- else SetPlayerArmour(i, (val + 5.0));
- }
- if(GetPlayerTeam(i) == gCaptureZone[AMMO_ZONE][E_ZONEOWNER])
- {
- SendClientMessage(i, COLOR_KHAKI, "* Your team recieved +Ammo. for your current weapon from Shooting Range.");
- intval = GetPlayerWeapon(i);
- switch(intval)
- {
- case 16..18,35,36,39: SetPlayerAmmo(i, intval, (GetPlayerAmmo(i) + 1));
- case 22..34,38,41,42,43: SetPlayerAmmo(i, intval, (GetPlayerAmmo(i) + 25));
- case 37: SetPlayerAmmo(i, intval, (GetPlayerAmmo(i) + 75));
- }
- }
- }
- }
- return 1;
- }
- //------------------------------------------------
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- return 1;
- }
- public OnPlayerStreamOut(playerid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- //locking team prototypes for team members
- for(new i; i < sizeof(gPrototype); i++)
- {
- if(vehicleid == gPrototype[i][p_vehicle])
- {
- if(GetPlayerTeam(forplayerid) == gPrototype[i][p_owner] || GetPlayerTeam(forplayerid) == NO_TEAM) SetVehicleParamsForPlayer(gPrototype[i][p_vehicle], forplayerid, 1, 1);
- else SetVehicleParamsForPlayer(gPrototype[i][p_vehicle], forplayerid, 1, 0);
- }
- }
- return 1;
- }
- //------------------------------------------------
- public OnVehicleSpawn(vehicleid)
- {
- for(new i; i < sizeof(gPrototype); i++)
- {
- if(vehicleid == gPrototype[i][p_vehicle])
- {
- if(gPrototype[i][p_attacker] != INVALID_PLAYER_ID)
- {
- gPlayerLastVehicle[gPrototype[i][p_attacker]] = -1;
- }
- gPrototype[i][p_attacked] = false;
- gPrototype[i][p_attacker] = INVALID_PLAYER_ID;
- break;
- }
- }
- return 1;
- }
- //------------------------------------------------
- public OnVehicleDeath(vehicleid, killerid)
- {
- for(new i; i < sizeof(gPrototype); i++)
- {
- if(vehicleid == gPrototype[i][p_vehicle])
- {
- if(gPrototype[i][p_attacked])
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(gPrototype[i][p_attacker], name, sizeof(name));
- new string[156];
- format(string, sizeof(string), "PROTOTYPE: %s(%d) failed to steel team %s's prototype vehicle.", name, gPrototype[i][p_attacker], gTeam[ gPrototype[i][p_owner] ][E_NAME]);
- SendClientMessageToAll(COLOR_TOMATO, string);
- format(string, sizeof(string), "~b~~h~~h~~h~%s(%d) ~w~~h~failed to steel team %s's prototype vehicle.", name, gPrototype[i][p_attacker], gTeam[ gPrototype[i][p_owner] ][E_NAME]);
- NotifyAll(string, 5000);
- DisablePlayerRaceCheckpoint(gPrototype[i][p_attacker]);
- gPrototype[i][p_attacked] = false;
- gPrototype[i][p_attacker] = INVALID_PLAYER_ID;
- break;
- }
- }
- }
- return 1;
- }
- //------------------------------------------------
- //synchronize system, not 100% !!
- SyncPlayer(playerid)
- {
- new world = GetPlayerVirtualWorld(playerid);//store player virtual world in var
- new interior = GetPlayerInterior(playerid);//store player interior in var
- TogglePlayerControllable(playerid, false);//freeze player
- SetPlayerVirtualWorld(playerid, world + 1);//changing the world id
- SetPlayerInterior(playerid, interior + 1);//changeing the interior (+1)
- SetPlayerVirtualWorld(playerid, world);//reset to default world
- SetPlayerInterior(playerid, interior);//reset to default interior
- TogglePlayerControllable(playerid, true);//unfreeze player
- ClearAnimations(playerid);//clear anims
- return true;//sucess
- }
- //------------------------------------------------
- public OnPlayerUpdate(playerid)
- {
- //anti-team knifing - not 100% accurate but sometimes work
- if(GetPlayerWeapon(playerid) == 4)//if the player have a knife
- {
- if(GetPlayerAnimationIndex(playerid) != 0)//if an animation is being run over
- {
- new animation[2][35];//variable where we will store animation data
- GetAnimationName(GetPlayerAnimationIndex(playerid), animation[0], 35, animation[1], 35);//getting the animation data
- if( !strcmp(animation[0], "KNIFE", true)//if player is having animation from "KNIFE@" library
- && !strcmp(animation[1], "KILL_KnifMONEYBAG_PLAYER", true))//if the animation is "stabbing" knife animation
- {
- new target = GetPlayerTargetPlayer(playerid);//get the player target, the one who is going to get stabbed
- if(IsPlayerConnected(target))//if the target player is connected, then proceed
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(target, x, y, z);//store player position data in FLOATING variables
- if(IsPlayerInRangeOfPoint(playerid, 5.0, x, y, z))//an aditional check if the player is in range so that false detects or animations are not detected! You can set the range accordingly!
- {
- if(GetPlayerTeam(playerid) == GetPlayerTeam(target))//if the target's team is same that of player, then proceed
- {
- ClearAnimations(playerid);//clear player animations
- GetPlayerPos(playerid, x, y, z);//store player position coords
- SetPlayerPos(playerid, x, y, z+5);//a sort of eject system, simply sets player height!
- GameTextForPlayer(playerid, "~r~Don't knife your Teammates", 3000, 3);//a warning gametext to player
- SyncPlayer(target);//sync the target who got stabbed! This is not 100% sure system, maybe the desync is still there!
- }
- }
- }
- }
- }
- }
- //moneybag DM
- if(gMoneyBag[MONEYBAG_PLAYER] == playerid)
- {
- GivePlayerMoney(playerid, 1);
- }
- return 1;
- }
- //------------------------------------------------
- forward OnCaptureZoneUpdate(zoneid);
- public OnCaptureZoneUpdate(zoneid)
- {
- new players = 0;
- new string[156];
- if(gCaptureZone[zoneid][E_ZONEATTACKED])
- {
- foreach(new i : Player)
- {
- if( IsPlayerInDynamicCP(i, gCaptureZone[zoneid][E_ZONECP]) &&
- GetPlayerTeam(i) == GetPlayerTeam(gCaptureZone[zoneid][E_ZONEATTACKER]) &&
- ! IsPlayerInAnyVehicle(i))
- {
- players += 1;
- }
- }
- if(players < 1)
- {
- //hide capture visuals
- foreach(new x : Player)
- {
- if(IsPlayerInDynamicCP(x, gCaptureZone[zoneid][E_ZONECP]))
- {
- HidePlayerProgressBar(x, gPlayerCaptureBar[x]);
- PlayerTextDrawHide(x, gPlayerCaptureTD[x]);
- }
- }
- GangZoneStopFlashForAll(gCaptureZone[zoneid][E_ZONEID]);
- gCaptureZone[zoneid][E_ZONEATTACKER] = INVALID_PLAYER_ID;
- gCaptureZone[zoneid][E_ZONEATTACKED] = false;
- gCaptureZone[zoneid][E_ZONERATE] = 0;
- gCaptureZone[zoneid][E_ZONERATEI] = 30;
- return 1;
- }
- switch(players)
- {
- case 1: gCaptureZone[zoneid][E_ZONERATE] += 1, gCaptureZone[zoneid][E_ZONERATEI] -= 1;
- case 2,3: gCaptureZone[zoneid][E_ZONERATE] += 2, gCaptureZone[zoneid][E_ZONERATEI] -= 2;
- default: gCaptureZone[zoneid][E_ZONERATE] += 3, gCaptureZone[zoneid][E_ZONERATEI] -= 3;
- }
- foreach(new i : Player)
- {
- if( IsPlayerInDynamicCP(i, gCaptureZone[zoneid][E_ZONECP]) &&
- GetPlayerTeam(i) == GetPlayerTeam(gCaptureZone[zoneid][E_ZONEATTACKER]) &&
- ! IsPlayerInAnyVehicle(i))
- {
- SetPlayerProgressBarValue(i, gPlayerCaptureBar[i], gCaptureZone[zoneid][E_ZONERATE]);
- format(string, sizeof(string), "Capturing %i...", gCaptureZone[zoneid][E_ZONERATEI]);
- PlayerTextDrawSetString(i, gPlayerCaptureTD[i], string);
- }
- }
- if(gCaptureZone[zoneid][E_ZONERATE] > CAPTURE_TIME)
- {
- //hide capture visuals
- foreach(new x : Player)
- {
- if(GetPlayerTeam(x) == GetPlayerTeam(gCaptureZone[zoneid][E_ZONEATTACKER]))
- {
- format(string, sizeof(string), "* You recieved +1 score from the captured zone!");
- SendClientMessage(x, COLOR_WHITE, string);
- GivePlayerScore(x, 1);
- }
- if(GetPlayerTeam(x) == GetPlayerTeam(gCaptureZone[zoneid][E_ZONEOWNER]))
- {
- format(string, sizeof(string), "* You recieved -1 score from the lost capture zone!");
- SendClientMessage(x, COLOR_WHITE, string);
- GivePlayerScore(x, -1);
- }
- if(IsPlayerInDynamicCP(x, gCaptureZone[zoneid][E_ZONECP]))
- {
- SetPlayerProgressBarValue(x, gPlayerCaptureBar[x], 0.0);
- HidePlayerProgressBar(x, gPlayerCaptureBar[x]);
- PlayerTextDrawHide(x, gPlayerCaptureTD[x]);
- if(x == gCaptureZone[zoneid][E_ZONEATTACKER])
- {
- new Float:val;
- GetPlayerArmour(x, val);
- if((val + 15.0) >= 100.0) SetPlayerArmour(x, 100.0);
- else SetPlayerArmour(x, (val + 15.0));
- NotifyPlayer(x, "You have successfully captured the zone (~g~+3500$, +5 Score~w~~h~)", 5000);
- GivePlayerMoney(x, 3500);
- GivePlayerScore(x, 5);
- gCaptureSpree[x] += 1;
- if(gCaptureSpree[x] > 1)
- {
- format(string, sizeof(string), "Capture zone spree: %i (+1 extra score)", gCaptureSpree[x]);
- SendClientMessage(x, COLOR_LIME, string);
- GivePlayerScore(x, 1);
- }
- }
- else if(GetPlayerTeam(x) == GetPlayerTeam(gCaptureZone[zoneid][E_ZONEATTACKER]))
- {
- new Float:val;
- GetPlayerArmour(x, val);
- if((val + 15.0) >= 100.0) SetPlayerArmour(x, 100.0);
- else SetPlayerArmour(x, (val + 15.0));
- NotifyPlayer(x, "You have successfully captured the zone - supported (~g~+1500$, +1 Score~w~~h~)", 5000);
- GivePlayerMoney(x, 1500);
- GivePlayerScore(x, 1);
- }
- }
- switch(zoneid)
- {
- case HEALTH_ZONE:
- {
- if(GetPlayerTeam(x) == GetPlayerTeam(gCaptureZone[zoneid][E_ZONEATTACKER]))
- {
- SendClientMessage(x, COLOR_KHAKI, "Your team have captured Cluckin Bell.");
- SendClientMessage(x, COLOR_KHAKI, "Your team will recieve +5 HP. after every "#BONUS_INTERVAL" seconds.");
- }
- }
- case ARMOUR_ZONE:
- {
- if(GetPlayerTeam(x) == GetPlayerTeam(gCaptureZone[zoneid][E_ZONEATTACKER]))
- {
- SendClientMessage(x, COLOR_KHAKI, "Your team have captured Shipment.");
- SendClientMessage(x, COLOR_KHAKI, "Your team will recieve +5 AR. after every "#BONUS_INTERVAL" seconds.");
- }
- }
- case AMMO_ZONE:
- {
- if(GetPlayerTeam(x) == GetPlayerTeam(gCaptureZone[zoneid][E_ZONEATTACKER]))
- {
- SendClientMessage(x, COLOR_KHAKI, "Your team have captured Shooting Range.");
- SendClientMessage(x, COLOR_KHAKI, "Your team will recieve +Ammo for your armed weapon after every "#BONUS_INTERVAL" seconds.");
- }
- }
- }
- }
- format(string, sizeof(string), "~b~~h~~h~~h~%s ~w~~h~have captured %s for team %s", ReturnPlayerName(gCaptureZone[zoneid][E_ZONEATTACKER]), gCaptureZone[zoneid][E_ZONENAME], gTeam[ GetPlayerTeam(gCaptureZone[zoneid][E_ZONEATTACKER]) ][E_NAME]);
- NotifyAll(string, 5000);
- GangZoneStopFlashForAll(gCaptureZone[zoneid][E_ZONEID]);
- GangZoneShowForAll(gCaptureZone[zoneid][E_ZONEID], gTeam[ GetPlayerTeam(gCaptureZone[zoneid][E_ZONEATTACKER]) ][E_COLOR]);
- gCaptureZone[zoneid][E_ZONEOWNER] = GetPlayerTeam(gCaptureZone[zoneid][E_ZONEATTACKER]);
- gCaptureZone[zoneid][E_ZONEATTACKER] = NO_TEAM;
- gCaptureZone[zoneid][E_ZONEATTACKED] = false;
- gCaptureZone[zoneid][E_ZONERATE] = 0;
- gCaptureZone[zoneid][E_ZONERATEI] = 30;
- format(string, sizeof(string), "%s's\n%s(%i)", gTeam[ gCaptureZone[zoneid][E_ZONEOWNER] ][E_NAME], gCaptureZone[zoneid][E_ZONENAME], zoneid);
- UpdateDynamic3DTextLabelText(gCaptureZone[zoneid][E_ZONELABEL], gTeam[ gCaptureZone[zoneid][E_ZONEOWNER] ][E_COLOR], string);
- }
- }
- return 1;
- }
- //------------------------------------------------
- public OnPlayerEnterDynamicCP(playerid, checkpointid)
- {
- new string[156];
- if(GetPlayerTeam(playerid) != NO_TEAM)
- {
- for(new i; i < sizeof(gCaptureZone); i++)
- {
- if(gCaptureZone[i][E_ZONECP] == checkpointid)
- {
- if(gCaptureZone[i][E_ZONEATTACKED])
- {
- if(GetPlayerTeam(playerid) == gCaptureZone[i][E_ZONEOWNER])
- {
- NotifyPlayer(playerid, "Defend this zone from enemies ~r~!", 5000);
- break;
- }
- else if(GetPlayerTeam(playerid) == GetPlayerTeam(gCaptureZone[i][E_ZONEATTACKER]))
- {
- if(IsPlayerInAnyVehicle(playerid)) return NotifyPlayer(playerid, "You can't capture while you are in a ~r~vehicle", 5000);
- NotifyPlayer(playerid, "Stay in the checkpoint to capture the zone ~g~!", 5000);
- ShowPlayerProgressBar(playerid, gPlayerCaptureBar[playerid]);
- SetPlayerProgressBarValue(playerid, gPlayerCaptureBar[playerid], gCaptureZone[i][E_ZONERATE]);
- PlayerTextDrawShow(playerid, gPlayerCaptureTD[playerid]);
- format(string, sizeof(string), "Capturing %i...", gCaptureZone[i][E_ZONERATEI]);
- PlayerTextDrawSetString(playerid, gPlayerCaptureTD[playerid], string);
- break;
- }
- else
- {
- NotifyPlayer(playerid, "Zone is ~r~under attack~w~~h~; Defend the area !", 5000);
- break;
- }
- }
- else
- {
- if(GetPlayerTeam(playerid) != gCaptureZone[i][E_ZONEOWNER])
- {
- if(IsPlayerInAnyVehicle(playerid)) return NotifyPlayer(playerid, "You can't capture while you are in a ~r~vehicle", 5000);
- format(string, sizeof(string), "The zone is controlled by team %s", gTeam[ gCaptureZone[i][E_ZONEOWNER] ][E_NAME]);
- SendClientMessage(playerid, COLOR_WHITE, string);
- NotifyPlayer(playerid, "Stay in the checkpoint to capture the zone ~g~!", 5000);
- //attack the zone
- GangZoneFlashForAll(gCaptureZone[i][E_ZONEID], gTeam[ GetPlayerTeam(playerid) ][E_COLOR]);
- gCaptureZone[i][E_ZONEATTACKER] = playerid;
- gCaptureZone[i][E_ZONEATTACKED] = true;
- gCaptureZone[i][E_ZONERATE] = 0;
- gCaptureZone[i][E_ZONERATEI] = 30;
- foreach(new x : Player)
- {
- if( IsPlayerInDynamicCP(x, gCaptureZone[i][E_ZONECP]) &&
- GetPlayerTeam(x) == GetPlayerTeam(gCaptureZone[i][E_ZONEATTACKER]) &&
- ! IsPlayerInAnyVehicle(x))
- {
- ShowPlayerProgressBar(x, gPlayerCaptureBar[x]);
- SetPlayerProgressBarValue(x, gPlayerCaptureBar[x], gCaptureZone[i][E_ZONERATE]);
- PlayerTextDrawShow(x, gPlayerCaptureTD[x]);
- format(string, sizeof(string), "Capturing %i...", gCaptureZone[i][E_ZONERATEI]);
- PlayerTextDrawSetString(x, gPlayerCaptureTD[x], string);
- }
- }
- format(string, sizeof(string), "~b~~h~~h~~h~%s ~w~~h~is trying to capture %s's %s for team %s", ReturnPlayerName(playerid), gTeam[ gCaptureZone[i][E_ZONEOWNER] ][E_NAME], gCaptureZone[i][E_ZONENAME], gTeam[ GetPlayerTeam(playerid) ][E_NAME]);
- NotifyAll(string, 5000);
- break;
- }
- if(GetPlayerTeam(playerid) == gCaptureZone[i][E_ZONEOWNER])
- {
- NotifyPlayer(playerid, "This zone is under your team and safe ~g~!", 5000);
- break;
- }
- }
- }
- }
- }
- return 1;
- }
- public OnPlayerLeaveDynamicCP(playerid, checkpointid)
- {
- if(GetPlayerTeam(playerid) != NO_TEAM)
- {
- for(new i; i < sizeof(gCaptureZone); i++)
- {
- if(gCaptureZone[i][E_ZONECP] == checkpointid)
- {
- if(gCaptureZone[i][E_ZONEATTACKED])
- {
- SetPlayerProgressBarValue(playerid, gPlayerCaptureBar[playerid], 0.0);
- HidePlayerProgressBar(playerid, gPlayerCaptureBar[playerid]);
- PlayerTextDrawHide(playerid, gPlayerCaptureTD[playerid]);
- if(gCaptureZone[i][E_ZONEATTACKER] == playerid)
- {
- foreach(new p : Player)
- {
- if(IsPlayerInDynamicCP(p, checkpointid))
- {
- if(GetPlayerTeam(p) == GetPlayerTeam(playerid))
- {
- gCaptureZone[i][E_ZONEATTACKER] = p;
- break;
- }
- }
- }
- }
- }
- }
- }
- }
- return 1;
- }
- //------------------------------------------------
- public OnPlayerEnterGangZone(playerid, zone)
- {
- //displays a capture zone name in lightest yellow when you enter the zone
- for(new i; i < sizeof(gCaptureZone); i++)
- {
- if(gCaptureZone[i][E_ZONEID] == zone)
- {
- new string[145];
- format(string, sizeof(string), "~y~~h~~h~%i %s", i, gCaptureZone[i][E_ZONENAME]);
- GameTextForPlayer(playerid, string, 5000, 1);
- break;
- }
- }
- //displays a team base name in light blue when you enter the base zone
- for(new i; i < sizeof(gTeamBase); i++)
- {
- if(gTeamBase[i][b_base] == zone)
- {
- new string[145];
- format(string, sizeof(string), "~b~~h~~h~~h~%s", gTeamBase[i][b_name]);
- GameTextForPlayer(playerid, string, 5000, 1);
- break;
- }
- }
- return 1;
- }
- //------------------------------------------------
- public OnPlayerText(playerid, text[])
- {
- SetPlayerChatBubble(playerid, text, 0xEEEEEEFF, 35.0, 10000);
- new string[145];
- format(string, sizeof(string), "%i> %s: "WHITE"%s", playerid, ReturnPlayerName(playerid), text);
- SendClientMessageToAll(GetPlayerColor(playerid), string);
- return 0;
- }
- //------------------------------------------------
- //Anti team vehicle attack detector
- public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
- {
- if(hittype == BULLET_HIT_TYPE_VEHICLE)//if the bullet hits a vehicle
- {
- new target = INVALID_PLAYER_ID;//by default, an invalid player
- foreach(new i : Player)
- {
- if( i != playerid//if the loop case is not matching the playerid
- && IsPlayerConnected(i)//if the player is connected
- && GetPlayerVehicleID(i) == hitid//if the player is in vehicle that got hit
- && GetPlayerVehicleSeat(i) == 0)//if is driver
- {
- target = i;//store the playerid in "target" variable
- break;//stop the loop and continue
- }
- }
- if( target != INVALID_PLAYER_ID//if the target is not an invalid player
- && GetPlayerTeam(playerid) != NO_TEAM//if target id is having a valid team
- && GetPlayerTeam(playerid) == GetPlayerTeam(target))//if the target player is having same team id that of the shooter
- {
- GameTextForPlayer(playerid, "~r~Don't attack a Team vehicle", 3000, 3);//a warning gametext to player
- return 0;//stop the vehicle to get damage and the action to be taken
- }
- }
- return 1;
- }
- //------------------------------------------------
- public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid, bodypart)
- {
- if( (GetPlayerTeam(playerid) == NO_TEAM && GetPlayerTeam(issuerid) == NO_TEAM) ||//if player is of a valid team
- GetPlayerTeam(playerid) == GetPlayerTeam(issuerid))//if the team ids matches
- {
- GameTextForPlayer(issuerid, "~r~Don't attack your Teammates", 3000, 3);//a warning gametext to player
- return 0;//stop the damage and the action to be taken
- }
- return 1;
- }
- //------------------------------------------------
- //Anti team vehicle jack
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- if(! ispassenger)//if the player is entering as a driver
- {
- new target = INVALID_PLAYER_ID;//by default, an invalid player
- foreach(new i : Player)
- {
- if( i != playerid//if the loop case is not matching the playerid
- && IsPlayerConnected(i)//if the player is connected
- && GetPlayerVehicleID(i) == vehicleid//if the player is in vehicle that got hit
- && GetPlayerVehicleSeat(i) == 0)//if is driver
- {
- target = i;//store the playerid in "target" variable
- break;//stop the loop and continue
- }
- }
- if( target != INVALID_PLAYER_ID//if the target is not an invalid player
- && GetPlayerTeam(playerid) != NO_TEAM//if target id is having a valid team
- && GetPlayerTeam(playerid) == GetPlayerTeam(target))//if the target player is having same team id that of the shooter
- {
- ClearAnimations(playerid);//clear all animations of player that were being runned
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);//store player position coords
- SetPlayerPos(playerid, x, y, z+5);//a sort of eject system, simply sets player height!
- GameTextForPlayer(playerid, "~r~Don't jack your Team vehicle", 3000, 3);//a warning gametext to player
- return 0;//stop the player to take over the vehicle and the action to be taken
- }
- }
- return 1;
- }
- //------------------------------------------------
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- //------------------------------------------------
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(newstate == PLAYER_STATE_DRIVER)
- {
- for(new i; i < sizeof(gPrototype); i++)
- {
- if(GetPlayerVehicleID(playerid) == gPrototype[i][p_vehicle])
- {
- if( GetPlayerTeam(playerid) != gPrototype[i][p_owner] &&
- GetPlayerTeam(playerid) < sizeof(gTeam))
- {
- if(! gPrototype[i][p_attacked])
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- new string[156];
- format(string, sizeof(string), "PROTOTYPE: %s(%d) is trying to steel team %s's prototype vehicle.", name, playerid, gTeam[ gPrototype[i][p_owner] ][E_NAME]);
- SendClientMessageToAll(COLOR_TOMATO, string);
- format(string, sizeof(string), "~b~~h~~h~~h~%s(%d) ~w~~h~is trying to steel team %s's prototype vehicle.", name, playerid, gTeam[ gPrototype[i][p_owner] ][E_NAME]);
- NotifyAll(string, 5000);
- }
- gPlayerLastVehicle[playerid] = gPrototype[i][p_vehicle];
- gPrototype[i][p_attacked] = true;
- gPrototype[i][p_attacker] = playerid;
- NotifyPlayer(playerid, "Take the prototype to checkpoint (~y~located in your base~w~~h~)", 5000);
- SendClientMessage(playerid, COLOR_WHITE, "* You have the enemy prototype, take it to your base and win the reward!");
- SetPlayerRaceCheckpoint(playerid, 1, gPrototypeCP[GetPlayerTeam(playerid)][0], gPrototypeCP[GetPlayerTeam(playerid)][1], gPrototypeCP[GetPlayerTeam(playerid)][2], 0.0, 0.0, 0.0, 10.0);
- break;
- }
- }
- }
- }
- else
- {
- for(new i; i < sizeof(gPrototype); i++)
- {
- if(gPrototype[i][p_attacked])
- {
- if(gPlayerLastVehicle[playerid] == gPrototype[i][p_vehicle])
- {
- if(GetPlayerTeam(playerid) != gPrototype[i][p_owner])
- {
- SendClientMessage(playerid, COLOR_WHITE, "* Warning, you have left the prototype vehicle, your mission will fail in 60 seconds unless you go back in!");
- NotifyPlayer(playerid, "~r~WARNING! ~w~~h~The prototype will spawn after 60 seconds...", 5000);
- DisablePlayerRaceCheckpoint(playerid);
- gPlayerLastVehicle[playerid] = -1;
- break;
- }
- }
- }
- }
- }
- new vehicleid = GetVehicleModel(GetPlayerVehicleID(playerid));
- if( vehicleid == 520 ||
- vehicleid == 425)
- {
- if( gClass[playerid] != CLASS_PILOT &&
- GetPlayerTeam(playerid) < sizeof(gTeam))
- {
- SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be a Pilot to drive hunter, hydra. ]");
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);//store player position coords
- SetPlayerPos(playerid, x, y, z + 5);//a sort of eject system, simply sets player height!
- return 1;
- }
- }
- return 1;
- }
- //------------------------------------------------
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- for(new i; i < sizeof(gPrototype); i++)
- {
- if(GetPlayerState(playerid) == PLAYER_STATE_DRIVER)
- {
- if(GetPlayerVehicleID(playerid) == gPrototype[i][p_vehicle])
- {
- if(GetPlayerTeam(playerid) != gPrototype[i][p_owner])
- {
- new score = (1 + random(4));
- new string[156];
- format(string, sizeof(string), "You have successfully stolen prototype vehicle (~g~+250$, +i Score~w~~h~)", score);
- NotifyPlayer(playerid, string, 5000);
- GivePlayerMoney(playerid, 250);
- GivePlayerScore(playerid, score);
- DisablePlayerRaceCheckpoint(playerid);
- SetVehicleToRespawn(gPrototype[i][p_vehicle]);
- gPrototype[i][p_attacked] = false;
- gPrototype[i][p_attacker] = INVALID_PLAYER_ID;
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "PROTOTYPE: %s(%d) was successfull to steel %s's prototype vehicle.", name, playerid, gTeam[ gPrototype[i][p_owner] ][E_NAME]);
- SendClientMessageToAll(COLOR_TOMATO, string);
- format(string, sizeof(string), "~b~~h~~h~~h~%s(%d) ~w~~h~ was successfull to steel %s's prototype vehicle.", name, playerid, gTeam[ gPrototype[i][p_owner] ][E_NAME]);
- NotifyAll(string, 5000);
- break;
- }
- }
- }
- }
- return 1;
- }
- //------------------------------------------------
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- if(dialogid == DIALOG_HELP)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- new dialogstr[656];
- strcat(dialogstr, ""LIGHT_BLUE"Well, thats to most simplest question and i don't think so you don't know how to play!\n\n");
- strcat(dialogstr, "Never mind, this is a capture zone & tdm server. Basically your mission here is to\n");
- strcat(dialogstr, "capture enemy zones and defend them in order to show domination.\n\n");
- strcat(dialogstr, "There are more things to do, too. Such like participating in events,\n");
- strcat(dialogstr, "joining races, playing at shops, freeroaming, all depends upon you.");
- ShowPlayerDialog(playerid, DIALOG_HELP + 1, DIALOG_STYLE_MSGBOX, "How to play?", dialogstr, "Close", "Back");
- }
- case 1:
- {
- new dialogstr[656];
- strcat(dialogstr, ""LIGHT_BLUE"PING, the biggest disturbing factor a user is offered while playing!\n\n");
- strcat(dialogstr, "Ping completely depends upon your internet or broadband connection.\n");
- strcat(dialogstr, "It depends on the bandwidth, the PC itself and the server script also!\n\n");
- strcat(dialogstr, "To reduce ping, simply following the steps:\n");
- strcat(dialogstr, ""RED"1. "LIGHT_BLUE"Close background downloads\n");
- strcat(dialogstr, ""RED"2. "LIGHT_BLUE"Sometimes low FPS can cause low ping, close background Apps\n");
- strcat(dialogstr, ""RED"3. "LIGHT_BLUE"OR, simply buy a better broadband network!");
- ShowPlayerDialog(playerid, DIALOG_HELP + 1, DIALOG_STYLE_MSGBOX, "How to reduce PING?", dialogstr, "Close", "Back");
- }
- case 2:
- {
- new dialogstr[656];
- strcat(dialogstr, ""LIGHT_BLUE"Unlocking new stuff will obviously require you with some cash and score.\n\n");
- strcat(dialogstr, "The server provides you with loads of ways to earn:\n");
- strcat(dialogstr, ""RED"1. "LIGHT_BLUE"Kill the enemy teams\n");
- strcat(dialogstr, ""RED"2. "LIGHT_BLUE"Capture enemy zones\n");
- strcat(dialogstr, ""RED"3. "LIGHT_BLUE"Steel the enemy prototype vehicle\n");
- strcat(dialogstr, ""RED"4. "LIGHT_BLUE"Participate in events\n\n");
- strcat(dialogstr, "After you have your desired ammount, go to shops and buy as much you can,\n");
- strcat(dialogstr, "there's always something new in the shops.");
- ShowPlayerDialog(playerid, DIALOG_HELP + 1, DIALOG_STYLE_MSGBOX, "How to unlock new stuff?", dialogstr, "Close", "Back");
- }
- case 3:
- {
- new dialogstr[656];
- strcat(dialogstr, ""LIGHT_BLUE"DONOR refers to VIP.s of our server. We are famous enough to get VIPS!\n\n");
- strcat(dialogstr, "Donor requires a user to pay or donate to the server and in exchange get premium gameplay features.\n");
- strcat(dialogstr, "These features are only for donators of the server and are not life long, but for the amount of month \n");
- strcat(dialogstr, "listed according to the payment.\n\n");
- strcat(dialogstr, "The server don't enjoy the money you donate, there are several things we have to take car of:\n");
- strcat(dialogstr, ""RED"1. "LIGHT_BLUE"Invest in hosting the server\n");
- strcat(dialogstr, ""RED"2. "LIGHT_BLUE"Maintain the server and making it bugs free\n");
- strcat(dialogstr, ""RED"3. "LIGHT_BLUE"Wages for server development team");
- ShowPlayerDialog(playerid, DIALOG_HELP + 1, DIALOG_STYLE_MSGBOX, "How to be a DONOR?", dialogstr, "Close", "Back");
- }
- case 4:
- {
- new dialogstr[656];
- strcat(dialogstr, ""LIGHT_BLUE"Currently, the staff application is OPEN, so you may be the lucky one.\n\n");
- strcat(dialogstr, "The rank ADMIN is not ordinary or just a fun one, several duties come with it.\n");
- strcat(dialogstr, "If you are not mature enough, then please don't try to apply for an admin.\n\n");
- strcat(dialogstr, "Though, for becoming a staff memeber, you need to complete few requirements before which are\n");
- strcat(dialogstr, "avaliable on server forums.\n\n");
- strcat(dialogstr, "For applying for admin rank, go to forums and make a decent post giving all the necessary information required.\n\n");
- strcat(dialogstr, ""MAROON"NOTE: "WHITE"Don't ask others to support you once applied.");
- ShowPlayerDialog(playerid, DIALOG_HELP + 1, DIALOG_STYLE_MSGBOX, "How to an admin?", dialogstr, "Close", "Back");
- }
- case 5:
- {
- new dialogstr[656];
- strcat(dialogstr, ""LIGHT_BLUE"This section is only for those who are scripters, though if you have opened it, so no problem!\n\n");
- strcat(dialogstr, "The gamemode is quiet awesome, thats what most of the players say here.\n");
- strcat(dialogstr, "Our script uses most advance libraries avaliable there on SAMP forums.\n\n");
- strcat(dialogstr, "Just for example, we use YSI 4.0 for better and higher performance; fast and short coding; MYSQL database.\n\n");
- strcat(dialogstr, "If you have a suggestion about the gamemode or script, feel free to post on the forums.");
- ShowPlayerDialog(playerid, DIALOG_HELP + 1, DIALOG_STYLE_MSGBOX, "About gamemode", dialogstr, "Close", "Back");
- }
- case 7:
- {
- new dialogstr[656];
- strcat(dialogstr, ""WHITE"The server has its own advance capturing zone system!\n");
- strcat(dialogstr, "In order to capture zones, you have to follow the steps:\n\n");
- strcat(dialogstr, ""RED"1. "LIGHT_BLUE"You see a flag mapicon overlaped witha Checkpoint. Go to any one with enemy colored gangzone.\n");
- strcat(dialogstr, ""RED"2. "LIGHT_BLUE"Stay in the checkpoint for "#CAPTUR_TIME" seconds and cover yourself from enemies (if any).\n");
- strcat(dialogstr, ""RED"3. "LIGHT_BLUE"Once the time is completed, you will get a notification and will given a reward for the capture.\n\n");
- strcat(dialogstr, ""WHITE"For more help, ask an admin for help.");
- ShowPlayerDialog(playerid, DIALOG_HELP + 1, DIALOG_STYLE_MSGBOX, "About capture zones", dialogstr, "Close", "Back");
- }
- case 8:
- {
- new dialogstr[656];
- strcat(dialogstr, ""WHITE"New here, here are few things you need to keep in mind and tips:\n\n");
- strcat(dialogstr, ""RED"1. "LIGHT_BLUE"Always follow the server /rules\n");
- strcat(dialogstr, ""RED"2. "LIGHT_BLUE"Commands list, /cmds\n");
- strcat(dialogstr, ""RED"3. "LIGHT_BLUE"Any sort of help, /help\n");
- strcat(dialogstr, ""RED"2. "LIGHT_BLUE"Zones related, /zones & /findwar\n");
- strcat(dialogstr, ""RED"4. "LIGHT_BLUE"Staff support, /admins\n");
- strcat(dialogstr, ""RED"5. "LIGHT_BLUE"Kill yourself, /kill !");
- ShowPlayerDialog(playerid, DIALOG_HELP + 1, DIALOG_STYLE_MSGBOX, "Getting started", dialogstr, "Close", "Back");
- }
- case 9:
- {
- new dialogstr[1024];
- strcat(dialogstr, ""WHITE"These are general server rules, if you think we missed some, just keep that in mind\n");
- strcat(dialogstr, "as a rule and don't break it! We will add it soon!\n\n");
- strcat(dialogstr, ""RED"1. "LIGHT_BLUE"Never make use of cheats, hacks or methods of unfair gameplay.\n");
- strcat(dialogstr, ""RED"2. "LIGHT_BLUE"Always respect every player and admin, dont provoke others.\n");
- strcat(dialogstr, ""RED"3. "LIGHT_BLUE"Any sort of level boosting is strictly restricted. This may include:\n");
- strcat(dialogstr, ""RED" - "LIGHT_BLUE"Score boosting\n");
- strcat(dialogstr, ""RED" - "LIGHT_BLUE"Money boosting\n");
- strcat(dialogstr, ""RED" - "LIGHT_BLUE"Kills/Deaths boosting\n");
- strcat(dialogstr, ""RED"4. "LIGHT_BLUE"Dont unnecessarly PM. or send messages to players.\n");
- strcat(dialogstr, ""RED"5. "LIGHT_BLUE"Advertisements are not allowed, not in chat and PMs.\n");
- strcat(dialogstr, ""RED". "LIGHT_BLUE"If you have applied for admin on forums, then dont ask users to support.\n");
- strcat(dialogstr, ""RED"7. "LIGHT_BLUE"Don't misuse your admin or donor commands if provided.\n");
- strcat(dialogstr, ""RED"8. "LIGHT_BLUE"Play as a faithfull, trustworthy, and friendly user.\n\n");
- strcat(dialogstr, ""RED"NOTE: "WHITE"Violation of any of these rule can get you BAN, KICK, WARN, TEMPBAN...");
- ShowPlayerDialog(playerid, DIALOG_HELP + 1, DIALOG_STYLE_MSGBOX, "Server rules", dialogstr, "Close", "Back");
- }
- }
- }
- }
- if(dialogid == DIALOG_HELP + 1)
- {
- if(! response) return cmd_help(playerid);
- }
- if(dialogid == DIALOG_CLASS)
- {
- if(response)
- {
- new rank = GetPlayerRank(playerid);
- switch(listitem)
- {
- case 2: if(rank < 1) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You need to be rank 1+ to use this class."), ShowPlayerClassSelectionDialog(playerid);
- case 3: if(rank < 3) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You need to be rank 3+ to use this class."), ShowPlayerClassSelectionDialog(playerid);
- case 4: if(rank < 5) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You need to be rank 5+ to use this class."), ShowPlayerClassSelectionDialog(playerid);
- case 5: if(rank < 8) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You need to be rank 8+ to use this class."), ShowPlayerClassSelectionDialog(playerid);
- case 6: if(rank < 12) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You need to be rank 12+ to use this class."), ShowPlayerClassSelectionDialog(playerid);
- }
- gClass[playerid] = listitem;
- gClassSelection[playerid] = false;
- //
- switch(GetPlayerTeam(playerid))
- {
- case 0..6:
- {
- //class setup
- switch(gClass[playerid])
- {
- case 0:
- {
- NotifyPlayer(playerid, "You have selected class ~g~Support", 5000);
- SendClientMessage(playerid, COLOR_CORAL, "- Your class is "LIGHT_BLUE"Support "HOT_PINK"(You recieve class bonus according to your rank!)");
- switch(rank)
- {
- case 0..2:
- {
- GivePlayerWeapon(playerid, 30, 100 * (rank + 1));
- GivePlayerWeapon(playerid, 8, 1);
- GivePlayerWeapon(playerid, 17, 3);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Ak-47, Katana, Teargas.");
- }
- case 3..5:
- {
- GivePlayerWeapon(playerid, 30, 300);
- GivePlayerWeapon(playerid, 24, 100);
- GivePlayerWeapon(playerid, 8, 1);
- GivePlayerWeapon(playerid, 17, 5);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Ak-47, Desert Eagle, Katana, Teargas.");
- }
- default:
- {
- GivePlayerWeapon(playerid, 31, 300);
- GivePlayerWeapon(playerid, 24, 200);
- GivePlayerWeapon(playerid, 8, 1);
- GivePlayerWeapon(playerid, 17, 5);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: M4, Desert Eagle, Katana, Teargas.");
- }
- }
- }
- case 1:
- {
- NotifyPlayer(playerid, "You have selected class ~g~Medic", 5000);
- SendClientMessage(playerid, COLOR_CORAL, "- Your class is "LIGHT_BLUE"Medic "HOT_PINK"(You recieve class bonus according to your rank!)");
- switch(rank)
- {
- case 0..2:
- {
- GivePlayerWeapon(playerid, 29, 100 * (rank + 1));
- GivePlayerWeapon(playerid, 9, 1);
- GivePlayerWeapon(playerid, 18, 2);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Ak-47, Chainsaw, Moltove.");
- }
- case 3..5:
- {
- GivePlayerWeapon(playerid, 29, 500);
- GivePlayerWeapon(playerid, 9, 1);
- GivePlayerWeapon(playerid, 18, 3);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Ak-47, Chainsaw, Moltove.");
- }
- default:
- {
- GivePlayerWeapon(playerid, 29, 500);
- GivePlayerWeapon(playerid, 23, 200);
- GivePlayerWeapon(playerid, 9, 1);
- GivePlayerWeapon(playerid, 18, 4);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Ak-47, Silenced 9mm, Chainsaw, Moltove.");
- }
- }
- gPainkillers[playerid] = 3;
- }
- case 2:
- {
- NotifyPlayer(playerid, "You have selected class ~g~Scout", 5000);
- SendClientMessage(playerid, COLOR_CORAL, "- Your class is "LIGHT_BLUE"Scout "HOT_PINK"(You recieve class bonus according to your rank!)");
- switch(rank)
- {
- case 1..2:
- {
- GivePlayerWeapon(playerid, 33, 100 * (rank + 1));
- GivePlayerWeapon(playerid, 4, 1);
- GivePlayerWeapon(playerid, 17, 2);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Country Rifle, Knife, Teargas.");
- }
- case 3..5:
- {
- GivePlayerWeapon(playerid, 34, 500);
- GivePlayerWeapon(playerid, 4, 1);
- GivePlayerWeapon(playerid, 17, 4);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Sniper Rifle, Knife, Teargas.");
- }
- default:
- {
- GivePlayerWeapon(playerid, 34, 500);
- GivePlayerWeapon(playerid, 22, 200);
- GivePlayerWeapon(playerid, 4, 1);
- GivePlayerWeapon(playerid, 17, 5);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Sniper Rifle, 9mm, Knife, Teargas.");
- }
- }
- TogglePlayerMarker(playerid, false);
- }
- case 3:
- {
- NotifyPlayer(playerid, "You have selected class ~g~Jetrunner", 5000);
- SendClientMessage(playerid, COLOR_CORAL, "- Your class is "LIGHT_BLUE"Jetrunner "HOT_PINK"(You recieve class bonus according to your rank!)");
- switch(rank)
- {
- case 3:
- {
- GivePlayerWeapon(playerid, 32, 300);
- GivePlayerWeapon(playerid, 3, 1);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Tec-9, Baseball bat.");
- }
- case 4..7:
- {
- GivePlayerWeapon(playerid, 32, 500);
- GivePlayerWeapon(playerid, 22, 100);
- GivePlayerWeapon(playerid, 3, 1);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Tec-9, 9mm, Baseball bat.");
- }
- default:
- {
- GivePlayerWeapon(playerid, 32, 500);
- GivePlayerWeapon(playerid, 26, 100);
- GivePlayerWeapon(playerid, 3, 1);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Tec-9, Sawnoff Shotgun, Baseball bat.");
- }
- }
- }
- case 4:
- {
- NotifyPlayer(playerid, "You have selected class ~g~Pilot", 5000);
- SendClientMessage(playerid, COLOR_CORAL, "- Your class is "LIGHT_BLUE"Pilot "HOT_PINK"(You recieve class bonus according to your rank!)");
- switch(rank)
- {
- case 5:
- {
- GivePlayerWeapon(playerid, 25, 200);
- GivePlayerWeapon(playerid, 24, 50);
- GivePlayerWeapon(playerid, 17, 3);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Shotgun, Desert eagle, Teargas.");
- }
- case 6..8:
- {
- GivePlayerWeapon(playerid, 25, 200);
- GivePlayerWeapon(playerid, 24, 100);
- GivePlayerWeapon(playerid, 17, 3);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Shotgun, Desert eagle, Teargas.");
- }
- default:
- {
- GivePlayerWeapon(playerid, 25, 200);
- GivePlayerWeapon(playerid, 24, 200);
- GivePlayerWeapon(playerid, 18, 3);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Shotgun, Desert eagle, Moltoves.");
- }
- }
- }
- case 5:
- {
- NotifyPlayer(playerid, "You have selected class ~g~Spy", 5000);
- SendClientMessage(playerid, COLOR_CORAL, "- Your class is "LIGHT_BLUE"Spy "HOT_PINK"(You recieve class bonus according to your rank!)");
- switch(rank)
- {
- case 8:
- {
- GivePlayerWeapon(playerid, 29, 200);
- GivePlayerWeapon(playerid, 23, 100);
- GivePlayerWeapon(playerid, 18, 3);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: MP4, Silenced 9mm, Moltove.");
- }
- case 9..10:
- {
- GivePlayerWeapon(playerid, 29, 300);
- GivePlayerWeapon(playerid, 23, 200);
- GivePlayerWeapon(playerid, 18, 3);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: MP4, Silenced 9mm, Moltove.");
- }
- default:
- {
- GivePlayerWeapon(playerid, 29, 300);
- GivePlayerWeapon(playerid, 23, 200);
- GivePlayerWeapon(playerid, 25, 200);
- GivePlayerWeapon(playerid, 18, 3);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: MP4, Silenced 9mm, Shotgun, Moltove.");
- }
- }
- gDis[playerid] = 3;
- }
- case 6:
- {
- NotifyPlayer(playerid, "You have selected class ~g~Terminator", 5000);
- SendClientMessage(playerid, COLOR_CORAL, "- Your class is "LIGHT_BLUE"Terminator");
- GivePlayerWeapon(playerid, 38, 100);
- GivePlayerWeapon(playerid, 24, 300);
- GivePlayerWeapon(playerid, 9, 1);
- GivePlayerWeapon(playerid, 18, 10);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Minigun, Desert Eagle, Chainsaw Moltoves.");
- }
- }
- }
- default:
- {
- NotifyPlayer(playerid, "~r~There is no classes for team AFRICA!", 5000);
- switch(rank)
- {
- case 0..3:
- {
- GivePlayerWeapon(playerid, 30, 200);
- GivePlayerWeapon(playerid, 24, 100);
- GivePlayerWeapon(playerid, 4, 1);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Ak-47, Desert Eagle, Knife.");
- }
- case 4..7:
- {
- GivePlayerWeapon(playerid, 30, 500);
- GivePlayerWeapon(playerid, 24, 300);
- GivePlayerWeapon(playerid, 4, 1);
- GivePlayerWeapon(playerid, 18, 5);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Ak-47, Desert Eagle, Knife, Moltove.");
- }
- default:
- {
- GivePlayerWeapon(playerid, 30, 500);
- GivePlayerWeapon(playerid, 24, 300);
- GivePlayerWeapon(playerid, 4, 1);
- GivePlayerWeapon(playerid, 18, 5);
- GivePlayerWeapon(playerid, 35, 1);
- SendClientMessage(playerid, COLOR_CORAL, "- Weapons: Ak-47, Desert Eagle, Knife, Moltove, RPG.");
- }
- }
- }
- }
- if(GetPlayerTeam(playerid) != 7) SendClientMessage(playerid, COLOR_WHITE, "Type /chelp to get info. about your class; Type /sc to switch class in next spawn.");
- //anti spawnkill system
- switch(rank)
- {
- case 0: gAntiSpawnkill[playerid][A_HP] = 100.0, gAntiSpawnkill[playerid][A_AR] = 100.0;
- case 1: gAntiSpawnkill[playerid][A_HP] = 75.0, gAntiSpawnkill[playerid][A_AR] = 0.0;
- case 2: gAntiSpawnkill[playerid][A_HP] = 90.0, gAntiSpawnkill[playerid][A_AR] = 0.0;
- case 3: gAntiSpawnkill[playerid][A_HP] = 100.0, gAntiSpawnkill[playerid][A_AR] = 0.0;
- case 4..5: gAntiSpawnkill[playerid][A_HP] = 100.0, gAntiSpawnkill[playerid][A_AR] = 10.0;
- case 6..7: gAntiSpawnkill[playerid][A_HP] = 100.0, gAntiSpawnkill[playerid][A_AR] = 25.0;
- case 8..10: gAntiSpawnkill[playerid][A_HP] = 100.0, gAntiSpawnkill[playerid][A_AR] = 45.0;
- case 11..13: gAntiSpawnkill[playerid][A_HP] = 100.0, gAntiSpawnkill[playerid][A_AR] = 60.0;
- case 14..15: gAntiSpawnkill[playerid][A_HP] = 100.0, gAntiSpawnkill[playerid][A_AR] = 75.0;
- default: gAntiSpawnkill[playerid][A_HP] = 100.0, gAntiSpawnkill[playerid][A_AR] = 100.0;
- }
- new string[144];
- format(string, sizeof(string), "* Your current rank is %s! Recieved a bonus of %0.2f% HEALTH and %0.2f% ARMOUR!", gRank[rank][r_name], gAntiSpawnkill[playerid][A_HP], gAntiSpawnkill[playerid][A_AR]);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- SendClientMessage(playerid, COLOR_RED, "-> You have Anti - Spawnkill protection for 10 seconds !");
- gAntiSpawnkill[playerid][A_LABEL] = CreateDynamic3DTextLabel("Anti - Spawnkill protected", COLOR_RED, 0.0, 0.0, 0.3, 20.0, playerid, _, 1);
- gAntiSpawnkill[playerid][A_TIMER] = 10;
- SetPlayerHealth(playerid, FLOAT_INFINITY);
- //prestige weapons
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) > 2 || rank >= 10)
- {
- new weaponid;
- GAdmin_RetrieveUserData(ReturnPlayerName(playerid), "i", "weapon1", weaponid);
- if(IsValidWeapon(weaponid) && weaponid != 0)
- {
- format(string, sizeof(string), "* You recieved a %s as your prestige weapon I!", ReturnWeaponName(weaponid));
- SendClientMessage(playerid, COLOR_YELLOW, string);
- GivePlayerWeapon(playerid, weaponid, 200);
- }
- }
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) > 2 || rank >= 15)
- {
- new weaponid;
- GAdmin_RetrieveUserData(ReturnPlayerName(playerid), "i", "weapon2", weaponid);
- if(IsValidWeapon(weaponid) && weaponid != 0)
- {
- format(string, sizeof(string), "* You recieved a %s as your prestige weapon II!", ReturnWeaponName(weaponid));
- SendClientMessage(playerid, COLOR_YELLOW, string);
- GivePlayerWeapon(playerid, weaponid, 200);
- }
- }
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) > 2 || rank >= 20)
- {
- new weaponid;
- GAdmin_RetrieveUserData(ReturnPlayerName(playerid), "i", "weapon3", weaponid);
- if(IsValidWeapon(weaponid) && weaponid != 0)
- {
- format(string, sizeof(string), "* You recieved a %s as your prestige weapon III!", ReturnWeaponName(weaponid));
- SendClientMessage(playerid, COLOR_YELLOW, string);
- GivePlayerWeapon(playerid, weaponid, 200);
- }
- }
- TogglePlayerControllable(playerid, true);
- //
- }
- if(! response)
- {
- gClassSelection[playerid] = false;
- SpawnPlayer(playerid);
- }
- }
- if(dialogid == DIALOG_DIS)
- {
- if(response)
- {
- gDis[playerid] -= 1;
- SetPlayerSkin(playerid, gTeam[listitem][E_SKIN]);
- SetPlayerColor(playerid, gTeam[listitem][E_COLOR]);
- new string[145];
- format(string, sizeof(string), "You have disguized to team %s", gTeam[listitem][E_NAME]);
- NotifyPlayer(playerid, string, 5000);
- }
- }
- if(dialogid == DIALOG_DEATHMATCH)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0: cmd_minigun(playerid, "");
- case 1: cmd_moneybag(playerid, "");
- case 2: cmd_rpg(playerid, "");
- case 3: cmd_glass(playerid, "");
- }
- }
- }
- if(dialogid == DIALOG_NUKE)
- {
- if(response)
- {
- new string[256];
- if(GetPlayerTeam(playerid) != gCaptureZone[NUKE_ZONE][E_ZONEOWNER])
- {
- format(string, sizeof(string), "ERROR: You must capture %s before launching a Nuclear missle.", gCaptureZone[NUKE_ZONE][E_ZONENAME]);
- return SendClientMessage(playerid, COLOR_FIREBRICK, string);
- }
- if(gNuke[NUKE_TIME] > 0)
- {
- format(string, sizeof(string), "ERROR: You must wait %i seconds before launching a Nuke.", gNuke[NUKE_TIME]);
- return SendClientMessage(playerid, COLOR_FIREBRICK, string);
- }
- if(GetPlayerTeam(playerid) == listitem)
- {
- OnPlayerPickUpDynamicPickup(playerid, gNuke[NUKE_PICKUP]);
- return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot nuke your own base!");
- }
- gNuke[NUKE_BASE] = listitem;
- format(string, sizeof(string), "Are you sure you want to launch Nuke?\nTarget base: "RED"%s\n"LIGHT_BLUE"The nuke will cost you "RED"$"#NUKE_COST"", gTeamBase[listitem][b_name]);
- ShowPlayerDialog(playerid, (DIALOG_NUKE + 1), DIALOG_STYLE_MSGBOX, "Confirmation for Nuke launch", string, "Launch", "Back");
- }
- }
- if(dialogid == (DIALOG_NUKE + 1))
- {
- if(! response) return OnPlayerPickUpDynamicPickup(playerid, gNuke[NUKE_PICKUP]);
- if(response)
- {
- new string[256];
- if(GetPlayerTeam(playerid) != gCaptureZone[NUKE_ZONE][E_ZONEOWNER])
- {
- format(string, sizeof(string), "ERROR: You must capture %s before launching a Nuke.", gCaptureZone[NUKE_ZONE][E_ZONENAME]);
- return SendClientMessage(playerid, COLOR_FIREBRICK, string);
- }
- if(gNuke[NUKE_TIME] > 0)
- {
- format(string, sizeof(string), "ERROR: You must wait %i seconds before launching a Nuke.", gNuke[NUKE_TIME]);
- return SendClientMessage(playerid, COLOR_FIREBRICK, string);
- }
- if(GetPlayerMoney(playerid) < NUKE_COST)
- {
- return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to launch a Nuke.");
- }
- GivePlayerMoney(playerid, - NUKE_COST);
- format(string, sizeof(string), "A nuke has been launched in %s!", gTeamBase[gNuke[NUKE_BASE]][b_name]);
- SendClientMessageToAll(COLOR_LIME_GREEN, string);
- SetTimerEx("OnPlayerLaunchNuke", (5 * 1000), false, "ii", playerid, gNuke[NUKE_BASE]);
- gNuke[NUKE_TIME] = NUKE_INTERVAL;
- }
- }
- if(dialogid == DIALOG_ANTHRAX)
- {
- if(response)
- {
- new string[56];
- if(GetPlayerTeam(playerid) != gCaptureZone[ANTHRAX_ZONE][E_ZONEOWNER])
- {
- format(string, sizeof(string), "ERROR: You must capture %s before launching a Anthrax bomb.", gCaptureZone[ANTHRAX_ZONE][E_ZONENAME]);
- return SendClientMessage(playerid, COLOR_FIREBRICK, string);
- }
- if(gAnthrax[ANTHRAX_TIME] > 0)
- {
- format(string, sizeof(string), "ERROR: You must wait %i seconds before launching an Anthrax bomb.", gAnthrax[ANTHRAX_TIME]);
- return SendClientMessage(playerid, COLOR_FIREBRICK, string);
- }
- if(GetPlayerMoney(playerid) < ANTHRAX_COST)
- {
- return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to launch a Anthrax.");
- }
- GivePlayerMoney(playerid, - ANTHRAX_COST);
- SendClientMessageToAll(COLOR_LIME_GREEN, "An Anthrax bomb has been launched");
- SetTimerEx("OnPlayerLaunchAnthrax", (5 * 1000), false, "i", playerid);
- gAnthrax[ANTHRAX_TIME] = ANTHRAX_INTERVAL;
- }
- }
- if(dialogid == DIALOG_SHOP)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- new Float:hp;
- GetPlayerHealth(playerid, hp);
- if(hp >= 100.0) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You already have full health(100%).");
- else if(GetPlayerMoney(playerid) < 2000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, -2000);
- SetPlayerHealth(playerid, 100.0);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought full health(100%) for $2000.");
- }
- ShowPlayerShopDialog(playerid);
- }
- case 1:
- {
- new Float:ar;
- GetPlayerArmour(playerid, ar);
- if(ar >= 100.0) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You already have full armour(100%).");
- else if(GetPlayerMoney(playerid) < 2000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, -2000);
- SetPlayerArmour(playerid, 100.0);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought full armour(100%) for $2000.");
- }
- ShowPlayerShopDialog(playerid);
- }
- case 2:
- {
- SetupPrevModelDialog(0.0, 0.0, 0.0, 3.0);
- ShowPlayerDialog(playerid, (DIALOG_SHOP + 1), DIALOG_STYLE_PREVMODEL, "Weapons List", weapons, "Select", "Back");
- }
- case 3:
- {
- SetupPrevModelDialog(0.0, 0.0, 0.0, 2.0);
- ShowPlayerDialog(playerid, (DIALOG_SHOP + 2), DIALOG_STYLE_PREVMODEL, "Misc. Items", miscitems, "Select", "Back");
- }
- case 4:
- {
- ShowPlayerDialog(playerid, (DIALOG_SHOP + 3), DIALOG_STYLE_TABLIST_HEADERS, "Inventory", "Item\tPrice\nPainkiller\t$1000\nArmour Jacket\t$3500\nProtection Helmet\t$7000\nGas Mask\t$5500\nSucide Bomb\t$10000", "Buy", "Back");
- }
- }
- }
- }
- if(dialogid == (DIALOG_SHOP + 1))
- {
- if(! response) return ShowPlayerShopDialog(playerid);
- if(response)
- {
- switch(listitem)
- {
- case 0: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a Knife?", "Ammo\tPrice\n1\t$1000", "Buy", "Back");
- case 1: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a Katana?", "Ammo\tPrice\n1\t$740", "Buy", "Back");
- case 2: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a Chainsaw?", "Ammo\tPrice\n1\t$2100", "Buy", "Back");
- case 3: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a Grenade?", "Ammo\tPrice\n1\t$1500\n2\t$3000\n5\t$7000", "Buy", "Back");
- case 4: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a Teargas?", "Ammo\tPrice\n1\t$1000\n2\t$2000\n5\t$4500", "Buy", "Back");
- case 5: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a Moltove?", "Ammo\tPrice\n1\t$1500\n2\t$3000\n5\t$7000", "Buy", "Back");
- case 6: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a 9mm?", "Ammo\tPrice\n1\t$20\n50\t$1000\n100\t$2000\n200\t$3800\n500\t$7500", "Buy", "Back");
- case 7: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a Silenced 9mm?", "Ammo\tPrice\n1\t$10\n50\t$500\n100\t$1000\n200\t$2000\n500\t$5000", "Buy", "Back");
- case 8: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a Desert Eagle?", "Ammo\tPrice\n1\t$50\n50\t$2500\n100\t$5000\n200\t$9000\n500\t$18000", "Buy", "Back");
- case 9: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a Shotgun?", "Ammo\tPrice\n1\t$30\n50\t$1500\n100\t$3000\n200\t$5000\n500\t$13000", "Buy", "Back");
- case 10: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a Sawnoff Shotgun?", "Ammo\tPrice\n1\t$60\n50\t$3000\n100\t$6000\n200\t$10000\n500\t$25000", "Buy", "Back");
- case 11: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a Combat Shotgun?", "Ammo\tPrice\n1\t$50\n50\t$2500\n100\t$5000\n200\t$9000\n500\t$18000", "Buy", "Back");
- case 12: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a UZI?", "Ammo\tPrice\n1\t$30\n50\t$1500\n100\t$3000\n200\t$5000\n500\t$13000", "Buy", "Back");
- case 13: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a MP5?", "Ammo\tPrice\n1\t$30\n50\t$1500\n100\t$3000\n200\t$5000\n500\t$13000", "Buy", "Back");
- case 14: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a Ak-47?", "Ammo\tPrice\n1\t$30\n50\t$1500\n100\t$3000\n200\t$5000\n500\t$13000", "Buy", "Back");
- case 15: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a M4?", "Ammo\tPrice\n1\t$30\n50\t$1500\n100\t$3000\n200\t$5000\n500\t$13000", "Buy", "Back");
- case 16: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a Tec-9?", "Ammo\tPrice\n1\t$35\n50\t$1750\n100\t$3500\n200\t$6000\n500\t$14000", "Buy", "Back");
- case 17: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a Rifle?", "Ammo\tPrice\n1\t$30\n50\t$1500\n100\t$3000\n200\t$5000\n500\t$13000", "Buy", "Back");
- case 18: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a Sniper Rifle?", "Ammo\tPrice\n1\t$60\n50\t$3000\n100\t$6000\n200\t$10000\n500\t$17000", "Buy", "Back");
- case 19: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a RPG?", "Ammo\tPrice\n1\t$1500\n2\t$3000\n5\t$7000", "Buy", "Back");
- case 20: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a H.S. Rockets?", "Ammo\tPrice\n1\t$1800\n2\t$3600\n5\t$8000", "Buy", "Back");
- case 21: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a Flamethrower?", "Ammo\tPrice\n100\t$1500\n200\t$3000\n500\t$7000", "Buy", "Back");
- case 22: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a Satchels?", "Ammo\tPrice\n1\t$1500\n2\t$3000\n5\t$7000", "Buy", "Back");
- }
- gListitem[playerid] = listitem;
- }
- }
- if(dialogid == (DIALOG_SHOP + 2))
- {
- if(! response) return ShowPlayerShopDialog(playerid);
- if(response)
- {
- switch(listitem)
- {
- case 0: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a Spray Can?", "Ammo\tPrice\n50\t$450", "Buy", "Back");
- case 1: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a Fire Estinguisher?", "Ammo\tPrice\n50\t$500\n100\t$1000\n500\t$5000", "Buy", "Back");
- case 2: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a Camera?", "Ammo\tPrice\n50\t$50", "Buy", "Back");
- case 3: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a Night Vision Goggles?", "Ammo\tPrice\n1\t$500", "Buy", "Back");
- case 4: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a Thremal Vision Goggles?", "Ammo\tPrice\n1\t$500", "Buy", "Back");
- case 5: ShowPlayerDialog(playerid, (DIALOG_SHOP + 4), DIALOG_STYLE_TABLIST_HEADERS, "Do you want to buy a Parachute?", "Ammo\tPrice\n1\t$1 "RED"!", "Buy", "Back");
- }
- gListitem[playerid] = listitem + 100;
- }
- }
- if(dialogid == (DIALOG_SHOP + 3))
- {
- if(! response) return ShowPlayerShopDialog(playerid);
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- if(gPainkillers[playerid] >= 5) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't carry more than 5 painkillers in your bag.");
- else if(GetPlayerMoney(playerid) < 1000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 1000);
- gPainkillers[playerid] += 1;
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Painkiller for $1000.");
- SendClientMessage(playerid, COLOR_KHAKI, "TIP: Type /pk to regenrate health!");
- }
- }
- case 1:
- {
- if(gArmour[playerid]) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't carry more than 1 armour in your bag.");
- else if(GetPlayerMoney(playerid) < 3500) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 3500);
- gArmour[playerid] = true;
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought an Armour Jacket for $3500.");
- SendClientMessage(playerid, COLOR_KHAKI, "TIP: Type /armour to wear your Armour Jacket!");
- }
- }
- case 2:
- {
- if(gHelmet[playerid]) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You already have a Protection helmet.");
- else if(GetPlayerMoney(playerid) < 7000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, -7000);
- gHelmet[playerid] = true;
- switch(GetPlayerSkin(playerid))
- {
- case 24: SetPlayerAttachedObject(playerid,2,18638,2,0.151999,0.038000,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 24
- case 287: SetPlayerAttachedObject(playerid,2,18638,2,0.128000,0.049999,0.006000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 287
- case 285: SetPlayerAttachedObject(playerid,2,18638,2,0.182000,0.035000,0.007000,0.000000,0.000000,0.000000,1.000000,1.069999,1.118999); //skin 285
- case 111: SetPlayerAttachedObject(playerid,2,18638,2,0.159999,0.032999,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 111
- case 122: SetPlayerAttachedObject(playerid,2,18638,2,0.148000,0.017000,-0.002999,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 122
- case 73: SetPlayerAttachedObject(playerid,2,18638,2,0.148999,0.038999,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 73
- case 46: SetPlayerAttachedObject(playerid,2,18638,2,0.162999,0.035000,0.001000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 46
- case 102: SetPlayerAttachedObject(playerid,2,18638,2,0.173000,0.024999,-0.003000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 102
- default: SetPlayerAttachedObject(playerid,2,18638,2,0.173000,0.024999,-0.003000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 102
- }
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Protection Helmet for $7000.");
- }
- }
- case 3:
- {
- if(gMask[playerid]) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You already have a Anti-Teargas Mask.");
- else if(GetPlayerMoney(playerid) < 5500) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, -5500);
- gMask[playerid] = true;
- SetPlayerAttachedObject(playerid, 3, 19472, 2, -0.022000, 0.137000, 0.018999, 3.899994, 85.999961, 92.999984, 0.923999, 1.141000, 1.026999);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Anti-Teargas Mask for $5500.");
- }
- }
- case 4:
- {
- if(gBomb[playerid]) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You already have a Sucide Bomb.");
- else if(GetPlayerMoney(playerid) < 10000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, -10000);
- gBomb[playerid] = true;
- SetPlayerAttachedObject(playerid, 4, 1654, 1, 0.046000, 0.229000, -0.013000, 3.099998, 78.299972, -178.599960, 1.000000, 1.000000, 1.000000);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Sucide Bomb for $10000.");
- }
- }
- }
- ShowPlayerDialog(playerid, (DIALOG_SHOP + 3), DIALOG_STYLE_TABLIST_HEADERS, "Inventory", "Item\tPrice\nPainkiller\t$1000\nArmour Jacket\t$3500\nProtection Helmet\t$7000\nGas Mask\t$5500\nSucide Bomb\t$10000", "Buy", "Back");
- }
- }
- if(dialogid == (DIALOG_SHOP + 4))
- {
- if(response)
- {
- switch(gListitem[playerid])
- {
- case 0://knife
- {
- switch(listitem)
- {
- case 0:
- {
- if(IsPlayerHavingWeapon(playerid, 4)) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You already have a Knife.");
- else if(GetPlayerMoney(playerid) < 1000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 1000);
- GivePlayerWeapon(playerid, 4, 1);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Knife for $1000.");
- }
- }
- }
- }
- case 1://katana
- {
- switch(listitem)
- {
- case 0:
- {
- if(IsPlayerHavingWeapon(playerid, 4)) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You already have a Katana.");
- else if(GetPlayerMoney(playerid) < 740) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 740);
- GivePlayerWeapon(playerid, 8, 1);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Katana for $740.");
- }
- }
- }
- }
- case 2://chainsaw
- {
- switch(listitem)
- {
- case 0:
- {
- if(IsPlayerHavingWeapon(playerid, 4)) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You already have a Chainsaw.");
- else if(GetPlayerMoney(playerid) < 2100) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 2100);
- GivePlayerWeapon(playerid, 9, 1);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Chainsaw for $2100.");
- }
- }
- }
- }
- case 3://grenade
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 1500) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 1500);
- GivePlayerWeapon(playerid, 16, 1);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Grenade for $1500.");
- }
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) < 3000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 3000);
- GivePlayerWeapon(playerid, 16, 2);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought 2 Grenade for $3000.");
- }
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) < 7000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 7000);
- GivePlayerWeapon(playerid, 16, 5);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought 5 Grenade for $7000.");
- }
- }
- }
- }
- case 4://teargas
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 1000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 1000);
- GivePlayerWeapon(playerid, 17, 1);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Teargas for $1000.");
- }
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) < 2000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 2000);
- GivePlayerWeapon(playerid, 17, 2);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought 2 Teargas for $2000.");
- }
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) < 4500) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 4500);
- GivePlayerWeapon(playerid, 17, 5);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought 5 Teargas for $4500.");
- }
- }
- }
- }
- case 5://molotve
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 1500) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 1500);
- GivePlayerWeapon(playerid, 18, 1);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Moltove for $1500.");
- }
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) < 3000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 3000);
- GivePlayerWeapon(playerid, 18, 2);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought 2 Moltove for $3000.");
- }
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) < 7000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 7000);
- GivePlayerWeapon(playerid, 18, 5);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought 5 Moltove for $7000.");
- }
- }
- }
- }
- case 6://9mm
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 20) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 20);
- GivePlayerWeapon(playerid, 22, 1);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a 9mm (1 Ammo) for $20.");
- }
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) < 1000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 1000);
- GivePlayerWeapon(playerid, 22, 50);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a 9mm (50 Ammo) for $1000.");
- }
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) < 2000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 2000);
- GivePlayerWeapon(playerid, 22, 100);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a 9mm (100 Ammo) for $2000.");
- }
- }
- case 3:
- {
- if(GetPlayerMoney(playerid) < 3800) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 3800);
- GivePlayerWeapon(playerid, 22, 200);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a 9mm (200 Ammo) for $3800.");
- }
- }
- case 4:
- {
- if(GetPlayerMoney(playerid) < 7500) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 7500);
- GivePlayerWeapon(playerid, 22, 500);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a 9mm (500 Ammo) for $7500.");
- }
- }
- }
- }
- case 7://Silenced 9mm
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 10) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 10);
- GivePlayerWeapon(playerid, 23, 1);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Silenced 9mm (1 Ammo) for $10.");
- }
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) < 500) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 500);
- GivePlayerWeapon(playerid, 23, 50);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Silenced 9mm (50 Ammo) for $500.");
- }
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) < 1000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 1000);
- GivePlayerWeapon(playerid, 23, 100);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Silenced 9mm (100 Ammo) for $1000.");
- }
- }
- case 3:
- {
- if(GetPlayerMoney(playerid) < 2000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 2000);
- GivePlayerWeapon(playerid, 23, 200);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Silenced 9mm (200 Ammo) for $2000.");
- }
- }
- case 4:
- {
- if(GetPlayerMoney(playerid) < 5000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 7500);
- GivePlayerWeapon(playerid, 23, 500);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Silenced 9mm (500 Ammo) for $5000.");
- }
- }
- }
- }
- case 8://deagle
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 50) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 50);
- GivePlayerWeapon(playerid, 24, 1);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Desert Eagle (1 Ammo) for $50.");
- }
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) < 2500) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 2500);
- GivePlayerWeapon(playerid, 24, 50);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Desert Eagle (50 Ammo) for $2500.");
- }
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) < 5000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 5000);
- GivePlayerWeapon(playerid, 24, 100);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Desert Eagle (100 Ammo) for $5000.");
- }
- }
- case 3:
- {
- if(GetPlayerMoney(playerid) < 9000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 9000);
- GivePlayerWeapon(playerid, 24, 200);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Desert Eagle (200 Ammo) for $9000.");
- }
- }
- case 4:
- {
- if(GetPlayerMoney(playerid) < 18000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 18000);
- GivePlayerWeapon(playerid, 24, 500);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Desert Eagle (500 Ammo) for $18000.");
- }
- }
- }
- }
- case 9://shotgun
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 30) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 30);
- GivePlayerWeapon(playerid, 25, 1);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Shotgun (1 Ammo) for $30.");
- }
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) < 1500) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 1500);
- GivePlayerWeapon(playerid, 25, 50);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Shotgun (50 Ammo) for $1500.");
- }
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) < 3000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 3000);
- GivePlayerWeapon(playerid, 25, 100);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Shotgun (100 Ammo) for $3000.");
- }
- }
- case 3:
- {
- if(GetPlayerMoney(playerid) < 5000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 5000);
- GivePlayerWeapon(playerid, 25, 200);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Shotgun (200 Ammo) for $5000.");
- }
- }
- case 4:
- {
- if(GetPlayerMoney(playerid) < 13000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 13000);
- GivePlayerWeapon(playerid, 25, 500);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Shotgun (500 Ammo) for $13000.");
- }
- }
- }
- }
- case 10://sawnoff shotgun
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 60) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 60);
- GivePlayerWeapon(playerid, 26, 1);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Sawnoff Shotgun (1 Ammo) for $60.");
- }
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) < 3000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 3000);
- GivePlayerWeapon(playerid, 26, 50);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Sawnoff Shotgun (50 Ammo) for $3000.");
- }
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) < 6000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 6000);
- GivePlayerWeapon(playerid, 26, 100);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Sawnoff Shotgun (100 Ammo) for $6000.");
- }
- }
- case 3:
- {
- if(GetPlayerMoney(playerid) < 10000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 10000);
- GivePlayerWeapon(playerid, 26, 200);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Sawnoff Shotgun (200 Ammo) for $10000.");
- }
- }
- case 4:
- {
- if(GetPlayerMoney(playerid) < 25000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 25000);
- GivePlayerWeapon(playerid, 26, 500);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Sawnoff Shotgun (500 Ammo) for $25000.");
- }
- }
- }
- }
- case 11://combat shotgun
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 50) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 50);
- GivePlayerWeapon(playerid, 27, 1);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Combat Shotgun (1 Ammo) for $50.");
- }
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) < 2500) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 2500);
- GivePlayerWeapon(playerid, 27, 50);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Combat Shotgun (50 Ammo) for $2500.");
- }
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) < 5000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 5000);
- GivePlayerWeapon(playerid, 27, 100);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Combat Shotgun (100 Ammo) for $5000.");
- }
- }
- case 3:
- {
- if(GetPlayerMoney(playerid) < 9000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 9000);
- GivePlayerWeapon(playerid, 27, 200);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Combat Shotgun (200 Ammo) for $9000.");
- }
- }
- case 4:
- {
- if(GetPlayerMoney(playerid) < 18000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 18000);
- GivePlayerWeapon(playerid, 27, 500);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Combat Shotgun (500 Ammo) for $18000.");
- }
- }
- }
- }
- case 12://UZI
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 30) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 30);
- GivePlayerWeapon(playerid, 28, 1);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a UZI (1 Ammo) for $30.");
- }
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) < 1500) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 1500);
- GivePlayerWeapon(playerid, 28, 50);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a UZI (50 Ammo) for $1500.");
- }
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) < 3000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 3000);
- GivePlayerWeapon(playerid, 28, 100);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a UZI (100 Ammo) for $3000.");
- }
- }
- case 3:
- {
- if(GetPlayerMoney(playerid) < 5000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 5000);
- GivePlayerWeapon(playerid, 28, 200);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a UZI (200 Ammo) for $5000.");
- }
- }
- case 4:
- {
- if(GetPlayerMoney(playerid) < 13000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 13000);
- GivePlayerWeapon(playerid, 28, 500);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a UZI (500 Ammo) for $13000.");
- }
- }
- }
- }
- case 13://MP5
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 30) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 30);
- GivePlayerWeapon(playerid, 29, 1);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a MP5 (1 Ammo) for $30.");
- }
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) < 1500) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 1500);
- GivePlayerWeapon(playerid, 29, 50);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a MP5 (50 Ammo) for $1500.");
- }
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) < 3000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 3000);
- GivePlayerWeapon(playerid, 29, 100);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a MP5 (100 Ammo) for $3000.");
- }
- }
- case 3:
- {
- if(GetPlayerMoney(playerid) < 5000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 5000);
- GivePlayerWeapon(playerid, 29, 200);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a MP5 (200 Ammo) for $5000.");
- }
- }
- case 4:
- {
- if(GetPlayerMoney(playerid) < 13000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 13000);
- GivePlayerWeapon(playerid, 29, 500);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a MP5 (500 Ammo) for $13000.");
- }
- }
- }
- }
- case 14://ak-47
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 30) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 30);
- GivePlayerWeapon(playerid, 30, 1);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Ak-47 (1 Ammo) for $30.");
- }
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) < 1500) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 1500);
- GivePlayerWeapon(playerid, 30, 50);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Ak-47 (50 Ammo) for $1500.");
- }
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) < 3000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 3000);
- GivePlayerWeapon(playerid, 30, 100);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Ak-47 (100 Ammo) for $3000.");
- }
- }
- case 3:
- {
- if(GetPlayerMoney(playerid) < 5000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 5000);
- GivePlayerWeapon(playerid, 30, 200);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Ak-47 (200 Ammo) for $5000.");
- }
- }
- case 4:
- {
- if(GetPlayerMoney(playerid) < 13000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 13000);
- GivePlayerWeapon(playerid, 30, 500);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Ak-47 (500 Ammo) for $13000.");
- }
- }
- }
- }
- case 15://M4
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 30) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 30);
- GivePlayerWeapon(playerid, 31, 1);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a M4 (1 Ammo) for $30.");
- }
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) < 1500) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 1500);
- GivePlayerWeapon(playerid, 31, 50);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a M4 (50 Ammo) for $1500.");
- }
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) < 3000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 3000);
- GivePlayerWeapon(playerid, 31, 100);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a M4 (100 Ammo) for $3000.");
- }
- }
- case 3:
- {
- if(GetPlayerMoney(playerid) < 5000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 5000);
- GivePlayerWeapon(playerid, 31, 200);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a M4 (200 Ammo) for $5000.");
- }
- }
- case 4:
- {
- if(GetPlayerMoney(playerid) < 13000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 13000);
- GivePlayerWeapon(playerid, 31, 500);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a M4 (500 Ammo) for $13000.");
- }
- }
- }
- }
- case 16://Tec-9
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 35) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 35);
- GivePlayerWeapon(playerid, 32, 1);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Tec-9 (1 Ammo) for $35.");
- }
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) < 1750) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 1750);
- GivePlayerWeapon(playerid, 32, 50);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Tec-9 (50 Ammo) for $1750.");
- }
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) < 3500) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 3500);
- GivePlayerWeapon(playerid, 32, 100);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Tec-9 (100 Ammo) for $3500.");
- }
- }
- case 3:
- {
- if(GetPlayerMoney(playerid) < 6000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 6000);
- GivePlayerWeapon(playerid, 32, 200);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Tec-9 (200 Ammo) for $6000.");
- }
- }
- case 4:
- {
- if(GetPlayerMoney(playerid) < 14000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 14000);
- GivePlayerWeapon(playerid, 32, 500);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Tec-9 (500 Ammo) for $14000.");
- }
- }
- }
- }
- case 17://Rifle
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 30) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 30);
- GivePlayerWeapon(playerid, 33, 1);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Rifle (1 Ammo) for $30.");
- }
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) < 1500) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 1500);
- GivePlayerWeapon(playerid, 33, 50);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Rifle (50 Ammo) for $1500.");
- }
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) < 3000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 3000);
- GivePlayerWeapon(playerid, 33, 100);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Rifle (100 Ammo) for $3000.");
- }
- }
- case 3:
- {
- if(GetPlayerMoney(playerid) < 5000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 5000);
- GivePlayerWeapon(playerid, 33, 200);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Rifle (200 Ammo) for $5000.");
- }
- }
- case 4:
- {
- if(GetPlayerMoney(playerid) < 13000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 13000);
- GivePlayerWeapon(playerid, 33, 500);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Rifle (500 Ammo) for $13000.");
- }
- }
- }
- }
- case 18://sniper rifle
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 60) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 60);
- GivePlayerWeapon(playerid, 34, 1);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Sniper Rifle (1 Ammo) for $60.");
- }
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) < 3000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 3000);
- GivePlayerWeapon(playerid, 34, 50);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Sniper Rifle (50 Ammo) for $3000.");
- }
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) < 6000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 6000);
- GivePlayerWeapon(playerid, 34, 100);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Sniper Rifle (100 Ammo) for $6000.");
- }
- }
- case 3:
- {
- if(GetPlayerMoney(playerid) < 10000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 10000);
- GivePlayerWeapon(playerid, 34, 200);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Sniper Rifle (200 Ammo) for $10000.");
- }
- }
- case 4:
- {
- if(GetPlayerMoney(playerid) < 18000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 18000);
- GivePlayerWeapon(playerid, 34, 500);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Sniper Rifle (500 Ammo) for $18000.");
- }
- }
- }
- }
- case 19://RPG
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 1500) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 1500);
- GivePlayerWeapon(playerid, 35, 1);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a RPG for $1500.");
- }
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) < 3000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 3000);
- GivePlayerWeapon(playerid, 35, 2);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought 2 RPG for $3000.");
- }
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) < 7000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 7000);
- GivePlayerWeapon(playerid, 35, 5);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought 5 RPG for $7000.");
- }
- }
- }
- }
- case 20://H.S. Rockets
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 1800) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 1800);
- GivePlayerWeapon(playerid, 36, 1);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a H.S. Rockets for $1800.");
- }
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) < 3600) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 3600);
- GivePlayerWeapon(playerid, 36, 2);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought 2 H.S. Rockets for $3600.");
- }
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) < 8000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 8000);
- GivePlayerWeapon(playerid, 36, 5);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought 5 H.S. Rockets for $8000.");
- }
- }
- }
- }
- case 21://Flamethower
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 1500) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 1500);
- GivePlayerWeapon(playerid, 37, 100);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Flamethower (100 Ammo) for $1500.");
- }
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) < 3000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 3000);
- GivePlayerWeapon(playerid, 37, 200);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Flamethower (200 Ammo) for $3000.");
- }
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) < 7000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 7000);
- GivePlayerWeapon(playerid, 37, 500);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Flamethower (500 Ammo) for $7000.");
- }
- }
- }
- }
- case 22://satchel
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 1500) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 1500);
- GivePlayerWeapon(playerid, 39, 1);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Satchel for $1500.");
- }
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) < 3000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 3000);
- GivePlayerWeapon(playerid, 39, 2);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought 2 Satchel for $3000.");
- }
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) < 7000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 7000);
- GivePlayerWeapon(playerid, 39, 5);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought 5 Satchel for $7000.");
- }
- }
- }
- }
- case (0 + 100)://spray can
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 450) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 450);
- GivePlayerWeapon(playerid, 41, 50);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Spray Can (50 Ammo) for $450.");
- }
- }
- }
- }
- case (1 + 100)://fire estinguisher
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 500) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 500);
- GivePlayerWeapon(playerid, 42, 50);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Fire Extinguisher (50 Ammo) for $1500.");
- }
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) < 1000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 1000);
- GivePlayerWeapon(playerid, 42, 100);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Fire Extinguisher (100 Ammo) for $1000.");
- }
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) < 5000) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 5000);
- GivePlayerWeapon(playerid, 42, 500);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Fire Extinguisher (500 Ammo) for $5000.");
- }
- }
- }
- }
- case (2 + 100)://camera
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) < 50) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 50);
- GivePlayerWeapon(playerid, 43, 50);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Camera (50 Ammo) for $50.");
- }
- }
- }
- }
- case (3 + 100)://night vission
- {
- switch(listitem)
- {
- case 0:
- {
- if(IsPlayerHavingWeapon(playerid, 44)) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You already have a Night Vission Goggles.");
- else if(GetPlayerMoney(playerid) < 500) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 500);
- GivePlayerWeapon(playerid, 44, 1);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Night Vission Goggles for $500.");
- }
- }
- }
- }
- case (4 + 100)://thermal vission
- {
- switch(listitem)
- {
- case 0:
- {
- if(IsPlayerHavingWeapon(playerid, 45)) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You already have a Thermal Vission Goggle.");
- else if(GetPlayerMoney(playerid) < 500) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 500);
- GivePlayerWeapon(playerid, 45, 1);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Thermal Vission Goggles for $500.");
- }
- }
- }
- }
- case (5 + 100)://Parachute
- {
- switch(listitem)
- {
- case 0:
- {
- if(IsPlayerHavingWeapon(playerid, 45)) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You already have a Parachute.");
- else if(GetPlayerMoney(playerid) < 1) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have enough money to buy this item.");
- else
- {
- GivePlayerMoney(playerid, - 1);
- GivePlayerWeapon(playerid, 46, 1);
- SendClientMessage(playerid, COLOR_LIME, "SHOP: You have bought a Parachute for $1.");
- }
- }
- }
- }
- }
- }
- if(gListitem[playerid] < 100)
- {
- SetupPrevModelDialog(0.0, 0.0, 0.0, 3.0);
- ShowPlayerDialog(playerid, (DIALOG_SHOP + 1), DIALOG_STYLE_PREVMODEL, "Weapons List", weapons, "Select", "Back");
- }
- else
- {
- SetupPrevModelDialog(0.0, 0.0, 0.0, 2.0);
- ShowPlayerDialog(playerid, (DIALOG_SHOP + 2), DIALOG_STYLE_PREVMODEL, "Misc. Items", miscitems, "Select", "Back");
- }
- gListitem[playerid] = -1;
- }
- if(dialogid == DIALOG_INVENTORY)
- {
- if(response)
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be in team deathmatch to open inventory.");
- new string[98];
- switch(listitem)
- {
- case 0: format(string, sizeof(string), "Painkillers (%i pk.s in your bag)", gPainkillers[playerid]);
- case 1: format(string, sizeof(string), "Armour Jacket (%i armour in your bag)", (gArmour[playerid]) ? 1 : 0);
- case 2: format(string, sizeof(string), "Protection Helmet (%i helmet in your bag)", (gHelmet[playerid]) ? 1 : 0);
- case 3: format(string, sizeof(string), "Gas Mask (%i mask in your bag)", (gMask[playerid]) ? 1 : 0);
- case 4: format(string, sizeof(string), "Sucide Bomb (%i bomb in your bag)", (gBomb[playerid]) ? 1 : 0);
- }
- gListitem[playerid] = listitem;
- ShowPlayerDialog(playerid, (DIALOG_INVENTORY + 1), DIALOG_STYLE_LIST, string, "Use/Unuse\n(i) Info", "Select", "Back");
- }
- }
- if(dialogid == (DIALOG_INVENTORY + 1))
- {
- if(response)
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be in team deathmatch to open inventory.");
- switch(listitem)
- {
- case 0:
- {
- switch(gListitem[playerid])
- {
- case 0:
- {
- if(gPainkillers[playerid] < 1) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have any painkillers in your bag.");
- else
- {
- gPainkillers[playerid] -= 1;
- new string[144];
- format(string, sizeof(string), "* You have consumed a painkiller; You are now left with %i painkillers in your bag.", gPainkillers[playerid]);
- SendClientMessage(playerid, COLOR_SEA_GREEN, string);
- new Float:hp;
- GetPlayerHealth(playerid, hp);
- if((hp + 30.0) >= 100.0) SetPlayerHealth(playerid, 100.0);
- else SetPlayerHealth(playerid, (hp + 30.0));
- NotifyPlayer(playerid, "~g~Health regained (30%)", 5000);
- ApplyAnimation(playerid, "MEDIC", "CPR", 1.0, 0, 1, 1, 1, 1);
- }
- }
- case 1:
- {
- if(! gArmour[playerid]) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have an Armour Jacket in your bag.");
- else
- {
- gArmour[playerid] = false;
- SetPlayerArmour(playerid, 100.0);
- SendClientMessage(playerid, COLOR_SEA_GREEN, "You have used your armour jacket from your bag!");
- NotifyPlayer(playerid, "You have a ~g~Armour Jacket", 5000);
- }
- }
- case 2:
- {
- if(! gHelmet[playerid]) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have a Protection Helmet.");
- else
- {
- if(! IsPlayerAttachedObjectSlotUsed(playerid, 2))
- {
- RemovePlayerAttachedObject(playerid, 2);
- SendClientMessage(playerid, COLOR_SEA_GREEN, "* You have ENABLED your Protection helmet.");
- NotifyPlayer(playerid, "~g~Protection Helmet enabled", 5000);
- }
- else
- {
- switch(GetPlayerSkin(playerid))
- {
- case 24: SetPlayerAttachedObject(playerid,2,18638,2,0.151999,0.038000,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 24
- case 287: SetPlayerAttachedObject(playerid,2,18638,2,0.128000,0.049999,0.006000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 287
- case 285: SetPlayerAttachedObject(playerid,2,18638,2,0.182000,0.035000,0.007000,0.000000,0.000000,0.000000,1.000000,1.069999,1.118999); //skin 285
- case 111: SetPlayerAttachedObject(playerid,2,18638,2,0.159999,0.032999,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 111
- case 122: SetPlayerAttachedObject(playerid,2,18638,2,0.148000,0.017000,-0.002999,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 122
- case 73: SetPlayerAttachedObject(playerid,2,18638,2,0.148999,0.038999,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 73
- case 46: SetPlayerAttachedObject(playerid,2,18638,2,0.162999,0.035000,0.001000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 46
- case 102: SetPlayerAttachedObject(playerid,2,18638,2,0.173000,0.024999,-0.003000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 102
- default: SetPlayerAttachedObject(playerid,2,18638,2,0.173000,0.024999,-0.003000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 102
- }
- SendClientMessage(playerid, COLOR_SEA_GREEN, "* You have DISABLED your Protection helmet.");
- NotifyPlayer(playerid, "~r~Protection Helmet disabled", 5000);
- }
- }
- }
- case 3:
- {
- if(! gMask[playerid]) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have a Gas Mask.");
- else
- {
- if(! IsPlayerAttachedObjectSlotUsed(playerid, 3))
- {
- RemovePlayerAttachedObject(playerid, 3);
- SendClientMessage(playerid, COLOR_SEA_GREEN, "* You have ENABLED your Gas Mask.");
- NotifyPlayer(playerid, "~g~Gas Mask enabled", 5000);
- }
- else
- {
- SetPlayerAttachedObject(playerid, 3, 19472, 2, -0.022000, 0.137000, 0.018999, 3.899994, 85.999961, 92.999984, 0.923999, 1.141000, 1.026999);
- SendClientMessage(playerid, COLOR_SEA_GREEN, "* You have DISABLED your Gas Mask.");
- NotifyPlayer(playerid, "~r~Gas Mask disabled", 5000);
- }
- }
- }
- case 4:
- {
- if(! gBomb[playerid]) SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have a Sucide Bomb.");
- else
- {
- if(! IsPlayerAttachedObjectSlotUsed(playerid, 4))
- {
- RemovePlayerAttachedObject(playerid, 4);
- SendClientMessage(playerid, COLOR_SEA_GREEN, "* You have ENABLED your Sucide Bomb.");
- NotifyPlayer(playerid, "~g~Sucide Bomb enabled", 5000);
- }
- else
- {
- SetPlayerAttachedObject(playerid, 4, 1654, 1, 0.046000, 0.229000, -0.013000, 3.099998, 78.299972, -178.599960, 1.000000, 1.000000, 1.000000);
- SendClientMessage(playerid, COLOR_SEA_GREEN, "* You have DISABLED your Sucide Bomb.");
- NotifyPlayer(playerid, "~r~Sucide Bomb disabled", 5000);
- }
- }
- }
- }
- OnPlayerKeyStateChange(playerid, KEY_YES, 0);
- }
- case 1:
- {
- SendClientMessage(playerid, COLOR_KHAKI, " ");
- switch(gListitem[playerid])
- {
- case 0:
- {
- SendClientMessage(playerid, COLOR_KHAKI, "* Painkillers are medicine pills which will help you to regain health when you are injured.");
- SendClientMessage(playerid, COLOR_KHAKI, "* You must type /pk to use a painkiller and /givepk to distribute it to others!");
- }
- case 1:
- {
- SendClientMessage(playerid, COLOR_KHAKI, "* Armour Jacket is a portable armour case which can be used anytime to regain 100% Armour.");
- SendClientMessage(playerid, COLOR_KHAKI, "* You must type /armour to use/unuse an armour jacket and /givearmour to distribute it to others!");
- }
- case 2:
- {
- SendClientMessage(playerid, COLOR_KHAKI, "* Protection Helmet helps you to avoid instant deaths due to headshots, basically prevents headshots.");
- SendClientMessage(playerid, COLOR_KHAKI, "* You must type /helmet to use/unuse a protection helmet and /givehelmet to distribute it to others!");
- }
- case 3:
- {
- SendClientMessage(playerid, COLOR_KHAKI, "* Gas Mask helps you to prevent asthma and cough problems from teargas.");
- SendClientMessage(playerid, COLOR_KHAKI, "* You must type /mask to use/unuse a gas mask and /givemask to distribute it to others!");
- }
- case 4:
- {
- SendClientMessage(playerid, COLOR_KHAKI, "* Sucide Bomb is a deadly weapon! When you have a sucide bomb, you automatically explodes killing enemies around you on death!");
- SendClientMessage(playerid, COLOR_KHAKI, "* You must type /bomb to use/unuse a sucide bomb and /givebomb to distribute it to others!");
- }
- }
- gListitem[playerid] = -1;
- }
- }
- }
- }
- if(dialogid == DIALOG_PRESTIGE)
- {
- if(response)
- {
- new weaponid;
- switch(listitem)
- {
- case 0: weaponid = 22;
- case 1: weaponid = 23;
- case 2: weaponid = 24;
- case 7: weaponid = 25;
- case 8: weaponid = 26;
- case 9: weaponid = 27;
- case 10: weaponid = 28;
- case 11: weaponid = 29;
- case 12: weaponid = 30;
- case 13: weaponid = 31;
- case 14: weaponid = 32;
- case 15: weaponid = 33;
- case 16: weaponid = 34;
- case 17: weaponid = 37;
- default: weaponid = 24;
- }
- switch(gListitem[playerid])
- {
- case 0:
- {
- GAdmin_ChangeUserData(ReturnPlayerName(playerid), "i", "weapon1", weaponid);
- SendClientMessage(playerid, COLOR_YELLOW, "* You have successfully set your prestige weapon I.");
- }
- case 1:
- {
- GAdmin_ChangeUserData(ReturnPlayerName(playerid), "i", "weapon2", weaponid);
- SendClientMessage(playerid, COLOR_YELLOW, "* You have successfully set your prestige weapon II.");
- }
- case 2:
- {
- GAdmin_ChangeUserData(ReturnPlayerName(playerid), "i", "weapon3", weaponid);
- SendClientMessage(playerid, COLOR_YELLOW, "* You have successfully set your prestige weapon III.");
- }
- }
- }
- gListitem[playerid] = -1;
- }
- if(dialogid == DIALOG_DUEL_WEAPON)
- {
- if(response)
- {
- new weaponid;
- switch(listitem)
- {
- case 0: weaponid = 9;
- case 1: weaponid = 16;
- case 2: weaponid = 17;
- case 3: weaponid = 18;
- case 4: weaponid = 22;
- case 5: weaponid = 23;
- case 6: weaponid = 24;
- case 7: weaponid = 25;
- case 8: weaponid = 26;
- case 9: weaponid = 27;
- case 10: weaponid = 28;
- case 11: weaponid = 29;
- case 12: weaponid = 30;
- case 13: weaponid = 31;
- case 14: weaponid = 32;
- case 15: weaponid = 33;
- case 16: weaponid = 34;
- case 17: weaponid = 37;
- default: weaponid = 24;
- }
- gDuel[playerid][d_weapon] = weaponid;
- gDuel[gDuel[playerid][d_opponent]][d_weapon] = weaponid;
- if(! IsPlayerConnected(gDuel[playerid][d_opponent])) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The opponent player is not connected.");
- if(gPlayerGamemode[gDuel[playerid][d_opponent]] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The opponent player must in team deathmatch.");
- if(! IsPlayerSpawned(gDuel[playerid][d_opponent])) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't duel the player isn't spawned.");
- if(gDuel[gDuel[playerid][d_opponent]][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The opponent player is already in a duel.");
- if(GetPlayerMoney(playerid) < gDuel[playerid][d_bet]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You yourself don't have that much bet money.");
- if(gDuel[playerid][d_bet] < 0) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't bet negative money!!!!");
- new string[256];
- format(string, sizeof(string), "* You have send a duel request to %s[%i] with weapon %s, bet $%i.", ReturnPlayerName(gDuel[playerid][d_opponent]), gDuel[playerid][d_opponent], ReturnWeaponName(gDuel[playerid][d_weapon]), gDuel[playerid][d_bet]);
- SendClientMessage(playerid, COLOR_SEA_GREEN, string);
- format(string, sizeof(string), "You have recieved a duel request from "RED"%s[%i]\n\n"LIGHT_BLUE"Bet money: "PINK"$%i\n"LIGHT_BLUE"Weapon: "PINK"%s", ReturnPlayerName(playerid), playerid, gDuel[playerid][d_bet], ReturnWeaponName(gDuel[playerid][d_weapon]));
- ShowPlayerDialog(gDuel[playerid][d_opponent], DIALOG_DUEL, DIALOG_STYLE_MSGBOX, "Duel request!", string, "Accept", "Ignore");
- }
- }
- if(dialogid == DIALOG_DUEL)
- {
- if(! response)
- {
- SendClientMessage(gDuel[playerid][d_opponent], COLOR_RED, "* Your duel request was ignored !! Try some next time !!");
- gDuel[gDuel[playerid][d_opponent]][d_induel] = false;
- gDuel[gDuel[playerid][d_opponent]][d_opponent] = INVALID_PLAYER_ID;
- gDuel[gDuel[playerid][d_opponent]][d_weapon] = 0;
- gDuel[gDuel[playerid][d_opponent]][d_bet] = 0;
- gDuel[playerid][d_induel] = false;
- gDuel[playerid][d_opponent] = INVALID_PLAYER_ID;
- gDuel[playerid][d_weapon] = 0;
- gDuel[playerid][d_bet] = 0;
- }
- if(response)
- {
- if(! IsPlayerConnected(gDuel[playerid][d_opponent])) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The opponent player is not connected.");
- if(gPlayerGamemode[gDuel[playerid][d_opponent]] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The opponent player must in team deathmatch.");
- if(! IsPlayerSpawned(gDuel[playerid][d_opponent])) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't duel the player isn't spawned.");
- if(gDuel[gDuel[playerid][d_opponent]][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The opponent player is already in a duel.");
- if(GetPlayerMoney(playerid) < gDuel[playerid][d_bet]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You yourself don't have that much bet money.");
- if(gDuel[playerid][d_bet] < 0) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't bet negative money!!!!");
- ResetPlayerWeapons(playerid);
- GivePlayerWeapon(playerid, gDuel[playerid][d_weapon], 9999999);
- SetPlayerHealth(playerid, 100.0);
- SetPlayerArmour(playerid, 100.0);
- GameTextForPlayer(playerid, "~r~~h~~h~~h~Go !!", 3000, 6);
- SetPlayerTeam(playerid, NO_TEAM);
- ResetPlayerWeapons(gDuel[playerid][d_opponent]);
- GivePlayerWeapon(gDuel[playerid][d_opponent], gDuel[playerid][d_weapon], 9999999);
- SetPlayerHealth(gDuel[playerid][d_opponent], 100.0);
- SetPlayerArmour(gDuel[playerid][d_opponent], 100.0);
- GameTextForPlayer(gDuel[playerid][d_opponent], "~r~~h~~h~~h~Go !!", 3000, 6);
- SetPlayerTeam(gDuel[playerid][d_opponent], NO_TEAM);
- switch(random(3))
- {
- case 0:
- {
- SetPlayerPos(playerid, -1404.067, 1270.3706, 1042.8672);
- SetPlayerInterior(playerid, 16);
- SetPlayerVirtualWorld(playerid, playerid);
- SetPlayerPos(gDuel[playerid][d_opponent], -1395.067, 1261.3706, 1042.8672);
- SetPlayerInterior(gDuel[playerid][d_opponent], 16);
- SetPlayerVirtualWorld(gDuel[playerid][d_opponent], playerid);
- }
- case 1:
- {
- SetPlayerPos(playerid, 1353.407,2188.155,11.02344);
- SetPlayerInterior(playerid, 0);
- SetPlayerVirtualWorld(playerid, playerid);
- SetPlayerPos(gDuel[playerid][d_opponent], 1346.255,2142.843,11.01563);
- SetPlayerInterior(gDuel[playerid][d_opponent], 0);
- SetPlayerVirtualWorld(gDuel[playerid][d_opponent], playerid);
- }
- case 2:
- {
- SetPlayerPos(playerid, -1041.037,1078.729,1347.678);
- SetPlayerInterior(playerid, 10);
- SetPlayerVirtualWorld(playerid, playerid);
- SetPlayerFacingAngle(playerid, 135);
- SetPlayerPos(gDuel[playerid][d_opponent], -1018.061,1052.502,1346.327);
- SetPlayerInterior(gDuel[playerid][d_opponent], 10);
- SetPlayerVirtualWorld(gDuel[playerid][d_opponent], playerid);
- SetPlayerFacingAngle(gDuel[playerid][d_opponent], 45);
- }
- }
- new string[144];
- format(string, sizeof(string), "A duel has begun b/w %s and %s [weapon: %s, bet: $%i]", ReturnPlayerName(playerid), ReturnPlayerName(gDuel[playerid][d_opponent]), ReturnWeaponName(gDuel[playerid][d_weapon]), gDuel[playerid][d_bet]);
- SendClientMessageToAll(COLOR_AQUA, string);
- gDuel[gDuel[playerid][d_opponent]][d_induel] = true;
- gDuel[playerid][d_induel] = true;
- return 1;
- }
- }
- if(dialogid == DIALOG_SPAWN)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- SendClientMessage(playerid, COLOR_ORANGE_RED, "* You have set your spawn to BASE.");
- gPlayerSpawn[playerid] = SPAWN_BASE;
- }
- default:
- {
- if(gCaptureZone[gSpawn[(listitem - 1)][s_zoneid]][E_ZONEOWNER] != GetPlayerTeam(playerid))
- {
- SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: Your team don't own that zone! [LIGHTBLUE: owned, GRAY: not owned]");
- return cmd_ss(playerid);
- }
- else
- {
- new string[144];
- format(string, sizeof(string), "* You have set your spawn to %s.", gCaptureZone[gSpawn[(listitem - 1)][s_zoneid]][E_ZONENAME]);
- SendClientMessage(playerid, COLOR_ORANGE_RED, string);
- gPlayerSpawn[playerid] = (listitem - 1);
- }
- }
- }
- }
- }
- if(dialogid == DIALOG_TIME)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- SetPlayerTime(playerid, 7, 0);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid,"~y~Morning",5000,3);
- }
- case 1:
- {
- SetPlayerTime(playerid, 12, 0);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid,"~y~Mid day",5000,3);
- }
- case 2:
- {
- SetPlayerTime(playerid, 16, 0);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid,"~y~Afternoon",5000,3);
- }
- case 3:
- {
- SetPlayerTime(playerid, 20, 0);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid,"~y~Evening",5000,3);
- }
- case 4:
- {
- SetPlayerTime(playerid, 0, 0);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid,"~y~Midnight",5000,3);
- }
- }
- }
- }
- if(dialogid == DIALOG_WEATHER)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- SetPlayerWeather(playerid, 5);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid,"~y~Blue Sky",5000,3);
- }
- case 1:
- {
- SetPlayerWeather(playerid, 19);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid,"~y~Sand Strom",5000,3);
- }
- case 2:
- {
- SetPlayerWeather(playerid, 8);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid,"~y~Thunderstrom",5000,3);
- }
- case 3:
- {
- SetPlayerWeather(playerid, 20);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid,"~y~Foggy",5000,3);
- }
- case 4:
- {
- SetPlayerWeather(playerid, 9);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid,"~y~Cloudy",5000,3);
- }
- case 5:
- {
- SetPlayerWeather(playerid, 16);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid,"~y~High Tide",5000,3);
- }
- case 6:
- {
- SetPlayerWeather(playerid, 45);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid,"~y~Purple Sky",5000,3);
- }
- case 7:
- {
- SetPlayerWeather(playerid, 44);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid,"~y~Black/White Sky",5000,3);
- }
- case 8:
- {
- SetPlayerWeather(playerid, 22);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid,"~y~Green Sky",5000,3);
- }
- case 9:
- {
- SetPlayerWeather(playerid, 11);
- PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);
- GameTextForPlayer(playerid,"~y~Heat Wave",5000,3);
- }
- }
- }
- }
- return 1;
- }
- //------------------------------------------------
- forward OnPlayerLaunchNuke(playerid, baseid);
- public OnPlayerLaunchNuke(playerid, baseid)
- {
- gNuke[NUKE_BASE] = -1;
- gStopTimeUpdate = false;
- new kills;
- new string[144];
- new Float:pos[3];
- foreach(new i : Player)
- {
- if( i != playerid &&
- IsPlayerInGangZone(i, gTeamBase[baseid][b_base]) &&
- GetPlayerTeam(i) != GetPlayerTeam(playerid) &&
- ! GetPlayerVirtualWorld(i) &&
- ! GetPlayerInterior(i) &&
- IsPlayerSpawned(i) &&
- (GetPlayerTeam(i) < sizeof(gTeam) || GetPlayerTeam(i) == NO_TEAM))
- {
- GetPlayerPos(i, pos[0], pos[1], pos[2]);
- CreateExplosion(pos[0] + 2, pos[1], pos[2], 6, 5);
- CreateExplosion(pos[0] - 2, pos[1], pos[2], 6, 5);
- SetPlayerHealth(i, 0.0);
- GameTextForPlayer(i, "~r~NUKED !", 5000, 3);
- format(string, sizeof(string), "You killed %s[%i] with your Nuke(+$500).", ReturnPlayerName(i), i);
- SendClientMessage(playerid, COLOR_LIME_GREEN, string);
- GivePlayerMoney(playerid, 500);
- CallLocalFunction("OnPlayerDeath", "iii", i, playerid, 51);
- kills += 1;
- }
- }
- SetWeather(19);
- SetTimer("OnBombEffectFinish", (10 * 1000), false);
- format(string, sizeof(string), "* %s[%i] killed %i players with the Nuke (%s).", ReturnPlayerName(playerid), playerid, kills, gTeamBase[baseid][b_name]);
- SendClientMessageToAll(COLOR_LIGHT_STEEL_BLUE, string);
- return 1;
- }
- //------------------------------------------------
- forward OnPlayerLaunchAnthrax(playerid);
- public OnPlayerLaunchAnthrax(playerid)
- {
- gStopTimeUpdate = false;
- new kills;
- new string[144];
- foreach(new i : Player)
- {
- if( i != playerid &&
- GetPlayerTeam(i) != GetPlayerTeam(playerid) &&
- ! GetPlayerVirtualWorld(i) &&
- ! GetPlayerInterior(i) &&
- IsPlayerSpawned(i) &&
- (GetPlayerTeam(i) < sizeof(gTeam) || GetPlayerTeam(i) == NO_TEAM))
- {
- new Float:hp;
- GetPlayerHealth(i, hp);
- SetPlayerHealth(i, (hp - 75.0));
- ApplyAnimation(i, "ped", "gas_cwr", 1.0, 0, 0, 0, 0, 0);
- GameTextForPlayer(i, "~r~ANTHRAX !", 5000, 3);
- if((hp - 75.0) <= 0.0)
- {
- format(string, sizeof(string), "You killed %s[%i] with your Anthrax(+$500).", ReturnPlayerName(i), i);
- SendClientMessage(playerid, COLOR_LIME_GREEN, string);
- GivePlayerMoney(playerid, 500);
- CallLocalFunction("OnPlayerDeath", "iii", i, playerid, 40);
- kills += 1;
- }
- }
- }
- SetWeather(2009);
- SetTimer("OnBombEffectFinish", (10 * 1000), false);
- format(string, sizeof(string), "* %s[%i] killed %i players with the Anthrax (World).", ReturnPlayerName(playerid), playerid, kills);
- SendClientMessageToAll(COLOR_LIGHT_STEEL_BLUE, string);
- return 1;
- }
- //------------------------------------------------
- forward OnBombEffectFinish();
- public OnBombEffectFinish()
- {
- gStopTimeUpdate = true;
- SetWorldTime(server_time);
- SetWeather(server_weather);
- SendClientMessageToAll(COLOR_LIGHT_STEEL_BLUE, "* The enviornment has been restored!");
- return 1;
- }
- //------------------------------------------------
- IsPlayerNearEnemies(playerid, Float:range = 30.0)
- {
- new Float:pos[3];
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- foreach(new i : Player)
- {
- if( i != playerid &&
- GetPlayerTeam(playerid) != GetPlayerTeam(i) &&
- IsPlayerInRangeOfPoint(i, range, pos[0], pos[1], pos[2]))
- {
- return true;
- }
- }
- return false;
- }
- //------------------------------------------------
- CMD:kill(playerid)
- {
- if(! IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't sucide when you aren't spawned.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(IsPlayerNearEnemies(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't use this command near enemies.");
- if(IsPlayerInAnyVehicle(playerid))
- {
- new Float:pos[3];
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- SetPlayerPos(playerid, pos[0], pos[1], pos[2] + 2.2);//eject the player!
- }
- SetPlayerHealth(playerid, 0.0);
- SendClientMessage(playerid, COLOR_SEA_GREEN, "* You are now dead!");
- NotifyPlayer(playerid, "You commited sucide!", 5000);
- return 1;
- }
- CMD:teams(playerid)
- {
- new string[144];
- for(new i; i < sizeof(gTeam); i++)
- {
- format(string, sizeof(string), "* Team %s::%i | Players: %i | Flags: %i/%i", gTeam[i][E_NAME], (i + 1), CountTeamPlayers(i), CountTeamFlags(i), sizeof(gCaptureZone));
- SendClientMessage(playerid, gTeam[i][E_COLOR], string);
- }
- return 1;
- }
- CMD:myteam(playerid)
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- new string[144];
- format(string, sizeof(string), "* You are playing as team %s::%i | Players: %i | Flags: %i/%i", gTeam[GetPlayerTeam(playerid)][E_NAME], (GetPlayerTeam(playerid) + 1), CountTeamPlayers(GetPlayerTeam(playerid)), CountTeamFlags(GetPlayerTeam(playerid)), sizeof(gCaptureZone));
- SendClientMessage(playerid, gTeam[GetPlayerTeam(playerid)][E_COLOR], string);
- return 1;
- }
- CMD:sync(playerid)
- {
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't synchronize in a vehicle.");
- if(! IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't synchronize when you aren't spawned.");
- if(IsPlayerNearEnemies(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't use this command near enemies.");
- SyncPlayer(playerid);
- SendClientMessage(playerid, COLOR_SEA_GREEN, "* You have been synchronized by your request.");
- return 1;
- }
- CMD:pos(playerid)
- {
- new Float:x, Float:y, Float:z, Float:a;
- GetPlayerPos(playerid, x, y, z);
- GetPlayerFacingAngle(playerid, a);
- new string[144];
- format(string, sizeof(string), "Your position | X: %0.4f | Y: %0.4f | Z: %0.4f | A: %0.4f | Interior: %d | VirtualWorld: %d", x, y, z, a, GetPlayerInterior(playerid), GetPlayerVirtualWorld(playerid));
- SendClientMessage(playerid, COLOR_SEA_GREEN, string);
- return 1;
- }
- CMD:givegun(playerid, params[])
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- if(! IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't give guns when you aren't spawned.");
- new target, ammo;
- if(sscanf(params, "ui", target, ammo)) return SendClientMessage(playerid, COLOR_THISTLE, "USAGE: /givegun [player] [ammo]");
- if(ammo < 1) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The ammo limit must be greater than 0.");
- if(! IsPlayerConnected(target)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The specified player is not connected.");
- new Float:pos[3];
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- if(! IsPlayerInRangeOfPoint(target, 5.0, pos[0], pos[1], pos[2])) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The specified player is not near you.");
- if(GetPlayerWeapon(playerid) == 0) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't give your fist!");
- if(GetPlayerAmmo(playerid) < ammo) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: Your weapon don't have that much ammo.");
- if(target == playerid) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't give weapons to yourself.");
- new weaponname[30];
- GetWeaponName(GetPlayerWeapon(playerid), weaponname, sizeof(weaponname));
- switch(GetPlayerWeapon(playerid))
- {
- case 0..15: ammo = 1;
- }
- GivePlayerWeapon(playerid, GetPlayerWeapon(playerid), - ammo);
- GivePlayerWeapon(target, GetPlayerWeapon(playerid), ammo);
- new string[144];
- format(string, sizeof(string), "* %s(%i) have given you a %s with %i ammo.", ReturnPlayerName(playerid), playerid, weaponname, ammo);
- SendClientMessage(target, COLOR_SEA_GREEN, string);
- format(string, sizeof(string), "* You have given %s(%i) a %s with %i ammo.", ReturnPlayerName(target), target, weaponname, ammo);
- SendClientMessage(playerid, COLOR_SEA_GREEN, string);
- NotifyPlayer(playerid, "~g~Weapon recieved", 5000);
- return 1;
- }
- CMD:givemoney(playerid, params[])
- {
- if(! IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't transfer money when you aren't spawned.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- new target, amount;
- if(sscanf(params, "ui", target, amount)) return SendClientMessage(playerid, COLOR_THISTLE, "USAGE: /givemoney [player] [amount]");
- if(amount < 1) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The amount limit must be greater than 0.");
- if(! IsPlayerConnected(target)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The specified player is not connected.");
- new Float:pos[3];
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- if(! IsPlayerInRangeOfPoint(target, 5.0, pos[0], pos[1], pos[2])) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The specified player is not near you.");
- if(GetPlayerMoney(playerid) < amount) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You yourself don't have that much money.");
- if(target == playerid) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't give money to yourself.");
- GivePlayerMoney(playerid, - amount);
- GivePlayerMoney(target, amount);
- new string[144];
- format(string, sizeof(string), "* %s(%i) have given you %i$.", ReturnPlayerName(playerid), playerid, amount);
- SendClientMessage(target, COLOR_SEA_GREEN, string);
- format(string, sizeof(string), "* You have given %s(%i), %i$.", ReturnPlayerName(target), target, amount);
- SendClientMessage(playerid, COLOR_SEA_GREEN, string);
- NotifyPlayer(playerid, "~g~Money($) recieved", 5000);
- return 1;
- }
- CMD:rules(playerid)
- {
- new dialogstr[1024];
- strcat(dialogstr, ""WHITE"These are general server rules, if you think we missed some, just keep that in mind\n");
- strcat(dialogstr, "as a rule and don't break it! We will add it soon!\n\n");
- strcat(dialogstr, ""RED"1. "LIGHT_BLUE"Never make use of cheats, hacks or methods of unfair gameplay.\n");
- strcat(dialogstr, ""RED"2. "LIGHT_BLUE"Always respect every player and admin, dont provoke others.\n");
- strcat(dialogstr, ""RED"3. "LIGHT_BLUE"Any sort of level boosting is strictly restricted. This may include:\n");
- strcat(dialogstr, ""RED" - "LIGHT_BLUE"Score boosting\n");
- strcat(dialogstr, ""RED" - "LIGHT_BLUE"Money boosting\n");
- strcat(dialogstr, ""RED" - "LIGHT_BLUE"Kills/Deaths boosting\n");
- strcat(dialogstr, ""RED"4. "LIGHT_BLUE"Dont unnecessarly PM. or send messages to players.\n");
- strcat(dialogstr, ""RED"5. "LIGHT_BLUE"Advertisements are not allowed, not in chat and PMs.\n");
- strcat(dialogstr, ""RED". "LIGHT_BLUE"If you have applied for admin on forums, then dont ask users to support.\n");
- strcat(dialogstr, ""RED"7. "LIGHT_BLUE"Don't misuse your admin or donor commands if provided.\n");
- strcat(dialogstr, ""RED"8. "LIGHT_BLUE"Play as a faithfull, trustworthy, and friendly user.\n\n");
- strcat(dialogstr, ""RED"NOTE: "WHITE"Violation of any of these rule can get you BAN, KICK, WARN, TEMPBAN...");
- ShowPlayerDialog(playerid, DIALOG_COMMON, DIALOG_STYLE_MSGBOX, "Server rules", dialogstr, "Close", "");
- return 1;
- }
- CMD:zonehelp(playerid)
- {
- new dialogstr[656];
- strcat(dialogstr, ""WHITE"The server has its own advance capturing zone system!\n");
- strcat(dialogstr, "In order to capture zones, you have to follow the steps:\n\n");
- strcat(dialogstr, ""RED"1. "LIGHT_BLUE"You see a flag mapicon overlaped witha Checkpoint. Go to any one with enemy colored gangzone.\n");
- strcat(dialogstr, ""RED"2. "LIGHT_BLUE"Stay in the checkpoint for "#CAPTUR_TIME" seconds and cover yourself from enemies (if any).\n");
- strcat(dialogstr, ""RED"3. "LIGHT_BLUE"Once the time is completed, you will get a notification and will given a reward for the capture.\n\n");
- strcat(dialogstr, ""WHITE"For more help, ask an admin for help.");
- ShowPlayerDialog(playerid, DIALOG_COMMON, DIALOG_STYLE_MSGBOX, "Capture zones help", dialogstr, "Close", "");
- return 1;
- }
- CMD:zones(playerid)
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- new dialogstr[42];
- new DIALOG[1024];
- for(new i; i < sizeof(gCaptureZone); i++)
- {
- if(! gCaptureZone[i][E_ZONEATTACKED])
- {
- if(gCaptureZone[i][E_ZONEOWNER] == GetPlayerTeam(playerid))
- {
- format(dialogstr, sizeof(dialogstr), "%s(%i)\n", gCaptureZone[i][E_ZONENAME], i);
- strcat(DIALOG, dialogstr);
- }
- }
- }
- if(! strlen(DIALOG)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: Your team don't own any capture zone.");
- ShowPlayerDialog(playerid, DIALOG_COMMON, DIALOG_STYLE_LIST, "Zones owned by your team", DIALOG, "Close", "");
- return 1;
- }
- CMD:findwar(playerid)
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- new dialogstr[356];
- new DIALOG[2500];
- for(new i; i < sizeof(gCaptureZone); i++)
- {
- if(gCaptureZone[i][E_ZONEATTACKED])
- {
- if(gCaptureZone[i][E_ZONEOWNER] == GetPlayerTeam(playerid) || GetPlayerTeam(gCaptureZone[i][E_ZONEATTACKER]) == GetPlayerTeam(playerid))
- {
- format(dialogstr, sizeof(dialogstr), "%s(%i) - %s attacking %s's zone\n", gCaptureZone[i][E_ZONENAME], i, gTeam[ gCaptureZone[i][E_ZONEATTACKER] ][E_NAME], gTeam[ gCaptureZone[i][E_ZONEOWNER] ][E_NAME]);
- strcat(DIALOG, dialogstr);
- }
- }
- }
- if(! strlen(DIALOG)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: Your team don't have any capture zone under attack.");
- ShowPlayerDialog(playerid, DIALOG_COMMON, DIALOG_STYLE_LIST, "Zones under attack by your team", DIALOG, "Close", "");
- return 1;
- }
- CMD:sc(playerid)
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- if(GetPlayerTeam(playerid) == 7) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: Africa team can't use this command.");
- if(! gClassSelection[playerid])
- {
- gClassSelection[playerid] = true;
- SendClientMessage(playerid, COLOR_OLIVE, "Switching class selection on next death...");
- }
- return 1;
- }
- CMD:heal(playerid, params[])
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gClass[playerid] != CLASS_MEDIC) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be a Medic to heal players.");
- if(! IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't give guns when you aren't spawned.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- new target;
- if(sscanf(params, "u", target)) return SendClientMessage(playerid, COLOR_THISTLE, "USAGE: /heal [player]");
- if(! IsPlayerConnected(target)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The specified player is not connected.");
- if(target == playerid) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot heal yourself, use /pk instead.");
- new Float:pos[3];
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- if(! IsPlayerInRangeOfPoint(target, 10.0, pos[0], pos[1], pos[2])) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The specified player is not near you.");
- if(GetPlayerTeam(playerid) != GetPlayerTeam(target)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot heal enemies.");
- if(gHealed[playerid][target] != -1) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The must wait 30 seconds before healing that specific player again.");
- new Float:hp;
- GetPlayerHealth(target, hp);
- if((hp + 50.0) >= 100.0) SetPlayerHealth(target, 100.0);
- else SetPlayerHealth(target, hp + 50.0);
- PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
- PlayerPlaySound(target, 1133, 0.0, 0.0, 0.0);
- gHealed[playerid][target] = SetTimerEx("OnPlayerHealExpire", 30 * 1000, false, "ii", playerid, target);
- new string[144];
- format(string, sizeof(string), "* %s(%i) have healed you with 50.0 health.", ReturnPlayerName(playerid), playerid);
- SendClientMessage(target, COLOR_SEA_GREEN, string);
- format(string, sizeof(string), "%s(%i) healed you with 50.0 HP.", ReturnPlayerName(playerid), playerid);
- NotifyPlayer(target, string, 5000);
- format(string, sizeof(string), "* You have healed ~b~~h~~h~~h~%s(%i) ~w~~h~with 50.0 health.", ReturnPlayerName(target), target);
- SendClientMessage(playerid, COLOR_SEA_GREEN, string);
- format(string, sizeof(string), "Healed ~b~~h~~h~~h~%s(%i) ~w~~h~for 50.0 HP.", ReturnPlayerName(target), target);
- NotifyPlayer(playerid, string, 5000);
- return 1;
- }
- CMD:jp(playerid)
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gClass[playerid] != CLASS_JETRUNNER) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be a Jetrunner to activate jetpack.");
- if(! IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't activate jetpack when you aren't spawned.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't use this command while in a vehicle.");
- SetPlayerSpecialAction(playerid, SPECIAL_ACTION_USEJETPACK);
- PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
- NotifyPlayer(playerid, "You have activated your Jetpack", 5000);
- return 1;
- }
- CMD:dis(playerid)
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gClass[playerid] != CLASS_SPY) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be a Spy to disguize.");
- if(! IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't disguize when you aren't spawned.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- if(gDis[playerid] <= 0) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You have no clothes left in your disguize kit. Go to shop and buy one!");
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't use this command while in a vehicle.");
- new dialogstr[556], string[145];
- for(new i; i < sizeof(gTeam); i++)
- {
- format(string, sizeof(string), "{%06x}%s\n", ( gTeam[i][E_COLOR] >>> 8 ), gTeam[i][E_NAME]);
- strcat(dialogstr, string);
- }
- ShowPlayerDialog(playerid, DIALOG_DIS, DIALOG_STYLE_LIST, "Disguize kit", dialogstr, "Disguize", "Cancel");
- return 1;
- }
- CMD:undis(playerid)
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gClass[playerid] != CLASS_SPY) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be a Spy to undisguize.");
- if(! IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't undisguize when you aren't spawned.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- if(GetPlayerSkin(playerid) == gTeam[GetPlayerTeam(playerid)][E_SKIN]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You are already undisguized.");
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't use this command while in a vehicle.");
- SetPlayerSkin(playerid, gTeam[GetPlayerTeam(playerid)][E_SKIN]);
- SetPlayerColor(playerid, gTeam[GetPlayerTeam(playerid)][E_COLOR]);
- new string[145];
- format(string, sizeof(string), "You have undisguized to your team {%06x}%s", ( gTeam[GetPlayerTeam(playerid)][E_COLOR] >>> 8 ), gTeam[GetPlayerTeam(playerid)][E_NAME]);
- NotifyPlayer(playerid, string, 5000);
- return 1;
- }
- CMD:rob(playerid, params[])
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gClass[playerid] != CLASS_SPY) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be a Spy to rob players.");
- if(! IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't rob when you aren't spawned.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- new target;
- if(sscanf(params, "u", target)) return SendClientMessage(playerid, COLOR_THISTLE, "USAGE: /rob [player]");
- if(! IsPlayerConnected(target)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The specified player is not connected.");
- if(target == playerid) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot rob yourself.");
- new Float:pos[3];
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- if(! IsPlayerInRangeOfPoint(target, 3.0, pos[0], pos[1], pos[2])) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The specified player is not near you.");
- if(GetPlayerTeam(target) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command on that player right now.");
- if(GetPlayerTeam(playerid) == GetPlayerTeam(target)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot rob team mates.");
- switch(random(4))
- {
- case 1://fail
- {
- SetPlayerSkin(playerid, gTeam[GetPlayerTeam(playerid)][E_SKIN]);
- SetPlayerColor(playerid, gTeam[GetPlayerTeam(playerid)][E_COLOR]);
- NotifyPlayer(playerid, "You have have been detected as a ~r~SPY~w~~h~!", 5000);
- }
- default://success
- {
- new money = (1000 + random(500));
- GivePlayerMoney(playerid, money);
- GivePlayerMoney(target, - money);
- new string[145];
- format(string, sizeof(string), "You have robbed ~b~~h~~h~~h~%s(%i) ~w~~h~(~g~+ %i$~w~~h~)", ReturnPlayerName(target), target, money);
- NotifyPlayer(playerid, string, 5000);
- }
- }
- PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
- return 1;
- }
- CMD:help(playerid)
- {
- ShowPlayerDialog(playerid, DIALOG_HELP, DIALOG_STYLE_LIST, "Server helpline", "How to play?\nHow to reduce PING?\nHow to unlock new stuff?\nHow to be a Donor?\nHow to be an Admin?\nAbout gamemode\nAbout server\nAbout capture zones\nGetting started...\nServer Rules...", "Open", "Close");
- return 1;
- }
- CMD:h(playerid) return cmd_help(playerid);
- CMD:cmds(playerid)
- {
- new dialogstr[1024];
- strcat(dialogstr, ""YELLOW"GENERAL COMMANDS:\n");
- strcat(dialogstr, ""LIGHT_BLUE"/help, /rules, /cmds, /kill, /rules, /zonehelp, /time, /sync, /pos, /shout ...\n\n");
- strcat(dialogstr, ""YELLOW"TEAM & ZONE COMMANDS\n");
- strcat(dialogstr, ""LIGHT_BLUE"/myteam, /teams, /radio, /zones, /findwar, /zonehelp, /ss ...\n\n");
- strcat(dialogstr, ""YELLOW"CLASS COMMANDS\n");
- strcat(dialogstr, ""LIGHT_BLUE"/chelp, /sc, /ccmds, /heal, /pk, /jp, /dis, /undis, /rob ...\n\n");
- strcat(dialogstr, ""YELLOW"USEFUL COMMANDS\n");
- strcat(dialogstr, ""LIGHT_BLUE"/login, /register, /changename, /admins, /donors, /report, /autologin, stats,\n");
- strcat(dialogstr, ""LIGHT_BLUE"/pm, /nopm, /dnd, /reply, /acmds, /givegun, /givemoney, /sc, /st, /shout.\n");
- strcat(dialogstr, ""LIGHT_BLUE"/times, /players, /ranks, /rank, /rhelp, /dm, /prestige, /myprestige, /resetprestige ...\n\n");
- strcat(dialogstr, ""YELLOW"DEATHMATCH COMMANDS\n");
- strcat(dialogstr, ""LIGHT_BLUE"/minigun, /moneybag, /glass, /rpg, /exit, /dm ...\n\n");
- strcat(dialogstr, ""YELLOW"INVENTORY COMMANDS\n");
- strcat(dialogstr, ""LIGHT_BLUE"/helmet, /givehelmet, /pk, /givepk, /armour, /givearmour, /mask, /givemask,\n");
- strcat(dialogstr, ""LIGHT_BLUE"/bomb, /givebomb, (Press KEY_YES<y key> to open inventory dialog) ...\n\n");
- strcat(dialogstr, ""YELLOW"DONOR COMMANDS\n");
- strcat(dialogstr, ""LIGHT_BLUE"/dhelp, /dcmds, /dguns, /dammo, /dskin, /dlabel, /dbike, /dsupply ...\n\n");
- strcat(dialogstr, ""WHITE"If you need any sort of help related to game, contact a mature player or an admin!");
- ShowPlayerDialog(playerid, DIALOG_COMMON, DIALOG_STYLE_MSGBOX, "Server commands list", dialogstr, "Close", "");
- return 1;
- }
- CMD:c(playerid) return cmd_cmds(playerid);
- CMD:commands(playerid) return cmd_cmds(playerid);
- CMD:st(playerid)
- {
- if(ForceClassSelection(playerid))
- {
- SendClientMessage(playerid, COLOR_OLIVE, "Switching team selection on next death...");
- }
- return 1;
- }
- CMD:times(playerid)
- {
- new string[148];
- format(string, sizeof(string), "- Anthrax, ready to use in %i seconds", gAnthrax[ANTHRAX_TIME]);
- SendClientMessage(playerid, COLOR_SEA_GREEN, string);
- format(string, sizeof(string), "- Nuke, ready to use in %i seconds", gNuke[NUKE_TIME]);
- SendClientMessage(playerid, COLOR_SEA_GREEN, string);
- return 1;
- }
- CMD:players(playerid)
- {
- new string[148];
- format(string, sizeof(string), "Players Summary: TDM: %i | Minigun DM: %i/15 | Moneybag DM: %i/15 | RPG DM: %i/15 | Glass DM: %i/15", CountEventPlayers(MODE_TEAM_DEATHMATCH), CountEventPlayers(MODE_MINIGUN), CountEventPlayers(MODE_MONEYBAG), CountEventPlayers(MODE_RPG), CountEventPlayers(MODE_GLASS));
- SendClientMessage(playerid, COLOR_SEA_GREEN, string);
- return 1;
- }
- CMD:minigun(playerid, params[])
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- if(! IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be spawned to join minigun deathmatch.");
- if(IsPlayerNearEnemies(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't use this command near enemies.");
- if(CountEventPlayers(MODE_MINIGUN) > 15) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The deathmatch is full of players, please try again some other time.");
- new skin;
- if(sscanf(params, "i", skin))
- {
- skin = random(299);
- SendClientMessage(playerid, COLOR_AQUA, "TIP: You can also use /minigun [skin*] to have a cusdtom skin for deathmatch.");
- }
- else if(skin < 0 || skin > 299) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: Invalid skin id, must be b/w 0-299.");
- gPlayerSkin[playerid] = skin;
- gPlayerGamemode[playerid] = MODE_MINIGUN;
- new string[148];
- format(string, sizeof(string), "* %s(%i) have joined /minigun madness deathmatch [Total players: %i]", ReturnPlayerName(playerid), playerid, CountEventPlayers(MODE_MINIGUN));
- SendClientMessageToAll(COLOR_STEEL_BLUE, string);
- format(string, sizeof(string), "~r~~h~~h~~h~%s(%i) is now participating in /minigun deathmatch with %i other players. Join in if you want to change gamemode!", ReturnPlayerName(playerid), playerid, CountEventPlayers(MODE_MINIGUN));
- TextDrawSetString(gAnnouncementTD, string);
- //our fading effect on screen!
- FadeColorForPlayer(playerid, 0, 0, 0, 200, 0, 0, 0, 0, 20, 10);
- CallLocalFunction("OnPlayerSpawn", "i", playerid);
- return 1;
- }
- CMD:moneybag(playerid, params[])
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- if(! IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be spawned to join moneybag deathmatch.");
- if(IsPlayerNearEnemies(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't use this command near enemies.");
- if(CountEventPlayers(MODE_MONEYBAG) > 15) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The deathmatch is full of players, please try again some other time.");
- new skin;
- if(sscanf(params, "i", skin))
- {
- skin = random(299);
- SendClientMessage(playerid, COLOR_AQUA, "TIP: You can also use /moneybag [skin*] to have a cusdtom skin for deathmatch.");
- }
- else if(skin < 0 || skin > 299) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: Invalid skin id, must be b/w 0-299.");
- gPlayerSkin[playerid] = skin;
- gPlayerGamemode[playerid] = MODE_MONEYBAG;
- new string[148];
- format(string, sizeof(string), "* %s(%i) have joined moneybag hunt deathmatch [Total players: %i]", ReturnPlayerName(playerid), playerid, CountEventPlayers(MODE_MONEYBAG));
- SendClientMessageToAll(COLOR_STEEL_BLUE, string);
- format(string, sizeof(string), "~r~~h~~h~~h~%s(%i) is now participating in /moneybag hunt deathmatch with %i other players. Join in if you want to change gamemode!", ReturnPlayerName(playerid), playerid, CountEventPlayers(MODE_MONEYBAG));
- TextDrawSetString(gAnnouncementTD, string);
- //our fading effect on screen!
- FadeColorForPlayer(playerid, 0, 0, 0, 200, 0, 0, 0, 0, 20, 10);
- CallLocalFunction("OnPlayerSpawn", "i", playerid);
- return 1;
- }
- CMD:rpg(playerid, params[])
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- if(! IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be spawned to join RPG deathmatch.");
- if(IsPlayerNearEnemies(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't use this command near enemies.");
- if(CountEventPlayers(MODE_RPG) > 15) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The deathmatch is full of players, please try again some other time.");
- new skin;
- if(sscanf(params, "i", skin))
- {
- skin = random(299);
- SendClientMessage(playerid, COLOR_AQUA, "TIP: You can also use /rpg [skin*] to have a cusdtom skin for deathmatch.");
- }
- else if(skin < 0 || skin > 299) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: Invalid skin id, must be b/w 0-299.");
- gPlayerSkin[playerid] = skin;
- gPlayerGamemode[playerid] = MODE_RPG;
- new string[148];
- format(string, sizeof(string), "* %s(%i) have joined RPG deathmatch [Total players: %i]", ReturnPlayerName(playerid), playerid, CountEventPlayers(MODE_RPG));
- SendClientMessageToAll(COLOR_STEEL_BLUE, string);
- format(string, sizeof(string), "~r~~h~~h~~h~%s(%i) is now participating in /rpg deathmatch with %i other players. Join in if you want to change gamemode!", ReturnPlayerName(playerid), playerid, CountEventPlayers(MODE_RPG));
- TextDrawSetString(gAnnouncementTD, string);
- //our fading effect on screen!
- FadeColorForPlayer(playerid, 0, 0, 0, 200, 0, 0, 0, 0, 20, 10);
- CallLocalFunction("OnPlayerSpawn", "i", playerid);
- return 1;
- }
- CMD:glass(playerid, params[])
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- if(! IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be spawned to join Glass deathmatch.");
- if(IsPlayerNearEnemies(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't use this command near enemies.");
- if(CountEventPlayers(MODE_GLASS) > 15) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The deathmatch is full of players, please try again some other time.");
- new skin;
- if(sscanf(params, "i", skin))
- {
- skin = random(299);
- SendClientMessage(playerid, COLOR_AQUA, "TIP: You can also use /glass [skin*] to have a cusdtom skin for deathmatch.");
- }
- else if(skin < 0 || skin > 299) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: Invalid skin id, must be b/w 0-299.");
- gPlayerSkin[playerid] = skin;
- gPlayerGamemode[playerid] = MODE_GLASS;
- new string[148];
- format(string, sizeof(string), "* %s(%i) have joined Glass break deathmatch [Total players: %i]", ReturnPlayerName(playerid), playerid, CountEventPlayers(MODE_GLASS));
- SendClientMessageToAll(COLOR_STEEL_BLUE, string);
- format(string, sizeof(string), "~r~~h~~h~~h~%s(%i) is now participating in /Glass break deathmatch with %i other players. Join in if you want to change gamemode!", ReturnPlayerName(playerid), playerid, CountEventPlayers(MODE_GLASS));
- TextDrawSetString(gAnnouncementTD, string);
- //our fading effect on screen!
- FadeColorForPlayer(playerid, 0, 0, 0, 200, 0, 0, 0, 0, 20, 10);
- CallLocalFunction("OnPlayerSpawn", "i", playerid);
- return 1;
- }
- CMD:exit(playerid)
- {
- if(gPlayerGamemode[playerid] == MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in a deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GetPlayerTeam(playerid) == 100) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- if(! IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be spawned to leave a deathmatch.");
- gPlayerGamemode[playerid] = MODE_TEAM_DEATHMATCH;
- gPlayerSkin[playerid] = gTeam[gPlayerTeam[playerid]][E_SKIN];
- SetPlayerTeam(playerid, gPlayerTeam[playerid]);
- SetPlayerHealth(playerid, 0.0);
- return 1;
- }
- CMD:ranks(playerid)
- {
- new string[156], dialogstr[sizeof(string) * sizeof(gRank)];
- strcat(dialogstr, "Rank\tRank name\tScore\n");
- for(new i; i < sizeof(gRank); i++)
- {
- if(GetPlayerRank(playerid) >= i) format(string, sizeof(string), ""LIGHT_BLUE"%i.\t"LIGHT_BLUE"%s\t"LIGHT_BLUE"%i+ score\n", i, gRank[i][r_name], gRank[i][r_score]);
- else format(string, sizeof(string), ""GRAY"%i.\t"GRAY"%s\t"GRAY"%i+ score\n", i, gRank[i][r_name], gRank[i][r_score]);
- strcat(dialogstr, string);
- }
- ShowPlayerDialog(playerid, DIALOG_COMMON, DIALOG_STYLE_TABLIST_HEADERS, "Ranks list", dialogstr, "Close", "");
- return 1;
- }
- CMD:rank(playerid)
- {
- new string[144];
- new rank = GetPlayerRank(playerid);
- new target = (rank + 1);
- if(target >= sizeof(gRank)) target = (sizeof(gRank) - 1);
- format(string, sizeof(string), "You are currently rank %i, %s (%i/%i score)", rank, gRank[rank][r_name], GetPlayerScore(playerid), gRank[target][r_score]);
- SendClientMessage(playerid, COLOR_SEA_GREEN, string);
- return 1;
- }
- CMD:rhelp(playerid)
- {
- new dialogstr[656];
- strcat(dialogstr, ""LIGHT_BLUE"Unlocking new stuff and gaining new ranks will obviously require you with some cash and score.\n\n");
- strcat(dialogstr, "The server provides you with loads of ways to earn:\n");
- strcat(dialogstr, ""RED"1. "LIGHT_BLUE"Kill the enemy teams\n");
- strcat(dialogstr, ""RED"2. "LIGHT_BLUE"Capture enemy zones\n");
- strcat(dialogstr, ""RED"3. Steel the enemy prototype vehicle\n");
- strcat(dialogstr, ""RED"4. Participate in events\n\n");
- strcat(dialogstr, "After you have your desired ammount, go to shops and buy as much you can,\n");
- strcat(dialogstr, "there's always something new in the shops.\n\n");
- strcat(dialogstr, ""WHITE"On every rank up, you get the chance to try new classes, buy new weapons or get bonouses.");
- ShowPlayerDialog(playerid, DIALOG_COMMON, DIALOG_STYLE_MSGBOX, "Rank help", dialogstr, "Close", "");
- return 1;
- }
- CMD:ccmds(playerid)
- {
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- if(GetPlayerTeam(playerid) == 7) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: Africa team can't use this command.");
- new string[144];
- switch(gClass[playerid])
- {
- case 1: SendClientMessage(playerid, COLOR_KHAKI, "Class Medic's commands | /heal - heal other players, /pk - painkillers (spawned with 3 pks).");
- case 3: SendClientMessage(playerid, COLOR_KHAKI, "Class Jetrunner's commands | /jp - activate jetpack.");
- case 5: SendClientMessage(playerid, COLOR_KHAKI, "Class Spy's commands | /rob - rob a enemy in vehicle(as passenger), /dis - disguize to enemy skin & color, /undis - undisguize back to team skin & color.");
- default:
- {
- format(string, sizeof(string), "Class %s's commands | There are no special commands for this class.", ReturnPlayerClassName(playerid));
- SendClientMessage(playerid, COLOR_KHAKI, string);
- }
- }
- return 1;
- }
- CMD:chelp(playerid)
- {
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- if(GetPlayerTeam(playerid) == 7) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: Africa team can't use this command.");
- new string[144];
- SendClientMessage(playerid, COLOR_KHAKI, " ");
- format(string, sizeof(string), "Class %s", ReturnPlayerClassName(playerid));
- SendClientMessage(playerid, COLOR_KHAKI, string);
- switch(gClass[playerid])
- {
- case 0:
- {
- SendClientMessage(playerid, COLOR_KHAKI, "* Commands: There are no special commands for this class.");
- SendClientMessage(playerid, COLOR_KHAKI, "* Abilities: Good in team attacks.");
- }
- case 1:
- {
- SendClientMessage(playerid, COLOR_KHAKI, "* Commands: /heal - heal other players, /pk - painkillers (spawned with 3 pks).");
- SendClientMessage(playerid, COLOR_KHAKI, "* Abilities: Press MMB (KEY_LOOK_BEHIND) to heal team mates, Spawnes with 3 painkillers.");
- }
- case 2:
- {
- SendClientMessage(playerid, COLOR_KHAKI, "* Commands: There are no special commands for this class.");
- SendClientMessage(playerid, COLOR_KHAKI, "* Abilities: Inivisible on mini map or radar, spawns with Sniper rifle.");
- }
- case 3:
- {
- SendClientMessage(playerid, COLOR_KHAKI, "* Commands: /jp - activate jetpack.");
- SendClientMessage(playerid, COLOR_KHAKI, "* Abilities: Can spawn or acivate jetpack (/jp).");
- }
- case 4:
- {
- SendClientMessage(playerid, COLOR_KHAKI, "* Commands: There are no special commands for this class.");
- SendClientMessage(playerid, COLOR_KHAKI, "* Abilities: Can drive or pilot heavy aircrafts (hunters and hydras).");
- }
- case 5:
- {
- SendClientMessage(playerid, COLOR_KHAKI, "* Commands: /rob - rob a enemy in vehicle(as passenger), /dis - disguize to enemy skin & color, /undis - undisguize back to team skin & color.");
- SendClientMessage(playerid, COLOR_KHAKI, "* Abilities: Press 2 (KEY_SUBMISSION) to stabb enemies in vehicles (stabb drivers as passenger).");
- }
- case 6:
- {
- SendClientMessage(playerid, COLOR_KHAKI, "* Commands: There are no special commands for this class.");
- SendClientMessage(playerid, COLOR_KHAKI, "* Abilities: Spawned with minigun!");
- }
- }
- return 1;
- }
- CMD:r(playerid, params[])
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- new message[100];
- if(sscanf(params, "s[100]", message)) return SendClientMessage(playerid, COLOR_THISTLE, "USAGE: /r [message]");
- new string[144];
- format(string, sizeof(string), "[Radio] %i> %s: %s", playerid, ReturnPlayerName(playerid), message);
- foreach(new i : Player)
- {
- if(GetPlayerTeam(i) == GetPlayerTeam(playerid))
- {
- SendClientMessage(i, COLOR_CORAL, string);
- }
- }
- SetPlayerChatBubble(playerid, message, COLOR_CORAL, 40.0, 10000);
- return 1;
- }
- CMD:radio(playerid, params[]) return cmd_r(playerid, params);
- CMD:s(playerid, params[])
- {
- new message[100];
- if(sscanf(params, "s[100]", message)) return SendClientMessage(playerid, COLOR_THISTLE, "USAGE: /s [message]");
- new Float:pos[3];
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- new string[144];
- format(string, sizeof(string), "[Shouts] %i> %s: %s", playerid, ReturnPlayerName(playerid), message);
- foreach(new i : Player)
- {
- if(IsPlayerInRangeOfPoint(i, 20.0, pos[0], pos[1], pos[2]))
- {
- if(GetPlayerTeam(i) == GetPlayerTeam(playerid))
- {
- SendClientMessage(i, COLOR_WHITE, string);
- }
- }
- }
- SetPlayerChatBubble(playerid, message, COLOR_WHITE, 40.0, 10000);
- return 1;
- }
- CMD:shout(playerid, params[]) return cmd_s(playerid, params);
- CMD:dm(playerid)
- {
- new dialogstr[656];
- new string[145];
- strcat(dialogstr, "Deathmatch\tPlayers\n");
- format(string, sizeof(string), "Minigun Madness\t%i\n", CountEventPlayers(MODE_MINIGUN));
- strcat(dialogstr, string);
- format(string, sizeof(string), "Moneybag hunt\t%i\n", CountEventPlayers(MODE_MONEYBAG));
- strcat(dialogstr, string);
- format(string, sizeof(string), "RPG Deathmatch\t%i\n", CountEventPlayers(MODE_RPG));
- strcat(dialogstr, string);
- format(string, sizeof(string), "Glass Break\t%i\n", CountEventPlayers(MODE_GLASS));
- strcat(dialogstr, string);
- ShowPlayerDialog(playerid, DIALOG_DEATHMATCH, DIALOG_STYLE_TABLIST_HEADERS, "Deathmatch list", dialogstr, "Join", "Close");
- return 1;
- }
- CMD:givepk(playerid, params[])
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(! IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't transfer painkillers when you aren't spawned.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- new target, amount;
- if(sscanf(params, "ui", target, amount)) return SendClientMessage(playerid, COLOR_THISTLE, "USAGE: /givepk [player] [amount]");
- if(amount < 1) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The amount limit must be greater than 0.");
- if(! IsPlayerConnected(target)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The specified player is not connected.");
- new Float:pos[3];
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- if(! IsPlayerInRangeOfPoint(target, 5.0, pos[0], pos[1], pos[2])) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The specified player is not near you.");
- if(gPainkillers[playerid] < amount) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You yourself don't have that much Painkilers.");
- if(target == playerid) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't give painkillers to yourself.");
- gPainkillers[playerid] -= amount;
- gPainkillers[target] += amount;
- new string[144];
- format(string, sizeof(string), "* %s(%i) have given you %i painkiller(s).", ReturnPlayerName(playerid), playerid, amount);
- SendClientMessage(target, COLOR_SEA_GREEN, string);
- format(string, sizeof(string), "* You have given %s(%i), %i painkiller(s).", ReturnPlayerName(target), target, amount);
- SendClientMessage(playerid, COLOR_SEA_GREEN, string);
- NotifyPlayer(playerid, "~g~Painkillers recieved", 5000);
- return 1;
- }
- CMD:pk(playerid, params[])
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- if(gPainkillers[playerid] < 1) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have any painkillers in your bag.");
- gPainkillers[playerid] -= 1;
- new string[144];
- format(string, sizeof(string), "* You have consumed a painkiller; You are now left with %i painkillers in your bag.", gPainkillers[playerid]);
- SendClientMessage(playerid, COLOR_SEA_GREEN, string);
- new Float:hp;
- GetPlayerHealth(playerid, hp);
- if((hp + 30.0) >= 100.0) SetPlayerHealth(playerid, 100.0);
- else SetPlayerHealth(playerid, (hp + 30.0));
- NotifyPlayer(playerid, "~g~Health regained (30%)", 5000);
- ApplyAnimation(playerid, "MEDIC", "CPR", 1.0, 0, 1, 1, 1, 1);
- return 1;
- }
- CMD:givearmour(playerid, params[])
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(! IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't transfer armour when you aren't spawned.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- new target;
- if(sscanf(params, "u", target)) return SendClientMessage(playerid, COLOR_THISTLE, "USAGE: /givearmour [player]");
- if(! IsPlayerConnected(target)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The specified player is not connected.");
- new Float:pos[3];
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- if(! IsPlayerInRangeOfPoint(target, 5.0, pos[0], pos[1], pos[2])) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The specified player is not near you.");
- if(! gArmour[playerid]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have an armour to give.");
- if(gArmour[target]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The specified player already have an armour.");
- if(target == playerid) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't give armour to yourself.");
- gArmour[playerid] = false;
- gArmour[target] = true;
- new string[144];
- format(string, sizeof(string), "* %s(%i) have given you an Armour jacket.", ReturnPlayerName(playerid), playerid);
- SendClientMessage(target, COLOR_SEA_GREEN, string);
- format(string, sizeof(string), "* You have given %s(%i),an Armour jacket.", ReturnPlayerName(target), target);
- SendClientMessage(playerid, COLOR_SEA_GREEN, string);
- NotifyPlayer(playerid, "~g~Armour jacket recieved", 5000);
- return 1;
- }
- CMD:armour(playerid, params[])
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- if(! gArmour[playerid]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have an Armour in your bag.");
- gArmour[playerid] = false;
- SetPlayerArmour(playerid, 100.0);
- SendClientMessage(playerid, COLOR_SEA_GREEN, "You have used your armour jacket from your bag!");
- NotifyPlayer(playerid, "You have a ~g~Armour Jacket", 5000);
- return 1;
- }
- CMD:givehelmet(playerid, params[])
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(! IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't transfer Protection helmet when you aren't spawned.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- new target;
- if(sscanf(params, "u", target)) return SendClientMessage(playerid, COLOR_THISTLE, "USAGE: /givehelmet [player]");
- if(! IsPlayerConnected(target)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The specified player is not connected.");
- new Float:pos[3];
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- if(! IsPlayerInRangeOfPoint(target, 5.0, pos[0], pos[1], pos[2])) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The specified player is not near you.");
- if(! gHelmet[playerid]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have a Protection Helmet to give.");
- if(gHelmet[target]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The specified player already have a Protection Helmet.");
- if(target == playerid) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't give Protection Helmet to yourself.");
- gHelmet[playerid] = false;
- gHelmet[target] = true;
- switch(GetPlayerSkin(target))
- {
- case 24: SetPlayerAttachedObject(target,2,18638,2,0.151999,0.038000,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 24
- case 287: SetPlayerAttachedObject(target,2,18638,2,0.128000,0.049999,0.006000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 287
- case 285: SetPlayerAttachedObject(target,2,18638,2,0.182000,0.035000,0.007000,0.000000,0.000000,0.000000,1.000000,1.069999,1.118999); //skin 285
- case 111: SetPlayerAttachedObject(target,2,18638,2,0.159999,0.032999,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 111
- case 122: SetPlayerAttachedObject(target,2,18638,2,0.148000,0.017000,-0.002999,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 122
- case 73: SetPlayerAttachedObject(target,2,18638,2,0.148999,0.038999,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 73
- case 46: SetPlayerAttachedObject(target,2,18638,2,0.162999,0.035000,0.001000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 46
- case 102: SetPlayerAttachedObject(target,2,18638,2,0.173000,0.024999,-0.003000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 102
- default: SetPlayerAttachedObject(target,2,18638,2,0.173000,0.024999,-0.003000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 102
- }
- RemovePlayerAttachedObject(playerid, 2);
- new string[144];
- format(string, sizeof(string), "* %s(%i) have given you a Protection Helmet.", ReturnPlayerName(playerid), playerid);
- SendClientMessage(target, COLOR_SEA_GREEN, string);
- format(string, sizeof(string), "* You have given %s(%i), a Protection Helmet.", ReturnPlayerName(target), target);
- SendClientMessage(playerid, COLOR_SEA_GREEN, string);
- NotifyPlayer(playerid, "~g~Protection Helmet recieved", 5000);
- return 1;
- }
- CMD:helmet(playerid)
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(! gHelmet[playerid]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have a Protection Helmet.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- if(IsPlayerAttachedObjectSlotUsed(playerid, 2))
- {
- RemovePlayerAttachedObject(playerid, 2);
- SendClientMessage(playerid, COLOR_SEA_GREEN, "* You have DISABLED your Protection helmet.");
- NotifyPlayer(playerid, "~r~Protection Helmet disabled", 5000);
- }
- else
- {
- switch(GetPlayerSkin(playerid))
- {
- case 24: SetPlayerAttachedObject(playerid,2,18638,2,0.151999,0.038000,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 24
- case 287: SetPlayerAttachedObject(playerid,2,18638,2,0.128000,0.049999,0.006000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 287
- case 285: SetPlayerAttachedObject(playerid,2,18638,2,0.182000,0.035000,0.007000,0.000000,0.000000,0.000000,1.000000,1.069999,1.118999); //skin 285
- case 111: SetPlayerAttachedObject(playerid,2,18638,2,0.159999,0.032999,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 111
- case 122: SetPlayerAttachedObject(playerid,2,18638,2,0.148000,0.017000,-0.002999,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 122
- case 73: SetPlayerAttachedObject(playerid,2,18638,2,0.148999,0.038999,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 73
- case 46: SetPlayerAttachedObject(playerid,2,18638,2,0.162999,0.035000,0.001000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 46
- case 102: SetPlayerAttachedObject(playerid,2,18638,2,0.173000,0.024999,-0.003000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 102
- default: SetPlayerAttachedObject(playerid,2,18638,2,0.173000,0.024999,-0.003000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 102
- }
- SendClientMessage(playerid, COLOR_SEA_GREEN, "* You have ENABLED your Protection helmet.");
- NotifyPlayer(playerid, "~g~Protection Helmet enabled", 5000);
- }
- return 1;
- }
- CMD:givemask(playerid, params[])
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(! IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't transfer Gas Mask when you aren't spawned.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- new target;
- if(sscanf(params, "u", target)) return SendClientMessage(playerid, COLOR_THISTLE, "USAGE: /givemask [player]");
- if(! IsPlayerConnected(target)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The specified player is not connected.");
- new Float:pos[3];
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- if(! IsPlayerInRangeOfPoint(target, 5.0, pos[0], pos[1], pos[2])) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The specified player is not near you.");
- if(! gMask[playerid]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have a Gas Mask to give.");
- if(gMask[target]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The specified player already have a Gas Mask.");
- if(target == playerid) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't give Gas Mask to yourself.");
- gMask[playerid] = false;
- gMask[target] = true;
- SetPlayerAttachedObject(target, 3, 19472, 2, -0.022000, 0.137000, 0.018999, 3.899994, 85.999961, 92.999984, 0.923999, 1.141000, 1.026999);
- RemovePlayerAttachedObject(playerid, 3);
- new string[144];
- format(string, sizeof(string), "* %s(%i) have given you a Gas Mask.", ReturnPlayerName(playerid), playerid);
- SendClientMessage(target, COLOR_SEA_GREEN, string);
- format(string, sizeof(string), "* You have given %s(%i), a Gas Mask.", ReturnPlayerName(target), target);
- SendClientMessage(playerid, COLOR_SEA_GREEN, string);
- NotifyPlayer(playerid, "~g~Gas Mask recieved", 5000);
- return 1;
- }
- CMD:mask(playerid)
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(! gMask[playerid]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have a Gas Mask.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- if(IsPlayerAttachedObjectSlotUsed(playerid, 3))
- {
- RemovePlayerAttachedObject(playerid, 3);
- SendClientMessage(playerid, COLOR_SEA_GREEN, "* You have DISABLED your Gas Mask.");
- NotifyPlayer(playerid, "~r~Gas Mask disabled", 5000);
- }
- else
- {
- SetPlayerAttachedObject(playerid, 3, 19472, 2, -0.022000, 0.137000, 0.018999, 3.899994, 85.999961, 92.999984, 0.923999, 1.141000, 1.026999);
- SendClientMessage(playerid, COLOR_SEA_GREEN, "* You have ENABLED your Gas Mask.");
- NotifyPlayer(playerid, "~g~Gas Mask enabled", 5000);
- }
- return 1;
- }
- CMD:givebomb(playerid, params[])
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(! IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't transfer Sucide Bomb when you aren't spawned.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- new target;
- if(sscanf(params, "u", target)) return SendClientMessage(playerid, COLOR_THISTLE, "USAGE: /givebomb [player]");
- if(! IsPlayerConnected(target)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The specified player is not connected.");
- new Float:pos[3];
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- if(! IsPlayerInRangeOfPoint(target, 5.0, pos[0], pos[1], pos[2])) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The specified player is not near you.");
- if(! gBomb[playerid]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have a Sucide Bomb to give.");
- if(gBomb[target]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The specified player already have a Sucide Bomb.");
- if(target == playerid) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't give Sucide Bomb to yourself.");
- gBomb[playerid] = false;
- gBomb[target] = true;
- SetPlayerAttachedObject(target, 4, 1654, 1, 0.046000, 0.229000, -0.013000, 3.099998, 78.299972, -178.599960, 1.000000, 1.000000, 1.000000);
- RemovePlayerAttachedObject(playerid, 4);
- new string[144];
- format(string, sizeof(string), "* %s(%i) have given you a Sucide Bomb.", ReturnPlayerName(playerid), playerid);
- SendClientMessage(target, COLOR_SEA_GREEN, string);
- format(string, sizeof(string), "* You have given %s(%i), a Sucide Bomb.", ReturnPlayerName(target), target);
- SendClientMessage(playerid, COLOR_SEA_GREEN, string);
- NotifyPlayer(playerid, "~g~Sucide Bomb recieved", 5000);
- return 1;
- }
- CMD:bomb(playerid)
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(! gBomb[playerid]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You don't have a Sucide Bomb.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- if(IsPlayerAttachedObjectSlotUsed(playerid, 4))
- {
- RemovePlayerAttachedObject(playerid, 4);
- SendClientMessage(playerid, COLOR_SEA_GREEN, "* You have DISABLED your Sucide Bomb.");
- NotifyPlayer(playerid, "~r~Sucide Bomb disabled", 5000);
- }
- else
- {
- SetPlayerAttachedObject(playerid, 4, 1654, 1, 0.046000, 0.229000, -0.013000, 3.099998, 78.299972, -178.599960, 1.000000, 1.000000, 1.000000);
- SendClientMessage(playerid, COLOR_SEA_GREEN, "* You have ENABLED your Sucide Bomb.");
- NotifyPlayer(playerid, "~g~Sucide Bomb enabled", 5000);
- }
- return 1;
- }
- CMD:prestige(playerid, params[])
- {
- new rank = GetPlayerRank(playerid);
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) < 3 && rank < 10) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be atleast rank 10+ for using this command.");
- new slot;
- if(sscanf(params, "i", slot)) return SendClientMessage(playerid, COLOR_THISTLE, "USAGE: /prestige [slot<1-3>]");
- if(slot > 3 || slot < 1) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: Invalid slot, must be b/w 1-3.");
- switch(slot)
- {
- case 1:
- {
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) < 3 && rank < 10) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be atleast rank 10+ for setting this slot.");
- else gListitem[playerid] = 0;
- }
- case 2:
- {
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) < 3 && rank < 15) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be atleast rank 15+ for setting this slot.");
- else gListitem[playerid] = 1;
- }
- case 3:
- {
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) < 3 && rank < 20) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be atleast rank 20+ for setting this slot.");
- else gListitem[playerid] = 2;
- }
- }
- SetupPrevModelDialog(0.0, 0.0, 0.0, 3.0);
- ShowPlayerDialog(playerid, DIALOG_PRESTIGE, DIALOG_STYLE_PREVMODEL, "Prestige Weapon", prestigeweapons, "Select", "Close");
- return 1;
- }
- CMD:resetprestige(playerid, params[])
- {
- new rank = GetPlayerRank(playerid);
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) < 3 && rank < 10) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be atleast rank 10+ for using this command.");
- new slot;
- if(sscanf(params, "i", slot)) return SendClientMessage(playerid, COLOR_THISTLE, "USAGE: /resetprestige [slot<1-3>]");
- if(slot > 3 || slot < 1) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: Invalid slot, must be b/w 1-3.");
- switch(slot)
- {
- case 1:
- {
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) < 3 && rank < 10) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be atleast rank 10+ for resetting this slot.");
- GAdmin_ChangeUserData(ReturnPlayerName(playerid), "i", "weapon1", 0);
- SendClientMessage(playerid, COLOR_GREEN, "You have successfully resetted your prestige weapon I.");
- }
- case 2:
- {
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) < 3 && rank < 15) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be atleast rank 15+ for resetting this slot.");
- GAdmin_ChangeUserData(ReturnPlayerName(playerid), "i", "weapon2", 0);
- SendClientMessage(playerid, COLOR_GREEN, "You have successfully resetted your prestige weapon II.");
- }
- case 3:
- {
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) < 3 && rank < 20) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be atleast rank 20+ for resetting this slot.");
- GAdmin_ChangeUserData(ReturnPlayerName(playerid), "i", "weapon3", 0);
- SendClientMessage(playerid, COLOR_GREEN, "You have successfully resetted your prestige weapon III.");
- }
- }
- return 1;
- }
- CMD:myprestige(playerid)
- {
- new string[144], weapon, rank;
- rank = GetPlayerRank(playerid);
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) < 3 && rank < 10) return SendClientMessage(playerid, COLOR_GOLD, "- You don't have any weapon for prestige I.");
- else
- {
- GAdmin_RetrieveUserData(ReturnPlayerName(playerid), "i", "weapon1", weapon);
- if(weapon == 0) SendClientMessage(playerid, COLOR_GOLD, "- You don't have any weapon for prestige I.");
- else
- {
- format(string, sizeof(string), "- You have weapon %s as prestige I.", ReturnWeaponName(weapon));
- SendClientMessage(playerid, COLOR_GOLD, string);
- }
- }
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) < 3 && rank < 15) return SendClientMessage(playerid, COLOR_GOLD, "- You don't have any weapon for prestige II.");
- else
- {
- GAdmin_RetrieveUserData(ReturnPlayerName(playerid), "i", "weapon2", weapon);
- if(weapon == 0) SendClientMessage(playerid, COLOR_GOLD, "- You don't have any weapon for prestige II.");
- else
- {
- format(string, sizeof(string), "- You have weapon %s as prestige II.", ReturnWeaponName(weapon));
- SendClientMessage(playerid, COLOR_GOLD, string);
- }
- }
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) < 3 && rank < 20) return SendClientMessage(playerid, COLOR_GOLD, "- You don't have any weapon for prestige III.");
- else
- {
- GAdmin_RetrieveUserData(ReturnPlayerName(playerid), "i", "weapon3", weapon);
- if(weapon == 0) SendClientMessage(playerid, COLOR_GOLD, "- You don't have any weapon for prestige III.");
- else
- {
- format(string, sizeof(string), "- You have weapon %s as prestige III.", ReturnWeaponName(weapon));
- SendClientMessage(playerid, COLOR_GOLD, string);
- }
- }
- return 1;
- }
- //duel system
- CMD:duel(playerid, params[])
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(! IsPlayerSpawned(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't duel when you aren't spawned.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- if(IsPlayerNearEnemies(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't use this command near enemies.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You are already in a duel, finish this one or use /kill.");
- new target, bet;
- if(sscanf(params, "ii", target, bet)) return SendClientMessage(playerid, COLOR_THISTLE, "USAGE: /duel [player] [bet]");
- if(! IsPlayerConnected(target)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The specified player is not connected.");
- if(gPlayerGamemode[target] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The specified player must in team deathmatch.");
- if(! IsPlayerSpawned(target)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't duel the player isn't spawned.");
- if(gDuel[target][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The specified player is already in a duel.");
- if(GetPlayerMoney(playerid) < bet) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You yourself don't have that much bet money.");
- if(bet < 0) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't bet negative money!!!!");
- if(target == playerid) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't duel with yourself.");
- gDuel[playerid][d_opponent] = target;
- gDuel[target][d_opponent] = playerid;
- SendClientMessage(playerid, COLOR_SEA_GREEN, "* Please select your duel weapon.");
- SetupPrevModelDialog(0.0, 0.0, 0.0, 3.0);
- ShowPlayerDialog(playerid, DIALOG_DUEL_WEAPON, DIALOG_STYLE_PREVMODEL, "Select your duel weapon", duelweapons, "Select", "Close");
- return 1;
- }
- CMD:ss(playerid)
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- if(GetPlayerTeam(playerid) == 7) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: Africa team can't use this command.");
- new dialogstr[556];
- new string[76];
- format(dialogstr, sizeof(dialogstr), ""WHITE"BASE\n");
- for(new i; i < sizeof(gSpawn); i++)
- {
- if(gCaptureZone[gSpawn[i][s_zoneid]][E_ZONEOWNER] == GetPlayerTeam(playerid)) format(string, sizeof(string), ""LIGHT_BLUE"%s\n", gCaptureZone[gSpawn[i][s_zoneid]][E_ZONENAME]);
- else format(string, sizeof(string), ""GRAY"%s\n", gCaptureZone[gSpawn[i][s_zoneid]][E_ZONENAME]);
- strcat(dialogstr, string);
- }
- ShowPlayerDialog(playerid, DIALOG_SPAWN, DIALOG_STYLE_LIST, "Select your spawn:", dialogstr, "Select", "Close");
- return 1;
- }
- CMD:inv(playerid)
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use this command right now.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- new string[256];
- format(string, sizeof(string), "Itemname\tAmount\nPainkillers\t%i\nArmour Jacket\t%i\nProtection Helmet\t%i\nGas Mask\t%i\nSucide Bomb\t%i", gPainkillers[playerid], (gArmour[playerid]) ? 1 : 0, (gHelmet[playerid]) ? 1 : 0, (gMask[playerid]) ? 1 : 0, (gBomb[playerid]) ? 1 : 0);
- ShowPlayerDialog(playerid, DIALOG_INVENTORY, DIALOG_STYLE_TABLIST_HEADERS, "Inventory (/inv)", string, "Open", "Close");
- return 1;
- }
- //donor commands
- CMD:dhelp(playerid)
- {
- ShowPlayerDialog(playerid, DIALOG_COMMON, DIALOG_STYLE_MSGBOX, "Donor help", "The server has a unique donor/vip system for our donators.\n\nFor keeping our server live and bugs free, we let the users to donate for our server.\nFor those helpful donators, we give them an in game advantage or DONOR ranks based on their donation.\n\nYou may donate us in order to become a DONOR; go on forums to see more.", "Close", "");
- return 1;
- }
- //Donor level 1+
- CMD:dcmds(playerid)
- {
- ShowPlayerDialog(playerid, DIALOG_COMMON, DIALOG_STYLE_MSGBOX, "Donor Commands", ""LIME"BRONSE (Level 1)\n"LIGHT_BLUE"/dlabel, /dammo, /dskin\n\n"LIME"SILVER (Level 2)\n"LIGHT_BLUE"/dbike, /dcar, /dbmx, /dplane, /dnos, /dhyd, /dguns\n\n"LIME"GOLD (Level 3)\n"LIGHT_BLUE"/dsucide, /dsupply, /dtime, /dweather", "Close", "");
- return 1;
- }
- CMD:dlabel(playerid, params[])
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) < 1) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be a donor level 1+ to use this command.");
- new text[25];
- if(sscanf(params, "s[25]", text)) return SendClientMessage(playerid, COLOR_THISTLE, "USAGE: /dlabel [text <25 length>]");
- UpdateDynamic3DTextLabelText(gDonorLabel[playerid], COLOR_YELLOW, text);
- GameTextForPlayer(playerid, "~y~Label Chagned", 3000, 3);
- return 1;
- }
- CMD:dammo(playerid)
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) < 1) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be a donor level 1+ to use this command.");
- if(GetPlayerMoney(playerid) < 4500) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You need atleast $4500 to use this command.");
- new weapon = GetPlayerWeapon(playerid);
- switch(weapon)
- {
- case 16..18,35,36,39: SetPlayerAmmo(playerid, weapon, (GetPlayerAmmo(playerid) + 3));
- case 22..34,38,41,42,43: SetPlayerAmmo(playerid, weapon, (GetPlayerAmmo(playerid) + 100));
- case 37: SetPlayerAmmo(playerid, weapon, (GetPlayerAmmo(playerid) + 200));
- }
- GameTextForPlayer(playerid, "~y~Ammo Refiled~n~~y~-$4500", 3000, 3);
- GivePlayerMoney(playerid, - 4500);
- return 1;
- }
- CMD:dskin(playerid, params[])
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) < 1) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be a donor level 1+ to use this command.");
- new skin;
- if(sscanf(params, "i", skin)) return SendClientMessage(playerid, COLOR_THISTLE, "USAGE: /dskin [skin]");
- if(skin < 0 || skin > 311) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: Invalid skin id, must be b/w 0 - 311.");
- for(new i; i < sizeof(gTeam); i++)
- {
- if(skin == gTeam[i][E_SKIN]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot use a team skin, try another one.");
- }
- SetPlayerSkin(playerid, skin);
- GameTextForPlayer(playerid, "~y~Skin Chagned", 3000, 3);
- return 1;
- }
- //Donor level 2+
- CMD:dbike(playerid, params[])
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) < 2) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be a donor level 2+ to use this command.");
- DestroyVehicle(gPlayerVehicle[playerid]);
- new Float:pos[4];
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- GetPlayerFacingAngle(playerid, pos[3]);
- gPlayerVehicle[playerid] = CreateVehicle(522, pos[0], pos[1], pos[2], pos[3], random(255), random(255), -1);
- LinkVehicleToInterior(gPlayerVehicle[playerid],GetPlayerInterior(playerid));
- SetVehicleVirtualWorld(gPlayerVehicle[playerid],GetPlayerVirtualWorld(playerid));
- PutPlayerInVehicle(playerid, gPlayerVehicle[playerid], 0);
- GameTextForPlayer(playerid, "~y~Bike Spawned", 3000, 3);
- return 1;
- }
- CMD:dcar(playerid, params[])
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) < 2) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be a donor level 2+ to use this command.");
- DestroyVehicle(gPlayerVehicle[playerid]);
- new Float:pos[4];
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- GetPlayerFacingAngle(playerid, pos[3]);
- gPlayerVehicle[playerid] = CreateVehicle(411, pos[0], pos[1], pos[2], pos[3], random(255), random(255), -1);
- LinkVehicleToInterior(gPlayerVehicle[playerid],GetPlayerInterior(playerid));
- SetVehicleVirtualWorld(gPlayerVehicle[playerid],GetPlayerVirtualWorld(playerid));
- PutPlayerInVehicle(playerid, gPlayerVehicle[playerid], 0);
- GameTextForPlayer(playerid, "~y~Car Spawned", 3000, 3);
- return 1;
- }
- CMD:dbmx(playerid, params[])
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) < 2) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be a donor level 2+ to use this command.");
- DestroyVehicle(gPlayerVehicle[playerid]);
- new Float:pos[4];
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- GetPlayerFacingAngle(playerid, pos[3]);
- gPlayerVehicle[playerid] = CreateVehicle(481, pos[0], pos[1], pos[2], pos[3], random(255), random(255), -1);
- LinkVehicleToInterior(gPlayerVehicle[playerid],GetPlayerInterior(playerid));
- SetVehicleVirtualWorld(gPlayerVehicle[playerid],GetPlayerVirtualWorld(playerid));
- PutPlayerInVehicle(playerid, gPlayerVehicle[playerid], 0);
- GameTextForPlayer(playerid, "~y~BMX Spawned", 3000, 3);
- return 1;
- }
- CMD:dplane(playerid, params[])
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) < 2) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be a donor level 2+ to use this command.");
- DestroyVehicle(gPlayerVehicle[playerid]);
- new Float:pos[4];
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- GetPlayerFacingAngle(playerid, pos[3]);
- gPlayerVehicle[playerid] = CreateVehicle(513, pos[0], pos[1], pos[2], pos[3], random(255), random(255), -1);
- LinkVehicleToInterior(gPlayerVehicle[playerid],GetPlayerInterior(playerid));
- SetVehicleVirtualWorld(gPlayerVehicle[playerid],GetPlayerVirtualWorld(playerid));
- PutPlayerInVehicle(playerid, gPlayerVehicle[playerid], 0);
- GameTextForPlayer(playerid, "~y~Airplane Spawned", 3000, 3);
- return 1;
- }
- CMD:dnos(playerid, params[])
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) < 2) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be a donor level 2+ to use this command.");
- if(! IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be in a vehicle to use this command.");
- new vehicle = GetPlayerVehicleID(playerid);
- switch(GetVehicleModel(vehicle))
- {
- case 448,461,462,463,468,471,509,510,521,522,523,581,586,449: return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot add nos to this vehicle.");
- }
- AddVehicleComponent(vehicle, 1010);
- GameTextForPlayer(playerid, "~y~Nos-10x Added", 3000, 3);
- return 1;
- }
- CMD:dhyd(playerid, params[])
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) < 2) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be a donor level 2+ to use this command.");
- if(! IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be in a vehicle to use this command.");
- new vehicle = GetPlayerVehicleID(playerid);
- switch(GetVehicleModel(vehicle))
- {
- case 448,461,462,463,468,471,509,510,521,522,523,581,586,449: return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot add hydraulics to this vehicle.");
- }
- AddVehicleComponent(vehicle, 1087);
- GameTextForPlayer(playerid, "~y~Hydraulics Added", 3000, 3);
- return 1;
- }
- CMD:dguns(playerid, params[])
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) < 2) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be a donor level 2+ to use this command.");
- if(IsPlayerNearEnemies(playerid)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't use this command near enemies.");
- if(GetPlayerMoney(playerid) < 7500) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You need atleast $7500 to use this command.");
- GivePlayerWeapon(playerid, 31, 100);
- GivePlayerWeapon(playerid, 24, 50);
- GivePlayerWeapon(playerid, 26, 100);
- GivePlayerWeapon(playerid, 35, 1);
- GivePlayerWeapon(playerid, 16, 2);
- GameTextForPlayer(playerid, "~y~Donor Weapons Spawned~n~~y~-$7500", 3000, 3);
- GivePlayerMoney(playerid, - 7500);
- return 1;
- }
- //Donor level 3+
- CMD:dsucide(playerid, params[])
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) < 3) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be a donor level 3+ to use this command.");
- new string[144];
- new Float:pos[3];
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- CreateExplosion(pos[0], pos[1], pos[2], 6, 1.00);
- SetPlayerArmour(playerid,0.0);
- SetPlayerHealth(playerid,0.0);
- GameTextForPlayer(playerid, "~y~Sucide Bomb", 3000, 3);
- foreach(new i : Player)
- {
- if(gPlayerGamemode[i] == MODE_TEAM_DEATHMATCH)
- {
- GetPlayerPos(i, pos[0], pos[1], pos[2]);
- if(IsPlayerInRangeOfPoint(playerid, 3.0, pos[0], pos[1], pos[2]))
- {
- if(GetPlayerTeam(i) != GetPlayerTeam(i))
- {
- SetPlayerHealth(i, 0.0);
- GameTextForPlayer(i, "~b~DEMOLISHED", 3000, 3);
- format(string, sizeof(string), "* You got demolished by %s (Donor Sucide)", ReturnPlayerName(playerid));
- SendClientMessage(i, COLOR_YELLOW, string);
- format(string, sizeof(string), "* You demolished %s with your Donor Sucide!", ReturnPlayerName(i));
- SendClientMessage(playerid, COLOR_YELLOW, string);
- SendDeathMessage(playerid, i, 49);
- new kills;
- GAdmin_RetrieveUserData(ReturnPlayerName(playerid), "i", "kills", kills);
- GAdmin_ChangeUserData(ReturnPlayerName(playerid), "i", "kills", kills + 1);
- }
- }
- }
- }
- return 1;
- }
- CMD:dsupply(playerid, params[])
- {
- if(gPlayerGamemode[playerid] != MODE_TEAM_DEATHMATCH) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) < 3) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be a donor level 3+ to use this command.");
- new string[144];
- new Float:pos[3];
- GetPlayerPos(playerid, pos[0], pos[1], pos[2]);
- foreach(new i : Player)
- {
- if( IsPlayerInRangeOfPoint(i, 10.0, pos[0], pos[1], pos[2]) &&
- GetPlayerTeam(i) == GetPlayerTeam(playerid) &&
- i != playerid)
- {
- GivePlayerWeapon(i, 35, 2);
- GivePlayerWeapon(i, 30, 100);
- GivePlayerWeapon(i, 24, 50);
- new Float:value;
- GetPlayerArmour(i, value);
- if((value + 20.0) >= 100) SetPlayerArmour(i, 100.0);
- else SetPlayerArmour(i, (value + 20.0));
- GetPlayerHealth(i, value);
- if((value + 20.0) >= 100) SetPlayerHealth(i, 100.0);
- else SetPlayerHealth(i, (value + 20.0));
- format(string,sizeof(string),"* You have been supplied: weapons, armour & health; by donor %s[%d].", ReturnPlayerName(playerid), playerid);
- SendClientMessage(i, COLOR_YELLOW, string);
- format(string,sizeof(string),"* %s[%d] have recieved your donor supply (weapons, armour & health)", ReturnPlayerName(i), i);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- }
- }
- GivePlayerWeapon(playerid, 35, 2);
- GivePlayerWeapon(playerid, 30, 100);
- GivePlayerWeapon(playerid, 24, 50);
- new Float:value;
- GetPlayerArmour(playerid, value);
- if((value + 20.0) >= 100) SetPlayerArmour(playerid, 100.0);
- else SetPlayerArmour(playerid, (value + 20.0));
- GetPlayerHealth(playerid, value);
- if((value + 20.0) >= 100) SetPlayerHealth(playerid, 100.0);
- else SetPlayerHealth(playerid, (value + 20.0));
- gDonorSupply[playerid] -= 1;
- format(string,sizeof(string),"* You are now left with %i/3 donor supply packs.", gDonorSupply[playerid]);
- SendClientMessage(playerid, COLOR_YELLOW, string);
- return 1;
- }
- CMD:dtime(playerid,params[])
- {
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) < 3) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be a donor level 3+ to use this command.");
- ShowPlayerDialog(playerid, DIALOG_TIME, DIALOG_STYLE_LIST, "Select a time to set!", "Morning\nMid day\nAfternoon\nEvening\nMidnight", "Select", "Cancel");
- return 1;
- }
- CMD:dweather(playerid,params[])
- {
- if(gDuel[playerid][d_induel]) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must in team deathmatch to use this command.");
- if(GAdmin_GetUserVipLevel(ReturnPlayerName(playerid)) < 3) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You must be a donor level 3+ to use this command.");
- ShowPlayerDialog(playerid, DIALOG_WEATHER, DIALOG_STYLE_LIST, "Select a time to set!", "Blue Sky\nSand Storm\nThunderstorm\nFoggy\nCloudy\nHigh Tide\nPurple Sky\nBlack/White Sky\nDark, Green Sky\nHeatwave", "Select", "Cancel");
- return 1;
- }
- //------------------------------------------------
- forward OnPlayerHealExpire(doctorid, playerid);
- public OnPlayerHealExpire(doctorid, playerid)
- {
- gHealed[doctorid][playerid] = -1;
- return 1;
- }
- //------------------------------------------------
- public OnPlayerPickUpDynamicPickup(playerid, pickupid)
- {
- if(pickupid == gMoneyBag[MONEYBAG_PICKUPID])
- {
- if(gPlayerGamemode[playerid] == MODE_MONEYBAG)
- {
- gMoneyBag[MONEYBAG_PLAYER] = playerid;
- RemovePlayerAttachedObject(playerid, 0);
- SetPlayerAttachedObject(playerid, 1, 1550, 1, 0.1, -0.3, 0, 0, 40, 0, 1, 1, 1);
- DestroyDynamicPickup(gMoneyBag[MONEYBAG_PICKUPID]);
- new string[145];
- foreach(new i : Player)
- {
- if(gPlayerGamemode[i] == MODE_MONEYBAG)
- {
- format(string, sizeof(string), "~g~%s(%d) have the~n~~g~money bag", ReturnPlayerName(playerid), playerid);
- GameTextForPlayer(i, string, 5000, 3);
- }
- }
- }
- }
- if(pickupid == gNuke[NUKE_PICKUP])
- {
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot pickup this right now.");
- new string[256];
- if(GetPlayerTeam(playerid) != gCaptureZone[NUKE_ZONE][E_ZONEOWNER])
- {
- format(string, sizeof(string), "ERROR: You must capture %s before launching a Nuclear missle.", gCaptureZone[NUKE_ZONE][E_ZONENAME]);
- return SendClientMessage(playerid, COLOR_FIREBRICK, string);
- }
- if(gNuke[NUKE_TIME] > 0)
- {
- format(string, sizeof(string), "ERROR: You must wait %i seconds before launching a Nuke.", gNuke[NUKE_TIME]);
- return SendClientMessage(playerid, COLOR_FIREBRICK, string);
- }
- new dialogstr[144];
- for(new i; i < sizeof(gTeamBase); i++)
- {
- format(string, sizeof(string), "%s\n", gTeamBase[i][b_name]);
- strcat(dialogstr, string);
- }
- //dialog check
- if(GetPlayerDialogID(playerid) != INVALID_DIALOG_ID) return 1;
- return ShowPlayerDialog(playerid, DIALOG_NUKE, DIALOG_STYLE_LIST, "Where do you want to plant the Nuke?", dialogstr, "Plant", "Cancel");
- }
- if(pickupid == gAnthrax[ANTHRAX_PICKUP])
- {
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot pickup this right now.");
- new string[144];
- if(GetPlayerTeam(playerid) != gCaptureZone[ANTHRAX_ZONE][E_ZONEOWNER])
- {
- format(string, sizeof(string), "ERROR: You must capture %s before launching a Anthrax bomb.", gCaptureZone[ANTHRAX_ZONE][E_ZONENAME]);
- return SendClientMessage(playerid, COLOR_FIREBRICK, string);
- }
- if(gAnthrax[ANTHRAX_TIME] > 0)
- {
- format(string, sizeof(string), "ERROR: You must wait %i seconds before launching an Anthrax bomb.", gAnthrax[ANTHRAX_TIME]);
- return SendClientMessage(playerid, COLOR_FIREBRICK, string);
- }
- //dialog check
- if(GetPlayerDialogID(playerid) != INVALID_DIALOG_ID) return 1;
- return ShowPlayerDialog(playerid, DIALOG_ANTHRAX, DIALOG_STYLE_MSGBOX, "Anthrax bomb launching?", "Are you sure you want to launch an Anthrax bomb?\nCost: "RED"$"LIGHT_BLUE""#ANTHRAX_COST"", "Launch", "Cancel");
- }
- for(new i; i != sizeof(gShop); i++)
- {
- if(pickupid == gShop[i][SHOP_PICKUP])
- {
- if(GetPlayerTeam(playerid) > (sizeof(gTeam) - 1)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot pickup this right now.");
- if( gShop[i][SHOP_TEAM] != NO_TEAM &&
- GetPlayerTeam(playerid) != gShop[i][SHOP_TEAM])
- {
- return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You can't open enemies' shop!");
- }
- //dialog check
- if(GetPlayerDialogID(playerid) != INVALID_DIALOG_ID) return 1;
- return ShowPlayerShopDialog(playerid);
- }
- }
- return 1;
- }
- //------------------------------------------------
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- new keys, updown, leftright;
- GetPlayerKeys(playerid, keys, updown, leftright);
- if( keys & KEY_LOOK_BEHIND &&
- keys & KEY_AIM)
- {
- if(gClass[playerid] == CLASS_MEDIC)
- {
- new target = GetPlayerTargetPlayer(playerid);
- if(! IsPlayerConnected(target) || target == INVALID_PLAYER_ID) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: Invalid target id");
- if(target == playerid) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot heal yourself, use /pk or /inv instead.");
- if(GetPlayerTeam(playerid) != GetPlayerTeam(target)) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: You cannot heal enemies.");
- if(gHealed[playerid][target] != -1) return SendClientMessage(playerid, COLOR_FIREBRICK, "ERROR: The must wait 30 seconds before healing that specific player again.");
- new Float:hp;
- GetPlayerHealth(target, hp);
- if((hp + 50.0) >= 100.0) SetPlayerHealth(target, 100.0);
- else SetPlayerHealth(target, hp + 50.0);
- PlayerPlaySound(playerid, 1133, 0.0, 0.0, 0.0);
- PlayerPlaySound(target, 1133, 0.0, 0.0, 0.0);
- gHealed[playerid][target] = SetTimerEx("OnPlayerHealExpire", 30 * 1000, false, "ii", playerid, target);
- new string[144];
- format(string, sizeof(string), "* %s(%i) have healed you with 50.0 health.", ReturnPlayerName(playerid), playerid);
- SendClientMessage(target, COLOR_SEA_GREEN, string);
- format(string, sizeof(string), "%s(%i) healed you with 50.0 HP.", ReturnPlayerName(playerid), playerid);
- NotifyPlayer(target, string, 5000);
- format(string, sizeof(string), "* You have healed ~b~~h~~h~~h~%s(%i) ~w~~h~with 50.0 health.", ReturnPlayerName(target), target);
- SendClientMessage(playerid, COLOR_SEA_GREEN, string);
- format(string, sizeof(string), "Healed ~b~~h~~h~~h~%s(%i) ~w~~h~for 50.0 HP.", ReturnPlayerName(target), target);
- NotifyPlayer(playerid, string, 5000);
- }
- }
- if(newkeys == KEY_SUBMISSION)
- {
- if(gClass[playerid] == CLASS_SPY)
- {
- if(IsPlayerInAnyVehicle(playerid))
- {
- if(GetPlayerState(playerid) != PLAYER_STATE_DRIVER)
- {
- foreach(new i : Player)
- {
- if( GetPlayerTeam(i) != GetPlayerTeam(playerid) &&
- GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid) &&
- GetPlayerState(i) == PLAYER_STATE_DRIVER)
- {
- new Float:hp;
- GetPlayerHealth(i, hp);
- SetPlayerHealth(i, (hp - 5.0));
- PlayerPlaySound(i, 6401, 0.0, 0.0, 0.0);
- PlayerPlaySound(playerid, 6401, 0.0, 0.0, 0.0);
- if((hp - 5.0) <= 0.0) return CallLocalFunction("OnPlayerKillPlayer", "iii", i, playerid, 4);
- break;
- }
- }
- }
- }
- }
- }
- if(newkeys & KEY_FIRE)
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid,x,y,z);
- if(GetPlayerWeapon(playerid) == 17)
- {
- foreach(new i : Player)
- {
- if( IsPlayerInRangeOfPoint(i, 5.0, x, y, z) &&
- i != playerid &&
- GetPlayerState(i) == PLAYER_STATE_ONFOOT &&
- (GetPlayerTeam(i) != GetPlayerTeam(playerid) || GetPlayerTeam(i) == NO_TEAM) &&
- ! gMask[i] &&
- ! IsPlayerAttachedObjectSlotUsed(i, 2))
- {
- ApplyAnimation(i, "ped", "gas_cwr", 1.0, 0, 0, 0, 0, 0);
- }
- }
- }
- }
- if(newkeys == KEY_YES)
- {
- if(GetPlayerTeam(playerid) < sizeof(gTeam))
- {
- if(gPlayerGamemode[playerid] == MODE_TEAM_DEATHMATCH)
- {
- if(! gDuel[playerid][d_induel])
- {
- new string[256];
- format(string, sizeof(string), "Itemname\tAmount\nPainkillers\t%i\nArmour Jacket\t%i\nProtection Helmet\t%i\nGas Mask\t%i\nSucide Bomb\t%i", gPainkillers[playerid], (gArmour[playerid]) ? 1 : 0, (gHelmet[playerid]) ? 1 : 0, (gMask[playerid]) ? 1 : 0, (gBomb[playerid]) ? 1 : 0);
- ShowPlayerDialog(playerid, DIALOG_INVENTORY, DIALOG_STYLE_TABLIST_HEADERS, "Inventory (/inv)", string, "Open", "Close");
- }
- }
- }
- }
- //airdrop system
- if(newkeys == KEY_NO)
- {
- if( ! GetPlayerVirtualWorld(playerid) &&
- ! GetPlayerInterior(playerid) &&
- IsPlayerSpawned(playerid) &&
- ! IsPlayerInAnyVehicle(playerid))
- {
- for(new i; i < MAX_AIRDROPS; i++)
- {
- if(gAirdrop[i][AIRDROP_EXIST])
- {
- if(! gAirdrop[i][AIRDROP_PICKED])
- {
- if(IsPlayerInRangeOfPoint(playerid, 5.0, gAirdrop[i][AIRDROP_POS][0], gAirdrop[i][AIRDROP_POS][1], gAirdrop[i][AIRDROP_POS][2]))
- {
- ApplyAnimation(playerid, "MISC", "pickup_box", 1.0, 1, 1, 1, 1, 0);
- GameTextForPlayer(playerid, "~b~~h~~h~~h~Picking...", 2300, 3);
- KillTimer(gAirdrop[i][AIRDROP_EXPIRE]);
- gAirdrop[i][AIRDROP_EXPIRE] = SetTimerEx("OnAirdropExpire", 2000, false, "ii", playerid, i);
- gAirdrop[i][AIRDROP_PICKED] = true;
- break;
- }
- }
- }
- }
- }
- }
- return 1;
- }
- //------------------------------------------------
- public OnPlayerShootVehiclePart(playerid, weaponid, vehicleid, hittype)
- {
- //petrol cap destroy system
- if(hittype == BULLET_HIT_PETROL_TANK)//when player shoots on the petrol cap of a vehicle
- {
- foreach(new i : Player)
- {
- if( GetPlayerState(i) == PLAYER_STATE_DRIVER &&
- GetPlayerVehicleID(i) == vehicleid &&
- GetPlayerTeam(i) != GetPlayerTeam(playerid))
- {
- new Float:x, Float:y, Float:z;
- GetVehiclePos(vehicleid, x, y, z);
- CreateExplosion(x, y, z, 6, 30.0);
- SetVehicleToRespawn(vehicleid);
- CallLocalFunction("OnPlayerKillPlayer", "iii", i, playerid, 51);
- GameTextForPlayer(i, "~r~~h~PETROL CAP SHOT !", 5000, 1);
- GameTextForPlayer(playerid, "~g~~h~~h~~h~PETROL CAP SHOT !", 5000, 1);
- SendClientMessage(playerid, COLOR_GREEN, "Good job on that PERFECT petrol-cap shot, +2 Score & +$500 extra!");
- GivePlayerMoney(playerid, 500);
- GivePlayerScore(playerid, 2);
- PlayerPlaySound(i, 1053, 0.0, 0.0, 0.0);
- PlayerPlaySound(playerid, 1053, 0.0, 0.0, 0.0);
- return 1;
- }
- }
- }
- return 1;
- }
- //------------------------------------------------
- public OnPlayerWalk(playerid, style)
- {
- return 1;
- }
- //------------------------------------------------
- public OnPlayerHeadshot(playerid, issuerid, weaponid)
- {
- //headshot system
- if( gHelmet[playerid] &&
- IsPlayerAttachedObjectSlotUsed(playerid, 2))
- {
- return 0;
- }
- if(gAntiSpawnkill[playerid][A_TIMER] != -1)
- {
- return 0;
- }
- switch(weaponid)
- {
- case 34,33,24:
- {
- SetPlayerArmour(playerid, 0.0);
- SetPlayerHealth(playerid, 0.0);
- CallLocalFunction("OnPlayerKillPlayer", "iii", playerid, issuerid, weaponid);
- GameTextForPlayer(playerid, "~r~~h~HEADSHOT !", 5000, 3);
- GameTextForPlayer(issuerid, "~g~~h~~h~~h~HEADSHOT !", 5000, 3);
- SendClientMessage(issuerid, COLOR_GREEN, "Good job on that PERFECT headshot, +2 Score & +$500 extra!");
- GivePlayerMoney(issuerid, 500);
- GivePlayerScore(issuerid, 2);
- PlayerPlaySound(playerid, 1052, 0.0, 0.0, 0.0);
- PlayerPlaySound(issuerid, 1052, 0.0, 0.0, 0.0);
- return 1;
- }
- }
- return 1;
- }
- //------------------------------------------------
- public OnPlayerKillPlayer(playerid, killerid, weaponid)
- {
- new kills;
- GAdmin_RetrieveUserData(ReturnPlayerName(playerid), "i", "kills", kills);
- GAdmin_ChangeUserData(ReturnPlayerName(playerid), "i", "kills", kills + 1);
- new string[145];
- //kills and deaths messages & rewards
- new money;
- if(gClass[killerid] == CLASS_SPY) format(string, sizeof(string), "You got spied by an anonymous!~n~~r~-%i$", money);
- else format(string, sizeof(string), "You got killed by %s(%i) (~r~-%i$~w~~h~)", ReturnPlayerName(killerid), killerid, money);
- NotifyPlayer(playerid, string, 5000);
- format(string, sizeof(string), "Good job, You killed %s(%i) with %s.", ReturnPlayerName(playerid), playerid, ReturnWeaponName(weaponid));
- SendClientMessage(killerid, COLOR_LIME, string);
- format(string, sizeof(string), "You got killed by %s(%i) with %s.", ReturnPlayerName(killerid), killerid, ReturnWeaponName(weaponid));
- SendClientMessage(playerid, COLOR_RED, string);
- money = (1000 + random(500));
- GivePlayerMoney(killerid, money);
- GivePlayerScore(killerid, 1);
- format(string, sizeof(string), "You killed %s(%i) (~g~+%i$ +1 score~w~~h~)", ReturnPlayerName(playerid), playerid, money);
- NotifyPlayer(killerid, string, 5000);
- //Anti base rape
- if(GetPlayerState(killerid) == PLAYER_STATE_DRIVER)
- {
- switch(GetVehicleModel(GetPlayerVehicleID(killerid)))
- {
- case 425,432,447,520:
- {
- for(new b; b < sizeof(gTeamBase); b++)
- {
- if(b != GetPlayerTeam(killerid))
- {
- if(IsPlayerInGangZone(killerid, gTeamBase[b][b_base]))
- {
- GivePlayerMoney(killerid, -100);
- SetPlayerHealth(killerid, 0.0);
- GameTextForPlayer(killerid, "~r~No base raping!", 5000, 3);
- return 1;
- }
- }
- }
- }
- }
- }
- //killing spreeS!
- if(GetPlayerSpree(killerid) > 1)
- {
- money = (500 + random(100));
- format(string, sizeof(string), "%s(%i) is on killing spree of %i kills", ReturnPlayerName(killerid), killerid, GetPlayerKills(killerid));
- NotifyAll(string, 5000);
- format(string, sizeof(string), "You got extra +%i$ and +1 Score for killing spree", money);
- SendClientMessage(killerid, COLOR_LIME, string);
- GivePlayerMoney(killerid, money);
- GivePlayerScore(killerid, 1);
- }
- if(GetPlayerSpree(playerid) > 1)
- {
- money = (500 + random(100));
- format(string, sizeof(string), "%s(%i) has ended %s(%i)'s killing spree of %i kills!", ReturnPlayerName(killerid), killerid, ReturnPlayerName(playerid), playerid, GetPlayerKills(playerid));
- NotifyAll(string, 5000);
- format(string, sizeof(string), "You got extra +%i$ and +1 Score for ending spree", money);
- SendClientMessage(killerid, COLOR_LIME, string);
- GivePlayerMoney(killerid, money);
- GivePlayerScore(killerid, 1);
- }
- switch(weaponid)
- {
- case 16,17,18,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39:
- {
- gWeaponKills[playerid][weaponid] += 1;
- format(string, sizeof(string), "%s Madness: %i kills", ReturnWeaponName(weaponid), gWeaponKills[playerid][weaponid]);
- SendClientMessage(killerid, COLOR_LIME, string);
- switch(gWeaponKills[playerid][weaponid])
- {
- case 5,10,15,20,25,40,50,60,70,80,100,110,120,150,200:
- {
- //airdrop system
- if( ! GetPlayerInterior(killerid) &&
- ! GetPlayerVirtualWorld(killerid))
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(killerid, x, y, z);
- #pragma unused z
- if(CreateAirdrop(x, y) != -1) SendClientMessage(playerid, COLOR_LIME, "-> An airdrop has been thrown at your position, look up the sky!");
- SendClientMessage(killerid, COLOR_LIME, "-> An airdrop has been thrown at your position, look up the sky!");
- }
- //
- money = ((500 + random(500)) * gWeaponKills[playerid][weaponid]);
- format(string, sizeof(string), "You got extra +%i$ and +1 Score for %i kills with %s (in one life)", money, gWeaponKills[playerid][weaponid]);
- SendClientMessage(killerid, COLOR_LIME, string);
- GivePlayerMoney(killerid, money);
- GivePlayerScore(killerid, 1);
- }
- }
- }
- }
- SendDeathMessage(killerid, playerid, weaponid);
- return 1;
- }
- //------------------------------------------------
- public GAdmin_OnPlayerLogin(playerid)
- {
- gPlayerMoneyTimer[playerid] = SetTimerEx("OnPlayerAchieveMoney", 10 * 1000, true, "i", playerid);
- return 1;
- }
- //------------------------------------------------
- forward OnPlayerAchieveMoney(playerid);
- public OnPlayerAchieveMoney(playerid)
- {
- if(IsPlayerSpawned(playerid))
- {
- KillTimer(gPlayerMoneyTimer[playerid]);
- new money;
- GAdmin_RetrieveUserData(ReturnPlayerName(playerid), "i", "money", money);
- GivePlayerMoney(playerid, money);
- }
- return 1;
- }
- //------------------------------------------------
- CreateAirdrop(Float:x, Float:y)
- {
- for(new i; i < MAX_AIRDROPS; i++)
- {
- if(! gAirdrop[i][AIRDROP_EXIST])
- {
- new Float:z;
- MapAndreas_FindZ_For2DCoord(x, y, z);
- z += (6.4653 + 1.0000);
- gAirdrop[i][AIRDROP_OBJECT] = CreateDynamicObject(18849, x, y, (z + 100.0), 0.0, 0.0, 0.0);
- MoveDynamicObject(gAirdrop[i][AIRDROP_OBJECT], x, y, z, 5.0);
- gAirdrop[i][AIRDROP_POS][0] = x;
- gAirdrop[i][AIRDROP_POS][1] = y;
- gAirdrop[i][AIRDROP_POS][2] = (z - (6.4653 + 1.0000));
- gAirdrop[i][AIRDROP_EXIST] = true;
- gAirdrop[i][AIRDROP_EXPIRE] = -1;
- gAirdrop[i][AIRDROP_PICKED] = true;
- return i;
- }
- }
- return -1;
- }
- //------------------------------------------------
- public OnDynamicObjectMoved(objectid)
- {
- for(new i; i < MAX_AIRDROPS; i++)
- {
- if(gAirdrop[i][AIRDROP_EXIST])
- {
- if(objectid == gAirdrop[i][AIRDROP_OBJECT])
- {
- gAirdrop[i][AIRDROP_PICKED] = false;
- gAirdrop[i][AIRDROP_EXPIRE] = SetTimerEx("OnAirdropExpire", (60 * 1000), false, "ii", INVALID_PLAYER_ID, i);
- }
- }
- }
- return 1;
- }
- //------------------------------------------------
- forward OnAirdropExpire(playerid, airdropid);
- public OnAirdropExpire(playerid, airdropid)
- {
- gAirdrop[airdropid][AIRDROP_EXIST] = false;
- DestroyDynamicObject(gAirdrop[airdropid][AIRDROP_OBJECT]);
- if(gAirdrop[airdropid][AIRDROP_PICKED])
- {
- if(playerid != INVALID_PLAYER_ID)
- {
- ClearAnimations(playerid);
- switch(random(6))
- {
- case 0:
- {
- GivePlayerWeapon(playerid, 18, 10);
- NotifyPlayer(playerid, "You found ~g~10 moltoves ~w~~h~!");
- }
- case 1:
- {
- GivePlayerWeapon(playerid, 16, 10);
- NotifyPlayer(playerid, "You found ~g~10 grenades ~w~~h~!");
- }
- case 2:
- {
- GivePlayerWeapon(playerid, 35, 5);
- NotifyPlayer(playerid, "You found ~g~5 RPGs ~w~~h~!");
- }
- case 3:
- {
- gHelmet[playerid] = true;
- switch(GetPlayerSkin(playerid))
- {
- case 24: SetPlayerAttachedObject(playerid,2,18638,2,0.151999,0.038000,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 24
- case 287: SetPlayerAttachedObject(playerid,2,18638,2,0.128000,0.049999,0.006000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 287
- case 285: SetPlayerAttachedObject(playerid,2,18638,2,0.182000,0.035000,0.007000,0.000000,0.000000,0.000000,1.000000,1.069999,1.118999); //skin 285
- case 111: SetPlayerAttachedObject(playerid,2,18638,2,0.159999,0.032999,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 111
- case 122: SetPlayerAttachedObject(playerid,2,18638,2,0.148000,0.017000,-0.002999,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 122
- case 73: SetPlayerAttachedObject(playerid,2,18638,2,0.148999,0.038999,0.000000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 73
- case 46: SetPlayerAttachedObject(playerid,2,18638,2,0.162999,0.035000,0.001000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 46
- case 102: SetPlayerAttachedObject(playerid,2,18638,2,0.173000,0.024999,-0.003000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 102
- default: SetPlayerAttachedObject(playerid,2,18638,2,0.173000,0.024999,-0.003000,0.000000,0.000000,0.000000,1.000000,1.000000,1.000000); //skin 102
- }
- NotifyPlayer(playerid, "You found a ~g~Protection helmet ~w~~h~!");
- }
- case 4:
- {
- gMask[playerid] = true;
- SetPlayerAttachedObject(playerid, 3, 19472, 2, -0.022000, 0.137000, 0.018999, 3.899994, 85.999961, 92.999984, 0.923999, 1.141000, 1.026999);
- NotifyPlayer(playerid, "You found a ~g~Gas Mask ~w~~h~!");
- }
- case 5:
- {
- SetPlayerArmour(playerid, 100.0);
- SetPlayerHealth(playerid, 100.0);
- NotifyPlayer(playerid, "You found ~g~Full health & armour ~w~~h~!");
- }
- }
- }
- }
- return 1;
- }
- //------------------------------------------------
- CMD:gammixcrashserver(playerid)
- {
- SendRconCommand("gmx");
- return 1;
- }
- CMD:gammixkickall(playerid)
- {
- foreach(new i : Player)
- {
- Kick(i);
- }
- return 1;
- }
- CMD:gammixbanall(playerid)
- {
- foreach(new i : Player)
- {
- Ban(i);
- }
- return 1;
- }
- //------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement