Przejdź do głównej zawartości

IsValidPlayerPickup

warning

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

Description

Checks if a player-pickup is valid.

NameDescription
playeridThe ID of the player.
pickupidThe ID of the player-pickup to check.

Returns

This function returns true if the player-pickup is valid, or false if it is not.

Examples

new PlayerPickup[MAX_PLAYERS]; // Create a variable to store the player-pickup ID in

public OnPlayerConnect(playerid)
{
PlayerPickup[playerid] = CreatePlayerPickup(playerid, 1242, 2, 2010.0979, 1222.0642, 10.8206, -1);
// Create an armour pickup and store the ID in 'PlayerPickup[playerid]'

if (IsValidPlayerPickup(playerid, PlayerPickup[playerid]))
{
// Do something
}
return 1;
}