SA-MP Forums Archive
co-ord problems - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: co-ord problems (/showthread.php?tid=123555)



co-ord problems - 02manchestera - 26.01.2010

Код:
if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
		{
			SetPlayerPos(playerid, x,y,z);// co-ord 1
			GameTextForPlayer(playerid, "~w~Scorpia Agency HQ",5000,1);
			SetPlayerInterior(playerid,18);
			SetPlayerFacingAngle(playerid, 90);
			PlayerInfo[playerid][pInt] = 18;
		}
		else if(hqlock[surlock] == 1)
		{
		  SetPlayerPos(playerid, x,y,z); //co-ord 2
			GameTextForPlayer(playerid, "~w~Scorpia Agency HQ",5000,1);
			SetPlayerInterior(playerid,18);
			SetPlayerFacingAngle(playerid, 90);
			PlayerInfo[playerid][pInt] = 18;
		}
		else
		{
		  GameTextForPlayer(playerid,"~r~Locked",5000,1);
		}
	}
	else if (PlayerToPointStripped(1, playerid, x,y,z, cx,cy,cz)) // co-ord 3
	{
		//Scorpia Agency hitman HQ
		SetPlayerPos(playerid, x,y,z); // co -ord 4
		GameTextForPlayer(playerid, "~w~Los Santos",5000,1);
		SetPlayerInterior(playerid,0);
		SetPlayerFacingAngle(playerid, 179);
		PlayerInfo[playerid][pInt] = 0;
	}
	else if (PlayerToPointStripped(1, playerid,x,y,z, cx,cy,cz)) //co-ord 5
	{
could some tell which of this co-ord will send me inside or outside of a building, what it is i am using a building already created as a template but i cant figure out what co-ord does what.

many thanks



Re: co-ord problems - Finn - 26.01.2010

In your signature: "not a edit of anything. All from scratch"

Shouldn't that mean it's your own code, so how can you have troubles reading it?


Re: co-ord problems - pierhs - 26.01.2010

Can u be more specific?


Re: co-ord problems - 02manchestera - 26.01.2010

Quote:
Originally Posted by Finn
In your signature: "not a edit of anything. All from scratch"

Shouldn't that mean it's your own code, so how can you have troubles reading it?
this ist for jose rpg that is on standby (need to change that to standby) i need to learn some more scripting first.


Re: co-ord problems - 02manchestera - 26.01.2010

Quote:
Originally Posted by Chuck_Taylor
Can u be more specific?
this is a auto enter no need for /enter

1545.0803,-1269.7253,17.4063 this is were you enter

1545.0803,-1269.7253,17.4063 this is the intrior

ad here is a example of one with co-ords working and one not working


this one works

Код:
//Surenos HQ
		if(PlayerInfo[playerid][pMember] == 5 || PlayerInfo[playerid][pLeader] == 5)
		{
			SetPlayerPos(playerid, 2352.1885,-1180.9219,1027.9766);
			GameTextForPlayer(playerid, "~w~Los Surenos 13 HQ",5000,1);
			SetPlayerInterior(playerid,5);
			SetPlayerFacingAngle(playerid, 90);
			PlayerInfo[playerid][pInt] = 5;
		}
		else if(hqlock[surlock] == 0)
		{
		  SetPlayerPos(playerid, 1237.8329,-833.3148,1084.0078);
			GameTextForPlayer(playerid, "~w~Los Surenos 13 HQ",5000,1);
			SetPlayerInterior(playerid,5);
			SetPlayerFacingAngle(playerid, 90);
			PlayerInfo[playerid][pInt] = 5;
		}
		else
		{
		  GameTextForPlayer(playerid, "~r~Locked",5000,1);
		}
	}
	else if (PlayerToPointStripped(1, playerid,2352.9187,-1180.9679,1027.9766, cx,cy,cz))
	{
		//Surenos HQ
		SetPlayerPos(playerid, 1828.1904,-1981.0223,13.5469);
		GameTextForPlayer(playerid, "~w~Los Santos",5000,1);
		SetPlayerInterior(playerid,0);
		SetPlayerFacingAngle(playerid, 179);
		PlayerInfo[playerid][pInt] = 0;
	}
	else if (PlayerToPointStripped(1, playerid,1481.0206,-1771.1138,18.7958, cx,cy,cz))
	{
this one dont

Код:
// Scorpia Agency (hitman)HQ
		if(PlayerInfo[playerid][pMember] == 8 || PlayerInfo[playerid][pLeader] == 8)
		{
			SetPlayerPos(playerid, 1545.0803,-1269.7253,17.4063);
			GameTextForPlayer(playerid, "~w~Scorpia Agency HQ",5000,1);
			SetPlayerInterior(playerid,18);
			SetPlayerFacingAngle(playerid, 90);
			PlayerInfo[playerid][pInt] = 18;
		}
		else if(hqlock[surlock] == 1)
		{
		  SetPlayerPos(playerid, 1710.433715,-1669.379272,20.225049);
			GameTextForPlayer(playerid, "~w~Scorpia Agency HQ",5000,1);
			SetPlayerInterior(playerid,18);
			SetPlayerFacingAngle(playerid, 90);
			PlayerInfo[playerid][pInt] = 18;
		}
		else
		{
		  GameTextForPlayer(playerid,"~r~Locked",5000,1);
		}
	}
	else if (PlayerToPointStripped(1, playerid, 1545.0803,-1269.7253,17.4063, cx,cy,cz))
	{
		//Scorpia Agency hitman HQ
		SetPlayerPos(playerid, 1710.433715,-1669.379272,20.225049);
		GameTextForPlayer(playerid, "~w~Los Santos",5000,1);
		SetPlayerInterior(playerid,0);
		SetPlayerFacingAngle(playerid, 179);
		PlayerInfo[playerid][pInt] = 0;
	}
	else if (PlayerToPointStripped(1, playerid,1481.0206,-1771.1138,18.7958, cx,cy,cz))
	{
hope this enough
many thanks