Jump to content

Recommended Posts

Posted

My solution currently looks as follows:

Hash pedweaphash;
Vector3 vec = ENTITY::GET_WORLD_POSITION_OF_ENTITY_BONE(peds[i], PED::GET_PED_BONE_INDEX(peds[i], 11300));
WEAPON::GET_CURRENT_PED_WEAPON(peds[i], &pedweaphash, false, 0, false);
WEAPON::SET_PED_DROPS_INVENTORY_WEAPON(peds[i], pedweaphash, vec.x, vec.y, vec.z, 30);

 

So I first get the position of the right hand, then I get the current ped weapon and then I drop the current weapon out of the peds inventory at the position of the right hand.

The drawbacks of this method is that weapons dropped this way appear partly invisible and they are also marked with a "weapon pickup" symbol on the radar.

In GTA 5 there is this native (which only needs a ped parameter and then makes the ped drop the current weapon - no drawbacks):

void SET_PED_DROPS_WEAPON(Ped ped) // 0x6B7513D9966FBEC0 0x3D3329FA

Has anyone found this one in RDR 2 yet?

Join the conversation

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

Guest
Reply to this topic...

×   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.

×
×
  • Create New...