OnPlayerPickUpPickup
From SA-MP Wiki
OnPlayerPickUpPickup
This callback is called when a player pickups a dynamic pickup created with the function CreatePickup.
(playerid,pickupid)
| playerid | The player who picked up the pickup. |
| pickupid | The ID of the pickup, gets returned by CreatePickup. |
This function does not return a specific value.
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.
- CreatePickup: Create a pickup.
- DestroyPickup: Destroy a pickup.
