Revision Difference
Weapon:DefaultReload#568347
<function name="DefaultReload" parent="Weapon" type="classfunc">
<description>Forces the weapon to reload while playing given animation.
⤶
Ammo will be reloaded after the animation ends, and it will reload both <page>Weapon:SetClip1</page> and <page>Weapon:SetClip2</page> (if used)⤶
⤶
<page text="Primary attack">Weapon:SetNextPrimaryFire</page> and <page text="secondary attack">Weapon:SetNextSecondaryFire</page> will be unavailable for the duration of the reload (or until the weapon is switched away from)⤶
<note>
This will stop the <page>Weapon:Think</page> function from getting called while the weapon is reloading!
</note>
</description>
<realm>Shared</realm>
<args>
<arg name="act" type="number">Sequence to use as reload animation. Uses the <page>Enums/ACT</page>.</arg>⤶
<arg name="act" type="number{ACT}">View model activity (animation) to play. This is usually `ACT_VM_RELOAD`.⤶
⤶
Uses the <page>Enums/ACT</page>.</arg>⤶
</args>
<rets>
<ret name="" type="boolean">Did reloading actually take place</ret>⤶
<ret name="" type="boolean">Did reloading actually take place (`true`) or fail (`false`), such as when no reload was necessary.</ret>⤶
</rets>
</function>
Garry's Mod
Rust
Steamworks
Wiki Help