Pickup from vehicle
#1

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?
Reply
#2

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..
Reply
#3

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.
Reply
#4

Quote:
Originally Posted by JasonRiggs
Посмотреть сообщение
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..
What did you mean, to re create pickup? For example, in LoadPickups(); i have line with pickup:

Код:
pickups[0][guns]=CreatePickupA(1221 ,14,138.4525,1941.9475,56.3207);
How to do, that pickup will appears again?
Reply
#5

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


Forum Jump:


Users browsing this thread: 1 Guest(s)