Garry's Mod Wiki

Entity:SetSaveValue

boolean Entity:SetSaveValue( string name, any value )

Description

Sets a save value for an entity.

This does not type-check entity keys. Setting an entity key to a non-entity value will treat it as NULL.

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 k, v in pairs( ents.FindByClass( "npc_rollermine" ) ) do v:SetSaveValue( "m_bHackedByAlyx", true ) end

Page Links


Special Pages


Wikis

?

Render Time: 33ms

Session 0
DB GetPage 4
Generate Html 7
SaveChanges 8
Render Body 0
Render Sidebar 12