Revision Difference
Structures/AmmoData#517075
<cat>struct</cat>
<structure>
<description>
Table structure that describes a Source Engine ammo type.
See <page>game.AddAmmoType</page> and <page>game.GetAmmoData</page>.
</description>
<fields>
{{StructureField|number|dmgtype|Damage type using <page>DMG</page>.
Related function is <page>game.GetAmmoDamageType</page>.|DMG_BULLET⤶
</fields>⤶
⤶
</structure>⤶
⤶
{{StructureField|number|force|The force of the ammo.⤶
⤶
Related function is <page>game.GetAmmoForce</page>.|1000⤶
}}{{StructureField|number|maxsplash|The maximum water splash size.|0}}{{StructureField|number|minsplash|The minimum water splash size.|0}}<item name="name" type="string">Name of the ammo.
<item name="dmgtype" type="number" default="DMG_BULLET">Damage type using <page>DMG</page>.
Related function is <page>game.GetAmmoDamageType</page>.</item>⤶
<item name="force" type="number" default="1000">The force of the ammo.⤶
⤶
Related function is <page>game.GetAmmoForce</page>.</item>⤶
<item name="maxsplash" type="number" default="0">The maximum water splash size.</item>⤶
<item name="minsplash" type="number" default="0">The minimum water splash size.</item>⤶
<item name="name" type="string">Name of the ammo.
Related functions are <page>game.GetAmmoName</page> and <page>game.GetAmmoID</page>.</item>
{{StructureField|number|npcdmg|<note>Can also be a string pointing to a convar. The value will automatically update with the convar's.</note>
<item name="npcdmg" type="number" default="10"><note>Can also be a string pointing to a convar. The value will automatically update with the convar's.</note>
The damage dealt to NPCs.
Related function is <page>game.GetAmmoNPCDamage</page>.|10⤶
}}{{StructureField|number|plydmg|<note>Can also be a string pointing to a convar. The value will automatically update with the convar's.</note>
Related function is <page>game.GetAmmoNPCDamage</page>.</item>⤶
<item name="plydmg" type="number" default="10"><note>Can also be a string pointing to a convar. The value will automatically update with the convar's.</note>
The damage dealt to players.
Related function is <page>game.GetAmmoPlayerDamage</page>.|10⤶
}}{{StructureField|number|tracer|Tracer type using <page>TRACER</page>.|TRACER_NONE}}{{StructureField|number|maxcarry|Maximum amount of ammo of this type the player should be able to carry in reserve.⤶
Related function is <page>game.GetAmmoPlayerDamage</page>.</item>⤶
<item name="tracer" type="number" default="TRACER_NONE">Tracer type using <page>TRACER</page>.</item>⤶
<item name="maxcarry" type="number" default="9999">Maximum amount of ammo of this type the player should be able to carry in reserve.⤶
Related function is <page>game.GetAmmoMax</page>.
<note>Can also be a string pointing to a convar. The value will automatically update with the convar's.</note>
<note>gmod_maxammo will override this value if set to above 0.</note>⤶
|9999⤶
}}{{StructureField|number|flags|Flags for the ammo type using <page>AMMO</page>.|0}}⤶
}}
<note>gmod_maxammo will override this value if set to above 0.</note></item>⤶
<item name="flags" type="number" default="0">Flags for the ammo type using <page>AMMO</page>.</item>⤶
</fields>⤶
⤶
</structure>⤶
⤶