View Issue Details

IDProjectCategoryView StatusLast Update
0009682Multi Theft Auto : San AndreasServerpublic2017-07-20 20:00
ReporterKenixAssigned To 
Status newResolutionopen 
Product Version1.5.4 
Target VersionFixed in Version 
Summary0009682: NETWORK TROUBLE after spawn

This is random bug happens after using spawnPlayer.

Steps To Reproduce
  1. spawnPlayer
  3. You are spawned at 0, 0, 0
Additional Information

It's works in all MTA:SA Versions.

Client ver: Multi Theft Auto v1.5.4-release-11592
Server ver: MTA:SA Server v1.5.3-release-10835

TagsNo tags attached.



2017-07-15 22:45

updater   ~~0026064

I will some workaround: pre spawnPlayer at some custom coords and then spawn at normal position.


2017-07-15 22:46

updater   ~~0026065

i'll test*


2017-07-19 11:46

updater   ~~0026070

This workaround is not working.


2017-07-19 11:48

manager   ~~0026071

You seem to be the only person having this problem. You're probably doing something weird in your scripts.


2017-07-19 13:33

updater   ~~0026072

What can affect on this?
It's very random bug.
I don't use any setElementPosition scripts on client but anyway i make a custom log attached to debug hook (setElementPosition)
Also i make check if player has 0, 0, 0 -> respawn ( 100 ms timer ).


2017-07-19 13:39

updater   ~~0026073

Maybe it caused by desync (server player position != client player position) caused by NETWORK TROUBLE and mta respawns at 0, 0, 0 i think.


2017-07-19 13:41

updater   ~~0026074

Because when player spawns i do a lot of things. (Call a lot of Methods, Set element data) and etc. Maybe this can affect.


2017-07-19 13:42

viewer   ~~0026075

You're probably best to continue this on the MTA forum,

If I were to make any guesses I'd say you've got some bad script attached to an onPlayerSpawn event handler, or alongside your spawn handling. Start there


2017-07-19 13:54

updater   ~~0026076

I don't have any warnings of debugscript.
I spawn player by myself and set all data after using spawnPlayer.
Maybe it caused because spawnPlayer is not ready yet and need to set data after using onPlayerSpawn.


2017-07-19 17:59

manager   ~~0026077

You could post the function that calls spawnPlayer. Also check all scripts that use onPlayerSpawn for anything that's doing something to the player like warping.


2017-07-20 15:15

updater   ~~0026078

No one script is using onPlayerSpawn
Here is the code

I am calling OnSpawn method after login.


2017-07-20 15:29

updater   ~~0026079

As i said before it's desync, i made custom log and what i see:
Server has correct position, but client is not.


2017-07-20 15:55

updater   ~~0026080

I make a simple check, check 0 0 0 on client side using timer ( 100 ms repeat ), when it happaneds i send via triggerServerEvent infornation (vector3) to server and output in custom debug log.


2017-07-20 16:43

administrator   ~~0026081

Please provide a resource which reproduces the problem


2017-07-20 20:00

updater   ~~0026082

I found a reproduce

Just set element data before you spawn and you will spawn at 0 0 0

Issue History

Date Modified Username Field Change