reloadPedWeapon | Multi Theft Auto: Wiki Skip to content

reloadPedWeapon

Client-side
Server-side
Shared

Manual Review Required

Please finish this page using the corresponding Old Wiki article. Go to Contribution guidelines for more information.


This function makes a pedestrian reload their weapon.

OOP Syntax Help! I don't understand this!

  • Method:ped:reloadWeapon(...)

Syntax

bool reloadPedWeapon ( ped thePed )
Required Arguments
  • thePed: The ped who will reload their weapon.

Returns

  • bool: value

Returns true if the pedestrian was made to reload, or false if invalid arguments were passed or that pedestrian has a weapon which cannot be reloaded.

Code Examples

shared

This example adds a 'reloadgun' console command that lets players reload their weapon.

function reloadGun ( sourcePlayer, command )
reloadPedWeapon ( sourcePlayer )
end
addCommandHandler ( "reloadgun", reloadGun )

See Also