Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This is a comment
- // uncomment the line below if you want to write a filterscript
- //#define FILTERSCRIPT
- #include <a_samp>
- #include <zcmd>
- #include <sscanf2>
- #include <foreach>
- #include <YSI\y_ini>
- native WP_Hash(buffer[],len,const str[]);
- #if defined FILTERSCRIPT
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" GangWar");
- print("--------------------------------------\n");
- return 1;
- }
- public OnFilterScriptExit()
- {
- return 1;
- }
- #else
- //Admin ranks
- #define adminlevel1 "Moderator"
- #define adminlevel2 "Adminstrator"
- #define adminlevel3 "Senior Adminstrator"
- #define adminlevel4 "Developer"
- #define adminlevel5 "Owner"
- //for weapon stuff
- #define ARMEDBODY_USE_HEAVY_WEAPON (false)
- static
- armedbody_pTick[MAX_PLAYERS];
- //login stuff
- #define DIALOG_REGISTER 1
- #define DIALOG_LOGIN 2
- #define DIALOG_SUCCESS_1 3
- #define DIALOG_SUCCESS_2 4
- #define PATH "/Users/%s.ini"
- //Colors
- #define Grey 0xAFAFAFAA
- #define COLOR_CYAN 0x00FFFFFF
- #define COLOR_BRIGHTRED 0xFF000AAA
- #define COLOR_COPS 0x0080FFFF
- #define COLOR_BALLA 0xFF00FFFF
- #define COLOR_BALLAS 0xFF00FFFF
- #define COLOR_VEGOSS 0xFFFF00FF
- #define COLOR_GROVE 0x00FF00FF
- #define COLOR_GROVES 0x00FF00FF
- #define COLOR_VEGOS 0xFFFF00FF
- #define COLOR_AZTECS 0x00FFFFFF
- #define COLOR_RED 0xFF0000FF
- #define COLOR_GREEN 0x008000FF
- #define COLOR_VIOLET 0x800080FF
- #define COLOR_LIGHTBLUE0 0x00FFFFFF
- #define COLOR_YELLOW 0xFFFF00FF
- #define COLOR_BLUE 0x0000A0FF
- #define COLOR_LIGHTBLUE 0x33CCFF19
- #define COL_WHITE "{FFFFFF}"
- #define COL_RED "{F81414}"
- #define COL_GREEN "{00FF22}"
- #define COL_LIGHTBLUE "{00CED1}"
- #pragma tabsize 0
- #define COLOR_WHITE 0xFFFFFFAA
- #define MAX_HOUSES 200
- #define COLOR_YELLOW 0xFFFF00FF
- #define COLOR_RED 0xFF0000FF
- #define TEAM_GROVE 1
- #define TEAM_BALLAS 2
- #define TEAM_VAGOS 3
- #define TEAM_SWAT 4
- #define TEAM_AZTECS 5
- #define TEAM_ARMY 6
- #define TAKEOVER_TIME 1200 // how many milesseconds needed to take over the zone
- #define MIN_MEMBERS_TO_START_WAR 5 // how many team members needed in a zone to start a war
- #define TAKEOVER_TIMEA 1200
- #define MIN_DEATHS_TO_START_WAR 5 // how many team members must be killed in a zone to start a war
- #undef MAX_PLAYERS
- #define MAX_PLAYERS (50)
- enum pInfo
- {
- Pass[129],
- Cash,
- Admin,
- VIP,
- Kills,
- Deaths,
- Score,
- Bans
- }
- new PlayerInfo[MAX_PLAYERS][pInfo];
- forward ZoneTimer(playerid);
- forward ZoneTimerA();
- forward ForEachTimer();
- forward LoadUser_data(playerid,name[],value[]);
- public LoadUser_data(playerid,name[],value[])
- {
- INI_String("Password", PlayerInfo[playerid][Pass],129);
- INI_Int("Cash",PlayerInfo[playerid][Cash]);
- INI_Int("Admin",PlayerInfo[playerid][Admin]);
- INI_Int("VIP",PlayerInfo[playerid][VIP]);
- INI_Int("Kills",PlayerInfo[playerid][Kills]);
- INI_Int("Deaths",PlayerInfo[playerid][Deaths]);
- INI_Int("Scores",PlayerInfo[playerid][Score]);
- INI_Int("Banned",PlayerInfo[playerid][Bans]);
- return 1;
- }
- main()
- {
- print("\n----------------------------------");
- print(" Gangwar v1.2.3");
- print("----------------------------------\n");
- }
- #endif
- enum eZone
- {
- Float:zMinX,
- Float:zMinY,
- Float:zMaxX,
- Float:zMaxY,
- zTeam
- }
- new ZoneInfo[][eZone] = {
- {2345.598388, -1773.024414, 2521.598388, -1581.024414,TEAM_GROVE},
- {2204.362792, -1776.409790, 2348.362792, -1584.409790,TEAM_GROVE},
- {2400.125732, -1923.646606, 2520.125732, -1771.646606,TEAM_GROVE},
- {2195.252197, -1885.497192, 2419.252197, -1765.497192,TEAM_GROVE},
- {2076.594970, -1765.078979, 2204.594970, -1581.078979,TEAM_BALLAS},
- {1953.389282, -1769.867553, 2081.389160, -1577.867553,TEAM_BALLAS},
- {1956.524169, -1577.875122, 2108.524169, -1465.875122,TEAM_BALLAS},
- {2108.523437, -1577.875366, 2212.523437, -1465.875366,TEAM_BALLAS},
- {1824.119140, -1462.211303, 2112.119140, -1302.211303,TEAM_BALLAS},
- {1828.438964, -1295.297973, 2108.438964, -1135.297973,TEAM_BALLAS},
- {2108.438964, -1295.297973, 2276.438964, -1135.297973,TEAM_BALLAS},
- {2108.438964, -1463.297973, 2276.438964, -1295.297973,TEAM_BALLAS},
- {1843.857055, -1135.044189, 2099.856933, -983.044189,TEAM_VAGOS},
- {2101.352783, -1133.549926, 2277.352783, -981.549926,TEAM_VAGOS},
- {1842.349365, -984.916809, 2282.349365, -912.916809,TEAM_VAGOS},
- {2283.451904, -1089.607421, 2667.451904, -897.607421,TEAM_VAGOS},
- {2462.997314, -1591.490600, 2630.997314, -1447.490600,TEAM_VAGOS},
- {2462.997314, -1447.490600, 2630.997314, -1279.490600,TEAM_VAGOS},
- {2275.657958, -1287.125976, 2467.657958, -1087.125976,TEAM_VAGOS},
- {2664.030273, -1087.785888, 2912.030273, -895.785888,TEAM_VAGOS},
- {2272.933349, -1527.671264, 2464.933349, -1287.671264,TEAM_VAGOS},
- {2657.655029, -1279.468505, 2913.655029, -1087.468505,TEAM_VAGOS},
- {2465.655029, -1279.468505, 2657.655029, -1087.468505,TEAM_VAGOS},
- {2630.737060, -1590.629394, 2958.737060, -1278.629394,TEAM_VAGOS},
- {1652.34375, -2167.96875, 1968.75, -1957.03125,TEAM_AZTECS},
- {1669.921875, -1962.890625, 1968.75, -1746.09375,TEAM_AZTECS},
- {1968.75, -2156.25, 2203.125, -1957.03125,TEAM_AZTECS},
- {1962.890625, -1957.03125, 2214.84375, -1757.8125,TEAM_AZTECS},
- {2378.90625, -2156.25, 2730.46875, -1921.875,TEAM_AZTECS},
- {1413.808, -1768.712, 1611.556, -1571.325,TEAM_SWAT},
- {1706.627, -2431.933, 2140.15, -2179.277,TEAM_SWAT}
- };
- new ZoneID[sizeof(ZoneInfo)];
- new ZoneAttacker[sizeof(ZoneInfo)] = {-1, ...};
- new ZoneAttackTime[sizeof(ZoneInfo)];
- new Teams[] = {
- TEAM_GROVE,
- TEAM_BALLAS,
- TEAM_VAGOS,
- TEAM_AZTECS,
- TEAM_SWAT
- };
- new ZoneDeaths[sizeof(ZoneInfo)];
- new String[256];
- new gTeam[MAX_PLAYERS];
- new InDerby[MAX_PLAYERS];
- new InDM[MAX_PLAYERS];
- new Donor[MAX_PLAYERS];
- new InHouse[MAX_PLAYERS];
- new InTraining[MAX_PLAYERS];
- new Text:Rank;
- new Text:Rank1;
- new Text:Rank2;
- new Text:Rank3;
- new Text:Rank4;
- new Text:Rank5;
- new Text:Rank6;
- new Text:TeamGrove;
- new Text:TeamBallas;
- new Text:TeamVagos;
- new Text:TeamAztecs;
- new Scores[10];
- new mP[MAX_PLAYERS];
- new Float:SpecX[MAX_PLAYERS], Float:SpecY[MAX_PLAYERS], Float:SpecZ[MAX_PLAYERS], vWorld[MAX_PLAYERS], Inter[MAX_PLAYERS];
- new IsSpecing[MAX_PLAYERS], Name[MAX_PLAYER_NAME], IsBeingSpeced[MAX_PLAYERS],spectatorid[MAX_PLAYERS];
- playername(playerid)
- {
- new pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
- return pName;
- }
- stock UserPath(playerid)
- {
- new string[128],playername[MAX_PLAYER_NAME];
- GetPlayerName(playerid,playername,sizeof(playername));
- format(string,sizeof(string),PATH,playername);
- return string;
- }
- stock udb_hash(buf[]) {
- new length=strlen(buf);
- new s1 = 1;
- new s2 = 0;
- new n;
- for (n=0; n<length; n++)
- {
- s1 = (s1 + buf[n]) % 65521;
- s2 = (s2 + s1) % 65521;
- }
- return (s2 << 16) + s1;
- }
- stock GetTeamName ( TeamID )
- {
- new
- tName [ 64 ];
- //
- switch( TeamID )
- {
- case TEAM_GROVE:
- {
- tName = "Groves";
- //
- }
- case TEAM_BALLAS:
- {
- tName = "Ballas";
- //
- }
- case TEAM_VAGOS:
- {
- tName = "Vegos";
- //
- }
- case TEAM_SWAT:
- {
- tName = "Law";
- //
- }
- case TEAM_AZTECS:
- {
- tName = "Aztecs";
- //
- }
- case TEAM_ARMY:
- {
- tName = "Army";
- //
- }
- default: //
- {
- tName = "Unknown";
- //
- }
- }
- return tName;
- }
- stock Get1Name(playerid)
- {
- new
- pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, MAX_PLAYER_NAME);
- return pName;
- }
- stock GetWeaponModel(weaponid)
- {
- switch(weaponid)
- {
- case 1:
- return 331;
- case 2..8:
- return weaponid+331;
- case 9:
- return 341;
- case 10..15:
- return weaponid+311;
- case 16..18:
- return weaponid+326;
- case 22..29:
- return weaponid+324;
- case 30,31:
- return weaponid+325;
- case 32:
- return 372;
- case 33..45:
- return weaponid+324;
- case 46:
- return 371;
- }
- return 0;
- }
- public OnGameModeInit()
- {
- SetTimer("ZoneTimer", 1000, true);
- SetTimer("ZoneTimerA", 1200, true);
- SetTimer("RankUpdater", 10000, true);
- TeamGrove = TextDrawCreate(10.000000, 350.000000, "Team ~g~Grove : ~b~00");
- TextDrawBackgroundColor(TeamGrove, 255);
- TextDrawFont(TeamGrove, 0);
- TextDrawLetterSize(TeamGrove, 0.450000, 1.900000);
- TextDrawColor(TeamGrove, -1);
- TextDrawSetOutline(TeamGrove, 1);
- TextDrawSetProportional(TeamGrove, 1);
- TextDrawUseBox(TeamGrove, 0);
- TextDrawBoxColor(TeamGrove, 150);
- TextDrawTextSize(TeamGrove, 150.000000, 20.000000);
- TeamBallas = TextDrawCreate(10.000000, 267.000000, "Team ~p~Ballas : ~b~00");
- TextDrawBackgroundColor(TeamBallas, 255);
- TextDrawFont(TeamBallas, 0);
- TextDrawLetterSize(TeamBallas, 0.450000, 1.900000);
- TextDrawColor(TeamBallas, -1);
- TextDrawSetOutline(TeamBallas, 1);
- TextDrawSetProportional(TeamBallas, 1);
- TextDrawUseBox(TeamBallas, 0);
- TextDrawBoxColor(TeamBallas, 150);
- TextDrawTextSize(TeamBallas, 150.000000, 20.000000);
- TeamVagos = TextDrawCreate(10.000000, 299.000000, "Team ~y~Vagos : ~r~00");
- TextDrawBackgroundColor(TeamVagos, 255);
- TextDrawFont(TeamVagos, 0);
- TextDrawLetterSize(TeamVagos, 0.450000, 1.900000);
- TextDrawColor(TeamVagos, -1);
- TextDrawSetOutline(TeamVagos, 1);
- TextDrawSetProportional(TeamVagos, 1);
- TextDrawUseBox(TeamVagos, 0);
- TextDrawBoxColor(TeamVagos, 150);
- TextDrawTextSize(TeamVagos, 150.000000, 20.000000);
- TeamAztecs = TextDrawCreate(10.000000, 322.000000, "Team ~b~Aztecs : ~r~00");
- TextDrawBackgroundColor(TeamAztecs, 255);
- TextDrawFont(TeamAztecs, 0);
- TextDrawLetterSize(TeamAztecs, 0.450000, 1.900000);
- TextDrawColor(TeamAztecs, -1);
- TextDrawSetOutline(TeamAztecs, 1);
- TextDrawSetProportional(TeamAztecs, 1);
- TextDrawUseBox(TeamAztecs, 0);
- TextDrawBoxColor(TeamAztecs, 150);
- TextDrawTextSize(TeamAztecs, 150.000000, 20.000000);
- Scores[TEAM_AZTECS] = Scores[TEAM_VAGOS] = Scores[TEAM_GROVE] = Scores[TEAM_BALLAS] = 0;
- Rank = TextDrawCreate(10.000000, 120.000000, "~g~Rank : ~b~Street Rat");
- TextDrawBackgroundColor(Rank, 255);
- TextDrawFont(Rank, 1);
- TextDrawLetterSize(Rank, 0.450000, 1.900000);
- TextDrawColor(Rank, -1);
- TextDrawSetOutline(Rank, 1);
- TextDrawSetProportional(Rank, 1);
- TextDrawUseBox(Rank, 0);
- TextDrawBoxColor(Rank, 150);
- TextDrawTextSize(Rank, 150.000000, 20.000000);
- Rank1 = TextDrawCreate(10.000000, 120.000000, "~g~Rank : ~b~Street Killer");
- TextDrawBackgroundColor(Rank1, 255);
- TextDrawFont(Rank1, 1);
- TextDrawLetterSize(Rank1, 0.450000, 1.900000);
- TextDrawColor(Rank1, -1);
- TextDrawSetOutline(Rank1, 1);
- TextDrawSetProportional(Rank1, 1);
- TextDrawUseBox(Rank1, 0);
- TextDrawBoxColor(Rank1, 150);
- TextDrawTextSize(Rank1, 150.000000, 20.000000);
- Rank2 = TextDrawCreate(10.000000, 120.000000, "~g~Rank : ~b~Street Mob");
- TextDrawBackgroundColor(Rank2, 255);
- TextDrawFont(Rank2, 1);
- TextDrawLetterSize(Rank2, 0.450000, 1.900000);
- TextDrawColor(Rank2, -1);
- TextDrawSetOutline(Rank2, 1);
- TextDrawSetProportional(Rank2, 1);
- TextDrawUseBox(Rank2, 0);
- TextDrawBoxColor(Rank2, 150);
- TextDrawTextSize(Rank2, 150.000000, 20.000000);
- Rank3 = TextDrawCreate(10.000000, 120.000000, "~g~Rank : ~b~Street Ruler");
- TextDrawBackgroundColor(Rank3, 255);
- TextDrawFont(Rank3, 1);
- TextDrawLetterSize(Rank3, 0.450000, 1.900000);
- TextDrawColor(Rank3, -1);
- TextDrawSetOutline(Rank3, 1);
- TextDrawSetProportional(Rank3, 1);
- TextDrawUseBox(Rank3, 0);
- TextDrawBoxColor(Rank3, 150);
- TextDrawTextSize(Rank3, 150.000000, 20.000000);
- Rank4 = TextDrawCreate(10.000000, 120.000000, "~g~~g~Rank : ~b~War Hero");
- TextDrawBackgroundColor(Rank4, 255);
- TextDrawFont(Rank4, 1);
- TextDrawLetterSize(Rank4, 0.450000, 1.900000);
- TextDrawColor(Rank4, -1);
- TextDrawSetOutline(Rank4, 1);
- TextDrawSetProportional(Rank4, 1);
- TextDrawUseBox(Rank4, 0);
- TextDrawBoxColor(Rank4, 150);
- TextDrawTextSize(Rank4, 150.000000, 20.000000);
- Rank5 = TextDrawCreate(10.000000, 120.000000, "~g~Rank : ~b~War Legend");
- TextDrawBackgroundColor(Rank5, 255);
- TextDrawFont(Rank5, 1);
- TextDrawLetterSize(Rank5, 0.450000, 1.900000);
- TextDrawColor(Rank5, -1);
- TextDrawSetOutline(Rank5, 1);
- TextDrawSetProportional(Rank5, 1);
- TextDrawUseBox(Rank5, 0);
- TextDrawBoxColor(Rank5, 150);
- TextDrawTextSize(Rank5, 150.000000, 20.000000);
- Rank6 = TextDrawCreate(10.000000, 120.000000, "~g~Rank : ~b~Legendary Hero");
- TextDrawBackgroundColor(Rank6, 255);
- TextDrawFont(Rank6, 1);
- TextDrawLetterSize(Rank6, 0.450000, 1.900000);
- TextDrawColor(Rank6, -1);
- TextDrawSetOutline(Rank6, 1);
- TextDrawSetProportional(Rank6, 1);
- TextDrawUseBox(Rank6, 0);
- TextDrawBoxColor(Rank6, 150);
- TextDrawTextSize(Rank6, 150.000000, 20.000000);
- //classe
- AddPlayerClass(105,2514.8130,-1674.3113,13.7020,66.7092,0,0,0,0,0,0); // grove
- AddPlayerClass(106,2514.8130,-1674.3113,13.7020,66.7092,0,0,0,0,0,0); // grove
- AddPlayerClass(107,2514.8130,-1674.3113,13.7020,66.7092,0,0,0,0,0,0); // grove
- AddPlayerClass(103,2014.1774,-1740.4828,13.5469,145.0912,0,0,0,0,0,0); // balla
- AddPlayerClass(104,2014.1774,-1740.4828,13.5469,145.0912,0,0,0,0,0,0); // balla
- AddPlayerClass(102,2014.1774,-1740.4828,13.5469,145.0912,0,0,0,0,0,0); // balla
- AddPlayerClass(108,2541.5249,-1033.1189,69.5793,177.4599,0,0,0,0,0,0); // vegos
- AddPlayerClass(109,2541.5249,-1033.1189,69.5793,177.4599,0,0,0,0,0,0); // vegos
- AddPlayerClass(110,2541.5249,-1033.1189,69.5793,177.4599,0,0,0,0,0,0); // vegos
- AddPlayerClass(285,1552.6057,-1675.5458,16.1953,85.6765,0,0,0,0,0,0); // Swat
- AddPlayerClass(286,1552.6057,-1675.5458,16.1953,85.6765,0,0,0,0,0,0); // Swat
- AddPlayerClass(280,1552.6057,-1675.5458,16.1953,85.6765,0,0,0,0,0,0); // Swat
- AddPlayerClass(114,1715.0638,-2124.4746,14.0566,357.3774,0,0,0,0,0,0); // Aztecs
- AddPlayerClass(115,1715.0638,-2124.4746,14.0566,357.3774,0,0,0,0,0,0); // Aztecs
- AddPlayerClass(116,1715.0638,-2124.4746,14.0566,357.3774,0,0,0,0,0,0); // Aztecs
- AddPlayerClass(105,1985.0214,-2238.5315,13.5469,330.5258,0,0,0,0,0,0); // AirForce
- AddPlayerClass(105,1985.0215,-2238.5315,13.5469,330.5258,0,0,0,0,0,0); // // Army
- for(new i=0; i < sizeof(ZoneInfo); i++)
- {
- ZoneID[i] = GangZoneCreate(ZoneInfo[i][zMinX],ZoneInfo[i][zMinY], ZoneInfo[i][zMaxX], ZoneInfo[i][zMaxY]);
- }
- // Don't use these lines if it's a filterscript
- SetGameModeText("GangWar Beta v1.2.5");
- //pickup
- AddStaticPickup(362, 0, 2421.56, -1733.182, 15);
- //vehicles
- AddStaticVehicle(560,2507.5886,-1676.3402,13.2022,337.7339,202,92); // car
- AddStaticVehicle(560,2482.6841,-1654.1837,13.1309,87.7656,202,92); // car
- AddStaticVehicle(562,2474.3816,-1695.6672,13.1773,356.2812,202,78); // car
- AddStaticVehicle(522,2528.6885,-1665.3088,14.7386,89.4788,202,202); // car
- AddStaticVehicle(522,2528.3518,-1667.3475,14.7393,85.8760,202,202); // car
- AddStaticVehicle(522,2528.0334,-1669.8341,14.7418,91.0464,202,202); // car
- AddStaticVehicle(541,2526.6924,-1708.8540,13.1313,92.5936,202,202); // car
- AddStaticVehicle(541,2538.8040,-1716.9507,13.1798,180.5632,202,202); // car
- AddStaticVehicle(411,2525.7485,-1719.3511,13.2700,92.6054,202,202); // car
- AddStaticVehicle(411,2431.6394,-1636.3986,13.1749,359.4897,202,202); // car
- AddStaticVehicle(411,2007.0746,-1734.2866,13.2015,180.8459,18,116); // car
- AddStaticVehicle(560,1996.7081,-1688.0881,13.2063,0.0507,18,18); // car
- AddStaticVehicle(560,1978.0103,-1674.0729,15.7154,267.2123,18,18); // car
- AddStaticVehicle(562,2020.6190,-1677.3597,13.1198,270.4283,18,75); // car
- AddStaticVehicle(541,2042.4086,-1677.3103,13.1356,272.8734,18,0); // car
- AddStaticVehicle(541,2036.9230,-1748.1075,13.1350,89.3309,18,0); // car
- AddStaticVehicle(541,2570.8796,-1031.1039,69.2584,179.7895,6,63); // car
- AddStaticVehicle(541,2548.7893,-1052.7599,69.1902,267.0469,6,63); // car
- AddStaticVehicle(411,2511.4702,-1052.9198,69.1585,268.3543,6,73); // car
- AddStaticVehicle(411,2508.3660,-1033.5416,69.4506,183.1352,6,73); // car
- AddStaticVehicle(489,1989.0822,-2300.0315,13.6902,88.6343,25,106); // car
- AddStaticVehicle(489,2000.7072,-2240.5767,13.6904,86.3534,25,106); // car
- AddStaticVehicle(490,1999.4045,-2255.9519,13.6747,91.4669,25,106); // car
- AddStaticVehicle(490,1997.8685,-2250.8577,13.6721,88.5371,25,106); // car
- AddStaticVehicle(490,1999.3979,-2233.8108,13.6711,86.6122,25,106); // car
- AddStaticVehicle(541,1747.9828,-2092.8918,13.2244,179.9171,106,55); // car
- AddStaticVehicle(541,1725.3235,-2095.8909,13.2247,182.5599,106,55); // car
- AddStaticVehicle(541,1694.9573,-2094.4187,13.2217,182.2280,106,55); // car
- AddStaticVehicle(520,2530.5046,-1677.7228,20.8627,93.7480,72,40); // h
- AddStaticVehicle(447,2496.4182,-1657.6216,13.3742,91.9336,117,73); //
- AddStaticVehicle(560,2506.6797,-1694.9382,13.2598,1.5961,0,113); //
- AddStaticVehicle(560,2503.7720,-1695.0795,13.2632,0.3908,0,113); //
- AddStaticVehicle(411,2459.5313,-1671.4088,13.2268,359.4220,91,106); //
- AddStaticVehicle(425,2447.6138,-1672.2379,14.0496,0.1211,31,1); //
- AddStaticVehicle(432,2426.5759,-1673.5985,13.6451,3.8201,97,118); //
- AddStaticVehicle(432,2436.3132,-1673.4298,13.6396,359.3802,97,118); //
- AddStaticVehicle(432,2041.5450,-1738.0276,13.5553,182.6904,97,118); //
- AddStaticVehicle(432,2041.0107,-1696.5840,13.5591,359.6162,97,118); //
- AddStaticVehicle(432,2041.4635,-1628.2823,13.5553,359.6140,97,118); //
- AddStaticVehicle(432,2041.7928,-1658.1261,13.5552,178.0176,97,118); //
- AddStaticVehicle(560,1980.5566,-1691.7754,15.6693,271.0958,40,111); //
- AddStaticVehicle(560,1980.1891,-1710.1753,15.6744,271.2260,40,111); //
- AddStaticVehicle(411,1981.5153,-1727.9207,15.6901,271.5345,62,47); //
- AddStaticVehicle(520,2014.6522,-1771.7675,18.7248,3.5857,96,103); //
- AddStaticVehicle(425,2020.9589,-1729.4944,19.5695,115.3200,77,124); //
- AddStaticVehicle(425,2030.1608,-1681.1427,14.3210,356.0153,6,5); //
- AddStaticVehicle(425,2057.8347,-1681.1234,14.1360,1.1799,6,5); //
- AddStaticVehicle(520,2012.5592,-1688.7224,14.4809,84.2810,40,23); //
- AddStaticVehicle(411,2586.5154,-1032.8502,69.3051,178.4934,44,2); // inf
- AddStaticVehicle(560,2551.6379,-1029.8711,69.2804,175.9049,18,87); //
- AddStaticVehicle(560,2535.4463,-1031.2184,69.2855,177.4782,18,87); //
- AddStaticVehicle(560,2502.6873,-1031.7711,69.5081,174.0934,18,87); //
- AddStaticVehicle(432,2498.6394,-1056.6134,69.3297,355.8383,61,71); //
- AddStaticVehicle(432,2530.1560,-1064.5596,69.5754,0.6767,61,71); //
- AddStaticVehicle(432,2599.4087,-1067.2673,69.5879,359.2497,61,71); //
- AddStaticVehicle(432,2598.9290,-1098.6665,68.9029,359.6469,61,71); //
- AddStaticVehicle(432,1793.2164,-2135.0300,13.5542,357.8899,97,118); //
- AddStaticVehicle(432,1772.4653,-2095.4072,13.5563,180.5494,97,118); //
- AddStaticVehicle(432,1772.8739,-2130.2839,13.5541,1.7034,97,118); //
- AddStaticVehicle(411,1744.8118,-2127.6614,13.2740,0.9359,116,90); //
- AddStaticVehicle(411,1724.2477,-2128.0239,13.2819,1.4028,116,90); //
- AddStaticVehicle(560,1704.6345,-2128.2034,13.2529,359.3444,4,12); //
- AddStaticVehicle(560,1669.1509,-2115.0188,13.2522,269.7161,4,12); //
- AddStaticVehicle(560,1670.1851,-2111.1599,13.2517,269.9209,4,12); //
- AddStaticVehicle(432,1698.6498,-2085.4067,13.5542,181.5627,111,12); //
- AddStaticVehicle(425,1718.6141,-2143.2000,17.8035,0.9465,112,112); //
- AddStaticVehicle(425,1923.5332,-2242.4146,14.3758,184.8791,112,112); //
- AddStaticVehicle(425,1909.6245,-2242.1904,14.1007,191.8718,112,112); //
- AddStaticVehicle(520,1996.3632,-2345.7957,14.2697,90.9607,75,50); //
- AddStaticVehicle(520,1994.8959,-2360.0552,14.2668,94.4152,75,50); //
- AddStaticVehicle(548,1989.6368,-2312.3008,15.2358,93.3257,27,83); //
- AddStaticVehicle(548,1989.9620,-2325.8547,16.5614,94.2070,27,83); //
- AddStaticVehicle(476,1998.8616,-2289.2422,14.2541,96.1378,121,119); //
- AddStaticVehicle(476,1997.5930,-2272.0476,14.2564,95.1882,121,119); //
- AddStaticVehicle(528,1529.8984,-1688.1124,5.9330,272.5030,41,93); //
- AddStaticVehicle(528,1529.2792,-1683.6000,5.9312,270.6489,41,93); //
- AddStaticVehicle(528,1601.6564,-1692.0636,5.9339,92.5074,41,93); //
- AddStaticVehicle(596,1602.6875,-1683.8392,5.6076,89.8792,0,1); //
- AddStaticVehicle(596,1599.7533,-1700.1229,5.6117,89.6485,0,1); //
- AddStaticVehicle(601,1595.2601,-1710.1580,5.6489,358.3510,104,106); //
- AddStaticVehicle(599,1583.1615,-1709.1447,6.0801,358.1896,9,73); //
- AddStaticVehicle(599,1587.2540,-1710.3568,6.0854,357.7832,9,73); //
- AddStaticVehicle(490,1578.3622,-1710.7053,6.0170,0.5268,108,124); //
- AddStaticVehicle(432,1547.5939,-1613.5209,13.3901,271.0340,30,36); //
- AddStaticVehicle(432,1547.0203,-1605.4791,13.3901,271.1451,30,36); //
- AddStaticVehicle(432,1571.9551,-1610.5730,13.3901,180.9380,30,36); //
- AddStaticVehicle(432,1561.9154,-1611.9113,13.3901,178.7766,30,36); //
- return 1;
- }
- public OnGameModeExit()
- {
- return 1;
- }
- public OnPlayerRequestClass(playerid, classid)
- {
- switch(classid)
- {
- case 0:
- {
- GameTextForPlayer(playerid, "~g~Grove - ~w~Pistol-M4", 5000, 5);
- SetPlayerTeam(playerid, TEAM_GROVE);
- SetPlayerSkin(playerid,105);
- SetPlayerColor(playerid,COLOR_GROVES);
- GivePlayerWeapon(playerid,22,500);
- GivePlayerWeapon(playerid,31,500);
- SetPlayerPos(playerid, 2514.8130,-1674.3113,13.7020);
- SetPlayerFacingAngle(playerid, 66.7092);
- SetPlayerCameraPos(playerid, 2510.4692,-1671.6757,13.4205);
- SetPlayerCameraLookAt(playerid, 2514.8130,-1674.3113,13.7020);
- ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
- }
- case 1:
- {
- SetPlayerTeam(playerid, TEAM_GROVE);
- SetPlayerSkin(playerid,106);
- GameTextForPlayer(playerid, "~g~Grove - Deagle-Shotgun", 5000, 5);
- SetPlayerColor(playerid,COLOR_GROVES);
- GivePlayerWeapon(playerid,24,500);
- GivePlayerWeapon(playerid,25,500);
- SetPlayerPos(playerid, 2514.8130,-1674.3113,13.7020);
- SetPlayerFacingAngle(playerid, 66.7092);
- SetPlayerCameraPos(playerid, 2510.4692,-1671.6757,13.4205);
- SetPlayerCameraLookAt(playerid, 2514.8130,-1674.3113,13.7020);
- ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
- }
- case 2:
- {
- SetPlayerTeam(playerid, TEAM_GROVE);
- SetPlayerSkin(playerid,107);
- SetPlayerColor(playerid,COLOR_GROVES);
- GameTextForPlayer(playerid, "~g~Grove - Sawnoff-Sniper", 5000, 5);
- SetPlayerPos(playerid, 2514.8130,-1674.3113,13.7020);
- GivePlayerWeapon(playerid,26,500);
- GivePlayerWeapon(playerid,34,500);
- SetPlayerFacingAngle(playerid, 66.7092);
- SetPlayerCameraPos(playerid, 2510.4692,-1671.6757,13.4205);
- SetPlayerCameraLookAt(playerid, 2514.8130,-1674.3113,13.7020);
- ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
- }
- case 3:
- {
- SetPlayerTeam(playerid, TEAM_BALLAS);
- SetPlayerSkin(playerid,104);
- SetPlayerColor(playerid,COLOR_BALLA);
- GameTextForPlayer(playerid, "~p~Balla -Pistol-M4", 5000, 5);
- GivePlayerWeapon(playerid,22,500);
- GivePlayerWeapon(playerid,31,500);
- SetPlayerPos(playerid, 2014.1774,-1740.4828,13.5469);
- SetPlayerFacingAngle(playerid,145.0912);
- SetPlayerCameraPos(playerid,2010.7732,-1744.9518,13.5469);
- SetPlayerCameraLookAt(playerid,2014.1774,-1740.4828,13.5469);
- ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
- }
- case 4:
- {
- SetPlayerTeam(playerid, TEAM_BALLAS);
- SetPlayerSkin(playerid,103);
- SetPlayerColor(playerid,COLOR_BALLA);
- GameTextForPlayer(playerid, "~p~Balla - Ak-Deagle", 5000, 5);
- GivePlayerWeapon(playerid,24,500);
- GivePlayerWeapon(playerid,30,500);
- SetPlayerPos(playerid, 2014.1774,-1740.4828,13.5469);
- SetPlayerFacingAngle(playerid,145.0912);
- SetPlayerCameraPos(playerid,2010.7732,-1744.9518,13.5469);
- SetPlayerCameraLookAt(playerid,2014.1774,-1740.4828,13.5469);
- ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
- }
- case 5:
- {
- SetPlayerTeam(playerid, TEAM_BALLAS);
- SetPlayerSkin(playerid,102);
- SetPlayerColor(playerid,COLOR_BALLA);
- GameTextForPlayer(playerid, "~p~Balla - UZI-Rife ", 5000, 5);
- GivePlayerWeapon(playerid,28,500);
- GivePlayerWeapon(playerid,33,500);
- SetPlayerPos(playerid, 2014.1774,-1740.4828,13.5469);
- SetPlayerFacingAngle(playerid,145.0912);
- SetPlayerCameraPos(playerid,2010.7732,-1744.9518,13.5469);
- SetPlayerCameraLookAt(playerid,2014.1774,-1740.4828,13.5469);
- ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
- }
- case 6:
- {
- SetPlayerTeam(playerid, TEAM_VAGOS);
- SetPlayerSkin(playerid,108);
- SetPlayerColor(playerid,COLOR_VEGOS);
- GameTextForPlayer(playerid, "~y~Vegos - pistol-M4", 5000, 5);
- GivePlayerWeapon(playerid,22,500);
- GivePlayerWeapon(playerid,31,500);
- SetPlayerPos(playerid, 2541.5249,-1033.1189,69.5793);
- SetPlayerFacingAngle(playerid,177.4599);
- SetPlayerCameraPos(playerid,2541.0801,-1038.4296,69.5781);
- SetPlayerCameraLookAt(playerid,2541.5249,-1033.1189,69.5793);
- ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
- }
- case 7:
- {
- SetPlayerTeam(playerid, TEAM_VAGOS);
- SetPlayerSkin(playerid,109);
- SetPlayerColor(playerid,COLOR_VEGOS);
- GameTextForPlayer(playerid, "~y~Vegos - Uzi-rifle", 5000, 5);
- GivePlayerWeapon(playerid,28,500);
- GivePlayerWeapon(playerid,33,500);
- SetPlayerPos(playerid, 2541.5249,-1033.1189,69.5793);
- SetPlayerFacingAngle(playerid,177.4599);
- SetPlayerCameraPos(playerid,2541.0801,-1038.4296,69.5781);
- SetPlayerCameraLookAt(playerid,2541.5249,-1033.1189,69.5793);
- ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
- }
- case 8:
- {
- SetPlayerTeam(playerid, TEAM_VAGOS);
- SetPlayerSkin(playerid,110);
- SetPlayerColor(playerid,COLOR_VEGOS);
- GameTextForPlayer(playerid, "~y~Vegos - ak-deagle", 5000, 5);
- GivePlayerWeapon(playerid,24,500);
- GivePlayerWeapon(playerid,30,500);
- SetPlayerPos(playerid, 2541.5249,-1033.1189,69.5793);
- SetPlayerFacingAngle(playerid,177.4599);
- SetPlayerCameraPos(playerid,2541.0801,-1038.4296,69.5781);
- SetPlayerCameraLookAt(playerid,2541.5249,-1033.1189,69.5793);
- ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
- }
- case 9:
- {
- SetPlayerTeam(playerid, TEAM_SWAT);
- SetPlayerSkin(playerid,285);
- SetPlayerColor(playerid,COLOR_BLUE);
- GameTextForPlayer(playerid, "~b~Law - shotgun-MP5", 5000, 5);
- GivePlayerWeapon(playerid,27,500);
- GivePlayerWeapon(playerid,39,500);
- SetPlayerPos(playerid, 1552.6057,-1675.5458,16.1953);
- SetPlayerFacingAngle(playerid,85.6765);
- SetPlayerCameraPos(playerid,1549.7517,-1675.2238,15.1011);
- SetPlayerCameraLookAt(playerid,1552.6057,-1675.5458,16.1953);
- ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
- }
- case 10:
- {
- SetPlayerTeam(playerid, TEAM_SWAT);
- SetPlayerSkin(playerid,286);
- SetPlayerColor(playerid,COLOR_BLUE);
- GameTextForPlayer(playerid, "~b~Law M4-Silience", 5000, 5);
- GivePlayerWeapon(playerid,23,500);
- GivePlayerWeapon(playerid,31,500);
- SetPlayerPos(playerid, 1552.6057,-1675.5458,16.1953);
- SetPlayerFacingAngle(playerid,85.6765);
- SetPlayerCameraPos(playerid,1549.7517,-1675.2238,15.1011);
- SetPlayerCameraLookAt(playerid,1552.6057,-1675.5458,16.1953);
- ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
- }
- case 11:
- {
- SetPlayerTeam(playerid, TEAM_SWAT);
- SetPlayerSkin(playerid,280);
- SetPlayerColor(playerid,COLOR_BLUE);
- GameTextForPlayer(playerid, "~b~Law shotgun-m4", 5000, 5);
- GivePlayerWeapon(playerid,27,500);
- GivePlayerWeapon(playerid,31,500);
- SetPlayerPos(playerid, 1552.6057,-1675.5458,16.1953);
- SetPlayerFacingAngle(playerid,85.6765);
- SetPlayerCameraPos(playerid,1549.7517,-1675.2238,15.1011);
- SetPlayerCameraLookAt(playerid,1552.6057,-1675.5458,16.1953);
- ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
- }
- case 12:
- {
- SetPlayerTeam(playerid, TEAM_AZTECS);
- SetPlayerSkin(playerid,114);
- SetPlayerColor(playerid,COLOR_AZTECS);
- GivePlayerWeapon(playerid,28,500);
- GivePlayerWeapon(playerid,33,500);
- GameTextForPlayer(playerid, "~b~Aztecs - Uzi-rifle", 5000, 5);
- SetPlayerPos(playerid, 1715.0638,-2124.4746,14.0566);
- SetPlayerFacingAngle(playerid,357.3774);
- SetPlayerCameraPos(playerid,1714.9064,-2121.1589,13.5469);
- SetPlayerCameraLookAt(playerid,1715.0638,-2124.4746,14.0566);
- ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
- }
- case 13:
- {
- SetPlayerTeam(playerid, TEAM_AZTECS);
- SetPlayerSkin(playerid,115);
- SetPlayerColor(playerid,COLOR_AZTECS);
- GivePlayerWeapon(playerid,24,500);
- GivePlayerWeapon(playerid,31,500);
- GameTextForPlayer(playerid, "~b~AZTECS M4-Deagle", 5000, 5);
- SetPlayerPos(playerid, 1715.0638,-2124.4746,14.0566);
- SetPlayerFacingAngle(playerid,357.3774);
- SetPlayerCameraPos(playerid,1714.9064,-2121.1589,13.5469);
- SetPlayerCameraLookAt(playerid,1715.0638,-2124.4746,14.0566);
- ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
- }
- case 14:
- {
- SetPlayerTeam(playerid, TEAM_AZTECS);
- SetPlayerSkin(playerid,116);
- SetPlayerColor(playerid,COLOR_AZTECS);
- GameTextForPlayer(playerid, "~b~AZTECS- Psitol-ak", 5000, 5);
- GivePlayerWeapon(playerid,22,500);
- GivePlayerWeapon(playerid,30,500);
- SetPlayerPos(playerid, 1715.0638,-2124.4746,14.0566);
- SetPlayerFacingAngle(playerid,357.3774);
- SetPlayerCameraPos(playerid,1714.9064,-2121.1589,13.5469);
- SetPlayerCameraLookAt(playerid,1715.0638,-2124.4746,14.0566);
- ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
- }
- case 15:
- {
- SetPlayerTeam(playerid, TEAM_SWAT);
- SetPlayerSkin(playerid,61);
- SetPlayerColor(playerid,COLOR_BLUE);
- GameTextForPlayer(playerid, "~b~AirForce", 5000, 5);
- GivePlayerWeapon(playerid,22,500);
- SetPlayerPos(playerid, 1985.0214,-2238.5315,13.5469);
- SetPlayerFacingAngle(playerid,330.5258);
- SetPlayerCameraPos(playerid,1987.3593,-2234.7559,13.5469);
- SetPlayerCameraLookAt(playerid,1985.0214,-2238.5315,13.5469);
- ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
- }
- case 16:
- {
- SetPlayerTeam(playerid, TEAM_ARMY);
- SetPlayerSkin(playerid,287);
- SetPlayerColor(playerid,0x008C23FF);
- GameTextForPlayer(playerid, "~g~ARMY", 5000, 5);
- GivePlayerWeapon(playerid,27,500);
- GivePlayerWeapon(playerid,31,500);
- SetPlayerPos(playerid, 1985.0215,-2238.5315,13.5469);
- SetPlayerFacingAngle(playerid,330.5258);
- SetPlayerCameraPos(playerid,1987.3593,-2234.7559,13.5469);
- SetPlayerCameraLookAt(playerid,1985.0215,-2238.5315,13.5469);
- ApplyAnimation( playerid, "BEACH", "ParkSit_M_loop", 4.1, 1, 1, 1, 1, 1 );
- }
- }
- return 1;
- }
- public OnPlayerConnect(playerid)
- {
- SendClientMessage(playerid,COLOR_AZTECS,"Loading Please wait...");
- GameTextForPlayer(playerid, "Welcome to ~r~[sTs] ~b~Gang ~r~War", 5000, 5);
- InDM[playerid] = 0;
- new pName[24];
- new str[128];
- GetPlayerName(playerid, pName, 24);
- format(str, 128, "%s has joined the server", pName);
- SendClientMessageToAll(0xAFAFAFAA, str);
- if(fexist(UserPath(playerid)))
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
- }
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");
- INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
- INI_WriteInt(File,"Admin",PlayerInfo[playerid][Admin]);
- INI_WriteInt(File,"VIP",PlayerInfo[playerid][VIP]);
- INI_WriteInt(File,"Kills",PlayerInfo[playerid][Kills]);
- INI_WriteInt(File,"Deaths",PlayerInfo[playerid][Deaths]);
- INI_WriteInt(File,"Scores",GetPlayerScore(playerid));
- INI_WriteInt(File,"Banned",PlayerInfo[playerid][Bans]);
- INI_Close(File);
- new pName[24];
- new str[128];
- GetPlayerName(playerid, pName, 24);
- switch(reason)
- {
- case 0: format(str, 128, "%s has left. (Timeout)", pName);
- case 1: format(str, 128, "%s has left. (Leaving)", pName);
- case 2: format(str, 128, "%s has left. (Kicked)", pName);
- }
- SendClientMessageToAll(0xAFAFAFAA, str);
- return 1;
- }
- new Float:DMSpawns[][4] = { // Random spawns so players won't spawn at the same place
- {609.7040,-586.5684,17.2266,256.8267},
- {610.3588,-590.8182,17.2266,263.0453},
- {616.1186,-591.2390,17.2330,268.1367}
- //I will be using 3 you can add more if you want
- };
- public OnPlayerSpawn(playerid)
- {
- if(InDM[playerid] == 1)//This will tell the script to respawn only the players that inside DM
- {
- SetPlayerInterior(playerid, 0); // We will set the interior to 0 (you can change it to your own DM)
- SetPlayerVirtualWorld(playerid, 10); // and we will make the Virtual World in different world, so we wont mix with other players
- new rand = random(sizeof(DMSpawns)); // DM Spawn
- SetPlayerPos(playerid, DMSpawns[rand][0], DMSpawns[rand][1], DMSpawns[rand][2]);// we will set the player position at DM
- SetPlayerFacingAngle(playerid, DMSpawns[rand][3]); // Also facing Angle
- //and we will give him weapons, I will give 2 weapons
- GivePlayerWeapon(playerid, 24, 1500); // Desert Eagle
- GivePlayerWeapon(playerid, 26, 1500); // Sawnoff Shutgun
- //you can edit them, or add more weapons
- }
- for(new i=0;i<MAX_PLAYERS;i++)
- {
- if(gTeam[i] == TEAM_GROVE && gTeam[playerid] == TEAM_GROVE)
- {
- SetPlayerMarkerForPlayer(i, playerid, COLOR_GROVE);
- }
- if(gTeam[i] == TEAM_BALLAS && gTeam[playerid] == TEAM_BALLAS)
- {
- SetPlayerMarkerForPlayer(i, playerid, COLOR_BALLAS);
- }
- if(gTeam[i] == TEAM_VAGOS && gTeam[playerid] == TEAM_VAGOS)
- {
- SetPlayerMarkerForPlayer(i, playerid, COLOR_VEGOS);
- }
- if(gTeam[i] == TEAM_SWAT && gTeam[playerid] == TEAM_SWAT)
- {
- SetPlayerMarkerForPlayer(i, playerid, COLOR_BLUE);
- }
- if(gTeam[i] == TEAM_AZTECS && gTeam[playerid] == TEAM_AZTECS)
- {
- SetPlayerMarkerForPlayer(i, playerid, COLOR_AZTECS);
- }
- }
- GetPlayerWeapon(playerid);
- ClearAnimations(playerid);
- PlayerPlaySound(playerid,1040,0, 0, 0);
- if (GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) <= 100)
- {
- SetPlayerHealth(playerid, 100);
- }
- if (GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) <= 500)
- {
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 20);
- }
- if (GetPlayerScore(playerid) >= 500 && GetPlayerScore(playerid) <= 1000)
- {
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 50);
- }
- if(GetPlayerTeam(playerid) == TEAM_GROVE)
- if (GetPlayerScore(playerid) >= 1000 && GetPlayerScore(playerid) <= 2000)
- {
- SetPlayerSkin(playerid,269);
- SendClientMessage(playerid,COLOR_AZTECS,"You're Big Smoke");
- GivePlayerWeapon(playerid,27,500);
- GivePlayerWeapon(playerid,31,500);
- GivePlayerWeapon(playerid,24,500);
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 60);
- }
- if (GetPlayerScore(playerid) >= 2000 && GetPlayerScore(playerid) <= 3500)
- if(GetPlayerTeam(playerid) == TEAM_GROVE)
- {
- SetPlayerSkin(playerid,271);
- GivePlayerWeapon(playerid,27,500);
- GivePlayerWeapon(playerid,31,500);
- GivePlayerWeapon(playerid,24,500);
- SendClientMessage(playerid,COLOR_AZTECS,"You're Ryder");
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 70);
- }
- if (GetPlayerScore(playerid) >= 3500 && GetPlayerScore(playerid) <= 8000)
- if(GetPlayerTeam(playerid) == TEAM_GROVE)
- {
- SetPlayerSkin(playerid,270);
- GivePlayerWeapon(playerid,27,500);
- GivePlayerWeapon(playerid,31,500);
- GivePlayerWeapon(playerid,24,500);
- SendClientMessage(playerid,COLOR_AZTECS,"You're Sweet");
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 80);
- }
- if(GetPlayerScore(playerid) >= 10000)
- if(GetPlayerTeam(playerid) == TEAM_GROVE)
- {
- SetPlayerSkin(playerid,0);
- GivePlayerWeapon(playerid,27,500);
- GivePlayerWeapon(playerid,31,500);
- GivePlayerWeapon(playerid,24,500);
- SendClientMessage(playerid,COLOR_AZTECS,"You're CJ");
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 100);
- }
- if(GetPlayerScore(playerid) >= 350 && GetPlayerScore(playerid) <= 400)
- if(GetPlayerTeam(playerid) == TEAM_AZTECS)
- {
- SetPlayerSkin(playerid,297);
- GivePlayerWeapon(playerid,27,500);
- GivePlayerWeapon(playerid,31,500);
- GivePlayerWeapon(playerid,24,500);
- SendClientMessage(playerid,COLOR_AZTECS,"You're Madd Dawg");
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 100);
- }
- if(GetPlayerScore(playerid) >= 350 && GetPlayerScore(playerid) <= 400)
- if(GetPlayerTeam(playerid) == TEAM_BALLAS)
- {
- SetPlayerSkin(playerid,296);
- GivePlayerWeapon(playerid,27,500);
- GivePlayerWeapon(playerid,31,500);
- GivePlayerWeapon(playerid,24,500);
- SendClientMessage(playerid,COLOR_AZTECS,"You're Jizzy");
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 100);
- }
- if(GetPlayerScore(playerid) >= 400)
- if(GetPlayerTeam(playerid) == TEAM_SWAT)
- {
- SetPlayerSkin(playerid,265);
- GivePlayerWeapon(playerid,27,500);
- GivePlayerWeapon(playerid,31,500);
- GivePlayerWeapon(playerid,24,500);
- SendClientMessage(playerid,COLOR_AZTECS,"You're Tenpenny");
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 100);
- }
- if (GetPlayerScore(playerid) >= 300 && GetPlayerScore(playerid) <= 700)
- if(GetPlayerTeam(playerid) == TEAM_SWAT)
- {
- SetPlayerSkin(playerid,294);
- GivePlayerWeapon(playerid,27,500);
- GivePlayerWeapon(playerid,31,500);
- GivePlayerWeapon(playerid,24,500);
- SendClientMessage(playerid,COLOR_AZTECS,"You're CAI");
- SetPlayerHealth(playerid, 100);
- SetPlayerArmour(playerid, 70);
- }
- if(GetPlayerSkin(playerid) == 105)
- {
- GivePlayerWeapon(playerid,22,500);
- GivePlayerWeapon(playerid,31,500);
- }
- if(GetPlayerSkin(playerid) == 106)
- {
- GivePlayerWeapon(playerid,24,500);
- GivePlayerWeapon(playerid,25,500);
- }
- if(GetPlayerSkin(playerid) == 107)
- {
- GivePlayerWeapon(playerid,26,500);
- GivePlayerWeapon(playerid,34,500);
- }
- if(GetPlayerSkin(playerid) == 104)
- {
- GivePlayerWeapon(playerid,22,500);
- GivePlayerWeapon(playerid,31,500);
- }
- if(GetPlayerSkin(playerid) == 103)
- {
- GivePlayerWeapon(playerid,24,500);
- GivePlayerWeapon(playerid,30,500);
- }
- if(GetPlayerSkin(playerid) == 102)
- {
- GivePlayerWeapon(playerid,28,500);
- GivePlayerWeapon(playerid,33,500);
- }
- if(GetPlayerSkin(playerid) == 108)
- {
- GivePlayerWeapon(playerid,22,500);
- GivePlayerWeapon(playerid,31,500);
- }
- if(GetPlayerSkin(playerid) == 109)
- {
- GivePlayerWeapon(playerid,28,500);
- GivePlayerWeapon(playerid,33,500);
- }
- if(GetPlayerSkin(playerid) == 110)
- {
- GivePlayerWeapon(playerid,24,500);
- GivePlayerWeapon(playerid,30,500);
- }
- if(GetPlayerSkin(playerid) == 285)
- {
- GivePlayerWeapon(playerid,27,500);
- GivePlayerWeapon(playerid,39,500);
- }
- if(GetPlayerSkin(playerid) == 286)
- {
- GivePlayerWeapon(playerid,23,500);
- GivePlayerWeapon(playerid,31,500);
- }
- if(GetPlayerSkin(playerid) == 280)
- {
- GivePlayerWeapon(playerid,27,500);
- GivePlayerWeapon(playerid,31,500);
- }
- if(GetPlayerSkin(playerid) == 114)
- {
- GivePlayerWeapon(playerid,28,500);
- GivePlayerWeapon(playerid,33,500);
- }
- if(GetPlayerSkin(playerid) == 115)
- {
- GivePlayerWeapon(playerid,24,500);
- GivePlayerWeapon(playerid,31,500);
- }
- if(GetPlayerSkin(playerid) == 116)
- {
- GivePlayerWeapon(playerid,22,500);
- GivePlayerWeapon(playerid,30,500);
- }
- if(GetPlayerSkin(playerid) == 61)
- {
- GivePlayerWeapon(playerid,22,500);
- }
- if(GetPlayerSkin(playerid) == 287)
- {
- GivePlayerWeapon(playerid,27,500);
- GivePlayerWeapon(playerid,31,500);
- }
- TextDrawShowForPlayer(playerid,TeamGrove);
- TextDrawShowForPlayer(playerid,TeamBallas);
- TextDrawShowForPlayer(playerid,TeamAztecs);
- TextDrawShowForPlayer(playerid,TeamVagos);
- if (GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) <= 100)
- {
- TextDrawShowForPlayer(playerid,Rank);
- }
- if (GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) <= 500)
- {
- TextDrawShowForPlayer(playerid,Rank1);
- }
- if (GetPlayerScore(playerid) >= 500 && GetPlayerScore(playerid) <= 1000)
- {
- TextDrawShowForPlayer(playerid,Rank2);
- }
- if (GetPlayerScore(playerid) >= 1000 && GetPlayerScore(playerid) <= 2000)
- {
- TextDrawShowForPlayer(playerid,Rank3);
- }
- if (GetPlayerScore(playerid) >= 2000 && GetPlayerScore(playerid) <= 3500)
- {
- TextDrawShowForPlayer(playerid,Rank4);
- }
- if (GetPlayerScore(playerid) >= 3500 && GetPlayerScore(playerid) <= 8000)
- {
- TextDrawShowForPlayer(playerid,Rank5);
- }
- if (GetPlayerScore(playerid) >= 10000)
- {
- TextDrawShowForPlayer(playerid,Rank6);
- }
- for(new i=0; i < sizeof(ZoneInfo); i++)
- {
- GangZoneShowForPlayer(playerid, ZoneID[i], GetTeamZoneColor(ZoneInfo[i][zTeam]));
- if(ZoneAttacker[i] != -1) GangZoneFlashForPlayer(playerid, ZoneID[i], 0xFF000055);
- }
- return 1;
- }
- stock GetTeamZoneColor(teamid)
- {
- switch(teamid)
- {
- case TEAM_GROVE: return 0x00800055;
- case TEAM_BALLAS: return 0xA800A855;
- case TEAM_VAGOS: return 0xD5D50055;
- case TEAM_AZTECS: return 0x00A6A655;
- case TEAM_SWAT: return 0x0000FF55;
- }
- return -1;
- }
- stock Zone(playerid, zoneid)
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- return (x > ZoneInfo[zoneid][zMinX] && x < ZoneInfo[zoneid][zMaxX] && y > ZoneInfo[zoneid][zMinY] && y < ZoneInfo[zoneid][zMaxY]);
- }
- stock IsPlayerInZone(playerid, zoneid)
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- return (x > ZoneInfo[zoneid][zMinX] && x < ZoneInfo[zoneid][zMaxX] && y > ZoneInfo[zoneid][zMinY] && y < ZoneInfo[zoneid][zMaxY]);
- }
- stock GetPlayersInZone(zoneid, teamid)
- {
- new count;
- for(new i=0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && GetPlayerTeam(i) == teamid && IsPlayerInZone(i, zoneid))
- {
- count++;
- }
- }
- return count;
- }
- stock GetPlayerZone(playerid)
- {
- for(new i=0; i < sizeof(ZoneInfo); i++)
- {
- if(IsPlayerInZone(playerid, i))
- {
- return i;
- }
- }
- return -1;
- }
- public OnPlayerDeath(playerid, killerid, reason)
- {
- for(new i=0; i < sizeof(ZoneInfo); i++)
- for(new m=0; m<MAX_PLAYERS; m++)
- {
- if(IsPlayerConnected(killerid) && GetPlayerTeam(playerid) != GetPlayerTeam(killerid)) // not a suicide or team kill
- {
- new zoneid = GetPlayerZone(playerid);
- if(zoneid != -1 && ZoneInfo[zoneid][zTeam] == GetPlayerTeam(playerid)) // zone member has been killed in the zone
- {
- ZoneDeaths[zoneid]++;
- if(ZoneDeaths[zoneid] == MIN_DEATHS_TO_START_WAR)
- {
- new
- tStrn [50];
- format(tStrn, sizeof(tStrn), "~g~%s has been ~p~Provoked ~w~for a war by ~r~%s!!", GetTeamName(GetPlayerTeam(playerid)), GetTeamName(GetPlayerTeam(killerid)));
- ZoneDeaths[zoneid] = 0;
- ZoneAttacker[zoneid] = GetPlayerTeam(killerid);
- ZoneAttackTime[zoneid] = 0;
- GangZoneFlashForAll(ZoneID[zoneid], 0xFF000055);
- new Float:x,Float:y,Float:z;
- GetPlayerPos(killerid,x,y,z);
- if(GetPlayerTeam(killerid) == TEAM_GROVE)
- {
- SetPlayerMapIcon(mP[m], 12, x,y,z, 62, 0, MAPICON_GLOBAL);
- }
- if(GetPlayerTeam(killerid) == TEAM_BALLAS)
- {
- SetPlayerMapIcon(mP[m], 12, x,y,z, 59, 0, MAPICON_GLOBAL);
- }
- if(GetPlayerTeam(killerid) == TEAM_VAGOS)
- {
- SetPlayerMapIcon(mP[m], 12, x,y,z, 60, 0, MAPICON_GLOBAL);
- }
- if(GetPlayerTeam(killerid) == TEAM_AZTECS)
- {
- SetPlayerMapIcon(mP[m], 12, x,y,z, 58, 0, MAPICON_GLOBAL);
- }
- if(GetPlayerTeam(killerid) == TEAM_SWAT)
- {
- SetPlayerMapIcon(mP[m], 12, x,y,z, 30, 0, MAPICON_GLOBAL);
- }
- }
- }
- }
- }
- PlayerInfo[killerid][Kills]++;
- PlayerInfo[playerid][Deaths]++;
- SendDeathMessage(killerid, playerid, reason);
- new pName[24];
- new string[128];
- if(gTeam[killerid] == TEAM_GROVE) ++Scores[TEAM_GROVE];
- if(gTeam[killerid] == TEAM_BALLAS) ++Scores[TEAM_BALLAS];
- if(gTeam[killerid] == TEAM_VAGOS) ++Scores[TEAM_VAGOS];
- if(gTeam[killerid] == TEAM_AZTECS) ++Scores[TEAM_AZTECS];
- UpdateScore();
- if(killerid != INVALID_PLAYER_ID) SetPlayerScore(killerid, GetPlayerScore(killerid) + 2);
- {
- GivePlayerMoney(killerid,5000);
- GetPlayerName(playerid, pName, 24);
- format(string, 128, " You Killed %s", pName);
- SendClientMessage(playerid, COLOR_GREEN, string);
- }
- if(playerid != INVALID_PLAYER_ID) SetPlayerScore(playerid, GetPlayerScore(playerid) - 1);
- {
- GivePlayerMoney(playerid,-2000);
- GetPlayerName(killerid, pName, 24);
- format(string, 128, " %s Killed you", pName);
- SendClientMessage(playerid, COLOR_RED, string);
- }
- return 1;
- }
- stock UpdateScore()
- {
- new str[20];
- format(str,sizeof(str),"Team ~g~Grove : ~b~%d",Scores[TEAM_GROVE]);
- TextDrawSetString(TeamGrove,str);
- format(str,sizeof(str),"Team ~p~Ballas : ~b~%d",Scores[TEAM_BALLAS]);
- TextDrawSetString(TeamBallas,str);
- format(str,sizeof(str),"Team ~y~Vagos : ~r~%d",Scores[TEAM_VAGOS]);
- TextDrawSetString(TeamVagos,str);
- format(str,sizeof(str),"Team ~b~Aztecs : ~r~%d",Scores[TEAM_VAGOS]);
- TextDrawSetString(TeamAztecs,str);
- return 1;
- }
- public OnVehicleSpawn(vehicleid)
- {
- return 1;
- }
- public OnVehicleDeath(vehicleid, killerid)
- {
- return 1;
- }
- public OnPlayerText(playerid, text[])
- {
- if(text[0] == '!')
- {
- new string[128];
- GetPlayerName(playerid, string, sizeof(string));
- format(string, sizeof(string), "[Team Chat] %s: %s", string, text[1]);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && gTeam[i] == gTeam[playerid]) SendClientMessage(i, GetPlayerColor(playerid), string);
- }
- return 0;
- }
- return 1;
- }
- public OnPlayerCommandText(playerid, cmdtext[])
- {
- return 0;
- }
- //===================================================================================
- //Admin Commands
- //===================================================================================
- CMD:onduty(playerid, params[])
- {
- if(PlayerInfo[playerid][Admin] >= 1)
- {
- SetPlayerColor(playerid, COLOR_BRIGHTRED);
- }
- return 1;
- }
- CMD:offduty(playerid, params[])
- {
- if(PlayerInfo[playerid][Admin] >= 1)
- {
- SetPlayerColor(playerid, -1);
- }
- return 1;
- }
- CMD:setvip(playerid, params[])
- {
- new pID, value;
- if(PlayerInfo[playerid][Admin] >= 3)
- {
- if(sscanf(params, "ui", pID, value)) return SendClientMessage(playerid, COLOR_CYAN, "Usage: /setvip (id) (level)");
- else if(value < 0 || value > 3) return SendClientMessage(playerid, COLOR_CYAN, "levels 0-3");
- else if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_CYAN, "Player Is Not Currently Connected");
- else
- {
- new string[128], string1[128], target[MAX_PLAYER_NAME], pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, sizeof(pName));
- GetPlayerName(pID, target, sizeof(target));
- format(string, sizeof(string), "You have set %s VIP level to %i", target, value);
- SendClientMessage(playerid, COLOR_CYAN, string);
- format(string, sizeof(string), "Your VIP level has been set to %i by %s", value, pName);
- SendClientMessage(pID, COLOR_CYAN, string1);
- PlayerInfo[pID][VIP] = value;
- new INI:file = INI_Open(UserPath(pID));
- INI_SetTag(file,"data");
- INI_WriteInt(file,"VIP",PlayerInfo[pID][VIP]);
- INI_Close(file);
- }
- }
- else
- {
- return -1;
- }
- return 1;
- }
- CMD:setlevel(playerid, params[])
- {
- new pID, value;
- if(PlayerInfo[playerid][Admin] == 3)
- {
- if(sscanf(params, "ui", pID, value)) return SendClientMessage(playerid, COLOR_CYAN, "Usage: /setlevel (id) (level)");
- else if(value < 0 || value > 2) return SendClientMessage(playerid, COLOR_CYAN, "levels 0-2");
- else if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_CYAN, "Player Is Not Currently Connected");
- else
- {
- new string[128], string1[128], target[MAX_PLAYER_NAME], pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, sizeof(pName));
- GetPlayerName(pID, target, sizeof(target));
- format(string, sizeof(string), "You have set %s Admin level to %i", target, value);
- SendClientMessage(playerid, COLOR_CYAN, string);
- format(string, sizeof(string), "Your Admin level has been set to %i by %s", value, pName);
- SendClientMessage(pID, COLOR_CYAN, string1);
- PlayerInfo[pID][Admin] = value;
- new INI:file = INI_Open(UserPath(pID));
- INI_SetTag(file,"data");
- INI_WriteInt(file,"Admin",PlayerInfo[pID][Admin]);
- INI_Close(file);
- }
- }
- else if(PlayerInfo[playerid][Admin] == 4)
- {
- if(sscanf(params, "ui", pID, value)) return SendClientMessage(playerid, COLOR_CYAN, "Usage: /sethlevel (id) (level)");
- else if(value < 0 || value > 3) return SendClientMessage(playerid, COLOR_CYAN, "levels 0-3");
- else if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_CYAN, "Player Is Not Currently Connected");
- else
- {
- new string[128], string1[128], target[MAX_PLAYER_NAME], pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, sizeof(pName));
- GetPlayerName(pID, target, sizeof(target));
- format(string, sizeof(string), "You have set %s Admin level to %i", target, value);
- SendClientMessage(playerid, COLOR_CYAN, string);
- format(string, sizeof(string), "Your Admin level has been set to %i by %s", value, pName);
- SendClientMessage(pID, COLOR_CYAN, string1);
- PlayerInfo[pID][Admin] = value;
- new INI:file = INI_Open(UserPath(pID));
- INI_SetTag(file,"data");
- INI_WriteInt(file,"Admin",PlayerInfo[pID][Admin]);
- INI_Close(file);
- }
- }
- else if(PlayerInfo[playerid][Admin] == 5)
- {
- if(sscanf(params, "ui", pID, value)) return SendClientMessage(playerid, COLOR_CYAN, "Usage: /setahlevel (id) (level)");
- else if(value < 0 || value > 4) return SendClientMessage(playerid, COLOR_CYAN, "levels 0-4");
- else if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_CYAN, "Player Is Not Currently Connected");
- else
- {
- new string[128], string1[128], target[MAX_PLAYER_NAME], pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, sizeof(pName));
- GetPlayerName(pID, target, sizeof(target));
- format(string, sizeof(string), "You have set %s Admin level to %i", target, value);
- SendClientMessage(playerid, COLOR_CYAN, string);
- format(string, sizeof(string), "Your Admin level has been set to %i by %s", value, pName);
- SendClientMessage(pID, COLOR_CYAN, string1);
- PlayerInfo[pID][Admin] = value;
- new INI:file = INI_Open(UserPath(pID));
- INI_SetTag(file,"data");
- INI_WriteInt(file,"Admin",PlayerInfo[pID][Admin]);
- INI_Close(file);
- }
- }
- else
- {
- return -1;
- }
- return 1;
- }
- CMD:rconlevel(playerid, params[])
- {
- new pID, value;
- if(!IsPlayerAdmin(playerid)) return 0;
- if(sscanf(params, "ui", pID, value)) return SendClientMessage(playerid, COLOR_CYAN, "Usage: /rconlevel (id) (level)");
- else if(value < 0 || value > 5) return SendClientMessage(playerid, COLOR_CYAN, "levels 0-5");
- else if(!IsPlayerConnected(pID)) return SendClientMessage(playerid, COLOR_CYAN, "Player Is Not Currently Connected");
- else
- {
- new string[128], string1[128], target[MAX_PLAYER_NAME], pName[MAX_PLAYER_NAME];
- GetPlayerName(playerid, pName, sizeof(pName));
- GetPlayerName(pID, target, sizeof(target));
- format(string, sizeof(string), "You have set %s Admin level to %i", target, value);
- SendClientMessage(playerid, COLOR_CYAN, string);
- format(string, sizeof(string), "Your Admin level has been set to %i by %s", value, pName);
- SendClientMessage(pID, COLOR_CYAN, string1);
- PlayerInfo[pID][Admin] = value;
- new INI:file = INI_Open(UserPath(pID));
- INI_SetTag(file,"data");
- INI_WriteInt(file,"Admin",PlayerInfo[pID][Admin]);
- INI_Close(file);
- }
- return 1;
- }
- CMD:kick(playerid, params[])
- {
- new id, reason[50], string[128], Kicked[MAX_PLAYER_NAME];
- if(PlayerInfo[playerid][Admin] >= 1)
- {
- if(sscanf(params, "us", id, reason)) return SendClientMessage(playerid, COLOR_CYAN, "Usage: /kick [id/name][reason]");
- else if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_CYAN, "Player Is Not Currently Connected");
- else if(id==playerid)return SendClientMessage(playerid,COLOR_CYAN,"Error: You can not kick yourself!");
- else if(PlayerInfo[id][Admin] >= 1) return SendClientMessage(playerid,COLOR_CYAN,"Error: You can not kick another admin!");
- else
- {
- GetPlayerName(id, Kicked, sizeof(Kicked));
- format(string, sizeof(string), "%s has been kicked by Adminstrator %s(%d). reason: %s",Kicked, Get1Name(playerid) ,playerid, reason);
- SendClientMessageToAll(COLOR_RED, string);
- Kick(id);
- }
- }
- else
- {
- return -1;
- }
- return 1;
- }
- CMD:ban(playerid, params[])
- {
- new id, reason[50], string[128], Kicked[MAX_PLAYER_NAME];
- if(PlayerInfo[playerid][Admin] >= 1)
- {
- if(sscanf(params, "us", id, reason)) return SendClientMessage(playerid, COLOR_CYAN, "Usage: /ban [id/name][reason]");
- else if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_CYAN, "Player Is Not Currently Connected");
- else if(id==playerid)return SendClientMessage(playerid,COLOR_CYAN,"Error: You can not ban yourself!");
- else if(PlayerInfo[id][Admin] >= 1) return SendClientMessage(playerid,COLOR_CYAN,"Error: You can not ban another admin!");
- else
- {
- GetPlayerName(id, Kicked, sizeof(Kicked));
- format(string, sizeof(string), "%s has been Banned by Adminstrator %s(%d). reason: %s",Kicked, Get1Name(playerid) ,playerid, reason);
- SendClientMessageToAll(COLOR_RED, string);
- PlayerInfo[id][Bans] = 1;
- new INI:file = INI_Open(UserPath(id));
- INI_SetTag(file,"data");
- INI_WriteInt(file,"Banned",PlayerInfo[id][Bans]);
- INI_Close(file);
- Kick(id);
- }
- }
- else
- {
- return -1;
- }
- return 1;
- }
- CMD:spec(playerid, params[])
- {
- new id;
- if(PlayerInfo[playerid][Admin] >= 1)
- {
- if(sscanf(params,"u", id))return SendClientMessage(playerid, Grey, "Usage: /spec [id]");// Now this is where we use sscanf to check if the params were filled, if not we'll ask you to fill them
- else if(id == playerid)return SendClientMessage(playerid,Grey,"You cannot spec yourself.");// Just making sure.
- else if(!IsPlayerConnected(id)) return SendClientMessage(playerid, COLOR_CYAN, "Player Is Not Currently Connected");// This is to ensure that you don't fill the param with an invalid player id.
- else if(IsSpecing[playerid] == 1)return SendClientMessage(playerid,Grey,"You are already specing someone.");// This will make you not automatically spec someone else by mistake.
- GetPlayerPos(playerid,SpecX[playerid],SpecY[playerid],SpecZ[playerid]);// This is getting and saving the player's position in a variable so they'll respawn at the same place they typed '/spec'
- Inter[playerid] = GetPlayerInterior(playerid);// Getting and saving the interior.
- vWorld[playerid] = GetPlayerVirtualWorld(playerid);//Getting and saving the virtual world.
- TogglePlayerSpectating(playerid, true);// Now before we use any of the 3 functions listed above, we need to use this one. It turns the spectating mode on.
- if(IsPlayerInAnyVehicle(id))//Checking if the player is in a vehicle.
- {
- if(GetPlayerInterior(id) > 0)//If the player's interior is more than 0 (the default) then.....
- {
- SetPlayerInterior(playerid,GetPlayerInterior(id));//.....set the spectator's interior to that of the player being spectated.
- }
- if(GetPlayerVirtualWorld(id) > 0)//If the player's virtual world is more than 0 (the default) then.....
- {
- SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));//.....set the spectator's virtual world to that of the player being spectated.
- }
- PlayerSpectateVehicle(playerid,GetPlayerVehicleID(id));// Now remember we checked if the player is in a vehicle, well if they're in a vehicle then we'll spec the vehicle.
- }
- else// If they're not in a vehicle, then we'll spec the player.
- {
- if(GetPlayerInterior(id) > 0)
- {
- SetPlayerInterior(playerid,GetPlayerInterior(id));
- }
- if(GetPlayerVirtualWorld(id) > 0)
- {
- SetPlayerVirtualWorld(playerid,GetPlayerVirtualWorld(id));
- }
- PlayerSpectatePlayer(playerid,id);//
- }
- GetPlayerName(id, Name, sizeof(Name));//
- format(String, sizeof(String),"You have started to spectate %s.",Name);//
- SendClientMessage(playerid,0x0080C0FF,String);//
- IsSpecing[playerid] = 1;//
- IsBeingSpeced[id] = 1;//
- spectatorid[playerid] = id;//
- }
- else
- {
- return -1;
- }
- return 1;
- }
- CMD:specoff(playerid, params[])
- {
- if(PlayerInfo[playerid][Admin] >= 1)
- {//
- if(IsSpecing[playerid] == 0) return SendClientMessage(playerid,Grey,"You are not spectating anyone.");
- TogglePlayerSpectating(playerid, 0);
- }
- else
- {
- return -1;
- }//
- return 1;
- }
- CMD:v(playerid, params[])
- {
- if(PlayerInfo[playerid][Admin] >= 1)
- {
- new veh[24], color[2];
- if(sscanf(params, "s[24]I(-1)I(-1)", veh, color[0], color[1])) return SendClientMessage(playerid, COLOR_CYAN, "[*] Usage: /v [vehicleid/name] [Optional: color 1] [Optional: color 2]");
- new VehicleNames[212][] = {
- {"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"},{"Seasparrow"},{"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"},{"Sparrow"},{"Patriot"},{"Quad"},{"Coastguard"},{"Dinghy"},{"Hermes"},{"Sabre"},
- {"Rustler"},{"ZR-350"},{"Walton"},{"Regina"},{"Comet"},{"BMX"},{"Burrito"},{"Camper"},{"Marquis"},
- {"Baggage"},{"Dozer"},{"Maverick"},{"News Chopper"},{"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"},{"Streak"},{"Vortex"},{"Vincent"},{"Bullet"},{"Clover"},{"Sadler"},
- {"Firetruck LA"},{"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"},{"Duneride"},{"Sweeper"},
- {"Broadway"},{"Tornado"},{"AT-400"},{"DFT-30"},{"Huntley"},{"Stafford"},{"BF-400"},{"Newsvan"},
- {"Tug"},{"Trailer 3"},{"Emperor"},{"Wayfarer"},{"Euros"},{"Hotdog"},{"Club"},{"Freight Carriage"},
- {"Trailer 3"},{"Andromada"},{"Dodo"},{"RC Cam"},{"Launch"},{"Police Car (LSPD)"},{"Police Car (SFPD)"},
- {"Police Car (LVPD)"},{"Police Ranger"},{"Picador"},{"S.W.A.T. Van"},{"Alpha"},{"Phoenix"},{"Glendale"},
- {"Sadler"},{"Luggage Trailer A"},{"Luggage Trailer B"},{"Stair Trailer"},{"Boxville"},{"Farm Plow"},
- {"Utility Trailer"}
- }, vehicle = -1;
- for(new v; v < 212; v++) if(strfind(VehicleNames[v], veh, true) != -1) { vehicle = v + 400; break; }
- if(vehicle == -1) vehicle = strval(veh);
- if(vehicle < 400 || vehicle > 611) return SendClientMessage(playerid, -1, "[*] Enter a valid vehicle name or an ID between 400 and 611!");
- new Float:Pos[4];
- if(IsPlayerInAnyVehicle(playerid))
- {
- GetVehiclePos(GetPlayerVehicleID(playerid), Pos[0], Pos[1], Pos[2]);
- GetVehicleZAngle(GetPlayerVehicleID(playerid), Pos[3]);
- }
- else
- {
- GetPlayerPos(playerid, Pos[0], Pos[1], Pos[2]);
- GetPlayerFacingAngle(playerid, Pos[3]);
- }
- PutPlayerInVehicle(playerid, CreateVehicle(vehicle, Pos[0], Pos[1], Pos[2], Pos[3], color[0], color[1], 120), 0);
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "SERVER: Unknown command.");
- }
- return 1;
- }
- COMMAND:freeze(playerid, params[])
- {
- if(PlayerInfo[playerid][Admin] >= 1)
- {
- new id;
- if(sscanf(params, "u", id)) return SendClientMessage(playerid, 0x0259EAAA, "USAGE: /freeze [PlayerId/PartOfName]");
- else
- {
- if(IsPlayerConnected(id))
- {
- new string[64];
- new name8[MAX_PLAYER_NAME], Player8Name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name8, sizeof(name8));
- GetPlayerName(id, Player8Name, sizeof(Player8Name));
- format(string, sizeof(string), "You have been frozen by Adminstrator %s", name8);
- SendClientMessage(id, 0x0259EAAA, string);
- format(string, sizeof(string), "You have frozen %s", Player8Name);
- SendClientMessage(playerid, 0x0259EAAA, string);
- TogglePlayerControllable(id, 0);
- return 1;
- }
- else return SendClientMessage(playerid, COLOR_CYAN, "Player Is Not Currently Connected");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "SERVER: Unknown command.");
- }
- return 1;
- }
- COMMAND:unfreeze(playerid, params[])
- {
- if(PlayerInfo[playerid][Admin] >= 1)
- {
- new id;
- if(sscanf(params, "u", id)) return SendClientMessage(playerid, 0x0259EAAA, "USAGE: /unfreeze [PlayerId/PartOfName]");
- else
- {
- if(IsPlayerConnected(id))
- {
- new string[64];
- new name7[MAX_PLAYER_NAME], Player7Name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name7, sizeof(name7));
- GetPlayerName(id, Player7Name, sizeof(Player7Name));
- format(string, sizeof(string), "You have been unfrozen by Adminstrator %s", name7);
- SendClientMessage(id, 0x0259EAAA, string);
- format(string, sizeof(string), "You have unfrozen %s", Player7Name);
- SendClientMessage(playerid, 0x0259EAAA, string);
- TogglePlayerControllable(id, 1);
- return 1;
- }
- else return SendClientMessage(playerid, COLOR_CYAN, "Player Is Not Currently Connected");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "SERVER: Unknown command.");
- }
- return 1;
- }
- CMD:goto(playerid,params[])
- {
- new id;
- new string85[128];
- new Float:x,Float:y,Float:z;
- new nameme1[MAX_PLAYER_NAME];
- if(PlayerInfo[playerid][Admin] >= 1)
- {
- if(sscanf(params,"u",id)) SendClientMessage(playerid, 0xAA3333AA, "/goto [id]");
- {
- if(IsPlayerConnected(id))
- {
- GetPlayerName(id, nameme1, MAX_PLAYER_NAME);
- GetPlayerPos(id,x,y,z);
- SetPlayerPos(playerid,x,y,z);
- format(string85,sizeof(string85),"You've Teleported to %s",nameme1);
- SendClientMessage(playerid, 0xAA333AA, string85);
- }
- else return SendClientMessage(playerid, COLOR_CYAN, "Player Is Not Currently Connected");
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "SERVER: Unknown command.");
- }
- return 1;
- }
- CMD:get(playerid,params[])
- {
- new id;
- new string85[128];
- new Float:x,Float:y,Float:z;
- new nameme1[MAX_PLAYER_NAME];
- if(PlayerInfo[playerid][Admin] >= 1)
- {
- if(sscanf(params,"u",id)) SendClientMessage(playerid, 0xAA3333AA, "/get [id]");
- {
- if(IsPlayerConnected(id))
- {
- GetPlayerName(id, nameme1, MAX_PLAYER_NAME);
- GetPlayerPos(playerid,x,y,z);
- SetPlayerPos(id,x,y,z);
- format(string85,sizeof(string85),"You've Teleported %s to you",nameme1);
- SendClientMessage(playerid, 0xAA333AA, string85);
- }
- else return SendClientMessage(playerid, COLOR_CYAN, "Player Is Not Currently Connected");
- }
- }
- else
- {
- return -1;
- }
- return 1;
- }
- COMMAND:sethp(playerid, cmdtext[])
- {
- if(PlayerInfo[playerid][Admin] >= 2)
- {
- new Target,Amount;
- if(!sscanf(cmdtext,"ui", Target, Amount))
- {
- if(!IsPlayerConnected(Target)) return SendClientMessage(playerid, COLOR_CYAN, "Target id is not connected");
- else if(Amount < 0 || Amount > 10000) return SendClientMessage(playerid, COLOR_CYAN, "Amount 0 - 10000");
- SetPlayerHealth(Target, Amount);
- SendClientMessage(playerid, COLOR_CYAN, "Target id health set");
- }
- else return SendClientMessage(playerid, COLOR_CYAN, "Usage: /(sh)sethp [playerid] [health] :: Function Will Set Specific Amount of Health for player");
- }
- else
- {
- return -1;
- }
- return 1;
- }
- COMMAND:sh(playerid, params[])
- {
- return cmd_sethp(playerid, params);
- }
- COMMAND:setarmor(playerid, cmdtext[])
- {
- if(PlayerInfo[playerid][Admin] >= 2)
- {
- new Target,Amount;
- if(!sscanf(cmdtext,"ui", Target, Amount))
- {
- if(!IsPlayerConnected(Target)) return SendClientMessage(playerid, COLOR_CYAN, "Target id is not connected");
- else if(Amount < 0 || Amount > 10000) return SendClientMessage(playerid, COLOR_CYAN, "Amount 0 - 10000");
- SetPlayerArmour(Target, Amount);
- SendClientMessage(playerid, COLOR_CYAN, "Target id armor set");
- }
- else return SendClientMessage(playerid, COLOR_CYAN, "Usage: /(sa)setarmor [playerid] [armour] :: Function Will Set Specific Amount of Armour for player");
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "SERVER: Unknown command.");
- }
- return 1;
- }
- COMMAND:sa(playerid, params[])
- {
- return cmd_setarmor(playerid, params);
- }
- CMD:giveweapon(playerid,params[])
- {
- if(PlayerInfo[playerid][Admin] >= 2)
- {
- new pid, wid, amt;
- if(sscanf(params, "uii", pid,wid,amt)) return SendClientMessage(playerid, COLOR_CYAN, "Usage: /(gw)giveweapon [playerid] [weaponid] [amount]");
- else if(wid < 0 || wid >40) return SendClientMessage(playerid,COLOR_CYAN,"ERROR: Invalid weaponid");
- else if(!IsPlayerConnected(pid)) return SendClientMessage(playerid, COLOR_CYAN, "Target id is not connected");
- else
- {
- if(PlayerInfo[playerid][Admin] >= 2)
- {
- GivePlayerWeapon(pid,wid,amt);
- SendClientMessage(playerid, COLOR_CYAN, "Target id Recived the weapon");
- }
- else
- {
- return -1;
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_WHITE, "SERVER: Unknown command.");
- }
- return 1;
- }
- CMD:gw(playerid, params[])
- {
- return cmd_giveweapon(playerid, params);
- }
- COMMAND:givescore(playerid, cmdtext[])
- {
- if(PlayerInfo[playerid][Admin] >= 2)
- {
- new Target,Amount;
- if(!sscanf(cmdtext,"ui", Target, Amount))
- {
- if(!IsPlayerConnected(Target)) return SendClientMessage(playerid, COLOR_CYAN, "Target id is not connected");
- else if(Amount < 0 || Amount > 10000) return SendClientMessage(playerid, COLOR_CYAN, "Amount 0 - 10000");
- SetPlayerScore(Target, GetPlayerScore(Target) + Amount);
- SendClientMessage(playerid, COLOR_CYAN, "Target id Score Recived");
- }
- else return SendClientMessage(playerid, COLOR_CYAN, "Usage: /givescore[playerid] [armour] :: Function Will give Specific Amount of Score to player");
- }
- else
- {
- return -1;
- }
- return 1;
- }
- //=========================================================================================
- //===================================================================================
- //Vip Commands
- //====================================================================================
- CMD:jp(playerid,params[])
- {
- if(PlayerInfo[playerid][VIP] >= 1)
- {
- SetPlayerSpecialAction(playerid,SPECIAL_ACTION_USEJETPACK);
- }
- else
- {
- return -1;
- }
- return 1;
- }
- //===================================================================
- CMD:admins(playerid, params[])
- {
- foreach(Player, i)
- {
- new level[128], string[128];
- if(PlayerInfo[i][Admin] > 0)
- {
- if(sscanf(params, "u", i))
- {
- switch(PlayerInfo[i][Admin])
- {
- case 1: level = ""adminlevel1"";
- case 2: level = ""adminlevel2"";
- case 3: level = ""adminlevel3"";
- case 4: level = ""adminlevel4"";
- case 5: level = ""adminlevel5"";
- }
- format(string, sizeof(string), "%s: %s(%d)", level, playername(i), i);
- SendClientMessage(playerid, COLOR_CYAN, string);
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_CYAN, "There is currently no admin present at this time but we still got an eye on you");
- }
- }
- return 1;
- }
- CMD:order(playerid,params[])
- {
- new reason[50], string[128];
- if(GetPlayerScore(playerid) == 3500)
- {
- if(sscanf(params, "s",reason)) return SendClientMessage(playerid, COLOR_CYAN, "Usage: /order [Command]");
- else
- {
- format(string, sizeof(string), "Senior %s Has Ordered : %s ",playerid, reason);
- for(new i = 0; i < MAX_PLAYERS; i++)
- {
- if(IsPlayerConnected(i) && gTeam[i] == gTeam[playerid]) SendClientMessage(i, COLOR_RED, string);
- }
- }
- }
- else
- {
- SendClientMessage(playerid, COLOR_RED, "You need to be a high level Pal to use this command : least 3500 Score");
- }
- return 1;
- }
- CMD:locate(playerid,params[])
- {
- new targetid; //the player we will locate
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "[USAGE]: /Locate [Part of Name/Player ID]"); // this defines as /Gps [id]
- if(IsPlayerConnected(targetid)) //to check if is player connected or not
- {
- new Float:x, Float:y, Float:z; // code to detect player position
- GetPlayerPos(playerid, x, y, z); // ^
- SetPlayerMapIcon(playerid, 13, x, y, z, 62, 0, MAPICON_GLOBAL); // set a map icon for player , 12 is define as objectid, and 62 define as map icon
- SendClientMessage(playerid,COLOR_GREEN,"Last Time he was at that location, /lrem to stop the tracker");
- TogglePlayerControllable(playerid, 0);
- }
- return 1;
- }
- CMD:lrem(playerid,params[])
- {
- RemovePlayerMapIcon(playerid, 13); // to rem player map icon
- TogglePlayerControllable(playerid, 1);
- return 1;
- }
- CMD:acmd(playerid,params[])
- {
- ShowPlayerDialog(playerid, 12516, DIALOG_STYLE_MSGBOX,"{FFFF00}Admin Commands","{FFF000}/setdonor,/remdonor \n{F235FF}/kick,/ban,/warn\n{00FF32}/car,/sethealth,/setarmour,/goto, etc()","Okay","");
- return 1;
- }
- CMD:setdonor(playerid,params[])
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "You need to be RCON for use this command");
- new ID;
- new pn[MAX_PLAYER_NAME];
- new an[MAX_PLAYER_NAME];
- new str[128];
- if(sscanf(params, "u", ID)) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /setdonor [ID]"); //This is a long line, "sscanf" is the plugin that search the missing params, "params" is the param that define params LOL, "u" is the PARAM that define the MISSING ID, ID is the param for the targetid
- if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: This player is not connected");//Same as !IsPlayerAdmin, but instead of "playerid" we put "ID" because it's the targetid
- GetPlayerName(playerid, an, MAX_PLAYER_NAME);//Define the playerid's param
- GetPlayerName(ID, pn, MAX_PLAYER_NAME);//Define the ID's param
- Donor[playerid] = 1;
- format(str, sizeof(str), "You set %s as a Donor", pn); //Showed before, this is the line that give the message to playerid)
- SendClientMessage(playerid, 0x00FF00AA, str); //This line give the message to playerid
- return 1;
- }
- CMD:remdonor(playerid,params[])
- {
- if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, 0xFF0000AA, "You need to be RCON for use this command");
- new ID;
- new pn[MAX_PLAYER_NAME];
- new an[MAX_PLAYER_NAME];
- new str[128];
- if(sscanf(params, "u", ID)) return SendClientMessage(playerid, 0xFF0000AA, "USAGE: /remdonor [ID]"); //This is a long line, "sscanf" is the plugin that search the missing params, "params" is the param that define params LOL, "u" is the PARAM that define the MISSING ID, ID is the param for the targetid
- if(!IsPlayerConnected(ID)) return SendClientMessage(playerid, 0xFF0000AA, "ERROR: This player is not connected");//Same as !IsPlayerAdmin, but instead of "playerid" we put "ID" because it's the targetid
- GetPlayerName(playerid, an, MAX_PLAYER_NAME);//Define the playerid's param
- GetPlayerName(ID, pn, MAX_PLAYER_NAME);//Define the ID's param
- Donor[playerid] = 0;
- format(str, sizeof(str), "You remove %s from Donor ship", pn); //Showed before, this is the line that give the message to playerid)
- SendClientMessage(playerid, 0x00FF00AA, str); //This line give the message to playerid
- return 1;
- }
- CMD:exit(playerid, params[])
- {
- if(InHouse[playerid] == 0) return SendClientMessage(playerid,COLOR_RED,"You are not in the House");
- if(GetPlayerTeam(playerid) == TEAM_GROVE)
- {
- SetPlayerPos(playerid, 2514.8130,-1674.3113,13.7020);
- SetPlayerInterior(playerid, 0);
- InHouse[playerid] = 0;
- }
- if(InHouse[playerid] == 0) return SendClientMessage(playerid,COLOR_RED,"You are not in the House");
- if(GetPlayerTeam(playerid) == TEAM_BALLAS)
- {
- SetPlayerPos(playerid, 2014.1774,-1740.4828,13.5469);
- SetPlayerInterior(playerid, 0);
- InHouse[playerid] = 0;
- }
- if(InHouse[playerid] == 0) return SendClientMessage(playerid,COLOR_RED,"You are not in the House");
- if(GetPlayerTeam(playerid) == TEAM_VAGOS)
- {
- SetPlayerPos(playerid, 2541.5249,-1033.1189,69.5793);
- SetPlayerInterior(playerid, 0);
- InHouse[playerid] = 0;
- }
- if(InHouse[playerid] == 0) return SendClientMessage(playerid,COLOR_RED,"You are not in the House");
- if(GetPlayerTeam(playerid) == TEAM_AZTECS)
- {
- SetPlayerPos(playerid, 1715.0638,-2124.4746,14.0566);
- SetPlayerInterior(playerid, 0);
- InHouse[playerid] = 0;
- }
- return 1;
- }
- CMD:enter(playerid,params[])
- {
- if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
- if(IsPlayerInRangeOfPoint(playerid, 7.0, 2522.8372,-1679.4862,15.4970))
- {
- SetPlayerInterior(playerid, 3);
- SetPlayerPos(playerid, 235.508994,1189.169897,1080.339966);
- InHouse[playerid] = 1;
- }
- if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
- if(IsPlayerInRangeOfPoint(playerid, 7.0, 2524.3279,-1658.8173,15.4935))
- {
- SetPlayerInterior(playerid, 2);
- SetPlayerPos(playerid, 225.756989,1240.000000,1082.149902);
- InHouse[playerid] = 1;
- }
- if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
- if(IsPlayerInRangeOfPoint(playerid, 7.0, 2513.5056,-1650.0386,14.3557))
- {
- SetPlayerInterior(playerid, 1);
- SetPlayerPos(playerid, 223.043991,1289.259888,1082.199951);
- InHouse[playerid] = 1;
- }
- if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
- if(IsPlayerInRangeOfPoint(playerid, 7.0, 2498.6497,-1643.5905,13.7826))
- {
- SetPlayerInterior(playerid, 7);
- SetPlayerPos(playerid, 225.630997,1022.479980,1084.069946);
- InHouse[playerid] = 1;
- }
- if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
- if(IsPlayerInRangeOfPoint(playerid, 7.0, 2486.2517,-1644.5336,14.0772))
- {
- SetPlayerInterior(playerid, 2);
- SetPlayerPos(playerid, 2451.77,-1699.80,1013.51);
- InHouse[playerid] = 1;
- }
- if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
- if(IsPlayerInRangeOfPoint(playerid, 7.0, 2468.9958,-1647.2377,13.5182))
- {
- SetPlayerInterior(playerid, 1);
- SetPlayerPos(playerid, 2535.83,-1674.32,1015.50);
- InHouse[playerid] = 1;
- }
- if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
- if(IsPlayerInRangeOfPoint(playerid, 7.0, 2014.8019,-1732.6581,14.2344))
- {
- SetPlayerInterior(playerid,19);
- SetPlayerPos(playerid, 2251.85,-1138.16,1050.63);
- InHouse[playerid] = 1;
- }
- if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
- if(IsPlayerInRangeOfPoint(playerid, 7.0, 2016.0077,-1717.3259,14.0968))
- {
- SetPlayerInterior(playerid, 3);
- SetPlayerPos(playerid, 235.508994,1189.169897,1080.339966);
- InHouse[playerid] = 1;
- }
- if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
- if(IsPlayerInRangeOfPoint(playerid, 7.0, 2018.2424,-1703.6433,14.2344))
- {
- SetPlayerInterior(playerid, 2);
- SetPlayerPos(playerid, 225.756989,1240.000000,1082.149902);
- InHouse[playerid] = 1;
- }
- if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
- if(IsPlayerInRangeOfPoint(playerid, 7.0, 1980.6772,-1719.3282,17.0308))
- {
- SetPlayerInterior(playerid, 1);
- SetPlayerPos(playerid, 223.043991,1289.259888,1082.199956);
- InHouse[playerid] = 1;
- }
- if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
- if(IsPlayerInRangeOfPoint(playerid, 7.0, 1973.0618,-1705.7380,15.9688))
- {
- SetPlayerInterior(playerid, 7);
- SetPlayerPos(playerid, 225.630997,1022.479980,1084.069946);
- InHouse[playerid] = 1;
- }
- if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
- if(IsPlayerInRangeOfPoint(playerid, 7.0, 1980.9927,-1682.6611,17.0535))
- {
- SetPlayerInterior(playerid, 2);
- SetPlayerPos(playerid, 2451.77,-1699.80,1013.51);
- InHouse[playerid] = 1;
- }
- if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
- if(IsPlayerInRangeOfPoint(playerid, 7.0, 2526.9668,-1034.3342,69.5795))
- {
- SetPlayerInterior(playerid, 1);
- SetPlayerPos(playerid, 2535.83,-1674.32,1015.50);
- InHouse[playerid] = 1;
- }
- if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
- if(IsPlayerInRangeOfPoint(playerid, 7.0, 2628.3418,-1067.6791,69.6122))
- {
- SetPlayerInterior(playerid, 9);
- SetPlayerPos(playerid, 2251.85,-1138.16,1050.63);
- InHouse[playerid] = 1;
- }
- if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
- if(IsPlayerInRangeOfPoint(playerid, 7.0, 2534.4414,-1062.6346,69.5662))
- {
- SetPlayerInterior(playerid, 3);
- SetPlayerPos(playerid, 235.508994,1189.169897,1080.339966);
- InHouse[playerid] = 1;
- }
- if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
- if(IsPlayerInRangeOfPoint(playerid, 7.0, 2018.2424,-1703.6433,14.2344))
- {
- SetPlayerInterior(playerid, 2);
- SetPlayerPos(playerid, 225.756989,1240.000000,1082.149902);
- InHouse[playerid] = 1;
- }
- if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
- if(IsPlayerInRangeOfPoint(playerid, 7.0, 2534.4414,-1062.6346,69.5662))
- {
- SetPlayerInterior(playerid, 1);
- SetPlayerPos(playerid, 223.043991,1289.259888,1082.199956);
- InHouse[playerid] = 1;
- }
- if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
- if(IsPlayerInRangeOfPoint(playerid, 7.0, 2526.1941,-1061.2209,69.9708))
- {
- SetPlayerInterior(playerid, 7);
- SetPlayerPos(playerid, 225.630997,1022.479980,1084.069946);
- InHouse[playerid] = 1;
- }
- if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
- if(IsPlayerInRangeOfPoint(playerid, 7.0, 1755.5990,-2118.5598,13.5543))
- {
- SetPlayerInterior(playerid, 2);
- SetPlayerPos(playerid, 2451.77,-1699.80,1013.51);
- InHouse[playerid] = 1;
- }
- if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
- if(IsPlayerInRangeOfPoint(playerid, 7.0, 1714.4561,-2125.2808,14.0566))
- {
- SetPlayerInterior(playerid, 1);
- SetPlayerPos(playerid, 2535.83,-1674.32,1015.50);
- InHouse[playerid] = 1;
- }
- if(InHouse[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"please type /exit");
- if(IsPlayerInRangeOfPoint(playerid, 7.0, 1712.0077,-2101.3975,14.0210))
- {
- SetPlayerInterior(playerid, 9);
- SetPlayerPos(playerid, 2251.85,-1138.16,1050.63);
- InHouse[playerid] = 1;
- }
- return 1;
- }
- CMD:cuff(playerid, params[])
- {
- new targetid;
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "[USAGE]: /cuff [Part of Name/Player ID]");
- if(IsPlayerConnected(targetid))
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- if(IsPlayerInRangeOfPoint(targetid, 5.0, x, y, z))
- if(GetPlayerTeam(playerid) == TEAM_SWAT)
- {
- new str[512];
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- new target[MAX_PLAYER_NAME];
- GetPlayerName(targetid, target, sizeof(target));
- format(str, sizeof(str), "INFO: You have cuffed %s!",target);
- SendClientMessage(playerid, 0xE01B1B, str);
- format(str, sizeof(str), "WARNING: You have been cuffed by %s!",name);
- SendClientMessage(targetid, 0xE01B1B, str);
- SetPlayerAttachedObject(targetid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977,-81.700035, 0.891999, 1.000000, 1.168000);//this will set the object cuffs at the hand of the player you want to cuff.
- SetPlayerSpecialAction(targetid,SPECIAL_ACTION_CUFFED);
- return 1;
- }
- }
- return 1;
- }
- CMD:uncuff(playerid, params[])
- {
- new targetid;
- if(sscanf(params, "u", targetid)) return SendClientMessage(playerid, -1, "[USAGE]: /uncuff [Part of Name/Player ID]");
- if(IsPlayerConnected(targetid))
- {
- new Float:x, Float:y, Float:z;
- GetPlayerPos(playerid, x, y, z);
- if(IsPlayerInRangeOfPoint(targetid, 5.0, x, y, z))
- if(GetPlayerTeam(playerid) == TEAM_SWAT)
- {
- if(!SetPlayerAttachedObject(targetid, 0, 19418, 6, -0.011000, 0.028000, -0.022000, -15.600012, -33.699977,-81.700035, 0.891999, 1.000000, 1.168000))return SendClientMessage(playerid,-1,"ERROR: The player is not cuffed!");
- SetPlayerSpecialAction(targetid,SPECIAL_ACTION_NONE);
- new str[512];
- new name[MAX_PLAYER_NAME];
- GetPlayerName(playerid, name, sizeof(name));
- new target[MAX_PLAYER_NAME];
- GetPlayerName(targetid, target, sizeof(target));
- format(str, sizeof(str), "INFO: You have uncuffed %s!",target);
- SendClientMessage(playerid, 0xE01B1B, str);
- format(str, sizeof(str), "WARNING: You have been uncuffed by %s!",name);
- SendClientMessage(targetid, 0xE01B1B, str);
- return 1;
- }
- }
- return 1;
- }
- CMD:sms(playerid, params[])
- {
- new id, string[128], string2[128], sender[MAX_PLAYER_NAME], reciever[MAX_PLAYER_NAME];
- if(sscanf(params, "us[75]", id, params[2])) return SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /pm <id> <message>");
- GetPlayerName(playerid, sender, sizeof(sender));
- GetPlayerName(id, reciever, sizeof(reciever));
- format(string, sizeof(string), "sms from %s: %s", sender, params[2]);
- format(string2, sizeof(string2), "sms to %s: %s", reciever, params[2]);
- SendClientMessage(id, COLOR_YELLOW, string);
- SendClientMessage(playerid, COLOR_YELLOW, string2);
- return 1;
- }
- CMD:spyballa(playerid,params[])
- {
- if (GetPlayerScore(playerid) == 2000)
- {
- if(GetPlayerTeam(playerid) == TEAM_SWAT)
- {
- SetPlayerColor(playerid,COLOR_BALLAS);
- SetPlayerSkin(playerid,103);
- SendClientMessage(playerid,COLOR_AZTECS,"You are now a spy");
- }
- else
- {
- SendClientMessage(playerid,COLOR_RED,"ERROR: You are not from law inforcement team");
- }
- }
- return 1;
- }
- CMD:spygrove(playerid,params[])
- {
- if (GetPlayerScore(playerid) == 2000)
- {
- if(GetPlayerTeam(playerid) == TEAM_SWAT)
- {
- SetPlayerColor(playerid,COLOR_GROVE);
- SetPlayerSkin(playerid,105);
- SendClientMessage(playerid,COLOR_AZTECS,"You are now a spy");
- }
- else
- {
- SendClientMessage(playerid,COLOR_RED,"ERROR: You are not from law inforcement team");
- }
- }
- return 1;
- }
- CMD:spyaztecs(playerid,params[])
- {
- if (GetPlayerScore(playerid) == 2000)
- {
- if(GetPlayerTeam(playerid) == TEAM_SWAT)
- {
- SetPlayerColor(playerid,COLOR_AZTECS);
- SetPlayerSkin(playerid,114);
- SendClientMessage(playerid,COLOR_AZTECS,"You are now a spy");
- }
- else
- {
- SendClientMessage(playerid,COLOR_RED,"ERROR: You are not from law inforcement team");
- }
- }
- return 1;
- }
- CMD:spyvagos(playerid,params[])
- {
- if (GetPlayerScore(playerid) == 2000)
- {
- if(GetPlayerTeam(playerid) == TEAM_SWAT)
- {
- SetPlayerColor(playerid,COLOR_VEGOS);
- SetPlayerSkin(playerid,108);
- SendClientMessage(playerid,COLOR_AZTECS,"You are now a spy");
- }
- else
- {
- SendClientMessage(playerid,COLOR_RED,"ERROR: You are not from law inforcement team");
- }
- }
- return 1;
- }
- CMD:ranks(playerid, params[])
- {
- SendClientMessage(playerid,COLOR_CYAN,"Rank 1 - 100 scores, Rank 2 - 500 Scores, Rank 3 - 1000 Scores, Rank 4 - 2000 Scores, Rank 5 - 3500 Scores, Rank 6 - 8000 Scores, Rank 9 - 10000 Scores");
- return 1;
- }
- CMD:training(playerid,params[])
- {
- if(InTraining[playerid] == 1) return SendClientMessage(playerid,COLOR_RED,"YOu are already in training, /leavetraining to leave it");
- SetPlayerPos(playerid, 548.8602, 71.06725, 2580.811);
- GetPlayerWeapon(playerid);
- GivePlayerWeapon(playerid,24,1000);
- GivePlayerWeapon(playerid,25,1000);
- GivePlayerWeapon(playerid,29,1000);
- GivePlayerWeapon(playerid,31,1000);
- SetPlayerArmour(playerid, 1000);
- InTraining[playerid] = 1;
- return 1;
- }
- CMD:dm(playerid,params[])
- {
- new PlayerName[MAX_PLAYER_NAME];//Player name
- GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
- if(InDM[playerid] == 0)//if the player is not in DM
- {//then
- InDM[playerid] = 1; // Now we will set him in DM so he will respawn at DM
- SendClientMessage(playerid, COLOR_LIGHTBLUE , "You have joined /dm, to leave type /dm again");//Message to tell him that he joined DM
- format(String, sizeof(String), "Server:{FFFFFF}%s(%d) has joined DM(/dm)", PlayerName, playerid);
- SendClientMessageToAll(COLOR_LIGHTBLUE, String);//Message to tell everyone that he joined DM
- SetPlayerInterior(playerid, 0); // Just like we did before we will set he's interior to 0
- SetPlayerVirtualWorld(playerid, 10); // and same here Virtual World to 10
- new rand = random(sizeof(DMSpawns)); // DM Spawn
- SetPlayerPos(playerid, DMSpawns[rand][0], DMSpawns[rand][1], DMSpawns[rand][2]);// we will set the player position at DM
- SetPlayerFacingAngle(playerid, DMSpawns[rand][3]); // Also facing Angle
- //and we will give him weapons, I will give 2 weapons
- GivePlayerWeapon(playerid, 24, 1500); // Desert Eagle
- GivePlayerWeapon(playerid, 26, 1500); // Sawnoff Shutgun
- //you can edit them, or add more weapons if you want
- }
- else
- {//if the player is already in DM, he will leave
- InDM[playerid] = 0; //So now we will set him as not in DM
- SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have left /dm to join again type /dm");//We will send him a message to tell him that he left
- SpawnPlayer(playerid);//We will spawn the player now
- SetPlayerHealth(playerid, 100);//set he's health to 100
- ResetPlayerWeapons(playerid);// and reset he's weapons
- SetPlayerVirtualWorld(playerid, 0);//we will set he's virtual world to 0
- SetPlayerInterior(playerid, 0);//also interior to 0
- }
- return 1;
- }
- CMD:leavetraining(playerid,params[])
- {
- if(InDerby[playerid] == 0) return SendClientMessage(playerid,COLOR_GREEN,"You are not in training depot!");
- InDerby[playerid] = 0;
- SetPlayerHealth(playerid,0);
- return 1;
- }
- CMD:unlockall(playerid,params[])
- {
- if(IsPlayerAdmin(playerid)) SetPlayerWorldBounds(playerid, 20000.0000, -20000.0000, 20000.0000, -20000.0000);
- return 1;
- }
- CMD:getweapon(playerid,params[])
- {
- SendClientMessage(playerid,COLOR_RED,"you need to be In Ammunation");
- return 1;
- }
- CMD:drunk(playerid,params[])
- {
- ApplyAnimation(playerid,"PED","WALK_DRUNK",4.1,1,1 ,1,1,1,1);
- SendClientMessage(playerid,0xFFFF00AA,"Use /stopanim to stop this animation" );
- return 1;
- }
- CMD:aim(playerid,params[])
- {
- ApplyAnimation(playerid,"PED","SHP_1H_Lift",4.1,1,1 ,1,1,1,1);
- SendClientMessage(playerid,0xFFFF00AA,"Use /stopanim to stop this animation" );
- return 1;
- }
- CMD:cover(playerid,params[])
- {
- ApplyAnimation(playerid,"PED","gnstwall_injurd",4.1,1,1 ,1,1,1,1);
- SendClientMessage(playerid,0xFFFF00AA,"Use /stopanim to stop this animation" );
- return 1;
- }
- CMD:cover1(playerid,params[])
- {
- ApplyAnimation(playerid,"PED","JMP_Wall1m_180",4.1,1,1 ,1,1,1,1);
- SendClientMessage(playerid,0xFFFF00AA,"Use /stopanim to stop this animation" );
- return 1;
- }
- CMD:cover2(playerid,params[])
- {
- ApplyAnimation(playerid,"PED","Rail_fall_crawl",4.1,1,1 ,1,1,1,1);
- SendClientMessage(playerid,0xFFFF00AA,"Use /stopanim to stop this animation" );
- return 1;
- }
- CMD:breach1(playerid,params[])
- {
- ApplyAnimation(playerid,"PED","swt_breach_01",4.1,1,1 ,1,1,1,1);
- SendClientMessage(playerid,0xFFFF00AA,"Use /stopanim to stop this animation" );
- return 1;
- }
- CMD:breach2(playerid,params[])
- {
- ApplyAnimation(playerid,"PED","swt_breach_02",4.1,1,1 ,1,1,1,1);
- SendClientMessage(playerid,0xFFFF00AA,"Use /stopanim to stop this animation" );
- return 1;
- }
- CMD:breach3(playerid,params[])
- {
- ApplyAnimation(playerid,"PED","swt_breach_03",4.1,1,1 ,1,1,1,1);
- SendClientMessage(playerid,0xFFFF00AA,"Use /stopanim to stop this animation" );
- return 1;
- }
- CMD:snipe(playerid,params[])
- {
- ApplyAnimation(playerid,"PED","WEAPON_sniper",4.1,1,1 ,1,1,1,1);
- SendClientMessage(playerid,0xFFFF00AA,"Use /stopanim to stop this animation" );
- return 1;
- }
- CMD:getguns(playerid,params[])
- {
- ApplyAnimation(playerid,"PED","CAT_Safe_Rob",4.1,1,1 ,1,1,1,1);
- SendClientMessage(playerid,0xFFFF00AA,"Use /stopanim to stop this animation" );
- return 1;
- }
- CMD:angry(playerid,params[])
- {
- ApplyAnimation(playerid,"PED","RIOT_ANGRY",4.1,1,1 ,1,1,1,1);
- SendClientMessage(playerid,0xFFFF00AA,"Use /stopanim to stop this animation" );
- return 1;
- }
- CMD:stopanim(playerid,params[])
- {
- ClearAnimations(playerid);
- SendClientMessage(playerid, 0xFFFF00AA, "Animations cleared!");
- return 1;
- }
- CMD:kill(playerid,params[])
- {
- SendClientMessage(playerid,COLOR_GREEN,"//====================//");
- SendClientMessage(playerid,COLOR_RED,"You have commited suecide");
- SendClientMessage(playerid,COLOR_GREEN,"//====================//");
- SetPlayerHealth(playerid,0);
- return 1;
- }
- CMD:acmds(playerid,params[])
- {
- ShowPlayerDialog(playerid, 23123,DIALOG_STYLE_LIST, "Admin Commands:", "/onduty \n/offduty \n/kick \n/ban \n/giveweapon \n/freeze \n/unfreeze \n/spec \n/specoff\n/goto\n/get\n/v", "Ok", "Cancel");
- return 1;
- }
- CMD:missions(playerid,Params[])
- {
- ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Missions",""COL_GREEN"You are to capture gangzones, recruit members and bring the war to your enemies or capture enemy Weapon van and bring it to your base for scores!","Ok","");
- return 1;
- }
- CMD:rules(playerid,Params[])
- {
- ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Rules",""COL_GREEN"*Respect Admins and Players\n*Do not use cleo mods or hacks\n*Do not c-bug\n*Do not team-kill\n*Do not provoke or flame others\n*Be mature and act maturely","Ok","");
- return 1;
- }
- CMD:help(playerid,Params[])
- {
- ShowPlayerDialog(playerid, 3, DIALOG_STYLE_LIST, "Help:", "/commands\n/Missions\n/Rules \n/animhelp \n/dms \n/turfhelp \n/gangs \n/animhelp \n/rcdms \n/training \n/pm\n/spyhelp", "Ok", "Cancel");
- return 1;
- }
- CMD:spyhelp(playerid,Params[])
- {
- SendClientMessage(playerid,COLOR_GREEN,"//=================================================//");
- SendClientMessage(playerid,COLOR_RED,"use /spy(name of the gang) to spy in their hood, in order to break their defences and steal their important info as well as their weapon crate, you must have least 3500 score to do it so.");
- SendClientMessage(playerid,COLOR_GREEN,"//===================================================//");
- return 1;
- }
- CMD:animhelp(playerid,Params[])
- {
- ShowPlayerDialog(playerid, 4, DIALOG_STYLE_LIST, "Here are the Anims", "/drunk \n/cover1-3 \n/breach1-3 \n/aim \n/snipe\n//getguns\n/stopanim", "Ok", "Cancel");
- return 1;
- }
- CMD:commands(playerid,Params[])
- {
- SendClientMessage(playerid,COLOR_GREEN,"//=================================================//");
- SendClientMessage(playerid,COLOR_RED,"/getweapon, /dm1, /dm2, /dm3, /dm4 to 7, /rcdm1 to 4, /kill, /help etc");
- SendClientMessage(playerid,COLOR_GREEN,"//===================================================//");
- return 1;
- }
- CMD:dms(playerid,Params[])
- {
- SendClientMessage(playerid,COLOR_GREEN,"//====================//");
- SendClientMessage(playerid,COLOR_RED,"Getting bored with turf war,");
- SendClientMessage(playerid,COLOR_RED,"then type /DM1,2,3,5,6,7 and enjoy");
- SendClientMessage(playerid,COLOR_GREEN,"//====================//");
- return 1;
- }
- CMD:rcdms(playerid,Params[])
- {
- SendClientMessage(playerid,COLOR_GREEN,"//====================//");
- SendClientMessage(playerid,COLOR_RED,"Getting bored with turf war,");
- SendClientMessage(playerid,COLOR_RED,"then type /rcdm1,2,3,4 and enjoy");
- SendClientMessage(playerid,COLOR_GREEN,"//====================//");
- return 1;
- }
- CMD:turfhelp(playerid,Params[])
- {
- SendClientMessage(playerid,COLOR_GREEN,"//====================//");
- SendClientMessage(playerid,COLOR_RED,"There 2 methods to start turf war");
- SendClientMessage(playerid,COLOR_RED,"One is to get 5 homies and go on");
- SendClientMessage(playerid,COLOR_RED,"Rival gang turf, it will start the turf");
- SendClientMessage(playerid,COLOR_RED,"Or Kill at least 5 rivals to start turf");
- SendClientMessage(playerid,COLOR_GREEN,"//====================//");
- return 1;
- }
- CMD:gangs(playerid,Params[])
- {
- SendClientMessage(playerid,COLOR_GREEN,"//====================//");
- SendClientMessage(playerid,COLOR_RED,"There are plenty of gangs");
- SendClientMessage(playerid,COLOR_RED,"Grove");
- SendClientMessage(playerid,COLOR_RED,"Ballas");
- SendClientMessage(playerid,COLOR_RED,"Vagos");
- SendClientMessage(playerid,COLOR_RED,"Aztecs");
- SendClientMessage(playerid,COLOR_RED,"Law(not a gang) as well as AirForce");
- SendClientMessage(playerid,COLOR_GREEN,"//====================//");
- return 1;
- }
- public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
- {
- return 1;
- }
- public OnPlayerExitVehicle(playerid, vehicleid)
- {
- return 1;
- }
- public OnPlayerStateChange(playerid, newstate, oldstate)
- {
- if(newstate == 2)
- {
- if(GetPlayerVehicleID(playerid) == 520)
- {
- if (GetPlayerScore(playerid) >= 300)
- {
- SendClientMessage(playerid,COLOR_RED,"Server: Please do not rape players by that much");
- }
- else
- {
- RemovePlayerFromVehicle(playerid);
- SendClientMessage(playerid,COLOR_RED,"Server: You need more score to drive this!");
- }
- }
- else if(GetPlayerVehicleID(playerid) == 432)
- {
- if (GetPlayerScore(playerid) >= 300)
- {
- SendClientMessage(playerid,COLOR_RED,"Server: Please do not rape players by that much");
- }
- else
- {
- RemovePlayerFromVehicle(playerid);
- SendClientMessage(playerid,COLOR_RED,"Server: You need more score to drive this!");
- }
- }
- }
- 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)
- {
- CreatePickup(362, 0, 2421.56, -1733.182, 15);
- 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)
- {
- if(GetTickCount() - armedbody_pTick[playerid] > 113){ //prefix check itter
- new
- weaponid[13],weaponammo[13],pArmedWeapon;
- pArmedWeapon = GetPlayerWeapon(playerid);
- GetPlayerWeaponData(playerid,1,weaponid[1],weaponammo[1]);
- GetPlayerWeaponData(playerid,2,weaponid[2],weaponammo[2]);
- GetPlayerWeaponData(playerid,4,weaponid[4],weaponammo[4]);
- GetPlayerWeaponData(playerid,5,weaponid[5],weaponammo[5]);
- #if ARMEDBODY_USE_HEAVY_WEAPON
- GetPlayerWeaponData(playerid,7,weaponid[7],weaponammo[7]);
- #endif
- if(weaponid[1] && weaponammo[1] > 0){
- if(pArmedWeapon != weaponid[1]){
- if(!IsPlayerAttachedObjectSlotUsed(playerid,0)){
- SetPlayerAttachedObject(playerid,0,GetWeaponModel(weaponid[1]),1, 0.199999, -0.139999, 0.030000, 0.500007, -115.000000, 0.000000, 1.000000, 1.000000, 1.000000);
- }
- }
- else {
- if(IsPlayerAttachedObjectSlotUsed(playerid,0)){
- RemovePlayerAttachedObject(playerid,0);
- }
- }
- }
- else if(IsPlayerAttachedObjectSlotUsed(playerid,0)){
- RemovePlayerAttachedObject(playerid,0);
- }
- if(weaponid[2] && weaponammo[2] > 0){
- if(pArmedWeapon != weaponid[2]){
- if(!IsPlayerAttachedObjectSlotUsed(playerid,1)){
- SetPlayerAttachedObject(playerid,1,GetWeaponModel(weaponid[2]),8, -0.079999, -0.039999, 0.109999, -90.100006, 0.000000, 0.000000, 1.000000, 1.000000, 1.000000);
- }
- }
- else {
- if(IsPlayerAttachedObjectSlotUsed(playerid,1)){
- RemovePlayerAttachedObject(playerid,1);
- }
- }
- }
- else if(IsPlayerAttachedObjectSlotUsed(playerid,1)){
- RemovePlayerAttachedObject(playerid,1);
- }
- if(weaponid[4] && weaponammo[4] > 0){
- if(pArmedWeapon != weaponid[4]){
- if(!IsPlayerAttachedObjectSlotUsed(playerid,2)){
- SetPlayerAttachedObject(playerid,2,GetWeaponModel(weaponid[4]),7, 0.000000, -0.100000, -0.080000, -95.000000, -10.000000, 0.000000, 1.000000, 1.000000, 1.000000);
- }
- }
- else {
- if(IsPlayerAttachedObjectSlotUsed(playerid,2)){
- RemovePlayerAttachedObject(playerid,2);
- }
- }
- }
- else if(IsPlayerAttachedObjectSlotUsed(playerid,2)){
- RemovePlayerAttachedObject(playerid,2);
- }
- if(weaponid[5] && weaponammo[5] > 0){
- if(pArmedWeapon != weaponid[5]){
- if(!IsPlayerAttachedObjectSlotUsed(playerid,3)){
- SetPlayerAttachedObject(playerid,3,GetWeaponModel(weaponid[5]),1, 0.200000, -0.119999, -0.059999, 0.000000, 206.000000, 0.000000, 1.000000, 1.000000, 1.000000);
- }
- }
- else {
- if(IsPlayerAttachedObjectSlotUsed(playerid,3)){
- RemovePlayerAttachedObject(playerid,3);
- }
- }
- }
- else if(IsPlayerAttachedObjectSlotUsed(playerid,3)){
- RemovePlayerAttachedObject(playerid,3);
- }
- #if ARMEDBODY_USE_HEAVY_WEAPON
- if(weaponid[7] && weaponammo[7] > 0){
- if(pArmedWeapon != weaponid[7]){
- if(!IsPlayerAttachedObjectSlotUsed(playerid,4)){
- SetPlayerAttachedObject(playerid,4,GetWeaponModel(weaponid[7]),1,-0.100000, 0.000000, -0.100000, 84.399932, 112.000000, 10.000000, 1.099999, 1.000000, 1.000000);
- }
- }
- else {
- if(IsPlayerAttachedObjectSlotUsed(playerid,4)){
- RemovePlayerAttachedObject(playerid,4);
- }
- }
- }
- else if(IsPlayerAttachedObjectSlotUsed(playerid,4)){
- RemovePlayerAttachedObject(playerid,4);
- }
- #endif
- armedbody_pTick[playerid] = GetTickCount();
- }
- return true;
- }
- 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 DIALOG_REGISTER:
- {
- if (!response) return Kick(playerid);
- if(response)
- {
- GivePlayerMoney(playerid,10000);
- new hashpass[129];
- WP_Hash(hashpass,sizeof(hashpass),inputtext);
- if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Registering...",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Type your password below to register a new account.","Register","Quit");
- new INI:File = INI_Open(UserPath(playerid));
- INI_SetTag(File,"data");
- INI_WriteString(File,"Password",hashpass);
- INI_WriteInt(File,"Cash",10000);
- INI_WriteInt(File,"Admin",0);
- INI_WriteInt(File,"VIP",0);
- INI_WriteInt(File,"Kills",0);
- INI_WriteInt(File,"Deaths",0);
- INI_WriteInt(File,"Scores",0);
- INI_WriteInt(File,"Banned",0);
- INI_Close(File);
- SetSpawnInfo(playerid, 0, 0, 1958.33, 1343.12, 15.36, 269.15, 0, 0, 0, 0, 0, 0);
- SpawnPlayer(playerid);
- ShowPlayerDialog(playerid, DIALOG_SUCCESS_1, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"Great! Your Y_INI system works perfectly. Relog to save your stats!","Ok","");
- }
- }
- case DIALOG_LOGIN:
- {
- if ( !response ) return Kick ( playerid );
- if( response )
- {
- new hashpass[129];
- WP_Hash(hashpass,sizeof(hashpass),inputtext);
- if(!strcmp(hashpass,PlayerInfo[playerid][Pass]))
- {
- if(PlayerInfo[playerid][Bans] == 1)
- {
- SendClientMessage(playerid, COLOR_BRIGHTRED,"Account is Banned, please visit at website for ban appeal");
- }
- else
- {
- INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
- GivePlayerMoney(playerid, PlayerInfo[playerid][Cash]);
- SetPlayerScore(playerid, PlayerInfo[playerid][Score]);
- ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""COL_WHITE"Success!",""COL_GREEN"You have successfully logged in!","Ok","");
- }
- }
- else
- {
- ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_RED"You have entered an incorrect password.\n"COL_WHITE"Type your password below to login.","Login","Quit");
- }
- return 1;
- }
- }
- }
- return 1;
- }
- public OnPlayerClickPlayer(playerid, clickedplayerid, source)
- {
- return 1;
- }
- public OnPlayerTakeDamage(playerid, issuerid, Float: amount, weaponid)
- {
- PlayerPlaySound(playerid,17802,0.0,0.0,0.0);
- if(issuerid != INVALID_PLAYER_ID)
- {
- if(GetPlayerTeam(issuerid) == GetPlayerTeam(playerid))
- {
- GameTextForPlayer(issuerid, "Do not ~r~~n~Team Attack", 5000, 5);
- TogglePlayerControllable(issuerid, 0);
- SetTimerEx("un_freeze", 300, 0, "d", issuerid);
- }
- }
- return 1;
- }
- forward un_freeze(playerid);
- public un_freeze(playerid)
- {
- TogglePlayerControllable(playerid, 1);
- return 1;
- }
- public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
- {
- return 1;
- }
- public ForEachTimer()
- {
- return 1;
- }
- public ZoneTimer(playerid)
- {
- for(new i=0; i < sizeof(ZoneInfo); i++) // loop all zones
- {
- if(ZoneAttacker[i] != -1) // zone is being attacked
- {
- if(GetPlayersInZone(i, ZoneAttacker[i]) >= MIN_MEMBERS_TO_START_WAR) // team has enough members in the zone
- {
- ZoneAttackTime[i]++;
- if(ZoneAttackTime[i] == TAKEOVER_TIME) // zone has been under attack for enough time and attackers take over the zone
- {
- new
- tStra [50];
- format(tStra, sizeof(tStra), "~g~%s ~w~gang has ~p~lost ~p~its Zone ~w~to ~r~%s!!", GetTeamName(GetPlayerTeam(i)), GetTeamName(GetPlayerTeam(playerid)));
- GameTextForPlayer(playerid, tStra, 3000, 6);
- GangZoneStopFlashForAll(ZoneID[i]);
- ZoneInfo[i][zTeam] = ZoneAttacker[i];
- GangZoneShowForAll(ZoneID[i], GetTeamZoneColor(ZoneInfo[i][zTeam])); // update the zone color for new team
- ZoneAttacker[i] = -1;
- for(new m=0; m<MAX_PLAYERS; m++)
- RemovePlayerMapIcon(mP[m], 12);
- SendClientMessage(playerid, COLOR_CYAN,"Your Team has taken a Turf, you recived +5 score");
- SetPlayerScore(playerid, GetPlayerScore(playerid) + 5);
- }
- }
- else // attackers failed to take over the zone
- for(new m=0; m<MAX_PLAYERS; m++)
- {
- new
- tStrb [50];
- format(tStrb, sizeof(tStrb), "~g~%s ~w~gang has ~p~saved ~p~its Zone ~w~from ~r~%s!!", GetTeamName(GetPlayerTeam(i)), GetTeamName(GetPlayerTeam(playerid)));
- GameTextForPlayer(playerid, tStrb, 3000, 6);
- RemovePlayerMapIcon(mP[m], 12);
- GangZoneStopFlashForAll(ZoneID[i]);
- ZoneAttacker[i] = -1;
- SendClientMessage(i, COLOR_CYAN,"Your Team has Protected its turf and recived +2 Score");
- SetPlayerScore(i, GetPlayerScore(i) + 2);
- }
- }
- else // check if somebody is attacking
- {
- for(new t=0; t < sizeof(Teams); t++) // loop all teams
- for(new m=0; m<MAX_PLAYERS; m++)
- {
- if(Teams[t] != ZoneInfo[i][zTeam] && GetPlayersInZone(i, Teams[t]) >= MIN_MEMBERS_TO_START_WAR) // if there are enough enemies in the zone
- {
- new
- tStr [50];
- format(tStr, sizeof(tStr), "~g~%s ~w~gang has been ~p~Provoked ~w~for a war by ~r~%s!!", GetTeamName(GetPlayerTeam(i)), GetTeamName(GetPlayerTeam(playerid)));
- GameTextForPlayer(playerid, tStr, 3000, 6);
- ZoneAttacker[i] = Teams[t];
- ZoneAttackTime[i] = 0;
- GangZoneFlashForAll(ZoneID[i], 0xFF000055);
- new Float:x,Float:y,Float:z;
- GetPlayerPos(playerid,x,y,z);
- if(GetPlayerTeam(playerid) == TEAM_GROVE)
- {
- SetPlayerMapIcon(mP[m], 12, x,y,z, 62, 0, MAPICON_GLOBAL);
- }
- else if(GetPlayerTeam(playerid) == TEAM_BALLAS)
- {
- SetPlayerMapIcon(mP[m], 12, x,y,z, 59, 0, MAPICON_GLOBAL);
- }
- else if(GetPlayerTeam(playerid) == TEAM_VAGOS)
- {
- SetPlayerMapIcon(mP[m], 12, x,y,z, 60, 0, MAPICON_GLOBAL);
- }
- else if(GetPlayerTeam(playerid) == TEAM_AZTECS)
- {
- SetPlayerMapIcon(mP[m], 12, x,y,z, 58, 0, MAPICON_GLOBAL);
- }
- else if(GetPlayerTeam(playerid) == TEAM_SWAT)
- {
- SetPlayerMapIcon(mP[m], 12, x,y,z, 30, 0, MAPICON_GLOBAL);
- }
- }
- }
- }
- }
- }
- public ZoneTimerA()
- {
- for(new m=0; m<MAX_PLAYERS; m++)
- for(new i=0; i < sizeof(ZoneInfo); i++) // loop all zones
- {
- if(ZoneAttacker[i] != -1) // zone is being attacked
- {
- if(GetPlayersInZone(i, ZoneAttacker[i]) >= 1) // there must be at least 1 attacker left
- {
- ZoneAttackTime[i]++;
- if(ZoneAttackTime[i] == TAKEOVER_TIMEA) // zone has been under attack for enough time and attackers take over the zone
- {
- GangZoneStopFlashForAll(ZoneID[i]);
- ZoneInfo[i][zTeam] = ZoneAttacker[i];
- GangZoneShowForAll(ZoneID[i], GetTeamZoneColor(ZoneInfo[i][zTeam])); // update the zone color for new team
- ZoneAttacker[i] = -1;
- RemovePlayerMapIcon(mP[m], 12);
- }
- }
- else // attackers failed to take over the zone
- {
- RemovePlayerMapIcon(mP[m], 12);
- GangZoneStopFlashForAll(ZoneID[i]);
- ZoneAttacker[i] = -1;
- }
- }
- }
- }
- forward RankUpdater(playerid);
- public RankUpdater(playerid)
- {
- if (GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) <= 100)
- {
- TextDrawHideForPlayer(playerid,Rank1);
- TextDrawHideForPlayer(playerid,Rank2);
- TextDrawHideForPlayer(playerid,Rank3);
- TextDrawHideForPlayer(playerid,Rank4);
- TextDrawHideForPlayer(playerid,Rank5);
- TextDrawHideForPlayer(playerid,Rank6);
- TextDrawShowForPlayer(playerid,Rank);
- }
- if (GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) <= 200)
- {
- TextDrawHideForPlayer(playerid,Rank);
- TextDrawHideForPlayer(playerid,Rank2);
- TextDrawHideForPlayer(playerid,Rank3);
- TextDrawHideForPlayer(playerid,Rank4);
- TextDrawHideForPlayer(playerid,Rank5);
- TextDrawHideForPlayer(playerid,Rank6);
- TextDrawShowForPlayer(playerid,Rank1);
- }
- if (GetPlayerScore(playerid) >= 200 && GetPlayerScore(playerid) <= 250)
- {
- TextDrawHideForPlayer(playerid,Rank1);
- TextDrawHideForPlayer(playerid,Rank);
- TextDrawHideForPlayer(playerid,Rank3);
- TextDrawHideForPlayer(playerid,Rank4);
- TextDrawHideForPlayer(playerid,Rank5);
- TextDrawHideForPlayer(playerid,Rank6);
- TextDrawShowForPlayer(playerid,Rank2);
- }
- if (GetPlayerScore(playerid) >= 250 && GetPlayerScore(playerid) <= 300)
- {
- TextDrawHideForPlayer(playerid,Rank1);
- TextDrawHideForPlayer(playerid,Rank2);
- TextDrawHideForPlayer(playerid,Rank);
- TextDrawHideForPlayer(playerid,Rank4);
- TextDrawHideForPlayer(playerid,Rank5);
- TextDrawHideForPlayer(playerid,Rank6);
- TextDrawShowForPlayer(playerid,Rank3);
- }
- if (GetPlayerScore(playerid) >= 300 && GetPlayerScore(playerid) <= 350)
- {
- TextDrawHideForPlayer(playerid,Rank1);
- TextDrawHideForPlayer(playerid,Rank2);
- TextDrawHideForPlayer(playerid,Rank3);
- TextDrawHideForPlayer(playerid,Rank);
- TextDrawHideForPlayer(playerid,Rank5);
- TextDrawHideForPlayer(playerid,Rank6);
- TextDrawShowForPlayer(playerid,Rank4);
- }
- if (GetPlayerScore(playerid) >= 350 && GetPlayerScore(playerid) <= 400)
- {
- TextDrawHideForPlayer(playerid,Rank1);
- TextDrawHideForPlayer(playerid,Rank2);
- TextDrawHideForPlayer(playerid,Rank3);
- TextDrawHideForPlayer(playerid,Rank4);
- TextDrawHideForPlayer(playerid,Rank5);
- TextDrawHideForPlayer(playerid,Rank);
- TextDrawShowForPlayer(playerid,Rank5);
- }
- if (GetPlayerScore(playerid) >= 400)
- {
- TextDrawHideForPlayer(playerid,Rank1);
- TextDrawHideForPlayer(playerid,Rank2);
- TextDrawHideForPlayer(playerid,Rank3);
- TextDrawHideForPlayer(playerid,Rank4);
- TextDrawHideForPlayer(playerid,Rank5);
- TextDrawHideForPlayer(playerid,Rank);
- TextDrawShowForPlayer(playerid,Rank6);
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment