SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 01/11/2011, 04:25 AM   #1
GAMER_PS2
Huge Clucker
 
GAMER_PS2's Avatar
 
Join Date: Aug 2011
Posts: 344
Reputation: 19
Red face Zone - /taketurf

well i made my gangwar gamemode but i need a take turf system
that when you kill 5 or 4 members on their zone the zone will be flash
please help me up

Please help me guys heres my Gamemode Code:

Code:
/*

                        Xteme Gangwar Gamemode v1.0
                        ---------------------------
                             Made by Mr.Kakashi
                    Associate with Wolf Pack Clan Management
                                Sponsors:
                        ---------------------------
                        SP Community Management
                        Wolf Pack Clan Community
                            TSU Community
                         Mr.Kakashi's Community
                        ---------------------------
                      Copyright(c), [SP]Mr.Kakashi[WP]

*/

//============================================================================//

#include <a_samp>
#include <streamer>
#include <zcmd>
#include <sscanf2>

//============================================================================//

#define RANDOM_MESSAGE_TIMER 100000

new messagenumber = 0;
new messages[][] =
{
    "Have Fun Playing With Your Friends Here in Xtreme Gangwar Server",
	"Read Rules, use /rules to read the rules",
    "use /report <Playername/ID> <Reason> if you saw a rule breaker",
    "Welcome To Xtreme Gangwar 0.3c Server",
    "Xtreme Gangwar was Develop after Xtreme Kakashi",
	"News Report: We are hiring admin level 5, Please ask Mr.Kakashi for more info",
    "News Report: Hiring administrator - Open",
    "Gamemode Credits to Mr.Kakashi"
};

//============================================================================//

new Tsec; //GameTime - Seconds
new THrs; //GameTime - Hours

//============================================================================//

#define GROVESHOP 199
#define BALLASSHOP 200
#define PISTOLS 201
#define EXPLOTION 202
#define SHOTGUN 203
#define RIFLES 204
#define OTHERWEAPS 205

//============================================================================//

forward SendMessages();
forward TimeU();
forward Unmute(playerid);
forward SpawnKillEnd(playerid);

//============================================================================//

new Language[MAX_PLAYERS] = 0; //Language Set to English - 1 for Tagalog/Filipino

//============================================================================//

new Text:Time;

new BallasShop;
new BallasPickup;

new Text3D:AFK[MAX_PLAYERS];

new Text:XGLogo;
new Text:TimeLeft;

new Text:BallasTittle;
new Text:BallasWeap1;
new Text:BallasWeap2;
new Text:BallasWeap3;
new Text:BallasWeap4;

new Text:GroveTittle;
new Text:GroveWeap1;
new Text:GroveWeap2;
new Text:GroveWeap3;
new Text:GroveWeap4;

new Text:VagosTittle;
new Text:VagosWeap1;
new Text:VagosWeap2;
new Text:VagosWeap3;
new Text:VagosWeap4;

//============================================================================//

#define white "{FFFFFF}"
#define red "{FF002B}"
#define pink "{FF00D9}"
#define purple "{DFA7F2}"
#define blue "{A1C2FF}"
#define green "{3DE3B1}"
#define yellow "{FAF623}"
#define black "{69670C}"
#define orange "{F2C80C}"
#define ice "{03F2FF}"
#define lime "{00FF40}"

#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_RED 0xFF0000FF
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_BLUE 0x0000BBAA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_DARKRED 0x660000AA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_BRIGHTRED 0xFF0000AA
#define COLOR_INDIGO 0x4B00B0AA
#define COLOR_VIOLET 0x9955DEEE
#define COLOR_LIGHTRED 0xFF99AADD
#define COLOR_SEAGREEN 0x00EEADDF
#define COLOR_GRAYWHITE 0xEEEEFFC4
#define COLOR_LIGHTNEUTRALBLUE 0xabcdef66
#define COLOR_GREENISHGOLD 0xCCFFDD56
#define COLOR_LIGHTBLUEGREEN 0x0FFDD349
#define COLOR_NEUTRALBLUE 0xABCDEF01
#define COLOR_LIGHTCYAN 0xAAFFCC33
#define COLOR_LEMON 0xDDDD2357
#define COLOR_MEDIUMBLUE 0x63AFF00A
#define COLOR_NEUTRAL 0xABCDEF97
#define COLOR_BLACK 0x00000000
#define COLOR_NEUTRALGREEN 0x81CFAB00
#define COLOR_DARKGREEN 0x12900BBF
#define COLOR_LIGHTGREEN 0x24FF0AB9
#define COLOR_DARKBLUE 0x300FFAAB
#define COLOR_BLUEGREEN 0x46BBAA00
#define COLOR_PINK 0xFF66FFAA
#define COLOR_LIGHTBLUE 0x33CCFFAA
#define COLOR_DARKRED 0x660000AA
#define COLOR_ORANGE 0xFF9900AA
#define COLOR_PURPLE 0x800080AA
#define COLOR_GRAD1 0xB4B5B7FF
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_RED1 0xFF0000AA
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_BROWN 0x993300AA
#define COLOR_CYAN 0x99FFFFAA
#define COLOR_TAN 0xFFFFCCAA
#define COLOR_PINK 0xFF66FFAA
#define COLOR_KHAKI 0x999900AA
#define COLOR_LIME 0x99FF00AA
#define COLOR_SYSTEM 0xEFEFF7AA
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_GRAD4 0xD8D8D8FF
#define COLOR_GRAD6 0xF0F0F0FF
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_GRAD3 0xCBCCCEFF
#define COLOR_GRAD5 0xE3E3E3FF
#define COLOR_GRAD1 0xB4B5B7FF

new BallasZone;
new BallasZone2;
new GroveZone;
new GroveZone2;
new VagosZone;
new VagosZone2;
new VagosZone3;
new AztecasZone;

//============================================================================//

new gTeam[MAX_PLAYERS];

#define TEAM_BALLAS 1
#define TEAM_GROVE 2
#define TEAM_VAGOS 3
#define TEAM_AZTECAS 4

//============================================================================//

new
    tempName[MAX_PLAYERS][24],
    oldName[MAX_PLAYERS][24]
;

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
	print("\n--------------------------------------");
	print("    Xtreme Gangwar V1.1 Beta Version    ");
	print("          Made By Mr.Kakashi            ");
	print("         via Xtreme Admin V4.0          ");
	print("--------------------------------------\n");
    return 1;
}

public OnFilterScriptExit()
{
    return 1;
}

#else

main()
{
	print("\n--------------------------------------");
	print("    Xtreme Gangwar V1.1 Beta Version    ");
	print("          Made By Mr.Kakashi            ");
	print("         via Xtreme Admin V4.0          ");
	print("--------------------------------------\n");
	
	printf("IN-GAME: Time Setting to 5:10AM");
}

#endif

