SetPickupVisibility: Difference between revisions
From Onset Developer Wiki
Created page with "{{Info|Function|Server|1.0}} {{FuncDescription|Set the pickup visisbility properties.}} {{FuncSyntax|SetPickupVisibility(pickupid)}} {{FuncParameters}} {{FuncParam|pickupid..." |
No edit summary |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Info|Function|Server|1.0}} | {{Info|Function|Server|1.0}} | ||
{{FuncDescription|Set the pickup | {{FuncDescription|Set the pickup visibility for players.}} | ||
{{FuncSyntax|SetPickupVisibility( | {{FuncSyntax|SetPickupVisibility(pickup, player, bVisible)}} | ||
{{FuncParameters}} | {{FuncParameters}} | ||
{{FuncParam| | {{FuncParam|pickup|The pickup identifier.}} | ||
{{FuncParam|player|The player identifier.}} | |||
{{FuncParam|bVisible|'''false''' to hide it for the player.}} | |||
{{FuncReturnValue|Returns '''true''' on success.}} | {{FuncReturnValue|Returns '''true''' on success.}} | ||
Line 12: | Line 14: | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua> | <syntaxhighlight lang="Lua> | ||
if GetPlayerHealth(playerId) > 90 then | |||
SetPickupVisibility(pickupId, playerId, false) | |||
end | |||
</syntaxhighlight> | </syntaxhighlight> | ||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
{{Template:PickupFunctions}} | {{Template:PickupFunctions}} |
Latest revision as of 07:58, 13 July 2020
Description
Set the pickup visibility for players.
Syntax
SetPickupVisibility(pickup, player, bVisible)
Parameters
- pickup
The pickup identifier. - player
The player identifier. - bVisible
false to hide it for the player.
Return Value
- Returns true on success.
Example
if GetPlayerHealth(playerId) > 90 then
SetPickupVisibility(pickupId, playerId, false)
end
See also
- GetPickupCount
- GetStreamedPickups
- GetPickupLocation
- SetPickupPropertyValue
- GetPickupPropertyValue
- SetPickupVisibleForPlayers
- GetAllPickups
- CreatePickup
- DestroyPickup
- IsValidPickup
- SetPickupScale
- GetPickupScale
- SetPickupDimension
- GetPickupDimension
- SetPickupVisibility
- SetPickupOutline
- IsPickupStreamedIn