[Ajuda] Problemas no comando Dominar!
#1

Olб a todos, estou aqui para pedir ajuda sobre um problema que estou, tenho um BUG em meu gamemode e nгo consigo resolver ele, coloquei um novo territуrio "Hidrelйtrica" para o Exйrcito e Piratas dominarem, sу que quando eu vou la e digito /DOMINAR aparece: Vocк nгo estб em nenhum territуrio, se tiver como alguйm poder me ajudar agradeзo!

Код:
else if(OrgID == 3 || OrgID == 27)
		{
		    if(IsPlayerInHidre(playerid))
			{
			    if(Dominando[playerid] == 1)
	    		{
	   				SendClientMessage(playerid, COLOR_GRAD5, "Vocк ja estб dominando um territorio.");
	    			return 1;
	    		}
	    		if(GuerranaHidre == 1)
	    		{
	   				SendClientMessage(playerid, COLOR_GRAD5, "Jб estб tendo uma guerra nesse territorio.");
	    			return 1;
	    		}
                GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
                format(string, sizeof(string), "%s %s estгo dominando a Hidre!",playername,NomeORGTr(OrgID));
				SendClientMessageToAll(OrgCor(OrgID), string);
			    SendClientMessage(playerid, COLOR_GRAD3, "Fique esperto os Inimigos foram avisados!");
			    SendClientMessage(playerid, COLOR_GRAD5, "Espere 30 segundos para dominar estб area .");
                GangZoneFlashForAll(GZHidre,OrgCor(OrgID));
                Dominando[playerid] = 1;
                ProvocoHidre[playerid] = 1;
                GuerranaHidre = 1;
        		TempoGuerraHidre = SetTimerEx("GuerraHidre", 30000, 0, "i", playerid);
				return 1;
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD3, "Vocк nгo estб em nenhum territуrio!");
			}
		}
Код:
stock IsPlayerInHidre(playerid)
{
    new Float:x, Float:y, Float:z;
    GetPlayerPos(playerid, x, y, z);
    if(x >= -591.7480 && y >= 1805.1368 && x <= -817.9867 && y <= 2048.1484) return 1;
    else return 0;
}
Essa IsPlayerInHidre, nгo tenho certeza se estб correta, se tiver como alguйm poder pegar as coordenadas para mim na Hidrelйtrica ficarei muito agradecido!
Reply
#2

Cara verifique se as coordenadas estгo certas ... com certeza estгo erradas

Peguei aqui rapidinho, verifique se estб certo com essas coordenadas....

PHP код:
stock IsPlayerInHidre(playerid)
{
    new 
Float:xFloat:yFloat:z;
    
GetPlayerPos(playeridxyz);
    if(
>= -806.5641 && >= 1725.0649 && <= -522.5461 && <= 2120.3743) return 1;
    else return 
0;

Lembre-se, й da esquerda de baixo, para a direita de cima...
Reply
#3

Entгo tambйm acho que pode ser as Coordenadas, sу que eu nгo sei como pegar certinho, fiz essa seguindo um tutorial, sу que nгo estгo certas eu acho ...
Seria pedir muito, pedir para alguйm pegar as coordenadas para mim?
Reply
#4

Jб lhe respondi, veja se funciona com as coordenadas que te mandei.
Reply
#5

The_Heart, muito agradecido, funciono corretamente! Muito obrigado!
Reply
#6

Nada, obs: mude tambйm na GangZoneCreate
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)