ReloadPedWeapon

From Multi Theft Auto: Wiki
Revision as of 21:01, 14 July 2009 by Fenix1053 (talk | contribs) (New page: __NOTOC__ {{Server function}} This function makes a pedestrian reload their weapon. ==Syntax== <syntaxhighlight lang="lua"> bool reloadPedWeapon ( ped thePed ) </syntaxhighlight> ===Required Arguments=== *'''t...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function makes a pedestrian reload their weapon.

Syntax

bool reloadPedWeapon ( ped thePed )

Required Arguments

  • thePed: The ped who will reload their weapon.

Returns

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.

Example

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