GetPlayerInfo
The GetPlayerInfo export allows you to retrieve detailed information about a specific player by their player ID. This is particularly useful for server-side operations that require dynamic access to player data.
How to Use
To get a player's information, pass their player ID and a callback function to the export:
Return Data
The export returns a structured object containing the following player details:
ped: Player's character identifier.
coords: Current map coordinates of the player.
street_1: Name of the nearest street.
street_2: Name of the second nearest street (if applicable).
sex: Player character's gender.
vehicle: Identifier of the vehicle the player is in (if any).
vehicle_label: Vehicle's label or description.
vehicle_colour: Color of the player's vehicle.
vehicle_plate: Vehicle's registration plate.
speed: Current speed of the vehicle in km/h (if applicable).
Example Output
Here’s an example of the returned data structure:
Use this export to integrate real-time player data into your scripts efficiently.
Last updated