SA-MP Forums Archive
[HELP] A quastion... - 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: [HELP] A quastion... (/showthread.php?tid=79188)



[HELP] A quastion... - FreddeN - 26.05.2009

How can I make like if I go near a door and type /enter, I teleports to a interior?
I want a training room in the LSPD, and the training room is the driving school in SF.

Thanks


Re: [HELP] A quastion... - miokie - 26.05.2009

PlayerToPoint (Search for this)
SetPlayerPos
SetPlayerInterior
That's all you really need.


Re: [HELP] A quastion... - Gozerr - 26.05.2009

Under OnPlayerCommandText:
Code:
if (strcmp("/enter", cmdtext, true) == 0)
{
	if(PlayerToPoint(5.0, playerid, X, Y, Z))
	{
	SetPlayerPos(playerid, X, Y, Z);
	SetPlayerInterior(playerid, interiorid)
	}
	else
	{
	SendClientMessage(playerid, 0xFF0000AA, "You must be closer!");
	}
	return 1;
}
Replace the first X, Y and Z with the location of the door,
The second X, Y and Z with the location of the interior
And interiorid with the interiorid