UsePickup: Difference between revisions
Jump to navigation
Jump to search
(New page: __NOTOC__ {{Server client function}} This function is used to force a pickup ==Syntax== <syntaxhighlight lang="lua"> bool usePickup ( pickup thePickup, player thePlayer ) </syntaxhighlight> ===Required Arg...) |
(Is only server-side function) |
||
(5 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
__NOTOC__ | __NOTOC__ | ||
{{Server | {{Server function}} | ||
This function is used to | This function is used to simulate the player using a pickup | ||
==Syntax== | ==Syntax== | ||
Line 14: | Line 14: | ||
==Example== | ==Example== | ||
<section name="Server" class="server" show="true"> | <section name="Server" class="server" show="true"> | ||
This example | This example gives a random player 100% armor by using a pickup. | ||
<syntaxhighlight lang="lua"> | <syntaxhighlight lang="lua"> | ||
local pickup = createPickup(3,3,3,1,100) -- Create a pickup for 100% armor | |||
usePickup(pickup,getRandomPlayer()) -- Make a random player use the pickup (shall recieve 100% armor) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
</section> | </section> | ||
==See Also== | |||
{{Pickup functions}} | {{Pickup functions}} |
Latest revision as of 14:20, 24 October 2024
This function is used to simulate the player using a pickup
Syntax
bool usePickup ( pickup thePickup, player thePlayer )
Required Arguments
- thePickup: The pickup element to be picked up/used.
- thePlayer: The player to use the pickup.
Example
Click to collapse [-]
ServerThis example gives a random player 100% armor by using a pickup.
local pickup = createPickup(3,3,3,1,100) -- Create a pickup for 100% armor usePickup(pickup,getRandomPlayer()) -- Make a random player use the pickup (shall recieve 100% armor)
See Also