[AJUDA]Dominar Territorio
#1

Quando dou /territorio, ao invez de dominar sу na area que ele ta, aparece que ele ta dominando as 3 gzs!

Код:
CMD:territorio(playerid, params[])
{
	if(IsPlayerInArea(playerid,-2614.856, -352.7297, -2356.056, -218.6009) || IsPlayerInArea(playerid,-2553.053, 1130.577, -2313.566, 1319.935) || IsPlayerInArea(playerid,-2977.858, -1693.292, -2826.046, -1202.821))
	{
		if(PlayerInfo[playerid][pCV] >= 3)
		{
			SendClientMessage(playerid, VERDE_LIMA,"Vocк deve ficar na бrea por 30 segundos para poder dominб-la");
			SetTimerEx("funcaogz", 1000, 0,"e",playerid);
			return 1;
		}
	}
	return SendClientMessage(playerid, VERDE_LIMA,"Vocк nгo й um Gerente Geral para dominiar esta favela!");
}
Код:
public funcaogz(playerid)
	{
 		if(PlayerInfo[playerid][pCV] >= 3)
  		{
        	GetPlayerName(playerid, Jogador, sizeof(Jogador));//PEGA O NOME DO CARA QUE TБ DOMINANDO
         	format(Celula,sizeof(Celula),"%s e o Comando Vermelho estгo dominando a Rocinha!",Jogador);//mostra a mensagem
          	SendClientMessageToAll(VERMELHO,Celula);//envia a msg a todos
           	GangZoneFlashForAll(gzada,VERMELHO);//a cor da gangzone quando ele estiver dominando
            SetTimerEx("cvdominou", 30000, 0,"e",playerid);// o tempo de domнnio
        }
  		if(PlayerInfo[playerid][pCV] >= 3)
        {
            GetPlayerName(playerid, Jogador, sizeof(Jogador));
        	format(Celula,sizeof(Celula),"%s e o Comando Vermelho estгo dominando a Chatuba!",Jogador);
        	SendClientMessageToAll(VERMELHO,Celula);
        	GangZoneFlashForAll(gztcp,VERMELHO);
        	SetTimerEx("cvdominou", 30000, 0,"e",playerid);
        }
   		if(PlayerInfo[playerid][pCV] >= 3)
        {
            GetPlayerName(playerid, Jogador, sizeof(Jogador));
        	format(Celula,sizeof(Celula),"%s e o Comando Vermelho estгo dominando  a Paraisуpolis!",Jogador);
        	SendClientMessageToAll(VERMELHO,Celula);
        	GangZoneFlashForAll(gzpcc,VERMELHO);
        	SetTimerEx("cvdominou", 30000, 0,"e",playerid);
        }
	}
Код:
public cvdominou(playerid)
{
    if(IsPlayerInArea(playerid,-2614.856, -352.7297, -2356.056, -218.6009))//verifica se o player estб dentro da gz
    {
    	GangZoneStopFlashForAll(gzada);
    	GangZoneHideForAll(gzada);
    	GangZoneShowForAll(gzada,gzcv);
    	SendClientMessageToAll(VERMELHO, "O Comando Vermelho dominou a Rocinha!");
    }
    if(IsPlayerInArea(playerid,-2553.053, 1130.577, -2313.566, 1319.935))
    {
        GangZoneStopFlashForAll(gztcp);
        GangZoneHideForAll(gztcp);
    	GangZoneShowForAll(gztcp,gzcv);
    	SendClientMessageToAll(VERMELHO, "O Comando Vermelho dominou a Chatuba!");
    }
    if(IsPlayerInArea(playerid,-2977.858, -1693.292, -2826.046, -1202.821))
    {
        GangZoneStopFlashForAll(gzpcc);
        GangZoneHideForAll(gzpcc);
    	GangZoneShowForAll(gzpcc,gzcv);
    	SendClientMessageToAll(VERMELHO, "O Comando Vermelho dominou a Paraisуpolis!");
    }
    return 1;
}
Код:
stock IsPlayerInArea(playerid, Float:minx, Float:miny, Float:maxx, Float:maxy)
{
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid, x, y, z);
    if(x >= minx && y >= miny && x <= maxx && y <= maxy) return true;
    else return false;
}
Reply
#2