public OnGameModeInit()
{
	SetTimer("SendMessages", RANDOM_MESSAGE_TIMER, true);

//============================================================================//

    BallasShop = CreateDynamicCP(1897.5182,-1738.0972,13.3725,2.0,0,0,0,50.0);

//============================================================================//

	BallasPickup = CreatePickup(1254,23,1914.0652,-1731.5297,13.4226,-1); //Ballas Take Turf Pickup

//============================================================================//

    TimeLeft = TextDrawCreate(12.000000,325.000000,"Time Left: 6:00");
    TextDrawAlignment(TimeLeft,0);
    TextDrawBackgroundColor(TimeLeft,0x000000ff);
    TextDrawFont(TimeLeft,3);
    TextDrawLetterSize(TimeLeft,0.499999,1.300000);
    TextDrawColor(TimeLeft,0xff0000ff);
    TextDrawSetOutline(TimeLeft,1);
    TextDrawSetProportional(TimeLeft,1);
    TextDrawSetShadow(TimeLeft,1);

//============================================================================//

    Time = TextDrawCreate(549.000000,22.000000,"05:10");
    TextDrawColor(Time, COLOR_WHITE);
    TextDrawBackgroundColor(Time,0x000000ff);
    TextDrawFont(Time,3);
    TextDrawLetterSize(Time,0.599999,1.800000);
    TextDrawColor(Time,0xffffffff);
    TextDrawSetOutline(Time,1);
    TextDrawSetProportional(Time,1);
    TextDrawSetShadow(Time,5);
    Tsec= 10;
    THrs= 5;
    SetTimer("TimeU",1000,true);

//============================================================================//

	XGLogo = TextDrawCreate(12.000000,430.000000,"Xtreme Gangwar");
    TextDrawAlignment(XGLogo,0);
    TextDrawBackgroundColor(XGLogo,0xffff00ff);
    TextDrawFont(XGLogo,2);
    TextDrawLetterSize(XGLogo,0.499999,1.200000);
    TextDrawColor(XGLogo,0xff0000ff);
    TextDrawSetOutline(XGLogo,1);
    TextDrawSetProportional(XGLogo,1);
    TextDrawSetShadow(XGLogo,1);

//============================================================================//

	BallasTittle = TextDrawCreate(85.000000,168.000000,"BALLAS:");
    BallasWeap1 = TextDrawCreate(57.000000,207.000000,"1. Baseball Bat");
    BallasWeap2 = TextDrawCreate(57.000000,224.000000,"2. 9mm");
    BallasWeap3 = TextDrawCreate(58.000000,244.000000,"3. Tec9");
    BallasWeap4 = TextDrawCreate(59.000000,265.000000,"4. M4");
    TextDrawAlignment(GroveTittle,0);
    TextDrawAlignment(BallasWeap1,0);
    TextDrawAlignment(BallasWeap2,0);
    TextDrawAlignment(BallasWeap3,0);
    TextDrawAlignment(BallasWeap4,0);
    TextDrawBackgroundColor(BallasTittle,0x000000ff);
    TextDrawBackgroundColor(BallasWeap1,0x000000ff);
    TextDrawBackgroundColor(BallasWeap2,0x000000ff);
    TextDrawBackgroundColor(BallasWeap3,0x000000ff);
    TextDrawBackgroundColor(BallasWeap4,0x000000ff);
    TextDrawFont(BallasTittle,3);
    TextDrawLetterSize(BallasTittle,1.000000,2.000000);
    TextDrawFont(BallasWeap1,3);
    TextDrawLetterSize(BallasWeap1,0.599999,1.300000);
    TextDrawFont(BallasWeap2,3);
    TextDrawLetterSize(BallasWeap2,0.599999,1.400000);
    TextDrawFont(BallasWeap3,3);
    TextDrawLetterSize(BallasWeap3,0.599999,1.400000);
    TextDrawFont(BallasWeap4,3);
    TextDrawLetterSize(BallasWeap4,0.599999,1.400000);
    TextDrawColor(BallasTittle,0xff00ff66);
    TextDrawColor(BallasWeap1,0xffffffff);
    TextDrawColor(BallasWeap2,0xffffffff);
    TextDrawColor(BallasWeap3,0xffffffff);
    TextDrawColor(BallasWeap4,0xffffffff);
    TextDrawSetOutline(BallasTittle,1);
    TextDrawSetOutline(BallasWeap1,1);
    TextDrawSetOutline(BallasWeap2,1);
    TextDrawSetOutline(BallasWeap3,1);
    TextDrawSetOutline(BallasWeap4,1);
    TextDrawSetProportional(BallasTittle,1);
    TextDrawSetProportional(BallasWeap1,1);
    TextDrawSetProportional(BallasWeap2,1);
    TextDrawSetProportional(BallasWeap3,1);
    TextDrawSetProportional(BallasWeap4,1);
    TextDrawSetShadow(BallasTittle,1);
    TextDrawSetShadow(BallasWeap1,1);
    TextDrawSetShadow(BallasWeap2,1);
    TextDrawSetShadow(BallasWeap3,1);
    TextDrawSetShadow(BallasWeap4,1);

//============================================================================//

    GroveTittle = TextDrawCreate(87.000000,170.000000,"Grove:");
    GroveWeap1 = TextDrawCreate(57.000000,207.000000,"1. Baseball Bat");
    GroveWeap2 = TextDrawCreate(57.000000,225.000000,"2. Desert Eagle");
    GroveWeap3 = TextDrawCreate(57.000000,245.000000,"3. MP5");
    GroveWeap4 = TextDrawCreate(57.000000,266.000000,"4. AK-47");
    TextDrawAlignment(GroveTittle,0);
    TextDrawAlignment(GroveWeap1,0);
    TextDrawAlignment(GroveWeap2,0);
    TextDrawAlignment(GroveWeap3,0);
    TextDrawAlignment(GroveWeap4,0);
    TextDrawBackgroundColor(GroveTittle,0x000000ff);
    TextDrawBackgroundColor(GroveWeap1,0x000000ff);
    TextDrawBackgroundColor(GroveWeap2,0x000000ff);
    TextDrawBackgroundColor(GroveWeap3,0x000000ff);
    TextDrawBackgroundColor(GroveWeap4,0x000000ff);
    TextDrawFont(GroveTittle,3);
    TextDrawLetterSize(GroveTittle,0.899999,1.500000);
    TextDrawFont(GroveWeap1,3);
    TextDrawLetterSize(GroveWeap1,0.599999,1.200000);
    TextDrawFont(GroveWeap2,3);
    TextDrawLetterSize(GroveWeap2,0.599999,1.300000);
    TextDrawFont(GroveWeap3,3);
    TextDrawLetterSize(GroveWeap3,0.699999,1.200000);
    TextDrawFont(GroveWeap4,3);
    TextDrawLetterSize(GroveWeap4,0.699999,1.200000);
    TextDrawColor(GroveTittle,0x00ff0099);
    TextDrawColor(GroveWeap1,0xffffffff);
    TextDrawColor(GroveWeap2,0xffffffff);
    TextDrawColor(GroveWeap3,0xffffffff);
    TextDrawColor(GroveWeap4,0xffffffff);
    TextDrawSetOutline(GroveTittle,1);
    TextDrawSetOutline(GroveWeap1,1);
    TextDrawSetOutline(GroveWeap2,1);
    TextDrawSetOutline(GroveWeap3,1);
    TextDrawSetOutline(GroveWeap4,1);
    TextDrawSetProportional(GroveTittle,1);
    TextDrawSetProportional(GroveWeap1,1);
    TextDrawSetProportional(GroveWeap2,1);
    TextDrawSetProportional(GroveWeap3,1);
    TextDrawSetProportional(GroveWeap4,1);
    TextDrawSetShadow(GroveTittle,1);
    TextDrawSetShadow(GroveWeap1,1);
    TextDrawSetShadow(GroveWeap2,1);
    TextDrawSetShadow(GroveWeap3,1);
    TextDrawSetShadow(GroveWeap4,1);

//============================================================================//

    VagosTittle = TextDrawCreate(83.000000,170.000000,"VAGOS:");
    VagosWeap1 = TextDrawCreate(58.000000,200.000000,"1. Baseball Bat");
    VagosWeap2 = TextDrawCreate(58.000000,215.000000,"2. 9mm");
    VagosWeap3 = TextDrawCreate(58.000000,230.000000,"3. Micro SMG");
    VagosWeap4 = TextDrawCreate(58.000000,248.000000,"4. M4");
    TextDrawAlignment(VagosTittle,0);
    TextDrawAlignment(VagosWeap1,0);
    TextDrawAlignment(VagosWeap2,0);
    TextDrawAlignment(VagosWeap3,0);
    TextDrawAlignment(VagosWeap4,0);
    TextDrawBackgroundColor(VagosTittle,0x000000ff);
    TextDrawBackgroundColor(VagosWeap1,0x000000ff);
    TextDrawBackgroundColor(VagosWeap2,0x000000ff);
    TextDrawBackgroundColor(VagosWeap3,0x000000ff);
    TextDrawBackgroundColor(VagosWeap4,0x000000ff);
    TextDrawFont(VagosTittle,3);
    TextDrawLetterSize(VagosTittle,1.100000,1.300000);
    TextDrawFont(VagosWeap1,3);
    TextDrawLetterSize(VagosWeap1,0.599999,1.200000);
    TextDrawFont(VagosWeap2,3);
    TextDrawLetterSize(VagosWeap2,0.599999,1.300000);
    TextDrawFont(VagosWeap3,3);
    TextDrawLetterSize(VagosWeap3,0.599999,1.400000);
    TextDrawFont(VagosWeap4,3);
    TextDrawLetterSize(VagosWeap4,0.599999,1.600000);
    TextDrawColor(VagosTittle,0xffff00ff);
    TextDrawColor(VagosWeap1,0xffffffff);
    TextDrawColor(VagosWeap2,0xffffffff);
    TextDrawColor(VagosWeap3,0xffffffff);
    TextDrawColor(VagosWeap4,0xffffffff);
    TextDrawSetOutline(VagosTittle,1);
    TextDrawSetOutline(VagosWeap1,1);
    TextDrawSetOutline(VagosWeap2,1);
    TextDrawSetOutline(VagosWeap3,1);
    TextDrawSetOutline(VagosWeap4,1);
    TextDrawSetProportional(VagosTittle,1);
    TextDrawSetProportional(VagosWeap1,1);
    TextDrawSetProportional(VagosWeap2,1);
    TextDrawSetProportional(VagosWeap3,1);
    TextDrawSetProportional(VagosWeap4,1);
    TextDrawSetShadow(VagosTittle,1);
    TextDrawSetShadow(VagosWeap1,1);
    TextDrawSetShadow(VagosWeap2,1);
    TextDrawSetShadow(VagosWeap3,1);
    TextDrawSetShadow(VagosWeap4,1);

//============================================================================//

	BallasZone = GangZoneCreate(1562.621093, -2124.146484, 2162.621093, -1308.146606);
	BallasZone2 = GangZoneCreate(1708.194702, -1319.503784, 2044.194702, -1023.503784);
	GroveZone = GangZoneCreate(2115.327392, -2124.709228, 2635.327392, -1308.709228);
	GroveZone2 = GangZoneCreate(116.996643, -2080.389160, 996.996643, -1304.389282);
	VagosZone = GangZoneCreate(2627.125488, -2130.772460, 2947.125488, -1306.772460);
	VagosZone2 = GangZoneCreate(2255.206787, -1319.006591, 2951.206787, -1015.006591);
	VagosZone3 = GangZoneCreate(2044.384521, -1330.055908, 2268.384521, -946.055847);
	AztecasZone = GangZoneCreate(970.140502, -2139.669433, 1602.140502, -1307.669433);

//============================================================================//

    DisableInteriorEnterExits();
	SetGameModeText("Xtreme Gangwar V1");
    EnableStuntBonusForAll(0);
	SendRconCommand("mapname Gangwar World");
    UsePlayerPedAnims();

//============================================================================//

	AddPlayerClass(102,1921.1899,-1738.8744,13.5469,90.1317,32,1000,22,1000,31,1000); //TEAM BALLAS
    AddPlayerClass(103,1921.1899,-1738.8744,13.5469,90.1317,32,1000,22,1000,31,1000); //TEAM BALLAS
    AddPlayerClass(104,1921.1899,-1738.8744,13.5469,90.1317,32,1000,22,1000,31,1000); //TEAM BALLAS
    AddPlayerClass(0,2518.8889,-1684.6166,13.4648,45.1893,29,1000,24,1000,30,1000); //TEAM GROVE
    AddPlayerClass(269,2518.8889,-1684.6166,13.4648,45.1893,29,1000,24,1000,30,1000); //TEAM GROVE
    AddPlayerClass(270,2518.8889,-1684.6166,13.4648,45.1893,29,1000,24,1000,30,1000); //TEAM GROVE
    AddPlayerClass(271,2518.8889,-1684.6166,13.4648,45.1893,29,1000,24,1000,30,1000); //TEAM GROVE
	AddPlayerClass(105,2518.8889,-1684.6166,13.4648,45.1893,29,1000,24,1000,30,1000); //TEAM GROVE
    AddPlayerClass(106,2518.8889,-1684.6166,13.4648,45.1893,29,1000,24,1000,30,1000); //TEAM GROVE
    AddPlayerClass(107,2518.8889,-1684.6166,13.4648,45.1893,29,1000,24,1000,30,1000); //TEAM GROVE
    AddPlayerClass(108,2668.0208,-1458.2025,30.5491,258.0261,28,1000,22,1000,31,1000); //TEAM VAGOS
    AddPlayerClass(109,2668.0208,-1458.2025,30.5491,258.0261,28,1000,22,1000,31,1000); //TEAM VAGOS
    AddPlayerClass(110,2668.0208,-1458.2025,30.5491,258.0261,28,1000,22,1000,31,1000); //TEAM VAGOS
    AddPlayerClass(114,1377.3564,-1885.7467,13.4896,357.3209,28,1000,24,1000,30,1000); //TEAM AZTECAS
    AddPlayerClass(115,1377.3564,-1885.7467,13.4896,357.3209,28,1000,24,1000,30,1000); //TEAM AZTECAS
    AddPlayerClass(116,1377.3564,-1885.7467,13.4896,357.3209,28,1000,24,1000,30,1000); //TEAM AZTECAS
	return 1;
}

