Jump to content

How do you create "pick-up" items?


 Share

Recommended Posts

Hi there.

 

I am trying to spawn in a clip of money for the player to pick up. However I can't seem to get it done. I have been trying this but to no avail:

 

//playerPos is in this case a place holder

 

OBJECT::CREATE_PICKUP(GAMEPLAY::GET_HASH_KEY("PICKUP_MONEY_VARIABLE"), playerPos.x + 5, playerPos.y + 5, playerPos.z + 5, 0, 200, true, GAMEPLAY::GET_HASH_KEY("s_inv_moneyclip01x"), 1, 1);

 

Could someone help me out with this?

Edited by DoctorBones
Link to comment
Share on other sites

20 minutes ago, LMS said:

What happens with the code above? The pickups certainly do work, I have used them with money bags before. Will see if I can find that code later.

Okay I don't know what happened but now it works. Though I cannot pick it up. It adds to your wallet once you get near it. I don't know if that can be changed to you having to pick it up?

Link to comment
Share on other sites

I think despite the name pickup you usually automatically pick those up. Maybe you can use of the natives to block it from collection and then see if you can trigger it manually. Alternatively, try spawning the clip yourself.

Link to comment
Share on other sites

1 hour ago, LMS said:

I think despite the name pickup you usually automatically pick those up. Maybe you can use of the natives to block it from collection and then see if you can trigger it manually.

Oh yeah that could work. Thanks for the help!

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.

 Share

×
×
  • Create New...