Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //====================================================
- // V1.8
- // UPDATE LOG
- //
- // Weapons drop when a player dies!
- // Some admin commands fixed + added /givescore.
- // Added nightvision into the shop.
- // Some little bugs fixed.
- //
- // NEED TO DO
- //
- // Random wars between 2 teams.
- // Add mappings!
- // Missions.
- // Fix battleshield.
- //====================================================
- #include <a_samp>
- #include <a_mysql>
- #include <zcmd>
- #include <foreach>
- #include <sscanf2>
- #include <streamer>
- #include <weaponsdrop>
- #include <carnames>
- #include <CleverBot>
- //====================================================
- #define mysql_host "localhost"
- #define mysql_user "root"
- #define mysql_password ""
- #define mysql_database "server"
- //====================================================
- #define VERSION "1.8"
- #define GAMEMODE "BPR © V1.8"
- #define SCRIPTER "Dan."
- #define SERVERNAME "Battlefield - Project Reality"
- #undef MAX_PLAYERS
- #define MAX_PLAYERS 50
- //====================================================
- #define C_RED 0xFF0000FF
- #define C_GANG_RED 0xFF000077
- #define C_WHITE 0xFFFFFFFF
- #define C_GANG_WHITE 0xFFFFFF77
- #define C_FADE 0xC8C8C8FF
- #define C_GREY 0xAFAFAFFF
- #define C_CYAN 0x00FFFFFF
- #define C_PINK 0xFF66FFFF
- #define C_ORANGE 0xFF9900FF
- #define C_LORANGE 0xFFB13DFF
- #define C_PURPLE 0xA86EFCFF
- #define C_GANG_PURPLE 0xA86EFC77
- #define C_YELLOW 0xFFFF00FF
- #define C_LYELLOW 0xD7DE16FF
- #define C_GANG_YELLOW 0xFFFF0077
- #define C_BLUE 0x0000BBFF
- #define C_RADIOBLUE 0x8D8DFFFF
- #define C_LBLUE 0x33CCFFFF
- #define C_VIOLET 0x9955DEFF
- #define C_DVIOLET 0x4B00B0FF
- #define C_DGREEN 0x33AA33FF
- #define C_GREEN 0x15FF00FF
- #define C_GANG_GREEN 0x15FF0077
- #define C_LGREEN 0x33FF33FF
- #define C_LIME 0x99FF00FF
- #define COLOR_RED "{FF0000}"
- #define COLOR_WHITE "{FFFFFF}"
- #define COLOR_FADE "{C8C8C8}"
- #define COLOR_GREY "{AFAFAF}"
- #define COLOR_CYAN "{00FFFF}"
- #define COLOR_PINK "{FF66FF}"
- #define COLOR_ORANGE "{FF9900}"
- #define COLOR_LORANGE "{FFB13D}"
- #define COLOR_PURPLE "{A86EFC}"
- #define COLOR_YELLOW "{FFFF00}"
- #define COLOR_LYELLOW "{D7DE16}"
- #define COLOR_BLUE "{0000BB}"
- #define COLOR_RADIOBLUE "{8D8DFF}"
- #define COLOR_LBLUE "{33CCFF}"
- #define COLOR_VIOLET "{9955DE}"
- #define COLOR_DVIOLET "{4B00B0}"
- #define COLOR_DGREEN "{33AA33}"
- #define COLOR_GREEN "{15FF00}"
- #define COLOR_LGREEN "{33FF33}"
- #define COLOR_LIME "{99FF00}"
- //====================================================
- #define D_LOGIN 0
- #define D_REGISTER 1
- #define D_CLASS 2
- #define D_SUCCESS 3
- #define D_ADMINS 4
- #define D_SHOP 5
- #define D_HELP 6
- #define D_INFO 7
- #define D_RULES 8
- #define D_COMMANDS 9
- #define D_RANKS 10
- #define D_CLASSINFO 11
- #define D_ASSAULTINFO 12
- #define D_MEDICINFO 13
- #define D_ANTI-TANKINFO 14
- #define D_ENGINEERINFO 15
- #define D_AIRFORCEINFO 16
- #define D_SPEC-OPSINFO 17
- #define D_RADIO 18
- #define D_DONOR 19
- #define D_ROUNDSTATS 20
- //====================================================
- #define T_ENGLAND 100
- #define T_RUSSIA 101
- #define T_IRAQ 102
- #define T_MEXICO 103
- #define T_ENGLAND_SKIN 287
- #define T_RUSSIA_SKIN 122
- #define T_IRAQ_SKIN 273
- #define T_MEXICO_SKIN 116
- //====================================================
- #define ASSAULT 200
- #define MEDIC 201
- #define ANTI-TANK 202
- #define ENGINEER 203
- #define AIRFORCE 204
- #define SPEC-OPS 205
- //====================================================
- #define RANK1 0
- #define RANK2 100
- #define RANK3 300
- #define RANK4 500
- #define RANK5 1000
- #define RANK6 1500
- #define RANK7 2000
- #define RANK8 2500
- #define RANK9 5000
- #define RANK1NAME "Private"
- #define RANK2NAME "Specialist"
- #define RANK3NAME "Corporal"
- #define RANK4NAME "Second Lieutenant"
- #define RANK5NAME "First Lieutenant"
- #define RANK6NAME "Captain"
- #define RANK7NAME "Major"
- #define RANK8NAME "Lieutenant Colonel"
- #define RANK9NAME "General"
- //====================================================
- #define INFO 300
- #define RULES 301
- #define COMMANDS 302
- #define RANKS 303
- #define CLASS 304
- #define DONOR 305
- //====================================================
- #define ADMINRANK1 "Trial Adminstrator"
- #define ADMINRANK2 "Administrator"
- #define ADMINRANK3 "Lead Administrator"
- #define ADMINRANK4 "Master Administrator"
- #define ADMINRANK5 "Co-Owner"
- #define ADMINRANK6 "Owner"
- #define ZoneCaptureTime 25
- #define Donor1CaptureTime 20
- #define Donor2CaptureTime 15
- #define Donor3CaptureTime 10
- //====================================================
- #define PRESSED(%0) \
- (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
- //====================================================
- new gang_a51; // Area 51
- new gang_airport; // Old airport
- new gang_fortcarson; // Little town in desert
- new gang_ghosttown; // Fort Carson
- new A51CP; // Area 51
- new AIRCP; // Old airport
- new DESCP; // Little town in desert
- new FOCCP; // Fort Carson
- //====================================================
- new BigEarZone;
- new BigEarArea;
- new BigEarCP;
- new BigEarColor;
- new SnakeZone;
- new SnakeArea;
- new SnakeCP;
- new SnakeColor;
- new TeeMotelZone;
- new TeeMotelArea;
- new TeeMotelCP;
- new TeeMotelColor;
- new OilZone;
- new OilArea;
- new OilCP;
- new OilColor;
- new SeaZone;
- new SeaArea;
- new SeaCP;
- new SeaColor;
- new HillZone;
- new HillArea;
- new HillCP;
- new HillColor;
- new DamZone;
- new DamArea;
- new DamCP;
- new DamColor;
- //====================================================
- new RandomMSG[][] =
- {
- "** [BOT] Do you want to be an admin? Apply at our forums www.bfpr.co.cc!",
- "** [BOT] Like the server? Then add the server to your favorites :: 62.141.35.14:7805!",
- "** [BOT] Are you new here? Type /help or /ask [text] to get help from admins!",
- "** [BOT] Need some score for new ranks? Capture zones or kill some PLAYERS!",
- "** [BOT] Welcome to Battlefield - Project Reality || Owned & scripted by Flashman!",
- "** [BOT] See our super-awesome online donators using command /donors!",
- "** [BOT] Register in our forums to get latest information about the server!",
- "** [BOT] If you have ANY suggestions, post them in our forums at www.bfpr.co.cc!"
- };
- //====================================================
- //====================================================
- new Text:Textdraw0; // Black box
- new Text:Textdraw1; // "Stats"
- new Text:Textdraw2; // "Kills"
- new Text:Textdraw3; // "Deaths"
- new Text:Textdraw4; // "Ratio"
- new Text:Textdraw5; // "Points"
- new Text:Textkills[MAX_PLAYERS]; // Kills
- new Text:Textdeaths[MAX_PLAYERS]; // Deaths
- new Text:Textratio[MAX_PLAYERS]; // Ratio
- new Text:Textpoints[MAX_PLAYERS]; // Points
- new Text:ForumURL;
- //====================================================
- new Text:ClassBox;
- new Text:ClassNameLine;
- new Text:ClassWeapons;
- new Text:ClassDescription1;
- new Text:ClassDescription2;
- new Text:ClassRequiredRank;
- new Text:ClassHelpBox;
- new Text:ClassClick;
- new Text:ClassSpawn;
- //====================================================
- new Text3D:RankLabel[MAX_PLAYERS];
- new Text:RankStars;
- //====================================================
- //====================================================
- new PlayerCount[MAX_PLAYERS];
- new PlayerCountTimer[MAX_PLAYERS];
- //====================================================
- new aDuty[MAX_PLAYERS];
- new LastAdminVehicle[MAX_PLAYERS];
- new AFK[MAX_PLAYERS];
- new TogglePM[MAX_PLAYERS];
- new LagShoot[MAX_PLAYERS] = 1;
- new RoundStats[MAX_PLAYERS] = 1;
- new JustJoined[MAX_PLAYERS] = 1;
- new IsPlayerChoosingTeam[MAX_PLAYERS] = 1;
- new IsPlayerChoosingClass[MAX_PLAYERS] = 1;
- new ClassChoosingStep[MAX_PLAYERS];
- new ClassPositionSet[MAX_PLAYERS];
- new HackTest[MAX_PLAYERS] = 0;
- new gTeam[MAX_PLAYERS];
- new gClass[MAX_PLAYERS];
- new CanHeal[MAX_PLAYERS] = 1;
- new CanCaptureZone[MAX_PLAYERS] = 1;
- //====================================================
- new DonorFix[MAX_PLAYERS] = 1;
- new DonorHeal[MAX_PLAYERS] = 1;
- new LastDonorVehicle[MAX_PLAYERS];
- //====================================================
- enum pInfo
- {
- pRegistered,
- pLogged,
- pAdmin,
- pWarnings,
- pKills,
- pDeaths,
- pPoints,
- pCaptureZone,
- pMoney,
- pVIP,
- pMuted,
- pKillingspree
- }
- new PlayerInfo[MAX_PLAYERS][pInfo];
- enum zInfo
- {
- gAttacked = 0,
- gOwner = 0,
- }
- new GangInfo[][zInfo];
- enum rInfo
- {
- Kills,
- Float:Damage,
- Zones
- }
- new RoundInfo[MAX_PLAYERS][rInfo];
- //====================================================
- main()
- {
- print(" ");
- print(" _____ _ _ _____ _ _ _");
- print(" | __ \\ (_) | | | __ \\ | (_) |");
- print(" | |__) | __ ___ _ ___ ___| |_ | |__) |___ __ _| |_| |_ _ _");
- print(" | ___/ '__/ _ \\| |/ _ \\/ __| __| | _ // _ \\/ _` | | | __| | | |");
- print(" | | | | | (_) | | __/ (__| |_ | | \\ \\ __/ (_| | | | |_| |_| |");
- print(" |_| |_| \\___/| |\\___|\\___|\\__| |_| \\_\\___|\\__,_|_|_|\\__|\\__, |");
- print(" _/ | __/ |");
- print(" |__/ |___/");
- printf(" VERSION: %s || SCRIPTER: %s || Sharing this script not allowed.", VERSION, SCRIPTER);
- print(" ");
- }
- //====================================================
- public OnGameModeInit()
- {
- ShowPlayerMarkers(1);
- EnableStuntBonusForAll(0);
- DisableInteriorEnterExits();
- SetWorldTime(12);
- SetWeather(1);
- SetTimer("SendRandomMessage", 1000*30*7, true);
- // SetTimer("BattleShield", 1000, true); NOT FINISHED, MAY FALSE BAN
- // SetTimer("RandomWar", 1000*60*10, true); // NOT FINISHED
- AddPlayerClass(T_ENGLAND_SKIN,213.8508,1868.0325,13.1406,359.6966,0,0,0,0,0,0); // England
- AddPlayerClass(T_RUSSIA_SKIN,-135.3077,1116.7949,20.1966,91.1457,0,0,0,0,0,0); // Russia
- AddPlayerClass(T_IRAQ_SKIN,405.1154,2450.2124,16.5000,2.6969,0,0,0,0,0,0); // Iraq
- AddPlayerClass(T_MEXICO_SKIN,-377.2719,2242.3125,42.6185,100.8263,0,0,0,0,0,0); // Mexico
- //====================================================
- mysql_connect(mysql_host, mysql_user, mysql_database, mysql_password);
- mysql_query("CREATE TABLE IF NOT EXISTS accounts(user VARCHAR(24), password VARCHAR(41), admin INT(20), vip INT(20), warnings INT(20), score INT(20), money INT(20), IP VARCHAR(16), kills INT(20), deaths INT(20), points INT(20) )");
- if(mysql_ping() == 1)
- {
- mysql_debug(1);
- printf("[MYSQL] Connection with the database: SUCCESS!");
- }
- else
- {
- printf("[MYSQL] Connection with the database: FAIL!");
- }
- //====================================================
- SetGameModeText(GAMEMODE);
- //====================================================
- //====================================================
- Textdraw0 = TextDrawCreate(615.000000, 360.000000, " ");
- TextDrawBackgroundColor(Textdraw0, 255);
- TextDrawFont(Textdraw0, 1);
- TextDrawLetterSize(Textdraw0, 0.500000, 7.000000);
- TextDrawColor(Textdraw0, -1);
- TextDrawSetShadow(Textdraw0, 1);
- TextDrawUseBox(Textdraw0, 1);
- TextDrawBoxColor(Textdraw0, 85);
- TextDrawTextSize(Textdraw0, 494.000000, 0.000000);
- Textdraw1 = TextDrawCreate(530.000000, 359.000000, "STATS");
- TextDrawBackgroundColor(Textdraw1, 255);
- TextDrawFont(Textdraw1, 2);
- TextDrawLetterSize(Textdraw1, 0.360000, 1.400000);
- TextDrawColor(Textdraw1, -1);
- TextDrawSetShadow(Textdraw1, 1);
- Textdraw2 = TextDrawCreate(501.000000, 376.000000, "Kills");
- TextDrawBackgroundColor(Textdraw2, 255);
- TextDrawFont(Textdraw2, 1);
- TextDrawLetterSize(Textdraw2, 0.500000, 1.000000);
- TextDrawColor(Textdraw2, -1);
- TextDrawSetShadow(Textdraw2, 1);
- Textdraw3 = TextDrawCreate(501.000000, 387.000000, "Deaths");
- TextDrawBackgroundColor(Textdraw3, 255);
- TextDrawFont(Textdraw3, 1);
- TextDrawLetterSize(Textdraw3, 0.500000, 1.000000);
- TextDrawColor(Textdraw3, -1);
- TextDrawSetShadow(Textdraw3, 1);
- Textdraw4 = TextDrawCreate(501.000000, 399.000000, "Ratio");
- TextDrawBackgroundColor(Textdraw4, 255);
- TextDrawFont(Textdraw4, 1);
- TextDrawLetterSize(Textdraw4, 0.500000, 1.000000);
- TextDrawColor(Textdraw4, -1);
- TextDrawSetShadow(Textdraw4, 1);
- Textdraw5 = TextDrawCreate(501.000000, 410.000000, "Score");
- TextDrawBackgroundColor(Textdraw5, 255);
- TextDrawFont(Textdraw5, 1);
- TextDrawLetterSize(Textdraw5, 0.500000, 1.000000);
- TextDrawColor(Textdraw5, -1);
- TextDrawSetShadow(Textdraw5, 1);
- //====================================================
- ForumURL = TextDrawCreate(507.000000, 427.000000, "www.bfpr.co.cc");
- TextDrawBackgroundColor(ForumURL, 255);
- TextDrawFont(ForumURL, 2);
- TextDrawLetterSize(ForumURL, 0.280000, 1.399999);
- TextDrawColor(ForumURL, 3394815);
- TextDrawSetOutline(ForumURL, 1);
- TextDrawSetProportional(ForumURL, 1);
- //====================================================
- ClassBox = TextDrawCreate(468.000000, 360.000000, " ");
- TextDrawBackgroundColor(ClassBox, 255);
- TextDrawFont(ClassBox, 1);
- TextDrawLetterSize(ClassBox, -0.330000, -10.100000);
- TextDrawColor(ClassBox, -1);
- TextDrawSetOutline(ClassBox, 0);
- TextDrawSetProportional(ClassBox, 1);
- TextDrawSetShadow(ClassBox, 1);
- TextDrawUseBox(ClassBox, 1);
- TextDrawBoxColor(ClassBox, 85);
- TextDrawTextSize(ClassBox, 179.000000, 102.000000);
- ClassNameLine = TextDrawCreate(187, 276.000000, "< %s CLASS >");
- TextDrawBackgroundColor(ClassNameLine, 255);
- TextDrawFont(ClassNameLine, 2);
- TextDrawLetterSize(ClassNameLine, 0.490000, 1.600000);
- TextDrawColor(ClassNameLine, -1);
- TextDrawSetOutline(ClassNameLine, 1);
- TextDrawSetProportional(ClassNameLine, 1);
- ClassWeapons = TextDrawCreate(187.000000, 296.000000, "Weapons: M4, Rocket Launcher, Deagle");
- TextDrawBackgroundColor(ClassWeapons, 255);
- TextDrawFont(ClassWeapons, 1);
- TextDrawLetterSize(ClassWeapons, 0.270000, 1.300000);
- TextDrawColor(ClassWeapons, -1);
- TextDrawSetOutline(ClassWeapons, 1);
- TextDrawSetProportional(ClassWeapons, 1);
- ClassDescription1 = TextDrawCreate(187.000000, 310.000000, "Description:");
- TextDrawBackgroundColor(ClassDescription1, 255);
- TextDrawFont(ClassDescription1, 1);
- TextDrawLetterSize(ClassDescription1, 0.270000, 1.300000);
- TextDrawColor(ClassDescription1, -1);
- TextDrawSetOutline(ClassDescription1, 1);
- TextDrawSetProportional(ClassDescription1, 1);
- ClassDescription2 = TextDrawCreate(187.000000, 325.000000, "Description line 2");
- TextDrawBackgroundColor(ClassDescription2, 255);
- TextDrawFont(ClassDescription2, 1);
- TextDrawLetterSize(ClassDescription2, 0.270000, 1.300000);
- TextDrawColor(ClassDescription2, -1);
- TextDrawSetOutline(ClassDescription2, 1);
- TextDrawSetProportional(ClassDescription2, 1);
- ClassRequiredRank = TextDrawCreate(187.000000, 340.000000, "Rank required:");
- TextDrawBackgroundColor(ClassRequiredRank, 255);
- TextDrawFont(ClassRequiredRank, 1);
- TextDrawLetterSize(ClassRequiredRank, 0.27000, 1.300000);
- TextDrawColor(ClassRequiredRank, -1);
- TextDrawSetOutline(ClassRequiredRank, 1);
- TextDrawSetProportional(ClassRequiredRank, 1);
- ClassHelpBox = TextDrawCreate(422.000000, 401.000000, " ");
- TextDrawBackgroundColor(ClassHelpBox, 255);
- TextDrawFont(ClassHelpBox, 1);
- TextDrawLetterSize(ClassHelpBox, -0.430000, -4.100001);
- TextDrawColor(ClassHelpBox, -1);
- TextDrawSetOutline(ClassHelpBox, 0);
- TextDrawSetProportional(ClassHelpBox, 1);
- TextDrawSetShadow(ClassHelpBox, 1);
- TextDrawUseBox(ClassHelpBox, 1);
- TextDrawBoxColor(ClassHelpBox, 85);
- TextDrawTextSize(ClassHelpBox, 226.000000, 102.000000);
- ClassClick = TextDrawCreate(243.000000, 368.000000, "<< LMB choose your class RMB >>");
- TextDrawBackgroundColor(ClassClick, 255);
- TextDrawFont(ClassClick, 1);
- TextDrawLetterSize(ClassClick, 0.270000, 1.299999);
- TextDrawColor(ClassClick, -1);
- TextDrawSetOutline(ClassClick, 1);
- TextDrawSetProportional(ClassClick, 1);
- ClassSpawn = TextDrawCreate(282.000000, 382.000000, "LSHIFT to spawn");
- TextDrawBackgroundColor(ClassSpawn, 255);
- TextDrawFont(ClassSpawn, 1);
- TextDrawLetterSize(ClassSpawn, 0.270000, 1.299999);
- TextDrawColor(ClassSpawn, -1);
- TextDrawSetOutline(ClassSpawn, 1);
- TextDrawSetProportional(ClassSpawn, 1);
- //====================================================
- RankStars = TextDrawCreate(499.000000, 122.000000, "Your rank");
- TextDrawBackgroundColor(RankStars, 255);
- TextDrawFont(RankStars, 2);
- TextDrawLetterSize(RankStars, 0.480000, 1.100000);
- TextDrawColor(RankStars, -1);
- TextDrawSetOutline(RankStars, 1);
- TextDrawSetProportional(RankStars, 1);
- //====================================================
- //====================================================
- /* ___________ ___ _____ _____ _____ _____
- | _ | ___ \ |_ | ___/ __ \_ _/ ___|
- | | | | |_/ / | | |__ | / \/ | | \ `--.
- | | | | ___ \ | | __|| | | | `--. \
- \ \_/ / |_/ /\__/ / |___| \__/\ | | /\__/ /
- \___/\____/\____/\____/ \____/ \_/ \____/
- */
- //=====================================================
- // Area 51 (mapping, vehicles, gangzone)
- gang_a51 = GangZoneCreate(391.089019,2082.039550,96.008270,1798.399902);
- AddStaticVehicleEx(447,225.09960938,1883.09960938,17.70000076,0.00000000,-1,-1,90); //Seasparrow
- AddStaticVehicleEx(447,203.00000000,1883.09997559,17.70000076,0.00000000,-1,-1,90); //Seasparrow
- AddStaticVehicleEx(476,280.60000610,1955.80004883,18.79999924,270.00000000,-1,-1,90); //Rustler
- AddStaticVehicleEx(476,280.60000610,1989.59997559,18.79999924,270.00000000,-1,-1,90); //Rustler
- AddStaticVehicleEx(520,280.60000610,2023.69995117,18.29999924,270.00000000,-1,-1,90); //Hydra
- AddStaticVehicleEx(476,312.00000000,2053.79980469,18.79999924,177.99499512,-1,-1,90); //Rustler
- AddStaticVehicleEx(470,172.09960938,1932.09960938,18.39999962,180.00000000,36,1,90); //Patriot
- AddStaticVehicleEx(470,179.80000305,1932.09997559,17.89999962,180.00000000,36,1,90); //Patriot
- AddStaticVehicleEx(425,213.30000305,1970.00000000,19.10000038,90.00000000,-1,-1,90); //Hunter
- AddStaticVehicleEx(599,284.50000000,1937.09997559,18.00000000,270.00000000,-1,1,90); //Police Ranger
- AddStaticVehicleEx(487,325.09960938,1905.39941406,17.79999924,0.00000000,-1,-1,90); //Maverick
- AddStaticVehicleEx(487,325.50000000,1865.19995117,17.79999924,0.00000000,-1,-1,90); //Maverick
- AddStaticVehicleEx(500,293.00000000,1904.80004883,17.89999962,0.00000000,-1,-1,90); //Mesa
- AddStaticVehicleEx(521,220.50000000,1920.79980469,17.29999924,180.00000000,-1,-1,90); //FCR-900
- AddStaticVehicleEx(521,202.09960938,1920.89941406,17.30143547,177.74780273,-1,-1,90); //FCR-900
- AddStaticVehicleEx(432,122.00000000,1900.59997559,18.70000076,0.00000000,-1,-1,90); //Rhino
- AddStaticVehicleEx(470,290.89999390,1831.19995117,17.79999924,0.00000000,-1,-1,90); //Patriot
- AddStaticVehicleEx(497,183.00000000,1834.50000000,23.50000000,270.00000000,-1,-1,90); //Police Maverick
- AddStaticVehicleEx(470,154.60000610,1932.09960938,18.89999962,180.00000000,36,1,90); //Patriot
- AddStaticVehicleEx(543,207.50000000,1862.80004883,13.10000038,0.00000000,-1,-1,90); //Sadler
- AddStaticVehicleEx(475,203.00000000,1862.80004883,13.00000000,0.00000000,-1,-1,90); //Sabre
- AddStaticVehicleEx(482,205.39999390,1872.80004883,13.19999981,269.25000000,-1,-1,90); //Burrito
- AddStaticVehicleEx(427,133.69999695,1855.80004883,17.89999962,138.00000000,-1,-1,90); //Enforcer
- AddStaticVehicleEx(427,133.80000305,1841.80004883,17.89999962,135.99926758,-1,-1,90); //Enforcer
- CreateDynamicObject(2929,233.50000000,1822.80004883,8.19999981,0.00000000,0.00000000,90.50000000); //object(a51_blastdoorl) (1)
- CreateDynamicObject(3399,278.50000000,1913.69995117,19.10000038,0.00000000,0.00000000,329.49645996); //object(cxrf_a51_stairs) (2)
- CreateDynamicObject(3399,279.50000000,1915.40002441,19.10000038,0.00000000,0.00000000,329.49645996); //object(cxrf_a51_stairs) (3)
- CreateDynamicObject(3399,284.29998779,1842.00000000,19.10000038,0.00000000,0.00000000,269.49462891); //object(cxrf_a51_stairs) (4)
- CreateDynamicObject(3399,286.29998779,1842.00000000,19.10000038,0.00000000,0.00000000,269.49462891); //object(cxrf_a51_stairs) (5)
- CreateDynamicObject(4726,213.30000305,1966.80004883,16.00000000,0.00000000,0.00000000,0.00000000); //object(libtwrhelipd_lan2) (1)
- CreateDynamicObject(3279,194.10000610,2037.50000000,16.60000038,0.00000000,0.00000000,0.00000000); //object(a51_spottower) (1)
- CreateDynamicObject(3279,382.00000000,2074.50000000,16.60000038,0.00000000,0.00000000,270.00000000); //object(a51_spottower) (2)
- CreateDynamicObject(3279,383.50000000,1894.69995117,16.60000038,0.00000000,0.00000000,270.50000000); //object(a51_spottower) (3)
- CreateDynamicObject(2985,190.89999390,1925.50000000,22.20000076,0.00000000,0.00000000,220.00000000); //object(minigun_base) (1)
- CreateDynamicObject(2985,222.80000305,1925.50000000,22.20000076,0.00000000,0.00000000,315.00000000); //object(minigun_base) (2)
- CreateDynamicObject(2985,207.09960938,1925.50000000,22.20000076,0.00000000,0.00000000,270.00000000); //object(minigun_base) (3)
- CreateDynamicObject(3928,325.50000000,1866.69995117,16.70000076,0.00000000,0.00000000,270.00000000); //object(helipad) (2)
- CreateDynamicObject(3928,325.10000610,1906.90002441,16.70000076,0.00000000,0.00000000,90.00000000); //object(helipad) (3)
- CreateDynamicObject(3055,266.39999390,1875.40002441,9.80000019,0.00000000,0.00000000,0.00000000); //object(kmb_shutter) (1)
- CreateDynamicObject(3055,270.10000610,1884.09997559,16.29999924,90.00000000,0.00000000,90.00000000); //object(kmb_shutter) (2)
- CreateDynamicObject(3055,266.70001221,1884.09997559,16.29999924,90.00000000,0.00000000,90.00000000); //object(kmb_shutter) (3)
- CreateDynamicObject(3052,191.50000000,1926.00000000,22.39999962,0.00000000,0.00000000,310.00000000); //object(db_ammo) (1)
- CreateDynamicObject(3052,222.30000305,1926.09997559,22.39999962,0.00000000,0.00000000,42.00000000); //object(db_ammo) (2)
- CreateDynamicObject(3052,207.10000610,1926.19995117,22.39999962,0.00000000,0.00000000,0.00000000); //object(db_ammo) (3)
- CreateDynamicObject(3399,188.10000610,1932.50000000,19.10000038,0.00000000,0.00000000,91.49645996); //object(cxrf_a51_stairs) (2)
- CreateDynamicObject(10397,206.30000305,1883.09997559,21.50000000,0.00000000,0.00000000,1.99951172); //object(hc_stadlight1_sfs) (1)
- CreateDynamicObject(3386,226.00000000,1862.50000000,12.10000038,0.00000000,0.00000000,0.00000000); //object(a51_srack2_) (1)
- CreateDynamicObject(3387,226.00000000,1861.50000000,12.10000038,0.00000000,0.00000000,0.00000000); //object(a51_srack3_) (1)
- CreateDynamicObject(3388,226.00000000,1860.50000000,12.10000038,0.00000000,0.00000000,0.00000000); //object(a51_srack4_) (1)
- CreateDynamicObject(3389,225.89999390,1857.90002441,12.10000038,0.00000000,0.00000000,0.00000000); //object(a51_srack1_) (1)
- CreateDynamicObject(3390,223.89999390,1854.69995117,11.80000019,0.00000000,0.00000000,307.50000000); //object(a51_sdsk_ncol1_) (1)
- CreateDynamicObject(3391,219.60000610,1853.50000000,11.80000019,0.00000000,0.00000000,270.50000000); //object(a51_sdsk_ncol2_) (1)
- CreateDynamicObject(3788,216.10000610,1856.00000000,12.39999962,0.00000000,0.00000000,36.00000000); //object(missile_03_sfxr) (1)
- CreateDynamicObject(3790,216.19999695,1856.09997559,12.60000038,0.00000000,0.00000000,215.25000000); //object(missile_01_sfxr) (1)
- CreateDynamicObject(3794,213.80000305,1853.59997559,12.39999962,0.00000000,5.00000000,320.00000000); //object(missile_07_sfxr) (1)
- CreateDynamicObject(3795,212.10000610,1856.80004883,12.39999962,0.00000000,0.00000000,0.00000000); //object(missile_04_sfxr) (1)
- CreateDynamicObject(2977,211.39999390,1860.00000000,12.10000038,0.00000000,0.00000000,0.00000000); //object(kmilitary_crate) (1)
- CreateDynamicObject(2977,211.39999390,1861.50000000,12.10000038,0.00000000,0.00000000,0.00000000); //object(kmilitary_crate) (2)
- CreateDynamicObject(2977,211.39999390,1863.09997559,12.10000038,0.00000000,0.00000000,0.00000000); //object(kmilitary_crate) (3)
- CreateDynamicObject(2977,211.39999390,1862.30004883,13.10000038,0.00000000,0.00000000,90.00000000); //object(kmilitary_crate) (4)
- CreateDynamicObject(2977,211.39999390,1860.80004883,13.10000038,0.00000000,0.00000000,90.00000000); //object(kmilitary_crate) (5)
- CreateDynamicObject(3577,222.50000000,1869.19995117,12.89999962,0.00000000,0.00000000,90.00000000); //object(dockcrates1_la) (1)
- CreateDynamicObject(7040,258.70001221,1835.50000000,20.10000038,0.00000000,0.00000000,0.00000000); //object(vgnplcehldbox01) (1)
- CreateDynamicObject(12912,171.10000610,1880.30004883,29.20000076,0.00000000,0.00000000,0.00000000); //object(sw_silo04) (1)
- // Old Airport in the desert (mapping, vehicles, gangzone)
- gang_airport = GangZoneCreate(264, 2418, 480, 2568);
- AddStaticVehicleEx(432,415.5202,2455.9368,16.5142,0.6440,43,0,90);//Rhino
- AddStaticVehicleEx(432,393.6799,2455.9368,16.5141,2.2203,43,0,90);//Rhino
- AddStaticVehicleEx(425,365.29980469,2536.89941406,17.50000000,179.99975586,-1,-1,90); //Hunter
- AddStaticVehicleEx(476,290.29998779,2541.00000000,18.00000000,180.00000000,-1,-1,90); //Rustler
- AddStaticVehicleEx(476,324.39999390,2541.00000000,18.00000000,180.00000000,-1,-1,90); //Rustler
- AddStaticVehicleEx(520,266.60000610,2541.00000000,17.70000076,180.00000000,-1,-1,90); //Hydra
- AddStaticVehicleEx(487,403.10000610,2466.60009766,29.79999924,0.00000000,-1,-1,90); //Maverick
- AddStaticVehicleEx(447,403.10000610,2446.10009766,29.60000038,0.00000000,-1,-1,90); //Seasparrow
- AddStaticVehicleEx(470,311.20001221,2535.39990234,16.89999962,180.00000000,-1,-1,90); //Patriot
- AddStaticVehicleEx(470,341.29998779,2541.00000000,16.89999962,180.00000000,-1,-1,90); //Patriot
- AddStaticVehicleEx(433,389.50000000,2541.00000000,16.89999962,180.00000000,-1,-1,90); //Barracks
- AddStaticVehicleEx(500,426.79998779,2478.60009766,16.70000076,90.00000000,-1,-1,90); //Mesa
- AddStaticVehicleEx(470,432.50000000,2491.00000000,16.60000038,90.00000000,-1,-1,90); //Patriot
- AddStaticVehicleEx(470,432.50000000,2502.19995117,16.60000038,90.00000000,-1,-1,90); //Patriot
- AddStaticVehicleEx(470,432.50000000,2514.19995117,16.60000038,90.00000000,-1,-1,90); //Patriot
- CreateDynamicObject(987,263.10000610,2556.60009766,15.39999962,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (2)
- CreateDynamicObject(987,275.10000610,2556.60009766,15.39999962,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (3)
- CreateDynamicObject(987,287.10000610,2556.60009766,15.39999962,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (4)
- CreateDynamicObject(987,299.20001221,2556.50000000,15.39999962,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (5)
- CreateDynamicObject(987,311.20001221,2556.50000000,15.39999962,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (6)
- CreateDynamicObject(987,323.20001221,2556.50000000,15.39999962,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (7)
- CreateDynamicObject(987,335.20001221,2556.50000000,15.39999962,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (8)
- CreateDynamicObject(987,347.19921875,2556.50000000,15.39999962,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (9)
- CreateDynamicObject(987,359.19921875,2556.50000000,15.39999962,0.00000000,0.00000000,180.00000000); //object(elecfence_bar) (10)
- CreateDynamicObject(987,371.19921875,2556.50000000,15.39999962,0.00000000,0.00000000,180.00000000); //object(elecfence_bar) (11)
- CreateDynamicObject(987,383.19921875,2556.50000000,15.39999962,0.00000000,0.00000000,180.00000000); //object(elecfence_bar) (12)
- CreateDynamicObject(987,395.19921875,2556.50000000,15.39999962,0.00000000,0.00000000,180.00000000); //object(elecfence_bar) (13)
- CreateDynamicObject(987,407.19921875,2556.50000000,15.39999962,0.00000000,0.00000000,180.00000000); //object(elecfence_bar) (14)
- CreateDynamicObject(987,419.19921875,2556.50000000,15.39999962,0.00000000,0.00000000,180.00000000); //object(elecfence_bar) (15)
- CreateDynamicObject(987,431.19921875,2556.50000000,15.39999962,0.00000000,0.00000000,180.00000000); //object(elecfence_bar) (16)
- CreateDynamicObject(987,443.19921875,2556.50000000,15.39999962,0.00000000,0.00000000,180.00000000); //object(elecfence_bar) (18)
- CreateDynamicObject(987,455.19921875,2556.50000000,15.39999962,0.00000000,0.00000000,180.00000000); //object(elecfence_bar) (19)
- CreateDynamicObject(12805,449.39999390,2495.50000000,27.39999962,0.00000000,0.00000000,90.00000000); //object(ce_bigshed1) (2)
- CreateDynamicObject(3055,433.60000610,2451.00000000,17.60000038,0.00000000,0.00000000,0.00000000); //object(kmb_shutter) (1)
- CreateDynamicObject(3055,433.50000000,2451.00000000,21.29999924,0.00000000,0.00000000,0.25000000); //object(kmb_shutter) (2)
- CreateDynamicObject(987,366.20001221,2433.89990234,15.39999962,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (21)
- CreateDynamicObject(987,354.19921875,2433.89941406,15.39999962,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (22)
- CreateDynamicObject(987,342.19921875,2433.89941406,15.39999962,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (23)
- CreateDynamicObject(987,330.19921875,2433.89941406,15.39999962,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (24)
- CreateDynamicObject(987,318.19921875,2433.89941406,15.39999962,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (25)
- CreateDynamicObject(987,306.19921875,2434.00000000,15.39999962,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (26)
- CreateDynamicObject(987,294.19921875,2434.00000000,15.39999962,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (27)
- CreateDynamicObject(987,250.89999390,2544.39990234,15.39999962,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (29)
- CreateDynamicObject(3749,250.89999390,2498.69995117,20.00000000,0.00000000,0.00000000,90.00000000); //object(clubgate01_lax) (2)
- CreateDynamicObject(987,251.00000000,2488.80004883,15.39999962,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (31)
- CreateDynamicObject(987,467.20001221,2556.50000000,15.39999962,0.00000000,0.00000000,179.99450684); //object(elecfence_bar) (19)
- CreateDynamicObject(987,250.89941406,2556.39941406,15.39999962,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (29)
- CreateDynamicObject(987,250.89999390,2532.39990234,15.39999962,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (29)
- CreateDynamicObject(987,250.89999390,2520.39990234,15.39999962,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (29)
- CreateDynamicObject(987,251.00000000,2476.80004883,15.39999962,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (31)
- CreateDynamicObject(987,251.00000000,2464.80004883,15.39999962,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (31)
- CreateDynamicObject(987,251.00000000,2452.80004883,15.39999962,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (31)
- CreateDynamicObject(987,251.00000000,2443.80004883,15.39999962,0.00000000,0.00000000,270.00000000); //object(elecfence_bar) (31)
- CreateDynamicObject(3749,276.09960938,2434.09960938,21.29999924,0.00000000,0.00000000,0.00000000); //object(clubgate01_lax) (1)
- CreateDynamicObject(3749,260.29998779,2434.10009766,21.29999924,0.00000000,0.00000000,0.00000000); //object(clubgate01_lax) (1)
- CreateDynamicObject(987,282.20001221,2434.00000000,15.39999962,0.00000000,0.00000000,0.00000000); //object(elecfence_bar) (27)
- CreateDynamicObject(14877,376.70001221,2471.19995117,17.60000038,0.00000000,0.00000000,270.00000000); //object(michelle-stairs) (1)
- CreateDynamicObject(14877,376.70001221,2461.30004883,21.50000000,0.00000000,0.00000000,270.00000000); //object(michelle-stairs) (2)
- CreateDynamicObject(3279,308.50000000,2549.50000000,15.80000019,0.00000000,0.00000000,270.00000000); //object(a51_spottower) (1)
- CreateDynamicObject(3457,332.39999390,2455.30004883,18.60000038,0.00000000,0.00000000,0.00000000); //object(vgnhseblk2) (1)
- CreateDynamicObject(3279,296.20001221,2437.30004883,15.50000000,0.00000000,0.00000000,179.99450684); //object(a51_spottower) (2)
- CreateDynamicObject(8537,292.89999390,2473.30004883,22.70000076,0.00000000,0.00000000,0.00000000); //object(tikisign02_lvs) (1)
- CreateDynamicObject(1443,374.50000000,2475.39990234,16.10000038,0.00000000,0.00000000,0.00000000); //object(dyn_street_sign_1) (1)
- CreateDynamicObject(2580,377.89999390,2468.10009766,21.79999924,0.00000000,0.00000000,266.00000000); //object(sex_1) (1)
- CreateDynamicObject(2583,376.39999390,2456.60009766,24.50000000,0.00000000,0.00000000,180.00000000); //object(cj_sex_video_2) (1)
- CreateDynamicObject(2579,377.70001221,2456.60009766,24.50000000,0.00000000,0.00000000,180.00000000); //object(cj_sex_shelf_2) (1)
- CreateDynamicObject(2580,378.10000610,2473.89990234,19.29999924,0.00000000,0.00000000,272.00000000); //object(sex_1) (2)
- CreateDynamicObject(16781,363.20001221,2482.19995117,15.50000000,0.00000000,0.00000000,180.00000000); //object(cn2_ringking) (1)
- CreateDynamicObject(3249,260.10000610,2514.00000000,15.60000038,0.00000000,0.00000000,90.00000000); //object(des_westsaloon_) (1)
- CreateDynamicObject(1308,251.30000305,2556.60009766,15.60000038,0.00000000,0.00000000,0.00000000); //object(telgrphpole02) (1)
- // Fort Carson (vehicles, gangzone)
- gang_fortcarson = GangZoneCreate(-282,1086,-48,1230);
- AddStaticVehicleEx(425,-83.19999695,1124.40002441,20.60000038,0.00000000,-1,-1,90); //Hunter
- AddStaticVehicleEx(470,-140.89999390,1085.00000000,19.89999962,0.00000000,-1,-1,90); //Patriot
- AddStaticVehicleEx(470,-158.50000000,1085.00000000,19.89999962,0.00000000,-1,-1,90); //Patriot
- AddStaticVehicleEx(520,-220.10000610,1216.50000000,20.29999924,0.00000000,-1,-1,90); //Hydra
- AddStaticVehicleEx(447,-235.39941406,1085.00000000,19.79999924,0.00000000,-1,-1,90); //Seasparrow
- AddStaticVehicleEx(447,-248.50000000,1085.00000000,19.79999924,0.00000000,-1,-1,90); //Seasparrow
- AddStaticVehicleEx(432,-146.10000610,1179.50000000,18.70000076,0.00000000,-1,-1,90); //Rhino
- AddStaticVehicleEx(433,-160.19999695,1131.90002441,20.10000038,180.00000000,-1,-1,90); //Barracks
- AddStaticVehicleEx(490,-153.50000000,1217.09997559,20.10000038,0.00000000,-1,-1,90); //FBI Rancher
- AddStaticVehicleEx(487,-46.59999847,1171.40002441,19.79999924,90.00000000,-1,-1,90); //Maverick
- AddStaticVehicleEx(470,-77.19999695,1222.09997559,19.89999962,0.00000000,-1,-1,90); //Patriot
- AddStaticVehicleEx(601,-30.20000076,1084.19995117,19.70000076,0.00000000,-1,-1,90); //S.W.A.T. Van
- AddStaticVehicleEx(522,-177.30000305,1010.59997559,19.39999962,0.00000000,-1,-1,90); //NRG-500
- AddStaticVehicleEx(521,-169.89999390,1010.59997559,19.39999962,0.00000000,-1,-1,90); //FCR-900
- AddStaticVehicleEx(476,-349.29998779,1198.50000000,20.89999962,270.00000000,-1,-1,90); //Rustler
- AddStaticVehicleEx(470,-46.20000076,1042.59997559,19.79999924,0.00000000,-1,-1,90); //Patriot
- AddStaticVehicleEx(490,-222.00000000,1069.59997559,20.10000038,0.00000000,-1,-1,90); //FBI Rancher
- AddStaticVehicleEx(500,-253.69999695,1183.30004883,20.00000000,90.00000000,-1,-1,90); //Mesa
- // Ghost town (vehicles, gangzone)
- gang_ghosttown = GangZoneCreate(-474,2196,-360,2286);
- AddStaticVehicleEx(425,-431.29998779,2205.50000000,43.29999924,2.00000000,-1,-1,90); //Hunter
- AddStaticVehicleEx(520,-411.29998779,2205.50000000,43.29999924,0.00000000,-1,-1,90); //Hydra
- AddStaticVehicleEx(470,-377.20001221,2251.39990234,42.59999847,106.00000000,-1,-1,90); //Patriot
- AddStaticVehicleEx(500,-392.50000000,2248.80004883,42.59999847,10.00000000,-1,-1,90); //Mesa
- AddStaticVehicleEx(432,-361.29998779,2199.69995117,42.59999847,100.00000000,-1,-1,90); //Rhino
- AddStaticVehicleEx(447,-431.50000000,2228.19995117,42.50000000,0.00000000,-1,-1,90); //Seasparrow
- AddStaticVehicleEx(522,-420.39999390,2225.89990234,42.00000000,0.00000000,-1,-1,90); //NRG-500
- AddStaticVehicleEx(470,-386.70001221,2198.80004883,42.50000000,280.00000000,-1,-1,90); //Patriot
- AddStaticVehicleEx(433,-355.00000000,2230.89990234,43.09999847,104.00000000,-1,-1,90); //Barracks
- AddStaticVehicleEx(522,-402.10000610,2259.80004883,42.00000000,0.00000000,-1,-1,90); //NRG-500
- AddStaticVehicleEx(528,-364.10000610,2262.80004883,42.70000076,4.00000000,-1,-1,90); //FBI Truck
- AddStaticVehicleEx(470,-409.00000000,2226.60009766,42.50000000,0.00000000,-1,-1,90); //Patriot
- AddStaticVehicleEx(468,-425.89999390,2242.69995117,42.20000076,0.00000000,-1,-1,90); //Sanchez
- // The Mighty Dam, some Dodos near the sea level
- AddStaticVehicleEx(593,-573.59997559,1981.00000000,23.50000000,118.00000000,-1,-1,90); //Dodo
- AddStaticVehicleEx(593,-584.20001221,1988.80004883,23.50000000,165.99554443,-1,-1,90); //Dodo
- //====================================================
- // TEAM CHECKPOINTS
- A51CP = CreateDynamicCP(183.7988,1927.1082,17.8443, 3.0, -1, -1, -1, 100.0);
- AIRCP = CreateDynamicCP(407.6558,2527.97850,16.5684, 3.0, -1, -1, -1, 100.0);
- DESCP = CreateDynamicCP(-413.7866,2230.3303,42.4258, 3.0, -1, -1, -1, 100.0);
- FOCCP = CreateDynamicCP(-148.4048,1136.2720,19.7422, 3.0, -1, -1, -1, 100.0);
- //====================================================
- // CAPTURABLE CHECKPOINTS && ZONES && AREAS
- BigEarZone = GangZoneCreate(-366, 1512, -270, 1578);
- BigEarArea = CreateDynamicRectangle(-366, 1512, -270, 1578, -1, -1, -1);
- BigEarCP = CreateDynamicCP(-308.9923,1537.8146,75.5625, 3.0, -1, -1, -1, 100.0);
- BigEarColor = C_GANG_WHITE;
- SnakeZone = GangZoneCreate(-66, 2322, 6, 2394);
- SnakeArea = CreateDynamicRectangle(-66, 2322, 6, 2394, -1, -1, -1);
- SnakeCP = CreateDynamicCP(-32.3534,2340.9919,24.1406, 3.0, -1, -1, -1, 100.0);
- SnakeColor = C_GANG_WHITE;
- TeeMotelZone = GangZoneCreate(-906, 2724, -810, 2778);
- TeeMotelArea = CreateDynamicRectangle(-906, 2724, -810, 2778, -1, -1, -1);
- TeeMotelCP = CreateDynamicCP(-847.6240,2743.1699,45.8315, 3.0, -1, -1, -1, 100.0);
- TeeMotelColor = C_GANG_WHITE;
- OilZone = GangZoneCreate(90, 1332, 288, 1494);
- OilArea = CreateDynamicRectangle(90, 1332, 288, 1494, -1, -1, -1);
- OilCP = CreateDynamicCP(254.6765,1411.3141,10.7075, 3.0, -1, -1, -1, 100.0);
- OilColor = C_GANG_WHITE;
- SeaZone = GangZoneCreate(228, 2892, 300, 2958);
- SeaArea = CreateDynamicRectangle(228, 2892, 300, 2958, -1, -1, -1);
- SeaCP = CreateDynamicCP(263.2417,2896.1741,10.4772, 3.0, -1, -1, -1, 100.0);
- SeaColor = C_GANG_WHITE;
- HillZone = GangZoneCreate(-846, 2364, -756, 2460);
- HillArea = CreateDynamicRectangle(-846, 2364, -756, 2460, -1, -1, -1);
- HillCP = CreateDynamicCP(-772.5001,2423.8455,157.0877, 3.0, -1, -1, -1, 100.0);
- HillColor = C_GANG_WHITE;
- DamZone = GangZoneCreate(-912, 1980, -540, 2100);
- DamArea = CreateDynamicRectangle(-912, 1980, -540, 2100, -1, -1, -1);
- DamCP = CreateDynamicCP(-895.0860,2002.6703,60.9141, 3.0, -1, -1, -1, 100.0);
- DamColor = C_GANG_WHITE;
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- IsPlayerChoosingTeam[playerid] = 1;
- SetPlayerPos(playerid, 219.4820,1822.7864,7.5271);
- SetPlayerCameraPos(playerid, 225.7349,1822.9067, 7.521);
- SetPlayerFacingAngle( playerid, 270);
- SetPlayerCameraLookAt(playerid, 219.4820,1822.7864,7.5271);
- switch (classid)
- {
- case 0:
- {
- gTeam[playerid] = T_ENGLAND;
- SetPlayerColor(playerid, C_DGREEN);
- GameTextForPlayer(playerid, "~g~England", 1000, 4);
- CreateExplosion(216.5553,1822.7733,7.4256, 11, 1.0);
- }
- case 1:
- {
- gTeam[playerid] = T_RUSSIA;
- SetPlayerColor(playerid, C_RED);
- GameTextForPlayer(playerid, "~r~Russia", 1000, 4);
- CreateExplosion(216.5553,1822.7733,7.4256, 11, 1.0);
- }
- case 2:
- {
- gTeam[playerid] = T_IRAQ;
- SetPlayerColor(playerid, C_PURPLE);
- GameTextForPlayer(playerid, "~p~Iraq", 1000, 4);
- CreateExplosion(216.5553,1822.7733,7.4256, 11, 1.0);
- }
- case 3:
- {
- gTeam[playerid] = T_MEXICO;
- SetPlayerColor(playerid, C_YELLOW);
- GameTextForPlayer(playerid, "~y~Mexico", 1000, 4);
- CreateExplosion(216.5553,1822.7733,7.4256, 11, 1.0);
- }
- }
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- new string[128];
- format(string, sizeof(string), "** {99FF00}[JOIN]{FFFFFF} %s has joined %s.", Name(playerid), SERVERNAME);
- SendClientMessageToAll(C_WHITE, string);
- //====================================================
- PlayerInfo[playerid][pRegistered] = 0;
- PlayerInfo[playerid][pLogged] = 0;
- PlayerInfo[playerid][pAdmin] = 0;
- PlayerInfo[playerid][pWarnings] = 0;
- PlayerInfo[playerid][pKills] = 0;
- PlayerInfo[playerid][pDeaths] = 0;
- PlayerInfo[playerid][pPoints] = 0;
- PlayerInfo[playerid][pCaptureZone] = 0;
- PlayerInfo[playerid][pMoney] = 0;
- PlayerInfo[playerid][pVIP] = 0;
- PlayerInfo[playerid][pMuted] = 0;
- PlayerInfo[playerid][pKillingspree] = 0;
- aDuty[playerid] = 0;
- AFK[playerid] = 0;
- LagShoot[playerid] = 1;
- JustJoined[playerid] = 1;
- RoundStats[playerid] = 1;
- IsPlayerChoosingTeam[playerid] = 1;
- IsPlayerChoosingClass[playerid] = 1;
- ClassChoosingStep[playerid] = 0;
- ClassPositionSet[playerid] = 0;
- HackTest[playerid] = 0;
- CanCaptureZone[playerid] = 1;
- TogglePM[playerid] = 1;
- CanHeal[playerid] = 1;
- DonorFix[playerid] = 1;
- //====================================================
- format(string, sizeof(string), "SELECT IP FROM `accounts` WHERE user = '%s' LIMIT 1", Name(playerid));
- mysql_query(string);
- mysql_store_result();
- new rows = mysql_num_rows();
- if(rows == 0)
- {
- format(string, sizeof(string), "{FFFFFF}Hello {00AAFF}%s{FFFFFF}! This username isn't registered.\n\
- Please type your new password here:", Name(playerid));
- ShowPlayerDialog(playerid, D_REGISTER, DIALOG_STYLE_PASSWORD, "Register", string, "Register", "Kick");
- }
- else if(rows == 1)
- {
- format(string, sizeof(string), "{FFFFFF}Hello {00AAFF}%s{FFFFFF}! This username is registered.\n\
- Please type your password here:", Name(playerid));
- ShowPlayerDialog(playerid, D_LOGIN, DIALOG_STYLE_PASSWORD, "Login", string, "Login", "Kick");
- }
- mysql_free_result();
- //====================================================
- GangZoneShowForPlayer(playerid, gang_a51, C_GANG_GREEN );
- GangZoneShowForPlayer(playerid, gang_airport, C_GANG_PURPLE);
- GangZoneShowForPlayer(playerid, gang_fortcarson, C_GANG_RED);
- GangZoneShowForPlayer(playerid, gang_ghosttown, C_GANG_YELLOW);
- GangZoneShowForPlayer(playerid, BigEarZone, BigEarColor);
- GangZoneShowForPlayer(playerid, SnakeZone, SnakeColor);
- GangZoneShowForPlayer(playerid, TeeMotelZone, TeeMotelColor);
- GangZoneShowForPlayer(playerid, OilZone, OilColor);
- GangZoneShowForPlayer(playerid, SeaZone, SeaColor);
- GangZoneShowForPlayer(playerid, HillZone, HillColor);
- GangZoneShowForPlayer(playerid, DamZone, DamColor);
- //====================================================
- Textkills[playerid] = TextDrawCreate(576.000000, 376.000000, "0");
- TextDrawBackgroundColor(Textkills[playerid], 255);
- TextDrawFont(Textkills[playerid], 1);
- TextDrawLetterSize(Textkills[playerid], 0.410000, 1.100000);
- TextDrawColor(Textkills[playerid], 369033386);
- TextDrawSetShadow(Textkills[playerid], 1);
- Textdeaths[playerid] = TextDrawCreate(576.000000, 388.000000, "0");
- TextDrawBackgroundColor(Textdeaths[playerid], 255);
- TextDrawFont(Textdeaths[playerid], 1);
- TextDrawLetterSize(Textdeaths[playerid], 0.410000, 1.100000);
- TextDrawColor(Textdeaths[playerid], -16777046);
- TextDrawSetShadow(Textdeaths[playerid], 1);
- Textratio[playerid] = TextDrawCreate(576.000000, 400.000000, "0");
- TextDrawBackgroundColor(Textratio[playerid], 255);
- TextDrawFont(Textratio[playerid], 1);
- TextDrawLetterSize(Textratio[playerid], 0.410000, 1.100000);
- TextDrawColor(Textratio[playerid], -673310977);
- TextDrawSetShadow(Textratio[playerid], 1);
- Textpoints[playerid] = TextDrawCreate(576.000000, 412.000000, "0");
- TextDrawBackgroundColor(Textpoints[playerid], 255);
- TextDrawFont(Textpoints[playerid], 1);
- TextDrawLetterSize(Textpoints[playerid], 0.410000, 1.100000);
- TextDrawColor(Textpoints[playerid], -1347440726);
- TextDrawSetShadow(Textpoints[playerid], 1);
- // Old Airport in the desert (removes planes and some objects)
- RemoveBuildingForPlayer(playerid, 3368, 323.0078, 2411.3828, 15.4766, 0.25);
- RemoveBuildingForPlayer(playerid, 3369, 349.8750, 2438.2500, 15.4766, 0.25);
- RemoveBuildingForPlayer(playerid, 3369, 269.2656, 2411.3828, 15.4766, 0.25);
- RemoveBuildingForPlayer(playerid, 3369, 242.3984, 2438.2500, 15.4766, 0.25);
- RemoveBuildingForPlayer(playerid, 3367, 296.1406, 2438.2500, 15.4766, 0.25);
- RemoveBuildingForPlayer(playerid, 3269, 242.3984, 2438.2500, 15.4766, 0.25);
- RemoveBuildingForPlayer(playerid, 3269, 269.2656, 2411.3828, 15.4766, 0.25);
- RemoveBuildingForPlayer(playerid, 3271, 296.1406, 2438.2500, 15.4766, 0.25);
- RemoveBuildingForPlayer(playerid, 3270, 323.0078, 2411.3828, 15.4766, 0.25);
- RemoveBuildingForPlayer(playerid, 16101, 321.6719, 2463.4922, 15.4766, 0.25);
- RemoveBuildingForPlayer(playerid, 16368, 321.6719, 2463.4922, 25.6641, 0.25);
- RemoveBuildingForPlayer(playerid, 3269, 349.8750, 2438.2500, 15.4766, 0.25);
- // Gets rid of all the vending machines (needed for anti-health hack to work)
- RemoveBuildingForPlayer(playerid, 1302, 0.0, 0.0, 0.0, 6000.0);
- RemoveBuildingForPlayer(playerid, 1209, 0.0, 0.0, 0.0, 6000.0);
- RemoveBuildingForPlayer(playerid, 955, 0.0, 0.0, 0.0, 6000.0);
- RemoveBuildingForPlayer(playerid, 956, 0.0, 0.0, 0.0, 6000.0);
- RemoveBuildingForPlayer(playerid, 1775, 0.0, 0.0, 0.0, 6000.0);
- RemoveBuildingForPlayer(playerid, 1776, 0.0, 0.0, 0.0, 6000.0);
- RemoveBuildingForPlayer(playerid, 1977, 0.0, 0.0, 0.0, 6000.0);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new string[64];
- switch(reason)
- {
- case 0: format(string, sizeof string, "%s has left the server. (Timed out)", Name(playerid));
- case 1: format(string, sizeof string, "%s has left the server. (Leaving)", Name(playerid));
- case 2: format(string, sizeof string, "%s has left the server. (Kicked/Banned)", Name(playerid));
- }
- SendClientMessageToAll(C_GREY, string);
- if(PlayerInfo[playerid][pLogged] == 1)
- {
- SaveStats(playerid);
- PlayerInfo[playerid][pLogged] = 0;
- //=====================================================
- TextDrawHideForPlayer(playerid, Textdraw0);
- TextDrawHideForPlayer(playerid, Textdraw1);
- TextDrawHideForPlayer(playerid, Textdraw2);
- TextDrawHideForPlayer(playerid, Textdraw3);
- TextDrawHideForPlayer(playerid, Textdraw4);
- //=====================================================
- TextDrawDestroy(Textkills[playerid]);
- TextDrawDestroy(Textdeaths[playerid]);
- TextDrawDestroy(Textpoints[playerid]);
- TextDrawDestroy(Textratio[playerid]);
- }
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- if(IsPlayerChoosingClass[playerid] == 0)
- {
- SetPlayerHealth(playerid, 99);
- GiveClassWeapons(playerid);
- IsPlayerChoosingTeam[playerid] = 0;
- if(JustJoined[playerid] == 0)
- {
- ShowRoundStats(playerid);
- }
- if(JustJoined[playerid] == 1)
- {
- JustJoined[playerid] = 0;
- }
- SetTimerEx("Spawned", 6000, false, "i", playerid);
- UpdatePlayerTeam(playerid);
- TextDrawShowForPlayer(playerid, Textdraw0);
- TextDrawShowForPlayer(playerid, Textdraw1);
- TextDrawShowForPlayer(playerid, Textdraw2);
- TextDrawShowForPlayer(playerid, Textdraw3);
- TextDrawShowForPlayer(playerid, Textdraw4);
- TextDrawShowForPlayer(playerid, Textdraw5);
- TextDrawShowForPlayer(playerid, ForumURL);
- TextDrawShowForPlayer(playerid, Textkills[playerid]);
- TextDrawShowForPlayer(playerid, Textdeaths[playerid]);
- TextDrawShowForPlayer(playerid, Textratio[playerid]);
- TextDrawShowForPlayer(playerid, Textpoints[playerid]);
- TextDrawShowForPlayer(playerid, RankStars);
- UpdateStatsTextdraw(playerid);
- //====================================================
- new text[128];
- SendClientMessage(playerid, C_DGREEN, "");
- format(text, sizeof(text), "Your rank is %s (%d) and you belong to team %s!", RankName(playerid), Rank(playerid), PlayerTeamName(playerid));
- SendClientMessage(playerid, C_WHITE, text);
- if(LagShoot[playerid] == 1) format(text, sizeof text, "Your "COLOR_DGREEN"Anti Lag Shoot System"COLOR_WHITE" is currently "COLOR_GREEN"ENABLED"COLOR_WHITE"!");
- else format(text, sizeof text, "Your "COLOR_DGREEN"Anti Lag Shoot System"COLOR_WHITE" is currently "COLOR_RED"DISABLED"COLOR_WHITE"!");
- SendClientMessage(playerid, C_WHITE, text);
- SendClientMessage(playerid, C_DGREEN, "");
- SetPlayerWantedLevel(playerid, Rank(playerid));
- //====================================================
- SendClientMessage(playerid, C_RED, "Anti-SK: You are protected for 5 seconds.");
- {
- SetPlayerHealth(playerid, 99999);
- SetTimerEx("Spawnkill", 1000*5, false, "i", playerid);
- }
- //====================================================
- if(PlayerInfo[playerid][pVIP] > 0)
- {
- new Float:armour, level;
- GetPlayerArmour(playerid, armour);
- level = PlayerInfo[playerid][pVIP];
- switch(level)
- {
- case 1:
- {
- SetPlayerArmour(playerid, 50.0);
- SendClientMessage(playerid, C_GREY, "** VIP armour added!");
- }
- case 2:
- {
- SetPlayerArmour(playerid, 99);
- SendClientMessage(playerid, C_GREY, "** VIP armour added!");
- }
- case 3:
- {
- SetPlayerArmour(playerid, 99);
- SendClientMessage(playerid, C_GREY, "** VIP armour added!");
- }
- }
- }
- SetRank3DText(playerid);
- }
- else
- {
- TogglePlayerControllable(playerid, 0);
- SetPlayerClass(playerid);
- }
- return 1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- HackTest[playerid] = 0;
- // == VICTIM ==
- new Float:XYZ[3], deathtext[64];
- GetPlayerPos(playerid, XYZ[0], XYZ[1], XYZ[2]);
- GameTextForPlayer(playerid, "~r~ You got owned!", 3000, 3);
- PlayerInfo[playerid][pDeaths] ++;
- PlayerInfo[playerid][pKillingspree] = 0;
- DonorHeal[playerid] = 1;
- UpdateStatsTextdraw(playerid);
- TextDrawHideForPlayer(playerid, RankStars);
- new rand = random(1000-500)+500;
- format(deathtext, sizeof(deathtext), "You died! Lost {FFFFFF}-$%d{FF0000} because of death.", rand);
- SendClientMessage(playerid, C_RED, deathtext);
- GivePlayerMoney(playerid, -rand);
- SendDeathMessage(killerid, playerid, reason);
- if(killerid != INVALID_PLAYER_ID)
- {
- TogglePlayerSpectating(playerid, 1);
- if(IsPlayerInAnyVehicle(killerid))
- {
- new vehicleid = GetPlayerVehicleID(killerid);
- PlayerSpectateVehicle(playerid, vehicleid);
- }
- else
- {
- PlayerSpectatePlayer(playerid, killerid);
- }
- SetTimerEx("DeathCameraStop", 1000*6, false, "i", playerid);
- }
- //====================================================
- // == KILLER ==
- if(killerid != INVALID_PLAYER_ID)
- {
- SendClientMessage(killerid, C_VIOLET, "You killed a player. You earned $1500 and +3 score!");
- GameTextForPlayer(killerid, "~r~An enemy killed\n~g~+3 score and $1500", 3000, 3);
- SetPlayerScore(killerid, GetPlayerScore(killerid) +3);
- GivePlayerMoney(killerid, 1500);
- RoundInfo[killerid][Kills] ++;
- PlayerInfo[killerid][pKills] ++;
- PlayerInfo[killerid][pKillingspree] ++;
- UpdateStatsTextdraw(killerid);
- }
- // == KILLING SPREE ==
- new text[128];
- if(PlayerInfo[killerid][pKillingspree] == 3)
- {
- format(text, sizeof(text), "** %s is starting to OWN PEOPLE (3 killing spree)!", Name(killerid));
- SendClientMessageToAll(C_CYAN, text);
- SendClientMessage(killerid, C_LBLUE, "You get $1500 and +2 score! (killing spree bonus)");
- GivePlayerMoney(playerid, 1500);
- GivePlayerScore(playerid, 2);
- }
- else if(PlayerInfo[killerid][pKillingspree] == 5)
- {
- format(text, sizeof(text), "** %s is on a fucking rampage (5 killing spree)!", Name(killerid));
- SendClientMessageToAll(C_CYAN, text);
- SendClientMessage(killerid, C_LBLUE, "You get $2500 and +3 score! (killing spree bonus)");
- GivePlayerMoney(playerid, 2500);
- GivePlayerScore(playerid, 3);
- }
- else if(PlayerInfo[killerid][pKillingspree] == 10)
- {
- format(text, sizeof(text), "** %s has mastered the art of killing (10 killing spree)!", Name(killerid));
- SendClientMessageToAll(C_CYAN, text);
- SendClientMessage(killerid, C_LBLUE, "You get $5000 and +4 score! (killing spree bonus)");
- GivePlayerMoney(playerid, 5000);
- GivePlayerScore(playerid, 4);
- }
- else if(PlayerInfo[killerid][pKillingspree] == 15)
- {
- format(text, sizeof(text), "** %s can kill the whole world (15 killing spree)!", Name(killerid));
- SendClientMessageToAll(C_CYAN, text);
- SendClientMessage(killerid, C_LBLUE, "You get $7 500 and +6 score! (killing spree bonus)");
- GivePlayerMoney(playerid, 7500);
- GivePlayerScore(playerid, 6);
- }
- else if(PlayerInfo[killerid][pKillingspree] == 20)
- {
- format(text, sizeof(text), "** %s is the god of the universe (20 killing spree)!", Name(killerid));
- SendClientMessageToAll(C_CYAN, text);
- SendClientMessage(killerid, C_LBLUE, "You get $12 500 and +10 score! (killing spree bonus)");
- GivePlayerMoney(playerid, 12500);
- GivePlayerScore(playerid, 10);
- }
- else if(PlayerInfo[killerid][pKillingspree] == 25)
- {
- format(text, sizeof(text), "** %s - no words.. (25 killing spree)!", Name(killerid));
- SendClientMessageToAll(C_CYAN, text);
- SendClientMessage(killerid, C_LBLUE, "You get $20 000 and +15 score! (killing spree bonus)");
- GivePlayerMoney(playerid, 20000);
- GivePlayerScore(playerid, 15);
- }
- //====================================================
- return 1;
- }
- public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
- {
- RoundInfo[playerid][Damage] += amount;
- if(LagShoot[playerid] == 1)
- {
- if(aDuty[playerid] == 0)
- {
- if(damagedid != INVALID_PLAYER_ID)
- {
- if(gTeam[playerid] != gTeam[damagedid])
- {
- new Float:HEALTH;
- new Float:ARMOR;
- new Float:DAMAGE;
- GetPlayerArmour(damagedid, ARMOR);
- GetPlayerHealth(damagedid, HEALTH);
- if(ARMOR > 0)
- {
- if(amount > ARMOR)
- {
- DAMAGE = ARMOR-amount;
- SetPlayerArmour(damagedid, 0.0);
- SetPlayerHealth(damagedid, HEALTH-DAMAGE);
- return 1;
- }
- else
- {
- DAMAGE = ARMOR-amount;
- SetPlayerArmour(damagedid, DAMAGE);
- return 1;
- }
- }
- else
- {
- DAMAGE = HEALTH-amount;
- SetPlayerHealth(damagedid, DAMAGE);
- return 1;
- }
- }
- }
- }
- }
- else return 1;
- return 0;
- }
- public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
- {
- if(aDuty[playerid] == 1)
- {
- return 0;
- }
- if(AFK[playerid] == 1)
- {
- return 0;
- }
- else return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- if(PlayerInfo[playerid][pMuted] == 0)
- {
- if(text[0] == '@' && PlayerInfo[playerid][pAdmin] > 0)
- {
- new string[128];
- format(string,sizeof(string),"* aCHAT: %s: %s", Name(playerid), text[1]);
- SendAdminMessage(C_ORANGE, string);
- }
- else if(text[0] == '$' && PlayerInfo[playerid][pVIP] > 0)
- {
- new string[128];
- format(string,sizeof(string),"* dCHAT: %s: %s", Name(playerid), text[1]);
- SendDonorMessage(C_PINK, string);
- }
- else
- {
- new message[128];
- format(message, sizeof(message), "%s [%d]:{FFFFFF} %s", Name(playerid), playerid, text);
- SendClientMessageToAll(GetPlayerColor(playerid), message);
- }
- }
- else return SendClientMessage(playerid, C_RED, "Sorry, but you are muted!");
- return 0;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- return 1;
- }
- public OnPlayerCommandPerformed(playerid, cmdtext[], success)
- {
- if(!success) SendClientMessage(playerid, C_WHITE, "{FFFFFF}[{6B6B6B}ERROR{FFFFFF}] Unknown command, see /help for all commands.");
- return 1;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(newstate == PLAYER_STATE_DRIVER)
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- if(IsVehicleAirforce(vehicleid))
- {
- if(gClass[playerid] != AIRFORCE)
- {
- RemovePlayerFromVehicle(playerid);
- SendClientMessage(playerid, C_RED, "You need to be airforce class to drive this vehicle!");
- }
- }
- if(IsVehicleEngineer(vehicleid))
- {
- if(gClass[playerid] != ENGINEER)
- {
- RemovePlayerFromVehicle(playerid);
- SendClientMessage(playerid, C_RED, "You need to be engineer class to drive this vehicle!");
- }
- }
- if(GetPlayerWeapon(playerid) == 29)
- {
- SetPlayerArmedWeapon(playerid, 0);
- SendClientMessage(playerid, C_LGREEN, "You may not driver-drive-by with this weapon!");
- }
- }
- if(newstate == PLAYER_STATE_PASSENGER)
- {
- if(GetPlayerWeapon(playerid) == 24 || 27 || 26)
- {
- SetPlayerArmedWeapon(playerid, 0);
- SendClientMessage(playerid, C_LGREEN, "You may not drive-by with this weapon!");
- }
- }
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- return 1;
- }
- forward OnPlayerEnterDynamicCP(playerid, checkpointid);
- public OnPlayerEnterDynamicCP(playerid, checkpointid)
- {
- if(checkpointid == A51CP || checkpointid == AIRCP || checkpointid == DESCP || checkpointid == FOCCP)
- {
- ShowPlayerDialog(playerid, D_SHOP, DIALOG_STYLE_LIST, " .:: Reality shop ::.", "Health ($3000)\nArmor ($3500)\nKnife ($1000)\nChainsaw ($1500)\nDeagle ($2000)\nCombat Shotgun ($4000)\nMP5 ($2500)\nM4 ($4000)\nKatana ($1500)\nNightvision ($4000)", "Buy", "Cancel");
- }
- else if(checkpointid == BigEarCP || checkpointid == SnakeCP || checkpointid == TeeMotelCP || checkpointid == OilCP || checkpointid == SeaCP || checkpointid == HillCP || checkpointid == DamCP)
- {
- new string[128], pZone;
- if(GangInfo[checkpointid][gAttacked] == 1) return SendClientMessage(playerid, C_RED, "The zone is being captured!");
- if(GangInfo[checkpointid][gOwner] == gTeam[playerid]) return SendClientMessage(playerid, C_LBLUE, "Your team owns this zone.");
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, C_RED, "You cant capture while in a vehicle!");
- if(CanCaptureZone[playerid] == 0) return SendClientMessage(playerid, C_RED, "You can capture a zone every 10 seconds!");
- if(aDuty[playerid] == 1) return SendClientMessage(playerid, C_RED, "You cant capture when on duty!");
- GangInfo[checkpointid][gAttacked] = 1;
- pZone = PlayerArea(playerid);
- PlayerInfo[playerid][pCaptureZone] = 1;
- if(PlayerInfo[playerid][pVIP] == 1)
- {
- PlayerCount[playerid] = Donor1CaptureTime;
- }
- else if(PlayerInfo[playerid][pVIP] == 2)
- {
- PlayerCount[playerid] = Donor2CaptureTime;
- }
- else if(PlayerInfo[playerid][pVIP] == 3)
- {
- PlayerCount[playerid] = Donor3CaptureTime;
- }
- else
- {
- PlayerCount[playerid] = ZoneCaptureTime;
- }
- PlayerCountTimer[playerid] = SetTimerEx("GangCount", 1000, true, "iii", playerid, checkpointid, pZone);
- format(string, sizeof(string), "[ZONE] %s is being taken over!", ZoneName(checkpointid));
- CanCaptureZone[playerid] = 0;
- SetTimerEx("CanCapture", 1000*10, false, "i", playerid);
- SendClientMessageToAll(C_LGREEN, string);
- }
- return 1;
- }
- forward OnPlayerLeaveDynamicCP(playerid, checkpointid);
- public OnPlayerLeaveDynamicCP(playerid, checkpointid)
- {
- if(PlayerInfo[playerid][pCaptureZone] == 1)
- {
- if(GangInfo[checkpointid][gOwner] == gTeam[playerid]) return 0;
- new pZone;
- GangInfo[checkpointid][gAttacked] = 0;
- pZone = PlayerArea(playerid);
- GangZoneStopFlashForAll(pZone);
- SendClientMessage(playerid, C_RED, "You stopped capturing the zone!");
- KillTimer(PlayerCountTimer[playerid]);
- PlayerInfo[playerid][pCaptureZone] = 0;
- }
- return 1;
- }
- public OnPlayerLeaveCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerEnterRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnPlayerLeaveRaceCheckpoint(playerid)
- {
- return 1;
- }
- public OnRconCommand(cmd[])
- {
- return 1;
- }
- public OnPlayerRequestSpawn(playerid)
- {
- if(IsTeamFull(gTeam[playerid]))
- {
- SendClientMessage(playerid, C_GREY, "Team full! Please choose another one.");
- return 0;
- }
- else return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- return 1;
- }
- public OnVehicleMod(playerid, vehicleid, componentid)
- {
- return 1;
- }
- public OnVehiclePaintjob(playerid, vehicleid, paintjobid)
- {
- return 1;
- }
- public OnVehicleRespray(playerid, vehicleid, color1, color2)
- {
- return 1;
- }
- public OnPlayerSelectedMenuRow(playerid, row)
- {
- return 1;
- }
- public OnPlayerExitedMenu(playerid)
- {
- return 1;
- }
- public OnPlayerInteriorChange(playerid, newinteriorid, oldinteriorid)
- {
- return 1;
- }
- public OnPlayerKeyStateChange(playerid, newkeys, oldkeys)
- {
- if(PRESSED(KEY_FIRE)) // LMB
- {
- if(IsPlayerChoosingClass[playerid] == 1)
- {
- ClassChoosingStep[playerid] --;
- if(ClassChoosingStep[playerid] == -1)
- {
- ClassChoosingStep[playerid] = 5;
- }
- SetPlayerClass(playerid);
- }
- }
- if(PRESSED(KEY_HANDBRAKE)) // RMB
- {
- if(IsPlayerChoosingClass[playerid] == 1)
- {
- ClassChoosingStep[playerid] ++;
- if(ClassChoosingStep[playerid] == 6)
- {
- ClassChoosingStep[playerid] = 0;
- }
- SetPlayerClass(playerid);
- }
- }
- if(PRESSED(KEY_JUMP)) // LSHIFT
- {
- if(IsPlayerChoosingClass[playerid] == 1)
- {
- if(ClassChoosingStep[playerid] == 0) // ASSAULT
- {
- gClass[playerid] = ASSAULT;
- }
- if(ClassChoosingStep[playerid] == 1) // MEDIC
- {
- if(Rank(playerid) != 2) return SendClientMessage(playerid, C_WHITE, "Your rank is not high enough!");
- gClass[playerid] = MEDIC;
- }
- if(ClassChoosingStep[playerid] == 2) // ANTI-TANK
- {
- if(Rank(playerid) != 3) return SendClientMessage(playerid, C_WHITE, "Your rank is not high enough!");
- gClass[playerid] = ANTI-TANK;
- }
- if(ClassChoosingStep[playerid] == 3) // ENGINEER
- {
- if(Rank(playerid) != 4) return SendClientMessage(playerid, C_WHITE, "Your rank is not high enough!");
- gClass[playerid] = ENGINEER;
- }
- if(ClassChoosingStep[playerid] == 4) // AIRFORCE
- {
- if(Rank(playerid) != 5) return SendClientMessage(playerid, C_WHITE, "Your rank is not high enough!");
- gClass[playerid] = AIRFORCE;
- }
- if(ClassChoosingStep[playerid] == 5) // SPECICAL-OPS
- {
- if(Rank(playerid) != 6) return SendClientMessage(playerid, C_WHITE, "Your rank is not high enough!");
- gClass[playerid] = SPEC-OPS;
- }
- TextDrawHideForPlayer(playerid, ClassBox);
- TextDrawHideForPlayer(playerid, ClassNameLine);
- TextDrawHideForPlayer(playerid, ClassWeapons);
- TextDrawHideForPlayer(playerid, ClassDescription1);
- TextDrawHideForPlayer(playerid, ClassDescription2);
- TextDrawHideForPlayer(playerid, ClassRequiredRank);
- TextDrawHideForPlayer(playerid, ClassHelpBox);
- TextDrawHideForPlayer(playerid, ClassClick);
- TextDrawHideForPlayer(playerid, ClassSpawn);
- IsPlayerChoosingClass[playerid] = 0;
- TogglePlayerControllable(playerid, 1);
- SpawnPlayer(playerid);
- }
- }
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- return 1;
- }
- public OnPlayerStreamIn(playerid, forplayerid)
- {
- return 1;
- }
- public OnPlayerStreamOut(playerid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamIn(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnVehicleStreamOut(vehicleid, forplayerid)
- {
- return 1;
- }
- public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
- {
- switch(dialogid)
- {
- case D_REGISTER:
- {
- if(response)
- {
- if(strlen(inputtext) >= 1)
- {
- new pass[50];
- mysql_real_escape_string(inputtext, pass);
- Register(playerid, pass);
- }
- else
- {
- new string[128];
- format(string, sizeof(string), "{FFFFFF}Hello {00AAFF}%s{FFFFFF}! This username isn't registered.\nPlease type your new password here:", Name(playerid));
- ShowPlayerDialog(playerid, D_REGISTER, DIALOG_STYLE_PASSWORD, "Register", string, "Register", "Kick");
- }
- }
- if(!response)
- {
- return Kick(playerid);
- }
- }
- case D_LOGIN:
- {
- if(response)
- {
- new query[200], pass[50];
- mysql_real_escape_string(inputtext, pass);
- format(query, sizeof(query), "SELECT `user` FROM `accounts` WHERE user = '%s' AND password = md5('%s')", Name(playerid), pass);
- mysql_query(query);
- mysql_store_result();
- new rows = mysql_num_rows();
- if(rows == 1)
- {
- Login(playerid);
- }
- if(!rows)
- {
- new string[150];
- format(string, sizeof(string), "{FFFFFF}Hello {00AAFF}%s{FFFFFF}! This username is registered.\n{FF0000}Please type your correct password here:", Name(playerid));
- ShowPlayerDialog(playerid, D_LOGIN, DIALOG_STYLE_PASSWORD, "Login", string, "Login", "Kick");
- }
- mysql_free_result();
- }
- if(!response)
- {
- return Kick(playerid);
- }
- }
- case D_SHOP:
- {
- if(response)
- {
- if(listitem == 0)
- {
- if(GetPlayerMoney(playerid) >= 3000)
- {
- GivePlayerMoney(playerid, -3000);
- SetPlayerHealth(playerid, 99);
- SendClientMessage(playerid, C_LGREEN, "Health refilled! It cost $3000!");
- ShowPlayerDialog(playerid, D_SHOP, DIALOG_STYLE_LIST, " .:: Reality shop ::.", "Health ($3000)\nArmor ($3500)\nKnife ($1000)\nChainsaw ($1500)\nDeagle ($2000)\nCombat Shotgun ($4000)\nMP5 ($2500)\nM4 ($4000)\nKatana ($1500)\nNightvision ($4000)", "Buy", "Cancel");
- }
- else return SendClientMessage(playerid, C_RED, "Not enough money!");
- }
- if(listitem == 1)
- {
- if(GetPlayerMoney(playerid) >= 3000)
- {
- GivePlayerMoney(playerid, -3000);
- SetPlayerArmour(playerid, 99);
- SendClientMessage(playerid, C_LGREEN, "Armour refilled! It cost $3000!");
- ShowPlayerDialog(playerid, D_SHOP, DIALOG_STYLE_LIST, " .:: Reality shop ::.", "Health ($3000)\nArmor ($3500)\nKnife ($1000)\nChainsaw ($1500)\nDeagle ($2000)\nCombat Shotgun ($4000)\nMP5 ($2500)\nM4 ($4000)\nKatana ($1500)\nNightvision ($4000)", "Buy", "Cancel");
- }
- else return SendClientMessage(playerid, C_RED, "Not enough money!");
- }
- if(listitem == 2)
- {
- if(GetPlayerMoney(playerid) >= 1000)
- {
- GivePlayerMoney(playerid, -1000);
- GivePlayerWeapon(playerid, 4, 1);
- SendClientMessage(playerid, C_LGREEN, "You bought a knife! It cost $1000!");
- ShowPlayerDialog(playerid, D_SHOP, DIALOG_STYLE_LIST, " .:: Reality shop ::.", "Health ($3000)\nArmor ($3500)\nKnife ($1000)\nChainsaw ($1500)\nDeagle ($2000)\nCombat Shotgun ($4000)\nMP5 ($2500)\nM4 ($4000)\nKatana ($1500)\nNightvision ($4000)", "Buy", "Cancel");
- }
- else return SendClientMessage(playerid, C_RED, "Not enough money!");
- }
- if(listitem == 3)
- {
- if(GetPlayerMoney(playerid) >= 1500)
- {
- GivePlayerMoney(playerid, -1500);
- GivePlayerWeapon(playerid, 9, 1);
- SendClientMessage(playerid, C_LGREEN, "You bought a chainsaw! It cost $1500!");
- ShowPlayerDialog(playerid, D_SHOP, DIALOG_STYLE_LIST, " .:: Reality shop ::.", "Health ($3000)\nArmor ($3500)\nKnife ($1000)\nChainsaw ($1500)\nDeagle ($2000)\nCombat Shotgun ($4000)\nMP5 ($2500)\nM4 ($4000)\nKatana ($1500)\nNightvision ($4000)", "Buy", "Cancel");
- }
- else return SendClientMessage(playerid, C_RED, "Not enough money!");
- }
- if(listitem == 4)
- {
- if(GetPlayerMoney(playerid) >= 2000)
- {
- GivePlayerMoney(playerid, -2000);
- GivePlayerWeapon(playerid, 24, 50);
- SendClientMessage(playerid, C_LGREEN, "You bought a Deagle! It cost $2000!");
- ShowPlayerDialog(playerid, D_SHOP, DIALOG_STYLE_LIST, " .:: Reality shop ::.", "Health ($3000)\nArmor ($3500)\nKnife ($1000)\nChainsaw ($1500)\nDeagle ($2000)\nCombat Shotgun ($4000)\nMP5 ($2500)\nM4 ($4000)\nKatana ($1500)\nNightvision ($4000)", "Buy", "Cancel");
- }
- else return SendClientMessage(playerid, C_RED, "Not enough money!");
- }
- if(listitem == 5)
- {
- if(GetPlayerMoney(playerid) >= 4000)
- {
- GivePlayerMoney(playerid, -4000);
- GivePlayerWeapon(playerid, 27, 50);
- SendClientMessage(playerid, C_LGREEN, "You bought a Combat Shotgun! It cost $4000!");
- ShowPlayerDialog(playerid, D_SHOP, DIALOG_STYLE_LIST, " .:: Reality shop ::.", "Health ($3000)\nArmor ($3500)\nKnife ($1000)\nChainsaw ($1500)\nDeagle ($2000)\nCombat Shotgun ($4000)\nMP5 ($2500)\nM4 ($4000)\nKatana ($1500)\nNightvision ($4000)", "Buy", "Cancel");
- }
- else return SendClientMessage(playerid, C_RED, "Not enough money!");
- }
- if(listitem == 6)
- {
- if(GetPlayerMoney(playerid) >= 2500)
- {
- GivePlayerMoney(playerid, -2500);
- GivePlayerWeapon(playerid, 29, 50);
- SendClientMessage(playerid, C_LGREEN, "You bought a MP5! It cost $2500!");
- ShowPlayerDialog(playerid, D_SHOP, DIALOG_STYLE_LIST, " .:: Reality shop ::.", "Health ($3000)\nArmor ($3500)\nKnife ($1000)\nChainsaw ($1500)\nDeagle ($2000)\nCombat Shotgun ($4000)\nMP5 ($2500)\nM4 ($4000)\nKatana ($1500)\nNightvision ($4000)", "Buy", "Cancel");
- }
- else return SendClientMessage(playerid, C_RED, "Not enough money!");
- }
- if(listitem == 7)
- {
- if(GetPlayerMoney(playerid) >= 1500)
- {
- GivePlayerMoney(playerid, -4000);
- GivePlayerWeapon(playerid, 31, 50);
- SendClientMessage(playerid, C_LGREEN, "You bought a M4! It cost $4000!");
- ShowPlayerDialog(playerid, D_SHOP, DIALOG_STYLE_LIST, " .:: Reality shop ::.", "Health ($3000)\nArmor ($3500)\nKnife ($1000)\nChainsaw ($1500)\nDeagle ($2000)\nCombat Shotgun ($4000)\nMP5 ($2500)\nM4 ($4000)\nKatana ($1500)\nNightvision ($4000)", "Buy", "Cancel");
- }
- else return SendClientMessage(playerid, C_RED, "Not enough money!");
- }
- if(listitem == 8)
- {
- if(GetPlayerMoney(playerid) >= 1500)
- {
- GivePlayerMoney(playerid, -1500);
- GivePlayerWeapon(playerid, 8, 1);
- SendClientMessage(playerid, C_LGREEN, "You bought a Katana! It cost $1500!");
- ShowPlayerDialog(playerid, D_SHOP, DIALOG_STYLE_LIST, " .:: Reality shop ::.", "Health ($3000)\nArmor ($3500)\nKnife ($1000)\nChainsaw ($1500)\nDeagle ($2000)\nCombat Shotgun ($4000)\nMP5 ($2500)\nM4 ($4000)\nKatana ($1500)\nNightvision ($4000)", "Buy", "Cancel");
- }
- else return SendClientMessage(playerid, C_RED, "Not enough money!");
- }
- if(listitem == 9)
- {
- if(GetPlayerMoney(playerid) >= 4000)
- {
- GivePlayerMoney(playerid, -4000);
- GivePlayerWeapon(playerid, 44, 1);
- SendClientMessage(playerid, C_LGREEN, "You bought Nightvision! It cost $4000!");
- ShowPlayerDialog(playerid, D_SHOP, DIALOG_STYLE_LIST, " .:: Reality shop ::.", "Health ($3000)\nArmor ($3500)\nKnife ($1000)\nChainsaw ($1500)\nDeagle ($2000)\nCombat Shotgun ($4000)\nMP5 ($2500)\nM4 ($4000)\nKatana ($1500)\nNightvision ($4000)", "Buy", "Cancel");
- }
- else return SendClientMessage(playerid, C_RED, "Not enough money!");
- }
- }
- }
- case D_HELP:
- {
- if(response)
- {
- if(listitem == 0)
- {
- ShowDialogHelp(playerid, INFO);
- }
- else if(listitem == 1)
- {
- ShowDialogHelp(playerid, RULES);
- }
- else if(listitem == 2)
- {
- ShowDialogHelp(playerid, COMMANDS);
- }
- else if(listitem == 3)
- {
- ShowDialogHelp(playerid, RANKS);
- }
- else if(listitem == 4)
- {
- ShowDialogHelp(playerid, CLASS);
- }
- }
- }
- case D_INFO:
- {
- if(response)
- {
- ShowDialogHelp(playerid, RULES);
- }
- else return ShowPlayerDialog(playerid, D_HELP, DIALOG_STYLE_LIST, "Help about the server", "General Info - /info\nRules - /rules\nCommands - /commands\nRanks - /ranks\nClass info - /class", "Select", "Cancel");
- }
- case D_RULES:
- {
- if(response)
- {
- ShowDialogHelp(playerid, COMMANDS);
- }
- else return ShowPlayerDialog(playerid, D_HELP, DIALOG_STYLE_LIST, "Help about the server", "General Info - /info\nRules - /rules\nCommands - /commands\nRanks - /ranks\nClass info - /class", "Select", "Cancel");
- }
- case D_COMMANDS:
- {
- if(response)
- {
- ShowDialogHelp(playerid, RANKS);
- }
- else return ShowPlayerDialog(playerid, D_HELP, DIALOG_STYLE_LIST, "Help about the server", "General Info - /info\nRules - /rules\nCommands - /commands\nRanks - /ranks\nClass info - /class", "Select", "Cancel");
- }
- case D_RANKS:
- {
- if(response)
- {
- ShowDialogHelp(playerid, CLASS);
- }
- else return ShowPlayerDialog(playerid, D_HELP, DIALOG_STYLE_LIST, "Help about the server", "General Info - /info\nRules - /rules\nCommands - /commands\nRanks - /ranks\nClass info - /class", "Select", "Cancel");
- }
- case D_CLASSINFO:
- {
- if(response)
- {
- ShowDialogHelp(playerid, INFO);
- }
- else return ShowPlayerDialog(playerid, D_HELP, DIALOG_STYLE_LIST, "Help about the server", "General Info - /info\nRules - /rules\nCommands - /commands\nRanks - /ranks\nClass info - /class", "Select", "Cancel");
- }
- case D_RADIO:
- {
- if(response)
- {
- if(listitem == 0)
- {
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=21585");
- }
- if(listitem == 1)
- {
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1377200");
- }
- if(listitem == 2)
- {
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=1281016");
- }
- if(listitem == 3)
- {
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=728272");
- }
- if(listitem == 4)
- {
- PlayAudioStreamForPlayer(playerid, "http://212.95.32.219:8005");
- }
- if(listitem == 5)
- {
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=65456");
- }
- if(listitem == 6)
- {
- PlayAudioStreamForPlayer(playerid, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=27824");
- }
- }
- }
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- CMD:help(playerid, params[])
- {
- ShowPlayerDialog(playerid, D_HELP, DIALOG_STYLE_LIST, "Help about the server", "General Info - /info\nRules - /rules\nCommands - /commands\nRanks - /ranks\nClass info - /class", "Select", "Cancel");
- return 1;
- }
- CMD:info(playerid, params[])
- {
- ShowDialogHelp(playerid, INFO);
- return 1;
- }
- CMD:rules(playerid, params[])
- {
- ShowDialogHelp(playerid, RULES);
- return 1;
- }
- CMD:commands(playerid, params[])
- {
- ShowDialogHelp(playerid, COMMANDS);
- return 1;
- }
- CMD:ranks(playerid, params[])
- {
- ShowDialogHelp(playerid, RANKS);
- return 1;
- }
- CMD:class(playerid, params[])
- {
- ShowDialogHelp(playerid, CLASS);
- return 1;
- }
- CMD:pm(playerid, params[])
- {
- new targetid, string[128], message[128];
- if(sscanf(params, "us[128]", targetid, message)) return SendClientMessage(playerid, C_GREY, "USAGE: /pm [playerid] [message]");
- if(playerid == targetid) return SendClientMessage(playerid, C_RED, "You can't message yourself!");
- if(targetid == INVALID_PLAYER_ID || !IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_RED, "Player is not connected!");
- {
- if(TogglePM[targetid] == 0) return SendClientMessage(playerid, C_RED, "The player has disabled his PM's!");
- format(string, sizeof(string), "((PM from %s[%d]: %s ))", Name(playerid), playerid, message);
- SendClientMessage(targetid, C_YELLOW, string);
- format(string, sizeof(string), "((PM to %s[%d]: %s ))", Name(targetid), targetid, message);
- SendClientMessage(playerid, C_YELLOW, string);
- printf("PM: %s (%s -> %s)", message, Name(playerid), Name(targetid));
- }
- return 1;
- }
- CMD:togglepm(playerid, params[])
- {
- if(TogglePM[playerid] == 0)
- {
- SendClientMessage(playerid, C_ORANGE, "You have enabled your PM's!");
- TogglePM[playerid] = 1;
- }
- else if(TogglePM[playerid] == 1)
- {
- SendClientMessage(playerid, C_ORANGE, "You have disabled your PM's!");
- TogglePM[playerid] = 0;
- }
- return 1;
- }
- CMD:kill(playerid, params[])
- {
- SetPlayerHealth(playerid, 0);
- return 1;
- }
- CMD:resetteam(playerid, params[])
- {
- ForceClassSelection(playerid);
- SendClientMessage(playerid, C_LBLUE, "Team selection after death!");
- return 1;
- }
- CMD:rt(playerid, params[])
- return cmd_resetteam(playerid, params);
- CMD:resetclass(playerid, params[])
- {
- IsPlayerChoosingClass[playerid] = 1;
- ClassPositionSet[playerid] = 0;
- SendClientMessage(playerid, C_LBLUE, "Class selection when you spawn!");
- return 1;
- }
- CMD:rc(playerid, params[])
- return cmd_resetclass(playerid, params);
- CMD:radio(playerid, params[])
- {
- StopAudioStreamForPlayer(playerid);
- ShowPlayerDialog(playerid, D_RADIO, DIALOG_STYLE_LIST, "Online radio stations", "idobi Radio (Pop)\nTechnobase (Techno)\nHot 108 Jamz (Pop)\nSky.FM (Top Hits)\nTre.ee (Misc)\nDefay.DE (R&B)\nGroove Salad (Chill)","Start", "Stop");
- return 1;
- }
- CMD:mheal(playerid, params[])
- {
- if(gClass[playerid] == MEDIC)
- {
- if(CanHeal[playerid] == 1)
- {
- new targetid, Float:XYZ[3];
- if(sscanf(params, "u", targetid))
- {
- SendClientMessage(playerid, C_LORANGE, "You have healed yourself! {FFFFFF}You can also use: /mheal [playerid]");
- SetPlayerHealth(playerid, 99);
- SetTimerEx("MedicHeal", 1000*60*1, false, "i", playerid);
- }
- else
- {
- if(!IsPlayerConnected(targetid) || targetid == INVALID_PLAYER_ID) return SendClientMessage(playerid, C_RED, "Player not found!");
- GetPlayerPos(targetid, XYZ[0], XYZ[1], XYZ[2]);
- if(IsPlayerInRangeOfPoint(playerid, 5.0, XYZ[0], XYZ[1], XYZ[2]))
- {
- SendClientMessage(playerid, C_LORANGE, "Player healed! {FFFFFF}You can also use: /mheal to heal yourself.");
- SendClientMessage(targetid, C_LORANGE, "You have been healed by a medic!");
- SetPlayerHealth(targetid, 100.0);
- SetTimerEx("MedicHeal", 1000*60*1, false, "i", playerid);
- }
- else return SendClientMessage(playerid, C_RED, "You need to be closer!");
- }
- CanHeal[playerid] = 0;
- }
- else return SendClientMessage(playerid, C_LORANGE, "You can heal after 1 minute!");
- }
- else return SendClientMessage(playerid, C_RED, "You need to be medic class to use this command!");
- return 1;
- }
- CMD:r(playerid, params[])
- {
- new text[128];
- if(sscanf(params, "s[128]", text)) return SendClientMessage(playerid, C_GREY, "USAGE: /r [text]");
- new string[128];
- format(string, sizeof(string), "** %s %s [%d]: %s **", ClassName(playerid), Name(playerid), playerid, text);
- foreach(new i: Player)
- {
- if(gTeam[playerid] == gTeam[i])
- {
- SendClientMessage(i, C_RADIOBLUE, string);
- }
- }
- return 1;
- }
- CMD:sync(playerid, params[])
- {
- new Float: XYZ[3];
- GetPlayerPos(playerid, XYZ[0], XYZ[1], XYZ[2]);
- if(IsPlayerInAnyVehicle(playerid))
- {
- new vehicleid = GetPlayerVehicleID(playerid);
- new seat = GetPlayerVehicleSeat(playerid);
- SetPlayerPos(playerid, XYZ[0], XYZ[1], XYZ[2]);
- PutPlayerInVehicle(playerid, vehicleid, seat);
- }
- else
- {
- SetPlayerPos(playerid, XYZ[0], XYZ[1], XYZ[2]);
- }
- SendClientMessage(playerid, C_DGREEN, "You are synchronized with the server!");
- return 1;
- }
- CMD:ask(playerid, params[])
- {
- new text[128], string[128];
- if(sscanf(params, "s[128]", text)) return SendClientMessage(playerid, C_GREY, "USAGE: /ask [text]");
- SendClientMessage(playerid, C_LORANGE, "Your question has been sent to all online admins!");
- format(string, sizeof(string), "PLAYER QUESTION:{FFB13D} %s [%d] {FFFFFF}-{FFB13D} %s", Name(playerid), playerid, text);
- SendAdminMessage(C_WHITE, string);
- return 1;
- }
- CMD:myteam(playerid, params[])
- {
- new string[128];
- format(string, sizeof(string), "<< Your current team is: %s", TeamName(playerid));
- SendClientMessage(playerid, C_WHITE, string);
- return 1;
- }
- CMD:myrank(playerid, params[])
- {
- new string[128];
- format(string, sizeof(string), "<< Your current rank is: %d (%s)", Rank(playerid), RankName(playerid));
- SendClientMessage(playerid, C_WHITE, string);
- return 1;
- }
- CMD:afk(playerid, params[])
- {
- new string[128];
- if(AFK[playerid] == 0)
- {
- if(IsPlayerCloseToEnemy(playerid)) return SendClientMessage(playerid, C_ORANGE, "You cannot go AFK, when enemies are nearby!");
- TogglePlayerControllable(playerid, 0);
- AFK[playerid] = 1;
- SetRank3DText(playerid);
- format(string, sizeof(string), "** %s is now AFK!", Name(playerid));
- SendClientMessageToAll(C_LIME, string);
- }
- else
- {
- format(string, sizeof(string), "** %s isn't AFK anymore!", Name(playerid));
- SendClientMessageToAll(C_LIME, string);
- TogglePlayerControllable(playerid, 1);
- AFK[playerid] = 0;
- SetRank3DText(playerid);
- }
- return 1;
- }
- CMD:chat(playerid, params[])
- {
- if(isnull(params)) return SendClientMessage(playerid,-1,"Usage: /message [Text]");
- new test[128];
- format(test, sizeof(test), "Me: %s", params);
- SendClientMessage(playerid, 0xFFFFFFFF, test);
- SendPlayerMessageToCleverbot(playerid, params);
- return 1;
- }
- CMD:lagshoot(playerid, params[])
- {
- if(LagShoot[playerid] == 0)
- {
- LagShoot[playerid] = 1;
- SendClientMessage(playerid, C_WHITE, "["COLOR_LIME"ALSS"COLOR_WHITE"] You have enabled anti-lag shoot system! (NOTE: You have it enabled, others can still disable it and lag-shoot you).");
- }
- else
- {
- LagShoot[playerid] = 0;
- SendClientMessage(playerid, C_WHITE, "["COLOR_RED"ALSS"COLOR_WHITE"] You have disabled anti-lag shoot system! (NOTE: You have it disabled, others can still anti-lag shoot you).");
- }
- return 1;
- }
- CMD:roundstats(playerid, params[])
- {
- if(RoundStats[playerid] == 0)
- {
- RoundStats[playerid] = 1;
- SendClientMessage(playerid, C_WHITE, "** You have "COLOR_DGREEN"enabled"COLOR_WHITE" showing last round's stats!");
- }
- else
- {
- RoundStats[playerid] = 0;
- SendClientMessage(playerid, C_WHITE, "** You have "COLOR_RED"disabled"COLOR_WHITE" showing last round's stats!");
- }
- return 1;
- }
- //========================================================================
- /* ____ _
- | _ \ ___ _ __ ___ _ __ ___ _ _ ___| |_ ___ _ __ ___
- | | | |/ _ \| '_ \ / _ \| '__| / __| | | / __| __/ _ \ '_ ` _ \
- | |_| | (_) | | | | (_) | | \__ \ |_| \__ \ || __/ | | | | |
- |____/ \___/|_| |_|\___/|_| |___/\__, |___/\__\___|_| |_| |_|
- |___/ */
- //========================================================================
- // Donor system
- // GENERAL..
- //
- CMD:donors(playerid, params[])
- {
- new count = 0, dialogstring[576], namestring[96];
- foreach(new i: Player)
- {
- if(PlayerInfo[i][pVIP] > 0)
- {
- format(namestring, sizeof(namestring), "{FF0000}%s [ID: %d] ::{FF9900} Donor level - {FF0000}%d\n", Name(i), playerid, PlayerInfo[i][pVIP]);
- strcat(dialogstring, namestring);
- count ++;
- }
- }
- if(count != 0)
- {
- ShowPlayerDialog(playerid, D_ADMINS, DIALOG_STYLE_MSGBOX, "----==== Online Donors ====----", dialogstring, "Close", "");
- }
- else ShowPlayerDialog(playerid, D_ADMINS, DIALOG_STYLE_MSGBOX, "----==== Online Donors ====----", "No online donors!", "Close", "");
- return 1;
- }
- CMD:makedonor(playerid, params[])
- {
- new targetid, level, string[128], sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
- if(sscanf(params, "ui", targetid, level)) return SendClientMessage(playerid, C_GREY, "USAGE: /makedonor [playerid] [level 0-3]");
- {
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_GREY, "SERVER: This player is not connected.");
- if(level < 0 || level > 3) return SendClientMessage(playerid, C_GREY, "SERVER: Cannot go under 0 or above 3.");
- if(PlayerInfo[playerid][pAdmin] >= 3)
- {
- PlayerInfo[targetid][pVIP] = level;
- format(sendername, sizeof(sendername), "%s", Name(playerid));
- format(giveplayer, sizeof(giveplayer), "%s", Name(targetid));
- format(string, sizeof(string),"aCMD: %s has promoted %s to donor level %d.", sendername, giveplayer, level);
- SendAdminMessage(C_YELLOW, string);
- format(string, sizeof(string),"aCMD: %s has promoted you to donor level %d.", sendername, level);
- SendClientMessage(targetid, C_YELLOW, string);
- }
- else return SendClientMessage(playerid, C_RED, "WARNING: You do not have access to this command.");
- }
- return 1;
- }
- CMD:dhelp(playerid, params[])
- {
- if(PlayerInfo[playerid][pVIP] > 0)
- {
- ShowDialogHelp(playerid, DONOR);
- }
- return 1;
- }
- //
- // DONOR LEVEL 1
- //
- CMD:dheal(playerid, params[])
- {
- if(DonorHeal[playerid] == 1)
- {
- SendClientMessage(playerid, C_LIME, "Health refilled! (abusing the command will cause removing donor)");
- SetPlayerHealth(playerid, 99);
- DonorHeal[playerid] = 1;
- }
- else return SendClientMessage(playerid, C_RED, "Only 1 heal per death!");
- return 1;
- }
- CMD:dnos(playerid, params[])
- {
- if(PlayerInfo[playerid][pVIP] > 0)
- {
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, C_RED, "You aren't in any vehicle!");
- SendClientMessage(playerid, C_LIME, "NOS added to your vehicle!");
- AddVehicleComponent(GetPlayerVehicleID(playerid), 1010);
- }
- return 1;
- }
- CMD:dnrg(playerid, params[])
- {
- if(PlayerInfo[playerid][pVIP] > 0)
- {
- if(LastDonorVehicle[playerid] != 0) DestroyVehicle(LastDonorVehicle[playerid]);
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, C_RED, "You already are in a vehicle!");
- new Float:XYZ[3], Float:Angle;
- GetPlayerPos(playerid, XYZ[0], XYZ[1], XYZ[2]);
- GetPlayerFacingAngle(playerid, Angle);
- new car = CreateVehicle(522, XYZ[0]+1.0, XYZ[1]+1.0, XYZ[2], Angle, 6, 6, -1);
- PutPlayerInVehicle(playerid, car, 0);
- LastDonorVehicle[playerid] = GetPlayerVehicleID(playerid);
- }
- return 1;
- }
- CMD:dhot(playerid, params[])
- {
- if(PlayerInfo[playerid][pVIP] > 0)
- {
- if(LastDonorVehicle[playerid] != 0) DestroyVehicle(LastDonorVehicle[playerid]);
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, C_RED, "You already are in a vehicle!");
- new Float:XYZ[3], Float:Angle;
- GetPlayerPos(playerid, XYZ[0], XYZ[1], XYZ[2]);
- GetPlayerFacingAngle(playerid, Angle);
- new car = CreateVehicle(434, XYZ[0]+1.0, XYZ[1]+1.0, XYZ[2], Angle, 6, 6, -1);
- PutPlayerInVehicle(playerid, car, 0);
- LastDonorVehicle[playerid] = GetPlayerVehicleID(playerid);
- }
- return 1;
- }
- //
- // DONOR LEVEL 2
- //
- CMD:dsay(playerid, params[])
- {
- if(PlayerInfo[playerid][pVIP] > 1)
- {
- new string[64], message[64], targetid;
- if(sscanf(params, "us[128]", targetid, message)) return SendClientMessage(playerid, C_GREY, "USAGE: /dsay [playerid] [message]");
- format(string, sizeof(string),"~r~VIP~w~ %s: %s", Name(playerid), message);
- GameTextForPlayer(targetid, string, 2500, 3);
- }
- return 1;
- }
- CMD:denf(playerid, params[])
- {
- if(PlayerInfo[playerid][pVIP] > 1)
- {
- if(LastDonorVehicle[playerid] != 0) DestroyVehicle(LastDonorVehicle[playerid]);
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, C_RED, "You already are in a vehicle!");
- new Float:XYZ[3], Float:Angle;
- GetPlayerPos(playerid, XYZ[0], XYZ[1], XYZ[2]);
- GetPlayerFacingAngle(playerid, Angle);
- new car = CreateVehicle(427, XYZ[0]+1.0, XYZ[1]+1.0, XYZ[2], Angle, 6, 6, -1);
- PutPlayerInVehicle(playerid, car, 0);
- LastDonorVehicle[playerid] = GetPlayerVehicleID(playerid);
- }
- return 1;
- }
- CMD:dqua(playerid, params[])
- {
- if(PlayerInfo[playerid][pVIP] > 1)
- {
- if(LastDonorVehicle[playerid] != 0) DestroyVehicle(LastDonorVehicle[playerid]);
- if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, C_RED, "You already are in a vehicle!");
- new Float:XYZ[3], Float:Angle;
- GetPlayerPos(playerid, XYZ[0], XYZ[1], XYZ[2]);
- GetPlayerFacingAngle(playerid, Angle);
- new car = CreateVehicle(471, XYZ[0]+1.0, XYZ[1]+1.0, XYZ[2], Angle, 6, 6, -1);
- PutPlayerInVehicle(playerid, car, 0);
- LastDonorVehicle[playerid] = GetPlayerVehicleID(playerid);
- }
- return 1;
- }
- //
- // DONOR LEVEL 3
- //
- CMD:dskin(playerid, params[])
- {
- if(PlayerInfo[playerid][pVIP] > 2)
- {
- new string[64], skinid;
- if(sscanf(params, "i", skinid)) return SendClientMessage(playerid, C_GREY, "USAGE: /dskin [skinid]");
- if(skinid < 0 || skinid > 299) return SendClientMessage(playerid, C_GREY, "Skins ID 0-299 only!");
- SetPlayerSkin(playerid, skinid);
- format(string, sizeof(string), "Skin changed to ID: %d!", skinid);
- SendClientMessage(playerid, C_LIME, string);
- }
- return 1;
- }
- CMD:dfix(playerid, params[])
- {
- if(PlayerInfo[playerid][pVIP] > 2)
- {
- if(DonorFix[playerid] == 1)
- {
- if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, C_RED, "You aren't in a vehicle!");
- RepairVehicle(GetPlayerVehicleID(playerid));
- SendClientMessage(playerid, C_LIME, "Your current vehicle repaired (new repair in 5 minutes)!");
- SetTimerEx("DonorFixTimer", 1000*60*5, false, "i", playerid);
- DonorFix[playerid] = 0;
- }
- else
- {
- SendClientMessage(playerid, C_RED, "You can use /dfix in every 5 minutes!");
- }
- }
- return 1;
- }
- CMD:changepass(playerid, params[])
- {
- new oldpassword[128], newpassword[128], query[256];
- if(sscanf(params, "s[128]s[128]", oldpassword, newpassword)) return SendClientMessage(playerid, C_GREY, "USAGE: /changepass [oldpassword][newpassword]");
- format(query, sizeof(query), "SELECT `user` FROM `accounts` WHERE user = '%s' and password = md5('%s')", Name(playerid), oldpassword);
- mysql_query(query);
- mysql_store_result();
- new rows = mysql_num_rows();
- if(rows == 1)
- {
- format(query, sizeof(query), "UPDATE `accounts` SET password = md5('%s') WHERE user = '%s'", newpassword, Name(playerid));
- mysql_query(query);
- format(query, sizeof(query), "Your password is changed! New password: %s (hashed)", newpassword);
- SendClientMessage(playerid, C_LGREEN, query);
- }
- if(!rows)
- {
- SendClientMessage(playerid, C_RED, "The old password you entered, is wrong!");
- }
- mysql_free_result();
- return 1;
- }
- //========================================================================
- /* ___ _ _ _____ _
- / _ \ | | (_) / ___| | |
- / /_\ \ __| |_ __ ___ _ _ __ \ `--. _ _ ___| |_ ___ _ __ ___
- | _ |/ _` | '_ ` _ \| | '_ \ `--. \ | | / __| __/ _ \ '_ ` _ \
- | | | | (_| | | | | | | | | | | /\__/ / |_| \__ \ || __/ | | | | |
- \_| |_/\__,_|_| |_| |_|_|_| |_| \____/ \__, |___/\__\___|_| |_| |_|
- __/ |
- |___/ */
- //========================================================================
- // Admin system
- // GENERAL..
- //
- CMD:admins(playerid, params[])
- {
- new count = 0, dialogstring[576], namestring[96];
- foreach(new i: Player)
- {
- if(PlayerInfo[i][pAdmin] > 0 )
- {
- format(namestring, sizeof(namestring), "{FF0000}%s [ID: %d] {CCFFAA}|{FF0000} Level: %d - {D7DE16}%s\n", Name(i), i, PlayerInfo[i][pAdmin], AdminLevelName(i));
- strcat(dialogstring, namestring);
- count ++;
- }
- }
- if(count != 0)
- {
- ShowPlayerDialog(playerid, D_ADMINS, DIALOG_STYLE_MSGBOX, "----==== Online Admins ====----", dialogstring, "Close", "");
- }
- else ShowPlayerDialog(playerid, D_ADMINS, DIALOG_STYLE_MSGBOX, "----==== Online Admins ====----", "No online admins!", "Close", "");
- return 1;
- }
- CMD:ahelp(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] == 0) return SendClientMessage(playerid, C_WHITE, "SERVER: You are not an admin.");
- SendClientMessage(playerid, C_WHITE, "____________________________________________________________________");
- SendClientMessage(playerid, C_FADE, " Admin Commands: ");
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- SendClientMessage(playerid, C_FADE, "Administration Commands: /goto, /gethere, /warn, /kick");
- SendClientMessage(playerid, C_FADE, "Administration Commands: /sethealth, /setarmour, /spec, /specoff, /freeze, /unfreeze");
- SendClientMessage(playerid, C_FADE, "Administration Commands: /slap, /aduty, @[text], /mute, /unmute");
- }
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- SendClientMessage(playerid, C_FADE, "Administration Commands: /ban, /(v)ehicle, /disarm, /getall, /freezeall, /unfreezeall, /spawn");
- SendClientMessage(playerid, C_FADE, "Administration Commands: /givegun, /event");
- }
- if(PlayerInfo[playerid][pAdmin] >= 3)
- {
- SendClientMessage(playerid, C_FADE, "Administration Commands: /setkills, /setdeaths");
- }
- if(PlayerInfo[playerid][pAdmin] >= 4)
- {
- }
- if(PlayerInfo[playerid][pAdmin] == 5)
- {
- SendClientMessage(playerid, C_FADE, "Administration Commands: /makeadmin, /setskin, /givescore");
- }
- if(PlayerInfo[playerid][pAdmin] >= 6)
- {
- }
- SendClientMessage(playerid, C_WHITE, "____________________________________________________________________");
- return 1;
- }
- CMD:report(playerid, params[])
- {
- new text[128], targetid, string[128], sendername[MAX_PLAYER_NAME], giveplayer[MAX_PLAYER_NAME];
- if(sscanf(params, "us[128]", targetid, text)) return SendClientMessage(playerid, C_GREY, "USAGE: /report [playerid] [reason]");
- {
- if (playerid == targetid) return SendClientMessage(playerid, C_GREY, "SERVER: You cannot do this to yourself.");
- if (!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_GREY, "SERVER: This player is not connected.");
- format(sendername, sizeof(sendername), "%s", Name(playerid));
- format(giveplayer, sizeof(giveplayer), "%s", Name(targetid));
- format(string, sizeof(string), "REPORT: %s [ID:%d] has reported %s [ID:%d].", sendername, playerid, giveplayer, targetid);
- SendAdminMessage(0xE19898AA,string);
- format(string, sizeof(string), "REPORT: Reason: %s.", text);
- SendAdminMessage(0xE19898AA,string);
- SendClientMessage(playerid,C_GREEN,"INFO: You're report has been sent to all the online Admins.");
- }
- return 1;
- }
- //
- // LEVEL 1..
- //
- CMD:goto(playerid, params[])
- {
- new Float:x, Float:y, Float:z;
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- new targetid;
- if(sscanf(params,"u", targetid)) return SendClientMessage(playerid, C_WHITE, "USAGE: /goto [Player ID]");
- {
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_RED, "SERVER: Player not connected");
- GetPlayerPos(targetid, x, y, z);
- SetPlayerPos(playerid, x, y, z);
- }
- }
- else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
- return 1;
- }
- CMD:gethere(playerid, params[])
- {
- new Float:x, Float:y, Float:z;
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- new targetid;
- if(sscanf(params,"ui", targetid)) return SendClientMessage(playerid, C_WHITE, "USAGE: /gethere [Player ID]");
- {
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_RED, "SERVER: Player not connected");
- GetPlayerPos(playerid, x, y, z);
- SetPlayerPos(targetid, x, y, z);
- }
- }
- else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
- return 1;
- }
- CMD:warn(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- new str[128], reason[64], targetid;
- if(sscanf(params,"us", targetid, reason)) return SendClientMessage(playerid, C_WHITE, "USAGE: /warn [Player ID] [Reason]");
- {
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_RED, "SERVER: Player not connected");
- if(PlayerInfo[targetid][pAdmin] == 3) return SendClientMessage(playerid, C_RED, "SERVER: Cannot do this lead administrators.");
- PlayerInfo[targetid][pWarnings] ++;
- format(str, sizeof(str), "ADMIN: %s has been warned by %s. [REASON: %s (%i/3 warnings)]", Name(targetid), Name(playerid), reason, PlayerInfo[targetid][pWarnings]);
- SendClientMessageToAll(C_RED, str);
- if(PlayerInfo[targetid][pWarnings] == 3)
- {
- format(str, sizeof(str), "ADMIN: %s has been kicked. [REASON: 3/3 warnings reached]", Name(targetid));
- SendClientMessageToAll(C_YELLOW, str);
- PlayerInfo[targetid][pWarnings] = 0;
- Kick(targetid);
- }
- }
- }
- else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
- return 1;
- }
- CMD:kick(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- new str[128], reason[64], targetid;
- if(sscanf(params,"us", targetid, reason)) return SendClientMessage(playerid, C_WHITE, "USAGE: /kick [Player ID] [Reason]");
- {
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_RED, "SERVER: Player not connected");
- if(PlayerInfo[targetid][pAdmin] == 3) return SendClientMessage(playerid, C_RED, "SERVER: Cannot do this lead administrators.");
- format(str, sizeof(str), "aCMD: %s was kicked by %s %s for reason: %s", Name(targetid), AdminLevelName(playerid), Name(playerid), reason);
- SendClientMessageToAll(C_RED, str);
- Kick(targetid);
- }
- }
- else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
- return 1;
- }
- CMD:sethealth(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- new str[128], health, targetid;
- if(sscanf(params,"un", targetid, health)) return SendClientMessage(playerid, C_WHITE, "USAGE: /sethealth [Player ID] [Amount]");
- {
- if(health >= 100) health = 99;
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_RED, "SERVER: Player not connected");
- if(PlayerInfo[targetid][pAdmin] == 3) return SendClientMessage(playerid, C_RED, "SERVER: Cannot do this lead administrators.");
- format(str, sizeof(str), "aCMD: %s's health points have been updated by %s %s", Name(targetid), AdminLevelName(playerid), Name(playerid));
- SendAdminMessage(C_RED,str);
- SetPlayerHealth(targetid, health);
- }
- }
- else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
- return 1;
- }
- CMD:setarmour(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- new str[128], armour, targetid;
- if(sscanf(params,"un", targetid, armour)) return SendClientMessage(playerid, C_WHITE, "USAGE: /setarmour [Player ID] [Amount]");
- {
- if(armour >= 100) armour = 99;
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_RED, "SERVER: Player not connected");
- if(PlayerInfo[targetid][pAdmin] == 3) return SendClientMessage(playerid, C_RED, "SERVER: Cannot do this lead administrators.");
- format(str, sizeof(str), "aCMD: %s's armor points have been updated by %s %s", Name(targetid), AdminLevelName(playerid), Name(playerid));
- SendAdminMessage(C_RED,str);
- SetPlayerArmour(targetid, armour);
- }
- }
- else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
- return 1;
- }
- CMD:spec(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- new targetid;
- new string[128];
- if(sscanf(params,"ui", targetid)) return SendClientMessage(playerid, C_WHITE, "USAGE: /spec [Player ID]");
- {
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_RED, "SERVER: Player not connected");
- if(PlayerInfo[targetid][pAdmin] == 3) return SendClientMessage(playerid, C_RED, "SERVER: Cannot do this lead administrators.");
- HackTest[playerid] = 1;
- TogglePlayerSpectating(playerid, 1);
- if(IsPlayerInAnyVehicle(targetid))
- {
- new vehicleid = GetPlayerVehicleID(targetid);
- PlayerSpectateVehicle(playerid, vehicleid);
- }
- else
- {
- PlayerSpectatePlayer(playerid, targetid);
- SetPlayerInterior(playerid,GetPlayerInterior(targetid));
- }
- format(string, sizeof(string), "INFO: You are now spectating %s - ID:%d - PING:%d - Remember to /timestamp", Name(targetid), targetid, GetPlayerPing(targetid));
- SendClientMessage(playerid, C_WHITE, string);
- }
- }
- else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
- return 1;
- }
- CMD:freeze(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- new string[128];
- new targetid;
- if(sscanf(params,"u", targetid)) return SendClientMessage(playerid, C_WHITE, "USAGE: /freeze [Player ID]");
- {
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_RED, "SERVER: Player not connected");
- if(PlayerInfo[targetid][pAdmin] == 3) return SendClientMessage(playerid, C_RED, "SERVER: Cannot do this lead administrators.");
- format(string, sizeof(string), "aCMD: %s was frozen by %s %s", Name(targetid), AdminLevelName(playerid), Name(playerid));
- SendAdminMessage(C_YELLOW,string);
- TogglePlayerControllable(targetid, false);
- GameTextForPlayer(targetid, "~r~Frozen", 3000, 5);
- }
- }
- else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
- return 1;
- }
- CMD:unfreeze(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- new str[128];
- new targetid;
- if(sscanf(params,"u", targetid)) return SendClientMessage(playerid, C_WHITE, "USAGE: /unfreeze [Player ID]");
- {
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_RED, "SERVER: Player not connected");
- if(PlayerInfo[targetid][pAdmin] == 3) return SendClientMessage(playerid, C_RED, "SERVER: Cannot do this lead administrators.");
- format(str, sizeof(str), "aCMD: %s was un-frozen by %s %s", Name(targetid), AdminLevelName(playerid), Name(playerid));
- SendAdminMessage(C_YELLOW,str);
- SendClientMessage(playerid, C_GREY, "Player un-frozen!");
- TogglePlayerControllable(targetid, true);
- GameTextForPlayer(targetid, "~g~Unfrozen", 3000, 5);
- }
- }
- else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
- return 1;
- }
- CMD:specoff(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- HackTest[playerid] = 0;
- TogglePlayerSpectating(playerid, 0);
- SendClientMessage(playerid, C_GREY, "INFO: You have cancelled spectating.");
- SetPlayerInterior(playerid, 0);
- SpawnPlayer(playerid);
- }
- else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
- return 1;
- }
- CMD:slap(playerid, params[])
- {
- new targetid,string[128],sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME];
- if(sscanf(params, "u", targetid)) SendClientMessage(playerid, C_GREY, "USAGE: /slap [playerid]");
- else
- {
- if (!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_GREY, "SERVER: This player is not connected.");
- if(PlayerInfo[targetid][pAdmin] == 3) return SendClientMessage(playerid, C_RED, "SERVER: Cannot do this lead administrators.");
- if(IsPlayerNPC(targetid)) return SendClientMessage(playerid, C_GREY, "SERVER: Cant do this to a NPC.");
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- format(sendername, sizeof(sendername), "%s", Name(playerid));
- format(giveplayer, sizeof(giveplayer), "%s", Name(targetid));
- format(string, sizeof(string), "aCMD: %s was slapped by %s.", giveplayer, sendername);
- SendAdminMessage(C_RED,string);
- new Float:x,Float:y,Float:z,Float:health;
- GetPlayerPos(targetid,x,y,z);
- SetPlayerPos(targetid,x,y,z+5);
- GetPlayerHealth(targetid,health);
- SetPlayerHealth(targetid,health-15.0);
- GameTextForPlayer(targetid, "~r~Slapped", 5000, 3);
- }
- else
- {
- SendClientMessage(playerid, C_RED, "WARNING: You do not have access to this command.");
- }
- }
- return 1;
- }
- CMD:aduty(playerid, params[])
- {
- new str[128];
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- if(aDuty[playerid] == 0)
- {
- aDuty[playerid] = 1;
- format(str, sizeof(str), "aCMD: %s %s is now on Administration Duty!", AdminLevelName(playerid), Name(playerid));
- SendClientMessageToAll(C_RED, str);
- SetPlayerSkin(playerid, 217);
- SetPlayerHealth(playerid, 99999);
- SetPlayerArmour(playerid, 99999);
- SetPlayerColor(playerid, C_ORANGE);
- SetRank3DText(playerid);
- }
- else
- {
- aDuty[playerid] = 0;
- format(str, sizeof(str), "aCMD: %s %s is now off Administration Duty!", AdminLevelName(playerid), Name(playerid));
- SendClientMessageToAll(C_RED, str);
- SetPlayerSkin(playerid, TeamSkin(playerid));
- SetPlayerColor(playerid, TeamColor(playerid));
- SetPlayerHealth(playerid, 99);
- SetPlayerArmour(playerid, 0);
- SetRank3DText(playerid);
- }
- }
- else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
- return 1;
- }
- CMD:mute(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- new targetid, reason[128], string[128];
- if(sscanf(params, "us[128]", targetid)) SendClientMessage(playerid, C_GREY, "USAGE: /mute [playerid] [reason]");
- format(string, sizeof(string), "ADMIN: %s has been muted. [REASON: %s]", Name(targetid), reason);
- SendClientMessageToAll(C_YELLOW, string);
- PlayerInfo[targetid][pMuted] = 1;
- }
- else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
- return 1;
- }
- CMD:unmute(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- new targetid, string[128];
- if(sscanf(params, "u", targetid)) SendClientMessage(playerid, C_GREY, "USAGE: /unmute [playerid]");
- format(string, sizeof(string), "ADMIN: %s has been un-muted.", Name(targetid));
- SendClientMessageToAll(C_YELLOW, string);
- PlayerInfo[targetid][pMuted] = 0;
- }
- else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
- return 1;
- }
- //
- // LEVEL 2..
- //
- CMD:getall(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >=2)
- {
- foreach(Player, i)
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- SetPlayerPos(i, x, y, z);
- SendClientMessage(i, C_YELLOW, "aCMD: You have been teleported by an admin!");
- }
- new string[128];
- format(string, sizeof(string), "aCMD: %s has teleported all players to his location.", Name(playerid));
- SendAdminMessage(C_YELLOW, string);
- }
- else return SendClientMessage(playerid, C_RED, "You do not have access to this command!");
- return 1;
- }
- CMD:freezeall(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >=2)
- {
- foreach(Player, i)
- {
- TogglePlayerControllable(i, 0);
- SendClientMessage(i, C_YELLOW, "aCMD: You have been frozen by an admin!");
- }
- new string[128];
- format(string, sizeof(string), "aCMD: %s has frozen all players.", Name(playerid));
- SendAdminMessage(C_YELLOW, string);
- }
- else return SendClientMessage(playerid, C_RED, "You do not have access to this command!");
- return 1;
- }
- CMD:unfreezeall(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >=2)
- {
- foreach(Player, i)
- {
- TogglePlayerControllable(i, 1);
- SendClientMessage(i, C_YELLOW, "aCMD: You have been unfrozen by an admin!");
- }
- new string[128];
- format(string, sizeof(string), "aCMD: %s has unfrozen all players.", Name(playerid));
- SendAdminMessage(C_YELLOW, string);
- }
- else return SendClientMessage(playerid, C_RED, "You do not have access to this command!");
- return 1;
- }
- CMD:spawn(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >=2)
- {
- new targetid;
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, C_GREY, "USAGE: /spawn [playerid]");
- {
- SendClientMessage(playerid, C_YELLOW, "You have spawned the player!");
- SendClientMessage(targetid, C_YELLOW, "You have spawned by an admin!");
- SpawnPlayer(targetid);
- }
- }
- return 1;
- }
- CMD:vehicle(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >=2)
- {
- if(!IsPlayerInAnyVehicle(playerid))
- {
- new carname[40], machine;
- if(sscanf(params, "s[40]", carname)) return SendClientMessage(playerid, C_GREY, "USAGE: /(v)ehicle [id/carname]");
- {
- new Float:x, Float:y, Float:z, Float:angle, string[60];
- GetPlayerPos(playerid, x, y, z);
- GetPlayerFacingAngle(playerid, angle);
- DestroyVehicle(LastAdminVehicle[playerid]);
- machine = GetVehicleModelIDFromName(carname);
- new machine2 = CreateVehicle(machine, x, y, z, angle, 0, 0, -1);
- PutPlayerInVehicle(playerid, machine2, 0);
- LastAdminVehicle[playerid] = GetPlayerVehicleID(playerid);
- format(string, sizeof(string), "You spawned a new vehicle (%s)!", CarNames[machine-400]);
- SendClientMessage(playerid, C_BLUE, string);
- }
- }
- else return SendClientMessage(playerid, C_RED, "You already are in a vehicle!");
- }
- else return SendClientMessage(playerid, C_RED, "You do not have access to this command!");
- return 1;
- }
- CMD:v(playerid, params[])
- return cmd_vehicle(playerid, params);
- CMD:ban(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- new str[128], reason[64], targetid;
- if(sscanf(params,"us", targetid, reason)) return SendClientMessage(playerid, C_WHITE, "USAGE: /ban [Player ID] [Reason]");
- {
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_RED, "SERVER: Player not connected");
- if(PlayerInfo[targetid][pAdmin] == 3) return SendClientMessage(playerid, C_RED, "SERVER: Cannot do this lead administrators.");
- format(str, sizeof(str), "aCMD: %s was banned by %s %s for reason: %s", Name(targetid), AdminLevelName(playerid), Name(playerid), reason);
- SendClientMessageToAll(C_RED, str);
- Ban(targetid);
- }
- }
- else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
- return 1;
- }
- CMD:disarm(playerid, params[])
- {
- new targetid,string[128],sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME];
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, C_GREY, "USAGE: /disarm [playerid]");
- {
- if (!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_GREY, "SERVER: This player is not connected.");
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- if(PlayerInfo[targetid][pAdmin] == 3) return SendClientMessage(playerid, C_RED, "SERVER: Cannot do this lead administrators.");
- format(sendername, sizeof(sendername), "%s", Name(playerid));
- format(giveplayer, sizeof(giveplayer), "%s", Name(targetid));
- format(string, sizeof(string), "aCMD: %s was disarmed by %s.", giveplayer, sendername);
- SendAdminMessage(C_RED,string);
- ResetPlayerWeapons(targetid);
- }
- else return SendClientMessage(playerid, C_RED, "WARNING: You do not have access to this command.");
- }
- return 1;
- }
- CMD:givegun(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 1)
- {
- new str[128], ammo, gun, targetid;
- if(sscanf(params,"unn", targetid, gun, ammo)) return SendClientMessage(playerid, C_WHITE, "USAGE: /givegun [Player ID] [WeaponID] [Ammo] - Do not use ID: 38 as you will be banned.");
- {
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_RED, "SERVER: Player not connected");
- SendClientMessage(targetid, C_WHITE, "Weapon recieved!");
- format(str, sizeof(str), "aCMD: %s has been given a weapon by %s %s", Name(targetid), AdminLevelName(playerid), Name(playerid));
- SendAdminMessage(C_RED,str);
- GivePlayerWeapon(targetid, gun, ammo);
- }
- }
- else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
- return 1;
- }
- CMD:event(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 2)
- {
- new number;
- if(sscanf(params, "i", number)) return SendClientMessage(playerid, C_GREY, "USAGE: /event [1-6]");
- if(number == 1)
- {
- SetPlayerPos(playerid, -1393.2266,1482.1432,1.8672);
- }
- else if(number == 2)
- {
- SetPlayerPos(playerid, -2435.4832,1547.9771,8.3984);
- }
- else if(number == 3)
- {
- SetPlayerPos(playerid, -2322.1799,-1619.3059,483.7125);
- }
- else if(number == 4)
- {
- SetPlayerPos(playerid, -535.7612,-179.6608,78.4047);
- }
- else if(number == 5)
- {
- SetPlayerPos(playerid, -1031.6322,-676.5753,32.0078);
- }
- else if(number == 6)
- {
- SetPlayerPos(playerid, 1290.3351,172.9764,20.4609);
- }
- else return SendClientMessage(playerid, C_GREY, "USAGE: Only [1-6] available!");
- }
- return 1;
- }
- //
- // LEVEL 3..
- //
- CMD:setkills(playerid, params[])
- {
- new targetid, kills, string[128];
- if(sscanf(params, "ui", targetid, kills)) return SendClientMessage(playerid, C_GREY, "USAGE: /setkills [playerid] [amount]");
- {
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_GREY, "SERVER: This player is not connected.");
- if(PlayerInfo[playerid][pAdmin] >= 3)
- {
- format(string, sizeof(string), "aCMD: %s has changed %s's kills to amount %d", Name(playerid), Name(targetid), kills);
- SendAdminMessage(C_YELLOW, string);
- format(string, sizeof(string), "aCMD: Admin %s changed your kills to amount %d", Name(playerid), kills);
- SendClientMessage(playerid, C_YELLOW, string);
- PlayerInfo[targetid][pKills] = kills;
- UpdateStatsTextdraw(targetid);
- }
- else return SendClientMessage(playerid, C_RED, "WARNING: You do not have access to this command.");
- }
- return 1;
- }
- CMD:setdeaths(playerid, params[])
- {
- new targetid, deaths, string[128];
- if(sscanf(params, "ui", targetid, deaths)) return SendClientMessage(playerid, C_GREY, "USAGE: /setdeaths [playerid] [amount]");
- {
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_GREY, "SERVER: This player is not connected.");
- if(PlayerInfo[playerid][pAdmin] >= 3)
- {
- format(string, sizeof(string), "aCMD: %s has changed %s's deaths to amount %d", Name(playerid), Name(targetid), deaths);
- SendAdminMessage(C_YELLOW, string);
- format(string, sizeof(string), "aCMD: Admin %s changed your deaths to amount %d", Name(playerid), deaths);
- SendClientMessage(playerid, C_YELLOW, string);
- PlayerInfo[targetid][pDeaths] = deaths;
- UpdateStatsTextdraw(targetid);
- }
- else return SendClientMessage(playerid, C_RED, "WARNING: You do not have access to this command.");
- }
- return 1;
- }
- //
- // LEVEL 5..
- //
- CMD:makeadmin(playerid, params[])
- {
- new targetid,type,string[128],sendername[MAX_PLAYER_NAME],giveplayer[MAX_PLAYER_NAME];
- if(sscanf(params, "ui", targetid, type)) return SendClientMessage(playerid, C_GREY, "USAGE: /makeadmin [playerid] [level 0-5]");
- {
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_GREY, "SERVER: This player is not connected.");
- if(type < 0 || type > 11) return SendClientMessage(playerid, C_GREY, "SERVER: Cannot go under 0 or above 5.");
- if(PlayerInfo[playerid][pAdmin] >= 5)
- {
- format(sendername, sizeof(sendername), "%s", Name(playerid));
- format(giveplayer, sizeof(giveplayer), "%s", Name(targetid));
- PlayerInfo[targetid][pAdmin] = type;
- format(string, sizeof(string),"aCMD: %s has promoted %s to Admin-Level %d.", sendername, giveplayer, type);
- SendAdminMessage(C_YELLOW,string);
- }
- else return SendClientMessage(playerid, C_RED, "WARNING: You do not have access to this command.");
- }
- return 1;
- }
- CMD:setskin(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 5)
- {
- new str[128], skin, targetid;
- if(sscanf(params,"ui", targetid, skin)) return SendClientMessage(playerid, C_WHITE, "USAGE: /setskin [Player ID] [SkinID 1-299] - Do not go above, it crashes the server");
- {
- if(!IsPlayerConnected(targetid)) return SendClientMessage(playerid, C_RED, "SERVER: Player not connected");
- SendClientMessage(targetid, C_WHITE, "Your skin was changed");
- format(str, sizeof(str), "aCMD: %s's skin has been changed by %s %s", Name(targetid), AdminLevelName(playerid), Name(playerid));
- SendAdminMessage(C_RED,str);
- SetPlayerSkin(targetid, skin);
- }
- }
- else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
- return 1;
- }
- CMD:givescore(playerid, params[])
- {
- if(PlayerInfo[playerid][pAdmin] >= 5)
- {
- new str[128], score, targetid;
- if(sscanf(params,"ui", targetid, score)) return SendClientMessage(playerid, C_WHITE, "USAGE: /givescore [Player ID/partofname] [SCORE]");
- {
- format(str, sizeof(str), "aCMD: Admin %s gave %i score to player %s.", Name(playerid), score, Name(playerid));
- SendAdminMessage(C_YELLOW, str);
- format(str, sizeof(str), "aCMD: You got %d score from admin %s!", score, Name(playerid));
- SendClientMessage(targetid, C_YELLOW, str);
- SetPlayerScore(targetid, GetPlayerScore(targetid)+score);
- }
- }
- return 1;
- }
- //
- // LEVEL 6..
- //
- CMD:makemeadmin(playerid, params[])
- {
- if(IsPlayerAdmin(playerid))
- {
- PlayerInfo[playerid][pAdmin] = 6;
- ShowPlayerDialog(playerid, D_SUCCESS, DIALOG_STYLE_MSGBOX, " ", "You have made yourself Server Owner!", "Ok", "");
- }
- else SendClientMessage(playerid, C_RED, "You do not have access to this command!");
- return 1;
- }
- //====================================================
- // TIMERS -- TIMERS -- TIMERS -- TIMERS -- TIMERS -- T
- forward Spawnkill(playerid);
- public Spawnkill(playerid)
- {
- SetPlayerHealth(playerid, 99);
- SendClientMessage(playerid, C_RED, "Anti-SK: Spawn protection over!");
- return 1;
- }
- forward Spawned(playerid);
- public Spawned(playerid)
- {
- HackTest[playerid] = 1;
- }
- forward DeathCameraStop(playerid);
- public DeathCameraStop(playerid)
- {
- TogglePlayerSpectating(playerid, 0);
- return 1;
- }
- forward SendRandomMessage();
- public SendRandomMessage()
- {
- new randMSG = random(sizeof(RandomMSG));
- SendClientMessageToAll(C_GREEN, RandomMSG[randMSG]);
- return 1;
- }
- /* forward BattleShield();
- public BattleShield()
- {
- new
- string[128],
- Float:health,
- Float:armour
- ;
- foreach(Player, i)
- {
- GetPlayerHealth(i, health);
- GetPlayerArmour(i, armour);
- if(health >= 100 && health != 99999 && IsPlayerChoosingClass[i] != 1 && HackTest[i] == 1)
- {
- format(string, sizeof string, "BATTLESHIELD: "COLOR_YELLOW" User '%s' has been banned because of Health hacking!", Name(i));
- SendClientMessageToAll(C_RED, string);
- BanEx(i, "Health hacking!");
- }
- if(armour >= 100 && armour != 99999 && IsPlayerChoosingClass[i] != 1 && HackTest[i] != 1)
- {
- format(string, sizeof string, "BATTLESHIELD: "COLOR_YELLOW" User '%s' has been banned because of Armour hacking!", Name(i));
- SendClientMessageToAll(C_RED, string);
- BanEx(i, "Armour hacking!");
- }
- }
- }
- forward RandomWar();
- public RandomWar()
- {
- new string[128], team1, team2, team3;
- team1 = random(4);
- team2 = random(4);
- team3 = random(4);
- if(team1 == team2) team1 = team3;
- if(team2 == team1 && team1 != team3) team2 = team3;
- if(team1 == 0) team1 = T_ENGLAND; if(team1 == 1) team1 = T_RUSSIA; if(team1 == 2) team1 = T_IRAQ; if(team1 == 3) team1 = T_MEXICO;
- if(team2 == 0) team2 = T_ENGLAND; if(team2 == 1) team2 = T_RUSSIA; if(team2 == 2) team2 = T_IRAQ; if(team2 == 3) team2 = T_MEXICO;
- format(string, sizeof string, "** A random war has started between team %s and %s!", TeamName(team1), TeamName(team2));
- SendClientMessageToAll(C_WHITE, string);
- format(string, sizeof string, "%s", TeamName(team1));
- TextDrawSetString(tTeam1, string);
- TextDrawShowForAll(tTeam1);
- format(string, sizeof string, "%s", TeamName(team2));
- TextDrawSetString(tTeam2, string);
- TextDrawShowForAll(tTeam2);
- }*/
- forward GangCount(playerid, checkpointid, zonename);
- public GangCount(playerid, checkpointid, zonename)
- {
- new time[16];
- PlayerCount[playerid] --;
- format(time, sizeof(time), "~g~%i..", PlayerCount[playerid]);
- GameTextForPlayer(playerid, time, 1100, 3);
- if(PlayerCount[playerid] == 0)
- {
- new string[128], Float:armour;
- GangInfo[checkpointid][gAttacked] = 0;
- GangZoneStopFlashForAll(zonename);
- GangZoneShowForAll(zonename, PlayerGangColor(playerid));
- SetZoneColor(zonename, playerid);
- format(string, sizeof(string), "You get {FFFF00}+3 score, +20 armor and $2500{FFFFFF} for capturing zone {15FF00}%s!", ZoneName(checkpointid));
- SendClientMessage(playerid, C_WHITE, string);
- GetPlayerArmour(playerid, armour);
- if(armour+20.0 > 99) SetPlayerArmour(playerid, 99);
- else SetPlayerArmour(playerid, armour+20.0);
- GivePlayerMoney(playerid, 5000);
- SetPlayerScore(playerid, GetPlayerScore(playerid)+3);
- RoundInfo[playerid][Zones] ++;
- PlayerInfo[playerid][pCaptureZone] = 0;
- UpdateStatsTextdraw(playerid);
- foreach(Player, i)
- {
- if(GangInfo[checkpointid][gOwner] == gTeam[i])
- {
- format(string, sizeof(string), "Your team has lost the zone {FF0000}%s{FFFFFF}, you lose {FF0000}-1{FFFFFF} score!", ZoneName(checkpointid));
- SetPlayerScore(i, GetPlayerScore(i)-1);
- SendClientMessage(i, C_WHITE, string);
- UpdateStatsTextdraw(i);
- }
- else if(gTeam[i] == gTeam[playerid])
- {
- if(i != playerid)
- {
- format(string, sizeof(string), "Your team has captured the zone {15FF00}%s{FFFFFF}, you get {15FF00}+1{FFFFFF} score!", ZoneName(checkpointid));
- SetPlayerScore(i, GetPlayerScore(i)+1);
- SendClientMessage(i, C_WHITE, string);
- UpdateStatsTextdraw(i);
- }
- }
- }
- KillTimer(PlayerCountTimer[playerid]);
- GangInfo[checkpointid][gOwner] = gTeam[playerid];
- }
- return 1;
- }
- forward MedicHeal(playerid);
- public MedicHeal(playerid)
- {
- CanHeal[playerid] = 1;
- return 1;
- }
- forward DonorFixTimer(playerid);
- public DonorFixTimer(playerid)
- {
- DonorFix[playerid] = 1;
- return 1;
- }
- forward CanCapture(playerid);
- public CanCapture(playerid)
- {
- CanCaptureZone[playerid] = 1;
- return 1;
- }
- //====================================================
- // STOCKS -- STOCKS -- STOCKS -- STOCKS -- STOCKS -- S
- stock Register(playerid, pass[])
- {
- new query[512], ip[16];
- GetPlayerIp(playerid, ip, sizeof(ip));
- format(query, sizeof(query), "INSERT INTO accounts(user, password, admin, VIP, warnings, score, money, IP, kills, deaths, points) VALUES('%s', md5('%s'), 0, 0, 0, 0, 0, '%s', 0, 0, 0)", Name(playerid), pass, ip);
- mysql_query(query);
- PlayerInfo[playerid][pLogged] = 1;
- SendClientMessage(playerid, C_LGREEN, "ACCOUNT: You are now registered, and automatically logged in.");
- return 1;
- }
- stock Login(playerid)
- {
- new query[128], string[64], money, score;
- format(query, sizeof(query), "SELECT * FROM accounts WHERE user = '%s'", Name(playerid));
- mysql_query(query);
- mysql_store_result();
- while(mysql_fetch_row_format(query))
- {
- mysql_fetch_field_row(string, "admin"); PlayerInfo[playerid][pAdmin] = strval(string);
- mysql_fetch_field_row(string, "VIP"); PlayerInfo[playerid][pVIP] = strval(string);
- mysql_fetch_field_row(string, "warnings"); PlayerInfo[playerid][pWarnings] = strval(string);
- mysql_fetch_field_row(string, "score"); score = strval(string);
- mysql_fetch_field_row(string, "money"); money = strval(string);
- mysql_fetch_field_row(string, "kills"); PlayerInfo[playerid][pKills] = strval(string);
- mysql_fetch_field_row(string, "deaths"); PlayerInfo[playerid][pDeaths] = strval(string);
- mysql_fetch_field_row(string, "points"); PlayerInfo[playerid][pPoints] = strval(string);
- }
- mysql_free_result();
- GivePlayerMoney(playerid, money);
- SetPlayerScore(playerid, score);
- PlayerInfo[playerid][pLogged] = 1;
- UpdateStatsTextdraw(playerid);
- SendClientMessage(playerid, C_LGREEN, "ACCOUNT: Successfully logged in.");
- return 1;
- }
- stock SaveStats(playerid)
- {
- new query[512];
- format(query, sizeof(query), "UPDATE `accounts` SET admin=%d, VIP=%d, warnings=%d, score=%d, money=%d, kills=%d, deaths=%d, points=%d WHERE user='%s'", PlayerInfo[playerid][pAdmin], PlayerInfo[playerid][pVIP], PlayerInfo[playerid][pWarnings], GetPlayerScore(playerid), GetPlayerMoney(playerid), PlayerInfo[playerid][pKills], PlayerInfo[playerid][pDeaths], PlayerInfo[playerid][pPoints], Name(playerid));
- printf("User %s stats saved in database!", Name(playerid));
- mysql_query(query);
- }
- //====================================================
- stock UpdateStatsTextdraw(playerid)
- {
- new killtxt[11], deathtxt[11], ratiotxt[11], pointstxt[11];
- format(killtxt, sizeof(killtxt), "%d", PlayerInfo[playerid][pKills]);
- TextDrawSetString(Textkills[playerid], killtxt);
- format(deathtxt, sizeof(deathtxt), "%d", PlayerInfo[playerid][pDeaths]);
- TextDrawSetString(Textdeaths[playerid], deathtxt);
- new Float:ratio = floatdiv(PlayerInfo[playerid][pKills],PlayerInfo[playerid][pDeaths]); // Divides kills and deaths, results ratio.
- format(ratiotxt, sizeof(ratiotxt), "%.2f", ratio); // Formats the float into string so I could use it in TextDrawSetString.
- TextDrawSetString(Textratio[playerid], ratiotxt);
- format(pointstxt, sizeof(pointstxt), "%d", GetPlayerScore(playerid));
- TextDrawSetString(Textpoints[playerid], pointstxt);
- }
- stock GiveClassWeapons(playerid)
- {
- if(gClass[playerid] == ASSAULT)
- {
- GivePlayerWeapon(playerid, WEAPON_KNIFE, 1);
- GivePlayerWeapon(playerid, WEAPON_DEAGLE, 100);
- GivePlayerWeapon(playerid, WEAPON_MP5, 500);
- GivePlayerWeapon(playerid, WEAPON_M4, 350);
- GivePlayerWeapon(playerid, WEAPON_TEARGAS, 5);
- }
- else if(gClass[playerid] == MEDIC)
- {
- GivePlayerWeapon(playerid, WEAPON_KATANA, 1);
- GivePlayerWeapon(playerid, WEAPON_SILENCED, 100);
- GivePlayerWeapon(playerid, WEAPON_MP5, 500);
- }
- else if(gClass[playerid] == ANTI-TANK)
- {
- GivePlayerWeapon(playerid, WEAPON_CHAINSAW, 1);
- GivePlayerWeapon(playerid, WEAPON_COLT45, 150);
- GivePlayerWeapon(playerid, WEAPON_SHOTGUN, 50);
- GivePlayerWeapon(playerid, WEAPON_ROCKETLAUNCHER, 10);
- }
- else if(gClass[playerid] == ENGINEER)
- {
- GivePlayerWeapon(playerid, WEAPON_KNIFE, 1);
- GivePlayerWeapon(playerid, WEAPON_SAWEDOFF, 125);
- GivePlayerWeapon(playerid, WEAPON_TEC9, 500);
- GivePlayerWeapon(playerid, WEAPON_FIREEXTINGUISHER, 500);
- }
- else if(gClass[playerid] == AIRFORCE)
- {
- GivePlayerWeapon(playerid, WEAPON_BRASSKNUCKLE, 1);
- GivePlayerWeapon(playerid, WEAPON_DEAGLE, 100);
- GivePlayerWeapon(playerid, WEAPON_AK47, 350);
- GivePlayerWeapon(playerid, WEAPON_SPRAYCAN, 500);
- }
- else if(gClass[playerid] == SPEC-OPS)
- {
- GivePlayerWeapon(playerid, WEAPON_KNIFE, 1);
- GivePlayerWeapon(playerid, WEAPON_DEAGLE, 100);
- GivePlayerWeapon(playerid, WEAPON_SAWEDOFF, 125);
- GivePlayerWeapon(playerid, WEAPON_MP5, 500);
- GivePlayerWeapon(playerid, WEAPON_M4, 350);
- GivePlayerWeapon(playerid, WEAPON_GRENADE, 5);
- }
- return 1;
- }
- stock SetPlayerClass(playerid)
- {
- new string[128], teamcolor[2];
- if(ClassPositionSet[playerid] == 0)
- {
- ClassPositionSet[playerid] = 1;
- if(gTeam[playerid] == T_ENGLAND)
- {
- SetPlayerPos(playerid, 236.1258,1931.1813,25.5000);
- SetPlayerCameraPos(playerid, 237.3132,1933.1399,25.4985);
- SetPlayerFacingAngle(playerid, 325);
- SetPlayerCameraLookAt(playerid, 236.1258,1931.1813,25.5000);
- }
- if(gTeam[playerid] == T_RUSSIA)
- {
- SetPlayerPos(playerid, -177.6316,1166.8536,24.6861);
- SetPlayerCameraPos(playerid, -176.1896,1164.8327,24.6861);
- SetPlayerFacingAngle(playerid, 220);
- SetPlayerCameraLookAt(playerid, -177.6316,1166.8536,24.6861);
- }
- if(gTeam[playerid] == T_IRAQ)
- {
- SetPlayerPos(playerid, 312.0145,2545.3313,31.3781);
- SetPlayerCameraPos(playerid, 310.4868,2546.8164,31.3781);
- SetPlayerFacingAngle(playerid, 45);
- SetPlayerCameraLookAt(playerid, 312.0145,2545.3313,31.3781);
- }
- if(gTeam[playerid] == T_MEXICO)
- {
- SetPlayerPos(playerid, -356.5544,2222.3408,50.9858);
- SetPlayerCameraPos(playerid, -354.0334,2222.3083,50.9858);
- SetPlayerFacingAngle(playerid, 270);
- SetPlayerCameraLookAt(playerid, -356.5544,2222.3408,50.9858);
- }
- }
- if(gTeam[playerid] == T_ENGLAND) teamcolor = ("g");
- if(gTeam[playerid] == T_RUSSIA) teamcolor = ("r");
- if(gTeam[playerid] == T_IRAQ) teamcolor = ("p");
- if(gTeam[playerid] == T_MEXICO) teamcolor = ("y");
- TextDrawShowForPlayer(playerid, ClassBox);
- TextDrawShowForPlayer(playerid, ClassHelpBox);
- format(string, sizeof(string), "<< ~r~LMB~w~ choose your class ~r~RMB~w~ >>");
- TextDrawSetString(ClassClick, string);
- TextDrawShowForPlayer(playerid, ClassClick);
- format(string, sizeof(string), "~b~LSHIFT ~w~to spawn");
- TextDrawSetString(ClassSpawn, string);
- TextDrawShowForPlayer(playerid, ClassSpawn);
- IsPlayerChoosingClass[playerid] = 1;
- if(ClassChoosingStep[playerid] == 0) // Class Private
- {
- format(string, sizeof(string), " < ~%s~PRIVATE ~w~CLASS >", teamcolor);
- TextDrawSetString(ClassNameLine, string);
- format(string, sizeof(string), "~r~Weapons:~w~ Knife, Deagle, MP5, M4, Smoke Grenade");
- TextDrawSetString(ClassWeapons, string);
- format(string, sizeof(string), "~y~Description:~w~ Good against infantry and light armoured");
- TextDrawSetString(ClassDescription1, string);
- format(string, sizeof(string), "vehicles, but weak against armoured vehicles.");
- TextDrawSetString(ClassDescription2, string);
- format(string, sizeof(string), "~p~Rank required:~w~ Private (rank 1)");
- TextDrawSetString(ClassRequiredRank, string);
- }
- if(ClassChoosingStep[playerid] == 1) // Class Medic
- {
- format(string, sizeof(string), " < ~%s~MEDIC ~w~CLASS >", teamcolor);
- TextDrawSetString(ClassNameLine, string);
- format(string, sizeof(string), "~r~Weapons:~w~ Katana, Silenced Pistol, MP5");
- TextDrawSetString(ClassWeapons, string);
- format(string, sizeof(string), "~y~Description:~w~ Normal against infantry, but very useful");
- TextDrawSetString(ClassDescription1, string);
- format(string, sizeof(string), "to the team because can heal others with /mheal.");
- TextDrawSetString(ClassDescription2, string);
- format(string, sizeof(string), "~p~Rank required:~w~ Specialist (rank 2)");
- TextDrawSetString(ClassRequiredRank, string);
- }
- if(ClassChoosingStep[playerid] == 2) // Class Anti-Tank
- {
- format(string, sizeof(string), " < ~%s~ANTI-TANK ~w~CLASS >", teamcolor);
- TextDrawSetString(ClassNameLine, string);
- format(string, sizeof(string), "~r~Weapons:~w~ Chainsaw, Colt 45, Shotgun, RPG");
- TextDrawSetString(ClassWeapons, string);
- format(string, sizeof(string), "~y~Description:~w~ Weak against infantry, best against");
- TextDrawSetString(ClassDescription1, string);
- format(string, sizeof(string), "armoured vehicles and combat planes.");
- TextDrawSetString(ClassDescription2, string);
- format(string, sizeof(string), "~p~Rank required:~w~ Corporal (rank 3)");
- TextDrawSetString(ClassRequiredRank, string);
- }
- if(ClassChoosingStep[playerid] == 3) // Class Engineer
- {
- format(string, sizeof(string), " < ~%s~ENGINEER ~w~CLASS >", teamcolor);
- TextDrawSetString(ClassNameLine, string);
- format(string, sizeof(string), "~r~Weapons:~w~ Knife, Sawn-off, Tec 9, Extinguisher");
- TextDrawSetString(ClassWeapons, string);
- format(string, sizeof(string), "~y~Description:~w~ Good against infantry, also efficient");
- TextDrawSetString(ClassDescription1, string);
- format(string, sizeof(string), "against armored vehicles. Can drive tanks!");
- TextDrawSetString(ClassDescription2, string);
- format(string, sizeof(string), "~p~Rank required:~w~ Second Lieutenant (rank 4)");
- TextDrawSetString(ClassRequiredRank, string);
- }
- if(ClassChoosingStep[playerid] == 4) // Class Airforce
- {
- format(string, sizeof(string), " < ~%s~AIRFORCE ~w~CLASS >", teamcolor);
- TextDrawSetString(ClassNameLine, string);
- format(string, sizeof(string), "~r~Weapons:~w~ Knuckles, Deagle, AK-47, Spray can");
- TextDrawSetString(ClassWeapons, string);
- format(string, sizeof(string), "~y~Description:~w~ Good in close combat battle, but weak");
- TextDrawSetString(ClassDescription1, string);
- format(string, sizeof(string), "against armored vehicles. Can drive any air vehicle!");
- TextDrawSetString(ClassDescription2, string);
- format(string, sizeof(string), "~p~Rank required:~w~ First Lieutenant (rank 5)");
- TextDrawSetString(ClassRequiredRank, string);
- }
- if(ClassChoosingStep[playerid] == 5) // Class Specical-Ops
- {
- format(string, sizeof(string), " < ~%s~SPECICAL-OPS ~w~CLASS >", teamcolor);
- TextDrawSetString(ClassNameLine, string);
- format(string, sizeof(string), "~r~Weapons:~w~ Knife, Deagle, Sawn-off, MP5, M4, Grenades");
- TextDrawSetString(ClassWeapons, string);
- format(string, sizeof(string), "~y~Description:~w~ Has the best weapons! Efficient against");
- TextDrawSetString(ClassDescription1, string);
- format(string, sizeof(string), "infantry + armored vehicles because of the powerful guns.");
- TextDrawSetString(ClassDescription2, string);
- format(string, sizeof(string), "~p~Rank required:~w~ Captain (rank 6)");
- TextDrawSetString(ClassRequiredRank, string);
- }
- TextDrawShowForPlayer(playerid, ClassNameLine);
- TextDrawShowForPlayer(playerid, ClassWeapons);
- TextDrawShowForPlayer(playerid, ClassDescription1);
- TextDrawShowForPlayer(playerid, ClassDescription2);
- TextDrawShowForPlayer(playerid, ClassRequiredRank);
- }
- stock ShowDialogHelp(playerid, helptype)
- {
- new dialog[768];
- switch(helptype)
- {
- case INFO:
- {
- strcat(dialog,"Welcome to server Battlefield - Project Reality! Hope you like it here!\n");
- strcat(dialog,"This server is TDM server, meaning Team Death Match. You and your team fights against other teams.\n");
- strcat(dialog,"\n");
- strcat(dialog,"With enough score, you can get a new rank, class + more benefits like more armor at spawn.\n");
- strcat(dialog,"But how can I earn score?\n");
- strcat(dialog,"You can get score by killing people, capturing gangzones and when you're on a killing spree!\n");
- strcat(dialog,"When you capture a zone, you'll earn money and score. You cant capture other team's home bases.\n");
- strcat(dialog,"In every base is a red checkpoint, where you can buy weapons, armor and refill your health.\n");
- strcat(dialog,"Our server has a lot of features, like teamchat and enabling laser on your weapon. Explore them, enjoy your stay!\n");
- strcat(dialog,"\n");
- strcat(dialog,"--> Next --> rules of the server.");
- ShowPlayerDialog(playerid, D_INFO, DIALOG_STYLE_MSGBOX, "General Info", dialog, "Next", "Cancel");
- }
- case RULES:
- {
- strcat(dialog,"..:: Battlefield - Project Reality {33CCFF}rules of the server{A9C4E4} ::..\n");
- strcat(dialog,"\n");
- strcat(dialog,"By being on this server you agree to the following rules:\n");
- strcat(dialog,"1. Don't use any program that gives you advantages over others (hacks etc).\n");
- strcat(dialog,"2. Don't insult others or make racistic comments.\n");
- strcat(dialog,"3. Don't swear/curse and spam in the main chat.\n");
- strcat(dialog,"4. Don't advertise any other server/website in any chat.\n");
- strcat(dialog,"6. Don't carpark (parking vehicle on a player to kill them).\n");
- strcat(dialog,"7. Don't helikill (killing someone with helicopter's rotor blade).\n");
- strcat(dialog,"8. Don't baserape (killing people in their bases with an armored vehicle).\n");
- strcat(dialog,"9. Don't driver drive-by (passenger drive-by allowed).\n");
- strcat(dialog,"19. Don't spawnkill (killing players when they are in spawn area)\n");
- strcat(dialog,"\n");
- strcat(dialog,"--> Next --> commands of the server.");
- ShowPlayerDialog(playerid, D_RULES, DIALOG_STYLE_MSGBOX, "Rules", dialog, "Next", "Cancel");
- }
- case COMMANDS:
- {
- strcat(dialog,"..:: Server {33CCFF}commands{A9C4E4} ::..\n");
- strcat(dialog,"\n");
- strcat(dialog,"/help, /info, /rules, /commands, /ranks, /class, /pm, /togglepm, /admins, /donors\n");
- strcat(dialog,"/report, /kill, /laseron, /laseroff, /lasercol, /resetteam (/rt), /resetclass (/rc)\n");
- strcat(dialog,"/radio, /mheal, /r, /sync, /ask, /myteam, /myrank, /afk, /changepass, /lagshoot\n");
- strcat(dialog,"/ask, /roundstats\n");
- strcat(dialog,"\n");
- strcat(dialog,"--> Next --> ranks of the server.");
- ShowPlayerDialog(playerid, D_COMMANDS, DIALOG_STYLE_MSGBOX, "Commands", dialog, "Next", "Cancel");
- }
- case RANKS:
- {
- new rank[128];
- strcat(dialog,"..:: Server {33CCFF}ranks{A9C4E4} ::..\n");
- strcat(dialog,"\n");
- format(rank, sizeof(rank), "Rank: 1 - %d score - %s\n", RANK1, RANK1NAME);
- strcat(dialog, rank);
- format(rank, sizeof(rank), "Rank: 2 - %d score - %s\n", RANK2, RANK2NAME);
- strcat(dialog, rank);
- format(rank, sizeof(rank), "Rank: 3 - %d score - %s\n", RANK3, RANK3NAME);
- strcat(dialog, rank);
- format(rank, sizeof(rank), "Rank: 4 - %d score - %s\n", RANK4, RANK4NAME);
- strcat(dialog, rank);
- format(rank, sizeof(rank), "Rank: 5 - %d score - %s\n", RANK5, RANK5NAME);
- strcat(dialog, rank);
- format(rank, sizeof(rank), "Rank: 6 - %d score - %s\n", RANK6, RANK6NAME);
- strcat(dialog, rank);
- format(rank, sizeof(rank), "Rank: 7 - %d score - %s\n", RANK7, RANK7NAME);
- strcat(dialog, rank);
- format(rank, sizeof(rank), "Rank: 8 - %d score - %s\n", RANK8, RANK8NAME);
- strcat(dialog, rank);
- format(rank, sizeof(rank), "Rank: 9 - %d score - %s\n", RANK9, RANK9NAME);
- strcat(dialog, rank);
- strcat(dialog,"\n");
- strcat(dialog,"--> Next --> classes of the server.");
- ShowPlayerDialog(playerid, D_RANKS, DIALOG_STYLE_MSGBOX, "Ranks", dialog, "Next", "Cancel");
- }
- case CLASS:
- {
- strcat(dialog,"COMING\n");
- strcat(dialog,"\n");
- strcat(dialog,"--> Next --> info of the server.");
- ShowPlayerDialog(playerid, D_CLASSINFO, DIALOG_STYLE_MSGBOX, "Classes", dialog, "Next", "Cancel");
- }
- case DONOR:
- {
- if(PlayerInfo[playerid][pVIP] == 1)
- {
- strcat(dialog,"{FFFFFF}..:: Battlefield - Project Reality {99FF00}donor commands{FFFFFF} ::..\n");
- strcat(dialog,"\n");
- strcat(dialog,"{99FF00}Donor Rank 1 -\n");
- strcat(dialog,"{FFFFFF}------------------------\n");
- strcat(dialog,"{99FF00}Use '$' in front of text, to talk in donor chat.\n");
- strcat(dialog,"{99FF00}/dhelp (shows donor commands)\n");
- strcat(dialog,"{99FF00}/dheal (can heal himself - once per death)\n");
- strcat(dialog,"{99FF00}/dnos (adds x10 nitro to the car)\n");
- strcat(dialog,"{99FF00}/dnrg (spawns a NRG-500)\n");
- strcat(dialog,"{99FF00}/dhot (spawns a Hotknife)\n");
- ShowPlayerDialog(playerid, D_DONOR, DIALOG_STYLE_MSGBOX, "$$ DONOR RANK COMMANDS $$", dialog, "Close", "");
- }
- else if(PlayerInfo[playerid][pVIP] == 2)
- {
- strcat(dialog,"{FFFFFF}..:: Battlefield - Project Reality {FFB13D}donor commands{FFFFFF} ::..\n");
- strcat(dialog,"\n");
- strcat(dialog,"{FFB13D}Donor Rank 2 -\n");
- strcat(dialog,"{FFFFFF}------------------------\n");
- strcat(dialog,"{FFB13D}Use '$' in front of text, to talk in donor chat.\n");
- strcat(dialog,"{FFB13D}/dhelp (shows donor commands)\n");
- strcat(dialog,"{FFB13D}/dheal (can heal himself - once per death)\n");
- strcat(dialog,"{FFB13D}/dnos (adds x10 nitro to the car)\n");
- strcat(dialog,"{FFB13D}/dnrg (spawns a NRG-500)\n");
- strcat(dialog,"{FFB13D}/dhot (spawns a Hotknife)\n");
- strcat(dialog,"\n");
- strcat(dialog,"{FFB13D}/dsay (displays a message on everyone's screen)\n");
- strcat(dialog,"{FFB13D}/denf (spawns a police truck (enforcer))\n");
- strcat(dialog,"{FFB13D}/dqua (spawns an ATV (quad))\n");
- ShowPlayerDialog(playerid, D_DONOR, DIALOG_STYLE_MSGBOX, "$$ DONOR RANK COMMANDS $$", dialog, "Close", "");
- }
- else if(PlayerInfo[playerid][pVIP] == 3)
- {
- strcat(dialog,"{FFFFFF}..:: Battlefield - Project Reality {C71585}donor commands{FFFFFF} ::..\n");
- strcat(dialog,"\n");
- strcat(dialog,"{C71585}Donor Rank 3 -\n");
- strcat(dialog,"{FFFFFF}------------------------\n");
- strcat(dialog,"{C71585}Use '$' in front of text, to talk in donor chat.\n");
- strcat(dialog,"{C71585}/dhelp (shows donor commands)\n");
- strcat(dialog,"{C71585}/dheal (can heal himself - once per death)\n");
- strcat(dialog,"{C71585}/dnos (adds x10 nitro to the car)\n");
- strcat(dialog,"{C71585}/dnrg (spawns a NRG-500)\n");
- strcat(dialog,"{C71585}/dhot (spawns a Hotknife)\n");
- strcat(dialog,"\n");
- strcat(dialog,"{C71585}/dsay (displays a message on everyone's screen)\n");
- strcat(dialog,"{C71585}/denf (spawns a police truck (enforcer))\n");
- strcat(dialog,"{C71585}/dqua (spawns an ATV (quad))\n");
- strcat(dialog,"\n");
- strcat(dialog,"{C71585}/dskin (you can change your skin to whatever you want)\n");
- strcat(dialog,"{C71585}/dfix (you can repair your vehicle once in 5 minutes))\n");
- ShowPlayerDialog(playerid, D_DONOR, DIALOG_STYLE_MSGBOX, "$$ DONOR RANK COMMANDS $$", dialog, "Close", "");
- }
- }
- }
- return 1;
- }
- stock TeamMembers(teamid)
- {
- new players = 0;
- foreach(Player, i)
- {
- if(gTeam[i] == teamid)
- {
- if(IsPlayerChoosingTeam[i] == 0) // If the player isn't choosing a class.
- {
- players ++;
- }
- }
- }
- return players;
- }
- stock IsTeamFull(teamid)
- {
- if(teamid == T_ENGLAND)
- {
- if(TeamMembers(teamid) > TeamMembers(T_RUSSIA) || TeamMembers(teamid) > TeamMembers(T_MEXICO) || TeamMembers(teamid) > TeamMembers(T_IRAQ))
- {
- return 1;
- }
- else return 0;
- }
- if(teamid == T_RUSSIA)
- {
- if(TeamMembers(teamid) > TeamMembers(T_ENGLAND) || TeamMembers(teamid) > TeamMembers(T_MEXICO) || TeamMembers(teamid) > TeamMembers(T_IRAQ))
- {
- return 1;
- }
- else return 0;
- }
- if(teamid == T_MEXICO)
- {
- if(TeamMembers(teamid) > TeamMembers(T_RUSSIA) || TeamMembers(teamid) > TeamMembers(T_ENGLAND) || TeamMembers(teamid) > TeamMembers(T_IRAQ))
- {
- return 1;
- }
- else return 0;
- }
- if(teamid == T_IRAQ)
- {
- if(TeamMembers(teamid) > TeamMembers(T_RUSSIA) || TeamMembers(teamid) > TeamMembers(T_MEXICO) || TeamMembers(teamid) > TeamMembers(T_ENGLAND))
- {
- return 1;
- }
- else return 0;
- }
- return 0;
- }
- stock SendAdminMessage(color,string[])
- {
- foreach(Player,i)
- {
- if(PlayerInfo[i][pAdmin] > 0)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- stock SendDonorMessage(color, string[])
- {
- foreach(Player,i)
- {
- if(PlayerInfo[i][pVIP] > 0)
- {
- SendClientMessage(i, color, string);
- }
- }
- }
- stock GivePlayerScore(playerid, score)
- {
- SetPlayerScore(playerid, GetPlayerScore(playerid)+score);
- return 1;
- }
- stock IsVehicleEngineer(vehicleid)
- {
- switch(GetVehicleModel(vehicleid))
- {
- case 432: return 1;
- }
- return 0;
- }
- stock IsVehicleAirforce(vehicleid)
- {
- switch(GetVehicleModel(vehicleid))
- {
- case 520, 425, 447, 476: return 1;
- }
- return 0;
- }
- stock Name(playerid)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- return name;
- }
- stock ShowRoundStats(playerid)
- {
- new dialog[512], stats[128];
- strcat(dialog, "{FFFFFF}..:: "COLOR_LIME"Round stats{FFFFFF} ::..\n");
- strcat(dialog, "\n");
- format(stats, sizeof stats, "Players killed: "COLOR_GREEN"%d"COLOR_WHITE"\n", RoundInfo[playerid][Kills]);
- strcat(dialog, stats);
- format(stats, sizeof stats, "Damage done: "COLOR_RED"%.2f"COLOR_WHITE"\n", RoundInfo[playerid][Damage]);
- strcat(dialog, stats);
- format(stats, sizeof stats, "Zones captured: "COLOR_GREEN"%d"COLOR_WHITE"\n", RoundInfo[playerid][Zones]);
- strcat(dialog, stats);
- strcat(dialog, "\n");
- strcat(dialog, "Please type /roundstats to enable/disable this box!");
- ShowPlayerDialog(playerid, D_ROUNDSTATS, DIALOG_STYLE_MSGBOX, " ", dialog, "Close", "");
- RoundInfo[playerid][Kills] = 0;
- RoundInfo[playerid][Damage] = 0.00;
- RoundInfo[playerid][Zones] = 0;
- }
- stock IsPlayerCloseToEnemy(playerid)
- {
- new bool:IsClose = false, Float:Pos[3];
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- foreach(Player, i)
- {
- if(IsPlayerInRangeOfPoint(i, 60.0, Pos[0], Pos[1], Pos[2]) && gTeam[i] != gTeam[playerid])
- {
- if(gTeam[playerid] != gTeam[i])
- {
- IsClose = true;
- }
- }
- }
- return IsClose;
- }
- stock UpdatePlayerTeam(playerid)
- {
- new team = gTeam[playerid];
- switch(team)
- {
- case T_ENGLAND:
- {
- SetPlayerTeam(playerid, T_ENGLAND);
- }
- case T_RUSSIA:
- {
- SetPlayerTeam(playerid, T_RUSSIA);
- }
- case T_IRAQ:
- {
- SetPlayerTeam(playerid, T_IRAQ);
- }
- case T_MEXICO:
- {
- SetPlayerTeam(playerid, T_MEXICO);
- }
- }
- }
- stock Rank(playerid)
- {
- new rank;
- if (GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) < RANK2) rank = 1;
- else if(GetPlayerScore(playerid) >= RANK2 && GetPlayerScore(playerid) < RANK3) rank = 2;
- else if(GetPlayerScore(playerid) >= RANK3 && GetPlayerScore(playerid) < RANK4) rank = 3;
- else if(GetPlayerScore(playerid) >= RANK4 && GetPlayerScore(playerid) < RANK5) rank = 4;
- else if(GetPlayerScore(playerid) >= RANK5 && GetPlayerScore(playerid) < RANK6) rank = 5;
- else if(GetPlayerScore(playerid) >= RANK6 && GetPlayerScore(playerid) < RANK7) rank = 6;
- else if(GetPlayerScore(playerid) >= RANK7 && GetPlayerScore(playerid) < RANK8) rank = 7;
- else if(GetPlayerScore(playerid) >= RANK8) rank = 8;
- return rank;
- }
- stock ClassName(playerid)
- {
- new classname[32];
- if (gClass[playerid] == ASSAULT) classname = ("Assault");
- else if(gClass[playerid] == MEDIC) classname = ("Medic");
- else if(gClass[playerid] == ANTI-TANK) classname = ("Anti-Tank");
- else if(gClass[playerid] == ENGINEER) classname = ("Engineer");
- else if(gClass[playerid] == AIRFORCE) classname = ("Airforce");
- else if(gClass[playerid] == SPEC-OPS) classname = ("Spec-Ops");
- return classname;
- }
- stock PlayerTeamName(playerid)
- {
- new team[32];
- if (gTeam[playerid] == T_ENGLAND) team = ("England");
- else if(gTeam[playerid] == T_RUSSIA) team = ("Russia");
- else if(gTeam[playerid] == T_IRAQ) team = ("Iraq");
- else if(gTeam[playerid] == T_MEXICO) team = ("Mexico");
- return team;
- }
- stock TeamName(teamid)
- {
- new team[32];
- if(teamid == T_ENGLAND) team = ("England");
- if(teamid == T_RUSSIA) team = ("Russia");
- if(teamid == T_IRAQ) team = ("Iraq");
- if(teamid == T_MEXICO) team = ("Mexico");
- return team;
- }
- stock TeamColor(playerid)
- {
- new color;
- if (gTeam[playerid] == T_ENGLAND) color = C_DGREEN;
- else if(gTeam[playerid] == T_RUSSIA) color = C_RED;
- else if(gTeam[playerid] == T_IRAQ) color = C_PURPLE;
- else if(gTeam[playerid] == T_MEXICO) color = C_YELLOW;
- return color;
- }
- stock TeamSkin(playerid)
- {
- new skin;
- if (gTeam[playerid] == T_ENGLAND) skin = T_ENGLAND_SKIN;
- else if(gTeam[playerid] == T_RUSSIA) skin = T_RUSSIA_SKIN;
- else if(gTeam[playerid] == T_IRAQ) skin = T_IRAQ_SKIN;
- else if(gTeam[playerid] == T_MEXICO) skin = T_MEXICO_SKIN;
- return skin;
- }
- stock RankName(playerid)
- {
- new rank = Rank(playerid);
- new rankname[24];
- if(rank == 1) rankname = RANK1NAME;
- if(rank == 2) rankname = RANK2NAME;
- if(rank == 3) rankname = RANK3NAME;
- if(rank == 4) rankname = RANK4NAME;
- if(rank == 5) rankname = RANK5NAME;
- if(rank == 6) rankname = RANK6NAME;
- if(rank == 7) rankname = RANK7NAME;
- if(rank == 8) rankname = RANK8NAME;
- if(rank == 9) rankname = RANK9NAME;
- return rankname;
- }
- stock AdminLevelName(playerid)
- {
- new str[32];
- if (PlayerInfo[playerid][pAdmin] == 1) str = (ADMINRANK1);
- else if (PlayerInfo[playerid][pAdmin] == 2) str = (ADMINRANK2);
- else if (PlayerInfo[playerid][pAdmin] == 3) str = (ADMINRANK3);
- else if (PlayerInfo[playerid][pAdmin] == 4) str = (ADMINRANK4);
- else if (PlayerInfo[playerid][pAdmin] == 5) str = (ADMINRANK5);
- else if (PlayerInfo[playerid][pAdmin] == 6) str = (ADMINRANK6);
- return str;
- }
- stock ZoneName(checkpointid)
- {
- new str[32];
- if (checkpointid == BigEarCP) str = ("Big Ear");
- else if(checkpointid == SnakeCP) str = ("Snake's Farm");
- else if(checkpointid == TeeMotelCP) str = ("Tee Pee Motel");
- else if(checkpointid == OilCP) str = ("Oil Factory");
- else if(checkpointid == SeaCP) str = ("Sun Beach");
- else if(checkpointid == HillCP) str = ("Desert Hill");
- else if(checkpointid == DamCP) str = ("The Mighty Dam");
- return str;
- }
- stock PlayerGangColor(playerid)
- {
- new str;
- if (gTeam[playerid] == T_ENGLAND) str =(C_GANG_GREEN);
- else if(gTeam[playerid] == T_RUSSIA) str =(C_GANG_RED);
- else if(gTeam[playerid] == T_IRAQ) str =(C_GANG_PURPLE);
- else if(gTeam[playerid] == T_MEXICO) str =(C_GANG_YELLOW);
- return str;
- }
- stock PlayerArea(playerid)
- {
- new pZone;
- if(IsPlayerInDynamicArea(playerid, BigEarArea))
- {
- GangZoneFlashForAll(BigEarZone, PlayerGangColor(playerid));
- pZone = BigEarZone;
- }
- else if(IsPlayerInDynamicArea(playerid, SnakeArea))
- {
- GangZoneFlashForAll(SnakeZone, PlayerGangColor(playerid));
- pZone = SnakeZone;
- }
- else if(IsPlayerInDynamicArea(playerid, TeeMotelArea))
- {
- GangZoneFlashForAll(TeeMotelZone, PlayerGangColor(playerid));
- pZone = TeeMotelZone;
- }
- else if(IsPlayerInDynamicArea(playerid, OilArea))
- {
- GangZoneFlashForAll(OilZone, PlayerGangColor(playerid));
- pZone = OilZone;
- }
- else if(IsPlayerInDynamicArea(playerid, SeaArea))
- {
- GangZoneFlashForAll(SeaZone, PlayerGangColor(playerid));
- pZone = SeaZone;
- }
- else if(IsPlayerInDynamicArea(playerid, HillArea))
- {
- GangZoneFlashForAll(HillZone, PlayerGangColor(playerid));
- pZone = HillZone;
- }
- else if(IsPlayerInDynamicArea(playerid, DamArea))
- {
- GangZoneFlashForAll(DamZone, PlayerGangColor(playerid));
- pZone = DamZone;
- }
- return pZone;
- }
- stock SetZoneColor(zonename, playerid)
- {
- if(zonename == BigEarZone)
- {
- BigEarColor = PlayerGangColor(playerid);
- }
- if(zonename == SnakeZone)
- {
- SnakeColor = PlayerGangColor(playerid);
- }
- if(zonename == TeeMotelZone)
- {
- TeeMotelColor = PlayerGangColor(playerid);
- }
- if(zonename == OilZone)
- {
- OilColor = PlayerGangColor(playerid);
- }
- if(zonename == SeaZone)
- {
- SeaColor = PlayerGangColor(playerid);
- }
- if(zonename == HillZone)
- {
- HillColor = PlayerGangColor(playerid);
- }
- if(zonename == DamZone)
- {
- DamColor = PlayerGangColor(playerid);
- }
- }
- stock SetRank3DText(playerid)
- {
- new text[128], Float: XYZ[3];
- GetPlayerPos(playerid, XYZ[0], XYZ[1], XYZ[2]);
- Delete3DTextLabel(RankLabel[playerid]);
- if(aDuty[playerid] == 1 && AFK[playerid] == 1)
- {
- format(text, sizeof(text), "Administrator on duty and AFK\nDo not damage!");
- RankLabel[playerid] = Create3DTextLabel(text, 0x15FF00AA, XYZ[0], XYZ[1], XYZ[2]+0.5, 100.0, 0, 0);
- }
- else if(aDuty[playerid] == 1)
- {
- format(text, sizeof(text), "Administrator on duty\nDo not damage!");
- RankLabel[playerid] = Create3DTextLabel(text, 0x15FF00AA, XYZ[0], XYZ[1], XYZ[2]+0.5, 100.0, 0, 0);
- }
- else if(AFK[playerid] == 1)
- {
- format(text, sizeof(text), "AFK");
- RankLabel[playerid] = Create3DTextLabel(text, 0x2143DBFF, XYZ[0], XYZ[1], XYZ[2]+0.5, 100.0, 0, 0);
- }
- else
- {
- format(text, sizeof(text), "%s\n%s", RankName(playerid), ClassName(playerid));
- RankLabel[playerid] = Create3DTextLabel(text, TeamColor(playerid), XYZ[0], XYZ[1], XYZ[2]+0.5, 100.0, 0, 0);
- }
- Attach3DTextLabelToPlayer(RankLabel[playerid], playerid, 0.0, 0.0, 0.5);
- return 1;
- }
- //====================================================
- //====================================================
Add Comment
Please, Sign In to add comment