note Help Needed
This wiki is the result of an ongoing community effort — thank you all for helping!
If you want to provide changes to this page then please click here.
GetPickupPos
warning
This function was added in omp v1.1.0.2612 and will not work in earlier versions!
Description
Gets the coordinates of a pickup.
Name | Description |
---|---|
pickupid | The ID of the pickup to get the position of. |
&Float:x | A float variable in which to store the x coordinate, passed by reference. |
&Float:y | A float variable in which to store the y coordinate, passed by reference. |
&Float:z | A float variable in which to store the z coordinate, passed by reference. |
Returns
true - The function executed successfully.
false - The function failed to execute. The pickup specified doesn't exist.
Examples
new g_Pickup;
public OnGameModeInit()
{
g_Pickup = CreatePickup(1239, 1, 1686.6160, 1455.4277, 10.7705, -1);
new
Float:x,
Float:y,
Float:z;
GetPickupPos(g_Pickup, x, y, z);
// x = 1686.6160
// y = 1455.4277
// z = 10.7705
return 1;
}
Related Functions
- CreatePickup: Create a pickup.
- AddStaticPickup: Add a static pickup.
- DestroyPickup: Destroy a pickup.
- IsValidPickup: Checks if a pickup is valid.
- IsPickupStreamedIn: Checks if a pickup is streamed in for a specific player.
- IsPickupHiddenForPlayer: Checks if a pickup is hidden for a specific player.
- SetPickupPos: Sets the position of a pickup.
- SetPickupModel: Sets the model of a pickup.
- GetPickupModel: Gets the model ID of a pickup.
- SetPickupType: Sets the type of a pickup.
- GetPickupType: Gets the type of a pickup.
- SetPickupVirtualWorld: Sets the virtual world ID of a pickup.
- GetPickupVirtualWorld: Gets the virtual world ID of a pickup.
- ShowPickupForPlayer: Shows a pickup for a specific player.
- HidePickupForPlayer: Hides a pickup for a specific player.
- SetPickupForPlayer: Adjusts the pickup model, type, and position for a specific player.