Entity.GetCreationID

From GMod Wiki

Jump to: navigation, search
Function
Syntax Entity:GetCreationID( )
Description:
Returns the creation ID of the entity.
Returns: Integer Creation ID
In Object: Entity
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Entity.GetCreationID]Entity.GetCreationID [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionPrints the creation ID of the entity you're looking at.
Used onNewerServer.png
Code
concommand.Add("creationid", function(ply)
	local tr = ply:GetEyeTrace()
	if tr.Entity then
		print( tr.Entity:GetCreationID() )
	end
end)
OutputN/A


Additional Notes

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox