[Ajuda] Sistema de Territorio Dominar
#1

Olб,depois de muito tempo tentando resolver vim aqui pedi ajuda de alguem nao sei mas o que fazer ja usei o ****** e o forum aqui mas n achei o que podia mim ajudar!Bom vamos la..
Tou com o Gm do PlayCity aqui e resovi editalo o sistema de gangzone ai resovi add a ORG PM pra dominar no park gleenn,e no cemiterio ate ai add tudo certo mas..

FALA QUE VOCE NAO ESTAR EM NEM UM TERRITORIO. Jб verifiquei todo o script e nгo funfa, mas nao da certo!

OBS:So a Pista de skate que funfa ja olhei tudo na Pista de skate e ta tudo igual no Park mas nao domina!
E tanbem no shop Center!

Eu acho que e so com a ORG Policia Militar isso '-'Bom eu acho!


Код:
if(strcmp(cmd, "/dominar", true) == 0 || strcmp(cmd, "/do", true) == 0)
	{
	    new carid = GetPlayerVehicleID(playerid);
	    if(IsAPlane(carid))
		{
	   		SendClientMessage(playerid, COLOR_GRAD5, "Vocк nгo pode usar esse comando dentro de um heli ou aviгo.");
	    	return 1;
	    }
Esse e o script da Pista de skate que funfa!

Код:
if(PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pLider] == 1)// PM
		{
			if(IsPlayerInSkate(playerid))
			{
			    if(Dominando[playerid] == 1)
	   			{
	   				SendClientMessage(playerid, COLOR_GRAD5, "Vocк ja estб dominando um territorio.");
	    			return 1;
    			}
    			if(GuerranoSkate == 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 e a Policia Militar estгo dominando a Pista de Skate!",playername);
				SendClientMessageToAll(COR_PM, string);
			    SendClientMessage(playerid, COLOR_GRAD3, "Fique esperto, todas as gangues foram avisadas!");
			    SendClientMessage(playerid, COLOR_GRAD5, "Espere 30 segundos para dominar estб area .");
                GangZoneFlashForAll(GZSkate,GCOP_COLOR);
                Dominando[playerid] = 1;
                ProvocoSkate[playerid] = 1;
                GuerranoSkate = 1;
   				TempoGuerraSkate = SetTimerEx("GuerraSkate", 30000, 0, "i", playerid);
				return 1;
			}
			else
			{
				SendClientMessage(playerid, COLOR_GRAD3, "Vocк nгo estб em nenhum territуrio!");
			}
			return 1;
		}
Essee o script do Park Gleen que nao funciona!

Код:
if(PlayerInfo[playerid][pMembro] == 1 || PlayerInfo[playerid][pLider] == 1)// PM
		    {
			if(IsPlayerInPark(playerid))
			{
			    if(Dominando[playerid] == 1)
	   			{
	   				SendClientMessage(playerid, GCOP_COLOR, "Vocк ja estб dominando um territorio.");
	    			return 1;
    			}
    			if(GuerranoPark == 1)
    			{
	   				SendClientMessage(playerid, GCOP_COLOR, "Jб estб tendo uma guerra nesse territorio.");
	    			return 1;
    			}
			    GetPlayerName(playerid, playername, MAX_PLAYER_NAME);
	            format(string, sizeof(string), "%s e a Policia Militar estгo dominando o Park Gleen!",playername);
				SendClientMessageToAll(COR_PM, string);
			    SendClientMessage(playerid, GCOP_COLOR, "Fique esperto, todas as gangues foram avisadas!");
			    SendClientMessage(playerid, GCOP_COLOR, "Espere 30 segundos para dominar estб area .");
                GangZoneFlashForAll(GZPark,GCOP_COLOR);
                Dominando[playerid] = 1;
                ProvocoPark[playerid] = 1;
                GuerranoPark = 1;
   				TempoGuerraPark = SetTimerEx("GuerraPark", 30000, 0, "i", playerid);
				return 1;
            }
            else
			{
				SendClientMessage(playerid, COLOR_GRAD3, "Vocк nгo estб em nenhum territуrio!!!!!");
			}
			return 1;
		    }
Reply
#2

Qual й a mensagem que retorna no sistema que ( nгo funciona )?
Reply
#3

Quote:
Originally Posted by Schocc
Посмотреть сообщение
Qual й a mensagem que retorna no sistema que ( nгo funciona )?

Код:
Vocк nгo estб em nehum territуrio!
So fala isso
Reply
#4

Posta a funзгo
Код:
IsPlayerInPark(playerid)
Reply
#5

Quote:
Originally Posted by Schocc
Посмотреть сообщение
Posta a funзгo
Код:
IsPlayerInPark(playerid)
Код:
stock IsPlayerInPark(playerid)
{
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid, x, y, z);
    if(x >= 1866.346 && y >= -1259.454 && x <= 2052.685 && y <= -1137.074) return 1;
    else return 0;
}
Reply
#6

Quote:
Originally Posted by MaTeuS_FeLiPe
Посмотреть сообщение
Код:
stock IsPlayerInPark(playerid)
{
    new Float:x,Float:y,Float:z;
    GetPlayerPos(playerid, x, y, z);
    if(x >= 1866.346 && y >= -1259.454 && x <= 2052.685 && y <= -1137.074) return 1;
    else return 0;
}
Quando a pos Y vai ser maior que -1259.454 e menor que -1137.074, Creio que seja o problema


Isso faz sempre retornar false ( 0 ), ou seja sempre vai aparecer a msg
Reply
#7

Quote:

Bom acho que nao isso pq as outras orgs consegue dominar o Park,isso sу nгo da com as orgs que add nas Gangzone

Nгo manjo muito de script,e nem sei se egiste mas tou pensando,Tipo cada GangZone tem um nomero de Orgs, Pra dominar Serrar ? Ou isso nгo egiste?
Reply


Forum Jump:


Users browsing this thread: 6 Guest(s)