Recommended Posts

I want create a script, which tp a player to me, and teleport me to a player, like in admin panel, just with command. How to make this? For example: /tpto playername , and /tpme playername. And when i teleport a player to me, the player get out from vehicle

Edited by 50cent

Share this post

Link to post

You could use the following functions to make such a feature.

-- To create a command handler "tpme" and "tpto"

-- Create an ipairs loop using these functions
getAlivePlayers -- To get all alive players, for /tpme
getElementsByType -- To get all elements of type "player", for /tpto
getPlayerName -- To get the iterated player's name and make a partial match with the name entered to the command arguments

-- Upon match
getElementPosition -- To get your/found player's position
getElementInterior -- To get your/found player's interior
getElementDimension -- To get your/found player's dimension
setElementPosition -- To teleport you/found player to the coordinates
setElementInterior -- To teleport you/found player to the interior
setElementDimension -- To teleport you/found player to the dimension


Edited by myonlake
  • Thanks 1

Share this post

Link to post

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.