View Issue Details

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

This is random bug happens after using spawnPlayer.

Steps To Reproduce
  1. spawnPlayer
  2. NETWORK TROUBLE
  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.

Activities

Kenix

2017-07-15 22:45

updater   ~~0026064

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

Kenix

2017-07-15 22:46

updater   ~~0026065

i'll test*

Kenix

2017-07-19 11:46

updater   ~~0026070

This workaround is not working.

arranTuna

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.

Kenix

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

Kenix

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.

Kenix

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.

LopSided_

2017-07-19 13:42

viewer   ~~0026075

You're probably best to continue this on the MTA forum, https://forum.mtasa.com/forum/71-scripting/

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

Kenix

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.

arranTuna

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.

Kenix

2017-07-20 15:15

updater   ~~0026078

No one script is using onPlayerSpawn
Here is the code https://pastebin.com/EXS8yLuV

I am calling OnSpawn method after login.

Kenix

2017-07-20 15:29

updater   ~~0026079

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

Kenix

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.

ccw

2017-07-20 16:43

administrator   ~~0026081

Please provide a resource which reproduces the problem

Kenix

2017-07-20 20:00

updater   ~~0026082

I found a reproduce
https://pastebin.com/dmDP17HJ

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

Issue History

Date Modified Username Field Change