public OnGameModeExit()
{
	return 1;
}

public OnPlayerRequestClass(playerid, classid)
{
    PlayerPlaySound(playerid, 1185,-119.9460,23.1096,12.2238);
	switch (classid)
    {
        case 0:
        {
            SetPlayerTeam(playerid,TEAM_BALLAS);
			SetPlayerInterior(playerid, 0);
			SetPlayerPos(playerid, 1873.4159,-1742.0531,13.5369);
            SetPlayerFacingAngle(playerid, 178);
            SetPlayerCameraLookAt(playerid,1873.4159,-1742.0531,13.5369);
            SetPlayerCameraPos(playerid, 1873.1909,-1746.9408,13.5469);
			SetPlayerColor(playerid, COLOR_VIOLET);
			TextDrawHideForPlayer(playerid, GroveTittle);
            TextDrawHideForPlayer(playerid, GroveWeap1);
            TextDrawHideForPlayer(playerid, GroveWeap2);
            TextDrawHideForPlayer(playerid, GroveWeap3);
            TextDrawHideForPlayer(playerid, GroveWeap4);
			TextDrawShowForPlayer(playerid, BallasTittle);
            TextDrawShowForPlayer(playerid, BallasWeap1);
            TextDrawShowForPlayer(playerid, BallasWeap2);
            TextDrawShowForPlayer(playerid, BallasWeap3);
            TextDrawShowForPlayer(playerid, BallasWeap4);
		}
        case 1:
        {
			SetPlayerTeam(playerid,TEAM_BALLAS);
			SetPlayerInterior(playerid, 0);
			SetPlayerPos(playerid, 1873.4159,-1742.0531,13.5369);
            SetPlayerFacingAngle(playerid, 178);
            SetPlayerCameraLookAt(playerid,1873.4159,-1742.0531,13.5369);
            SetPlayerCameraPos(playerid, 1873.1909,-1746.9408,13.5469);
			SetPlayerColor(playerid, COLOR_VIOLET);
			TextDrawHideForPlayer(playerid, GroveTittle);
            TextDrawHideForPlayer(playerid, GroveWeap1);
            TextDrawHideForPlayer(playerid, GroveWeap2);
            TextDrawHideForPlayer(playerid, GroveWeap3);
            TextDrawHideForPlayer(playerid, GroveWeap4);
			TextDrawShowForPlayer(playerid, BallasTittle);
            TextDrawShowForPlayer(playerid, BallasWeap1);
            TextDrawShowForPlayer(playerid, BallasWeap2);
            TextDrawShowForPlayer(playerid, BallasWeap3);
            TextDrawShowForPlayer(playerid, BallasWeap4);
		}
        case 2:
        {
            SetPlayerTeam(playerid,TEAM_BALLAS);
			SetPlayerInterior(playerid, 0);
			SetPlayerPos(playerid, 1873.4159,-1742.0531,13.5369);
            SetPlayerFacingAngle(playerid, 178);
            SetPlayerCameraLookAt(playerid,1873.4159,-1742.0531,13.5369);
            SetPlayerCameraPos(playerid, 1873.1909,-1746.9408,13.5469);
			SetPlayerColor(playerid, COLOR_VIOLET);
			TextDrawHideForPlayer(playerid, GroveTittle);
            TextDrawHideForPlayer(playerid, GroveWeap1);
            TextDrawHideForPlayer(playerid, GroveWeap2);
            TextDrawHideForPlayer(playerid, GroveWeap3);
            TextDrawHideForPlayer(playerid, GroveWeap4);
			TextDrawShowForPlayer(playerid, BallasTittle);
            TextDrawShowForPlayer(playerid, BallasWeap1);
            TextDrawShowForPlayer(playerid, BallasWeap2);
            TextDrawShowForPlayer(playerid, BallasWeap3);
            TextDrawShowForPlayer(playerid, BallasWeap4);
		}
        case 3:
        {
            SetPlayerTeam(playerid,TEAM_GROVE);
			SetPlayerInterior(playerid, 0);
			SetPlayerPos(playerid,2514.7634,-1674.0188,13.6850);
            SetPlayerFacingAngle(playerid,58);
            SetPlayerCameraLookAt(playerid,2514.7634,-1674.0188,13.6850);
            SetPlayerCameraPos(playerid, 2510.9666,-1671.9692,13.4391);
			SetPlayerColor(playerid, COLOR_GREEN);
			TextDrawHideForPlayer(playerid, BallasTittle);
            TextDrawHideForPlayer(playerid, BallasWeap1);
            TextDrawHideForPlayer(playerid, BallasWeap2);
            TextDrawHideForPlayer(playerid, BallasWeap3);
            TextDrawHideForPlayer(playerid, BallasWeap4);
            TextDrawShowForPlayer(playerid, GroveTittle);
            TextDrawShowForPlayer(playerid, GroveWeap1);
            TextDrawShowForPlayer(playerid, GroveWeap2);
            TextDrawShowForPlayer(playerid, GroveWeap3);
            TextDrawShowForPlayer(playerid, GroveWeap4);
		}
        case 4:
        {
            SetPlayerTeam(playerid,TEAM_GROVE);
			SetPlayerInterior(playerid, 0);
			SetPlayerPos(playerid,2514.7634,-1674.0188,13.6850);
            SetPlayerFacingAngle(playerid,58);
            SetPlayerCameraLookAt(playerid,2514.7634,-1674.0188,13.6850);
            SetPlayerCameraPos(playerid, 2510.9666,-1671.9692,13.4391);
			SetPlayerColor(playerid, COLOR_GREEN);
			TextDrawShowForPlayer(playerid, GroveTittle);
            TextDrawShowForPlayer(playerid, GroveWeap1);
            TextDrawShowForPlayer(playerid, GroveWeap2);
            TextDrawShowForPlayer(playerid, GroveWeap3);
            TextDrawShowForPlayer(playerid, GroveWeap4);
		}
        case 5:
        {
            SetPlayerTeam(playerid,TEAM_GROVE);
			SetPlayerInterior(playerid, 0);
			SetPlayerPos(playerid,2514.7634,-1674.0188,13.6850);
            SetPlayerFacingAngle(playerid,58);
            SetPlayerCameraLookAt(playerid,2514.7634,-1674.0188,13.6850);
            SetPlayerCameraPos(playerid, 2510.9666,-1671.9692,13.4391);
			SetPlayerColor(playerid, COLOR_GREEN);
			TextDrawShowForPlayer(playerid, GroveTittle);
            TextDrawShowForPlayer(playerid, GroveWeap1);
            TextDrawShowForPlayer(playerid, GroveWeap2);
            TextDrawShowForPlayer(playerid, GroveWeap3);
            TextDrawShowForPlayer(playerid, GroveWeap4);
		}
        case 6:
        {
            SetPlayerTeam(playerid,TEAM_GROVE);
			SetPlayerInterior(playerid, 0);
			SetPlayerPos(playerid,2514.7634,-1674.0188,13.6850);
            SetPlayerFacingAngle(playerid,58);
            SetPlayerCameraLookAt(playerid,2514.7634,-1674.0188,13.6850);
            SetPlayerCameraPos(playerid, 2510.9666,-1671.9692,13.4391);
			SetPlayerColor(playerid, COLOR_GREEN);
			TextDrawShowForPlayer(playerid, GroveTittle);
            TextDrawShowForPlayer(playerid, GroveWeap1);
            TextDrawShowForPlayer(playerid, GroveWeap2);
            TextDrawShowForPlayer(playerid, GroveWeap3);
            TextDrawShowForPlayer(playerid, GroveWeap4);
		}
        case 7:
        {
            SetPlayerTeam(playerid,TEAM_GROVE);
			SetPlayerInterior(playerid, 0);
			SetPlayerPos(playerid,2514.7634,-1674.0188,13.6850);
            SetPlayerFacingAngle(playerid,58);
            SetPlayerCameraLookAt(playerid,2514.7634,-1674.0188,13.6850);
            SetPlayerCameraPos(playerid, 2510.9666,-1671.9692,13.4391);
			SetPlayerColor(playerid, COLOR_GREEN);
			TextDrawShowForPlayer(playerid, GroveTittle);
            TextDrawShowForPlayer(playerid, GroveWeap1);
            TextDrawShowForPlayer(playerid, GroveWeap2);
            TextDrawShowForPlayer(playerid, GroveWeap3);
            TextDrawShowForPlayer(playerid, GroveWeap4);
		}
        case 8:
        {
            SetPlayerTeam(playerid,TEAM_GROVE);
			SetPlayerInterior(playerid, 0);
			SetPlayerPos(playerid,2514.7634,-1674.0188,13.6850);
            SetPlayerFacingAngle(playerid,58);
            SetPlayerCameraLookAt(playerid,2514.7634,-1674.0188,13.6850);
            SetPlayerCameraPos(playerid, 2510.9666,-1671.9692,13.4391);
			SetPlayerColor(playerid, COLOR_GREEN);
			TextDrawShowForPlayer(playerid, GroveTittle);
            TextDrawShowForPlayer(playerid, GroveWeap1);
            TextDrawShowForPlayer(playerid, GroveWeap2);
            TextDrawShowForPlayer(playerid, GroveWeap3);
            TextDrawShowForPlayer(playerid, GroveWeap4);
		}
        case 9:
        {
            SetPlayerTeam(playerid,TEAM_GROVE);
			SetPlayerInterior(playerid, 0);
			SetPlayerPos(playerid,2514.7634,-1674.0188,13.6850);
            SetPlayerFacingAngle(playerid,58);
            SetPlayerCameraLookAt(playerid,2514.7634,-1674.0188,13.6850);
            SetPlayerCameraPos(playerid, 2510.9666,-1671.9692,13.4391);
			SetPlayerColor(playerid, COLOR_GREEN);
			TextDrawHideForPlayer(playerid, VagosTittle);
            TextDrawHideForPlayer(playerid, VagosWeap1);
            TextDrawHideForPlayer(playerid, VagosWeap2);
            TextDrawHideForPlayer(playerid, VagosWeap3);
            TextDrawHideForPlayer(playerid, VagosWeap4);
			TextDrawShowForPlayer(playerid, GroveTittle);
            TextDrawShowForPlayer(playerid, GroveWeap1);
            TextDrawShowForPlayer(playerid, GroveWeap2);
            TextDrawShowForPlayer(playerid, GroveWeap3);
            TextDrawShowForPlayer(playerid, GroveWeap4);
		}
        case 10:
        {
            SetPlayerTeam(playerid,TEAM_VAGOS);
			SetPlayerInterior(playerid, 0);
			SetPlayerPos(playerid,2653.2732,-1414.9834,30.2881);
            SetPlayerFacingAngle(playerid,28);
            SetPlayerCameraLookAt(playerid,2653.2732,-1414.9834,30.2881);
            SetPlayerCameraPos(playerid, 2650.7900,-1411.3993,30.4611);
            TextDrawHideForPlayer(playerid, GroveTittle);
            TextDrawHideForPlayer(playerid, GroveWeap1);
            TextDrawHideForPlayer(playerid, GroveWeap2);
            TextDrawHideForPlayer(playerid, GroveWeap3);
            TextDrawHideForPlayer(playerid, GroveWeap4);
			TextDrawShowForPlayer(playerid, VagosTittle);
            TextDrawShowForPlayer(playerid, VagosWeap1);
            TextDrawShowForPlayer(playerid, VagosWeap2);
            TextDrawShowForPlayer(playerid, VagosWeap3);
            TextDrawShowForPlayer(playerid, VagosWeap4);
			SetPlayerColor(playerid, COLOR_YELLOW);
		}
        case 11:
        {
            SetPlayerTeam(playerid,TEAM_VAGOS);
			SetPlayerInterior(playerid, 0);
			SetPlayerPos(playerid,2653.2732,-1414.9834,30.2881);
            SetPlayerFacingAngle(playerid,28);
            SetPlayerCameraLookAt(playerid,2653.2732,-1414.9834,30.2881);
            SetPlayerCameraPos(playerid, 2650.7900,-1411.3993,30.4611);
			TextDrawShowForPlayer(playerid, VagosTittle);
            TextDrawShowForPlayer(playerid, VagosWeap1);
            TextDrawShowForPlayer(playerid, VagosWeap2);
            TextDrawShowForPlayer(playerid, VagosWeap3);
            TextDrawShowForPlayer(playerid, VagosWeap4);
			SetPlayerColor(playerid, COLOR_YELLOW);
		}
        case 12:
        {
            SetPlayerTeam(playerid,TEAM_VAGOS);
			SetPlayerInterior(playerid, 0);
			SetPlayerPos(playerid,2653.2732,-1414.9834,30.2881);
            SetPlayerFacingAngle(playerid,28);
            SetPlayerCameraLookAt(playerid,2653.2732,-1414.9834,30.2881);
			SetPlayerCameraPos(playerid, 2650.7900,-1411.3993,30.4611);
			TextDrawShowForPlayer(playerid, VagosTittle);
            TextDrawShowForPlayer(playerid, VagosWeap1);
            TextDrawShowForPlayer(playerid, VagosWeap2);
            TextDrawShowForPlayer(playerid, VagosWeap3);
            TextDrawShowForPlayer(playerid, VagosWeap4);
			SetPlayerColor(playerid, COLOR_YELLOW);
			PlayerPlaySound(playerid, 1185,-119.9460,23.1096,12.2238);
		}
        case 13:
        {
            SetPlayerTeam(playerid,TEAM_AZTECAS);
			SetPlayerInterior(playerid, 0);
			SetPlayerPos(playerid,1224.0836,-1816.8625,16.5938);
            SetPlayerFacingAngle(playerid,179);
            SetPlayerCameraLookAt(playerid,1224.0836,-1816.8625,16.5938);
            SetPlayerCameraPos(playerid,1224.0361,-1819.6283,15.3981);
			SetPlayerColor(playerid, COLOR_LIGHTBLUE);
			TextDrawHideForPlayer(playerid, BallasTittle);
            TextDrawHideForPlayer(playerid, BallasWeap1);
            TextDrawHideForPlayer(playerid, BallasWeap2);
            TextDrawHideForPlayer(playerid, BallasWeap3);
            TextDrawHideForPlayer(playerid, BallasWeap4);
			TextDrawHideForPlayer(playerid, VagosTittle);
            TextDrawHideForPlayer(playerid, VagosWeap1);
            TextDrawHideForPlayer(playerid, VagosWeap2);
            TextDrawHideForPlayer(playerid, VagosWeap3);
            TextDrawHideForPlayer(playerid, VagosWeap4);
		}
        case 14:
        {
            SetPlayerTeam(playerid,TEAM_AZTECAS);
			SetPlayerInterior(playerid, 0);
			SetPlayerPos(playerid,1224.0836,-1816.8625,16.5938);
            SetPlayerFacingAngle(playerid,179);
            SetPlayerCameraLookAt(playerid,1224.0836,-1816.8625,16.5938);
            SetPlayerCameraPos(playerid,1224.0361,-1819.6283,15.3981);
			SetPlayerColor(playerid, COLOR_LIGHTBLUE);
			TextDrawHideForPlayer(playerid, BallasTittle);
            TextDrawHideForPlayer(playerid, BallasWeap1);
            TextDrawHideForPlayer(playerid, BallasWeap2);
            TextDrawHideForPlayer(playerid, BallasWeap3);
            TextDrawHideForPlayer(playerid, BallasWeap4);
			TextDrawHideForPlayer(playerid, VagosTittle);
            TextDrawHideForPlayer(playerid, VagosWeap1);
            TextDrawHideForPlayer(playerid, VagosWeap2);
            TextDrawHideForPlayer(playerid, VagosWeap3);
            TextDrawHideForPlayer(playerid, VagosWeap4);
		}
        case 15:
        {
            SetPlayerTeam(playerid,TEAM_AZTECAS);
			SetPlayerInterior(playerid, 0);
			SetPlayerPos(playerid,1224.0836,-1816.8625,16.5938);
            SetPlayerFacingAngle(playerid,179);
            SetPlayerCameraLookAt(playerid,1224.0836,-1816.8625,16.5938);
            SetPlayerCameraPos(playerid,1224.0361,-1819.6283,15.3981);
			SetPlayerColor(playerid, COLOR_LIGHTBLUE);
		    TextDrawHideForPlayer(playerid, BallasTittle);
            TextDrawHideForPlayer(playerid, BallasWeap1);
            TextDrawHideForPlayer(playerid, BallasWeap2);
            TextDrawHideForPlayer(playerid, BallasWeap3);
            TextDrawHideForPlayer(playerid, BallasWeap4);
			TextDrawHideForPlayer(playerid, VagosTittle);
            TextDrawHideForPlayer(playerid, VagosWeap1);
            TextDrawHideForPlayer(playerid, VagosWeap2);
            TextDrawHideForPlayer(playerid, VagosWeap3);
            TextDrawHideForPlayer(playerid, VagosWeap4);
			PlayerPlaySound(playerid, 1185,-119.9460,23.1096,12.2238);
		}
	}
    SetPlayerTeamFromClass(playerid, classid);
	return 1;
}

