Garry's Mod Wiki

Entity:FireBullets

  Entity:FireBullets( table bulletInfo, boolean suppressHostEvents = false )

Description

Fires a bullet.

When used in a hook such as WEAPON:Think or WEAPON:PrimaryAttack, it will use Player:LagCompensation internally.

Lag compensation will not work if this function is called in a timer, regardless if the timer was made in a hook.
Due to how FireBullets is set up internally, bullet tracers will always originate from attachment 1.

Arguments

1 table bulletInfo
The bullet data to be used. See the Bullet structure.
2 boolean suppressHostEvents = false
Has the effect of encasing the FireBullets call in SuppressHostEvents, only works in multiplayer.