Entity::isAttached: Difference between revisions

From RAGE Multiplayer Wiki
No edit summary
 
Line 16: Line 16:
</syntaxhighlight>
</syntaxhighlight>
==See also==
==See also==
{{Entity_function_c}}
{{Entity_definition_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Latest revision as of 18:02, 1 May 2024

Syntax

entity.isAttached();

It appears that, once you are driving a vehicle... you are attached to it.

Required Arguments

Return value

  • Boolean

Example

mp.keys.bind(0x32, false, () => { // '2'
	mp.game.graphics.notify(`~r~${player.isAttached()}.`);
	if(player.isAttached()) {
		// player is attached to something
	}
});

See also