multitheftauto / mtasa-blue

Multi Theft Auto is a game engine that incorporates an extendable network play element into a proprietary commercial single-player game.
https://multitheftauto.com
GNU General Public License v3.0
1.42k stars 437 forks source link

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

Open ArranTuna opened 6 years ago

ArranTuna commented 6 years ago

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:

MTA Server:

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

UnavaiableSpoon13 commented 6 days ago

I confirm, this bug is there as of 1.6-release-22623 Also affects setPedControlState and setAnalogControlState