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>
__EDIT_ME__
if GetPlayerHealth(playerId) < 90 then
    SetPickupVisibility(pickupId, playerId, true)
end
</syntaxhighlight>
</syntaxhighlight>


{{RelatedFunctions}}
{{RelatedFunctions}}
{{Template:PickupFunctions}}
{{Template:PickupFunctions}}

Revision as of 16:59, 13 December 2019

SetPickupVisibility

Type: Function
Context: Server
Introduced: v1.0

Description

Set the pickup visibility for players. If you use this function then you will have to call this function for every player who should see this pickup.

Syntax

SetPickupVisibility(pickup, player, bVisible)

Parameters

  • pickup
    The pickup identifier.
  • player
    The player identifier.
  • bVisible
    true to make it visible.

Return Value

  • Returns true on success.

Example

if GetPlayerHealth(playerId) < 90 then
    SetPickupVisibility(pickupId, playerId, true)
end

See also