GetPickupRespawnInterval: Difference between revisions
Jump to navigation
Jump to search
m (Needs example) |
m (→See Also) |
||
(One intermediate revision by one other user not shown) | |||
Line 15: | Line 15: | ||
==Example== | ==Example== | ||
<syntaxhighlight lang="lua"> | This example outputs to the player that picked up the pickup, that it's not going to spawn again for another ... secs. | ||
<syntaxhighlight lang="lua">addEventHandler("onPickUpHit",root,function(player) | |||
outputChatBox("That pickup isn't going to be there until "..tostring(getPickupRespawnInterval(source)).." is done.",player) | |||
end) | |||
</syntaxhighlight> | </syntaxhighlight> | ||
==See Also== | ==See Also== | ||
{{Pickup functions}} | {{Pickup functions|server}} | ||
Latest revision as of 22:36, 6 September 2024
Returns the time it takes before a pickup respawns after a player picked it up. The time is specified in milliseconds.
Syntax
int getPickupRespawnInterval ( pickup thePickup )
Required Arguments
- thePickup: the pickup you want the respawn time of
Returns
Returns the respawn time of the pickup if successful, false in case of failure.
Example
This example outputs to the player that picked up the pickup, that it's not going to spawn again for another ... secs.
addEventHandler("onPickUpHit",root,function(player) outputChatBox("That pickup isn't going to be there until "..tostring(getPickupRespawnInterval(source)).." is done.",player) end)
See Also
- getPickupRespawnInterval
- isPickupSpawned
- setPickupRespawnInterval
- usePickup
- Shared
- createPickup
- getPickupAmmo
- getPickupAmount
- getPickupType
- setPickupType
- getPickupWeapon