Posts: 118
Threads: 59
Joined: Dec 2011
Reputation:
0
Hi. Is it possible to create pickup, that will be picked up only from car? I know, that 14 ID pickup can be picked up from vehicle, but it disappears.. Any ideas?
Posts: 851
Threads: 33
Joined: Jul 2016
Reputation:
0
Check if the player is the driver or not, If he's then let him pick it up, if not then re create it.. But I don't think that there's a method in creating that makes it for cars only..
Posts: 319
Threads: 7
Joined: Jul 2012
Reputation:
0
You can also create a pickup that exists always (ID 1) but not handle that pickup using OnPlayerPickUpPickup.
Instead, create a dynamic circular area using Incognito's streamer around the pickup and check OnPlayerEnterDynamicArea.
When a player enters this area, check if he's in a vehicle and do whatever you want as if the player picked up the pickup.
You may also want to disable or delete the pickup when this happens and re-create it later, also disable the dynamic area using a variable in case you want nobody else to be able to pickup the pickup.
Posts: 6,242
Threads: 8
Joined: Jun 2008
25.07.2018, 07:20
(
Последний раз редактировалось Sew_Sumi; 25.07.2018 в 09:13.
)
You could delete it and remake it, but the question is how it disappears, many of those pickups respawn.
Just where it's picked up, you'll simply delete the pickup and remake it in that section, but that could trigger double OnPlayerPickupPickup spam.
Another way could be to simply use a normal pickup, and check for the occupant being the driver of the car, or in the car that has triggered it.
Something else that could help you learn about them, is simply returning the information from the callback to the client so you can see under what circumstances each pickup type, triggers. Then just have 14+ pickups, with types ranging from 0-14+ or whatever range they are, for debugging purposes.