Garry's Mod Wiki

Revision Difference

Player:UniqueIDTable#545936

<function name="UniqueIDTable" parent="Player" type="classfunc"> <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.</description>⤶ <description>Returns a table that will stay allocated for the specific player between connects until the server shuts down. <note>This table is not synchronized between client and server.</note>⤶ </description>⤶ <realm>Shared</realm> <args> <arg name="key" type="any">Unique table key.</arg> </args> <rets> <ret name="" type="table">The table that contains any info you have put in it.</ret> </rets> </function> <example> <description>Example usage</description> <code> 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 ) </code> <output> "test" nil </output> </example>