Player/UniqueIDTable

From Garry's Mod
Jump to: navigation, search
 Player:UniqueIDTable( )

Contents

Description

Returns a table that will stay allocated for the specific player between connects until the server shuts down. Note, that this table is not synchronized between client and server.

Arguments

any key

Unique table key.

Returns

table

The table that contains any info you have put in it.

Examples

Example

Example usage

local table = Entity( 1 ):UniqueIDTable( "mytable" )
table.MyValue = "test"

// Somewhere else
local table = Entity( 1 ):UniqueIDTable( "mytable" )
print( table.MyValue )
local table = Entity( 1 ):UniqueIDTable( "mytable_other" )
print( table.MyValue )

Output:

"test"
nil
Personal tools
Navigation