Jump to content
  • 0

Problema turfs


ValyYellow

Question

Problema intalnita (descriere):Am sistem de Turfuri si am si comanda /turfslist si imi arata niste turfuli si te poti tp la ele dar cand te teleportezi exemplu gsls te da pe chiliad /2.Am comanda /attack dar nu merge nu zice ca nu e buna comanda dar nu face nimoc..
Ero(area / rile) / warning-(ul / urile):-
Liniile de cod / sursa / script-ul(obligatoriu):

	if(strcmp(cmd,"/war",true)==0 || strcmp(cmd, "/attack", true) == 0)
	{
	    if(IsPlayerConnected(playerid))
	    {
	    	if(PlayerInfo[playerid][pLeader] == 5 || PlayerInfo[playerid][pLeader] == 6)
			{
			    if(AllowWar[playerid] == 0)
			    {
					for(new z=0; z<sizeof(ZoneInfo); z++)
					{
			    		if(IsPlayerInZone(playerid,z))
			    		{
	                    	if(takezone == 1)
			            	{
			                	SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}W{FFFFFF}AR: {FFFFFF}Exista deja un razboi pornit!");
							}
							else
							{
						    	new leader[30];
						    	format(leader,sizeof(leader),"%s" ,ZoneInfo[GetPlayerZone(playerid)][zOwner]);
						    	#define min 420000
								GetPlayerName(playerid, sendername, sizeof(sendername));
						    	if(ZoneInfo[GetPlayerZone(playerid)][zTeam] == 5 && PlayerInfo[playerid][pLeader] == 5)
						    	{
						        	SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}W{FFFFFF}AR: {FFFFFF}Acest teritoriu apartine deja factiunii Yellow Family!");
						    	}
						    	else if(ZoneInfo[GetPlayerZone(playerid)][zTeam] == 6 && PlayerInfo[playerid][pLeader] == 6)
						    	{
						        	SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}W{FFFFFF}AR: {FFFFFF}Acest teritoriu apartine deja factiunii Los Zetas!");
						    	}
						    	else if(ZoneInfo[GetPlayerZone(playerid)][zTeam] == 5 && PlayerInfo[playerid][pLeader] == 6)
						    	{
							        format(string, sizeof(string), "NEWS: {90EE90}Los Zetas {ffffff}(coordonator: %s) a atacat teritoriul factiunii {008B8B}Yellow Family {ffffff}(coordonator: %s)!",sendername,leader);
							        SendClientMessageToAll(-1, string);
							        takezone=1;
			                        ZoneInfo[z][zTakeOn] = 1;
							    	GangZoneFlashForAll(GetPlayerZone(playerid), 0xFF000090);
							    	SetTimer("FinishWar",min*2,0);
							    	PlayerInfo[playerid][pWarTime] = 420*2;
						    	 	StreetVsCNT = 1;
			    				}
						    	else if(ZoneInfo[GetPlayerZone(playerid)][zTeam] == 6 && PlayerInfo[playerid][pLeader] == 5)
						    	{
		         					format(string, sizeof(string), "NEWS: {008B8B}Yellow Family {ffffff}(coordonator: %s) a atacat teritoriul factiunii {90EE90}Los Zetas {ffffff}(coordonator: %s)!",sendername,leader);
							        SendClientMessageToAll( -1, string);
							        takezone=1;
							        ZoneInfo[z][zTakeOn] = 1;
							    	GangZoneFlashForAll(GetPlayerZone(playerid), 0xFF000090);
						    	 	SetTimer("FinishWar",min*2,0);
						    	 	PlayerInfo[playerid][pWarTime] = 420*2;
							    	CNTVsStreet = 1;
								}
							}
		    			}
					}
		    	}
		    	else SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}W{FFFFFF}AR: {FFFFFF}Accesul la comanda /war a fost restrictionat de catre un admin!");
			}
			else SendClientMessage(playerid, COLOR_GRAD1, "{FF0000}W{FFFFFF}AR: {FFFFFF}Trebuie sa fii liderul unui gang pentru utiliza aceasta comanda!");
		}
		return 1;
	}
    if(strcmp(cmd, "/turfslist", true) == 0 || strcmp(cmd, "/tl", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            if(PlayerInfo[playerid][pAdmin] >= 3)
            {
                ShowPlayerDialog(playerid, 99, DIALOG_STYLE_LIST,"Teritorii war", "1. Teritoriul 1 (HQ Medic & Fireman)\r\n2. Teritoriul 2 (GSLS)\r\n3. Teritoriul 3 (Docuri Los Santos)\r\n4. Teritoriul 4 (Docuri Los Santos) \r\n5. Teritoriul 5 (Mall LS)  \r\n6. Teritoriul 6 (Autostrada LV) \r\n7. Teritoriul 7 (SF) \r\n8. Teritoriul 8 (LV)","Alege", "Iesire");
                return 1;
            }
        }
        return 1;
Imagini / Video (optional):-
Ati incercat sa rezolvati singur?:Da
Edited by ValyYellow
Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

Poi, pentru comanda /attack vad ca ai o variabila acolo "if (AllowWar[playerid] == 0);" , ai cumva vreo comanda care permite sa se porneasca war-ul ? Ma refer la comanda de admin / rcon ceva ...

 

Iar pentru teleportari, rezolva-le singur, ia coordonatele de la fiecare zona si schimba-le pe cele din gamemode .

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.