Revision Difference
Structures/Bullet#516985
<cat>struct</cat>
<structure>
<description>Tables used for bullets see <page>Entity:FireBullets</page> and <page>GM:EntityFireBullets</page>.</description>
<fields>
{{StructureField|Entity|Attacker|The entity that should be reported as attacker eg. a player
By default this would be set to the entity <page>Entity:FireBullets</page> is called on.|self
</fields>
</structure>
{{StructureField|function|Callback|Function to be called **after** the bullet was fired. The arguments are:
* {{FuncArg|Entity|attacker}}⤶
* <page>Entity</page> attacker⤶
* <page>table</page> tr - See <page>TraceResult</page>
* {{FuncArg|CTakeDamageInfo|dmgInfo}}|nil⤶
* <page>CTakeDamageInfo</page> dmgInfo|nil⤶
}}{{StructureField|number|Damage|The damage dealt by the bullet|1}}{{StructureField|number|Force|The force of the bullets|1}}{{StructureField|number|Distance|Maximum distance the bullet can travel|56756}}{{StructureField|number|HullSize|The hull size of the bullet|0}}{{StructureField|number|Num|The amount of bullets to fire|1}}{{StructureField|number|Tracer|Show tracer for every x bullets|1}}{{StructureField|string|AmmoType|The ammunition name|""}}{{StructureField|string|TracerName|The tracer name. You can find a list of default effects [here](/gmod/Effects).|nil}}{{StructureField|Vector|Dir|The fire direction|Vector( 0, 0, 0 )}}{{StructureField|Vector|Spread|The spread, only x and y are needed|Vector( 0, 0, 0 )}}{{StructureField|Vector|Src|The position to fire the bullets from|Vector( 0, 0, 0 )}}{{StructureField|Entity|IgnoreEntity|The entity that the bullet will ignore when it will be shot.|NULL}}
}}