Ana içeriğe geç

GetPlayerPickupPos

warning

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

Description

Gets the coordinates of a player-pickup.

NameDescription
playeridThe ID of the player.
pickupidThe ID of the player-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

This function does not return a specific value.

Examples

new PlayerPickup[MAX_PLAYERS];

public OnPlayerConnect(playerid)
{
PlayerPickup[playerid] = CreatePlayerPickup(playerid, 1239, 1, 2010.0979, 1222.0642, 10.8206, -1);

new
Float:x,
Float:y,
Float:z;

GetPickupPos(g_Pickup, x, y, z);
// x = 2010.0979
// y = 1222.0642
// z = 10.8206
return 1;
}