Framework Exports

C7 Framework V3 provides a set of server-side exports that allow developers to access character information from any resource.

Available Server-Side Exports

1

GetActiveCharacter

chevron-rightWhat this export does:hashtag

Returns the entire active character table stored in ActiveCharacters[src] (or nil if none).

chevron-rightHow to use this export:hashtag
local char = exports["c7-scripts-framework-v3"]:GetActiveCharacter(src)
chevron-rightOutput examplehashtag

Output type: table or nil

Output example:

chevron-rightExample usage:hashtag
local src = source
local char = exports["c7-scripts-framework-v3"]:GetActiveCharacter(src)

if not char then
    print("No active character loaded for src:", src)
    return
end

print("Active char table exists. Char ID:", char.char_id)
2

GetCharID

chevron-rightWhat this export does:hashtag

Returns ActiveCharacters[src].char_id or nil.

chevron-rightHow to use this export:hashtag
local charId = exports["c7-scripts-framework-v3"]:GetCharID(src)
chevron-rightOutput example:hashtag

Output type: number/string or nil

Output example: 12

chevron-rightExample usage:hashtag
local src = source
local charId = exports["c7-scripts-framework-v3"]:GetCharID(src)
print("Char ID:", charId)
3

GetCharFullName

chevron-rightWhat this export does:hashtag

Returns "first last" using c.char_first_name + c.char_last_name. If no active character → nil.

chevron-rightHow to use this export:hashtag
local name = exports["c7-scripts-framework-v3"]:GetCharFullName(src)
chevron-rightOutput example:hashtag

Output type: string or nil

Output example: John Smith

chevron-rightExample usage:hashtag
local src = source
local name = exports["c7-scripts-framework-v3"]:GetCharFullName(src)
print("Full name:", name or "Unknown")
4

GetCharFirstName

chevron-rightWhat this export does:hashtag

Returns c.char_first_name or nil.

chevron-rightHow to use this export:hashtag
local first = exports["c7-scripts-framework-v3"]:GetCharFirstName(src)
chevron-rightOutput example:hashtag

Output type: string or nil

Output example: John

chevron-rightExample usage:hashtag
local src = source
print("First name:", exports["c7-scripts-framework-v3"]:GetCharFirstName(src))
5

GetCharLastName

chevron-rightWhat this export does:hashtag

Returns c.char_last_name or nil.

chevron-rightHow to use this export:hashtag
local last = exports["c7-scripts-framework-v3"]:GetCharLastName(src)
chevron-rightOutput example:hashtag

Output type: string or nil

Output example: Smith

chevron-rightExample usage:hashtag
local src = source
print("Last name:", exports["c7-scripts-framework-v3"]:GetCharLastName(src))
6

GetCharDept

chevron-rightWhat this export does:hashtag

Returns c.char_department or nil.

chevron-rightHow to use this export:hashtag
local dept = exports["c7-scripts-framework-v3"]:GetCharDept(src)
chevron-rightOutput example:hashtag

Output type: string or nil

Output example: lspd

chevron-rightExample usage:hashtag
local src = source
local dept = exports["c7-scripts-framework-v3"]:GetCharDept(src)
print("Department:", dept or "None")
7

GetCharGender

chevron-rightWhat this export does:hashtag

Returns c.char_gender or nil.

chevron-rightHow to use this export:hashtag
local gender = exports["c7-scripts-framework-v3"]:GetCharGender(src)
chevron-rightOutput example:hashtag

Output type: string or nil

Output example: Male

chevron-rightExample usage:hashtag
local src = source
print("Gender:", exports["c7-scripts-framework-v3"]:GetCharGender(src) or "Unknown")
8

GetCharWeight

chevron-rightWhat this export does:hashtag

Returns c.char_weight or nil.

chevron-rightHow to use this export:hashtag
local weight = exports["c7-scripts-framework-v3"]:GetCharWeight(src)
chevron-rightOutput example:hashtag

Output type: string or nil

Output example: 82lbs

chevron-rightExample usage:hashtag
local src = source
print("Weight:", exports["c7-scripts-framework-v3"]:GetCharWeight(src) or "Unknown")
9

GetCharHeight

chevron-rightWhat this export does:hashtag

Returns c.char_height or nil.

chevron-rightHow to use this export:hashtag
local height = exports["c7-scripts-framework-v3"]:GetCharHeight(src)
chevron-rightOutput example:hashtag

Output type: string or nil

Output example: 6'11"

chevron-rightExample usage:hashtag
local src = source
print("Height:", exports["c7-scripts-framework-v3"]:GetCharHeight(src) or "Unknown")
10

GetCharImage

chevron-rightWhat this export does:hashtag

Returns the character image URL only if it’s valid:

  • must not be nil/""

  • must not be "null" or "nil" (string)

  • Otherwise returns nil.

chevron-rightHow to use this export:hashtag
local img = exports["c7-scripts-framework-v3"]:GetCharImage(src)
chevron-rightOutput example:hashtag

Output type: string or nil

Output example: "https://example.com/image.pngarrow-up-right"

chevron-rightExample usage:hashtag
local src = source
local img = exports["c7-scripts-framework-v3"]:GetCharImage(src)

if img then
    print("Character image:", img)
else
    print("No valid character image set.")
end
11

GetCharEthnicity

chevron-rightWhat this export does:hashtag

Returns c.char_ethnicity or nil.

