Skip to content

setControlstate is reset, when a player / ped is created #538

@ArranTuna

Description

@ArranTuna

Describe the bug
If a controlState serverside for player A is set, it will be resetted if any other player joins the server.

To reproduce
start freeroam, start runcode
Take a Maverick, get in as a driver
srun setControlState(getRandomPlayer(),"accelerate",true)
The maverick begins to fly.
Let a second player join the server... That's the end.

It doesn't even need to be server side.

crun setControlState("forwards", true)
Moves for 1-10 seconds (or whenever somebody joins)
Stops moving
Executing client-side command: getControlState("forwards")
Command results: false [boolean]

I can confirm it's when onClientPlayerJoin triggers, you stop moving.

Ok, now it's a little bit clearer:
It is NOT reset, when a player joins the server, it will be reset everytime a ped is created!

Reproduce:
crun setControlState("forwards", true)
srun createPed(7,0,0,10)

Your local player stops moving. I think, when a player joins, a ped (player) is also created, so the bug will be anywhere at the ped creation part...

MTA Client:

  • Version: v1.3.3-release-5624

MTA Server:

  • Version v1.3.3-release-5624

Additional context
From https://bugs.mtasa.com/view.php?id=7783

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions