[AJUDA]Bug Nas Gang Zones!
#1

olб!!! eu tenho um gm aki do brasil mata mata 2008!

ele funcionava direitim atй eu tentar add uma gang e agora quando eu vou dominar uma gang zona com qualquer gang aparece que eu to dominando com a gang bozo e a gang zona fica verde e ai aparece um monte mensagem:

|GANGZONE| - O (Os, A, As) 'Boyzinhos' invadiram e dominaram mais um territуrio!

|GANGZONE| - O (Os, A, As) 'Bozo James' invadiram e dominaram mais um territуrio!

|GANGZONE| - O (Os, A, As) 'Boyzinhos' invadiram e dominaram mais um territуrio!

|GANGZONE| - O (Os, A, As) 'Bozo James' invadiram e dominaram mais um territуrio!

sendo que eu estou com a gang dos boyzinhos!

ps: na hora de compilar o gm nao da erro algum!

agora vou mandar as linhas para ver se consegueem arrumar:

Код:
#define TEAM_BOZOS 0

#define TEAM_BOYZINHOS 1

#define TEAM_GATE'S 2

#define TEAM_MILITARES 3

#define TEAM_CHINESES 4

#define TEAM_FRANGOS 5

#define TEAM_AGENTES 6

#define TEAM_NOIAS 7

#define TEAM_GANGSTERS 8

#define TEAM_COWBOYS 9

#define MAX_GZS 10


new teamnames[10][30] =
{
    "Bozo James",
    "Boyzinhos",
    "Gate",
    "Militares",
    "Chineses",
    "Frangos",
    "Agentes",
    "Noias",
	"Gangsters",
	"Cowboy"
};

new teamcolors[10] =
{
        0x33AA33AA, 0xAA3333AA, 0xFFA500AA, 0x0000BBAA, 0xFF66FFAA, 0xFF0000AA, 0x778899AA, 0x1E90FFAA,
		0xDAA520AA, 0x8B4513AA

};

