Weapon.DefaultReload

From GMod Wiki

Jump to: navigation, search


Function
Syntax Weapon:DefaultReload( Integer reloadActivity )
Description:
Forces the weapon to be reloaded. reloadActivity is usually ACT_VM_RELOAD. True is returned if the weapon is being reloaded. False is returned if the weapon has full ammo already and doesn't need reloading.
Returns: Boolean
In Object: Weapon
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.garrysmod.com/?title=Weapon.DefaultReload]Weapon.DefaultReload [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]



Examples

DescriptionThe below example will send the weapons reload via the default enumeration.
Used onNewerShared.png
Code
function SWEP:Reload()
 
	self:DefaultReload( ACT_VM_RELOAD );
 
end
OutputReloading action is display through both view and world models.
Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox