Jump to content

[help] Teleport Interior


ice_brasil

Recommended Posts

Hello everyone, sorry my bad english I'm Brazilian!

I have a doubt in a script! I created a script to teleport a player to a map I created the maps! so far so I wanted some more for a teleport inside a motel inside and the interior is it that I wanted to add!

script:

function motel (thePlayer) 
    setElementPosition ( thePlayer, 2216.3332844, -1150.5032888, 1025.732323227 )  
    outputChatBox ( "O player ".. getPlayerName(thePlayer) .." Foi para o Motel Vá tambem (/motel)", root, 0, 255, 0 ) 
end 
addCommandHandler ( "motel", motel ) 

as you can see I have the most coordinates inside motel when I type into space and will start to fall because it would need to use tar inside the inner most what do I add to typing so the player / motel he go inside?

Edited by Guest
Link to comment

You must use: setElementInterior instead of setElementPosition, like this:

function motel (thePlayer) 
    setElementInterior ( thePlayer, 0, 2216.3332844, -1150.5032888, 1025.732323227 ) 
    outputChatBox ( "O player ".. getPlayerName(thePlayer) .." Foi para o Motel Vá tambem (/motel)", root, 0, 255, 0 ) 
end 
addCommandHandler ( "motel", motel ) 

Change: '0' to the interior ID of your map.

  • Thanks 1
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...