---
title: "IsValidPlayerPickup | open.mp"
description: "Checks if a player-pickup is valid."
canonical: https://omp.itsneufox.com/docs/scripting/functions/IsValidPlayerPickup
language: en
---

# 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.

| Name | Description |
| --- | --- |
| playerid | The ID of the player. |
| pickupid | The 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

```c
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;
}
```

## Related Functions

-   [CreatePlayerPickup](https://omp.itsneufox.com/docs/scripting/functions/CreatePlayerPickup): Creates a pickup which will be visible to only one player.
-   [DestroyPlayerPickup](https://omp.itsneufox.com/docs/scripting/functions/DestroyPlayerPickup): Destroy a player-pickup.
-   [IsPlayerPickupStreamedIn](https://omp.itsneufox.com/docs/scripting/functions/IsPlayerPickupStreamedIn): Checks if a player-pickup is streamed in for the player.
-   [SetPlayerPickupPos](https://omp.itsneufox.com/docs/scripting/functions/SetPlayerPickupPos): Sets the position of a player-pickup.
-   [GetPlayerPickupPos](https://omp.itsneufox.com/docs/scripting/functions/GetPlayerPickupPos): Gets the coordinates of a player-pickup.
-   [SetPlayerPickupModel](https://omp.itsneufox.com/docs/scripting/functions/SetPlayerPickupModel): Sets the model of a player-pickup.
-   [GetPlayerPickupModel](https://omp.itsneufox.com/docs/scripting/functions/GetPlayerPickupModel): Gets the model ID of a player-pickup.
-   [SetPlayerPickupType](https://omp.itsneufox.com/docs/scripting/functions/SetPlayerPickupType): Sets the type of a player-pickup.
-   [GetPlayerPickupType](https://omp.itsneufox.com/docs/scripting/functions/GetPlayerPickupType): Gets the type of a player-pickup.
-   [SetPlayerPickupVirtualWorld](https://omp.itsneufox.com/docs/scripting/functions/SetPlayerPickupVirtualWorld): Sets the virtual world ID of a player-pickup.
-   [GetPlayerPickupVirtualWorld](https://omp.itsneufox.com/docs/scripting/functions/GetPlayerPickupVirtualWorld): Gets the virtual world ID of a player-pickup.