Idente seu CODE, aqui estб:
pawn Код:
public funcaogz(playerid)
    {
        if(PlayerInfo[playerid][pCV] >= 3)
        {
            if(IsPlayerInArea(playerid,-2614.856, -352.7297, -2356.056, -218.6009))
            {
                GetPlayerName(playerid, Jogador, sizeof(Jogador));//PEGA O NOME DO CARA QUE TБ DOMINANDO
                format(Celula,sizeof(Celula),"%s e o Comando Vermelho estгo dominando a Rocinha!",Jogador);//mostra a mensagem
                SendClientMessageToAll(VERMELHO,Celula);//envia a msg a todos
                GangZoneFlashForAll(gzada,VERMELHO);//a cor da gangzone quando ele estiver dominando
                SetTimerEx("cvdominou", 30000, 0,"e",playerid);// o tempo de domнnio
             }
        }
        if(PlayerInfo[playerid][pCV] >= 3)
        {
            if(IsPlayerInArea(playerid,-2977.858, -1693.292, -2826.046, -1202.821))
            {
                GetPlayerName(playerid, Jogador, sizeof(Jogador));
                format(Celula,sizeof(Celula),"%s e o Comando Vermelho estгo dominando a Chatuba!",Jogador);
                SendClientMessageToAll(VERMELHO,Celula);
                GangZoneFlashForAll(gztcp,VERMELHO);
                SetTimerEx("cvdominou", 30000, 0,"e",playerid);
            }
        }
        if(PlayerInfo[playerid][pCV] >= 3)
        {
            if(IsPlayerInArea(playerid,-2977.858, -1693.292, -2826.046, -1202.821))
            {
                GetPlayerName(playerid, Jogador, sizeof(Jogador));
                format(Celula,sizeof(Celula),"%s e o Comando Vermelho estгo dominando  a Paraisуpolis!",Jogador);
                SendClientMessageToAll(VERMELHO,Celula);
                GangZoneFlashForAll(gzpcc,VERMELHO);
                SetTimerEx("cvdominou", 30000, 0,"e",playerid);
            }
        }
    }
Reply
#3

Quote:
Originally Posted by CidadeNovaRP
Посмотреть сообщение
Idente seu CODE, aqui estб:
pawn Код:
public funcaogz(playerid)
    {
        if(PlayerInfo[playerid][pCV] >= 3)
        {
            if(IsPlayerInArea(playerid,-2614.856, -352.7297, -2356.056, -218.6009))
            {
                GetPlayerName(playerid, Jogador, sizeof(Jogador));//PEGA O NOME DO CARA QUE TБ DOMINANDO
                format(Celula,sizeof(Celula),"%s e o Comando Vermelho estгo dominando a Rocinha!",Jogador);//mostra a mensagem
                SendClientMessageToAll(VERMELHO,Celula);//envia a msg a todos
                GangZoneFlashForAll(gzada,VERMELHO);//a cor da gangzone quando ele estiver dominando
                SetTimerEx("cvdominou", 30000, 0,"e",playerid);// o tempo de domнnio
             }
        }
        if(PlayerInfo[playerid][pCV] >= 3)
        {
            if(IsPlayerInArea(playerid,-2977.858, -1693.292, -2826.046, -1202.821))
            {
                GetPlayerName(playerid, Jogador, sizeof(Jogador));
                format(Celula,sizeof(Celula),"%s e o Comando Vermelho estгo dominando a Chatuba!",Jogador);
                SendClientMessageToAll(VERMELHO,Celula);
                GangZoneFlashForAll(gztcp,VERMELHO);
                SetTimerEx("cvdominou", 30000, 0,"e",playerid);
            }
        }
        if(PlayerInfo[playerid][pCV] >= 3)
        {
            if(IsPlayerInArea(playerid,-2977.858, -1693.292, -2826.046, -1202.821))
            {
                GetPlayerName(playerid, Jogador, sizeof(Jogador));
                format(Celula,sizeof(Celula),"%s e o Comando Vermelho estгo dominando  a Paraisуpolis!",Jogador);
                SendClientMessageToAll(VERMELHO,Celula);
                GangZoneFlashForAll(gzpcc,VERMELHO);
                SetTimerEx("cvdominou", 30000, 0,"e",playerid);
            }
        }
    }
Ajudou bastante, sу que agora quando termina de domoninar a gz some! +rep
Reply
#4

