Jump to content

Can't teleport by pickup


Roderen

Recommended Posts

Posted
function getUpPickupCJ()
    local spawn = createPickup(2495.3962402344, -1690.7670898438, 14.765625, 3, 1318, 0)

    spawnPlayer(source, 2496.049804, -1695.238159, 1014.742187)
end
addEventHandler("onPickupHit", spawn, getUpPickupCJ)

 

Posted
8 hours ago, xLive said:

spawnPlayer if the player is dead or not spawned yet,
use setElementPosition instead.

spawnPlayer works when the player is spawned and alive as far as I know, but it does more things than just teleporting, such as setting the skin and resetting the health to full, which is why it's not the right choice for teleporting.

  • Thanks 1

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...