Jump to content

GIVE_WEAPON_TO_PED


Native Details

  • NameGIVE_WEAPON_TO_PED
  • NamespaceWEAPON
  • Native Hash0x5E3BDDBCB83F3D84
  • Typeint
  • First seen version1207

Native Parameters

  • Parameter 0Ped ped
    Ped to give the weapon to
  • Parameter 1Hash weaponHash
    Hash of the weapon
  • Parameter 2int ammoCount
  • Parameter 3BOOL equipNow
  • Parameter 4BOOL p4
    true
  • Parameter 5int group
  • Parameter 6BOOL p6
    false
  • Parameter 7int p7
  • Parameter 8int p8
  • Parameter 9BOOL leftHanded

User Feedback

Recommended Comments

Hayden Almeida

Posted

Example in C#:

public static void GivePlayerWeapon(int playerid, WeaponHash weapon, int ammo)
{
            if(Function.Call<bool>((Hash)0x8DECB02F88F428BC, playerid, (uint)weapon, 0, true)) // Has ped Got Weapon
                API.SetPedAmmo(playerid, (uint)weapon, ammo); // will give only ammo 
            else
                Function.Call((Hash)0x5E3BDDBCB83F3D84, playerid, (uint)weapon, ammo, false, true, 1, false, 0.5F, 1.0F, false, 0);
}

 



Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Red Dead Redemption 2 Native Database by www.mod-rdr.com, includes contributions by gudmunduro and alloc8or.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...