SetPickupVisibility: Difference between revisions

From Onset Developer Wiki
No edit summary
No edit summary
 
Line 14: Line 14:
== Example ==
== Example ==
<syntaxhighlight lang="Lua>
<syntaxhighlight lang="Lua>
if GetPlayerHealth(playerId) < 90 then
if GetPlayerHealth(playerId) > 90 then
     SetPickupVisibility(pickupId, playerId, true)
     SetPickupVisibility(pickupId, playerId, false)
end
end
</syntaxhighlight>
</syntaxhighlight>

Latest revision as of 07:58, 13 July 2020

SetPickupVisibility

Type: Function
Context: Server
Introduced: v1.0

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