AddStaticPickup

From SA-MP Wiki

Jump to: navigation, search

AddStaticPickup


This function adds an object to the game in a pickupable form.


Parameters:
(model, type, Float:X, Float:Y, Float:Z, Virtualworld)
modelThe model of the pickup.
typeThe pickup spawn type, see further down this page.
Float:XThe X coordinate to create the pickup at.
Float:YThe Y coordinate to create the pickup at.
Float:ZThe Z coordinate to create the pickup at.
virtualworldThe virtual world ID of the pickup. Use -1 to show the pickup in all worlds.


Returns1 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 might be useful as well, as they're related to this function in one way or another.


Related Callbacks

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

Personal tools
In other languages