Garry's Mod Wiki

Garry's Mod Wiki

  boolean Entity:SetSaveValue( string name, any value )

Description

Sets a save value for an entity. You can see a full list of an entity's save values by creating it and printing Entity:GetSaveTable().

See Entity:GetInternalVariable for the opposite of this function.

Arguments

1 string name
Name of the save value to set
2 any value
Value to set

Returns

1 boolean
Key successfully set

Example

Make all rollermines currently on the map friendly

for i, mine in ipairs( ents.FindByClass( "npc_rollermine" ) ) do mine:SetSaveValue( "m_bHackedByAlyx", true ) end

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...