Jump to content

Natives don't return the value (RPH)


LevLeo

Recommended Posts

Hello, everyone. I trying to get the first handgun in ped inventory with natives.

Firstly, I trying to do that with RPH API, but it return from inventory only WeaponDescriptor, that don't contain any information about type weapon or it slots, only it hash and asset hash.

Secondly, RPH don't have an any references to the inventory slots, only to objects in it.

 

Maybe I just don't find the property/method/class for it, but I don't know. So, I tried to find a native for get access to the inventory, but I didn't.

I try to use GET_WEAPONTYPE_SLOT and GET_WEAPONTYPE_GROUP, in parameters I specified "WeaponDescriptor.Hash" and "WeaponDescriptor.Asset.Hash", but it return "0" or crashes. After that I tried to get the simple values with natives (GET_PED_MONEY) and I get the "0" (look at screenshot).

 

Please tell me, what am I doing wrong?

Could contain: text, screenshot, software, multimedia software, display, graphics software, editing, computer icon

Link to comment
Share on other sites

  • Community Team

For the get money:

the money from the player is not the money from the story mode peds.

the players money is then treated as a normal npc ped and the maximum money you can have is 65536 -> 16^4

if you go on duty this value might be set to 0, so if you give yourself money then, it should return the new value then.

 

for the weapon stuff pls provide another screenshot how you’ve done that

Edited by Yasd

Creator of MCCallouts 🚓🕵🏽‍♂️
Check out the MCCallouts Discord Server! 💻

Link to comment
Share on other sites

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