Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #include <streamer>
- #include <YSI\y_ini>
- #if defined FILTERSCRIPT
- #else
- main()
- {
- print("\n----------------------------------");
- print(" War Zone");
- print("----------------------------------\n");
- }
- #define MAX_STRING 256
- #define PRESSED(%0) \
- (((newkeys & (%0)) == (%0)) && ((oldkeys & (%0)) != (%0)))
- new Cooldown[MAX_PLAYERS];
- new gTeam[MAX_PLAYERS];
- new Text:ShadowsRandom;
- new gateR1; //Russian gate
- new elevator1; //Russian elevator
- new HPRus;
- new RusArmour;
- new HPUS;
- new USArmour;
- //textdraws
- new Text:Health[MAX_PLAYERS];
- new Text:Armour[MAX_PLAYERS];
- new Text:Warzone;
- new Text:Russian;
- new Text:USA;
- new gSeconds = 0; // counts how many seconds server is running
- new Text: gText; // global "Text"
- new Text:SPEEDOS[MAX_PLAYERS]; //speedometer
- forward LoadObjectsForPlayer( playerid );
- forward ObjectsLoaded( playerid );
- #define TEAM_RUSSIA 1
- #define TEAM_USA 2
- forward RandomMessage();
- //colors
- #define COLOR_GREY 0xAFAFAFAA
- #define COLOR_GREEN 0x33AA33AA
- #define COLOR_RED 0xAA3333AA
- #define COLOR_YELLOW 0xFFFF00AA
- #define COLOR_WHITE 0xFFFFFFAA
- #define COLOR_BLUE 0x0000BBAA
- #define COLOR_LIGHTBLUE 0x33CCFFAA
- #define COLOR_ORANGE 0xFF9900AA
- #define COLOR_RED 0xAA3333AA
- #define COLOR_LIME 0x10F441AA
- #define COLOR_MAGENTA 0xFF00FFFF
- #define COLOR_NAVY 0x000080AA
- #define COLOR_AQUA 0xF0F8FFAA
- #define COLOR_CRIMSON 0xDC143CAA
- #define COLOR_FLBLUE 0x6495EDAA
- #define COLOR_BISQUE 0xFFE4C4AA
- #define COLOR_BLACK 0x000000AA
- #define COLOR_CHARTREUSE 0x7FFF00AA
- #define COLOR_BROWN 0XA52A2AAA
- #define COLOR_CORAL 0xFF7F50AA
- #define COLOR_GOLD 0xB8860BAA
- #define COLOR_GREENYELLOW 0xADFF2FAA
- #define COLOR_INDIGO 0x4B00B0AA
- #define COLOR_IVORY 0xFFFF82AA
- #define COLOR_LAWNGREEN 0x7CFC00AA
- #define COLOR_LIMEGREEN 0x32CD32AA //<--- Dark lime
- #define COLOR_MIDNIGHTBLUE 0X191970AA
- #define COLOR_MAROON 0x800000AA
- #define COLOR_OLIVE 0x808000AA
- #define COLOR_ORANGERED 0xFF4500AA
- #define COLOR_PINK 0xFFC0CBAA // - Light light pink
- #define COLOR_SEAGREEN 0x2E8B57AA
- #define COLOR_SPRINGGREEN 0x00FF7FAA
- #define COLOR_TOMATO 0xFF6347AA // - Tomato >:/ sounds wrong lol... well... :P
- #define COLOR_YELLOWGREEN 0x9ACD32AA //- like military green
- #define COLOR_MEDIUMAQUA 0x83BFBFAA
- #define COLOR_MEDIUMMAGENTA 0x8B008BAA // dark magenta ^^
- #endif
- public OnGameModeInit()
- {
- SetGameModeText("WZ 1.0");
- AddPlayerClass(287, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddPlayerClass(287, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
- AddStaticVehicle(520,2095.7041,753.5626,10.5405,268.4791,125,125);
- SetTimer("ScoreChecker", 1000, true);
- Warzone = TextDrawCreate(548, 130, "War Zone");
- TextDrawFont(Text:Warzone, 0);
- TextDrawLetterSize(Text:Warzone , 0.5, 3.5);
- TextDrawColor(Text:Warzone , 0xFF8000FF);
- TextDrawSetOutline(Text:Warzone , 0);
- TextDrawSetProportional(Text:Warzone , 1);
- TextDrawSetShadow(Text:Warzone , 1);
- Russian = TextDrawCreate(48, 173, "<Russia>");
- USA = TextDrawCreate(64, 201, "USA");
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- Health[i] = TextDrawCreate(566.000000, 67.000000, "100%");
- TextDrawBackgroundColor(Health[i], 255);
- TextDrawFont(Health[i], 1);
- TextDrawLetterSize(Health[i], 0.219999, 0.899999);
- TextDrawColor(Health[i], -1);
- TextDrawSetOutline(Health[i], 1);
- TextDrawSetProportional(Health[i], 1);
- Armour[i] = TextDrawCreate(566.000000, 44.000000, "100%");
- TextDrawBackgroundColor(Armour[i], 255);
- TextDrawFont(Armour[i], 1);
- TextDrawLetterSize(Armour[i], 0.219999, 0.899999);
- TextDrawColor(Armour[i], -1);
- TextDrawSetOutline(Armour[i], 1);
- TextDrawSetProportional(Armour[i], 1);
- }
- SetTimer("TimeServerRunning", 1000, true);
- SetTimer("vitals",1000,1);
- //:::::::::::::::::::::::::::::::::::::::::::russia::::::::::::::::::::::::::::::::::::::::::::::::::::
- //russian Gates
- gateR1 = CreateObject(986, -1530.72, 482.47, 7.85, 0.00, 0.00, 0.00); //closed gater
- //elevators
- elevator1 = CreateObject(18769, -1426.42, 478.65, 5.61, 0.00, 0.00, 0.00); //Russ elevator
- //cd timer
- SetTimer("CooldownTimer",1000,true);
- //russian HQ objects
- CreateObject(10830, -1841.97, 67.83, 19.30, 0.00, 0.00, 45.00); //Big hangar
- CreateObject(18759, -1541.05, 347.51, 23.54, 90.00, 0.00, 180.00); //skull
- CreateObject(18750, -1402.36, 449.20, 48.88, 90.00, 0.00, 180.00); //samp
- CreateObject(10829, -1522.75, 484.35, 6.17, 0.00, 0.00, 89.00); //Small house at the gates
- CreateObject(18752, -1149.95, 650.24, -5.60, 0.00, 0.00, 0.00); //Volcano
- //russian cars
- AddStaticVehicle(433,-1478.6230,458.4825,7.6245,0.1573,43,0); // Barrack1Rus
- AddStaticVehicle(433,-1472.8566,458.2283,7.6175,359.8017,43,0); // Barrack2Rus
- AddStaticVehicle(433,-1466.7430,458.9492,7.6178,2.1256,43,0); // Barrack3Rus
- AddStaticVehicle(433,-1460.1853,459.5169,7.6209,2.2832,43,0); // Barrack4Rus
- AddStaticVehicle(476,-1453.7758,505.0262,18.6973,269.5388,43,0); // RussianAir1
- AddStaticVehicle(476,-1408.5402,493.0725,18.6662,270.2772,43,0); // RussianAir2
- AddStaticVehicle(476,-1335.7068,507.5463,18.6710,271.2304,43,0); // RussianAir3
- AddStaticVehicle(476,-1306.5942,495.2166,18.6709,271.6489,43,0); // RussianAir4
- AddStaticVehicle(469,-1454.2009,492.8001,18.9907,270.0278,43,0); //Heli
- AddStaticVehicle(469,-1607.7517,283.7738,7.6213,179.9140,43,0); //heli2
- AddStaticVehicle(469,-1418.1304,519.1664,18.2561,267.8859,43,0); // Heli3
- AddStaticVehicle(470,-1405.4955,457.9366,7.6176,359.9135,43,0); // Patriot1
- AddStaticVehicle(470,-1396.0319,457.0566,7.6205,1.3433,43,0); // Patriot2
- AddStaticVehicle(470,-1387.2916,457.3072,7.6348,359.6477,43,0); // Patriot3
- AddStaticVehicle(470,-1380.5962,458.4571,7.6238,0.4840,43,0); // Patriot4
- AddStaticVehicle(430,-1454.2769,492.8647,-0.3180,88.8909,46,26); // BoatSpawn2
- AddStaticVehicle(430,-1281.6605,484.8924,-0.1539,273.4125,46,26); // BoatSpawn3
- AddStaticVehicle(430,-1471.6229,487.9530,-0.1638,91.7132,46,26); // BoatSpawn4
- AddStaticVehicle(471,-1505.4823,480.8822,6.6696,179.4567,103,111); // QuadRus1
- AddStaticVehicle(471,-1503.6810,480.8950,6.6683,179.3363,120,114); // QuadRus2
- AddStaticVehicle(471,-1501.9218,480.8925,6.6689,178.8771,74,91); // QuadRus3
- AddStaticVehicle(471,-1500.1217,481.0065,6.6657,182.1629,120,112); // QuadRus4
- //::::::::::::::::::::::::::::::::::::::::::USA:::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- AddStaticVehicle(432,-1529.5184,417.1947,7.1948,91.6082,43,0); // Rhino1
- AddStaticVehicle(432,-1529.6752,410.0621,7.1948,90.1931,43,0); // Rhino2
- AddStaticVehicle(432,-1529.5027,426.5029,7.1948,91.3376,43,0); // Rhino3
- AddStaticVehicle(432,-1529.4803,435.2108,7.1948,90.4148,43,0); // Rhino4
- AddStaticVehicle(476,-2231.9016,2261.7383,5.5296,183.2060,43,0); // USA-Air-1
- AddStaticVehicle(476,-2247.2988,2261.7244,5.5238,178.5792,0,0); // USA-Air-2
- AddStaticVehicle(476,-2157.4795,2260.4600,5.3791,89.5623,0,0); // USA-Air-3
- AddStaticVehicle(476,-2158.5039,2235.1145,5.3764,88.8704,0,0); // USA-Air-4
- AddStaticVehicle(476,-2162.1340,2209.0837,5.3768,146.6770,0,0); // USA-Air-5
- AddStaticVehicle(469,-2185.8196,2287.6917,6.9349,178.4588,0,0); // USA-Air-6
- AddStaticVehicle(469,-2158.6675,2287.7749,7.1559,184.4485,0,0); // USA-Air-7
- AddStaticVehicle(469,-2158.7859,2311.7280,7.1395,178.4971,0,0); // USA-Air-8
- AddStaticVehicle(469,-2187.3516,2313.7854,7.1370,176.3093,0,0); // USA-Air-9
- AddStaticVehicle(469,-2227.4651,2326.3206,7.5620,175.0905,0,0); // USA-Air-10
- AddStaticVehicle(433,-2271.0859,2319.7651,5.2569,271.0697,75,10); // Usa-car-1
- AddStaticVehicle(433,-2270.1343,2325.6755,5.2529,270.0114,75,10); // Usa-car-2
- AddStaticVehicle(433,-2271.2954,2331.7371,5.2549,270.1436,75,10); // Usa-car-3
- AddStaticVehicle(433,-2272.1743,2339.0193,5.2490,270.6492,75,10); // Usa-car-4
- AddStaticVehicle(470,-2252.4805,2336.1741,4.8040,89.8434,19,2); // Usa-car-5
- AddStaticVehicle(470,-2253.2014,2332.9866,4.8074,89.2273,19,2); // Usa-car-6
- AddStaticVehicle(470,-2252.3655,2329.9407,4.8039,90.6011,19,2); // Usa-car-7
- AddStaticVehicle(470,-2252.8333,2326.8762,4.8080,90.9587,19,2); // Usa-car-8
- AddStaticVehicle(470,-2253.2053,2323.9214,4.8063,90.2840,19,2); // Usa-car-9
- AddStaticVehicle(470,-2252.7144,2320.8201,4.8074,90.4475,19,2); // Usa-car-10
- AddStaticVehicle(432,-2283.8445,2342.0916,5.2333,358.0948,82,59); // Usa-car-11
- AddStaticVehicle(432,-2291.6482,2341.3120,5.4555,0.6973,82,59); // Usa-car-12
- AddStaticVehicle(432,-2299.2195,2341.3484,5.1503,2.2537,82,59); // Usa-car-13
- AddStaticVehicle(432,-2305.1206,2330.4285,4.9919,359.4791,82,59); // Usa-car-14
- AddStaticVehicle(432,-2239.1699,2276.4951,4.9975,2.0445,82,59); // Usa-car-15
- AddStaticVehicle(432,-2285.1262,2282.7998,4.9779,273.1414,82,59); // Usa-car-16
- //pickups
- HPRus = CreatePickup(1240, 23, -1386.1161,490.2056,21.2500, 0);
- RusArmour = CreatePickup(1242, 23, -1385.5709,492.7346,21.2500, 0);
- HPUS = CreatePickup(1240, 23, -2280.4575,2291.9885,4.9629, 0);
- USArmour = CreatePickup(1242, 23, -2280.3860,2294.5652,4.9631, 0);
- //text draw
- print("Texdraw by Twinki loading.... ");
- print(">>> loading... ");
- print("Texdraw's loaded");
- SetTimer("RandomMessage",10000,1);
- ShadowsRandom = TextDrawCreate(1.000000, 437.000000, "TW: Visit our www.sa-mp.com");
- TextDrawBackgroundColor(ShadowsRandom, 65535);
- TextDrawFont(ShadowsRandom, 0);
- TextDrawLetterSize(ShadowsRandom, 0.500000, 1.000000);
- TextDrawColor(ShadowsRandom, -16776961);
- TextDrawSetOutline(ShadowsRandom, 1);
- TextDrawSetProportional(ShadowsRandom, 1);
- TextDrawUseBox(ShadowsRandom, 1);
- TextDrawBoxColor(ShadowsRandom, 255);
- TextDrawTextSize(ShadowsRandom, 648.000000, 0.000000);
- return 1;
- }
- public TimeServerRunning() {
- new string[16];
- TextDrawDestroy(gText);
- gSeconds++;
- format(string, sizeof string, "%s", TimeConvert(gSeconds));
- gText = TextDrawCreate(79, 323, string);
- TextDrawUseBox(gText, true);
- TextDrawTextSize(gText, 50.0, 20.0);
- TextDrawShowForAll(gText);
- }
- /*
- TimeConvert(time) {
- new minutes;
- new seconds;
- new string[256];
- */
- TimeConvert(time) {
- new minutes;
- new seconds;
- new string[128];
- if(time > 59){
- minutes = floatround(time/60);
- seconds = floatround(time - minutes*60);
- if(seconds>9)format(string,sizeof(string),"%d:%d",minutes,seconds);
- else format(string,sizeof(string),"%d:0%d",minutes,seconds);
- }
- else{
- seconds = floatround(time);
- if(seconds>9)format(string,sizeof(string),"0:%d",seconds);
- else format(string,sizeof(string),"0:0%d",seconds);
- }
- return string;
- }
- new RandomMessages[][] =
- {
- "Server: Enjoy the day!",
- "Server: If you want to text-to-speech type /language",
- "Server: For any help feel free to type /help!",
- "Server: You can request a song from the Admin! Type /request!",
- "Server: Use @ to speak with team!",
- "Server: To send someone private message, double click on their name in the score list!"
- };
- public RandomMessage()
- {
- TextDrawSetString(ShadowsRandom, RandomMessages[random(sizeof(RandomMessages))]);
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- SetPlayerPos(playerid,1541.2833, -1362.4741, 329.6457);
- SetPlayerFacingAngle(playerid, 360);
- SetPlayerCameraLookAt(playerid,1541.2833, -1362.4741, 329.6457);
- SetPlayerCameraPos(playerid,1540.8374,-1358.4910,329.4645);
- SetPlayerTeamFromClass(playerid, classid);
- return 1;
- }
- SetPlayerTeamFromClass(playerid, classid)
- {
- if(classid == 0)
- {
- gTeam[playerid] = TEAM_RUSSIA;
- SetPlayerTeam(playerid,TEAM_RUSSIA);
- GameTextForPlayer(playerid,"~r~Russia",2000,3);
- TextDrawShowForPlayer(playerid, Text:Russian);
- TextDrawFont(Text:Russian , 0);
- TextDrawLetterSize(Text:Russian , 0.5, 3.5);
- TextDrawColor(Text:Russian , 0xFF0000FF);
- TextDrawSetOutline(Text:Russian , 0);
- TextDrawSetProportional(Text:Russian , 1);
- TextDrawSetShadow(Text:Russian , 1);
- TextDrawShowForPlayer(playerid, Text:Russian);
- TextDrawHideForPlayer(playerid, Text:USA);
- }
- else if(classid == 1)
- {
- gTeam[playerid] = TEAM_USA;
- SetPlayerTeam(playerid,TEAM_USA);
- GameTextForPlayer(playerid,"~b~USA",2000,3);
- TextDrawShowForPlayer(playerid, Text:USA);
- TextDrawFont(Text:USA , 0);
- TextDrawLetterSize(Text:USA , 0.5, 3.5);
- TextDrawColor(Text:USA , 0xFF8040FF);
- TextDrawSetOutline(Text:USA , 1);
- TextDrawSetProportional(Text:USA , 1);
- TextDrawSetShadow(Text:USA , 1);
- TextDrawShowForPlayer(playerid, Text:USA);
- TextDrawHideForPlayer(playerid, Text:Russian);
- }
- }
- new VehicleNames2[][]= {
- {"Landstalker"}, {"Bravura"}, {"Buffalo"}, {"Linerunner"}, {"Perrenial"},
- {"Sentinel"}, {"Dumper"}, {"Firetruck"}, {"Trashmaster"}, {"Stretch"},
- {"Manana"}, {"Infernus"}, {"Voodoo"}, {"Pony"}, {"Mule"}, {"Cheetah"},
- {"Ambulance"}, {"Leviathan"}, {"Moonbeam"}, {"Esperanto"}, {"Taxi"},
- {"Washington"}, {"Bobcat"}, {"Mr Whoopee"}, {"BF Injection"}, {"Hunter"},
- {"Premier"}, {"Enforcer"}, {"Securicar"}, {"Banshee"}, {"Predator"},
- {"Bus"}, {"Rhino"}, {"Barracks"}, {"Hotknife"}, {"Trailer 1"}, {"Previon"},
- {"Coach"}, {"Cabbie"}, {"Stallion"}, {"Rumpo"}, {"RC Bandit"}, {"Romero"},
- {"Packer"}, {"Monster"}, {"Admiral"}, {"Squalo"}, {"Sparrow"},
- {"Pizzaboy"}, {"Tram"}, {"Trailer 2"}, {"Turismo"}, {"Speeder"}, {"Reefer"},
- {"Tropic"}, {"Flatbed"}, {"Yankee"}, {"Caddy"}, {"Solair"},
- {"Berkley's RC Van"}, {"Skimmer"}, {"PCJ-600"}, {"Faggio"}, {"Freeway"},
- {"RC Baron"}, {"RC Raider"}, {"Glendale"}, {"Oceanic"}, {"Sanchez"},
- {"Seasparrow"}, {"Patriot"}, {"Quad"}, {"Coastguard"}, {"Dinghy"}, {"Hermes"},
- {"Sabre"}, {"Rustler"}, {"ZR-350"}, {"Walton"}, {"Regina"}, {"Comet"},
- {"BMX"}, {"Burrito"}, {"Camper"}, {"Marquis"}, {"Baggage"}, {"Dozer"},
- {"Maverick"}, {"News Maverick"}, {"Rancher"}, {"FBI Rancher"}, {"Virgo"},
- {"Greenwood"}, {"Jetmax"}, {"Hotring"}, {"Sandking"}, {"Blista Compact"},
- {"Police Maverick"}, {"Boxville"}, {"Benson"}, {"Mesa"},{"RC Goblin"},
- {"Hotring Racer A"}, {"Hotring Racer B"}, {"Bloodring Banger"}, {"Rancher"},
- {"Super GT"}, {"Elegant"}, {"Journey"}, {"Bike"}, {"Mountain Bike"},
- {"Beagle"}, {"Cropdust"}, {"Stunt"}, {"Tanker"}, {"Roadtrain"}, {"Nebula"},
- {"Majestic"}, {"Buccaneer"}, {"Shamal"}, {"Hydra"}, {"FCR-900"},
- {"NRG-500"}, {"HPV1000"}, {"Cement Truck"}, {"Tow Truck"}, {"Fortune"},
- {"Cadrona"}, {"FBI Truck"}, {"Willard"}, {"Forklift"}, {"Tractor"},
- {"Combine"}, {"Feltzer"}, {"Remington"}, {"Slamvan"}, {"Blade"},
- {"Freight"}, {"Brownstreak"}, {"Vortex"},{"Vincent"}, {"Bullet"}, {"Clover"},
- {"Sadler"}, {"Ladder Firetruck"}, {"Hustler"}, {"Intruder"}, {"Primo"},
- {"Cargobob"}, {"Tampa"}, {"Sunrise"}, {"Merit"}, {"Utility"}, {"Nevada"},
- {"Yosemite"}, {"Windsor"}, {"Monster A"}, {"Monster B"}, {"Uranus"},
- {"Jester"}, {"Sultan"}, {"Stratum"}, {"Elegy"}, {"Raindance"}, {"RC Tiger"},
- {"Flash"}, {"Tahoma"}, {"Savanna"}, {"Bandito"}, {"Freight Flat"},
- {"Streak Carriage"}, {"Kart"}, {"Mower"}, {"Dune"}, {"Sweeper"},
- {"Broadway"}, {"Tornado"}, {"AT-400"}, {"DFT-30"}, {"Huntley"},
- {"Stafford"}, {"BF-400"}, {"Newsvan"}, {"Tug"}, {"Trailer 3"}, {"Emperor"},
- {"Wayfarer"}, {"Euros"}, {"Hotdog"}, {"Club"}, {"Freight Carriage"},
- {"Trailer 4"}, {"Andromada"}, {"Dodo"}, {"RC Cam"}, {"Launch"},
- {"Police Car (LSPD)"}, {"Police Car (SFPD)"}, {"Police Car (LVPD)"},
- {"Police Ranger"}, {"Picador"}, {"S.W.A.T. Van"}, {"Alpha"}, {"Phoenix"},
- {"Old Glendale"}, {"Old Sadler"}, {"Luggage Trailer A"}, {"Luggage Trailer B"},
- {"Stair Trailer"}, {"Boxville"}, {"Farm Plow"}, {"Utility Trailer"}
- };
- stock SendTeamMessage( playerid, t_MSG[ ] )
- {
- for( new i = 0; i < MAX_PLAYERS; i ++ )
- {
- if( GetPlayerTeam( i ) == GetPlayerTeam( playerid ) )
- {
- new c_msg[ 128 ], c_name[ MAX_PLAYER_NAME ];
- GetPlayerName( playerid, c_name, sizeof c_name );
- format( c_msg, ( 128 ), "[Team Chat]%s: {FFFFFF}%s", c_name, t_MSG );
- SendClientMessage( i, GetPlayerColor( playerid ), c_msg );
- }
- else continue;
- }
- return ( 1 );
- }
- stock strtok(const string[], &index,seperator=' ')
- {
- new length = strlen(string);
- new offset = index;
- new result[MAX_STRING];
- while ((index < length) && (string[index] != seperator) && ((index - offset) < (sizeof(result) - 1)))
- {
- result[index - offset] = string[index];
- index++;
- }
- result[index - offset] = EOS;
- if ((index < length) && (string[index] == seperator))
- {
- index++;
- }
- return result;
- }
- stock Name(playerid)
- {
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- return name;
- }
- public OnPlayerConnect(playerid)
- {
- SPEEDOS[playerid] = TextDrawCreate(498,362 ," ");
- TextDrawShowForPlayer(playerid,SPEEDOS[playerid]);
- new string[16];
- TextDrawDestroy(gText);
- gSeconds++;
- format(string, sizeof string, "%s", TimeConvert(gSeconds));
- gText = TextDrawCreate(79, 323, string);
- TextDrawUseBox(gText, true);
- TextDrawTextSize(gText, 50.0, 20.0);
- TextDrawShowForAll(gText);
- SendClientMessage(playerid, COLOR_BLUE, "-----------------------------------------------------------------------------");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Welcome to War zone deathmatch made by Twinki!");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "We hope that you will enjoy your stay here!");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Feel free to use /report anytime you need help!");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "For any other help use /help");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "For team help use command /th!");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "To chat with team mates use @ text!");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Have fun!");
- SendClientMessage(playerid, COLOR_BLUE, "-----------------------------------------------------------------------------");
- //removed buildings (russian spawn building
- RemoveBuildingForPlayer(playerid, 10796, -1847.7813, 44.7813, 35.5625, 0.25);
- RemoveBuildingForPlayer(playerid, 10797, -1849.6328, -54.3125, 24.9766, 0.25);
- RemoveBuildingForPlayer(playerid, 705, -1815.0547, -11.8594, 14.2266, 0.25);
- RemoveBuildingForPlayer(playerid, 10776, -1849.6328, -54.3125, 24.9766, 0.25);
- RemoveBuildingForPlayer(playerid, 10775, -1847.7813, 44.7813, 35.5625, 0.25);
- RemoveBuildingForPlayer(playerid, 968, -1526.4375, 481.3828, 6.9063, 0.25);
- RemoveBuildingForPlayer(playerid, 966, -1526.3906, 481.3828, 6.1797, 0.25);
- RemoveBuildingForPlayer(playerid, 10829, -1523.2578, 486.7969, 6.1563, 0.25);
- //VALHALLA TESTING!
- RemoveBuildingForPlayer(playerid, 6188, 836.3125, -1866.7578, -0.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 6189, 836.4453, -2003.5234, -2.6406, 0.25);
- RemoveBuildingForPlayer(playerid, 6190, 836.3125, -1866.7578, -0.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 6191, 836.4453, -2003.5234, -2.6406, 0.25);
- RemoveBuildingForPlayer(playerid, 1461, 820.1484, -2061.0625, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 1461, 820.1484, -2055.2422, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 1280, 820.2813, -2019.0000, 12.2344, 0.25);
- RemoveBuildingForPlayer(playerid, 1280, 820.2813, -2015.0625, 12.2344, 0.25);
- RemoveBuildingForPlayer(playerid, 1280, 820.2813, -2002.9688, 12.2344, 0.25);
- RemoveBuildingForPlayer(playerid, 1280, 820.2813, -1999.0313, 12.2344, 0.25);
- RemoveBuildingForPlayer(playerid, 1280, 820.2813, -1968.7891, 12.2344, 0.25);
- RemoveBuildingForPlayer(playerid, 1280, 820.2813, -1977.1797, 12.2344, 0.25);
- RemoveBuildingForPlayer(playerid, 1280, 820.2813, -1924.5156, 12.2344, 0.25);
- RemoveBuildingForPlayer(playerid, 1280, 820.2813, -1932.9063, 12.2344, 0.25);
- RemoveBuildingForPlayer(playerid, 1280, 820.2813, -1901.1172, 12.2344, 0.25);
- RemoveBuildingForPlayer(playerid, 1280, 820.2813, -1892.7344, 12.2344, 0.25);
- RemoveBuildingForPlayer(playerid, 638, 820.3438, -2058.1641, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 638, 820.5859, -1928.2734, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 1231, 820.3594, -1885.0703, 14.5703, 0.25);
- RemoveBuildingForPlayer(playerid, 792, 820.9297, -2066.1797, 12.1719, 0.25);
- RemoveBuildingForPlayer(playerid, 792, 820.9297, -2036.6953, 12.1719, 0.25);
- RemoveBuildingForPlayer(playerid, 792, 820.9297, -2008.9141, 12.1719, 0.25);
- RemoveBuildingForPlayer(playerid, 1461, 820.7891, -2011.7969, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 792, 820.9297, -1991.4922, 12.1719, 0.25);
- RemoveBuildingForPlayer(playerid, 1461, 820.7891, -2005.9844, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 1231, 821.0078, -1986.0938, 14.5703, 0.25);
- RemoveBuildingForPlayer(playerid, 792, 820.9297, -1973.4922, 12.1719, 0.25);
- RemoveBuildingForPlayer(playerid, 1461, 820.7891, -1980.5625, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 1461, 820.7891, -1965.9766, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 792, 820.9297, -1950.1719, 12.1719, 0.25);
- RemoveBuildingForPlayer(playerid, 1461, 820.7891, -1936.2969, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 1231, 820.8359, -1917.7344, 14.5703, 0.25);
- RemoveBuildingForPlayer(playerid, 1461, 820.7891, -1921.7031, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 1231, 820.8359, -1907.5781, 14.5703, 0.25);
- RemoveBuildingForPlayer(playerid, 1461, 820.7891, -1904.5078, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 1461, 820.7891, -1889.9219, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 1231, 821.5469, -2048.8984, 14.5703, 0.25);
- RemoveBuildingForPlayer(playerid, 1281, 821.8125, -2042.2969, 12.6172, 0.25);
- RemoveBuildingForPlayer(playerid, 1281, 824.7969, -2036.6797, 12.6172, 0.25);
- RemoveBuildingForPlayer(playerid, 1281, 821.8125, -2031.3516, 12.6172, 0.25);
- RemoveBuildingForPlayer(playerid, 1231, 821.1094, -2023.7422, 14.5703, 0.25);
- RemoveBuildingForPlayer(playerid, 1231, 821.0703, -1996.2500, 14.5703, 0.25);
- RemoveBuildingForPlayer(playerid, 1231, 821.1016, -1961.1250, 14.5703, 0.25);
- RemoveBuildingForPlayer(playerid, 1281, 821.8125, -1956.0469, 12.6172, 0.25);
- RemoveBuildingForPlayer(playerid, 1231, 821.1016, -1940.6797, 14.5703, 0.25);
- RemoveBuildingForPlayer(playerid, 1281, 821.8125, -1945.1016, 12.6172, 0.25);
- RemoveBuildingForPlayer(playerid, 1281, 824.1563, -1950.4297, 12.6172, 0.25);
- RemoveBuildingForPlayer(playerid, 792, 821.0859, -1912.9766, 12.1719, 0.25);
- RemoveBuildingForPlayer(playerid, 792, 821.0859, -1897.0234, 12.1719, 0.25);
- RemoveBuildingForPlayer(playerid, 1281, 821.8125, -1879.9219, 12.6172, 0.25);
- RemoveBuildingForPlayer(playerid, 792, 821.0859, -1874.6250, 12.1719, 0.25);
- RemoveBuildingForPlayer(playerid, 1281, 824.1563, -1874.3047, 12.6172, 0.25);
- RemoveBuildingForPlayer(playerid, 1281, 821.8125, -1868.9766, 12.6172, 0.25);
- RemoveBuildingForPlayer(playerid, 792, 851.7969, -2049.0000, 12.1719, 0.25);
- RemoveBuildingForPlayer(playerid, 792, 851.7969, -2066.3594, 12.1719, 0.25);
- RemoveBuildingForPlayer(playerid, 1231, 852.4531, -2060.3359, 14.5703, 0.25);
- RemoveBuildingForPlayer(playerid, 1461, 852.7344, -2055.2422, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 638, 852.5313, -2058.1641, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 1280, 852.6094, -2042.5547, 12.2344, 0.25);
- RemoveBuildingForPlayer(playerid, 1231, 852.4531, -2039.6875, 14.5703, 0.25);
- RemoveBuildingForPlayer(playerid, 638, 852.5313, -2036.3906, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 1461, 852.7344, -2033.4688, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 1280, 852.6094, -2030.4531, 12.2344, 0.25);
- RemoveBuildingForPlayer(playerid, 1231, 851.7578, -2023.7422, 14.5703, 0.25);
- RemoveBuildingForPlayer(playerid, 1280, 852.6094, -2026.5234, 12.2344, 0.25);
- RemoveBuildingForPlayer(playerid, 792, 851.7969, -2018.0313, 12.1719, 0.25);
- RemoveBuildingForPlayer(playerid, 1281, 851.0078, -1992.5781, 12.6172, 0.25);
- RemoveBuildingForPlayer(playerid, 1231, 851.7578, -2012.7031, 14.5703, 0.25);
- RemoveBuildingForPlayer(playerid, 1231, 851.7578, -1994.9375, 14.5703, 0.25);
- RemoveBuildingForPlayer(playerid, 1280, 852.6094, -2008.8906, 12.2344, 0.25);
- RemoveBuildingForPlayer(playerid, 1280, 852.6094, -2004.9609, 12.2344, 0.25);
- RemoveBuildingForPlayer(playerid, 1461, 852.7344, -1997.3672, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 638, 852.5313, -2000.6406, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 1281, 848.5625, -1986.6719, 12.6172, 0.25);
- RemoveBuildingForPlayer(playerid, 792, 851.9766, -1986.8828, 12.1719, 0.25);
- RemoveBuildingForPlayer(playerid, 1281, 851.0078, -1981.6328, 12.6172, 0.25);
- RemoveBuildingForPlayer(playerid, 1231, 851.7578, -1978.5313, 14.5703, 0.25);
- RemoveBuildingForPlayer(playerid, 1280, 852.6094, -1974.2734, 12.2344, 0.25);
- RemoveBuildingForPlayer(playerid, 1280, 852.6094, -1970.3359, 12.2344, 0.25);
- RemoveBuildingForPlayer(playerid, 792, 851.7969, -1955.9297, 12.1719, 0.25);
- RemoveBuildingForPlayer(playerid, 1231, 852.2109, -1961.1250, 14.5703, 0.25);
- RemoveBuildingForPlayer(playerid, 1231, 852.2109, -1950.5938, 14.5703, 0.25);
- RemoveBuildingForPlayer(playerid, 638, 852.5313, -1965.3203, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 1280, 852.6094, -1942.2891, 12.2344, 0.25);
- RemoveBuildingForPlayer(playerid, 1280, 852.6094, -1946.2188, 12.2344, 0.25);
- RemoveBuildingForPlayer(playerid, 792, 851.7969, -1937.1875, 12.1719, 0.25);
- RemoveBuildingForPlayer(playerid, 1461, 852.7344, -1935.3750, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 1461, 852.7344, -1929.8125, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 638, 852.5313, -1932.3281, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 1280, 852.6094, -1926.6875, 12.2344, 0.25);
- RemoveBuildingForPlayer(playerid, 1280, 852.6094, -1922.7500, 12.2344, 0.25);
- RemoveBuildingForPlayer(playerid, 1231, 852.2109, -1918.7422, 14.5703, 0.25);
- RemoveBuildingForPlayer(playerid, 1281, 848.3281, -1909.3828, 12.6172, 0.25);
- RemoveBuildingForPlayer(playerid, 1281, 851.0078, -1904.3359, 12.6172, 0.25);
- RemoveBuildingForPlayer(playerid, 1281, 851.0078, -1915.2813, 12.6172, 0.25);
- RemoveBuildingForPlayer(playerid, 792, 851.7969, -1909.9063, 12.1719, 0.25);
- RemoveBuildingForPlayer(playerid, 1231, 852.2109, -1901.2422, 14.5703, 0.25);
- RemoveBuildingForPlayer(playerid, 1280, 852.6094, -1897.0234, 12.2344, 0.25);
- RemoveBuildingForPlayer(playerid, 638, 852.5313, -1886.8594, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 1280, 852.6094, -1893.0859, 12.2344, 0.25);
- RemoveBuildingForPlayer(playerid, 1461, 852.7344, -1883.3516, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 1461, 852.7344, -1889.8359, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 1231, 851.6250, -1879.7813, 14.5703, 0.25);
- RemoveBuildingForPlayer(playerid, 792, 851.7969, -1874.5859, 12.1719, 0.25);
- RemoveBuildingForPlayer(playerid, 1231, 851.6250, -1869.2500, 14.5703, 0.25);
- RemoveBuildingForPlayer(playerid, 1231, 820.3594, -1864.5547, 14.5703, 0.25);
- RemoveBuildingForPlayer(playerid, 1280, 820.2813, -1850.2109, 12.2344, 0.25);
- RemoveBuildingForPlayer(playerid, 1280, 820.2813, -1854.1484, 12.2344, 0.25);
- RemoveBuildingForPlayer(playerid, 1461, 820.7891, -1857.1641, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 638, 820.5859, -1860.0859, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 1231, 820.2656, -1839.8750, 14.5703, 0.25);
- RemoveBuildingForPlayer(playerid, 792, 820.5156, -1846.9375, 12.0469, 0.25);
- RemoveBuildingForPlayer(playerid, 1231, 819.1953, -1828.6875, 14.1016, 0.25);
- RemoveBuildingForPlayer(playerid, 1231, 852.2109, -1843.9766, 14.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 792, 851.7969, -1848.8984, 12.1719, 0.25);
- RemoveBuildingForPlayer(playerid, 1461, 852.7344, -1851.8672, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 638, 852.5313, -1855.1094, 12.5391, 0.25);
- RemoveBuildingForPlayer(playerid, 1280, 852.6094, -1864.8828, 12.2344, 0.25);
- RemoveBuildingForPlayer(playerid, 1280, 852.6094, -1860.9531, 12.2344, 0.25);
- RemoveBuildingForPlayer(playerid, 1231, 853.9063, -1828.4531, 13.8516, 0.25);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "<!>%s have just left the server!", name);
- SendClientMessageToAll(COLOR_WHITE, string);
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>Checking your connection. Please wait.");
- LoadObjectsForPlayer( playerid );
- TextDrawShowForPlayer(playerid, Health[playerid]);
- GivePlayerWeapon(playerid, 24, 100);
- GivePlayerWeapon(playerid, 30, 100);
- SetPlayerSkillLevel(playerid, 24, 100);
- GameTextForPlayer(playerid, "Welcome", 5, 1);
- TextDrawShowForPlayer(playerid, ShadowsRandom);
- if(GetPlayerTeam(playerid) == TEAM_USA)
- {
- SetPlayerPos(playerid,-2281.3494,2288.4031,4.9661);//USA Spawn
- SetPlayerHealth(playerid,100);
- SetPlayerArmour(playerid,100);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>You've made decision. You are now part of Team USA. Use /teamhelp to see commands! Enjoy!");
- }
- else if(GetPlayerTeam(playerid) == TEAM_RUSSIA)
- {
- SetPlayerHealth(playerid,100);
- SetPlayerArmour(playerid,100);
- SetPlayerPos(playerid,-1391.1643,496.9996,18.2344);//Russia spawn
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>You've made decision. You are now part of Team Russia. Use /teamhelp to see commands! Enjoy!");
- }
- TextDrawHideForPlayer(playerid, Text:Russian);
- TextDrawHideForPlayer(playerid, Text:USA);
- TextDrawShowForPlayer(playerid, Text:Warzone);
- return 1;
- }
- public LoadObjectsForPlayer( playerid )
- {
- if( IsPlayerConnected ( playerid ) )
- {
- TogglePlayerControllable( playerid, false );
- if( GetPlayerPing ( playerid ) < 100 ) { SetTimerEx( "ObjectsLoaded", 3000, 0, "e", playerid ); SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>Your connection is checked and accepted! Enjoy your stay!"); }
- else if( GetPlayerPing ( playerid ) > 100 ) { SetTimerEx( "ObjectsLoaded", 3000, 0, "e", playerid ); SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>Your connection is checked and accepted! Enjoy your stay!"); }
- else if( GetPlayerPing ( playerid ) > 200 ) { SetTimerEx( "ObjectsLoaded", 3200, 0, "e", playerid ); SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>Your connection is checked and accepted! Enjoy your stay!"); }
- else if( GetPlayerPing ( playerid ) > 300 ) { SetTimerEx( "ObjectsLoaded", 3700, 0, "e", playerid ); SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>Your connection is checked and accepted! Enjoy your stay!"); }
- else if( GetPlayerPing ( playerid ) > 500 ) { SetTimerEx( "ObjectsLoaded", 4000, 0, "e", playerid ); SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>Your connection is checked and accepted! Enjoy your stay!"); }
- else { SetTimerEx( "ObjectsLoaded", 5000, 0, "e", playerid ); SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>Your connection is checked and accepted! Enjoy your stay!"); }
- }
- return ( 1 );
- }
- public ObjectsLoaded(playerid)
- {
- if( IsPlayerConnected ( playerid ) ) return TogglePlayerControllable( playerid, true ), PlayerPlaySound( playerid, 1056, 0.0, 0.0, 0.0 );
- return ( 1 );
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- if(killerid != INVALID_PLAYER_ID)
- {
- SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
- GivePlayerMoney(killerid, 100);
- return 1;
- }
- ForceClassSelection(playerid);
- SendDeathMessage(playerid,killerid,reason);
- ResetPlayerWeapons(playerid);
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- new
- badWords[][] =
- {
- "bitch",
- "ass",
- "fuck",
- "nigger",
- "nigga",
- "jew",
- "retard",
- "whore",
- "hoe",
- "negro",
- "chongo",
- "nazzi",
- "noob"
- }
- ;
- for(new i; i != sizeof(badWords); ++i)
- {
- replaceSwear(text, badWords[i]);
- }
- if(text[0] == '@')
- {
- new name[MAX_PLAYER_NAME], msg[128];
- GetPlayerName(playerid, name, sizeof(name));
- format(msg, sizeof(msg), "[Team Chat] %s[%d]: %s", name, playerid, text[1]);
- for(new i; i<=MAX_PLAYERS; i++)
- {
- if(GetPlayerTeam(playerid) == GetPlayerTeam(i))
- {
- SendClientMessage(i, COLOR_LIGHTBLUE, msg);
- }
- }
- return 0;
- }
- new Rank[20];
- switch(GetPlayerScore(playerid))
- {
- case 0 .. 10: format(Rank, sizeof(Rank),"[Private]");
- case 11 .. 20: format(Rank, sizeof(Rank),"[Private 2]");
- case 21 .. 30: format(Rank, sizeof(Rank), "[Private First Class]");
- case 31 .. 40: format(Rank, sizeof(Rank), "[Specialist]");
- case 41 .. 50: format(Rank, sizeof(Rank), "[Corporal]");
- case 51 .. 60: format(Rank, sizeof(Rank), "[Sergeant]");
- case 61 .. 70: format(Rank, sizeof(Rank), "[Serg. First Class]");
- case 71 .. 80: format(Rank, sizeof(Rank), "[Master Sergeant]");
- case 81 .. 90: format(Rank, sizeof(Rank), "[Sergeant Major]");
- case 91 .. 100: format(Rank, sizeof(Rank), "[General]");
- case 101 .. 150: format(Rank, sizeof(Rank), "[Grand Marshal]");
- case 151 .. 200: format(Rank, sizeof(Rank), "[God Of War]");
- }
- new ChatText[128], Nameasd[MAX_PLAYER_NAME];
- GetPlayerName(playerid, Nameasd, MAX_PLAYER_NAME);
- format(ChatText, sizeof(ChatText),"%s %s: %s", Rank, Nameasd, text);
- SendClientMessageToAll(COLOR_GREEN, ChatText);
- return 0;
- }
- stock replaceSwear(string[], badWord[], replace = '*')
- {
- new
- i
- ;
- while((i = strfind(string, badWord, true)) != -1)
- {
- for(new x = (i + strlen(badWord)); i != x; ++i)
- {
- string[i] = replace;
- }
- }
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- if (strcmp("/kill", cmdtext, true) == 0)
- {
- if(Cooldown[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"<!>Please Wait Before Using This Command Again!");
- {
- SetPlayerHealth(playerid, 0);
- SendClientMessage(playerid, COLOR_RED, "<!>You have just killed yourself, and lost 50$!");
- new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "<!>%s have just used command /kill!", name);
- SendClientMessageToAll(COLOR_WHITE, string);
- GivePlayerMoney(playerid, -50);
- ResetPlayerWeapons(playerid);
- }
- return 1;
- }
- if (strcmp("/signal", cmdtext, true) == 0 || strcmp("/s", cmdtext, true) == 0)
- {
- if(Cooldown[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"<!>Please Wait Before Using This Command Again!");
- {
- new Float:x, Float:y, Float:z, SignalObj;
- GetPlayerPos(playerid, x, y, z);
- SetTimerEx( "Signal", 5000, false, "i", SignalObj );
- SignalObj = CreateObject(18714,x,y,z, 0.0, 0.0, 96.0);
- GameTextForPlayer(playerid, "Signal started", 1, 1);
- }
- return 1;
- }
- if (strcmp("/help", cmdtext, true) == 0 || strcmp("/h", cmdtext, true) == 0)
- {
- SendClientMessage(playerid, COLOR_WHITE, "|---------------------------------------------------------------------------------------------|");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "|<!> Commands: /(s)ignal, /kill, /(h)elp, /language, /teamhelp");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "|<!> Commands: /register, /login, /changepass, /stats, /resetstats, /time, /report");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "|<!> Commands: /getid, ");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "|---------------------------------------------------------------------------------------------|");
- return 1;
- }
- if (strcmp("/base", cmdtext, true) == 0)
- {
- if(!IsPlayerAdmin(playerid))
- {
- SendClientMessage(playerid, COLOR_RED, "<!>You must be an admin to use this command!");
- return 1;
- }
- SetPlayerPos(playerid, 396.7123,-3308.4155,7);
- return 1;
- }
- if (strcmp("/adminhelp", cmdtext, true) == 0 || (strcmp("/ah", cmdtext, true) == 0))
- {
- if(!IsPlayerAdmin(playerid))
- {
- SendClientMessage(playerid, COLOR_RED, "<!>You are not an admin!");
- return 1;
- }
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "|============================================================================|");
- SendClientMessage(playerid, COLOR_WHITE, "Commands: /(a)dmin(h)elp, /base, /youtube");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "|============================================================================|");
- return 1;
- }
- if (strcmp("/Russiangateopen", cmdtext, true) == 0 || (strcmp("/Rgo", cmdtext, true) == 0))
- {
- if(!IsPlayerInRangeOfPoint(playerid, 20.0, -1530.72, 482.47, 7.85))
- {
- SendClientMessage(playerid, COLOR_RED, "<!>You are not in range of that gate!");
- return 1;
- }
- SendClientMessage(playerid, COLOR_YELLOW, "<!>You have just opened the gate!");
- MoveObject(gateR1, -1530.72, 482.47, -1.85, 2, 0.00, 0.00, 0.00);
- return 1;
- }
- if (strcmp("/russiangateclose", cmdtext, true) == 0 || (strcmp("/RGC", cmdtext, true) == 0))
- {
- if(!IsPlayerInRangeOfPoint(playerid, 50.0, -1530.72, 482.47, 7.85))
- {
- SendClientMessage(playerid, COLOR_RED, "<!>You are not in range of that gate!");
- return 1;
- }
- MoveObject(gateR1, -1530.72, 482.47, 7.85, 1, 0.00, 0.00, 0.00);
- SendClientMessage(playerid, COLOR_YELLOW, "<!>You have just closed the gate!"); //closed
- return 1;
- }
- if (strcmp("/teamhelp", cmdtext, true) == 0 || (strcmp("/th", cmdtext, true) == 0))
- {
- if(GetPlayerTeam(playerid) == 1)
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "|==========================================================|");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Commands: /(R)ussian(G)ate(O)pen, /(R)ussian(G)ate(C)lose");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Commands: /ruselevatordown, /ruselevatorup");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "|==========================================================|");
- return 1;
- }
- if(GetPlayerTeam(playerid) == 2)
- {
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "|==========================================================|");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "Commands:");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "|==========================================================|");
- return 1;
- }
- }
- if (strcmp("/ruselevatorup", cmdtext, true) == 0)
- {
- if(GetPlayerTeam(playerid) == 1) MoveObject(elevator1, -1426.42, 478.65, 16.61, 2, 0.00, 0.00, 0.90);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>Elevator is up now, use /elevatordown to get it down!");
- return 1;
- }
- if (strcmp("/ruselevatordown", cmdtext, true) == 0)
- {
- if(GetPlayerTeam(playerid) == 1) MoveObject(elevator1, -1426.42, 478.65, 5.61, 5, 0.00, 0.00, 0.90);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>Elevator is down now, use command /elevator up to get it up!");
- return 1;
- }
- if (strcmp("/cc", cmdtext, true) == 0 || (strcmp("/clearchat", cmdtext, true) == 0))
- {
- for(new i = 0; i < 50; i++) SendClientMessageToAll(COLOR_WHITE," "); return 1;
- }
- if (strcmp("/playmusic", cmdtext, true) == 0)
- {
- ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST,"MyDialog","1. Hip Hop\n2. Tehno\n3. Reggae","Play", "Close");
- return 1;
- }
- if (strcmp("/netstats", cmdtext, true) == 0)
- {
- new stats[400+1];
- GetPlayerNetworkStats(playerid, stats, sizeof(stats));
- ShowPlayerDialog(playerid, 2, DIALOG_STYLE_MSGBOX, "Your network stats", stats, "Close", "");
- return 1;
- }
- if (strcmp("/serverstats", cmdtext, true) == 0)
- {
- new stats[400+1];
- GetNetworkStats(stats, sizeof(stats)); // get the servers networkstats
- ShowPlayerDialog(playerid, 3, DIALOG_STYLE_MSGBOX, "Server Network Stats", stats, "Close", "");
- return 1;
- }
- if (strcmp("/guns", cmdtext, true) == 0)
- {
- ShowPlayerDialog(playerid,2,DIALOG_STYLE_LIST,"Guns","1. Deagle (400$)\n2. Ak-47 (600$)\n3. M4 (600$)\n4. MP5 (500$)","Accept", "Close");
- return 1;
- }
- if (strcmp("/myscore", cmdtext, true) == 0)
- {
- new string[128];
- format(string, sizeof(string), "Score: %i",GetPlayerScore(playerid));
- SendClientMessage(playerid, COLOR_LIGHTBLUE, string);
- return 1;
- }
- return SendClientMessage(playerid, COLOR_RED, "<!>Server didn't reconise your command! Try again!");
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- new szString[16];
- if(newstate == 2 && oldstate == 1)
- {
- format(szString, sizeof(szString), "~G~%s", VehicleNames2[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
- GameTextForPlayer(playerid, szString, 1337, 1);
- }
- return 1;
- }
- public OnPlayerEnterCheckpoint(playerid)
- {
- 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)
- {
- return 1;
- }
- public OnObjectMoved(objectid)
- {
- return 1;
- }
- public OnPlayerObjectMoved(playerid, objectid)
- {
- return 1;
- }
- public OnPlayerPickUpPickup(playerid, pickupid)
- {
- if(pickupid == HPRus)
- {
- if(GetPlayerMoney(playerid) < 150) return SendClientMessage(playerid, COLOR_RED, "<!>You don't have enought money for this. (150$)");
- SetPlayerHealth(playerid, 100);
- GivePlayerMoney(playerid, -150);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>Your health is refilled to it's maximum!");
- return 1;
- }
- if(pickupid == RusArmour)
- {
- if(GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid, COLOR_RED, "<!>You don't have enought money for this. (200$)");
- SetPlayerArmour(playerid, 100);
- GivePlayerMoney(playerid, -200);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>Your armour has been refilled to 100 percent!");
- return 1;
- }
- if(pickupid == HPUS)
- {
- if(GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid, COLOR_RED, "<!>You don't have enought money to buy that!");
- SetPlayerHealth(playerid, 100);
- GivePlayerMoney(playerid, -150);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>Your health is reffiled to it's maximum!");
- return 1;
- }
- if(pickupid == USArmour)
- {
- if(GetPlayerMoney(playerid) < 200) return SendClientMessage(playerid, COLOR_RED, "<!>You don't have enought money for this. (200$)");
- SetPlayerArmour(playerid, 100);
- GivePlayerMoney(playerid, -200);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>Your armour has been refilled to 100 percent!");
- return 1;
- }
- 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)
- {
- return 1;
- }
- public OnRconLoginAttempt(ip[], password[], success)
- {
- return 1;
- }
- public OnPlayerUpdate(playerid)
- {
- new vehicleid,Float:speed_x,Float:speed_y,Float:speed_z,Float:final_speed,speed_string[256],final_speed_int;
- vehicleid = GetPlayerVehicleID(playerid);
- if(vehicleid != 0)
- {
- GetVehicleVelocity(vehicleid,speed_x,speed_y,speed_z);
- final_speed = floatsqroot(((speed_x*speed_x)+(speed_y*speed_y))+(speed_z*speed_z))*136.666667;
- final_speed_int = floatround(final_speed,floatround_round);
- format(speed_string,256,"Vehicle Speed: %i",final_speed_int);
- TextDrawSetString(SPEEDOS[playerid], speed_string);
- }
- else
- {
- TextDrawSetString(SPEEDOS[playerid], " ");
- }
- new Float:pArmour;
- GetPlayerArmour(playerid, pArmour);
- if(pArmour == 0){
- TextDrawHideForPlayer(playerid, Armour[playerid]);
- }else{
- TextDrawShowForPlayer(playerid, Armour[playerid]);
- }
- {
- if(GetPlayerPing(playerid) > 1000) Kick(playerid);
- }
- if(GetPlayerScore(playerid) == 11)
- {
- GivePlayerMoney(playerid, 1000);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>Congradulations! You have reached 10 score and you have became Private 2!");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>You have been awarded with 1000$!");
- return 1;
- }
- if(GetPlayerScore(playerid) == 21)
- {
- GivePlayerMoney(playerid, 2000);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>Congradulations! You have reached 20 score and you have became Private 1st Class!");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>You have been awarded with 2000$!");
- return 1;
- }
- if(GetPlayerScore(playerid) == 31)
- {
- GivePlayerMoney(playerid, 3000);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>Congradulations! You have reached 30 score and you have became Specialist!");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>You have been awarded with 3000$!");
- return 1;
- }
- if(GetPlayerScore(playerid) == 41)
- {
- GivePlayerMoney(playerid, 4000);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>Congradulations! You have reached 40 score and you have became Corporal!");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>You have been awarded with 4000$!");
- return 1;
- }
- if(GetPlayerScore(playerid) == 51)
- {
- GivePlayerMoney(playerid, 5000);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>Congradulations! You have reached 50 score and you have became Sargeant!");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>You have been awarded with 5000$!");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>Since you have reached 50 score, you can now buy a vehicle! Type /buyvehicle!");
- return 1;
- }
- if(GetPlayerScore(playerid) == 61)
- {
- GivePlayerMoney(playerid, 6000);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>Congradulations! You have reached 60 score and you have became Sarg. First Class!");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>You have been awarded with 6000$!");
- return 1;
- }
- if(GetPlayerScore(playerid) == 71)
- {
- GivePlayerMoney(playerid, 7000);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>Congradulations! You have reached 70 score and you have became Master Sergeant!");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>You have been awarded with 7000$!");
- return 1;
- }
- if(GetPlayerScore(playerid) == 81)
- {
- GivePlayerMoney(playerid, 8000);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>Congradulations! You have reached 80 score and you have became Sargeant Major!");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>You have been awarded with 8000$!");
- return 1;
- }
- if(GetPlayerScore(playerid) == 91)
- {
- GivePlayerMoney(playerid, 9000);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>Congradulations! You have reached 90 score and you have became General!");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>You have been awarded with 9000$!");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>Since you have reached General rank you can now buy your own aircraft! /buyair!");
- return 1;
- }
- if(GetPlayerScore(playerid) == 101)
- {
- GivePlayerMoney(playerid, 10000);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>Congradulations! You have reached 100 score and you have became Grand Marshal!");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>You have been awarded with 10 000$!");
- return 1;
- }
- if(GetPlayerScore(playerid) == 151)
- {
- GivePlayerMoney(playerid, 100000);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>Congradulations! You have became God Of War!");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>You can now get a free V.I.P!");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>Type /vip to get it!");
- GameTextForPlayer(playerid, "You are now God of War!", 5, 1);
- new name[MAX_PLAYER_NAME], string[24+MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- format(string, sizeof(string), "<!>%s has just became God Of War. Congradulate him!", name);
- SendClientMessageToAll(COLOR_RED, string);
- return 1;
- }
- 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[])
- {
- if(dialogid == 2)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- if(GetPlayerMoney(playerid) <400) return SendClientMessage(playerid, COLOR_RED, "<!>You don't have enought money! Required 400$!");
- GivePlayerWeapon(playerid, 24, 100);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>You have bought a deagle with 100 bullets!");
- return 1;
- }
- case 1:
- {
- if(GetPlayerMoney(playerid) <600) return SendClientMessage(playerid, COLOR_RED, "<!>You don't have enought money! Required 600$!");
- GivePlayerWeapon(playerid, 30, 100);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>You have bought an AK-47 with 100 bullets!");
- return 1;
- }
- case 2:
- {
- if(GetPlayerMoney(playerid) <600) return SendClientMessage(playerid, COLOR_RED, "<!>You don't have enought money! Required 600$!");
- GivePlayerWeapon(playerid, 31, 100);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>You have bought an M4 with 100 bullets!");
- return 1;
- }
- case 3:
- {
- if(GetPlayerMoney(playerid) <500) return SendClientMessage(playerid, COLOR_RED, "<!>You don't have enought money! Required 500$!");
- GivePlayerWeapon(playerid, 29, 100);
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>You have bought an MP5 with 100bullets!");
- return 1;
- }
- }
- }
- }
- if(dialogid == 1)
- {
- if(response)
- {
- switch(listitem)
- {
- case 0:
- {
- PlayAudioStreamForPlayer(playerid, "http://www.181.fm/playing.php?station=181-ball&embed=1");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>You are listening 181 FM!");
- }
- case 1:
- {
- PlayAudioStreamForPlayer(playerid, "http://www.fear.fm/radio/player");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>You are listening to fear FM!");
- }
- case 2:
- {
- PlayAudioStreamForPlayer(playerid, "http://www.internet-radio.com/tools/playlistgenerator/?u=http://www.internet-radio.com/station/ebonyradio/&t=.pls");
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "<!>You are listening to Ebony Radio!");
- }
- }
- }
- }
- if(dialogid == 0 && response == 1)
- {
- new pName[MAX_PLAYER_NAME],gName[MAX_PLAYER_NAME],string[128];
- new giveplayerid = GetPVarInt(playerid,"ClickedPlayer");
- GetPlayerName(playerid,pName,sizeof pName);
- GetPlayerName(giveplayerid,gName,sizeof gName);
- format(string,sizeof string,"[PM] From %s: %s",pName,inputtext);
- SendClientMessage(giveplayerid,0x00ff00ff,string);
- format(string,sizeof string,"[PM] Send to %s: %s",gName,inputtext);
- SendClientMessage(playerid,0x00ff00ff,string);
- return 1;
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- SetPVarInt(playerid,"ClickedPlayer",clickedplayerid); // Save clickedplayerid in a PVar.
- ShowPlayerDialog(playerid,0,DIALOG_STYLE_INPUT,"PM","Type a message to send to the clicked player!","Send","Cancel");
- return 1;
- }
- forward vitals(playerid);
- public vitals(playerid)
- {
- new string[5]
- ;new Float:pHealth, Float:pArmour;
- GetPlayerHealth(playerid,pHealth);
- GetPlayerArmour(playerid,pArmour);
- format(string, sizeof(string), "%.0f%", pHealth);
- TextDrawSetString(Health[playerid], string);
- format(string, sizeof(string), "%.0f%", pArmour);
- TextDrawSetString(Armour[playerid], string);
- }
- forward Signal( objectid );
- public Signal( objectid )
- {
- DestroyObject( objectid );
- return 1;
- }
- forward TimeServerRunning();
- forward CooldownTimer();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement