Garry's Mod Wiki


  CNewParticleEffect CreateParticleSystemNoEntity( string effect, Vector pos, Angle ang = Angle( 0, 0, 0 ) )


Creates a new particle system, and sets control points 0 and 1 to given position, as well as optionally orientation of CP0 to the given angles. See also CreateParticleSystem

The particle effect must be precached with PrecacheParticleSystem and the file its from must be added via game.AddParticles before it can be used!


1 string effect
The name of the effect to create. It must be precached.
2 Vector pos
The position for the particle system.
3 Angle ang = Angle( 0, 0, 0 )
The orientation of the particle system.


1 CNewParticleEffect
The created particle system.


Creates a big explosion effect at the place the player is looking at.

PrecacheParticleSystem( "explosion_huge_g" ) concommand.Add( "test_particle", function( ply, cmd, arg ) local pos = ply:GetEyeTrace().HitPos CreateParticleSystemNoEntity( "explosion_huge_g", pos ) end )