Przejdź do głównej zawartości

GetPlayerPickupType

warning

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

Description

Gets the type of a player-pickup.

NameDescription
playeridThe ID of the player.
pickupidThe ID of the player-pickup to get the type of.

Returns

Returns the type of the player-pickup.

-1 if the player-pickup is not valid.

Examples

new PlayerPickup[MAX_PLAYERS];

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

new type = GetPlayerPickupType(playerid, PlayerPickup[playerid]);
// type = 1
return 1;
}