SA-MP Forums Archive
Pickup types - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Pickup types (/showthread.php?tid=598486)



Pickup types - AndreiWow - 13.01.2016

Should I use pickup type 1 for toll system? It triggers if picked in a vehicle?


Re: Pickup types - Amunra - 13.01.2016

Read about wiki samp PickupTypes..


Re: Pickup types - AndreiWow - 13.01.2016

Quote:
Originally Posted by Amunra
Посмотреть сообщение
I don't find a good one to work.. the one that trigger in a vehicle won't trigger the onplayerpickuppickup..


Re: Pickup types - Amunra - 13.01.2016

PHP код:
public OnPlayerPickUpPickup(playeridpickupid)
{
    if(
pickupid == //Your Pickup id)
    
{
        if(
IsPlayerInAnyVehicle(playerid))
        {
            
//your code here
        
}
    }
    return 
1;

Just try,
Correct me if i wrong!


Re: Pickup types - lucamsx - 13.01.2016

@up
it won't work, because:
1. Every pickupid besides 13 can't be picked when player is in the vehicle
2. If pickupid is 13, player can pick it up in a vehicle, but code won't be executed
I guess you should use dynamic checkpoints.