Object::createPickupRotate: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
No edit summary
Line 8: Line 8:


=== Required Arguments ===
=== Required Arguments ===
*'''pickupHash:''' '''<font color='yellow'>String</font>''' (Model Hash/Name)
*'''pickupHash:''' '''Model''' (<b>Hash <font color='red'>int</font> or Name <font color='gray'>String</font></b>)
*'''posX:''' '''<font color='green'>Float</font>'''
*'''posX:''' '''<font color='green'>Float</font>'''
*'''posY:''' '''<font color='green'>Float</font>'''
*'''posY:''' '''<font color='green'>Float</font>'''
Line 19: Line 19:
*'''p9:''' '''<font color='green'>int</font>'''
*'''p9:''' '''<font color='green'>int</font>'''
*'''p10:''' '''<font color='blue'>Boolean</font>'''
*'''p10:''' '''<font color='blue'>Boolean</font>'''
*'''modelHash:''' '''<font color='yellow'>String</font>''' (Model Hash/Name)
*'''modelHash:''' '''Model''' (<b>Hash <font color='red'>int</font> or Name <font color='gray'>String</font></b>)


===Return value===
===Return value===

Revision as of 22:36, 24 September 2018

Syntax

mp.game.object.createPickupRotate(pickupHash, posX, posY, posZ, rotX, rotY, rotZ, flag, amount, p9, p10, modelHash);

Flags

  • 8: Places the pickup on the ground.
  • 512: Spins the pickup 360°

Required Arguments

  • pickupHash: Model (Hash int or Name String)
  • posX: Float
  • posY: Float
  • posZ: Float
  • rotX: Float
  • rotY: Float
  • rotZ: Float
  • flag: int
  • amount: int
  • p9: int
  • p10: Boolean
  • modelHash: Model (Hash int or Name String)

Return value

  • Pickup Object

Example

// adds a health pickup of 50 hp at the bar in sandy shores on the ground.
   mp.game.object.createPickupRotate(-1888453608, 1985.56, 3050.966 + 3, 47.21, 0, 0, 0, 8, 50, 0, true, mp.game.joaat('prop_ld_health_pack'));

// adds a health pickup of 50 hp at the bar in sandy shores spinning in the air.
   mp.game.object.createPickupRotate(-1888453608, 1985.56, 3050.966 + 3, 47.21, 0, 0, 0, 512, 50, 0, true, mp.game.joaat('prop_ld_health_pack'));

See also

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