OnPedWeaponReload

From Multi Theft Auto: Wiki
Revision as of 21:15, 17 August 2025 by -ffs-PLASMA (talk | contribs) (Created page with "__NOTOC__ {{Server event}} This event is triggered when a ped reloads his weapons. ==Parameters== <syntaxhighlight lang="lua"> int weapon, int clip, int ammo </syntaxhighlight> *'''weapon''': an int representing the weapon that was switched from. *'''clip''': an int representing the weapon clip size. *'''ammo''': an int representing the weapon ammo. ==Source== The source of this event is the ped that reloade...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This event is triggered when a ped reloads his weapons.

Parameters

int weapon, int clip, int ammo
  • weapon: an int representing the weapon that was switched from.
  • clip: an int representing the weapon clip size.
  • ammo: an int representing the weapon ammo.

Source

The source of this event is the ped that reloaded his weapon.

Example

This example outputs a line to the chat box whenever a ped reloads weapons.

function weaponReload(iWeaponID, iClip, iAmmo)

outputChatBox("A ped reloaded "..getWeaponNameFromID(iWeaponID)..", clip: "..iClip..", ammo: "..iAmmo.."!");

end

addEventHandler("OnPedWeaponReload", root, weaponReload);

See Also

Ped events


Event functions