Object::setPickupRegenerationTime: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:


==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">mp.game.object.setPickupRegenerationTime(p0, p1);</syntaxhighlight>
<syntaxhighlight lang="javascript">mp.game.object.setPickupRegenerationTime(Pickup, Duration);</syntaxhighlight>
 
=== Required Arguments ===
=== Required Arguments ===
*'''p0:''' unknown (to be checked)
*'''Pickup:''' Pickup handle <font color='green'>'''int'''</font>
*'''p1:''' unknown (to be checked)
*'''Duration:''' Time <font color='red'>'''int (ms)'''</font>
 
===Return value===
===Return value===
*'''Undefined'''
*'''Unknown'''
 
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
// todo
// Creates a rotating health pickup with 50hp and respawning time 10 mins
let pickup = mp.game.object.createPickupRotate(-1888453608, 1985.56, 3050.966 + 3, 47.21, 0, 0, 0, 9, 50, 0, true, mp.game.joaat('prop_ld_health_pack'));
mp.game.object.setPickupRegenerationTime(pickup, 600000);
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Object_s_function_c}}
{{Object_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]

Latest revision as of 20:08, 30 May 2019

Syntax

mp.game.object.setPickupRegenerationTime(Pickup, Duration);

Required Arguments

  • Pickup: Pickup handle int
  • Duration: Time int (ms)

Return value

  • Unknown

Example

// Creates a rotating health pickup with 50hp and respawning time 10 mins
let pickup = mp.game.object.createPickupRotate(-1888453608, 1985.56, 3050.966 + 3, 47.21, 0, 0, 0, 9, 50, 0, true, mp.game.joaat('prop_ld_health_pack'));
mp.game.object.setPickupRegenerationTime(pickup, 600000);

See also

  • [[Object::disableGlow|mp.game.object.disableGlow