Quote:
Originally Posted by .ThePro
Посмотреть сообщение
Ajudou bastante, sу que agora quando termina de domoninar a gz some! +rep
Ta ae :
pawn Код:
public cvdominou(playerid)
{
    if(IsPlayerInArea(playerid,-2614.856, -352.7297, -2356.056, -218.6009))//verifica se o player estб dentro da gz
    {
        GangZoneStopFlashForAll(gzada);
        //GangZoneHideForAll(gzada);
        GangZoneShowForAll(gzada,gzcv);
        SendClientMessageToAll(VERMELHO, "O Comando Vermelho dominou a Rocinha!");
    }
    if(IsPlayerInArea(playerid,-2553.053, 1130.577, -2313.566, 1319.935))
    {
        GangZoneStopFlashForAll(gztcp);
        //GangZoneHideForAll(gztcp);
        GangZoneShowForAll(gztcp,gzcv);
        SendClientMessageToAll(VERMELHO, "O Comando Vermelho dominou a Chatuba!");
    }
    if(IsPlayerInArea(playerid,-2977.858, -1693.292, -2826.046, -1202.821))
    {
        GangZoneStopFlashForAll(gzpcc);
        //GangZoneHideForAll(gzpcc);
        GangZoneShowForAll(gzpcc,gzcv);
        SendClientMessageToAll(VERMELHO, "O Comando Vermelho dominou a Paraisуpolis!");
    }
    return 1;
}
Reply
#5

Quote:
Originally Posted by CidadeNovaRP
Посмотреть сообщение
Ta ae :
pawn Код:
public cvdominou(playerid)
{
    if(IsPlayerInArea(playerid,-2614.856, -352.7297, -2356.056, -218.6009))//verifica se o player estб dentro da gz
    {
        GangZoneStopFlashForAll(gzada);
        //GangZoneHideForAll(gzada);
        GangZoneShowForAll(gzada,gzcv);
        SendClientMessageToAll(VERMELHO, "O Comando Vermelho dominou a Rocinha!");
    }
    if(IsPlayerInArea(playerid,-2553.053, 1130.577, -2313.566, 1319.935))
    {
        GangZoneStopFlashForAll(gztcp);
        //GangZoneHideForAll(gztcp);
        GangZoneShowForAll(gztcp,gzcv);
        SendClientMessageToAll(VERMELHO, "O Comando Vermelho dominou a Chatuba!");
    }
    if(IsPlayerInArea(playerid,-2977.858, -1693.292, -2826.046, -1202.821))
    {
        GangZoneStopFlashForAll(gzpcc);
        //GangZoneHideForAll(gzpcc);
        GangZoneShowForAll(gzpcc,gzcv);
        SendClientMessageToAll(VERMELHO, "O Comando Vermelho dominou a Paraisуpolis!");
    }
    return 1;
}
Adianto nгo, depois que ela para de piscar ela some!
Reply
#6

Quote:
Originally Posted by .ThePro
Посмотреть сообщение
Adianto nгo, depois que ela para de piscar ela some!
Tem um outro CODE relacionado a isso?
Reply
#7

Procure todos os
pawn Код:
GangZoneHideForAll
e delete-os, veja se da certo
Reply
#8

Quote:
Originally Posted by CidadeNovaRP
Посмотреть сообщение
Procure todos os
pawn Код:
GangZoneHideForAll
e delete-os, veja se da certo
os que tem sгo os que estгo aу no cod!
nгo hб mais nenhum!
Reply
#9

Quote:
Originally Posted by .ThePro
Посмотреть сообщение
os que tem sгo os que estгo aу no cod!
nгo hб mais nenhum!
Cara, entгo eu nгo sei mais do que isso, nгo conheзo muito sobre GZ's, desculpe
Reply
#10

Quote:
Originally Posted by CidadeNovaRP
Посмотреть сообщение
Cara, entгo eu nгo sei mais do que isso, nгo conheзo muito sobre GZ's, desculpe
Consegui aqui, valeu aн pela forзa!
Код:
   if(IsPlayerInArea(playerid,-2614.856, -352.7297, -2356.056, -218.6009))//verifica se o player estб dentro da gz
    {
        GangZoneStopFlashForAll(gzada);
        GangZoneHideForAll(gzada);
        GangZoneShowForAll(gzada,gzcv);
        GangZoneShowForAll(gzada, VERMELHO);
        SendClientMessageToAll(VERMELHO, "O Comando Vermelho dominou a Rocinha!");
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)