Ugrás a fő tartalomhoz

GetPickupPos

vigyázat

This function was added in omp v1.1.0.2612 and will not work in earlier versions!

Description

Gets the coordinates of a pickup.

NameDescription
pickupidThe ID of the pickup to get the position of.
&Float:xA float variable in which to store the x coordinate, passed by reference.
&Float:yA float variable in which to store the y coordinate, passed by reference.
&Float:zA 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;
}