new gzcolors[10] =
{
        0x33AA33AA, 0xAA3333AA, 0xFFA500AA, 0x0000BBAA, 0xFF66FFAA, 0xFF0000AA, 0x778899AA, 0x1E90FFAA,
		0xDAA520AA, 0x8B4513AA

};


	AddPlayerClass(264, -772.1858, 1436.0601, 13.789, 93.8632, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(124, -2695.1189, 912.5869, 67.5938, 358.2706, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(93, -2697.4844, 914.4119, 67.5938, 358.6218, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(285, -1636.0918, 661.462, 7.1875, 270.0119, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(287, -1324.9018, 497.4291, 11.1953, 140.6434, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(120, -2187.0582, 706.6134, 53.8905, 262.5324, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(169, -2187.0582, 706.6134, 53.8905, 262.5324, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(167, -2667.0545, 265.5968, 4.3358, 357.8497, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(163, -1834.9421, 1044.6853, 46.0859, 5.2774, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(141, -1834.9421, 1044.6853, 46.0859, 5.2774, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(29, -2127.8877, 236.869, 37.1403, 316.1893, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(195, -2127.8877, 236.869, 37.1403, 316.1893, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(111, -2644.1951, -276.936, 7.5085, 135.0036, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(55, -2644.1951, -276.936, 7.5085, 135.0036, 0, 0, 0, 0, 0, 0);
	AddPlayerClass(33, -688.0447, 936.8012, 13.6328, 174.9611, 0, 0, 0, 0, 0, 0);
    gz[++gzcount] = GangZoneCreate(-864.1628, 1366.311, -560.538, 1646.58); // Bozo
    gz[++gzcount] = GangZoneCreate(-2745.8591, 817.2892, -2531.4629, 999.6748); // Boyzinho
	gz[++gzcount] = GangZoneCreate(-1996.0182, 626.3850, -1537.167, 885.98910); // Gate
 	gz[++gzcount] = GangZoneCreate(-1618.283, 298.18950, -1220.427, 566.44700); // Militar
   	gz[++gzcount] = GangZoneCreate(-2378.5654, 574.2372, -2071.1252, 810.2898); // Chineses
   	gz[++gzcount] = GangZoneCreate(-2792.8611, 162.3492, -2539.2439, 459.8532); // Frangos
   	gz[++gzcount] = GangZoneCreate(-2254.0837, 944.5358, -1542.5104, 1061.1312); // Agentes
 	gz[++gzcount] = GangZoneCreate(-2229.1333, -72.4081, -2005.7321, 315.2780); // Noias
	gz[++gzcount] = GangZoneCreate(-2782.1860, -412.6448, -2489.2180, -75.1986); // Gangsters
	gz[++gzcount] = GangZoneCreate(-840.807, 805.7734, -548.8602, 1074.365);// Pedreiros
	cp[++cpcount] = CPS_AddCheckpoint(-826.3314,1449.6564,14.0263, 3.0, 80); // Bozo
	cp[++cpcount] = CPS_AddCheckpoint(-2695.0361,923.6136,66.2735, 3.0, 80); // Boyzinho
	cp[++cpcount] = CPS_AddCheckpoint(-1616.1230, 685.219800, 7.18750, 3.0, 80); // Gate
 	cp[++cpcount] = CPS_AddCheckpoint(-1347.5259,505.9380,18.2344, 3.0, 80); // Militar
   	cp[++cpcount] = CPS_AddCheckpoint(-2180.4001,605.2419,35.1691, 3.0, 80); // Chineses
   	cp[++cpcount] = CPS_AddCheckpoint(-2693.3828,261.8725,4.6328, 3.0, 80); // Frangos
   	cp[++cpcount] = CPS_AddCheckpoint(-1828.7363,1052.6353,46.0781, 3.0, 80); // Agentes
    cp[++cpcount] = CPS_AddCheckpoint(-2088.4380, 302.8693, 41.0859, 3.0, 80); // Noias
	cp[++cpcount] = CPS_AddCheckpoint(-2751.6084,-252.1956,7.1875, 3.0, 80); // Gangsters
	cp[++cpcount] = CPS_AddCheckpoint(-687.3065,966.2376,12.1395, 3.0, 80);// Cowboys
	return 1;
 }





	GangZoneHideForPlayer(playerid, gz[1]);
	GangZoneShowForPlayer(playerid, gz[1], gzcolors[0]);
	GangZoneHideForPlayer(playerid, gz[2]);
	GangZoneShowForPlayer(playerid, gz[2], gzcolors[1]);
	GangZoneHideForPlayer(playerid, gz[3]);
	GangZoneShowForPlayer(playerid, gz[3], gzcolors[2]);
	GangZoneHideForPlayer(playerid, gz[4]);
	GangZoneShowForPlayer(playerid, gz[4], gzcolors[3]);
	GangZoneHideForPlayer(playerid, gz[5]);
	GangZoneShowForPlayer(playerid, gz[5], gzcolors[4]);
	GangZoneHideForPlayer(playerid, gz[6]);
	GangZoneShowForPlayer(playerid, gz[6], gzcolors[5]);
	GangZoneHideForPlayer(playerid, gz[7]);
	GangZoneShowForPlayer(playerid, gz[7], gzcolors[6]);
	GangZoneHideForPlayer(playerid, gz[8]);
	GangZoneShowForPlayer(playerid, gz[8], gzcolors[7]);
	GangZoneHideForPlayer(playerid, gz[9]);
	GangZoneShowForPlayer(playerid, gz[9], gzcolors[8]);
	GangZoneHideForPlayer(playerid, gz[10]);
	GangZoneShowForPlayer(playerid, gz[10], gzcolors[9]);

	return 1;

}

public OnPlayerSpawn(playerid)
{
        SetPlayerInterior(playerid, 0);
        TextDrawShowForPlayer(playerid, Textdraw1);
		// Adicionar Armas quando o jogador nascer.
		if(ClassP[playerid] == 1) // Bozo
        {
        ResetPlayerWeapons(playerid);
		GivePlayerWeapon(playerid,30,450);
		GivePlayerWeapon(playerid,32,400);
		GivePlayerWeapon(playerid,22,50);
		GivePlayerWeapon(playerid,14,1);
		GivePlayerWeapon(playerid,16,5);
		GivePlayerWeapon(playerid,26,90);
        }
        else if(ClassP[playerid] == 2) // Boyzinho
        {
        ResetPlayerWeapons(playerid);
		GivePlayerWeapon(playerid,31,450);
		GivePlayerWeapon(playerid,28,400);
		GivePlayerWeapon(playerid,24,50);
		GivePlayerWeapon(playerid,5,1);
		GivePlayerWeapon(playerid,16,5);
		GivePlayerWeapon(playerid,26,90);
		}
		else if(ClassP[playerid] == 3) // Gate
        {
        ResetPlayerWeapons(playerid);
		GivePlayerWeapon(playerid,31,450);
		GivePlayerWeapon(playerid,29,400);
		GivePlayerWeapon(playerid,22,50);
		GivePlayerWeapon(playerid,3,1);
		GivePlayerWeapon(playerid,16,5);
		GivePlayerWeapon(playerid,27,90);
		}
		else if(ClassP[playerid] == 4) // Militar
        {
        ResetPlayerWeapons(playerid);
		GivePlayerWeapon(playerid,31,450);
		GivePlayerWeapon(playerid,29,400);
		GivePlayerWeapon(playerid,24,50);
		GivePlayerWeapon(playerid,4,1);
		GivePlayerWeapon(playerid,16,5);
		GivePlayerWeapon(playerid,27,90);
		}
		else if(ClassP[playerid] == 5) //Chines
        {
        ResetPlayerWeapons(playerid);
		GivePlayerWeapon(playerid,30,450);
		GivePlayerWeapon(playerid,32,400);
		GivePlayerWeapon(playerid,23,50);
		GivePlayerWeapon(playerid,8,1);
		GivePlayerWeapon(playerid,16,5);
		GivePlayerWeapon(playerid,26,90);
		}
		else if(ClassP[playerid] == 6) // Frango
        {
        ResetPlayerWeapons(playerid);
		GivePlayerWeapon(playerid,30,450);
		GivePlayerWeapon(playerid,32,400);
		GivePlayerWeapon(playerid,22,50);
		GivePlayerWeapon(playerid,9,1);
		GivePlayerWeapon(playerid,16,5);
		GivePlayerWeapon(playerid,26,90);
		}
		else if(ClassP[playerid] == 7) // Agente
        {
        ResetPlayerWeapons(playerid);
		GivePlayerWeapon(playerid,30,450);
		GivePlayerWeapon(playerid,32,400);
		GivePlayerWeapon(playerid,22,50);
		GivePlayerWeapon(playerid,15,1);
		GivePlayerWeapon(playerid,16,5);
		GivePlayerWeapon(playerid,27,90);
		GivePlayerWeapon(playerid,46,1);
		GivePlayerWeapon(playerid,34,30);

		}
		else if(ClassP[playerid] == 8) // Noia
        {
        ResetPlayerWeapons(playerid);
		GivePlayerWeapon(playerid,31,450);
		GivePlayerWeapon(playerid,28,400);
		GivePlayerWeapon(playerid,24,50);
		GivePlayerWeapon(playerid,7,1);
		GivePlayerWeapon(playerid,16,5);
		GivePlayerWeapon(playerid,25,90);
		}
		else if(ClassP[playerid] == 9) // Gangster
        {
        ResetPlayerWeapons(playerid);
		GivePlayerWeapon(playerid,30,450);
		GivePlayerWeapon(playerid,32,400);
		GivePlayerWeapon(playerid,23,50);
		GivePlayerWeapon(playerid,2,1);
		GivePlayerWeapon(playerid,16,5);
		GivePlayerWeapon(playerid,26,90);
		}
		else if(ClassP[playerid] == 10) // Cowboy
        {
        ResetPlayerWeapons(playerid);
		GivePlayerWeapon(playerid,30,450);
		GivePlayerWeapon(playerid,32,400);
		GivePlayerWeapon(playerid,23,50);
		GivePlayerWeapon(playerid,2,1);
		GivePlayerWeapon(playerid,16,5);
		GivePlayerWeapon(playerid,26,90);
		}

}


public OnPlayerRequestClass(playerid, classid)
{

   if(classid == 0)
	{
		GameTextForPlayer(playerid, "~p~GANG DO BOZO JAMES~n~~r~PRESSIONE SHIFT", 2000, 3);
		SetPlayerColor(playerid,COLOR_GREEN);
		gTeam[playerid] = TEAM_BOZOS;
		ClassP[playerid] = 1;
		SetPlayerTeam(playerid, 0);
	}
	else if(classid == 1)
	{
		GameTextForPlayer(playerid, "            ~p~GANG DOS BOYZINHOS         ~r~PRESSIONE SHIFT", 2000, 3);
		SetPlayerColor(playerid,COLOR_DARKRED);
		gTeam[playerid] = TEAM_BOYZINHOS;
		ClassP[playerid] = 2;
		SetPlayerTeam(playerid, 1);
	}
	else if(classid == 2)
	{
		GameTextForPlayer(playerid, "            ~p~GANG DOS BOYZINHOS         ~r~PRESSIONE SHIFT", 2000, 3);
		SetPlayerColor(playerid,COLOR_DARKRED);
		gTeam[playerid] = TEAM_BOYZINHOS;
		ClassP[playerid] = 2;
		SetPlayerTeam(playerid, 1);
	}
	else if(classid == 3)
	{
		GameTextForPlayer(playerid, "~p~GANG DOS GATE~n~~r~PRESSIONE SHIFT", 2000, 3);
		SetPlayerColor(playerid,0xFFA500AA);
		gTeam[playerid] = TEAM_GATE'S;
		ClassP[playerid] = 3;
		SetPlayerTeam(playerid, 2);
	}
	else if(classid == 4)
	{
		GameTextForPlayer(playerid, "            ~p~GANG DOS MILITARES         ~r~PRESSIONE SHIFT", 2000, 3);
		SetPlayerColor(playerid,COLOR_BLUE);
		gTeam[playerid] = TEAM_MILITARES;
		ClassP[playerid] = 4;
		SetPlayerTeam(playerid, 3);
 	}
	else if(classid == 5)
	{
		GameTextForPlayer(playerid, "            ~p~GANG DOS CHINESES         ~r~PRESSIONE SHIFT", 2000, 3);
		SetPlayerColor(playerid,COLOR_PINK);
		gTeam[playerid] = TEAM_CHINESES;
		ClassP[playerid] = 5;
		SetPlayerTeam(playerid, 4);
 	}
	else if(classid == 6)
	{
		GameTextForPlayer(playerid, "            ~p~GANG DOS CHINESES         ~r~PRESSIONE SHIFT", 2000, 3);
		SetPlayerColor(playerid,COLOR_PINK);
		gTeam[playerid] = TEAM_CHINESES;
		ClassP[playerid] = 5;
		SetPlayerTeam(playerid, 4);
 	}
	else if(classid == 7)
	{
		GameTextForPlayer(playerid, "            ~p~GANG DOS FRANGOS         ~r~PRESSIONE SHIFT", 2000, 3);
		SetPlayerColor(playerid,COLOR_RED);
		gTeam[playerid] = TEAM_FRANGOS;
		ClassP[playerid] = 6;
		SetPlayerTeam(playerid, 5);
 	}
	else if(classid == 8)
	{
		GameTextForPlayer(playerid, "            ~p~GANG DOS AGENTES         ~r~PRESSIONE SHIFT", 2000, 3);
		SetPlayerColor(playerid,COLOR_GRAY);
		gTeam[playerid] = TEAM_AGENTES;
		ClassP[playerid] = 7;
		SetPlayerTeam(playerid, 6);
 	}
 	else if(classid == 9)
	{
		GameTextForPlayer(playerid, "            ~p~GANG DOS AGENTES         ~r~PRESSIONE SHIFT", 2000, 3);
		SetPlayerColor(playerid,COLOR_GRAY);
		gTeam[playerid] = TEAM_AGENTES;
		ClassP[playerid] = 7;
		SetPlayerTeam(playerid, 6);
 	}
	else if(classid == 10)
	{
		GameTextForPlayer(playerid, "        ~p~GANG DOS NOIAS         ~r~PRESSIONE SHIFT", 2000, 3);
		SetPlayerColor(playerid,COLOR_DODGERBLUE);
		gTeam[playerid] = TEAM_NOIAS;
		ClassP[playerid] = 8;
		SetPlayerTeam(playerid, 7);
 	}
 	else if(classid == 11)
	{
		GameTextForPlayer(playerid, "        ~p~GANG DOS NOIAS         ~r~PRESSIONE SHIFT", 2000, 3);
		SetPlayerColor(playerid,COLOR_DODGERBLUE);
		gTeam[playerid] = TEAM_NOIAS;
		ClassP[playerid] = 8;
		SetPlayerTeam(playerid, 7);
 	}
 	else if(classid == 12)
	{
		GameTextForPlayer(playerid, "            ~p~GANG DOS GANGSTERS         ~r~PRESSIONE SHIFT", 2000, 3);
		SetPlayerColor(playerid,COLOR_GOLDENROD);
		gTeam[playerid] = TEAM_GANGSTERS;
		ClassP[playerid] = 10;
		SetPlayerTeam(playerid, 9);
 	}
 	else if(classid == 13)
	{
		GameTextForPlayer(playerid, "            ~p~GANG DOS GANGSTERS         ~r~PRESSIONE SHIFT", 2000, 3);
		SetPlayerColor(playerid,COLOR_GOLDENROD);
		gTeam[playerid] = TEAM_GANGSTERS;
		ClassP[playerid] = 10;
		SetPlayerTeam(playerid, 9);
 	}
    else if(classid == 14)
	{
		GameTextForPlayer(playerid, "~p~GANG DOS COWBOYS~r~~n~PRESSIONE SHIFT", 2000, 3);
		SetPlayerColor(playerid,COLOR_BROWN);
		gTeam[playerid] = TEAM_COWBOYS;
		ClassP[playerid] = 11;
		SetPlayerTeam(playerid, 10);
 	}
	if(classid != 16)
	{
		SetPlayerInterior(playerid,0);
		SetPlayerInterior(playerid,17);
		SetPlayerPos(playerid, 489.4576,-15.1995,1000.6797);
        SetPlayerCameraPos(playerid, 484.9201,-11.7565,1000.6797);
        SetPlayerCameraLookAt(playerid, 489.4576,-15.1995,1000.6797);
        SetPlayerFacingAngle(playerid, 51.5555);
		ApplyAnimation(playerid, "Dancing", "Dan_Loop_A", 5, 1, 0, 0, 0, 0);
	}
	return 1;
}

public ZoneCheckpointChecker()
{
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(!IsPlayerConnected(i))continue;
        if(CPS_GetPlayerCheckpoint(i) > 0 && CPS_GetPlayerCheckpoint(i) <= MAX_GZS &&
                        gzcolors[CPS_GetPlayerCheckpoint(i)-1] != teamcolors[gTeam[i]])
        {
            if(cpzone[i][CPS_GetPlayerCheckpoint(i)] < 15)
            {
                if(cpzone[i][CPS_GetPlayerCheckpoint(i)] == 5)
                {
                    for(new j; j < MAX_PLAYERS; j++)
                    {
                        if(gTeam[j] == CPS_GetPlayerCheckpoint(i)-1)GameTextForPlayer(j, " ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~n~ ~y~Uma area de ~g~seu time ~y~esta sendo ~r~dominada~y~!", 4000, 4);
                    }
                }
				cpzone[i][CPS_GetPlayerCheckpoint(i)]++;
			    new tmp[10];
                format(tmp, sizeof tmp, "~w~%2d/15", cpzone[i][CPS_GetPlayerCheckpoint(i)]);
                GameTextForPlayer(i, tmp, 1005, 4);
          	    GangZoneFlashForAll(CPS_GetPlayerCheckpoint(i)-1, teamcolors[gTeam[i]]);
            	}
				else if(cpzone[i][CPS_GetPlayerCheckpoint(i)] == 15)
 				{
                GameTextForPlayer(i, "~r~AREA DOMINADA!!!", 4000, 3);
				GivePlayerMoney(i, 2000);
                gzcolors[CPS_GetPlayerCheckpoint(i)-1] = teamcolors[gTeam[i]];
                GangZoneStopFlashForAll(CPS_GetPlayerCheckpoint(i)-1);
                GangZoneHideForAll(CPS_GetPlayerCheckpoint(i)-1);
                GangZoneShowForAll(CPS_GetPlayerCheckpoint(i)-1, gzcolors[gTeam[i]]);
                new string[256];
                format(string, sizeof string, "|GANGZONE| - O (Os, A, As) '%s' invadiram e dominaram mais um territуrio!", teamnames[gTeam[i]]);
                SendClientMessageToAll(INFO, string);
                NoFlood[i] = 1;
                Dominar[i] ++;
            }
        }
	}
}
por favor alguem ve o que tem de errado!
Reply
#2

O Gm e decompilado?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)