Jump to content
  • 0

Problemă teritorii v2


Stephen

Question

Problemă întâlnită (descriere): Cum măresc teritoriile facțiunilor în general? De la zona de spawn până la zonele speciale de atacuri. ( takezone )
Ero(area / rile) / warning-(ul / urile): - 
Liniile de cod / sursa / script-ul: - 
Imagini / Video (optional): -
Aţi încercat să rezolvaţi singur?: Da.

350x20_00FFF7_FFFFFF_000000_000000.png7YwhJMC.png

ySdxY9L.png

 

76561198117970407.png9Xc59Z4.png

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

// Zones
for(new i = 0; i < sizeof(TurfInfo); i++)
{
     Turfs = GangZoneCreate(TurfInfo[zMinX],TurfInfo[zMinY],TurfInfo[zMaxX],TurfInfo[zMaxY]);
     VarriorsLosAztecs = GangZoneCreate(611.4101, -1314.722, 793.9462, -1184.446);
     GroveStreet = GangZoneCreate(2421.56, -1737.13, 2539.448, -1630.541);
     Ballas = GangZoneCreate(2128.742, -1551.586, 2204.798, -1385.781);
     LosSantosVagos = GangZoneCreate(2140.15, -1294.983, 2288.461, -959.4252);
     TheCorleoneFamily = GangZoneCreate(-2372.8977, 481.0502, 2877.7344, 1016.6313);
     TheStracciFamily = GangZoneCreate(-2115.7246, 816.3365, -1642.1577, 1381.8909);
}

Nu, mă refer la acele coordonate. Eu le-am pus la TCF și TSF, dar am pus doar pe zona de spawn a facțiunii. 

Vreau să extind zonele, astfel încât mafiile să dea takezone între ele.

Asta e zona mafiilor, vreau să le unesc între ele (zonele de atac)

 

IH7QPJT.png

350x20_00FFF7_FFFFFF_000000_000000.png7YwhJMC.png

ySdxY9L.png

 

76561198117970407.png9Xc59Z4.png

Link to comment
Share on other sites