SetPlayerTeamFromClass(playerid, classid)
{
	if(classid == TEAM_BALLAS)
	{
		gTeam[playerid] = TEAM_BALLAS;
	}
	else if (classid == TEAM_GROVE)
	{
		gTeam[playerid] = TEAM_GROVE;
	}
	else if (classid == TEAM_VAGOS)
	{
		gTeam[playerid] = TEAM_VAGOS;
	}
	else if (classid == TEAM_AZTECAS)
	{
		gTeam[playerid] = TEAM_AZTECAS;
	}
}

public SendMessages()
{
    if(messagenumber == sizeof(messages)) messagenumber = 0;
    SendClientMessageToAll(COLOR_YELLOW, messages[messagenumber]);
    messagenumber ++;
    return 1;
}

public OnPlayerConnect(playerid)
{
    SendClientMessage(playerid, COLOR_YELLOW, "Welcome To Xtreme Gangwar Server");
    SendClientMessage(playerid, COLOR_YELLOW, "Use /cmds for available commmands!");
    SendClientMessage(playerid, COLOR_YELLOW, "Have fun Playing with Your Friends!");
    SendClientMessage(playerid, COLOR_WHITE, "The Main Language is "red"English"white"!");
    SendClientMessage(playerid, COLOR_RED, "USAGE: to change language use: (/english - /tagalog or /filipino)");
	new name[MAX_PLAYER_NAME], string[39 + MAX_PLAYER_NAME];
    GetPlayerName(playerid, name, sizeof(name));
    format(string, sizeof(string), "%s has joined the server", name);
    SendClientMessageToAll(COLOR_GREY, string);
	TextDrawShowForPlayer(playerid, XGLogo);
	TextDrawShowForPlayer(playerid, Time);
	TextDrawShowForPlayer(playerid, TimeLeft);
	return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
	new pname[MAX_PLAYER_NAME], string[39 + MAX_PLAYER_NAME];
    GetPlayerName(playerid, pname, sizeof(pname));
    switch(reason)
    {
        case 0: format(string, sizeof(string), "%s has left the server (Lost Connection/Crash)", pname);
        case 1: format(string, sizeof(string), "%s has left the server (Leaving)", pname);
        case 2: format(string, sizeof(string), "%s has left the server (Kicked/Banned)", pname);
    }
    SendClientMessageToAll(COLOR_GREY, string);
	return 1;
}

