CreatePickup
From SA-MP Wiki
Contents |
CreatePickup
This function does exactly the same as AddStaticPickup, except it returns a pickup ID which can be used to destroy it afterwards.
(model,type,Float:X,Float:Y,Float:Z,Virtualworld)
| model | The model ID you'd like for the pickup. |
| type | The pickup spawn type, see further down this page. |
| Float:X | The X-coordinate for the pickup to show. |
| Float:Y | The Y-coordinate for the pickup to show. |
| Float:Z | The Z-coordinate for the pickup to show. |
| virtualworld | The virtual world ID of the pickup. A value of -1 will cause the pickup to display in all virtual worlds. |
| Returns | The PickupID. |
Click here for more info on using pickups
// Create a pickup for armour. new pickup; pickup = CreatePickup(1242, 2, 1503.3359, 1432.3585, 10.1191, -1); // Will create a pickup id 1242, type 2 at X 1503.3359, Y 1432.3585, Z 10.1191 in all virtual worlds.
Related Functions
The following Functions might be useful, as they're related to this function in one way or another.
- AddStaticPickup: Add a static pickup.
- DestroyPickup: Destroy a pickup.
Related Callbacks
The following Callbacks might be useful, as they're related to this function in one way or another.
- OnPlayerPickUpPickup: Called when a player picks up a pickup.
Available Pickup Types
0
The pickup does not display.
1
Not pickupable, exists all the time.
2
Pickupable, respawns after some time.
3
Pickupable, respawns after death
4
Disappears shortly after created (perhaps for weapon drops?)
5
Disappears shortly after created (perhaps for weapon drops?)
8
Pickupable, but has no effect. Disappears automatically.
11
Blows up a few seconds after being created (bombs?)
12
Blows up a few seconds after being created.
13
Slowly decends to the ground.
14
Pickupable, but only when in a vehicle. Falls through objects made with CreateObject, etc.
15
Pickupable, respawns after death
19
Pickupable, but has no effect (information icons?)
22
Pickupable, respawns after death.
23
Pickupable, but doesn't disappear on pickup.