if(strcmp(cmd,"/takezone",true)==0)
	{
	    if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pLeader] == 6 || PlayerInfo[playerid][pLeader] == 12 || PlayerInfo[playerid][pLeader] == 13 || PlayerInfo[playerid][pLeader] == 14 || PlayerInfo[playerid][pLeader] == 15)
		{
			for(new z=0; z<sizeof(ZoneInfo); z++)
			{
			    if(IsPlayerInZone(playerid,z))
			    {
		            if(takezone == 1)
		            {
		                SendClientMessage(playerid, COLOR_GRAD1, "   The Gang war is allready started");
					}
					else
					{
					    new leader[30];
					    format(leader,sizeof(leader),"%s" ,ZoneInfo[GetPlayerZone(playerid)][zOwner]);
					    #define min 30000
						GetPlayerName(playerid, sendername, sizeof(sendername));
						
						if(ZoneInfo[GetPlayerZone(playerid)][zTeam] == 5 && PlayerInfo[playerid][pLeader] == 5)
					    {
					        SendClientMessage(playerid, COLOR_GRAD1, "    Error. You are in an area of your");
					    }
						if(ZoneInfo[GetPlayerZone(playerid)][zTeam] == 6 && PlayerInfo[playerid][pLeader] == 6)
					    {
					        SendClientMessage(playerid, COLOR_GRAD1, "    Error. You are in an area of your");
					    }
					    if(ZoneInfo[GetPlayerZone(playerid)][zTeam] == 12 && PlayerInfo[playerid][pLeader] == 12)
					    {
					        SendClientMessage(playerid, COLOR_GRAD1, "    Error. You are in an area of your");
					    }
					    else if(ZoneInfo[GetPlayerZone(playerid)][zTeam] == 13 && PlayerInfo[playerid][pLeader] == 13)
					    {
					        SendClientMessage(playerid, COLOR_GRAD1, "    Error. You are in an area of your");
					    }
					    else if(ZoneInfo[GetPlayerZone(playerid)][zTeam] == 14 && PlayerInfo[playerid][pLeader] == 14)
					    {
					        SendClientMessage(playerid, COLOR_GRAD1, "    Error. You are in an area of your");
					    }
					    else if(ZoneInfo[GetPlayerZone(playerid)][zTeam] == 15 && PlayerInfo[playerid][pLeader] == 15)
					    {
					        SendClientMessage(playerid, COLOR_GRAD1, "    Error. You are in an area of your");
						}
		    			if(ZoneInfo[GetPlayerZone(playerid)][zTeam] == 5 && PlayerInfo[playerid][pLeader] == 5)
		    			{
					        if(cooldowntcf == 0)
							{
						        format(string, sizeof(string), " {FFFFFF}* {C21BE0}The Corleone Family {FFFFFF}Leader %s is attacking a territory held by {05A100}The Stracci Family{FFFFFF}!",sendername,leader);
						        SendClientMessageToAll(-1, string);
						        takezone=1;
		                        ZoneInfo[z][zTakeOn] = 1;
						    	GangZoneFlashForAll(GetPlayerZone(playerid), COLOR_RED);
						    	timertcftsf=SetTimer("tcftsf",min*20,0);
						    	tcfvstsf = 1;
						    			cooldowntcf = 21600;
							}
							else
							{
								format(string, 128, "   The Corleone Family has cooldown. Must wait 6 hours (%d seconds).",cooldownblls);
								SendClientMessage(playerid,COLOR_GREY, string);
							}
			    		}
			    		if(ZoneInfo[GetPlayerZone(playerid)][zTeam] == 6 && PlayerInfo[playerid][pLeader] == 6)
		    			{
					        if(cooldowntcf == 0)
							{
						        format(string, sizeof(string), " {FFFFFF}* {C21BE0}The Sracci Family {FFFFFF}Leader %s is attacking a territory held by {05A100}The Corleone Family{FFFFFF}!",sendername,leader);
						        SendClientMessageToAll(-1, string);
						        takezone=1;
		                        ZoneInfo[z][zTakeOn] = 1;
						    	GangZoneFlashForAll(GetPlayerZone(playerid), COLOR_RED);
						    	timertsftcf=SetTimer("tsftcf",min*20,0);
						    	tsfvstcf = 1;
						    			cooldowntsf = 21600;
							}
							else
							{
								format(string, 128, "   The Stracci Family has cooldown. Must wait 6 hours (%d seconds).",cooldownblls);
								SendClientMessage(playerid,COLOR_GREY, string);
							}
			    		}
					    else if(ZoneInfo[GetPlayerZone(playerid)][zTeam] == 12 && PlayerInfo[playerid][pLeader] == 14)
						{
						    if(cooldownblls == 0)
							{
						        format(string, sizeof(string), " {FFFFFF}* {C21BE0}Ballas {FFFFFF}Leader %s is attacking a territory held by the{05A100}Grove Street{FFFFFF}!",sendername,leader);
						        SendClientMessageToAll(-1, string);
						        takezone=1;
		                        ZoneInfo[z][zTakeOn] = 1;
						    	GangZoneFlashForAll(GetPlayerZone(playerid), COLOR_RED);
						    	timerbllsgst=SetTimer("bllsgst",min*20,0);
						    	bllsvsgst = 1;
						    			cooldownblls = 21600;
							}
							else
							{
								format(string, 128, "   Ballas has cooldown. Must wait 6 hours (%d seconds).",cooldownblls);
								SendClientMessage(playerid,COLOR_GREY, string);
							}
			    		}
					    else if(ZoneInfo[GetPlayerZone(playerid)][zTeam] == 12 && PlayerInfo[playerid][pLeader] == 14)
						{
						    if(cooldownlsv == 0)
							{
	      						format(string, sizeof(string), " {FFFFFF}* {F2EB16}Los Santos Vagos {FFFFFF}Leader %s is attacking a territory held by the {05A100}Grove Street{FFFFFF}!",sendername,leader);
						        SendClientMessageToAll( -1, string);
						        takezone=1;
						        ZoneInfo[z][zTakeOn] = 1;
						    	GangZoneFlashForAll(GetPlayerZone(playerid), COLOR_RED);
		                        timerlsvgst=SetTimer("lsvgst",min*20,0);
		                        lsvvsgst = 1;
						    			cooldownlsv = 21600;
	                        }
							else
							{
								format(string, 128, "   Los Santos Vagos has cooldown. Must wait 6 hours (%d seconds).",cooldownlsv);
								SendClientMessage(playerid,COLOR_GREY, string);
							}
						}
		    			else if(ZoneInfo[GetPlayerZone(playerid)][zTeam] == 12 && PlayerInfo[playerid][pLeader] == 15)
						{
						    /*if(cooldowngst == 0)
							{
	      						format(string, sizeof(string), "   {FFFFFF}Leader %s of {00FFFB}Varriors Los Aztecas{FFFFFF} attacked leader %s of {05A100}Grove Street",sendername,leader);
						        SendClientMessageToAll( -1, string);
						        takezone=1;
						        ZoneInfo[z][zTakeOn] = 1;
						    	GangZoneFlashForAll(GetPlayerZone(playerid), COLOR_RED);
						    	timervlagst=SetTimer("vlagst",min*20,0);
						    	vlavsgst = 1;
						    			cooldownvla = 21600;
	                        }
							else
							{
								format(string, 128, "   Varriors Los Aztecas has cooldown. Must wait 6 hours (%d seconds).",cooldowngst);
								SendClientMessage(playerid,COLOR_GREY, string);
							}*/

							SendClientMessage(playerid, COLOR_GREY," You're in an alliance with Grove Street.");
						}
					 	else if(ZoneInfo[GetPlayerZone(playerid)][zTeam] == 13 && PlayerInfo[playerid][pLeader] == 12)
						{
						    if(cooldowngst == 0)
							{
	         					format(string, sizeof(string), " {FFFFFF}* {05A100}Grove Street {FFFFFF}Leader %s is attacking a territory held by the {C21BE0}Ballas{FFFFFF}!",sendername,leader);
						        SendClientMessageToAll( -1, string);
						        takezone=1;
						        ZoneInfo[z][zTakeOn] = 1;
						    	GangZoneFlashForAll(GetPlayerZone(playerid), COLOR_RED);
						    	timergstblls=SetTimer("gstblls",min*20,0);
						    			cooldowngst = 21600;
						    	bllsvsgst = 1;
							}
	                        else
							{
								format(string, 128, "   Grove Street has cooldown. Must wait 6 hours (%d seconds).",cooldowngst);
								SendClientMessage(playerid,COLOR_GREY, string);
							}
	   					}
					    else if(ZoneInfo[GetPlayerZone(playerid)][zTeam] == 13 && PlayerInfo[playerid][pLeader] == 14)
					    {
					        /*if(cooldownblls == 0)
							{
						        format(string, sizeof(string), "   {FFFFFF}Leader %s of {F0E800}Los Santos Vagos {FFFFFF}attacked leader %s of {C21BE0}Ballas",sendername,leader);
						        SendClientMessageToAll( -1, string);
						        takezone=1;
						        ZoneInfo[z][zTakeOn] = 1;
						    	GangZoneFlashForAll(GetPlayerZone(playerid), COLOR_RED);
						    	timerlsvblls=SetTimer("lsvblls",min*20,0);
						    	for(new i=0; i<MAX_PLAYERS; i++)
						    	{
						    	    if(PlayerInfo[pLeader] == 14)
						    	    {
						    			cooldownlsv = 21600;
									}
								}
								lsvvsblls=1;
							}
							else
							{
								format(string, 128, "   Los Santos Vagos has cooldown. Must wait 6 hours (%d seconds).",cooldownlsv);
								SendClientMessage(playerid,COLOR_GREY, string);
							}*/
							SendClientMessage(playerid, COLOR_GREY," You're in an alliance with Ballas.");
						}
		    			else if(ZoneInfo[GetPlayerZone(playerid)][zTeam] == 13 && PlayerInfo[playerid][pLeader] == 15)
					    {
					        if(cooldownvla == 0)
							{
						        format(string, sizeof(string), " {FFFFFF}* {00F2FF}Varriors Los Aztecas {FFFFFF}Leader %s is attacking a territory held by the {C21BE0}Ballas{FFFFFF}!",sendername,leader);
		       					SendClientMessageToAll( -1, string);
		       					takezone=1;
		       					ZoneInfo[z][zTakeOn] = 1;
						    	GangZoneFlashForAll(GetPlayerZone(playerid), COLOR_RED);
						    	timervlablls=SetTimer("vlablls",min*20,0);
						    	vlavsblls = 1;
						    			cooldownvla = 21600;
						    }
						    else
							{
								format(string, 128, "   Varriors Los Aztecas has cooldown. Must wait 6 hours (%d seconds).",cooldownvla);
								SendClientMessage(playerid,COLOR_GREY, string);
							}
					    }
					    else if(ZoneInfo[GetPlayerZone(playerid)][zTeam] == 14 && PlayerInfo[playerid][pLeader] == 12)
					    {
					        if(cooldowngst == 0)
							{
						        format(string, sizeof(string), " {FFFFFF}* {05A100}Grove Street {FFFFFF}Leader %s is attacking a territory held by the {F2EB16}Los Santos Vagos{FFFFFF}!",sendername,leader);
		       					SendClientMessageToAll( -1, string);
		       					takezone=1;
		       					ZoneInfo[z][zTakeOn] = 1;
						    	GangZoneFlashForAll(GetPlayerZone(playerid), COLOR_RED);
						    	timergstlsv=SetTimer("gstlsv",min*20,0);
						    			cooldowngst = 21600;
						    	lsvvsgst = 1;
					    	}
					    	else
					    	{
					    		format(string, 128, "   Grove Street has cooldown. Must wait 6 hours (%d seconds).",cooldowngst);
								SendClientMessage(playerid,COLOR_GREY, string);
					    	}

					    }
				     	else if(ZoneInfo[GetPlayerZone(playerid)][zTeam] == 14 && PlayerInfo[playerid][pLeader] == 13)
					    {
					        /*if(cooldownlsv == 0)
							{
						        format(string, sizeof(string), "   {FFFFFF}Leader %s of {C21BE0}Ballas {FFFFFF}attacked leader %s of {F0E800}Los Santos Vagos",sendername,leader);
		       					SendClientMessageToAll( -1, string);
		       					takezone=1;
		       					ZoneInfo[z][zTakeOn] = 1;
						    	GangZoneFlashForAll(GetPlayerZone(playerid), COLOR_RED);
						    	timerbllslsv=SetTimer("bllslsv",min*20,0);
						    	for(new i=0; i<MAX_PLAYERS; i++)
						    	{
						    	    if(PlayerInfo[pLeader] == 13)
						    	    {
						    			cooldownblls = 21600;
									}
								}
						    	lsvvsblls=1;
							}
	                        else
					    	{
					    		format(string, 128, "   Ballas has cooldown. Must wait 6 hours (%d seconds).",cooldownlsv);
								SendClientMessage(playerid,COLOR_GREY, string);
					    	}*/
					    	SendClientMessage(playerid, COLOR_GREY," You're in an alliance with Los Santos Vagos.");
					    }
				     	else if(ZoneInfo[GetPlayerZone(playerid)][zTeam] == 14 && PlayerInfo[playerid][pLeader] == 15)
					    {
					        if(cooldownvla == 0)
							{
						        format(string, sizeof(string), " {FFFFFF}* {00F2FF}Varriors Los Aztecas {FFFFFF}Leader %s is attacking a territory held by the {F2EB16}Los Santos Vagos{FFFFFF}!",sendername,leader);
		       					SendClientMessageToAll( -1, string);
		       					takezone=1;
		       					ZoneInfo[z][zTakeOn] = 1;
						    	GangZoneFlashForAll(GetPlayerZone(playerid), COLOR_RED);
						    	timervlalsv=SetTimer("vlalsv",min*20,0);
						    			cooldownvla = 21600;
						    	vlavslsv = 1;
					    	}
	                        else
					    	{
					    		format(string, 128, "   Varriors Los Aztecas has cooldown. Must wait 6 hours (%d seconds).",cooldownvla);
								SendClientMessage(playerid,COLOR_GREY, string);
					    	}

					    }
					    else if(ZoneInfo[GetPlayerZone(playerid)][zTeam] == 15 && PlayerInfo[playerid][pLeader] == 12)
					    {
					       /* if(cooldownvla == 0)
							{
						        format(string, sizeof(string), "   {FFFFFF}Leader %s of {05A100}Grove Street {FFFFFF}attacked leader %s of {00FFFB}Varriors Los Aztecas",sendername,leader);
		       					SendClientMessageToAll( -1, string);
		       					takezone=1;
		       					ZoneInfo[z][zTakeOn] = 1;
						    	GangZoneFlashForAll(GetPlayerZone(playerid), COLOR_RED);
						    	timergstvla=SetTimer("gstvla",min*20,0);
						    	for(new i=0; i<MAX_PLAYERS; i++)
						    	{
						    	    if(PlayerInfo[pLeader] == 12)
						    	    {
						    			cooldowngst = 21600;
									}
								}
						    	vlavsgst = 1;
					    	}
					    	else
					    	{
					    		format(string, 128, "   Grove Street has cooldown. Must wait 6 hours (%d seconds).",cooldownvla);
								SendClientMessage(playerid,COLOR_GREY, string);
					    	}*/
					    	SendClientMessage(playerid, COLOR_GREY," You're in an alliance with Varrios Los Aztecas.");

					    }
					    else if(ZoneInfo[GetPlayerZone(playerid)][zTeam] == 15 && PlayerInfo[playerid][pLeader] == 13)
					    {
					        if(cooldownblls == 0)
							{
						        format(string, sizeof(string), " {FFFFFF}* {C21BE0}Ballas {FFFFFF}Leader %s is attacking a territory held by the {00F2FF}Varriors Los Aztecas{FFFFFF}!",sendername,leader);
		       					SendClientMessageToAll( -1, string);
		       					takezone=1;
		       					ZoneInfo[z][zTakeOn] = 1;
						   		GangZoneFlashForAll(GetPlayerZone(playerid), COLOR_RED);
						   		timerbllsvla=SetTimer("bllsvla",min*20,0);
						    			cooldownblls = 21600;
						   		vlavsblls = 1;
					   		}
					    	else
					    	{
					    		format(string, 128, "   Ballas has cooldown. Must wait 6 hours (%d seconds).",cooldownblls);
								SendClientMessage(playerid,COLOR_GREY, string);
					    	}

					    }
					    else if(ZoneInfo[GetPlayerZone(playerid)][zTeam] == 15 && PlayerInfo[playerid][pLeader] == 14)
					    {
					        if(cooldownlsv == 0)
							{
						        format(string, sizeof(string), " {FFFFFF}* {F2EB16}Los Santos Vagos {FFFFFF}Leader %s is attacking a territory held by the {00F2FF}Varriors Los Aztecas{FFFFFF}!",sendername,leader);
		       					SendClientMessageToAll( -1, string);
		       					takezone=1;
		                        ZoneInfo[z][zTakeOn] = 1;
						    	GangZoneFlashForAll(GetPlayerZone(playerid), COLOR_RED);
						    	timerlsvvla=SetTimer("lsvvla",min*20,0);
						    			cooldownlsv = 21600;
						    	vlavslsv = 1;
					    	}
					    	else
					    	{
					    		format(string, 128, "   Los Santos Vagos has cooldown. Must wait 6 hours (%d seconds).",cooldownlsv);
								SendClientMessage(playerid,COLOR_GREY, string);
					    	}

					    }
					}
				}
			}
	    }
	    else SCM(playerid, COLOR_GRAD1, "   You are not a Gang Leader!");
	}

E de la voi, se redimensionează textul aiurea. În fine, sper să prinzi liniile cu ușurință. Dacă nu înțelegi ceva aștept un reply

350x20_00FFF7_FFFFFF_000000_000000.png7YwhJMC.png

ySdxY9L.png

 

76561198117970407.png9Xc59Z4.png

Link to comment
Share on other sites

Acele variabile sunt degaba.

 

Leaga-te de [pawn]ZoneInfo[GetPlayerZone(playerid)][zTeam][/pawn] si [pawn]Turfs = GangZoneCreate(TurfInfo[zMinX],TurfInfo[zMinY],TurfInfo[zMaxX],TurfInfo[zMaxY]);[/pawn]. Mai mult nu te pot ajuta, nu stiu unde le folosesti sau de unde provin.

  • Upvote 1
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.