Is it such a function? - 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)
+--- Thread: Is it such a function? (
/showthread.php?tid=352918)
Is it such a function? -
Mr.1337 - 21.06.2012
Is there a function, which teleports you to a position once you enter it?
For example, LinkVehicleToPos.
I already know that there's LinkVehicleToInterior, as I'm asking for something different.
Re: Is it such a function? -
FUNExtreme - 21.06.2012
I assume you mean interiors?
There is probably a list off the interiors coordinates if you need them, but no there is no function that does that. you'd have to do it with SetPlayerPos and SetPlayerInterior
Re: Is it such a function? -
Mr.1337 - 21.06.2012
Quote:
Originally Posted by FUNExtreme
I assume you mean interiors?
There is probably a list off the interiors coordinates if you need them, but no there is no function that does that. you'd have to do it with SetPlayerPos and SetPlayerInterior
|
Ah, I see. Thanks for replying though.
Re: Is it such a function? -
Kindred - 21.06.2012
Looks like someone beat me to it. Is this what you wanted?
What do you mean, if a player enters a specific vehicle they are teleported or something?
If that is not what you want, please rephrase your question.
This is an example:
pawn Код:
//Under OnGameModeInit
Vehicle1 = CreateVehicle(parameters here); //Vehicle 1
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger)
{
if(vehicleid == Vehicle1)
{
SetPlayerPos(playerid, coord1, coord2, coord3);
}
return 1;
}
Re: Is it such a function? -
Mr.1337 - 21.06.2012
Quote:
Originally Posted by Kindred
Looks like someone beat me to it. Is this what you wanted?
What do you mean, if a player enters a specific vehicle they are teleported or something?
If that is not what you want, please rephrase your question.
This is an example:
pawn Код:
//Under OnGameModeInit
Vehicle1 = CreateVehicle(parameters here); //Vehicle 1
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) { if(vehicleid == Vehicle1) { SetPlayerPos(playerid, coord1, coord2, coord3); } return 1; }
|
That's what I wanted, thanks.