note Help Needed
This wiki is the result of an ongoing community effort — thank you all for helping!
If you want to provide changes to this page then please click here.
IsPlayerPickupStreamedIn
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 streamed in for the player.
Name | Description |
---|---|
playerid | The ID of the player. |
pickupid | The ID of the player-pickup. |
Returns
This function returns true if the player-pickup is streamed in for the player, 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]'
return 1;
}
public OnPlayerDeath(playerid, killerid, WEAPON:reason)
{
if (IsPlayerPickupStreamedIn(playerid, PlayerPickup[playerid]))
{
// Do something
}
return 1;
}
Related Functions
- CreatePlayerPickup: Creates a pickup which will be visible to only one player.
- DestroyPlayerPickup: Destroy a player-pickup.
- IsValidPlayerPickup: Checks if a player-pickup is valid.
- SetPlayerPickupPos: Sets the position of a player-pickup.
- GetPlayerPickupPos: Gets the coordinates of a player-pickup.
- SetPlayerPickupModel: Sets the model of a player-pickup.
- GetPlayerPickupModel: Gets the model ID of a player-pickup.
- SetPlayerPickupType: Sets the type of a player-pickup.
- GetPlayerPickupType: Gets the type of a player-pickup.
- SetPlayerPickupVirtualWorld: Sets the virtual world ID of a player-pickup.
- GetPlayerPickupVirtualWorld: Gets the virtual world ID of a player-pickup.