My GM errors (again :P)
#1

Errors:C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(15 :
Код:
warning 217: loose indentation
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(301) : warning 217: loose indentation
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(354) : warning 217: loose indentation
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(699) : warning 217: loose indentation
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(703) : warning 225: unreachable code
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(703) : warning 217: loose indentation
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(705) : warning 225: unreachable code
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(705) : warning 217: loose indentation
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(779) : warning 217: loose indentation
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(781) : warning 217: loose indentation
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(1013) : warning 217: loose indentation
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(1043) : warning 217: loose indentation
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(1074) : warning 217: loose indentation
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(1135) : warning 217: loose indentation
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(1178) : warning 202: number of arguments does not match definition
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(1196) : warning 217: loose indentation
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(1583) : warning 219: local variable "playername" shadows a variable at a preceding level
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(1583) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(1595) : warning 217: loose indentation
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(1598) : warning 219: local variable "playername" shadows a variable at a preceding level
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(1598) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(1611) : warning 217: loose indentation
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(1614) : warning 219: local variable "playername" shadows a variable at a preceding level
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(1614) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(1626) : warning 217: loose indentation
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(1629) : warning 219: local variable "playername" shadows a variable at a preceding level
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(1629) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(1641) : warning 217: loose indentation
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(1643) : warning 219: local variable "playername" shadows a variable at a preceding level
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(1643) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(1657) : warning 219: local variable "playername" shadows a variable at a preceding level
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(1657) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(1670) : warning 217: loose indentation
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(1673) : warning 219: local variable "playername" shadows a variable at a preceding level
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(1673) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(1685) : warning 217: loose indentation
C:\Users\Ole\Desktop\New folder\gamemodes\HTL.pwn(708) : warning 204: symbol is assigned a value that is never used: "result"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase
37 Warnings.


Gamemode:
Код:
/*
version: v.0.1a
*/
#include <a_samp>
#include <dini>
#include <dudb>
#include <dutils>
//#include <zcmd> // For make /admins
//#include <LpC>

#include <a_samp>
#include <a_players>
#include <a_sampdb>
#include <a_vehicles>

forward PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z);
// Colors
#define COLOR_BRIGHTRED 0xFF000AAA
#define COLOR_AQUA 0x00FFFFAA
#define COLOR_GREYs 0xAFAFAFAA
#define COLOR_BEIGE 0xFFF8DCAA
#define COLOR_BLACK 0x000000AA
#define COLOR_BLUE 0x0000FFAA
#define COLOR_BLUELIGHTER 0x00BFFFAA
#define COLOR_BLUELIGHT 0x1E90FFAA
#define COLOR_BLUEMEDIUM 0x0000CDAA
#define COLOR_BLUEDARK 0x00008BAA
#define COLOR_PINK 0xFF1493AA
#define COLOR_PINKDARK 0xFF00FFAA
#define COLOR_FADE 0xE6E6E6E6
#define COLOR_GREEN 0x008000AA
#define COLOR_GREENLIGHT 0x00FF00AA
#define COLOR_GREENDARK 0x006400AA
#define COLOR_MAROON 0x800000AA
#define COLOR_OKER 0x808000AA
#define COLOR_ORANGE 0xFF4500AA
#define COLOR_ORANGELIGHT 0xFF8C00AA
#define COLOR_PURPLE 0x800080AA
#define COLOR_VIOLETDARK 0x9400D3AA
#define COLOR_INDIGO 0xAB0082AA
#define COLOR_RED 0xFF0000AA
#define COLOR_SAND 0xFFDEADAA
#define COLOR_SILVER 0xC0C0C0AA
#define COLOR_TEAL 0x008080AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_GOLD 0xFFD700AA
#define COLOR_BROWN 0x8B4513AA
#define COLOR_BROWNLIGHT 0xA0522DAA
#define COLOR_GRAY 0xA9A9A9AA
#define COLOR_GRAYDARK 0x696969AA
#define COLOR_INVISIBLE 0xFFFFFF00
#define COLOR_GREY 0xBEBEBEAA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_GREENs 0x33AA33AA
#define COLOR_GRAD5 0xE3E3E3FF
#define COLOR_GRAD1 0xB4B5B7FF
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_RED1 0xFF0000AA
#define COLOR_LIGHTGREEN 0x9ACD32AA


new pTyped[MAX_PLAYERS];

new logged[MAX_PLAYERS];
new Float:ex, Float:ey, Float:ez;
new pPlayerAccount[MAX_PLAYER_NAME];
new pMoney[MAX_PLAYERS];
new pAdmin[MAX_PLAYERS];
new pKills[MAX_PLAYERS];
new pLevel[MAX_PLAYERS];
new pDeaths[MAX_PLAYERS];
new pTeam[MAX_PLAYERS];
new playername[MAX_PLAYER_NAME];
new BushEnabled[MAX_PLAYERS];
new BushObject [MAX_PLAYERS];
new FunEventOn = 0;

// Turfs
new gPlayerClass[MAX_PLAYERS];
new gTeam[MAX_PLAYERS];
//Gang Zones
new astecs;
new grove1;
new grove2;
new ballas;
new vagos;
new polis;
new ortak;
//TextDrawlar
new Text:Textdraw0;

//====================
forward SetPlayerToTeamColor(playerid);
forward CrimProxDetector(Float:radi, playerid,col1,col2,col3,col4,col5,col6,col7,col8,col9,col10);
forward IsStringAName (string[]);
forward GetPlayerID (string[]);
forward drawkapat();
forward SendTeamMessage(team, color, string[]);
forward Float:GetDistanceBetweenPlayers(p1,p2);
forward SendBeachBoysMessage(color, string[]);

// Teams
#define TEAM_GANGSTAS 0
#define TEAM_BALLAS 1
#define TEAM_VAGOS 2
#define TEAM_AZTECAS 3
#define TEAM_LSPD 4
#define TEAM_CIV 5
#define TEAM_GUNDEALER 6
#define TEAM_GROVE 7
#define TEAM_FRONT 8
#define TEAM_GLEN 9
#define TEAM_SEVILLE 10
#define TEAM_TEMPLAR 11
#define TEAM_MARKETS 12
#define TEAM_HOODRATS 13


#if defined FILTERSCRIPT

public OnGameModeInit()
{
    print("\n~=~=~=~=~=~=~=~=~=~=~=~=~=~=~~=~=~=");
    print(" LSH v.0.1a :.\n");
    print("  .: 	Lynet		:.");
    print("~=~=~=~=~=~=~=~=~=~=~=~=~=~=~~=~=~=\n");
    return 1;
}


public OnGameModeExit()
{
    return 1;
}


#else

main()
{
    print("\n~=~=~=~=~=~=~=~=~=~=~=~=~=~=~~=~=~=");
    print(" LSH v.0.1a 2012\n");
    print("  .: Updates			:.");
    print("~=~=~=~=~=~=~=~=~=~=~=~=~=~=~~=~=~=\n");
}
#endif

