How to do this?
#1

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?
Reply
#2

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;
}
Reply
#3

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;
}
Reply
#4

thanks you both for help but I use zcmd so thanks Raimis
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)