AddStaticPickup
From SA-MP Wiki
(Difference between revisions)
Revision as of 18:58, 1 October 2013 W (Talk | contribs) (Remove {{Title}}) ← Previous diff |
Revision as of 01:10, 5 February 2014 Connor Mead (Talk | contribs) Next diff → |
||
Line 39: | Line 39: | ||
[[de:AddStaticPickup]] | [[de:AddStaticPickup]] | ||
+ | [[fr:AddStaticPickup]] | ||
[[nl:AddStaticPickup]] | [[nl:AddStaticPickup]] | ||
[[ru:AddStaticPickup]] | [[ru:AddStaticPickup]] |
Revision as of 01:10, 5 February 2014
Note | This function doesn't return a pickup id that you can use in, for example, OnPlayerPickUpPickup. Use CreatePickup if you'd like to assign IDs. |
Description:
This function adds a 'static' pickup to the game. These pickups support weapons, health, armor etc., with the ability to function without scripting them (weapons/health/armor will be given automatically).
(model, type, Float:X, Float:Y, Float:Z, Virtualworld)
model | The model of the pickup. |
type | The pickup spawn type. |
Float:X | The X coordinate to create the pickup at. |
Float:Y | The Y coordinate to create the pickup at. |
Float:Z | The Z coordinate to create the pickup at. |
virtualworld | The virtual world ID of the pickup. Use -1 to show the pickup in all worlds. |
Return Values:
1 if the pickup is successfully created.
public OnGameModeInit( ) { // Create a pickup for armor. AddStaticPickup(1242, 2, 1503.3359, 1432.3585, 10.1191, 0); // Create a pickup for some health, right next to the armour. AddStaticPickup(1240, 2, 1506.3359, 1432.3585, 10.1191, 0); // return 1; }
Related Functions
The following functions may be useful, as they are related to this function in one way or another.
- CreatePickup: Create a 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.