public OnGameModeInit()
{
SetGameModeText("LSH v.0.1a");

//GANG ZONES
    astecs = GangZoneCreate(1489.865, -2179.277, 1969.022, -1752.921);
    grove1 = GangZoneCreate(2083.108, -2052.949, 2691.561, -1930.57);
    grove2 = GangZoneCreate(2204.798, -1942.413, 2600.293, -1492.37);
    ballas = GangZoneCreate(1858.74, -1373.938, 2425.363, -1042.328);
    vagos = GangZoneCreate(2600.293, -2056.897, 2915.929, -1069.962);
    polis = GangZoneCreate(1524.091, -1745.026, 1619.162, -1591.064);
    ortak = GangZoneCreate(668.4526, -1737.13, 1429.02, -896.5614);
//pick ups
                                                  // LSPD DUTY
    AddStaticPickup(1239,23,1538.7574,-1685.1531,13.5469);

    AddStaticPickup(1240,1,927.0858,-1352.7571,13.3766);
                                                  //cluckinbell3 health pickup
    AddStaticPickup(1240,1,2397.7871,-1897.9752,13.5469);
                                                  // cluckinbell4 health pickup
    AddStaticPickup(1240,1,2420.6458,-1509.7050,24.0000);
                                                  // cluckinbell5 health pickup
    AddStaticPickup(1240,1,1199.2339,-919.6538,43.1120);
                                                  // cluckinbell6 health pickup
    AddStaticPickup(1240,1,813.1199,-1616.3560,13.5547);
                                                  // BEACH BOYS CLAIM
    AddStaticPickup(1239,23,322.9717,-1773.7930,4.8277);
                                                  // BALLAS CLAIM
    AddStaticPickup(1239,23,2219.5300,-1154.2638,26.2266);
                                                  // BALLAS CLAIM
    AddStaticPickup(1239,23,2716.8638,-1150.8356,69.5781);
                                                  // BALLAS CLAIM
    AddStaticPickup(1239,23,1698.4174,-2098.8901,13.5469);
                                                  // DOWNTOWN CLAIM
    AddStaticPickup(1254,23, 1121.8634,-1203.0513,27.4792);
                                                  // BUYING GUNS
    AddStaticPickup(1254,23, 1366.4325,-1275.2096,13.5469);
                                                  // CRACK DEN enter
    AddStaticPickup(1254,23,2352.0007,-1168.8942,27.9879);
                                                  // CRACK DEN exit
    AddStaticPickup(1254,23,1527.229980,-11.574499,1002.097106);
                                                  // BALLAS HQ enter
    AddStaticPickup(1272,23,2231.7825,-1159.7080,25.8906);
                                                  // BALLAS HQ exit
    AddStaticPickup(1272,23,318.564971,1118.209960,1083.882812);
                                                  // VAGOS HQ enter
    AddStaticPickup(1272,23,2756.3579,-1182.8083,69.4035);
                                                  // RYDERS DRUG HOUSE
    AddStaticPickup(1254,23,2459.4539,-1690.9188,13.5453);
                                                  // RYDERS DRUG HOUSE exit
    AddStaticPickup(1254,23, 2454.717041,-1700.871582,1013.515197);
                                                  //SWEETS HOUSE
    AddStaticPickup(1272,23, 2523.0286,-1679.2728,15.4970);
                                                  //SWEETS HOUSE exit
    AddStaticPickup(1272,23, 2527.654052,-1679.388305,1015.498596);
    AddStaticPickup(1239,23,1778.2642,-2432.2908,13.5547);
    AddStaticPickup(1239,23,2177.1697,-1666.6635,15.0859);

// Beach Boys
    AddPlayerClass(22,317.9346,-1809.2288,4.4797,356.6825,0,0,0,0,0,0); //
    AddPlayerClass(21,317.9346,-1809.2288,4.4797,356.6825,0,0,0,0,0,0); //
    AddPlayerClass(20,317.9346,-1809.2288,4.4797,356.6825,0,0,0,0,0,0); //

// The ballas sets.
    AddPlayerClass(103, 2209.9856,-1177.3947,25.7266, 0, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(104,1977.5311,-1151.3455,26.0208,98.0784,0,0,0,0,0,0); // Idlewood
    AddPlayerClass(102,1977.5311,-1151.3455,26.0208,98.0784,0,0,0,0,0,0); // GlenParkS1

// Vagos
    AddPlayerClass(108, 2717.1780,-1124.1628,69.5781, 0, 0, 50000, 31, 0, 0, 0);
    AddPlayerClass(109, 2717.1780,-1124.1628,69.5781, 0, 0, 50000, 31, 0, 0, 0);
    AddPlayerClass(110, 2717.1780,-1124.1628,69.5781, 0, 0, 50000, 31, 0, 0, 0);
// Aztecas
    AddPlayerClass(114, 1725.641, -2120.061, 15, 0, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(115, 1725.641, -2120.061, 15, 0, 0, 0, 0, 0, 0, 0);
    AddPlayerClass(116, 1725.641, -2120.061, 15, 0, 0, 0, 0,0, 0, 50);
// Police
    AddPlayerClass(280, 1554.513, -1677.914, 15, 0, 25, 400, 24, 400, 31, 400);
    AddPlayerClass(281, 1554.513, -1677.914, 15, 0, 25, 400, 24, 400, 31, 400);
    AddPlayerClass(282, 1554.513, -1677.914, 15, 0, 25, 400, 24, 400, 31, 400);
    

//Civilians
                                                  //
    AddPlayerClass(52,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(53,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(54,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(55,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(56,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(57,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(58,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(59,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(60,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(61,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(62,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(63,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(64,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(65,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(66,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(67,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(68,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(69,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(70,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(72,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(73,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(293,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(93,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(95,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(97,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(142,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(154,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(156,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(176,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(261,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);
                                                  //
    AddPlayerClass(291,1698.1757,-1039.7537,23.9063,0.6558,0,0,0,0,0,0);

												  //
    // Grove Street
AddPlayerClass(105,2529.7200,-1667.7725,15.1690,271.6901,0,0,0,0,0,0);
                                                  //
AddPlayerClass(106,2529.7200,-1667.7725,15.1690,271.6901,0,0,0,0,0,0); // GroveS2
												 //
AddPlayerClass(107,2513.2170,-1651.0344,14.0938,137.8954,0,0,0,0,0,0); // GroveS3

// Seville

AddPlayerClass(105,2764.4956,-2012.2317,13.5547,262.9401,0,0,0,0,0,0); // SevilleS1
AddPlayerClass(106,2760.7881,-2003.7156,13.5547,358.5076,0,0,0,0,0,0); // SevilleS2
AddPlayerClass(107,2778.2676,-1980.8571,13.5497,86.2418,0,0,0,0,0,0); // SevilleS3

// Temple Families

AddPlayerClass(105,972.2914,-1109.5416,23.8643,96.6745,0,0,0,0,0,0); // TempleS1
AddPlayerClass(106,974.9888,-1098.6542,23.8391,185.9754,0,0,0,0,0,0); // TempleS2
AddPlayerClass(107,950.7321,-1102.0520,23.9819,270.8895,0,0,0,0,0,0); // TempleS3


// Cars

AddStaticVehicle(566,1931.5438,-1130.7197,24.9663,88.9142,149,0); // GlenParkC1
AddStaticVehicle(567,1932.7334,-1140.1556,25.0873,91.7411,149,0); // GlenParkC2
AddStaticVehicle(566,1941.3491,-1140.8567,25.2100,269.0506,149,0); // GlenParkC3
AddStaticVehicle(412,1984.6747,-1276.1921,23.6626,181.4047,149,0); // GlenParkC5

AddStaticVehicle(412,973.4967,-1092.3838,23.8505,94.9065,10,8); // TempleF1
AddStaticVehicle(412,933.6236,-1122.7950,23.8331,358.5151,11,1); // TempleF2
AddStaticVehicle(492,927.5904,-1123.2328,23.7694,359.0118,77,26); // TempleF3
AddStaticVehicle(492,836.6407,-1107.2194,24.0291,274.8016,81,27); // TempleF4

AddStaticVehicle(412,2469.9419,-1674.9052,13.2524,213.2581,10,8); // GroveCar1
AddStaticVehicle(492,2499.3865,-1682.7386,13.1631,283.6678,77,26); // GroveCar2
AddStaticVehicle(492,2486.3931,-1654.3973,13.1792,89.6549,81,27); // GroveCar3
AddStaticVehicle(481,2484.2124,-1690.6495,13.0343,171.0227,252,0); // GroveBike1
AddStaticVehicle(481,2480.5115,-1689.8920,13.0256,178.4344,252,0); // GroveBike2
AddStaticVehicle(481,2512.5613,-1684.8856,13.0339,117.2438,252,0); // GroveBike3
AddStaticVehicle(481,2493.4678,-1647.1917,13.0469,192.4038,252,0); // GroveBike4
AddStaticVehicle(481,2489.4167,-1647.3812,13.5929,276.6345,252,0); // GroveBike5

AddStaticVehicle(405,2787.1479,-1999.3967,13.3222,88.8789,60,0); // SevilleC1
AddStaticVehicle(405,2786.9150,-1990.2047,13.3369,89.6099,60,0); // SevilleC1
AddStaticVehicle(405,2782.4653,-1970.5735,13.4219,269.9843,60,0); // SevilleC3
AddStaticVehicle(481,2800.5166,-2002.7710,13.0607,4.4623,60,0); // SevilleBike1
AddStaticVehicle(481,2799.2366,-2002.9983,13.0685,1.2275,60,0); // SevilleBike2
AddStaticVehicle(481,2798.3286,-2003.3353,13.0681,26.1053,60,0); // SevilleBike3
AddStaticVehicle(481,2797.1501,-2003.9202,13.0681,28.6506,60,0); // SevilleBike4
AddStaticVehicle(481,2795.2832,-2004.2015,13.0603,42.7502,60,0); // SevilleBike5
AddStaticVehicle(567,2764.7063,-1977.7495,13.3245,0.6685,60,0); // SevilleC5

                                                  //
    
//
    DisableInteriorEnterExits();
    EnableTirePopping(0);
    return 1;
}


public OnGameModeExit()
{
    return 1;
}

public SetPlayerToTeamColor(playerid)
{
    if(gTeam[playerid] == TEAM_GANGSTAS) {
        SetPlayerColor(playerid,COLOR_RED);
    }
    else if(gTeam[playerid] == TEAM_BALLAS) {
        SetPlayerColor(playerid,COLOR_PURPLE);
    }
    else if(gTeam[playerid] == TEAM_CIV) {
        SetPlayerColor(playerid,COLOR_WHITE);
    }
    else if(gTeam[playerid] == TEAM_VAGOS) {
        SetPlayerColor(playerid,COLOR_YELLOW);
    }
    else if(gTeam[playerid] == TEAM_AZTECAS) {
        SetPlayerColor(playerid,COLOR_BLUELIGHT);
    }
    else if(gTeam[playerid] == TEAM_LSPD) {
        SetPlayerColor(playerid,COLOR_GOLD);
    }
    else if(gTeam[playerid] == TEAM_GLEN) {
        SetPlayerColor(playerid,COLOR_PURPLE);
         }
    else if(gTeam[playerid] == TEAM_GROVE) {
        SetPlayerColor(playerid,COLOR_GREEN);
            }
    else if(gTeam[playerid] == TEAM_SEVILLE) {
        SetPlayerColor(playerid,0x9ACD32AA);
           }
    else if(gTeam[playerid] == TEAM_TEMPLAR) {
        SetPlayerColor(playerid,COLOR_GREENDARK);
    }
}


public OnPlayerRequestClass(playerid, classid)
{
    gPlayerClass[playerid] = classid;
    gTeam[playerid] = classid;

    switch (classid) {

        case 0,1,2:

            {
                gTeam[playerid] = TEAM_GANGSTAS;
                GameTextForPlayer(playerid, "~r~Crips", 1000, 6);
                ApplyAnimation(playerid,"PED","strip_G",4.1,1,1,1,1,1);

            }

        case 3:

            {
                gTeam[playerid] = TEAM_BALLAS;
                GameTextForPlayer(playerid, "~p~Jefferson Ballas.", 1000, 6);
                ApplyAnimation(playerid,"PED","strip_G",4.1,1,1,1,1,1);
            }
            
            case 4:

            {
                gTeam[playerid] = TEAM_BALLAS;
                GameTextForPlayer(playerid, "~p~GlenPark Ballas", 1000, 6);
                ApplyAnimation(playerid,"PED","strip_G",4.1,1,1,1,1,1);
            }
            
            case 5:

            {
                gTeam[playerid] = TEAM_BALLAS;
                GameTextForPlayer(playerid, "~p~Front Yard Ballas.", 1000, 6);
                ApplyAnimation(playerid,"PED","strip_G",4.1,1,1,1,1,1);
            }

        case 6,7,8:

            {
                gTeam[playerid] = TEAM_VAGOS;
                GameTextForPlayer(playerid, "~y~Los Santos Vagos", 1000, 6);
                ApplyAnimation(playerid,"PED","strip_G",4.1,1,1,1,1,1);
            }

        case 9,10,11:

            {
                gTeam[playerid] = TEAM_AZTECAS;
                GameTextForPlayer(playerid, "~b~~h~~h~Los Santos Varrios.", 1000, 6);

            }
        case 12,13,14:

            {
                gTeam[playerid] = TEAM_LSPD;
                GameTextForPlayer(playerid, "~b~Los Santos Cops.", 1000, 6);

            }

        case 15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45:

            {
                gTeam[playerid] = TEAM_CIV;
                GameTextForPlayer(playerid, "~w~CIVILIANS", 1000, 6);

            }
            
            case 46,47,48:

            {
                gTeam[playerid] = TEAM_GROVE;
                GameTextForPlayer(playerid, "~g~ Grove Street", 1000, 6);

            }
            
             case 49,50,51:

            {
                gTeam[playerid] = TEAM_GROVE;
                GameTextForPlayer(playerid, "~g~ Seville Boulvard Families", 1000, 6);

            }
			 
            case 52,53,54:

            {
                gTeam[playerid] = TEAM_GROVE;
                GameTextForPlayer(playerid, "~g~ Temple Drive Families", 1000, 6);
                


            }

    }
   	SetPlayerInterior(playerid,0);
	SetPlayerPos(playerid,1831.4916,-1682.3748,13.5469);
	SetPlayerFacingAngle(playerid,89.1585);
 	SetPlayerCameraPos(playerid, 1829.7233,-1685.9733,13.5469);
  	SetPlayerCameraLookAt(playerid,1831.4916,-1682.3748,13.5469);
	PlayerPlaySound(playerid, 1097, 0.0, 0.0, 0.0);
    return 1;
}

public OnPlayerRequestSpawn(playerid)
{
    return 1;
}


public OnPlayerConnect(playerid)
{
    SetPlayerSkillLevel(playerid, WEAPONSKILL_SAWNOFF_SHOTGUN, 1);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL, 1);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_PISTOL_SILENCED, 500);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_DESERT_EAGLE, 500);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_MICRO_UZI, 1);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_MP5, 500);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_AK47, 500);
    SetPlayerSkillLevel(playerid, WEAPONSKILL_M4, 500);

    new PName[MAX_PLAYER_NAME];
    new String[128];
    GetPlayerName(playerid, PName, sizeof(PName));

    format(String, sizeof(String), "%s has joined the server", PName);
    format(String, sizeof(String), "%s has joined the server", PName);
    format(String, sizeof(String), "%s has joined the server)", PName);

    GameTextForPlayer(playerid, "~r~HTL~r~ Los Santos Hustlers~r~", 700, 10);
    SendClientMessage(playerid, COLOR_GREEN, "You're now connected.");
    SendClientMessage(playerid, COLOR_GREEN, "Version: v.0.1a");
    SendClientMessage(playerid, COLOR_GREEN, "† Use /help for some commands and help with the server † ");
    SendClientMessage(playerid, COLOR_GREEN, "† Welcome to the server.");
    SendClientMessage(playerid, COLOR_GREEN, "† To register use /register <password> if you're not registered");
    SendClientMessage(playerid, COLOR_GREEN, "† To login use /login <password>");
    return 1;
}


public OnPlayerDisconnect(playerid, reason)
{

    dini_IntSet(udb_encode(playername), "pMoney", pMoney[playerid]);
    dini_IntSet(udb_encode(playername), "pAdmin", pAdmin[playerid]);
    dini_IntSet(udb_encode(playername), "pKills", pKills[playerid]);
    dini_IntSet(udb_encode(playername), "pLevel", pLevel[playerid]);
    dini_IntSet(udb_encode(playername), "pPlayerAccount", pPlayerAccount[playerid]);
    dini_IntSet(udb_encode(playername), "pDeaths", pDeaths[playerid]);
    dini_IntSet(udb_encode(playername), "pTeam", pTeam[playerid]);
    pMoney[playerid] = GetPlayerMoney(playerid);
	logged[playerid] = 0;

    return 1;
}
public OnPlayerSpawn(playerid)
{
    SetTimer("^", 10000, 0);

	GivePlayerMoney(playerid, 3000);
	SendClientMessage(playerid, COLOR_WHITE, "* * NOTICE: You can donate for a private donor car! !");
	SendClientMessage(playerid, COLOR_WHITE, "* * MOTD: /commands for more inforamtion");
	PlayerPlaySound(playerid, 1186, 0.0, 0.0, 0.0);

    if(gTeam[playerid] == TEAM_GANGSTAS) {
        SetPlayerColor(playerid, COLOR_RED);
        SendClientMessage(playerid, COLOR_RED, "** You are in the Crips, use /g to talk to your members **");
        GivePlayerWeapon(playerid,27, 250);
    	GivePlayerWeapon(playerid,29, 250);
    	GivePlayerWeapon(playerid,30, 250);
    	PlayerPlaySound(playerid, 1186, 0.0, 0.0, 0.0);
        return 1;
    }
    if(gTeam[playerid] == TEAM_BALLAS) {
        SetPlayerColor(playerid, COLOR_PURPLE);
        GivePlayerWeapon(playerid,0, 0);
    	GivePlayerWeapon(playerid,0, 0);
    	GivePlayerWeapon(playerid,0, 0);
    	PlayerPlaySound(playerid, 1186, 0.0, 0.0, 0.0);
        return 1;
    }
    if(gTeam[playerid] == TEAM_VAGOS) {
        SetPlayerColor(playerid, COLOR_GOLD);
        GivePlayerWeapon(playerid,0, 0);
    	GivePlayerWeapon(playerid,0, 0);
    	GivePlayerWeapon(playerid,0, 0);
    	PlayerPlaySound(playerid, 1186, 0.0, 0.0, 0.0);
        return 1;
    }
    if(gTeam[playerid] == TEAM_AZTECAS) {
        SetPlayerColor(playerid, COLOR_BLUELIGHT);
        GivePlayerWeapon(playerid,0, 0);
    	GivePlayerWeapon(playerid,0, 0);
    	GivePlayerWeapon(playerid,0, 0);
    	PlayerPlaySound(playerid, 1186, 0.0, 0.0, 0.0);
        return 1;
    }
    if(gTeam[playerid] == TEAM_LSPD) {
        SetPlayerColor(playerid, COLOR_BLUE);
        SendClientMessage(playerid, COLOR_WHITE, " ____* * * Welcome to the LSPD* * *____");
        SendClientMessage(playerid, COLOR_BLUE, "*You are part of the LSPD Organization your duty is to");
        SendClientMessage(playerid, COLOR_BLUE, "stop the gang wars in los santos/protect the innocent civilians that are in danger.");
        SendClientMessage(playerid, COLOR_BLUE, "The crime/death rate is very high because of gang violence in this city.");
        SendClientMessage(playerid, COLOR_BLUE, "There is an issue in the city of gangs killing each other over taking over turfs/hoods.");
        SendClientMessage(playerid, COLOR_BLUE, "you may go on cop duty by using (/copduty) you will recieve a vest and a deagle");
        SendClientMessage(playerid, COLOR_BLUE, "kill any gang member that is seen with a gun, civilians can be in serious danger.");
        SendClientMessage(playerid, COLOR_BLUE, "use (/d) to speak to the LSPD department *");
        PlayerPlaySound(playerid, 1186, 0.0, 0.0, 0.0);
        return 1;
    }

    if(gTeam[playerid] == TEAM_CIV) {
        SetPlayerColor(playerid, COLOR_FADE);
        SendClientMessage(playerid, COLOR_WHITE, " * * You are a civilian, you can buy some guns for protection by ammunation * *");
        SendClientMessage(playerid, COLOR_WHITE, " * * You can roam around Los Santos and have fun * *");
        SendClientMessage(playerid, COLOR_WHITE, "* * Use /weaponplace to show you where to get guns");
        PlayerPlaySound(playerid, 1186, 0.0, 0.0, 0.0);
        return 1;
    }
//Text Draws

    TextDrawShowForPlayer(playerid, Textdraw0);

//Gang Zones
    GangZoneShowForAll (astecs, 0x12B0FC8B);
    GangZoneShowForAll (grove1, 0x008C0085);
    GangZoneShowForAll (grove2, 0x00950096);
    GangZoneShowForAll (ballas, 0xF053FD81);
    GangZoneShowForAll (vagos, 0xECEC0089);
    GangZoneShowForAll (polis, 0xE800007C);
    return 1;
    
 }
public OnPlayerDeath(playerid, killerid, reason)
{
    new PName[MAX_PLAYER_NAME];
    new string[128];

    if(gTeam[playerid] == TEAM_CIV) {
        format(string, sizeof(string), "RADIO: Law officer, an civilian by the name of %s has just been murdered.", PName);
        SendClientMessageToAll(COLOR_RED, string);
        return 1;
    }
    return 1;
}


public OnPlayerText(playerid, text[])
{

    return 1;
}


public OnRconCommand(cmd[])
{
    return 1;
}


public OnPlayerCommandText(playerid, cmdtext[])
{
    new cmd[256],tmp[256], tmp2[256];
	new idx;
	new string[256];
    cmd = strtok(cmdtext, idx);
    GetPlayerName(playerid, playername, sizeof(playername));
	if(strcmp(cmd, "/register", true) == 0)
{
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp))
{
	SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /register (password)");
}
	else
{
	if (!dini_Exists(udb_encode(playername)))
{
	dini_Create(udb_encode(playername));
	dini_IntSet(udb_encode(playername), "password", udb_hash(tmp));
	dini_IntSet(udb_encode(playername), "pMoney", 5000);
	dini_IntSet(udb_encode(playername), "pAdmin", 0);
	dini_IntSet(udb_encode(playername), "pKills", 0);
	dini_IntSet(udb_encode(playername), "pLevel", 1);
	dini_IntSet(udb_encode(playername), "pPlayerAccount", 1);
	dini_IntSet(udb_encode(playername), "pDeaths", 0);
 	dini_IntSet(udb_encode(playername), "pTeam", 0);
    format(string, sizeof(string), "Account %s created! You can now login with /login", playername, tmp);
    SendClientMessage(playerid, COLOR_YELLOW, string);
}
	else
{
	format(string, sizeof(string), "%s is already registered.", playername,tmp);
	SendClientMessage(playerid, COLOR_RED, string);
}
}
{
 //---- all commands
 return SendClientMessage(playerid,COLOR_RED,"SERVER MESSAGE: Our scripters hadnt scripted this command!!");

  return 0;
}
	return 1;
}

	new result[256];
	new giveplayer[MAX_PLAYER_NAME];
	new sendername[MAX_PLAYER_NAME];

//-------------------------------[ ADMIN COMMANDS ]-----------------------------
//--------------------------------------[ BAN ]---------------------------------
	if(strcmp(cmd, "/ban", true, 10) == 0)
{
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp))
{
	SendClientMessage(playerid, COLOR_GREY, "USAGE: /ban [playerid] [reason]");
	return 1;
}
	new length = strlen(cmdtext);
	while ((idx < length) && (cmdtext[idx] <= ' '))
{
	idx++;
}
	new offset = idx;
	new resulty[84];
	while ((idx < length) && ((idx - offset) < (sizeof(resulty) - 1)))
{
	resulty[idx - offset] = cmdtext[idx];
	idx++;
}
	resulty[idx - offset] = EOS;
	if(!strlen(resulty))
{
	SendClientMessage(playerid, COLOR_YELLOW, "USAGE: /ban [playerid] [reason]");
	return 1;
}
	new playa = strval(tmp);
	GetPlayerName(playa, giveplayer, sizeof(giveplayer));
	GetPlayerName(playerid, sendername, sizeof(sendername));
	if(pAdmin[playerid] >= 2)
{
	if(logged[playerid] == 1)
{
	SendClientMessage(playa, COLOR_RED, "You were banned from the server!");
	format(string, sizeof(string), " %s has been banned by %s, Reason: %s",sendername, giveplayer, resulty);
	SendClientMessageToAll(COLOR_PURPLE, string);
	Ban(playa);
	return 1;
}
}
	else
{
	SendClientMessage(playerid, COLOR_RED, "Server: You aren't a admin!");
}
	return 1;
}
    //--------------------[bush]-----------------------------

    if ( !strcmp( "/bush", cmdtext, true ) )
{
    tmp = strtok(cmdtext, idx);
    if(!strlen(tmp))
    {
        if ( BushEnabled[playerid] )
	{
	    DestroyObject( BushObject[playerid] );
 	    SendClientMessage(playerid, 0xDEEE20FF, "bush disabled");
	    BushEnabled[playerid] = false;
	    return 1;
  	}

  		if(pAdmin[playerid] >= 2)
        {
	    BushObject [playerid] = CreateObject( 800, 0, 0, 0, 0, 0, 0 );
	    BushEnabled[playerid] = true;
    	    SendClientMessage(playerid, 0xDEEE20FF, "bush enabled.");
            AttachObjectToPlayer( BushObject[playerid], playerid, 0, 0, 0, 0, 0, 0 );
	    return 1;
	}
    }
}
//----------------------------- [ KICK ]----------------------------------------
	if(strcmp(cmd, "/kick", true, 10) == 0)
{
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp))
{
	SendClientMessage(playerid, COLOR_GREY, "USAGE: /kick [playerid] (auto assigned reason)");
	return 1;
}
	new playa = strval(tmp);
	GetPlayerName(playa, giveplayer, sizeof(giveplayer));
	GetPlayerName(playerid, sendername, sizeof(sendername));
	if(pAdmin[playerid] >= 1)
{
	if(logged[playerid] == 1)
{
	SendClientMessage(playa, COLOR_RED, "You were kicked from the server!");
	format(string, sizeof(string), "AdmCmd: %s was kicked by %s, Reason: get out",sendername, giveplayer);
	SendClientMessageToAll(COLOR_PURPLE, string);
	Kick(playa);
	return 1;
}
}
	else
{
	SendClientMessage(playerid, COLOR_RED, "Server: You aren't a admin. !");
}
	return 1;
}
//------------------------------[ MUTE ]----------------------------------------
	if(strcmp(cmd, "/mute", true, 10) == 0)
{
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp))
{
	SendClientMessage(playerid, COLOR_GREY, "SAGE: /mute [playerid]");
	return 1;
}
	new playa = strval(tmp);
	GetPlayerName(playa, giveplayer, sizeof(giveplayer));
	GetPlayerName(playerid, sendername, sizeof(sendername));
	if(pAdmin[playerid] >= 1)
{
	format(string, sizeof(string), "User %s has been muted by Administrator %s",giveplayer, sendername);
	SendClientMessageToAll(COLOR_PURPLE, string);

	return 1;
}
	if(pAdmin[playerid] >= 1)
{
	format(string, sizeof(string), "AdmCmd: %s was unsilenced by %s",giveplayer, sendername);
	SendClientMessageToAll(COLOR_PURPLE, string);

}
	return 1;
}
//====================================FUN EVENT START=============================//
    if(strcmp(cmd, "/startfunevent", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(pAdmin[playerid] >= 2)
			{
				FunEventOn = 1;
				GetPlayerPos(playerid,ex,ey,ez);
				SendClientMessageToAll(COLOR_YELLOW, "NEWS: An Fun Event has started, use /joinfunevent to join !");
			}
			else if (pAdmin[playerid] >= 3)
			{
				FunEventOn = 0;
			}
			else
			{
				SendClientMessage(playerid, COLOR_RED, "Server: You aren't a admin.!");
			}
		}
		return 1;
	}
//=================================ADMIN HELP=======================
	if(strcmp(cmd, "/ahelp", true) == 0)
	{
		if(pAdmin[playerid] >= 1)
	{
		SendClientMessage(playerid, COLOR_YELLOW, "[Trial Admin] /kick, /slap, /x(admin announcement), /freezeplayer");
		SendClientMessage(playerid, COLOR_YELLOW, "[Low Admin] /ban, /startfunevent, /adminduty, /bush, /nochat, /endfunevent");
		SendClientMessage(playerid, COLOR_YELLOW, "[Server Owner] /blowmeup(explodes the player)");
		return 1;
	}
}
//===============================Bastard = explode ==================
    if(strcmp(cmd, "/bastard", true) == 0)
	{
            if(pAdmin[playerid] >= 3)
	{
			new Float:px, Float:py, Float:pz;
			GetPlayerPos(playerid, px, py, pz);
			CreateExplosion(px+10, py, pz, 7, 100.0);
			CreateExplosion(px, py+10, pz, 7, 100.0);
			CreateExplosion(px-10, py, pz, 7, 100.0);
			CreateExplosion(px, py-10, pz, 7, 100.0);
			CreateExplosion(px, py, pz, 7, 100.0);
			return 1;
	    }
}
//===================================Stop fun event=================
	if(strcmp(cmd, "/stopfunevent", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
			if(pAdmin[playerid] >= 2)
			{
			 	FunEventOn = 0;
			 	SendClientMessage(playerid, COLOR_RED, "Event Stopped");
	 		}
			else
			{
				SendClientMessage(playerid, COLOR_GREY, "   You can't use this command");
			}
 		}
 		return 1;
	}
//===============================JOINING FUN EVENT=================================///
	if(strcmp(cmd, "/joinfunevent", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	    					if(FunEventOn == 0)
			   				 {
			      				  SendClientMessage(playerid, COLOR_YELLOW, "An Event has not Started.");
			      				  return 1;
			   				 }
							SetPlayerPos(playerid, ex, ey, ez); //
						    SendClientMessage(playerid, COLOR_OKER, "† Don't be an idiot, and and follow what the admins say.");
		}//not connected
		return 1;
	}
//------------------------------[ SLAP ]----------------------------------------
	if(strcmp(cmd, "/slap", true, 10) == 0)
{
	tmp = strtok(cmdtext, idx);
	if(!strlen(tmp))
{
	SendClientMessage(playerid, COLOR_GREY, "USAGE: /slap [playerid]");
	return 1;
}
	new playa = strval(tmp);
	GetPlayerName(playa, giveplayer, sizeof(giveplayer));
	GetPlayerName(playerid, sendername, sizeof(sendername));
	if(pAdmin[playerid] >= 1)
{
	if(logged[playerid] == 1)
{
	format(string, sizeof(string), "AdmCmd: %s was slapped by %s",giveplayer, sendername);
	SendClientMessageToAll(COLOR_YELLOW, string);
	new Float:health;
	new Float:x, Float:y, Float:z;
	GetPlayerHealth(playa, health);
	SetPlayerHealth(playa, health-10);
	GetPlayerPos(playa, x, y, z);
	SetPlayerPos(playa, x, y, z+10);
	return 1;
}
}
	else
{
	SendClientMessage(playerid, COLOR_RED, "ERROR: You can't use this cmd. !");
}
	return 1;
}

	if(strcmp(cmd, "/login", true) == 0)
{
	if(logged[playerid] == 1)
{
    SendClientMessage(playerid, COLOR_RED, "You are already logged in!");
   	return 1;
}
    tmp = strtok(cmdtext, idx);
	if(!strlen(tmp))
{
	SendClientMessage(playerid, COLOR_GREY, "USAGE: /login [password]");
}
    else
{
	if (dini_Exists(udb_encode(playername)))
{
    tmp2 = dini_Get(udb_encode(playername), "password");
	if (udb_hash(tmp) != strval(tmp2))
{
	SendClientMessage(playerid, COLOR_GREY, "rong/Invalid Password!");
}
	else
{
    logged[playerid] = 1;
    SendClientMessage(playerid, COLOR_GREEN,"Successfully logged in!");
    pMoney[playerid] = dini_Int(udb_encode(playername), "pMoney");
    pAdmin[playerid] = dini_Int(udb_encode(playername), "pAdmin");
	pKills[playerid] = dini_Int(udb_encode(playername), "pKills");
	pLevel[playerid] = dini_Int(udb_encode(playername), "pLevel");
	pPlayerAccount[playerid] = dini_Int(udb_encode(playername), "pPlayerAccount");
	pDeaths[playerid] = dini_Int(udb_encode(playername), "pDeaths");
 	pTeam[playerid] = dini_Int(udb_encode(playername), "pTeam");
	SetPlayerScore(playerid, pLevel[playerid]);
	GivePlayerMoney(playerid, pMoney[playerid]);
	if(pTeam[playerid] == 0)
{
	SetPlayerColor(playerid, COLOR_GRAD1);
}
}
}
	else
{
    format(string, sizeof(string), " You are not registered! Type /register [password] to create an account!", playername);
	SendClientMessage(playerid, COLOR_OKER, string);
}
}
	return 1;
}

	new giveplayerid;
    if(strcmp(cmd, "/gworker", true) == 0) {
	gTeam[playerid] = TEAM_GUNDEALER;
	if(PlayerToPoint(15.0, playerid, 2177.1697,-1666.6635,15.0859)) {
   	SendClientMessage(playerid, COLOR_BLUELIGHTER, "--> You are now a official gundealer!");
	SendClientMessage(playerid, COLOR_BLUELIGHTER, "--> You can now sell weapons, type /gcmds");
	return 1;
	}
}
				if(strcmp(cmd, "/sellspas12", true) == 0) {

                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                        		SendClientMessage(playerid, COLOR_RED, "Usage: /sellspas12 [Player ID]");
								return 1;
                }
				giveplayerid = strval(tmp);

    			if (IsPlayerConnected(giveplayerid)) {
        if (gTeam[playerid] == TEAM_GUNDEALER) {
   GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
   GetPlayerName(playerid, sendername, sizeof(sendername));
   GivePlayerWeapon(giveplayerid, 27, 300);
   GivePlayerMoney(playerid, 2000);
   GivePlayerMoney(giveplayerid, -2000);
   format(string, sizeof(string), "You have sold a spas12 to %s", sendername, playerid);
   SendClientMessage(giveplayerid, COLOR_RED, string);
   format(string, sizeof(string), "GunDealer $", giveplayer, giveplayerid, sendername, playerid);
   return 1;
           }else{
                				SendClientMessage(playerid, COLOR_RED, "You aren't a official Gun Dealer. !");
}
                        }else{
        format(string, sizeof(string), "id %d is not an active player.", giveplayerid);
		SendClientMessage(playerid, COLOR_GREY, string);
}
				return 1;
}

if(strcmp(cmd, "/selluzi", true) == 0) {

                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                        		SendClientMessage(playerid, COLOR_RED, "Usage: /selluzi [Player ID]");
								return 1;
                }
				giveplayerid = strval(tmp);

    			if (IsPlayerConnected(giveplayerid)) {
        if (gTeam[playerid] == TEAM_GUNDEALER) {
   GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
   GetPlayerName(playerid, sendername, sizeof(sendername));
   GivePlayerWeapon(giveplayerid, 28, 300);
   GivePlayerMoney(playerid, 2000);
   GivePlayerMoney(giveplayerid, -2000);
   format(string, sizeof(string), "You have sold a UZI to %s", sendername, playerid);
   SendClientMessage(giveplayerid, COLOR_RED, string);
   format(string, sizeof(string), "Gundealer %s gave you a UZI", giveplayer, giveplayerid, sendername, playerid);
   return 1;
           }else{
                				SendClientMessage(playerid, COLOR_RED, "You are not a Gun Dealer !");
}
                        }else{
        format(string, sizeof(string), "id %d is not an active player.", giveplayerid);
		SendClientMessage(playerid, COLOR_GREY, string);
}
				return 1;
}


				if(strcmp(cmd, "/sellak47", true) == 0) {

                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                        		SendClientMessage(playerid, COLOR_RED, "Usage: /sellak47 [Player ID]");
								return 1;
                }
				giveplayerid = strval(tmp);

    			if (IsPlayerConnected(giveplayerid)) {
        if (gTeam[playerid] == TEAM_GUNDEALER) {
   GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
   GetPlayerName(playerid, sendername, sizeof(sendername));
   GivePlayerWeapon(giveplayerid, 30, 300);
   GivePlayerMoney(playerid, 3000);
   GivePlayerMoney(giveplayerid, -3000);
   format(string, sizeof(string), "You have sold Ak47 to %s", sendername, playerid);
   SendClientMessage(giveplayerid, COLOR_RED, string);
   format(string, sizeof(string), "Gundealer %s gave you Ak47", giveplayer, giveplayerid, sendername, playerid);
   return 1;
           }else{
                				SendClientMessage(playerid, COLOR_RED, "Error: You arent a gun dealer!");
}
                        }else{
        format(string, sizeof(string), "id %d is not an active player.", giveplayerid);
		SendClientMessage(playerid, COLOR_YELLOW, string);
}
				return 1;
}


				if(strcmp(cmd, "/sellmp5", true) == 0) {

                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                        		SendClientMessage(playerid, COLOR_RED, "Usage: /sellmp5 [Player ID]");
								return 1;
                }
				giveplayerid = strval(tmp);

    			if (IsPlayerConnected(giveplayerid)) {
        if (gTeam[playerid] == TEAM_GUNDEALER) {
   GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
   GetPlayerName(playerid, sendername, sizeof(sendername));
   GivePlayerWeapon(giveplayerid, 29, 300);
   GivePlayerMoney(playerid, 1000);
   GivePlayerMoney(giveplayerid, -1000);
   format(string, sizeof(string), "You have sold a Mp5 to %s", sendername, playerid);
   SendClientMessage(giveplayerid, COLOR_RED, string);
   format(string, sizeof(string), "Gundealer %s gave you a Mp5", giveplayer, giveplayerid, sendername, playerid);
   return 1;
           }else{
                				SendClientMessage(playerid, COLOR_GREY, "You are not a gun dealer !");
}
                        }else{
        format(string, sizeof(string), "id %d is not connected.", giveplayerid);
		SendClientMessage(playerid, COLOR_GREY, string);
}
				return 1;
}

if(strcmp(cmd, "/sellcol45", true) == 0) {

                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                        		SendClientMessage(playerid, COLOR_RED, "Usage: /sellcolt [Player ID]");
								return 1;
                }
				giveplayerid = strval(tmp);

    			if (IsPlayerConnected(giveplayerid)) {
        if (gTeam[playerid] == TEAM_GUNDEALER) {
   GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
   GetPlayerName(playerid, sendername, sizeof(sendername));
   GivePlayerWeapon(giveplayerid, 22, 300);
   GivePlayerMoney(playerid, 1000);
   GivePlayerMoney(giveplayerid, -1000);
   format(string, sizeof(string), "You have sold a colt.45 to %s", sendername, playerid);
   SendClientMessage(giveplayerid, COLOR_RED, string);
   format(string, sizeof(string), "Gundealer %s gave you a colt.45", giveplayer, giveplayerid, sendername, playerid);
   return 1;
           }else{
                				SendClientMessage(playerid, COLOR_RED, "You are not a gun dealer !");
}
                        }else{
        format(string, sizeof(string), "id %d is not connected.", giveplayerid);
		SendClientMessage(playerid, COLOR_GREY, string);
}
				return 1;
}

if(strcmp(cmd, "/sellarmour", true) == 0) {

                tmp = strtok(cmdtext, idx);
                if(!strlen(tmp)) {
                        		SendClientMessage(playerid, COLOR_RED, "Usage: /sellcolt [Player ID]");
								return 1;
                }
				giveplayerid = strval(tmp);

    			if (IsPlayerConnected(giveplayerid)) {
        if (gTeam[playerid] == TEAM_GUNDEALER) {
   GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
   GetPlayerName(playerid, sendername, sizeof(sendername));
   SetPlayerArmour(50);
   GivePlayerMoney(playerid, 1000);
   GivePlayerMoney(giveplayerid, -1000);
   format(string, sizeof(string), "You have give %s a bullet proof armour!", sendername, playerid);
   SendClientMessage(giveplayerid, COLOR_RED, string);
   format(string, sizeof(string), "Gundealer %s gave you a armour", giveplayer, giveplayerid, sendername, playerid);
   return 1;
           }else{
                				SendClientMessage(playerid, COLOR_RED, "You are not a gun dealer !");
}
                        }else{
        format(string, sizeof(string), "id %d is not connected.", giveplayerid);
		SendClientMessage(playerid, COLOR_GREY, string);
}
				return 1;
}


    if (strcmp("/jobgunplace", cmdtext, true, 10) == 0) {

		SetPlayerCheckpoint(playerid, 2177.1697,-1666.6635,15.0859, 3.0);
		SendClientMessage(playerid, COLOR_BLUELIGHT, "† Gun Job place was placed on your map, look on your map and follow it †");
		return 1;
	}

    if (strcmp("/pilotjobplace", cmdtext, true, 10) == 0) {

		SetPlayerCheckpoint(playerid, 1778.2642,-2432.2908,13.5547, 3.0);
		SendClientMessage(playerid, COLOR_BLUELIGHT, "† Pilot Job place was placed on your map, look on your map and follow it †");
		return 1;
	}

    if (strcmp("/jobpilot", cmdtext, true, 10) == 0) {

		if(PlayerToPoint(15.0, playerid, 1778.2642,-2432.2908,13.5547)) {

		SetPlayerSkin(playerid,255);
		SendClientMessage(playerid, COLOR_BLUELIGHTER, "† You are successfully are a pilot, next time you login you'll");
		SendClientMessage(playerid, COLOR_BLUELIGHTER, "† Get the job again. you can roam around Los Santos in planes and take people to their destination.");
		SetPlayerColor(playerid, COLOR_BROWN);
		return 1;
	}
	    SendClientMessage(playerid, COLOR_GREY, "You are not at the pilotjob place ! use /pilotjobplace to find it.");
}
	if (strcmp("/adminduty", cmdtext, true, 10) == 0) {

        if(pAdmin[playerid] >= 1)
	{
		SendClientMessage(playerid, COLOR_YELLOW, "SERVER: Your now logged in as admin");
		SetPlayerSkin(playerid,205);
		SetPlayerColor(playerid, COLOR_YELLOW);
		SetPlayerPos(playerid, 1534.9592,-1480.8281,10.6047);
		return 1;
    }
        SendClientMessage(playerid, COLOR_GREY, "You can't use this command !");
}

	if (strcmp("/housedrugs", cmdtext, true, 10) == 0) {

	    SetPlayerCheckpoint(playerid, 2459.4539,-1690.9188,13.5453, 3.0);
        SendClientMessage(playerid, COLOR_BLUELIGHT, " † Drug house checkpoint was placed on your map, look on your map for a red blip then follow it †");
		return 1;
    }
    if (strcmp("/weaponplace", cmdtext, true, 10) == 0) {

        SetPlayerCheckpoint(playerid, 1366.4325,-1275.2096,13.5469, 3.0);
        SendClientMessage(playerid, COLOR_BLUELIGHT, " † Ammunation checkpoint was placed on your map, look on your map for a red blip then follow it †");
        return 1;
    }

    if (strcmp("/snowarena", cmdtext, true, 10) == 0) {

        SetPlayerCheckpoint(playerid, 2695.1841,-1704.2936,11.8438, 3.0);
        SendClientMessage(playerid, COLOR_BLUELIGHT, " † Snow Arena checkpoint was placed on your map, look on your map for a red blip then follow it †");
        return 1;
    }

    if (strcmp("/commands", cmdtext, true, 10) == 0) {
        SendClientMessage(playerid, COLOR_RED, "† Server Commands†");
        SendClientMessage(playerid, COLOR_RED, "[TURF COMMANDS] /claimvagos, /claimgangstas, /claimaztecs, /claimdowntown, /watchdowntown(civilian command) /exitwatchdowntown(to exit");
        SendClientMessage(playerid, COLOR_RED, "[GANG/LAW CHAT COMMANDS] /g(gangsta chat, /b(ballas chat, /v(vagos chat /t(aztecas chat), /d (police chat), /m(e)[action]");
        SendClientMessage(playerid, COLOR_RED, "[WEAPONS](must be at the 'skull' by ammunation,/rentgunhelp) /rentmp5, /rentspas12, /rentak47, /rentm4, /rentshotgun");
        SendClientMessage(playerid, COLOR_RED, "[GENERAL COMMANDS] /freezeme, /unfreezeme, /kill(sets your hp to 0), /copduty(for cops, must be at lspd) /call, /sms");
        SendClientMessage(playerid, COLOR_RED, "[DRUGS] /takeweed(must be at ryder's drug house) /takecrack(must be at ryder's drug house)");
        SendClientMessage(playerid, COLOR_RED, "NONE");
        SendClientMessage(playerid, COLOR_RED, "Ask [GD]'s about a gun dealer job!");
        SendClientMessage(playerid, COLOR_OKER, "NONE");
        return 1;
    }
    if (strcmp("/help", cmdtext, true, 10) == 0) {
        SendClientMessage(playerid, COLOR_WHITE, "† Welcome to '/help' for information on the server go to maniagangwars.com †");
        SendClientMessage(playerid, COLOR_OKER, "[TURF COMMANDS] /claimvagos, /claimgangstas, /claimaztecs, /claimdowntown");
        SendClientMessage(playerid, COLOR_OKER, "[GANG/LAW CHAT COMMANDS] /g(gangsta chat, /b(ballas chat, /v(vagos chat /a(aztecas chat), /d (police chat)");
        SendClientMessage(playerid, COLOR_OKER, "");
        SendClientMessage(playerid, COLOR_OKER, "[GENERAL COMMANDS] /freezeme, /unfreezeme, /kill(sets your hp to 0), /copduty(for cops, must be at lspd)");
        SendClientMessage(playerid, COLOR_OKER, "[DRUGS] /takeweed(must be at ryder's drug house) /takecrack(must be at ryder's drug house)");
        SendClientMessage(playerid, COLOR_OKER, "[FUN EVENTS]");
        SendClientMessage(playerid, COLOR_OKER, "");
        SendClientMessage(playerid, COLOR_OKER, "");
        SendClientMessage(playerid, COLOR_OKER, "");
        return 1;
    }

    if (strcmp("/freezeplayer", cmdtext, true, 10) == 0) {

        if(pAdmin[playerid] >= 1)
	{
        SendClientMessage(playerid, COLOR_GREY, "You have frozen a player, use /unfreezeplayer to unfreeze the player");
        TogglePlayerControllable(playerid,0);
        return 1;
    }
}
    if (strcmp("/unfreezeplayer", cmdtext, true, 10) == 0) {

        if(pAdmin[playerid] >= 1)
	{
        SendClientMessage(playerid, COLOR_GREY, "You are no longer frozen !");
        TogglePlayerControllable(playerid,1);
        return 1;
    }
}
    if (strcmp("/claimdowntown", cmdtext, true, 10) == 0) {
        if(pTyped[playerid] == 1) {
            SendClientMessageToAll(COLOR_GREY, "You already claimed, you can't claim again !");
            return 1;
        }
        if(PlayerToPoint(15.0, playerid, 1121.8634,-1203.0513,27.4792)) {
            if(gTeam[playerid] == TEAM_GANGSTAS) {
                GangZoneShowForAll (ortak, 0x008C0085);
                SendClientMessageToAll(COLOR_GREEN, "TURF: Grove Street has successfully claimed downtown los santos.");
                pTyped[playerid] = 1;
                SetTimerEx("Spam", 2000, false, "i", playerid);
            }
            else if(gTeam[playerid] == TEAM_BALLAS) {
                GangZoneShowForAll (ortak, 0xF053FD81);
                SendClientMessageToAll(COLOR_PURPLE, "TURF: Ballas has successfully claimed downtown los santos.");
                pTyped[playerid] = 1;
                SetTimerEx("Spam", 2000, false, "i", playerid);
            }
            else if(gTeam[playerid] == TEAM_VAGOS) {
                GangZoneShowForAll (ortak, 0xECEC0089);
                SendClientMessageToAll(COLOR_YELLOW, "TURF: Vagos has successfully claimed downtown los santos.");
                pTyped[playerid] = 1;
                SetTimerEx("Spam", 2000, false, "i", playerid);
            }
            else if(gTeam[playerid] == TEAM_AZTECAS) {
                GangZoneShowForAll (ortak, 0x12B0FC8B);
                SendClientMessageToAll(COLOR_BLUELIGHT, "TURF: Aztecas has successfully claimed downtown los santos.");
                pTyped[playerid] = 1;
                SetTimerEx("Spam", 2000, false, "i", playerid);
            }
            else if(gTeam[playerid] == TEAM_LSPD) {
                SendClientMessage(playerid, COLOR_GREY, "You are in the LSPD you can't claim a gang zone !");
            }
            else if(gTeam[playerid] == TEAM_CIV) {
                SendClientMessage(playerid, COLOR_GREY, "You are an civilian be careful you are in a gang zone, you are in danger ! ");

                return 1;
            }
            return 1;
        }
        return 1;
    }

    if (strcmp("/claimbeachboys", cmdtext, true, 10) == 0) {
        if(pTyped[playerid] == 1) {
            SendClientMessageToAll(COLOR_GREY, "You already claimed, you can't claim again !");
            return 1;
        }
        if(PlayerToPoint(15.0, playerid, 322.9717,-1773.7930,4.8277)) {

            SendClientMessageToAll(COLOR_RED, "TURF: Beach Boys Turf has just been claimed !");
            GameTextForPlayer(playerid, "~w~you have claimed ~g~grove street", 1000, 6);
            pTyped[playerid] = 1;
            SetTimerEx("Spam", 1, false, "i", playerid);
            if(gTeam[playerid] == TEAM_GANGSTAS) {
                GangZoneShowForAll (ortak, 0x008C0085);
                SendClientMessageToAll(COLOR_RED, "TURF: Beach Boys has claimed their turf back !");
                pTyped[playerid] = 1;
                SetTimerEx("Spam", 1, false, "i", playerid);
            }
            else if(gTeam[playerid] == TEAM_BALLAS) {
                GangZoneShowForAll (ortak, 0xF053FD81);
                SendClientMessageToAll(COLOR_PURPLE,"TURF: Ballas has claimed Beach Boys Turf !");
                pTyped[playerid] = 1;
                SetTimerEx("Spam", 1, false, "i", playerid);
            }
            else if(gTeam[playerid] == TEAM_VAGOS) {
                GangZoneShowForAll (ortak, 0xECEC0089);
                SendClientMessageToAll(COLOR_YELLOW, "TURF: Vagos has just claimed Beach Boys Turf !");
                pTyped[playerid] = 1;
                SetTimerEx("Spam", 1, false, "i", playerid);
            }
            else if(gTeam[playerid] == TEAM_AZTECAS) {
                GangZoneShowForAll (ortak, 0x12B0FC8B);
                SendClientMessageToAll(COLOR_BLUELIGHT, "TURF: Aztecas has just claimed Grove Street Families Turf !");
                pTyped[playerid] = 1;
                SetTimerEx("Spam", 1, false, "i", playerid);
            }
            else if(gTeam[playerid] == TEAM_LSPD) {
                SendClientMessage(playerid, COLOR_GREY, "You are in the LSPD you can't claim a gang zone !");
            }
            else if(gTeam[playerid] == TEAM_CIV) {
                SendClientMessage(playerid, COLOR_GREY, "You are an civilian be careful you are in a gang zone, you are in danger ! ");
                return 1;
            }
            return 1;
        }
        return 1;
    }

    if (strcmp("/claimballas", cmdtext, true, 10) == 0) {
        if(pTyped[playerid] == 1) {
            SendClientMessageToAll(COLOR_GREY, "You already claimed, you can't claim again !");
            return 1;
        }
        if(PlayerToPoint(3.0, playerid, 2219.5300,-1154.2638,26.2266)) {
            SendClientMessageToAll(COLOR_PURPLE, "TURF: Ballas turf has just been claimed");
            GameTextForPlayer(playerid, "~w~you have claimed ~p~ballas turf", 1000, 6);
            if(gTeam[playerid] == TEAM_GANGSTAS) {
                GangZoneShowForAll (ortak, 0x008C0085);
                SendClientMessageToAll(COLOR_RED, "TURF: Beach Boys has claimed ballas turf !");
                pTyped[playerid] = 1;
                SetTimerEx("Spam", 1000, false, "i", playerid);
            }
            else if(gTeam[playerid] == TEAM_BALLAS) {
                GangZoneShowForAll (ortak, 0xF053FD81);
                SendClientMessageToAll(COLOR_PURPLE,"TURF: Ballas has claimed their turf back !");
                pTyped[playerid] = 1;
                SetTimerEx("Spam", 1000, false, "i", playerid);
            }
            else if(gTeam[playerid] == TEAM_VAGOS) {
                GangZoneShowForAll (ortak, 0xECEC0089);
                SendClientMessageToAll(COLOR_YELLOW, "TURF: Vagos has claimed Ballas Turf !");
                pTyped[playerid] = 1;
                SetTimerEx("Spam", 1000, false, "i", playerid);
            }
            else if(gTeam[playerid] == TEAM_AZTECAS) {
                GangZoneShowForAll (ortak, 0x12B0FC8B);
                SendClientMessageToAll(COLOR_BLUELIGHT, "TURF: Aztecas has just claimed Ballas Turf !");
                pTyped[playerid] = 1;
                SetTimerEx("Spam", 1000, false, "i", playerid);
            }
            else if(gTeam[playerid] == TEAM_LSPD) {
                SendClientMessage(playerid, COLOR_GREY, "You are in the LSPD you can't claim a gang zone !");
            }
            else if(gTeam[playerid] == TEAM_CIV) {
                SendClientMessage(playerid, COLOR_GREY, "You are an civilian be careful you are in a gang zone, you are in danger ! ");

                return 1;
            }
            return 1;
        }
        return 1;
    }
    if (strcmp("/claimvagos", cmdtext, true, 10) == 0) {
        if(pTyped[playerid] == 1) {
            SendClientMessageToAll(COLOR_GREY, "You already claimed, you can't claim again !");
            return 1;
        }
        if(PlayerToPoint(15.0, playerid, 2716.8638,-1150.8356,69.5781)) {
            SendClientMessageToAll(COLOR_YELLOW, "TURF: Vagos turf has just been claimed");
            GameTextForPlayer(playerid, "~w~you have claimed ~y~vagos turf", 1000, 6);
            if(gTeam[playerid] == TEAM_VAGOS) {
                GangZoneShowForAll (ortak, 0x008C0085);
                SendClientMessageToAll(COLOR_YELLOW, "TURF: Vagos has claimed their turf back");
                pTyped[playerid] = 1;
                SetTimerEx("Spam", 2000, false, "i", playerid);
            }
            else if(gTeam[playerid] == TEAM_BALLAS) {
                GangZoneShowForAll (ortak, 0xF053FD81);
                SendClientMessageToAll(COLOR_PURPLE,"TURF: Ballas has claimed Vagos Turf !");
                pTyped[playerid] = 1;
                SetTimerEx("Spam", 2000, false, "i", playerid);
            }
            else if(gTeam[playerid] == TEAM_GANGSTAS) {
                GangZoneShowForAll (ortak, 0xECEC0089);
                SendClientMessageToAll(COLOR_RED, "TURF: Beach Boys has claimed Vagos turf !");
                pTyped[playerid] = 1;
                SetTimerEx("Spam", 2000, false, "i", playerid);
            }
            else if(gTeam[playerid] == TEAM_AZTECAS) {
                GangZoneShowForAll (ortak, 0x12B0FC8B);
                SendClientMessageToAll(COLOR_BLUELIGHT, "TURF: Aztecas has just claimed Vagos Turf !");
                pTyped[playerid] = 1;
                SetTimerEx("Spam", 2000, false, "i", playerid);
            }
            else if(gTeam[playerid] == TEAM_LSPD) {
                SendClientMessage(playerid, COLOR_GREY, "You are in the LSPD you can't claim a gang zone !");
            }
            else if(gTeam[playerid] == TEAM_CIV) {
                SendClientMessage(playerid, COLOR_GREY, "You are an civilian be careful you are in a gang zone, you are in danger ! ");

                return 1;
            }
            return 1;
        }
        return 1;
    }
    if (strcmp("/claimaztecas", cmdtext, true, 10) == 0) {
        if(pTyped[playerid] == 1) {
            SendClientMessageToAll(COLOR_GREY, "You already claimed, you can't claim again !");
            return 1;
        }
        if(PlayerToPoint(15.0, playerid, 1698.4174,-2098.8901,13.5469)) {
            SendClientMessageToAll(COLOR_BLUELIGHT, "TURF: Aztecas turf has been claimed");
            GameTextForPlayer(playerid, "~w~you have claimed ~b~aztecas", 1000, 6);
            if(gTeam[playerid] == TEAM_AZTECAS) {
                GangZoneShowForAll (ortak, 0x008C0085);
                SendClientMessageToAll(COLOR_BLUELIGHT, "TURF Aztecas has claimed their turf back");
                pTyped[playerid] = 1;
                SetTimerEx("Spam", 2000, false, "i", playerid);
            }
            else if(gTeam[playerid] == TEAM_BALLAS) {
                GangZoneShowForAll (ortak, 0xF053FD81);
                SendClientMessageToAll(COLOR_PURPLE,"TURF: Ballas has claimed Aztecas Turf !");
                pTyped[playerid] = 1;
                SetTimerEx("Spam", 2000, false, "i", playerid);
            }
            else if(gTeam[playerid] == TEAM_VAGOS) {
                GangZoneShowForAll (ortak, 0xECEC0089);
                SendClientMessageToAll(COLOR_YELLOW, "TURF: Vagos has claimed Aztecas Turf !");
                pTyped[playerid] = 1;
                SetTimerEx("Spam", 2000, false, "i", playerid);
            }
            else if(gTeam[playerid] == TEAM_GANGSTAS) {
                GangZoneShowForAll (ortak, 0x12B0FC8B);
                SendClientMessageToAll(COLOR_RED, "TURF: Beach Boys has claimed Aztecas Turf !");
                pTyped[playerid] = 1;
                SetTimerEx("Spam", 2000, false, "i", playerid);
            }
            else if(gTeam[playerid] == TEAM_LSPD) {
                SendClientMessage(playerid, COLOR_GREY, "You are in the LSPD you can't claim a gang zone !");
                pTyped[playerid] = 1;
                SetTimerEx("Spam", 2000, false, "i", playerid);
            }
            else if(gTeam[playerid] == TEAM_CIV) {
                SendClientMessage(playerid, COLOR_RED, "You are an civilian be careful you are in a gang zone, you are in danger ! ");

                return 1;
            }
            return 1;
        }
        return 1;
    }
    if (strcmp("/watchdowntown", cmdtext, true, 10) == 0) {
        if(gTeam[playerid] == TEAM_GANGSTAS) {
            SendClientMessage(playerid, COLOR_GREY, "You are in a Gang/Organization");
            return 0;
        }
        if(gTeam[playerid] == TEAM_VAGOS) {
            SendClientMessage(playerid, COLOR_GREY, "You are in a Gang/Organization");
            return 0;
        }
        if(gTeam[playerid] == TEAM_BALLAS) {
            SendClientMessage(playerid, COLOR_GREY, "You are om a Gang/Organization");
            return 0;
        }
        if(gTeam[playerid] == TEAM_AZTECAS) {
            SendClientMessage(playerid, COLOR_GREY, "You are in a Gang/Organization");
            return 0;
        }
        if(gTeam[playerid] == TEAM_CIV) {
            SendClientMessage(playerid, COLOR_RED, "† Welcome to downtown, you are viewing downtown turf war zone, be careful there is a chance you can get shot ! †");
            SendClientMessage(playerid, COLOR_WHITE, "† EXIT: you can exit turf view by using /exitdowntown†");
            SetPlayerPos(playerid,1125.4023,-1212.7699,25.3020);
            SetPlayerFacingAngle(playerid,22.5654);
            TogglePlayerControllable(playerid,0);

            return 1;
        }
        return 1;
    }

    if (strcmp("/exitturfwatch", cmdtext, true, 10) == 0) {
        if(gTeam[playerid] == TEAM_GANGSTAS) {
            SendClientMessage(playerid, COLOR_GREY, "You are in a Gang/Organization");
            return 0;
        }
        if(gTeam[playerid] == TEAM_VAGOS) {
            SendClientMessage(playerid, COLOR_GREY, "You are in a Gang/Organization");
            return 0;
        }
        if(gTeam[playerid] == TEAM_BALLAS) {
            SendClientMessage(playerid, COLOR_GREY, "You are om a Gang/Organization");
            return 0;
        }
        if(gTeam[playerid] == TEAM_AZTECAS) {
            SendClientMessage(playerid, COLOR_GREY, "You are in a Gang/Organization");
            return 0;
        }
        if(gTeam[playerid] == TEAM_CIV) {
            SendClientMessage(playerid, COLOR_RED, "† You have exited Turf view, you have been taken to a safe part of LS †");
            SetPlayerPos(playerid,1480.8966,-1763.6648,18.7958);
            SetPlayerFacingAngle(playerid,358.3040);
            TogglePlayerControllable(playerid,1);

            return 1;
        }
        return 1;
    }

    if(!strcmp(cmdtext,"/d", true,2)) {
        if(!strlen(cmdtext[2])) return SendClientMessage(playerid, 0xAFAFAFAA, "USAGE: /d [text] (lspd chat)");
        if(gTeam[playerid] != TEAM_LSPD) return SendClientMessage(playerid, 0xAFAFAFAA, "You must be a cop to use this command!");
        new playername[MAX_PLAYER_NAME], string[128];
        GetPlayerName(playerid, playername, sizeof(playername));
        format(string, sizeof(string), "†Officer [%s]: %s, over", playername, cmdtext[2]);
        for(new i = 0; i < MAX_PLAYERS; i++) {
// LSPD TEAM CHAT
            if(gTeam[i] == TEAM_LSPD) {
                SendClientMessage(i, COLOR_GOLD, string);
            }
            return 1;
        }
        return 0;
    }
     if(!strcmp(cmdtext,"/g", true,2)) {
        if(!strlen(cmdtext[2])) return SendClientMessage(playerid, 0xAFAFAFAA, "USAGE: /g [text] (lspd chat)");
        if(gTeam[playerid] != TEAM_GANGSTAS) return SendClientMessage(playerid, 0xAFAFAFAA, "You can't use this command !");
        new playername[MAX_PLAYER_NAME], string[128];
        GetPlayerName(playerid, playername, sizeof(playername));
        format(string, sizeof(string), "†Beach Boy [%s]: %s,", playername, cmdtext[2]);
        for(new i = 0; i < MAX_PLAYERS; i++) {
// BEACH BOYS CHAT
            if(gTeam[i] == TEAM_GANGSTAS) {
                SendClientMessage(i, COLOR_GOLD, string);
            }
            return 1;
        }
        return 0;
    }

 	if(!strcmp(cmdtext,"/b", true,2)) {
        if(!strlen(cmdtext[2])) return SendClientMessage(playerid, 0xAFAFAFAA, "USAGE: /d [text] (lspd chat)");
        if(gTeam[playerid] != TEAM_BALLAS) return SendClientMessage(playerid, 0xAFAFAFAA, "You can't use this command !");
        new playername[MAX_PLAYER_NAME], string[128];
        GetPlayerName(playerid, playername, sizeof(playername));
        format(string, sizeof(string), "†Balla [%s]: %s,", playername, cmdtext[2]);
        for(new i = 0; i < MAX_PLAYERS; i++) {
// LSPD TEAM CHAT
            if(gTeam[i] == TEAM_BALLAS) {
                SendClientMessage(i, COLOR_GOLD, string);
            }
            return 1;
        }
        return 0;
    }
     if(!strcmp(cmdtext,"/v", true,2)) {
        if(!strlen(cmdtext[2])) return SendClientMessage(playerid, 0xAFAFAFAA, "USAGE: /v [text] (lspd chat)");
        if(gTeam[playerid] != TEAM_VAGOS) return SendClientMessage(playerid, 0xAFAFAFAA, "You can't use this command !");
        new playername[MAX_PLAYER_NAME], string[128];
        GetPlayerName(playerid, playername, sizeof(playername));
        format(string, sizeof(string), "†Vago [%s]: %s,", playername, cmdtext[2]);
        for(new i = 0; i < MAX_PLAYERS; i++) {
// LSPD TEAM CHAT
            if(gTeam[i] == TEAM_VAGOS) {
                SendClientMessage(i, COLOR_GOLD, string);
            }
            return 1;
        }
        return 0;
    }
    if(!strcmp(cmdtext,"/m", true, 2)) {
        if(!strlen(cmdtext[2])) return SendClientMessage(playerid, 0xAFAFAFAA, "USAGE: /m [action] ");
        new playername[MAX_PLAYER_NAME], string[128];
        GetPlayerName(playerid, playername, sizeof(playername));
        format(string, sizeof(string), "* %s  %s,", playername, cmdtext[2]);
        for(new i = 0; i < MAX_PLAYERS; i++) {
            SendClientMessageToAll(COLOR_RED, string);

            return 1;
        }

        return 0;
    }

    if(!strcmp(cmdtext,"/x", true, 2)) {
        if(!strlen(cmdtext[2])) return SendClientMessage(playerid, 0xAFAFAFAA, "USAGE: /announce [text] ");
        new playername[MAX_PLAYER_NAME], string[128];
        GetPlayerName(playerid, playername, sizeof(playername));
        format(string, sizeof(string), "ADMIN: %s.",cmdtext[2]);
        if(pAdmin[playerid] >= 2) {
        for(new i = 0; i < MAX_PLAYERS; i++) {
            SendClientMessageToAll(COLOR_OKER, string);

            return 1;
        }

        return 1;
    }
}
     if(!strcmp(cmdtext,"/z", true,2)) {
        if(!strlen(cmdtext[2])) return SendClientMessage(playerid, 0xAFAFAFAA, "USAGE: /z [text] (aztecas chat)");
        if(gTeam[playerid] != TEAM_AZTECAS) return SendClientMessage(playerid, 0xAFAFAFAA, "You can't use this command !");
        new playername[MAX_PLAYER_NAME], string[128];
        GetPlayerName(playerid, playername, sizeof(playername));
        format(string, sizeof(string), "†Azteca [%s]: %s,", playername, cmdtext[2]);
        for(new i = 0; i < MAX_PLAYERS; i++) {
// LSPD TEAM CHAT
            if(gTeam[i] == TEAM_AZTECAS) {
                SendClientMessage(i, COLOR_GOLD, string);
            }
            return 1;
        }
        return 0;
    }
    if (strcmp("/rentgunhelp", cmdtext, true, 10) == 0) {
//Buygun
        if(PlayerToPoint(15.0, playerid, 1366.4325,-1275.2096,13.5469)) {
            SendClientMessage(playerid, COLOR_WHITE, "______† Weapons available to rent †______");
            SendClientMessage(playerid, COLOR_GREY, "[GUNS] /rentshotgun(shotgun), /rentspas12(combat shotgun), /rentak47(ak47");
            SendClientMessage(playerid, COLOR_GREY, "[GUNS] /rentm4(m4), /rentmp5(SMG/Mp5), /rentknife(knife), /rentbat(Bat)");
            SendClientMessage(playerid, COLOR_GREY, "[GUNS] /rentflower(flower), /rentarmor(revieves 50.0 armor)");
            return 1;
        }
        return 1;
    }
    if (strcmp("/rentmp5", cmdtext, true, 10) == 0) {
//Buygun
        if(PlayerToPoint(15.0, playerid, 1366.4325,-1275.2096,13.5469)) {

            SendClientMessage(playerid, COLOR_WHITE, "Jule_Pinehole: There you go sir, here's your weapon !");
            GivePlayerWeapon(playerid,29, 65000);
            SendClientMessage(playerid, COLOR_BLUELIGHTER, "† You have handed the Gun Seller $500, you have recieved a MP5 †");
            GivePlayerMoney(playerid, -400);
            return 1;
        }
        return 1;
    }
    if (strcmp("/rentshotgun", cmdtext, true, 10) == 0) {
//Buygun
        if(PlayerToPoint(15.0, playerid, 1366.4325,-1275.2096,13.5469)) {
            SendClientMessage(playerid, COLOR_WHITE, "Jule_Pinehole: There you go sir, here's your weapon !");
            GivePlayerWeapon(playerid,25, 65000);
            SendClientMessage(playerid, COLOR_BLUELIGHTER, "† You have handed the Gun Seller $500, you have recieved a SHOTGUN †");
            GivePlayerMoney(playerid, -500);
            return 1;
        }
        return 1;
    }
    if (strcmp("/rentspas12", cmdtext, true, 10) == 0) {
//Buygun
        if(PlayerToPoint(15.0, playerid, 1366.4325,-1275.2096,13.5469)) {
            SendClientMessage(playerid, COLOR_WHITE, "Jule_Pinehole: There you go sir, here's your weapon !");
            GivePlayerWeapon(playerid,27, 65000);
            SendClientMessage(playerid, COLOR_BLUELIGHTER, "† You have handed the Gun Seller $500, you have recieved a COMBAT SHOTGUN †");
            GivePlayerMoney(playerid, -500);
            return 1;
        }
        return 1;
    }
    if (strcmp("/rentm4", cmdtext, true, 10) == 0) {
//Buygun
        if(PlayerToPoint(15.0, playerid, 1366.4325,-1275.2096,13.5469)) {
            SendClientMessage(playerid, COLOR_WHITE, "Jule_Pinehole: There you go sir, here's your weapon !");
            GivePlayerWeapon(playerid,31, 65000);
            SendClientMessage(playerid, COLOR_BLUELIGHTER, "† You have handed the Gun Seller $500, you have recieved a M4 †");
            GivePlayerMoney(playerid, -500);
            return 1;
        }
        return 1;
    }
    if (strcmp("/rentarmor", cmdtext, true, 10) == 0) {
//Buygun
        if(PlayerToPoint(15.0, playerid, 1366.4325,-1275.2096,13.5469)) {
            SendClientMessage(playerid, COLOR_WHITE, "Jule_Pinehole: There you go sir, here's your vest !");
            SendClientMessage(playerid, COLOR_BLUELIGHTER, "† You have handed the Gun Seller $500, you have recieved a VEST †");
            GivePlayerMoney(playerid, -300);
            SetPlayerArmour(playerid,50);
            return 1;
        }
        return 1;
    }
    if (strcmp("/rentak47", cmdtext, true, 10) == 0) {
//Buygun
        if(PlayerToPoint(15.0, playerid, 1366.4325,-1275.2096,13.5469)) {
            SendClientMessage(playerid, COLOR_WHITE, "Jule_Pinehole: There you go sir, here's your weapon !");
            GivePlayerWeapon(playerid,30, 65000);
            SendClientMessage(playerid, COLOR_BLUELIGHTER, "† You have handed the Gun Seller $500, you have recieved a AK47 †");
            GivePlayerMoney(playerid, -500);

            return 1;
        }
        return 1;
    }
    if (strcmp("/rentbat", cmdtext, true, 10) == 0) {
//Buygun
        if(PlayerToPoint(15.0, playerid, 1366.4325,-1275.2096,13.5469)) {
            SendClientMessage(playerid, COLOR_WHITE, "Jule_Pinehole: There you go sir, here's your weapon !");
            GivePlayerWeapon(playerid,5, 1);
            SendClientMessage(playerid, COLOR_BLUELIGHTER, "† You have handed the Gun Seller $200, you have recieved a BAT †");
            GivePlayerMoney(playerid, -200);
            return 1;
        }

    }
    if (strcmp("/rentknife", cmdtext, true, 10) == 0) {
//Buygun
        if(PlayerToPoint(15.0, playerid, 1366.4325,-1275.2096,13.5469)) {
            SendClientMessage(playerid, COLOR_WHITE, "Jule_Pinehole: There you go sir, here's your weapon !");
            GivePlayerWeapon(playerid,4, 65000);
            SendClientMessage(playerid, COLOR_BLUELIGHTER, "† You have handed the Gun Seller $200, you have recieved a KNIFE †");
            GivePlayerMoney(playerid, -200);
            return 1;
        }

    }
    if (strcmp("/rentflower", cmdtext, true, 10) == 0) {
//Buygun
        if(PlayerToPoint(15.0, playerid, 1366.4325,-1275.2096,13.5469)) {
            SendClientMessage(playerid, COLOR_WHITE, "Jule_Pinehole: There you go sir, here's your weapon !");
            GivePlayerWeapon(playerid,14, 1);
            SendClientMessage(playerid, COLOR_BLUELIGHTER, "† You have handed the Gun Seller $200, you have recieved a FLOWER †");
            GivePlayerMoney(playerid, -200);
            return 1;
        }

    }
    if (strcmp("/rentknife", cmdtext, true, 10) == 0) {
//Buygun
        if(PlayerToPoint(15.0, playerid, 1366.4325,-1275.2096,13.5469)) {
            SendClientMessage(playerid, COLOR_WHITE, "Jule_Pinehole: There you go sir, here's your weapon !");
            GivePlayerWeapon(playerid,4, 65000);
            SendClientMessage(playerid, COLOR_BLUELIGHTER, "† You have handed the Gun Seller $200, you have recieved a KNIFE †");
            GivePlayerMoney(playerid, -200);
            return 1;
        }

    }
    if (strcmp("/rentflower", cmdtext, true, 10) == 0) {
//Buygun
        if(PlayerToPoint(15.0, playerid, 1366.4325,-1275.2096,13.5469)) {
            SendClientMessage(playerid, COLOR_WHITE, "Jule_Pinehole: There you go sir, here's your weapon !");
            GivePlayerWeapon(playerid,14, 1);
            SendClientMessage(playerid, COLOR_BLUELIGHTER, "† You have handed the Gun Seller $200, you have recieved a FLOWER †");
            GivePlayerMoney(playerid, -200);
            return 1;
        }

    }

    if (strcmp("/copduty", cmdtext, true, 10) == 0) {
        if(gTeam[playerid] == TEAM_GANGSTAS) {
            SendClientMessage(playerid, COLOR_RED, "You are not in the LSPD");
            return 0;
        }
        if(gTeam[playerid] == TEAM_VAGOS) {
            SendClientMessage(playerid, COLOR_RED, "You are not in the LSPD");
            return 0;
        }
        if(gTeam[playerid] == TEAM_BALLAS) {
            SendClientMessage(playerid, COLOR_RED, "You are not in the LSPD");
            return 0;
        }
        if(gTeam[playerid] == TEAM_AZTECAS) {
            SendClientMessage(playerid, COLOR_RED, "You are not in the LSPD");
            return 0;
        }
        if(gTeam[playerid] == TEAM_CIV) {
            SendClientMessage(playerid, COLOR_RED, "You are not in the LSPD, you are an civilian");
            return 0;
        }

        if(PlayerToPoint(15.0, playerid, 1538.7574,-1685.1531,13.5469)) {
            SendClientMessage(playerid, COLOR_BLUE, "† You are now on police duty †");
            SendClientMessage(playerid, COLOR_WHITE, "** use /policehelp for some police commands **");
            SetPlayerArmour(playerid, 100);
            return 1;
        }
        return 1;
    }
    if (strcmp("/policehelp", cmdtext, true, 10) == 0) {
        if(gTeam[playerid] == TEAM_GANGSTAS) {
            SendClientMessage(playerid, COLOR_RED, "You are not in the LSPD");
            return 0;
        }
        if(gTeam[playerid] == TEAM_VAGOS) {
            SendClientMessage(playerid, COLOR_RED, "You are not in the LSPD");
            return 0;
        }
        if(gTeam[playerid] == TEAM_BALLAS) {
            SendClientMessage(playerid, COLOR_RED, "You are not in the LSPD");
            return 0;
        }
        if(gTeam[playerid] == TEAM_AZTECAS) {
            SendClientMessage(playerid, COLOR_RED, "You are not in the LSPD");
            return 0;
        }
        if(gTeam[playerid] == TEAM_CIV) {
            SendClientMessage(playerid, COLOR_RED, "You are not in the LSPD, you are an civilian");
            return 0;
        }

        SendClientMessage(playerid, COLOR_WHITE, " ____† * Police Help † *____");
        SendClientMessage(playerid, COLOR_BLUE, "*You are part of the LSPD Organization your duty is to");
        SendClientMessage(playerid, COLOR_BLUE, "stop the gang wars in los santos/protect the innocent civilians that are in danger.");
        SendClientMessage(playerid, COLOR_BLUE, "The crime/death rate is very high because of gang violence in this city.");
        SendClientMessage(playerid, COLOR_BLUE, "There is an issue in the city of gangs killing each other over taking over turfs/hoods.");
        SendClientMessage(playerid, COLOR_BLUE, "you may go on cop duty by using (/copduty) you will recieve a vest and a deagle");
        SendClientMessage(playerid, COLOR_BLUE, "kill any gang member that is seen with a gun, civilians can be in serious danger.");
        SendClientMessage(playerid, COLOR_BLUE, "use (/d) to speak to the LSPD department *");
        return 1;
    }
    if (strcmp("/takecrack", cmdtext, true, 10) == 0) {
        new Float:PlayersArmour;
        GetPlayerArmour(playerid, PlayersArmour);

//Ryder's Drug house
        if(PlayerToPoint(30.0, playerid, 2454.717041,-1700.871582,1013.515197)) {
            SetPlayerArmour(playerid, PlayersArmour + 20.0);
            SendClientMessage(playerid, COLOR_FADE, "Ryder: Ey here's yo crack homie");
            ApplyAnimation(playerid,"FOOD","EAT_Burger",4.1,0,0,0,0,0);
            SendClientMessage(playerid, COLOR_BLUELIGHTER, "* You have gave $35 to Ryder, and used the crack.");
            GivePlayerMoney(playerid, -35);
            return 1;
        }
        SendClientMessage(playerid, COLOR_GREY, "You are not at the drug house ! use /housedrugplace to find it.");
        return 1;
    }
    if (strcmp("/takeweed", cmdtext, true, 10) == 0) {
        new Float:PlayersHealth;
        GetPlayerHealth(playerid, PlayersHealth);
//Ryder's Drug house
        if(PlayerToPoint(30.0, playerid, 2454.717041,-1700.871582,1013.515197)) {
            SetPlayerHealth(playerid, PlayersHealth + 20.0);
            SendClientMessage(playerid, COLOR_FADE, "Ryder: Ey here's yo weed homie");
            ApplyAnimation(playerid,"FOOD","EAT_Burger",4.1,0,0,0,0,0);
            SendClientMessage(playerid, COLOR_BLUELIGHTER, "* You have gave $35 to Ryder, and used the weed.");
            GivePlayerMoney(playerid, -35);
            return 1;
        }
        SendClientMessage(playerid, COLOR_GREY, "You are not at the drug house ! use /housedrugplace to find it.");
        return 1;
    }
    if (strcmp("/enter", cmdtext, true, 10) == 0) {
//crack den
        if(PlayerToPoint(15.0, playerid, 2352.0007,-1168.8942,27.9879)) {

//B'Dup interior
            SetPlayerPos(playerid,1527.229980,-11.574499,1002.097106);
            SetPlayerInterior(playerid, 3);
            return 1;
        }
//Sweets house
        else if(PlayerToPoint(3.0, playerid, 2523.0286,-1679.2728,15.4970)) {

//sweet interior
            SetPlayerPos(playerid,2527.654052,-1679.388305,1015.498596);
            SetPlayerInterior(playerid, 1);
            return 1;
        }
//Ryder's Drug house
        else if(PlayerToPoint(10.0, playerid, 2459.4539,-1690.9188,13.5453)) {

            SendClientMessage(playerid, COLOR_FADE, "Ryder: Who da' fuck in my house !?");
            SendClientMessage(playerid, COLOR_RED, "* Ryder grabs his bat");
            SendClientMessage(playerid, COLOR_WHITE, "___† Welcome to Ryder's Drug house you can use crack/pot you'll have to buy it †___");
            SendClientMessage(playerid, COLOR_GREY, "/takecrack(to use ryder's crack) /takeweed(to use ryder's weed)");
            SendClientMessage(playerid, COLOR_GREY, "[PRICE] Crack($40) Weed($35))");
// Ryder's interior
            SetPlayerPos(playerid,2454.717041,-1700.871582,1013.515197);
            SetPlayerInterior(playerid, 2);
            return 1;
        }
        //Snow Ball Fight enter
        else if(PlayerToPoint(5.0, playerid,2695.1841,-1704.2936,11.8438)) {

//Snow Ball fight
			SetPlayerPos(playerid,-729.276000,503.086944,1371.971801);//Liberty City Exterior
		 	SendClientMessage(playerid, COLOR_RED, "† You have have been taken to the SNOW AREA, make sure to stay where the snow is or you could get sick †");
			SetPlayerInterior(playerid, 1);
            return 1;
        }
//ballas hq
        else if(PlayerToPoint(3.0, playerid, 2231.7825,-1159.7080,25.8906)) {

//Ballas interior
            SetPlayerPos(playerid,318.564971,1118.209960,1083.882812);
            SetPlayerInterior(playerid, 5);
            return 1;
        }

        return 1;
    }

    if (strcmp("/exit", cmdtext, true, 10) == 0) {
//crack den
        if(PlayerToPoint(15.0, playerid, 1527.229980,-11.574499,1002.097106)) {

//B'Dup interior
            SetPlayerPos(playerid,2352.0007,-1168.8942,27.9879);
            SetPlayerInterior(playerid, 0);
            return 1;
        }
//SWEETS HOUSE EXIT
        else if(PlayerToPoint(15.0, playerid, 2527.654052,-1679.388305,1015.498596)) {

//sweets exit
            SetPlayerPos(playerid,2523.0286,-1679.2728,15.4970);
            SetPlayerInterior(playerid, 0);
            return 1;
        }
        //SNOW BALL FIGHT EXIT
        else if(PlayerToPoint(15.0, playerid,-729.276000,503.086944,1371.971801)) {

//SNOW BALL FIGHT
            SetPlayerPos(playerid,2695.1841,-1704.2936,11.8438);
            SendClientMessage(playerid, COLOR_RED, "† You have exited the snow ball fight area, you have been moved back to LS †");
            SetPlayerInterior(playerid, 0);
            return 1;
        }
//ryder's drug house exit
        else if(PlayerToPoint(15.0, playerid, 2454.717041,-1700.871582,1013.515197)) {

//Ryder's drug house exit
            SetPlayerPos(playerid,2459.4539,-1690.9188,13.5453);
            SetPlayerInterior(playerid, 0);
            return 1;
        }
//ballas hq exit
        else if(PlayerToPoint(15.0, playerid, 318.564971,1118.209960,1083.882812)) {

//Ballas interior
            SetPlayerPos(playerid,2231.7825,-1159.7080,25.8906);
            SetPlayerInterior(playerid, 0);
            return 1;
        }

        return 1;
    }

    return 0;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{

    return 1;
}


public OnPlayerExitVehicle(playerid, vehicleid)
{

    return 1;
}


public OnPlayerEnterCheckpoint(playerid)
{
    SendClientMessage(playerid, COLOR_BLUELIGHT, "† You have successfully reached your destination †");
    DisablePlayerCheckpoint(playerid);
    return 1;
}


public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(PlayerToPoint(3.0, playerid, 322.9717,-1773.7930,4.8277)) {
        GameTextForPlayer(playerid, "~r~/claimbeachboys ~w~ to claim beach boys turf", 5000, 3);
        return 1;
    }
    if(PlayerToPoint(3.0, playerid, 2219.5300,-1154.2638,26.2266)) {
        GameTextForPlayer(playerid, "~p~/claimballas ~w~ to claim ballas turf", 5000, 3);
        return 1;
    }
    if(PlayerToPoint(15.0, playerid, 2716.8638,-1150.8356,69.5781)) {
        GameTextForPlayer(playerid, "~y~/claimvagos ~w~ to claim vagos turf", 5000, 3);
        return 1;
    }
    if(PlayerToPoint(15.0, playerid, 1698.4174,-2098.8901,13.5469)) {
        GameTextForPlayer(playerid, "~b~/claimaztecas ~w~ to claim aztecas turf", 5000, 3);
        return 1;
    }
    if(PlayerToPoint(15.0, playerid, 1121.8634,-1203.0513,27.4792)) {
        GameTextForPlayer(playerid, "~g~/claimdowntown ~w~ to claim downtown", 5000, 3);
        return 1;
    }

    if(PlayerToPoint(15.0, playerid, 1538.7574,-1685.1531,13.5469)) {
        GameTextForPlayer(playerid, "~b~/copduty ~w~ to go on police duty", 5000, 3);
        return 1;
    }
    if(PlayerToPoint(15.0, playerid, 2352.0007,-1168.8942,27.9879)) {
        GameTextForPlayer(playerid, "~r~/enter~w~ to enter the crack house", 5000, 3);
        return 1;
    }
    if(PlayerToPoint(15.0, playerid, 1527.229980,-11.574499,1002.097106)) {
        GameTextForPlayer(playerid, "~r~/exit~w~ to exit the crack house", 5000, 3);
        return 1;
    }
    if(PlayerToPoint(3.0, playerid, 2231.7825,-1159.7080,25.8906)) {
        GameTextForPlayer(playerid, "~r~/enter~w~ to enter ballas hq", 5000, 3);
        return 1;
    }
    if(PlayerToPoint(15.0, playerid, 318.564971,1118.209960,1083.882812)) {
        GameTextForPlayer(playerid, "~r~/exit~w~ to exit ballas hq", 5000, 3);
        return 1;
    }
    if(PlayerToPoint(15.0, playerid, 927.0858,-1352.7571,13.3766)) {
        GameTextForPlayer(playerid, "~r~/enter~w~ to enter the food place", 5000, 3);
        return 1;
    }
    if(PlayerToPoint(15.0, playerid, -25.132598,-139.066986,1003.546875)) {
        GameTextForPlayer(playerid, "~r~/exit~w~ to exit the food place", 5000, 3);
        return 1;
    }

    if(PlayerToPoint(30.0, playerid, -729.276000,503.086944,1371.971801)) {
        GameTextForPlayer(playerid, "~r~/exit~w~ to exit snow arena", 5000, 3);
        return 1;
    }

    if(PlayerToPoint(15.0, playerid,2177.1697,-1666.6635,15.0859)) {
        GameTextForPlayer(playerid, "", 5000, 3);
        return 1;
    }

    if(PlayerToPoint(15.0, playerid,1778.2642,-2432.2908,13.5547)) {
        GameTextForPlayer(playerid, "~r~/jobpilot~g~ to take the job", 5000, 3);
        return 1;
    }

    if(PlayerToPoint(15.0, playerid, 1366.4325,-1275.2096,13.5469)) {
        GameTextForPlayer(playerid, "~r~/Find a gundealer for get a gun~w~ [GD] tag", 5000, 3);
        return 1;
    }

    if(PlayerToPoint(3.0, playerid, 2523.0286,-1679.2728,15.4970)) {
        GameTextForPlayer(playerid, "~r~/enter~w~ to enter sweets house", 5000, 3);
        return 1;
    }

    if(PlayerToPoint(3.0, playerid, 2527.654052,-1679.388305,1015.498596)) {
        GameTextForPlayer(playerid, "~r~/exit~w~ to exit sweets house", 5000, 3);
        return 1;
    }

    if(PlayerToPoint(15.0, playerid, 2454.717041,-1700.871582,1013.515197)) {
        GameTextForPlayer(playerid, "~b~/takecrack~w~ or ~b~/takeweed~w~ for drugs", 5000, 3);
        return 1;
    }

    if(PlayerToPoint(15.0, playerid, 2459.4539,-1690.9188,13.5453)) {
        GameTextForPlayer(playerid, "~b~Ryder's crack house~w~ use /enter to enter", 5000, 3);
        return 1;
    }
    return 1;
}


public PlayerToPoint(Float:radi, playerid, Float:x, Float:y, Float:z)
{
    new Float:oldposx, Float:oldposy, Float:oldposz;
    new Float:tempposx, Float:tempposy, Float:tempposz;
    GetPlayerPos(playerid, oldposx, oldposy, oldposz);
    tempposx = (oldposx -x);
    tempposy = (oldposy -y);
    tempposz = (oldposz -z);
    if (((tempposx < radi) && (tempposx > -radi)) && ((tempposy < radi) && (tempposy > -radi)) && ((tempposz < radi) && (tempposz > -radi))) {
        return 1;
    }
    return 0;
}
public Float:GetDistanceBetweenPlayers(p1,p2){
new Float:x1,Float:y1,Float:z1,Float:x2,Float:y2,Float:z2;
if (!IsPlayerConnected(p1) || !IsPlayerConnected(p2)){
return -1.00;
}
GetPlayerPos(p1,x1,y1,z1);
GetPlayerPos(p2,x2,y2,z2);
return floatsqroot(floatpower(floatabs(floatsub(x2,x1)),2)+floatpower(floatabs(floatsub(y2,y1)),2)+floatpower(floatabs(floatsub(z2,z1)),2));
}
Reply
#2

#pragma tabsize 0
Reply
#3

Where?
Reply
#4

bump
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)