[Help] Teleporting Causes Client to Freeze

I’m working on making a parser that will read map files to load maps and whatnot for a destruction derby server, and while progress is coming along nicely - I’m having lots of issues with my client freezing when I try and use SetEntityCoords.

Back in the MTA days, DD maps would most frequently be held above water - so if you were pushed down into the water, you lost. It also kind of helped people with weak computers on more complex maps.

I’m assuming this is crashing because we’re not really meant to teleport that far out? This is what I use to teleport my player:

SetEntityCoords(GetPlayerPed(-1), 870, -7700, 12)

The thing is, sometimes it does work - it does teleport me. And sometimes it just makes the client freeze and stop responding.

Any suggestions?

You could reduce that, since that’s not an existing value.

Where do you even want to teleport them?

I was using the map editor mod, I just moved way out over the water to get far away from the city. So only positive values work…? It worked sometimes but sometimes not.

It seems this doesn’t work either way, I moved it a bit closer to the pier - however, the surface is very VERY slippery. Probably because it’s above water. :frowning:

https://streamable.com/054on