View Issue Details

IDProjectCategoryView StatusLast Update
0007644Multi Theft Auto : San AndreasClientpublic2013-06-11 01:36
Reporterarezu Assigned Toccw  
Status resolvedResolutionfixed 
Target Version1.3.3Fixed in Version1.3.3 
Summary0007644: setElementPosition for players vehicle causes freeze for few seconds

setElementPosition for players vehicle causes vehicle to freeze for few seconds randomly if the position is a few meters from your current position, it may be related to setting position outside ~7100 but it happens also a lot when setting position closer to gta world. Doesn't happen for vehicle with ped inside.

Additional Information

This messes up my new gamemodes completely

TagsNo tags attached.



2013-06-06 13:07

viewer   ~~0018664

Last edited: 2013-06-06 14:31

setting position outside the gta world (position > ~ 7100)* is what I wanted to write.


2013-06-07 01:30

administrator   ~~0018668

Need example positions.


2013-06-07 02:25

viewer   ~~0018673

Warp from: 4274.994140625, -7823.7319335938, 9.5998430252075
to: 4280.9638671875, -6990.0966796875, 384.05020141602


2013-06-07 02:27

reporter   ~~0018674

you mean freeze as in in mid air and not moving rather than the game freezing which would be the window just not updating right?

this could be that the vehicle is waiting for collisions to load for that spot but I'm unsure if it is then that's by design rather than a bug

... because gravity.


2013-06-07 06:53

administrator   ~~0018686

Tried in 1.4 and 1.3, but could not see a freeze.

Please provide the custom map you are using so we can test again.


2013-06-07 13:37

viewer   ~~0018690


2013-06-07 14:10

viewer   ~~0018692

Last edited: 2013-06-07 15:18

@Cazomino05 That would be strange because it happens even if you warp from a few meter from that position where everything is already loaded and sometimes when you warp it doesn't wait for collision at all so you fall through maps.

I found a fix for it. If you freeze the vehicle before setting position and rotation and then unfreeze yourself after then it wont stay frozen, but if you freeze yourself after setting position and then unfreeze then the freeze stays for a few seconds (you are left in a state where the velocity you set after wont go in effect until the freezing is over).

Edit: This fix doesn't work if you respawn (spawnPlayer and warpPedIntoVehicle) just before warping though.


2013-06-07 16:33

administrator   ~~0018693

Thanks for the map. Can you show me script snippets which reproduce these problems?


2013-06-07 16:50

viewer   ~~0018694

Last edited: 2013-06-07 16:51
I use that script and use the commands to warp.
"Uncommenting" the setElementFrozen functions removes the freezing but if you spawn player and warp him into the vehicle before that then that fix doesn't work.


2013-06-07 20:49

administrator   ~~0018695

Seems to be caused by the streamer being at the object limit.
Fix is to disable asynchronous loading during spawn and positioning.

engineSetAsynchronousLoading( false, true )
spawn player
create vehicle
warp player into vehicle
set vehicle position
engineSetAsynchronousLoading( true, true )


2013-06-07 21:13

viewer   ~~0018696

Last edited: 2013-06-07 22:46

Is there no other way to fix it? I have to remake all of my gamemodes with sync from client to server just for spawning for that.

Edit: nvm, I was able to fix it by only triggering to client to stop async loading before doing spawnPlayer and set async loading to true after spawnPlayer.

Edit 2: custom textures for objects fail to load sometimes after doing that fix (100% failure in some maps).


2013-06-11 01:35

administrator   ~~0018716

Fixed in

Issue History

Date Modified Username Field Change