How to do this? - 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: How to do this? (
/showthread.php?tid=255386)
How to do this? -
Cjgogo - 15.05.2011
I wanna make a command that teleports you on a house(interior) but I always end up by falling from sky,and I looked around ****** and couldn't find exactly what I wanted so how to make a teleport command that teleports you into an interior?
Re: How to do this? -
Sascha - 15.05.2011
pawn Код:
if(strcmp("/tele", cmdtext, true, 5) == 0)
{
SetPlayerInterior(playerid, X); //change X to the interior ID you want to be teleported to
SetPlayerPos(playerid, x, y, z); //change x y z to the coords you want to be teleported to
return 1;
}
Re: How to do this? -
Raimis_R - 15.05.2011
Or you can look at my version
pawn Код:
COMMAND:teleport( playerid, params[ ] )
{
new
HouseID
;
if( sscanf( params,"i", HouseID ) )
return SendClientMessage( playerid,-1 ,"Usage /teleport [ HouseID ]" );
switch( HouseID )
{
case 0:
{
SetPlayerPos( playerid, hX, hY, hZ ); // You'r house poz
SetPlayerInterior( playerid, Interior ); // You'r house interior
}
case 1:
{
SetPlayerPos( playerid, hX, hY, hZ ); // You'r house poz
SetPlayerInterior( playerid, Interior ); // You'r house interior
}
case 3:
{
// More stuff..
}
}
return true;
}
Re: How to do this? -
Cjgogo - 15.05.2011
thanks you both for help but I use zcmd so thanks Raimis