Name

The SD.Name module provides functionality to retrieve player names.

Name.GetFullName

Purpose: Retrieves the passed players full name.

Parameters:

  • source (number): the player's server ID

Returns:

  • (string): Returns the full name of the player

Usage Example:

local playerFullName = SD.Name.GetFullName(source)
if playerFullName then
    print("Player Full Name: " .. playerFullName)
else
    print("Full name could not be retrieved.")
end

Name.GetFirstName

Purpose: Retrieves the passed players first name.

Parameters:

  • source (number): the player's server ID

Returns:

  • (string): Returns the first name of the player

Usage Example:

local playerFirstName = SD.Name.GetFirstName(source)
if playerFirstName then
    print("Player First Name: " .. playerFirstName)
else
    print("First name could not be retrieved.")
end

Name.GetLastName

Purpose: Retrieves the passed players Last Name.

Parameters:

  • source (number): the player's server ID

Returns:

  • (string): Returns the last name of the player

local playerLastName = SD.Name.GetLastName(1)
if playerLastName then
    print("Player Last Name: " .. playerLastName)
else
    print("Last name could not be retrieved.")
end

Last updated