OnPlayerPickUpPickup

From SA-MP Wiki

Jump to: navigation, search

OnPlayerPickUpPickup


This callback is called when a player pickups a dynamic pickup created with the function CreatePickup.


Parameters:
(playerid,pickupid)
playeridThe player who picked up the pickup.
pickupidThe ID of the pickup, gets returned by CreatePickup.
This function does not return a specific value, it's best to simply ignore it.


new cash;
 
public OnGameModeInit()
{
    cash = CreatePickup(1274, 2, 0.0, 0.0, 9.0);
}
 
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == cash) GivePlayerMoney(playerid,10000);
}

Related Functions

The following functions might be useful as well, as they're related to this function in one way or another.

Personal tools