2/28/2023 0 Comments How to spawn items in gmodThe trick will be to spawn a seat that can be a vehicle, as opposed to a prop. To get the position of the where you want the prop to spawn, noclip slightly under ground. Gmod Hide and Seek - Dinosaur Edition (Garrys Mod Funny Moments). Hook.Add ( "InitPostEntity", "SpawnTheProps",timer.Simple ( 1,SpawnProps ) ) function SpawnProp (position, model ) local ent1 = ents.Create ( "prop_physics" ) local ang = Vector ( 0, 0, 1 ):Angle ( ) You spawn objects and weld them together to. Just hold Q and it gives you props, vehicles, effects and tools. SpawnProp (Vector ( 0, 0, 0 ), "models/Cranes/crane_frame.mdl" ) Half-Life 2: Episode Two Particle Effect List. model )Īng:RotateAroundAxis (ang:Up ( ), math.random ( 0, 360 ) )Įnt1:SetModel (model ) local pos = position Here, we call a function to spawn a prop with the model "models/mymodel.mdl"įunction SpawnProp (position, model ) local ent1 = ents.Create ( "prop_physics" ) local ang = Vector ( 0, 0, 1 ):Angle ( ) Īng.pitch = ang.pitch + 90 print ( "Prop spawned with model: ". Hook.Add ( "InitPostEntity", "SpawnTheProps",timer.Simple ( 1,SpawnProps ) ) SpawnProp (Vector ( 0, 0, 0 ), "models/mymodel.mdl" ) end A simple way of spawning three crane framesįirst, we will use init post entity to spawn the entity's the on the server start.Īll of this code goes in your addons server autorun script, or a gamemodes a file
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |