Garry's Mod Wiki

Entity:GetSpawnFlags

  number Entity:GetSpawnFlags()

Description

Returns the bitwise spawn flags used by the entity. These can be set by Entity:SetKeyValue.

Returns

1 number
The spawn flags of the entity, see SF_Enums.

Example

An alternative to Entity:HasSpawnFlags

local sf = ent:GetSpawnFlags() if( bit.band( sf, SF_PHYSPROP_PREVENT_PICKUP ) > 0 ) then print( "This prop cannot be picked up." ) end