chevron-rightHow to use this export:hashtag
local eth = exports["c7-scripts-framework-v3"]:GetCharEthnicity(src)
chevron-rightOutput example:hashtag

Output type: string or nil

Output example: White

chevron-rightExample usage:hashtag
local src = source
print("Ethnicity:", exports["c7-scripts-framework-v3"]:GetCharEthnicity(src) or "Unknown")
12

GetCharCallsign

chevron-rightWhat this export does:hashtag

Returns c.char_callsign or nil.

chevron-rightHow to use this export:hashtag
local callsign = exports["c7-scripts-framework-v3"]:GetCharCallsign(src)
chevron-rightOutput example:hashtag

Output type: string or nil

Output example: 1A-12

chevron-rightExample usage:hashtag
local src = source
print("Callsign:", exports["c7-scripts-framework-v3"]:GetCharCallsign(src) or "None")
13

GetCharGrade

chevron-rightWhat this export does:hashtag

Returns c.char_grade or nil.

chevron-rightHow to use this export:hashtag
local grade = exports["c7-scripts-framework-v3"]:GetCharGrade(src)
chevron-rightOutput example:hashtag

Output type: string or nil

Output example: Sergeant

chevron-rightExample usage:hashtag
local src = source
local grade = exports["c7-scripts-framework-v3"]:GetCharGrade(src)

if grade then
    print("Grade:", grade)
else
    print("No grade set.")
end
14

GetCharJailedStatus

chevron-rightWhat this export does:hashtag

Returns true/false if the player is jailed.

chevron-rightHow to use this export:hashtag
local jailed = exports["c7-scripts-framework-v3"]:GetCharJailedStatus(src)
chevron-rightOutput example:hashtag

Output type: boolean or nil

Output example: true or false

chevron-rightExample usage:hashtag
local src = source
local jailed = exports["c7-scripts-framework-v3"]:GetCharJailedStatus(src)

if jailed then
    print("Player is jailed, no leaving the cell mate.")
else
    print("Player is free. For now.")
end
15

GetCharJailedExpiry

chevron-rightWhat this export does:hashtag

Returns c.char_jail_expiration or nil.

chevron-rightHow to use this export:hashtag
local expiry = exports["c7-scripts-framework-v3"]:GetCharJailedExpiry(src)
chevron-rightOutput example:hashtag

Output type: string/number or nil

Output example: 2026-02-17 21:30:00

chevron-rightExample usage:hashtag
local src = source
local expiry = exports["c7-scripts-framework-v3"]:GetCharJailedExpiry(src)
print("Jail expiry:", expiry or "No expiry / not jailed")
16

GetCharCreatedAt

chevron-rightWhat this export does:hashtag

Returns c.char_created_at, or if that’s nil, returns c.created_at, otherwise nil.

chevron-rightHow to use this export:hashtag
local createdAt = exports["c7-scripts-framework-v3"]:GetCharCreatedAt(src)
chevron-rightOutput example:hashtag

Output type: string/number or nil

Output example: 2025-11-03 18:04:12

chevron-rightExample usage:hashtag
local src = source
local createdAt = exports["c7-scripts-framework-v3"]:GetCharCreatedAt(src)
print("Character created at:", createdAt)
17

GetCharLastLocation

chevron-rightWhat this export does:hashtag

Returns c.char_last_location or nil.

chevron-rightHow to use this export:hashtag
local lastLoc = exports["c7-scripts-framework-v3"]:GetCharLastLocation(src)
chevron-rightOutput example:hashtag

Output type: string/number or nil

Output example: Vinewood Boulevard (Postal 232)

chevron-rightExample usage:hashtag
local src = source
local lastLoc = exports["c7-scripts-framework-v3"]:GetCharLastLocation(src)
print("Last location:", lastLoc or "Unknown")
18

GetCharLastLocationCoords

chevron-rightWhat this export does:hashtag

Returns c.char_last_location_coords or nil.

chevron-rightHow to use this export:hashtag
chevron-rightOutput example:hashtag

Output type: string/number or nil

Output example: {"x":441.2,"y":-981.9,"z":30.7,"w":90.0}

chevron-rightExample usage:hashtag
19

GetCharLastPlayed

chevron-rightWhat this export does:hashtag

Returns c.char_last_played or nil.

chevron-rightHow to use this export:hashtag
chevron-rightOutput example:hashtag

Output type: string/number or nil

Output example: 2026-02-16 23:58:01

chevron-rightExample usage:hashtag
20

GetCharDiscordID

chevron-rightWhat this export does:hashtag

Returns c.char_discord or nil.

chevron-rightHow to use this export:hashtag
chevron-rightOutput example:hashtag

Output type: number or nil

Output example: 123456789012345678

chevron-rightExample usage:hashtag
21

GetCharSteamID

chevron-rightWhat this export does:hashtag

Returns c.char_steamid or nil.

chevron-rightHow to use this export:hashtag
chevron-rightOutput example:hashtag

Output type: string/number or nil

Output example: steam:11000010abcdef12

chevron-rightExample usage:hashtag
22

GetCharCopy

chevron-rightWhat this export does:hashtag

Returns a new table copy of character fields (so other scripts can safely read it without mutating your ActiveCharacters table).

If no active character → nil.

chevron-rightHow to use this export:hashtag
chevron-rightOutput example:hashtag

Output type: table or nil

Output example: steam:11000010abcdef12

chevron-rightExample usage:hashtag

Last updated