BeamMP-Server
BeamMP-Server copied to clipboard
Lua API to access vehicle data on the server
Is your feature request related to a problem? Please describe. I'm writing a mod that requires the server to save the player's position to a database periodically.
Currently, I have a timer on the client side mod that sends the position of the player to the server through events.
It works as expected, but I consider the extra event usage wasteful, as the server already must receive this data to transmit it to other clients (from my understanding, through MPGameNetwork), but a lua API to access this data (position, rotation, electrics...) doesn't seem to exist.
Describe the solution you'd like
Something like MP.getPlayerData(playerId).position
to access the last position a specific client sent to the server.
Describe alternatives you've considered Using events and transmitting the information through my own code.
Additional context None.