RSG References
🤵 Player Information Reference
Learn how to aquire player information for your scripts.
This guide will help you understand how to retrieve player information such as their name, citizen ID, and permissions, and use this data in your scripts.
Step 1: Get Player Information
To access the information of a player, we need to retrieve their player object using the RSGCore.Functions.GetPlayer()
function. This function will return an object containing various details about the player, including their character information and permissions.
Example: Retrieve Player Data
The Player object has the following structure:
Player.PlayerData.charinfo.firstname
: The player’s first name.Player.PlayerData.charinfo.lastname
: The player’s last name.Player.PlayerData.citizenid
: The player’s citizen ID.