[POMOC] Oruzarnica


Započeo Narco_VK, Jul 04, 2011, 17:46:06 POSLE PODNE

prethodna tema - sledeća tema

0 članova i 1 gost pregledaju ovu temu.

Skripta koju koristim: gta rp
Detaljan opis problema: pa ocu da u intu imaju svako svoju oruzarnicu pa samo iso za dvje bande i da porvjrim kako to jel valja...i udem aj u gpf oruzarnicu i izadem u gpf int(to valja) odem u ballas bazu udem u int pa u oruzarnicu i idem van on izade u gpf int.. nezz sta je sve sam stavljo i virutalword razlicit...
Dio skripte:
ballas:
//------------------------------------------------crsip-------------------------------------------------------------------
	else if (PlayerToPointStripped(1, playerid,2586.2725,-2235.1497,2.0776, cx,cy,cz))
	{
		//Ballas HQ
		if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
		{
			SetPlayerPos(playerid, -227.027999,1401.229980,27.765625);
			GameTextForPlayer(playerid, "~w~Ballas",5000,1);
			SetPlayerInterior(playerid,18);
			SetPlayerVirtualWorld(playerid,2);
			SetPlayerFacingAngle(playerid, 272);
			PlayerInfo[playerid][pInt] = 18;
		}
		else if(hqlock[surlock] == 0)
		{
		    SetPlayerPos(playerid, -227.027999,1401.229980,27.765625);
			GameTextForPlayer(playerid, "~w~Ballas",5000,1);
			SetPlayerInterior(playerid,18);
			SetPlayerFacingAngle(playerid, 272);
			SetPlayerVirtualWorld(playerid,2);
			PlayerInfo[playerid][pInt] = 18;
		}
		else
		{
		    GameTextForPlayer(playerid, "~r~Nisi clan",5000,1);
		}
	}
	else if (PlayerToPointStripped(1, playerid,-229.2899,1401.3093,27.7656, cx,cy,cz))
	{
		//Ballas HQ
		SetPlayerPos(playerid, 2585.9702,-2232.8027,1.3161);
		GameTextForPlayer(playerid, "~w~Los Santos",5000,1);
		SetPlayerInterior(playerid,0);
		SetPlayerVirtualWorld(playerid,0);
		SetPlayerFacingAngle(playerid, 0);
		PlayerInfo[playerid][pInt] = 0;
	}
//___________________________________________________________________________________________
//oruzarnica ballasa
	else if (PlayerToPointStripped(1, playerid,-217.3969,1402.8237,27.7734, cx,cy,cz))
	{
		// Enter
		SetPlayerPos(playerid, 314.7369,-140.6777,999.6016);
		GameTextForPlayer(playerid, "~w~oruzarnica",5000,1);
		SetPlayerInterior(playerid,7);
		SetPlayerFacingAngle(playerid, 0);
		SetPlayerVirtualWorld(playerid,2);
		PlayerInfo[playerid][pInt] = 1;
	}
	else if (PlayerToPointStripped(1, playerid,315.8182,-142.9650,999.6016, cx,cy,cz))
	{
		// Exit
		SetPlayerPos(playerid, -218.7649,1402.4490,27.7734);
		GameTextForPlayer(playerid, "~w~ballas",5000,1);
		SetPlayerInterior(playerid,18);
		SetPlayerVirtualWorld(playerid,2);
		SetPlayerFacingAngle(playerid, 90.3242);
		PlayerInfo[playerid][pInt] = 18;
	}


gpf

//-------------------------------------------gpf----------------------------------------------------------

	else if (PlayerToPointStripped(1, playerid,2148.9187,-1484.7677,26.6242, cx,cy,cz))
	{
		//GPF  gang hq
		if(PlayerInfo[playerid][pMember] == 15 || PlayerInfo[playerid][pLeader] == 15)
		{
			SetPlayerPos(playerid, 2496.0061,-1693.5201,1014.7422);
			GameTextForPlayer(playerid, "~w~gpf",5000,1);
			SetPlayerInterior(playerid,3);
			SetPlayerVirtualWorld(playerid,1);
			SetPlayerFacingAngle(playerid, 270);
			PlayerInfo[playerid][pInt] = 3;
		}
		else if(hqlock[iolock] == 0)
		{
		    SetPlayerPos(playerid, 2496.0061,-1693.5201,1014.7422);
			GameTextForPlayer(playerid, "~w~gpf",5000,1);
			SetPlayerInterior(playerid,3);
			SetPlayerVirtualWorld(playerid,1);
			SetPlayerFacingAngle(playerid, 270);
			PlayerInfo[playerid][pInt] = 3;
		}
		else
		{
		    GameTextForPlayer(playerid, "~r~Nisi clan",5000,1);
		}
	}
	else if (PlayerToPointStripped(1, playerid,2496.0039,-1692.2004,1014.7422, cx,cy,cz))
	{
		//GPF gang hq
		SetPlayerPos(playerid, 2146.3647,-1484.9503,25.94943);
		GameTextForPlayer(playerid, "~w~Los Santos",5000,1);
		SetPlayerInterior(playerid,0);
        SetPlayerVirtualWorld(playerid,0);
		SetPlayerFacingAngle(playerid, 1);
		PlayerInfo[playerid][pInt] = 0;
	}


