ScriptsAboutBlogToolsKnowledge BaseReviewsFAQBasketDocsSupport
client

GiveWeaponToPed

FiveM client native documentation with a Lua example.

Summary

Gives a weapon to a ped, optionally with ammo. Used for loadouts, admin tools, and job equipment.

Returns

void

Parameters

pednumberThe ped to give the weapon to.
weaponHashHashThe weapon hash (e.g. WEAPON_PISTOL).
ammoCountnumberAmount of ammo.
isHiddenbooleanWhether hidden.
equipNowbooleanWhether to equip immediately.

Example

local ped = PlayerPedId()
GiveWeaponToPed(ped, `WEAPON_PISTOL`, 250, false, true)

Common pitfalls

  • Giving weapons client-side is a common exploit vector — gate weapon access through server-validated inventory/job logic.
  • Weapon persists until removed; use RemoveWeaponFromPed or RemoveAllPedWeapons to clear.

Related natives

Related guides

Need protected areas on your map?

Viper Safe-Zone draws polygon safe zones in-game — no hand-edited coordinates — with weapon, combat and vehicle-speed rules per zone.

See Viper Safe-Zone →