Unique IDs - rhapidfyre/Cops-n-Robbers GitHub Wiki
A Unique ID is an ID assigned to the player by the MySQL Database when their player account has been created. The player's character and save information is tied to that account. The Unique ID is created the first time a player joins the server, whether they make a character or not. Once a player clears the loading screen, they will have a Unique ID.
Server-side
To use the Unique ID in your scripts, you can use the following server export:
exports['cnrobbers']:UniqueId(player_server_id)
Client-side
Additionally, the server triggers a client-wide event when the Unique ID is retrieved or assigned.
(This has not been added yet as of 09/15/2019)
RegisterNetEvent('cnr:unique_id')
AddEventHandler('cnr:unique_id', function(uid)
-- Where uid is the argument being passed (the Unique ID)
print("My Unique ID is: "..uid)
end)