//_______________________________________________________________________________________________
//gpf oruzarniuca
	else if (PlayerToPointStripped(1, playerid,2491.8191,-1710.8699,1014.7422, cx,cy,cz))
	{
		// Enter
		SetPlayerPos(playerid, 314.7369,-140.6777,999.6016);
		GameTextForPlayer(playerid, "~w~oruzarnica",5000,1);
		SetPlayerInterior(playerid,7);
		SetPlayerVirtualWorld(playerid,1);
		SetPlayerFacingAngle(playerid, 0);
		PlayerInfo[playerid][pInt] = 1;
	}
	else if (PlayerToPointStripped(1, playerid,315.8182,-142.9650,999.6016, cx,cy,cz))
	{
		// Exit
		SetPlayerPos(playerid, 2493.1111,-1710.7711,1014.7422);
		GameTextForPlayer(playerid, "~w~gpf",5000,1);
		SetPlayerInterior(playerid,3);
		SetPlayerVirtualWorld(playerid,1);
		SetPlayerFacingAngle(playerid, 266.3958);
		PlayerInfo[playerid][pInt] = 18;
	}]

Neke slike/video za lakse dobivanje pomoci(neobavezno):
Poslednja Izmena: Jul 04, 2011, 17:46:49 POSLE PODNE od Narco_VK
Vratio sam se ponovo ocekjute novi server...

X

*

Zato sto nigdje ne provjeravas taj vw koji si postavio igracu, koordinate su iste bez obzira sto vw nije. Napravi kad igrac dodje na tu koordinatu da mu prvo provjeri VW, recimo
if(GetPlayerVirtualWorld(playerid) == 1)//Umjesto ovoga broja postavis onaj broj koji si stavio za vw ballasima
{
//tvoj kod
}
else if(GetPlayerVirtualWorld(playerid) == 2)//Umjesto ovoga broja postavis onaj broj koji si stavio za vw toj drugoj bandi
{
//tvoj kod
}


I preporuka bi bila da koristis IsPlayerInRangeOfPoint umjesto PlayerToPointStripped.

jel mislis ovako za balls np

else if (PlayerToPointStripped(1, playerid,-217.3969,1402.8237,27.7734, cx,cy,cz))
	{
		// Enter
		SetPlayerPos(playerid, 314.7369,-140.6777,999.6016);
		GameTextForPlayer(playerid, "~w~oruzarnica",5000,1);
		SetPlayerInterior(playerid,7);
		SetPlayerFacingAngle(playerid, 0);
		SetPlayerVirtualWorld(playerid,2);
		PlayerInfo[playerid][pInt] = 1;
	}
	else if (PlayerToPointStripped(1, playerid,315.8182,-142.9650,999.6016, cx,cy,cz))
	{
	if(GetPlayerVirtualWorld(playerid) == 2)//Umjesto ovoga broja postavis onaj broj koji si stavio za vw ballasima
{
// Exit
		SetPlayerPos(playerid, -218.7649,1402.4490,27.7734);
		GameTextForPlayer(playerid, "~w~ballas",5000,1);
		SetPlayerInterior(playerid,18);
		SetPlayerVirtualWorld(playerid,2);
		SetPlayerFacingAngle(playerid, 90.3242);
		PlayerInfo[playerid][pInt] = 18;
	}
	}
Vratio sam se ponovo ocekjute novi server...

X

*

Da, samo u taj kod dodaj provjeru i za vw druge bande, znaci ne treba ti na dva mjesta provjera za izlazne koordinate, posto se iste koriste (315.8182,-142.9650,999.6016) i za jedne i za druge.

Ovako znaci
else if (PlayerToPointStripped(1, playerid,315.8182,-142.9650,999.6016, cx,cy,cz))
	{
		if(GetPlayerVirtualWorld(playerid) == 2)//ako je usao iz ballas baze radi taj kod dolje
		{
		// Exit
			SetPlayerPos(playerid, -218.7649,1402.4490,27.7734);
			GameTextForPlayer(playerid, "~w~ballas",5000,1);
			SetPlayerInterior(playerid,18);
			SetPlayerVirtualWorld(playerid,2);
			SetPlayerFacingAngle(playerid, 90.3242);
			PlayerInfo[playerid][pInt] = 18;
		}
		else if(GetPlayerVirtualWorld(playerid) == 1)//ako je usao iz gpf baze
		{
		// Exit
			SetPlayerPos(playerid, 2493.1111,-1710.7711,1014.7422);
			GameTextForPlayer(playerid, "~w~gpf",5000,1);
			SetPlayerInterior(playerid,3);
			SetPlayerVirtualWorld(playerid,1);
			SetPlayerFacingAngle(playerid, 266.3958);
			PlayerInfo[playerid][pInt] = 18;
		}
	}
Poslednja Izmena: Jul 04, 2011, 18:41:28 POSLE PODNE od Mad_Max

opet ista stvar..
Vratio sam se ponovo ocekjute novi server...

X

*

Ne moze ti nikako biti ista stvar, osim ako ne citas ono sto napisem. Izbaci te svoje kodove za izlaz iz oruzarnice (oba koda koja si imao, za ballas i gpf) i ubaci ovaj sto sam ti ja dao.

EDIT:
Imas nekih gresaka, recimo gore na jedom mjestu:
SetPlayerInterior(playerid,3);
		PlayerInfo[playerid][pInt] = 18;


Ako mu postavljas taj interijer, 3, onda i ovaj broj sto je kod tebe 18 treba da bude 3.
Poslednja Izmena: Jul 04, 2011, 19:12:40 POSLE PODNE od Mad_Max

ali nije isti int od ballas i gpf samo je isti int od oruzarnice..
Vratio sam se ponovo ocekjute novi server...

X

*

Kakve veze to ima, uradi kako sam ti rekao. Pregledaj kod koji sam ti dao, kad dodjes na koordinate 315.8182,-142.9650,999.6016 (izlaz iz oruzarnice) on te u zavisnosti od vw prebacuje u jedan od dva interijera (ballas ili gpf). Zato ti ne trebaju dva koda sa istim "ulaznim" koordinatama.