ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. reloadPedWeapon

Function

reloadPedWeapon

Server and clientPedsIdentical to MTA:SA

Makes a ped reload the weapon it is holding, as if the reload key was pressed. On the server the order goes to the player's game; for an NPC it is stored as a reload request. On the client it only works for the local player.

Syntax

bool reloadPedWeapon(ped ped)

Arguments

pedped
A player or an NPC. On the client only localPlayer.

Returns

true when the order was sent.

Example

addCommandHandler("przeladuj", function(player)
    reloadPedWeapon(player)
end)

See also