Entity:AddSpawnFlags
Description
Adds onto the current SpawnFlags of an Entity.
SpawnFlags can easily be found on https://developer.valvesoftware.com/wiki/.
See also Entity:RemoveSpawnFlags, Entity:SetSpawnFlags
Using SF Enumerations won't work, if this function is ran clientside due to the enumerations being defined only Serverside. Use the actual SpawnFlag number.
Arguments
Example
When a turret Entity is created, it adds the Out of Ammo SpawnFlag, therefore it doesn't have ammo.
Example
When a turret Entity is created, it adds the Out of Ammo and Fast Retire SpawnFlag, therefore it doesn't have ammo and it goes into idle state faster.
Garry's Mod
Rust
Steamworks
Wiki Help