Server Exports

The resource provides a server export that allows other scripts to retrieve a player's identity trail.


GetPlayerTrail

Returns the trail identifier assigned to a specific player.

Parameters

Parameter
Type
Description

source

number

The player's server ID

Returns

Type
Description

string / number / nil

The trail identifier associated with the player


Example Usage

local trail = exports['pinkFrog_identity']:GetPlayerTrail(source) 
print(trail)

This export can be used inside other server scripts to access the player's identity trail.


Example Command

Example command used for testing the export:

RegisterCommand('testIdentity', function(source, args, raw)

    if source == 0 then
        print('[gett trail] This command can only be used by a player in-game.')
        return
    end

    local trail = exports['pinkFrog_identity']:GetPlayerTrail(source)

    print(('[gett trail] source=%s, trail=%s'):format(source, tostring(trail)))

end)

How It Works

  1. The command checks if it was executed by a player.

  2. If executed from the server console (source == 0), the command stops.

  3. The script calls the export GetPlayerTrail.

  4. The player's trail identifier is returned and printed in the server console.


Example Output


Example Use Cases

Use Case
Description

Identity systems

Retrieve identity trail for player verification

Logging systems

Track player identity changes

Admin tools

Inspect player identity data

External scripts

Integrate identity trail with other systems


Last updated