public OnPlayerSpawn(playerid)
{
   GangZoneShowForPlayer(playerid, BallasZone, -2147418167);
   GangZoneShowForPlayer(playerid, BallasZone2, -2147418167);
   GangZoneShowForPlayer(playerid, GroveZone, 16711888);
   GangZoneShowForPlayer(playerid, GroveZone2, 16711888);
   GangZoneShowForPlayer(playerid, VagosZone, -65332);
   GangZoneShowForPlayer(playerid, VagosZone2, -65332);
   GangZoneShowForPlayer(playerid, VagosZone3, -65332);
   GangZoneShowForPlayer(playerid, AztecasZone, 1538909898);

//============================================================================//

   TextDrawHideForPlayer(playerid, BallasTittle);
   TextDrawHideForPlayer(playerid, BallasWeap1);
   TextDrawHideForPlayer(playerid, BallasWeap2);
   TextDrawHideForPlayer(playerid, BallasWeap3);
   TextDrawHideForPlayer(playerid, BallasWeap4);
   TextDrawHideForPlayer(playerid, GroveTittle);
   TextDrawHideForPlayer(playerid, GroveWeap1);
   TextDrawHideForPlayer(playerid, GroveWeap2);
   TextDrawHideForPlayer(playerid, GroveWeap3);
   TextDrawHideForPlayer(playerid, GroveWeap4);
   TextDrawHideForPlayer(playerid, VagosTittle);
   TextDrawHideForPlayer(playerid, VagosWeap1);
   TextDrawHideForPlayer(playerid, VagosWeap2);
   TextDrawHideForPlayer(playerid, VagosWeap3);
   TextDrawHideForPlayer(playerid, VagosWeap4);
   
//============================================================================//
   
   SetPlayerMapIcon(playerid,0,1914.0652,-1731.5297,13.4226,19,1,MAPICON_LOCAL); //Ballas Takeover Mapicon

//============================================================================//

   SetPlayerArmour(playerid, 100);
   SetPlayerHealth(playerid,99999);
   SetCameraBehindPlayer(playerid);
   SendClientMessage(playerid,COLOR_RED,"ANTICHEAT: Spawnkill Protection has been activate it will end up in 5 secs!");
   SetTimerEx("SpawnKillEnd",5000,0,"i",playerid);
   GivePlayerWeapon(playerid, 5,1);
   SetPVarInt(playerid, "AFK", 0);
   PlayerPlaySound(playerid, 1186,-119.9460,23.1096,12.2238);
   return 1;
}

public SpawnKillEnd(playerid)
{
   new string[128],pname[MAX_PLAYER_NAME];
   GetPlayerName(playerid,pname,sizeof(pname));
   SendClientMessage(playerid,COLOR_RED,"ANTICHEAT: Spawnkill Protection has been ended!");
   SetPlayerHealth(playerid,100);
   format(string,sizeof(string),"%s's spawnkill protection has been endup!",pname);
   SendClientMessageToAll(COLOR_RED,string);
   return 1;
}

public OnPlayerDeath(playerid, killerid, reason)
{
	SetPlayerScore(killerid, GetPlayerScore(killerid) + 1);
	SetPlayerWantedLevel(killerid, GetPlayerWantedLevel(killerid) + 1);
	GivePlayerMoney(killerid, 5000);
	GameTextForPlayer(playerid,"~w~WASTED",1200,2);
	SendDeathMessage(killerid, playerid, reason);
	return 1;
}

public TimeU()
{
    new string[7];                             
    Tsec+=1;                                      
    if(Tsec==60) {                                
        Tsec=00;
        THrs+=1;                                  
    }
    if(THrs==24) {
        Tsec=00;
        THrs=0;
    }
    if(Tsec<10) {                                 
                                                  
        format(string,sizeof(string),"%d:%d0",THrs,Tsec);
    }
    if(Tsec>10) {
                                                  
        format(string,sizeof(string),"%d:%02d",THrs,Tsec);
    }
    if(THrs<10) {
                                                  
        format(string,sizeof(string),"0%d:%02d",THrs,Tsec);
    }
    for(new i; i<MAX_PLAYERS; i++) {              
        if(IsPlayerConnected(i)) {              
            SetPlayerTime(i,THrs,Tsec);           
        }
    }
    TextDrawSetString(Time,string);
	return 1;
}

public OnVehicleSpawn(vehicleid)
{
	return 1;
}

public OnVehicleDeath(vehicleid, killerid)
{
	return 1;
}

public OnPlayerText(playerid, text[])
{
	new to_others[MAX_CHATBUBBLE_LENGTH+1];
	format(to_others,MAX_CHATBUBBLE_LENGTH,"Says: %s",text);
	
    //===== ANTISPAM =====//
    
    SetPVarInt(playerid,"textspam",GetPVarInt(playerid,"textspam")+1);
	SetTimerEx("clearspam",5000,false,"d",playerid);
	if(GetPVarInt(playerid,"textspam") == 5) {
		new string[128];
		new pname[MAX_PLAYER_NAME];
		GetPlayerName(playerid,pname,sizeof(pname));
		format(string,sizeof(string),"ANTICHEAT: %s has been mute for 2 minutes <Reason: Text Spam>",pname);
		SendClientMessageToAll(COLOR_RED,string);
        SetPVarInt(playerid,"mute",1);
		SetTimer("Unmute",70000, true);
		return 0;
	}
	else if(GetPVarInt(playerid,"textspam") == 4) {
		SendClientMessage(playerid,COLOR_RED,"ANTICHEAT: Stop spamming or you will be mute! <Wait 5 secs>");
		return 0;
	}
	
	if(GetPVarInt(playerid,"mute") == 1)
	{
       SendClientMessage(playerid,COLOR_RED,"ANTICHEAT: You cannot talk your mute!");
	}
	else if(GetPVarInt(playerid,"mute") == 0)
	{
	   new PlayerName[MAX_PLAYER_NAME];
       GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
	   GetPlayerColor(playerid);
	   format(text,1024, "%s {FFFFFF} (%d): {FFFFFF}%s", PlayerName, playerid, text);
       SendClientMessageToAll(GetPlayerColor(playerid), text);
       return 0;
	}
	
	if(GetPVarInt(playerid,"AFK") == 1)
	{
	   new PlayerName[MAX_PLAYER_NAME];
       GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
	   GetPlayerColor(playerid);
	   format(text,1024, "[AFK] %s {FFFFFF} (%d): {FFFFFF}%s", PlayerName, playerid, text);
       SendClientMessageToAll(GetPlayerColor(playerid), text);
	}
	else if(GetPVarInt(playerid,"AFK") == 0)
	{
	   new PlayerName[MAX_PLAYER_NAME];
       GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
	   GetPlayerColor(playerid);
	   format(text,1024, "%s {FFFFFF} (%d): {FFFFFF}%s", PlayerName, playerid, text);
       SendClientMessageToAll(GetPlayerColor(playerid), text);
       return 0;
	}
	return 0;
}

public Unmute(playerid)
{
	new string[128],pname[MAX_PLAYER_NAME];
	GetPlayerName(playerid,pname,sizeof(pname));
	SetPVarInt(playerid,"mute",0);
	SendClientMessage(playerid,COLOR_GREEN,"You have been unmute by our ANTICHEAT!");
	format(string,sizeof(string),"%s has been unmute",pname);
	SendClientMessageToAll(COLOR_GREEN,string);
	return 1;
}

public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
    new veh = GetPlayerVehicleID(playerid);
    new Float:x,Float:y,Float:z = GetPlayerPos(playerid,x,y,z);

    for(new i;i<MAX_PLAYERS<i++;)
    {
        if(IsPlayerInVehicle(i,veh) && GetPlayerState(i) == PLAYER_STATE_DRIVER)
        {
            if(GetPlayerTeam(i) == GetPlayerTeam(playerid))
            {
                SetPlayerPos(playerid,x,y,z+5.2);
                SendClientMessage(playerid,COLOR_RED,"ANTICHEAT: Dont carjack your own mate.");
            }
        }
    }
	return 1;
}

