Weapon::canUseWeaponOnParachute: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:


==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">weapon.canUseWeaponOnParachute(weaponHash);</syntaxhighlight>
<syntaxhighlight lang="javascript">mp.game.weapon.canUseWeaponOnParachute(weaponHash);</syntaxhighlight>
=== Required Arguments ===
=== Required Arguments ===
*'''weaponHash:''' Model hash or name
*'''weaponHash:''' Model hash or name
Line 8: Line 8:
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
todo
mp.keys.bind(0x76, false, function () { // F7 key
    let weaponHash = mp.game.invoke(`0x0A6DB4965674D243`, mp.players.local.handle); //GET_SELECTED_PED_WEAPON
    let canUse = mp.game.weapon.canUseWeaponOnParachute(weaponHash);
    mp.gui.chat.push(`hash: ${weaponHash}, canUse: ${canUse}`);
})
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Weapon_function_c}}
{{Weapon_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]

Latest revision as of 04:26, 31 July 2018

Syntax

mp.game.weapon.canUseWeaponOnParachute(weaponHash);

Required Arguments

  • weaponHash: Model hash or name

Return value

  • Boolean

Example

mp.keys.bind(0x76, false, function () { // F7 key
    let weaponHash = mp.game.invoke(`0x0A6DB4965674D243`, mp.players.local.handle); //GET_SELECTED_PED_WEAPON
    let canUse = mp.game.weapon.canUseWeaponOnParachute(weaponHash);
    mp.gui.chat.push(`hash: ${weaponHash}, canUse: ${canUse}`);
})

See also