Entity::isAttached
Syntax
entity.isAttached();
It appears that, once you are driving a vehicle... you are attached to it.
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
}
});