public OnPlayerExitVehicle(playerid, vehicleid)
{
	return 1;
}

public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
 	if(checkpointid == BallasShop)
	{
        ShowPlayerDialog(playerid,BALLASSHOP,DIALOG_STYLE_LIST,"Ballas Shop","Pistols\nExplotion\nShotgun\nRifles\nOther Weaps","Buy", "Exit");
		GameTextForPlayer(playerid, "~g~Ballas Shop~n~Buy Weapons if needed!", 3000, 3);
	}
	return 1;
}

public OnPlayerStateChange(playerid, newstate, oldstate)
{
	return 1;
}

public OnPlayerEnterCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveCheckpoint(playerid)
{
	return 1;
}

public OnPlayerEnterRaceCheckpoint(playerid)
{
	return 1;
}

public OnPlayerLeaveRaceCheckpoint(playerid)
{
	return 1;
}

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

public OnPlayerRequestSpawn(playerid)
{
	return 1;
}

public OnObjectMoved(objectid)
{
	return 1;
}

public OnPlayerObjectMoved(playerid, objectid)
{
	return 1;
}

public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == BallasPickup)
	{
      if(gTeam[playerid] == TEAM_BALLAS)
	  {
	     SendClientMessage(playerid, COLOR_RED, "You cant takeover your team zone!");
	  }
	  else
	  {
	     SendClientMessage(playerid, COLOR_RED, "Your in the base of ballas. use /taketurf to take the turf of the ballas zone!");
	  }
	}
	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)
{
	return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
	return 1;
}

public OnPlayerStreamOut(playerid, forplayerid)
{
	return 1;
}

public OnVehicleStreamIn(vehicleid, forplayerid)
{
	return 1;
}

public OnVehicleStreamOut(vehicleid, forplayerid)
{
	return 1;
}

