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.41k stars 438 forks source link

Add getPedOccupiedVehicleStart serverside #2611

Open MrDadosz opened 2 years ago

MrDadosz commented 2 years ago

Is your feature request related to a problem? Please describe.

You can't now check if you're in vehicle in serveride. getPedOccupiedVehicle should return data only when player is in a vehicle, it should return false when player click F/Enter and is trying to get in a vehicle. Now you have to trigger clientside to make sure that player is not walking to a closed vehicle and wait for response. getPedOccupiedVehicle should have new argument "isEntering" set default to true to keep compatibility with older scripts.

Describe the solution you'd like

getPedOccupiedVehicle and getPedOccupiedVehicleStart

Describe alternatives you've considered

No response

Additional context

No response

Security Policy

PlatinMTA commented 2 years ago

You can have this logic serverside tho. onVehicleEnter will only trigger when the player is 100% inside the vehicle. Using not synced element datas or a table should be enough.

I would preffer an extra argument to getPedOccupiedVehicle like boolean isInside or something similar, so we dont break backwards compatibility.