IsValidPickup: Difference between revisions
From Onset Developer Wiki
Created page with "{{Info|Function|Server|1.0}} {{FuncDescription|__EDIT_ME__}} {{FuncSyntax|IsValidPickup(pickup)}} {{FuncParameters}} {{FuncParam|pickup|__EDIT_ME__}} {{FuncReturnValue|__E..." |
No edit summary |
||
Line 1: | Line 1: | ||
{{Info|Function|Server|1.0}} | {{Info|Function|Server|1.0}} | ||
{{FuncDescription| | {{FuncDescription|Check if the specified pickup is valid or not.}} | ||
{{FuncSyntax|IsValidPickup(pickup)}} | {{FuncSyntax|IsValidPickup(pickup)}} | ||
{{FuncParameters}} | {{FuncParameters}} | ||
{{FuncParam|pickup| | {{FuncParam|pickup|The pickup identifier.}} | ||
{{FuncReturnValue| | {{FuncReturnValue|Returns '''true''' on success.}} | ||
== Example == | == Example == | ||
<syntaxhighlight lang="Lua> | |||
function DestroyPickup(pickup) | |||
if IsValidPickup(pickup) then | |||
DestroyPickup(pickup) | |||
end | |||
end | |||
</syntaxhighlight> | |||
{{RelatedFunctions}} | {{RelatedFunctions}} | ||
{{Template:PickupFunctions}} |
Latest revision as of 12:44, 19 November 2019
Description
Check if the specified pickup is valid or not.
Syntax
IsValidPickup(pickup)
Parameters
- pickup
The pickup identifier.
Return Value
- Returns true on success.
Example
function DestroyPickup(pickup)
if IsValidPickup(pickup) then
DestroyPickup(pickup)
end
end
See also
- GetPickupCount
- GetStreamedPickups
- GetPickupLocation
- SetPickupPropertyValue
- GetPickupPropertyValue
- SetPickupVisibleForPlayers
- GetAllPickups
- CreatePickup
- DestroyPickup
- IsValidPickup
- SetPickupScale
- GetPickupScale
- SetPickupDimension
- GetPickupDimension
- SetPickupVisibility
- SetPickupOutline
- IsPickupStreamedIn