How to spawn items in gmod

broken image
broken image

We don't support this command from dedicated server console ]]įunction CCSpawn( ply, command, arguments ) [[-ĭesc: Console Command for a player to spawn different items y, 0 ) )įixupProp( ply, ent, hitpos, Vector( 0, 0, ent: OBBMins(). x, 0, 0 ) )įixupProp( ply, ent, hitpos, Vector( 0, ent: OBBMins(). Local function TryFixPropPosition( ply, ent, hitpos )įixupProp( ply, ent, hitpos, Vector( ent: OBBMins(). Hit ) then ent: SetPos( entPos + ( tr_up. Hit ) then ent: SetPos( entPos + ( tr_down.

broken image

Both traces hit meaning we are probably inside a wall on both sides, do nothing

broken image

Local endposU = ent: LocalToWorld( maxs ) Local endposD = ent: LocalToWorld( mins ) Local function fixupProp( ply, ent, hitpos, mins, maxs ) Maybe it should use physics object bounds, not OBB, and use physics object bounds to initial position too A little hacky function to help prevent spawning props partially inside walls Learn more about bidirectional Unicode characters To review, open the file in an editor that reveals hidden Unicode characters. This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below.