SetPickupVisibility: Difference between revisions

From Onset Developer Wiki
No edit summary
No edit summary
Line 1: Line 1:
{{Info|Function|Server|1.0}}
{{Info|Function|Server|1.0}}


{{FuncDescription|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.}}
{{FuncDescription|Set the pickup visibility for players.}}


{{FuncSyntax|SetPickupVisibility(pickup, player, bVisible)}}
{{FuncSyntax|SetPickupVisibility(pickup, player, bVisible)}}
Line 8: Line 8:
{{FuncParam|pickup|The pickup identifier.}}
{{FuncParam|pickup|The pickup identifier.}}
{{FuncParam|player|The player identifier.}}
{{FuncParam|player|The player identifier.}}
{{FuncParam|bVisible|'''true''' to make it visible.}}
{{FuncParam|bVisible|'''false''' to hide it for the player.}}


{{FuncReturnValue|Returns '''true''' on success.}}
{{FuncReturnValue|Returns '''true''' on success.}}

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, true)
end

See also