public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    new gangShop[30],Gang[MAX_PLAYERS];
    
	if(dialogid == 3)
    {
	  if(response == 1)
      {
		if(GetPVarInt(playerid,"RulesAccepted")!=1)
		{
			SetPVarInt(playerid,"RulesAccepted",1);
		}
		else
		{
		    SendClientMessage(playerid, COLOR_RED, "You Already Accepted The Rules");
		}
	  }
	  else
      {
        new name[MAX_PLAYER_NAME], string[128];
        GetPlayerName(playerid, name, sizeof(name));
        format(string, sizeof(string), "ANTIRULES: %s has been kicked, Reason: Ignoring Rules",name);
        SendClientMessageToAll(COLOR_RED,string);
		SendClientMessage(playerid, COLOR_RED, "You Ignore The Rules");
        SendClientMessage(playerid, COLOR_RED, "You Have Been Kicked!, Reason : Ignoring The Rules");
		Kick(playerid);
	  }
      return 0;
    }
    
    if(dialogid == BALLASSHOP)
	{
		if(!response) return SendClientMessage(playerid, COLOR_RED, "You exit the shop, Hope come back!");
		switch(listitem)
	    {
	        case 0:
	        {
                if(listitem == 0)
                {
                   ShowPlayerDialog(playerid,PISTOLS,DIALOG_STYLE_LIST,"Pistols","9mm ($5,000)\nDesert Eagle ($5,000)\nSilenced 9mm ($5,000)","Buy","Back");
                }
			}
			case 1:
			{
                if(listitem == 1)
                {
                  ShowPlayerDialog(playerid,EXPLOTION,DIALOG_STYLE_LIST,"Explotion","Grenade ($10,000)\nMolotov Cocktail ($10,000)\nSatchel Charge ($20,000)\nTear Gas ($30,000)","Buy","Back");
				}
			}
			case 2:
			{
                if(listitem == 2)
                {
                  ShowPlayerDialog(playerid,SHOTGUN,DIALOG_STYLE_LIST,"Shotgun","Shotgun ($30,000)\nSawn-off Shotgun ($20,000)\nCombat Shoutgun ($30,000)","Buy","Back");
                }
			}
			case 3:
			{
                if(listitem == 3)
                {
                  ShowPlayerDialog(playerid,RIFLES,DIALOG_STYLE_LIST,"Rifles","M4 ($100,000)\nAK-47 ($100,000)\nCountry Rifle ($100,000)\nSniper Rifle ($100,000)","Buy","Back");
				}
			}
			case 4:
			{
                if(listitem == 4)
                {
                  ShowPlayerDialog(playerid,OTHERWEAPS,DIALOG_STYLE_LIST,"Other Weapons","Tec9 ($50,000)\nMP5 ($50,000)\nMicro SMG ($50,000)\nChainsaw ($10,000)\nBaseballbat ($5,000)\nKnife ($5,000)","Buy","Back");
				}
			}
        }
        return 0;
	}
	
	if(dialogid == PISTOLS)
	{
		if(!response)
		{
          switch(GetPlayerTeam(playerid))
          {
            case BALLASSHOP:
            {
              Gang[playerid] = BALLASSHOP;
            }
            case GROVESHOP:
            {
              Gang[playerid] = GROVESHOP;
            }
          }
          format(gangShop, sizeof(gangShop), "%s Shop", GetPlayerTeam(playerid));
          ShowPlayerDialog(playerid, Gang[playerid] ,DIALOG_STYLE_LIST, gangShop,"Pistols\nExplotion\nShotgun\nRifles\nOther Weaps","Buy", "Exit");
		  return 1;
		}
		switch(listitem)
	    {
	        case 0:
	        {
                if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money");
        	    GivePlayerMoney(playerid, -5000);
        	    GivePlayerWeapon(playerid, 22,5000);
                SendClientMessage(playerid, COLOR_GREEN, "9mm Bought!");
			}
			case 1:
			{
                if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money");
        	    GivePlayerMoney(playerid, -5000);
				GivePlayerWeapon(playerid, 24,5000);
                SendClientMessage(playerid, COLOR_GREEN, "Desert Eagle Bought!");
			}
			case 2:
			{
                if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money");
        	    GivePlayerMoney(playerid, -5000);
        	    GivePlayerWeapon(playerid, 23,5000);
                SendClientMessage(playerid, COLOR_GREEN, "Silenced 9mm Bought!");
			}
		}
		return 0;
	}
	
	if(dialogid == EXPLOTION)
	{
		if(!response)
		{
          switch(GetPlayerTeam(playerid))
          {
            case BALLASSHOP:
            {
              Gang[playerid] = BALLASSHOP;
            }
            case GROVESHOP:
            {
              Gang[playerid] = GROVESHOP;
            }
          }
          format(gangShop, sizeof(gangShop), "%s Shop", GetPlayerTeam(playerid));
          ShowPlayerDialog(playerid, Gang[playerid] ,DIALOG_STYLE_LIST, gangShop,"Pistols\nExplotion\nShotgun\nRifles\nOther Weaps","Buy", "Exit");
		  return 1;
		}
		switch(listitem)
	    {
	        case 0:
	        {
                if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money");
        	    GivePlayerMoney(playerid, -10000);
        	    GivePlayerWeapon(playerid, 16,10);
                SendClientMessage(playerid, COLOR_GREEN, "Grenade Bought!");
			}
			case 1:
			{
                if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money");
        	    GivePlayerMoney(playerid, -10000);
				GivePlayerWeapon(playerid, 18,10);
                SendClientMessage(playerid, COLOR_GREEN, "Molotov Cocktail Bought!");
			}
			case 2:
			{
                if(GetPlayerMoney(playerid) < 20000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money");
        	    GivePlayerMoney(playerid, -20000);
        	    GivePlayerWeapon(playerid, 39,10);
        	    GivePlayerWeapon(playerid, 40,1);
                SendClientMessage(playerid, COLOR_GREEN, "Satchel Charge Bought!");
			}
			case 3:
			{
                if(GetPlayerMoney(playerid) < 30000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money");
        	    GivePlayerMoney(playerid, -30000);
        	    GivePlayerWeapon(playerid, 17,10);
                SendClientMessage(playerid, COLOR_GREEN, "Tear Gas Bought!");
			}
		}
		return 0;
	}
	
	if(dialogid == SHOTGUN)
	{
		if(!response)
		{
          switch(GetPlayerTeam(playerid))
          {
            case BALLASSHOP:
            {
              Gang[playerid] = BALLASSHOP;
            }
            case GROVESHOP:
            {
              Gang[playerid] = GROVESHOP;
            }
          }
          format(gangShop, sizeof(gangShop), "%s Shop", GetPlayerTeam(playerid));
          ShowPlayerDialog(playerid, Gang[playerid] ,DIALOG_STYLE_LIST, gangShop,"Pistols\nExplotion\nShotgun\nRifles\nOther Weaps","Buy", "Exit");
		  return 1;
		}
		switch(listitem)
	    {
	        case 0:
	        {
                if(GetPlayerMoney(playerid) < 30000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money");
        	    GivePlayerMoney(playerid, -30000);
        	    GivePlayerWeapon(playerid, 25,205);
                SendClientMessage(playerid, COLOR_GREEN, "Shotgun Bought!");
			}
			case 1:
			{
                if(GetPlayerMoney(playerid) < 20000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money");
        	    GivePlayerMoney(playerid, -20000);
				GivePlayerWeapon(playerid, 26,5000);
                SendClientMessage(playerid, COLOR_GREEN, "Sawn-off Shotgun Bought!");
			}
			case 2:
			{
                if(GetPlayerMoney(playerid) < 30000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money");
        	    GivePlayerMoney(playerid, -30000);
        	    GivePlayerWeapon(playerid, 27,5000);
                SendClientMessage(playerid, COLOR_GREEN, "Combat Shotgun Bought!");
			}
		}
		return 0;
	}
	
	if(dialogid == RIFLES)
	{
		if(!response)
		{
          switch(GetPlayerTeam(playerid))
          {
            case BALLASSHOP:
            {
              Gang[playerid] = BALLASSHOP;
            }
            case GROVESHOP:
            {
              Gang[playerid] = GROVESHOP;
            }
          }
          format(gangShop, sizeof(gangShop), "%s Shop", GetPlayerTeam(playerid));
          ShowPlayerDialog(playerid, Gang[playerid] ,DIALOG_STYLE_LIST, gangShop,"Pistols\nExplotion\nShotgun\nRifles\nOther Weaps","Buy", "Exit");
		  return 1;
		}
		switch(listitem)
	    {
	        case 0:
	        {
                if(GetPlayerMoney(playerid) < 100000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money");
        	    GivePlayerMoney(playerid, -100000);
        	    GivePlayerWeapon(playerid, 31,5000);
                SendClientMessage(playerid, COLOR_GREEN, "M4 Bought!");
			}
			case 1:
			{
                if(GetPlayerMoney(playerid) < 100000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money");
        	    GivePlayerMoney(playerid, -100000);
				GivePlayerWeapon(playerid, 30,5000);
                SendClientMessage(playerid, COLOR_GREEN, "AK-47 Bought!");
			}
			case 2:
			{
                if(GetPlayerMoney(playerid) < 100000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money");
        	    GivePlayerMoney(playerid, -100000);
        	    GivePlayerWeapon(playerid, 33,41);
                SendClientMessage(playerid, COLOR_GREEN, "Country Rifle Bought!");
			}
			case 3:
			{
                if(GetPlayerMoney(playerid) < 100000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money");
        	    GivePlayerMoney(playerid, -100000);
        	    GivePlayerWeapon(playerid, 34,41);
                SendClientMessage(playerid, COLOR_GREEN, "Sniper Rifle Bought!");
			}
		}
		return 0;
	}
	
	if(dialogid == OTHERWEAPS)
	{
		if(!response)
		{
          switch(GetPlayerTeam(playerid))
          {
            case BALLASSHOP:
            {
              Gang[playerid] = BALLASSHOP;
            }
            case GROVESHOP:
            {
              Gang[playerid] = GROVESHOP;
            }
          }
          format(gangShop, sizeof(gangShop), "%s Shop", GetPlayerTeam(playerid));
          ShowPlayerDialog(playerid, Gang[playerid] ,DIALOG_STYLE_LIST, gangShop,"Pistols\nExplotion\nShotgun\nRifles\nOther Weaps","Buy", "Exit");
		  return 1;
		}
		switch(listitem)
	    {
	        case 0:
	        {
                if(GetPlayerMoney(playerid) < 50000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money");
        	    GivePlayerMoney(playerid, -50000);
        	    GivePlayerWeapon(playerid, 32,5000);
                SendClientMessage(playerid, COLOR_GREEN, "Tec9 Bought!");
			}
			case 1:
			{
                if(GetPlayerMoney(playerid) < 50000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money");
        	    GivePlayerMoney(playerid, -50000);
				GivePlayerWeapon(playerid, 29,5000);
                SendClientMessage(playerid, COLOR_GREEN, "MP5 Bought!");
			}
			case 2:
			{
                if(GetPlayerMoney(playerid) < 50000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money");
        	    GivePlayerMoney(playerid, -50000);
        	    GivePlayerWeapon(playerid, 28,5000);
                SendClientMessage(playerid, COLOR_GREEN, "Micro SMG Bought!");
			}
			case 3:
			{
                if(GetPlayerMoney(playerid) < 10000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money");
        	    GivePlayerMoney(playerid, -10000);
        	    GivePlayerWeapon(playerid, 9,1);
                SendClientMessage(playerid, COLOR_GREEN, "Chainsaw Bought!");
			}
			case 4:
			{
                if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money");
        	    GivePlayerMoney(playerid, -5000);
        	    GivePlayerWeapon(playerid, 5,1);
                SendClientMessage(playerid, COLOR_GREEN, "Baseballbat Bought!");
			}
			case 5:
			{
                if(GetPlayerMoney(playerid) < 5000) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money");
        	    GivePlayerMoney(playerid, -5000);
        	    GivePlayerWeapon(playerid, 4,1);
                SendClientMessage(playerid, COLOR_GREEN, "Knife Bought!");
			}
		}
		return 0;
	}
	return 1;
}

public OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
	return 1;
}

//===========================  COMMANDS  ===============================//

CMD:cmds(playerid, params[])
{
   ShowPlayerDialog(playerid,1, DIALOG_STYLE_MSGBOX, "Commands List:", "/me /kill /suicide /credits /pm /givemoney /rules /teamobjectives", "Ok", "Exit");
   return 1;
}

CMD:commmands(playerid, params[])
{
   ShowPlayerDialog(playerid,1, DIALOG_STYLE_MSGBOX, "Commands List:", "/me /kill /suicide /credits /pm /givemoney /rules /teamobjectives", "Ok", "Exit");
   return 1;
}

CMD:teamobjectives(playerid, params[])
{
   switch (Language[playerid])
   {
      case 0:
      {
          SendClientMessage(playerid, COLOR_RED, "======TEAM OBJECTIVES======");
          SendClientMessage(playerid, COLOR_WHITE, "Ballas: The Ruler of Some Parts of LS. Win The War to Rule All Zones!");
          SendClientMessage(playerid, COLOR_WHITE, "Grove: The Ruler of Ganton, Win The War to Rule All Zones!");
          SendClientMessage(playerid, COLOR_WHITE, "Vagos: The Ruler of Some Parts of LS, Win The War to Rule All Zones!");
          SendClientMessage(playerid, COLOR_WHITE, "Aztecs: The Ruler of Some Parts of LS, Win The War to Rule All Zones!");
      }
      case 1: 
      {
          SendClientMessage(playerid, COLOR_RED, "======TEAM OBJECTIVES======");
          SendClientMessage(playerid, COLOR_WHITE, "Ballas: Ang Lider ng Ibang Parte ng LS. Kailangan mo manalo sa gerahan para makuha lahat ng zones!");
          SendClientMessage(playerid, COLOR_WHITE, "Grove: Ang Lider ng Ganton, Kailangan mo manalo sa gerahan para makuha lahat ng zones!");
          SendClientMessage(playerid, COLOR_WHITE, "Vagos: Ang Lider ng Ibang Parte ng LS, Kailangan mo manalo sa gerahan para makuha lahat ng zones!!");
          SendClientMessage(playerid, COLOR_WHITE, "Aztecs: Ang Lider ng Ibang Parte ng LS, Kailangan mo manalo sa gerahan para makuha lahat ng zones!");
      }
   }
   return 1;
}

CMD:english(playerid, params[])
{
    Language[playerid] = 0; 
    SendClientMessage(playerid,COLOR_GREEN,"Your main language now is English!");
    return 1;
}

CMD:tagalog(playerid, params[])
{
    Language[playerid] = 1;
    SendClientMessage(playerid,COLOR_GREEN,"Ang iyong main language ay Tagalog");
    return 1;
}

CMD:filipino(playerid, params[])
{
    Language[playerid] = 1;
    SendClientMessage(playerid,COLOR_GREEN,"Ang iyong main language ay Tagalog");
    return 1;
}

CMD:credits(playerid,params[])
{
   switch (Language[playerid])
   {
      case 0:
      {
        ShowPlayerDialog(playerid,2, DIALOG_STYLE_MSGBOX, "Credits:", "Gamemode Creator: Mr.Kakashi\nAssit Gamemode Helper: GAMER_PS2\nMapper: Mr.Kakashi\nTester: GAMER_PS2\n\nCopyright 2011@", "Ok", "Exit");
      }
      case 1:
      {
        ShowPlayerDialog(playerid,2, DIALOG_STYLE_MSGBOX, "Stuffs:", "Gumuwa ng Gamemode: Mr.Kakashi\nAssitant ng Gamemode Owner: GAMER_PS2\nMapper: Mr.Kakashi\nNagtetesting: GAMER_PS2\n\nCopyright 2011@", "Ok", "Exit");
      }
   }
   return 1;
}

CMD:pm(playerid, params[])
{
    new str[256], str2[256], id, Name1[MAX_PLAYER_NAME], Name2[MAX_PLAYER_NAME];
    if(sscanf(params, "ds", id, str2)) return SendClientMessage(playerid,COLOR_RED, "USAGE: /pm <playerid/name> <text>");
    if(!IsPlayerConnected(id)) return SendClientMessage(playerid,COLOR_RED, "ERROR: Player is not connected");
    if(playerid == id) return SendClientMessage(playerid,COLOR_RED, "ERROR: You cannot pm yourself!");
    {
        GetPlayerName(playerid, Name1, sizeof(Name1));
        GetPlayerName(id, Name2, sizeof(Name2));
        format(str, sizeof(str), "PM To %s(ID %d): %s", Name2, id, str2);
        SendClientMessage(playerid,COLOR_YELLOW, str);
        format(str, sizeof(str), "PM From %s(ID %d): %s", Name1, playerid, str2);
        SendClientMessage(id,COLOR_YELLOW, str);
        PlayerPlaySound(id,1085,0.0,0.0,0.0);
    }
    return 1;
}

CMD:afk(playerid,params[])
{
   if(GetPVarInt(playerid, "AFK") == 1) return SendClientMessage(playerid,COLOR_RED, "You Already AFK");
   new pName[MAX_PLAYER_NAME];
   new string[128];
   GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
   switch (Language[playerid])
   {
      case 0:
      {
        SendClientMessage(playerid, COLOR_WHITE,"You Are Now AFK");
        SendClientMessage(playerid, COLOR_WHITE,"Type /back when you are back to play");
      }
      case 1:
      {
        SendClientMessage(playerid, COLOR_WHITE,"Ikaw ay AFK!");
        SendClientMessage(playerid, COLOR_WHITE,"Itype ang /back pag ikaw ay babalik na sa paglalaro!");
      }
   }
   AFK[playerid] = Create3DTextLabel("[AFK] - Away from Keyboard",COLOR_RED, 30.0, 40.0, 50.0, 40.0, 0);
   Attach3DTextLabelToPlayer(AFK[playerid], playerid, 0.0, 0.0, 0.6);
   format(string, sizeof(string), "{FFFFFF}[SERVER]:{FAF623}%s is now AFK And Be Right Back",pName);
   SendClientMessageToAll(COLOR_YELLOW, string);
   TogglePlayerControllable(playerid, 0);
   SetPlayerHealth(playerid, 999999.999);
   GetPlayerName(playerid, oldName[playerid], 24);
   format(tempName[playerid], 24, "%s[AFK]", oldName[playerid]);
   SetPlayerName(playerid, tempName[playerid]);
   SetPVarInt(playerid, "AFK", 1);
   PlayerPlaySound(playerid,1085,0.0,0.0,0.0);
   return 1;
}

CMD:back(playerid,params[])
{
   if(GetPVarInt(playerid, "AFK") == 0) return SendClientMessage(playerid,COLOR_RED, "You Already Back");
   new pName[MAX_PLAYER_NAME];
   new string[128];
   GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
   switch (Language[playerid])
   {
      case 0:
      {
        SendClientMessage(playerid, COLOR_WHITE,"Welcome Back!");
      }
      case 1:
      {
        SendClientMessage(playerid, COLOR_WHITE,"Welcome Back!");
      }
   }
   Delete3DTextLabel(AFK[playerid]);
   format(string, sizeof(string), "{FFFFFF}[SERVER]:{FF002B}%s is back and able to play again",pName);
   SendClientMessageToAll(COLOR_RED, string);
   TogglePlayerControllable(playerid, 1);
   SetPlayerHealth(playerid, 100);
   SetPlayerName(playerid, oldName[playerid]);
   SetPVarInt(playerid, "AFK", 0);
   PlayerPlaySound(playerid,1085,0.0,0.0,0.0);
   return 1;
}

CMD:me(playerid, params[])
{
    new str[128], pname[MAX_PLAYER_NAME];
    if (isnull(params)) return SendClientMessage(playerid,COLOR_RED, "USAGE: /me <text>");
    GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
    format(str,sizeof(str), "*%s %s", pname, params);
    SendClientMessageToAll(COLOR_RED,str);
    return true;
}

CMD:givemoney(playerid, params[])
{
    new str[128], pname[MAX_PLAYER_NAME], playername[MAX_PLAYER_NAME],id,ammount;
    if(sscanf(params, "ri", id, ammount)) return SendClientMessage(playerid, COLOR_RED,"USAGE: /givemoney <playername/id> <ammount>");
    if(id == INVALID_PLAYER_ID) return SendClientMessage(playerid,COLOR_RED, "ERROR: Player is not connected!");
    if(ammount > GetPlayerMoney(playerid)) return SendClientMessage(playerid,COLOR_RED, "ERROR: Invalid ammount");
    GetPlayerName(playerid, pname, MAX_PLAYER_NAME);
	GetPlayerName(id, playername, MAX_PLAYER_NAME);
    format(str,sizeof(str), "%s has give %s $%d",pname,playername,ammount);
    SendClientMessageToAll(COLOR_GREEN,str);
	format(str,sizeof(str), "%s has given you $%d", pname,ammount);
    SendClientMessage(id,COLOR_GREEN,str);
	format(str,sizeof(str), "You gave $%d to %s",ammount,playername);
    SendClientMessage(playerid,COLOR_GREEN,str);
	format(str,sizeof(str), "%s has give %s $%d",pname,playername,ammount);
    printf(str);
	GivePlayerMoney(id, ammount);
    return true;
}

CMD:happy(playerid,params[])
{
   new pName[MAX_PLAYER_NAME];
   new string[128];
   GetPlayerName(playerid,pName,MAX_PLAYER_NAME);
   format(string, sizeof(string), "%s is happy to have a Gang War",pName);
   SendClientMessageToAll(COLOR_GREY, string);
   return 1;
}

CMD:rules(playerid,params[])
{
   ShowPlayerDialog(playerid,3, DIALOG_STYLE_MSGBOX, "Rules:", "1.)Do Not Hack/Cheat/Mods\n2.)Respect Admins/Players\n3.)Ask To Be Admin if we are Hiring\n4.)No Insulting/Flamming\n5.)Dont AFK on Spawn Areas\n6.)Dont Team Carjack\n7.)Dont Team Kill\n\nIf you break those rules you may Punishment by Our Server Administrators", "Accept", "Ignore");
   return 1;
}
__________________
Ronnie Ronnie Ronnie Ronnie
Not GAMER_PS2

Last edited by GAMER_PS2; 01/11/2011 at 05:26 AM.
GAMER_PS2 is offline   Reply With Quote
Old 01/11/2011, 04:32 AM   #2
Medardo4Life
Big Clucker
 
Medardo4Life's Avatar
 
Join Date: Nov 2009
Posts: 107
Reputation: 9
Default Re: Zone - /taketurf

2 Theads?
__________________
Me if you like my posts :P
Medardo4Life is offline   Reply With Quote
Old 01/11/2011, 04:33 AM   #3
GAMER_PS2
Huge Clucker
 
GAMER_PS2's Avatar
 
Join Date: Aug 2011
Posts: 344
Reputation: 19
Default Re: Zone - /taketurf

Sorry for double posting i have double post because i click submit i didnt see that the code is not complete copy so stop it i though it will stop the posting thread i'm really sorry about the double posting
__________________
Ronnie Ronnie Ronnie Ronnie
Not GAMER_PS2
GAMER_PS2 is offline   Reply With Quote
Old 01/11/2011, 07:06 AM   #4
=WoR=G4M3Ov3r
High-roller
 
Join Date: Nov 2010
Location: www.Ambrosia-Servers.com
Posts: 1,762
Reputation: 329
Default Re: Zone - /taketurf

Quote:
Originally Posted by GAMER_PS2 View Post
Sorry for double posting i have double post because i click submit i didnt see that the code is not complete copy so stop it i though it will stop the posting thread i'm really sorry about the double posting
There's an "EDIT" button...
=WoR=G4M3Ov3r is offline   Reply With Quote
Old 01/11/2011, 07:39 AM   #5
GAMER_PS2
Huge Clucker
 
GAMER_PS2's Avatar
 
Join Date: Aug 2011
Posts: 344
Reputation: 19
Default Re: Zone - /taketurf

lol dude i do that but to late to edit because its already double post
__________________
Ronnie Ronnie Ronnie Ronnie
Not GAMER_PS2
GAMER_PS2 is offline   Reply With Quote
Old 01/11/2011, 07:58 AM   #6
GAMER_PS2
Huge Clucker
 
GAMER_PS2's Avatar
 
Join Date: Aug 2011
Posts: 344
Reputation: 19
Default Re: Zone - /taketurf

Quote:
Originally Posted by GAMER_PS2 View Post
Sorry for double posting i have double post because i click submit i didnt see that the code is not complete copy so stop it i though it will stop the posting thread i'm really sorry about the double posting
Quote:
Originally Posted by =WoR=G4M3Ov3r View Post
There's an "EDIT" button...
are you just gonna comment or answer my problem?
__________________
Ronnie Ronnie Ronnie Ronnie
Not GAMER_PS2
GAMER_PS2 is offline   Reply With Quote
Old 01/11/2011, 08:07 AM   #7
r3k1lLz_
Big Clucker
 
Join Date: Jan 2010
Location: 127.0.0.1
Posts: 89
Reputation: 0
Default Re: Zone - /taketurf

Only way I can think of is some kind of timer and if a player dies in that region on that team it will set a variable up and if it reaches 5 (timer check) it will flash the textdraw or do whatever.
__________________
Code:
Filterscripts			     Maps                      Functions/Includes
Vote System	 	                                       Easy Helpbot
ChangeMyColour
r3k1lLz_ is offline   Reply With Quote
Old 01/11/2011, 08:15 AM   #8
GAMER_PS2
Huge Clucker
 
GAMER_PS2's Avatar
 
Join Date: Aug 2011
Posts: 344
Reputation: 19
Default Re: Zone - /taketurf

dude i dont know what to do the code just makes me Happy
__________________
Ronnie Ronnie Ronnie Ronnie
Not GAMER_PS2
GAMER_PS2 is offline   Reply With Quote
Old 01/11/2011, 01:09 PM   #9
GAMER_PS2
Huge Clucker
 
GAMER_PS2's Avatar
 
Join Date: Aug 2011
Posts: 344
Reputation: 19
Default Re: Zone - /taketurf

well im near to get the answer the problem is i dont know what to do
__________________
Ronnie Ronnie Ronnie Ronnie
Not GAMER_PS2
GAMER_PS2 is offline   Reply With Quote
Old 02/11/2011, 05:44 AM   #10
GAMER_PS2
Huge Clucker
 
GAMER_PS2's Avatar
 
Join Date: Aug 2011
Posts: 344
Reputation: 19
Default Re: Zone - /taketurf

Comment please
__________________
Ronnie Ronnie Ronnie Ronnie
Not GAMER_PS2
GAMER_PS2 is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Zone - /taketurf GAMER_PS2 Scripting Help 0 01/11/2011 04:23 AM
Show zone name on new zone entered? Jack_Leslie Scripting Help 3 03/10/2011 06:30 AM
/taketurf marik1599 Help Archive 6 10/08/2011 06:02 AM
DM zone PANNA Help Archive 6 05/11/2009 11:12 AM


All times are GMT. The time now is 02:54 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.