---
title: "NPC_GetVehicleHydraThrusters | open.mp"
description: "Gets the thruster direction of an NPC's Hydra vehicle."
canonical: https://omp.itsneufox.com/docs/scripting/functions/NPC_GetVehicleHydraThrusters
language: en
---

# NPC\_GetVehicleHydraThrusters

warning

This function was added in omp v1.5.8.3079 and will not work in earlier versions!

## Description

Gets the thruster direction of an NPC's Hydra vehicle.

| Name | Description |
| --- | --- |
| npcid | The ID of the NPC |

## Returns

Returns the thruster direction (0 = forward, 1 = vertical), or -1 if not in a Hydra.

## Examples

```c
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (!strcmp(cmdtext, "/checkvehiclehydra", true))
    {
        new npcid = PlayerNPC[playerid];
        if (npcid == INVALID_NPC_ID)
            return SendClientMessage(playerid, 0xFF0000FF, "You are not debugging a NPC.");

        if (!NPC_IsValid(npcid))
            return SendClientMessage(playerid, 0xFF0000FF, "Invalid NPC.");

        if (NPC_GetVehicle(npcid) == INVALID_VEHICLE_ID)
            return SendClientMessage(playerid, 0xFFFF00FF, "NPC %d is not in any vehicle.", npcid);

        new thrusters = NPC_GetVehicleHydraThrusters(npcid);

        if (thrusters == 0)
            SendClientMessage(playerid, 0x00FF00FF, "NPC %d: Hydra thrusters FORWARD (0)", npcid);
        else
            SendClientMessage(playerid, 0x00FF00FF, "NPC %d: Hydra thrusters BACKWARD (1)", npcid);

        return 1;
    }
    return 0;
}
```

## Notes

-   Only works with Hydra vehicles (model 520)
-   Returns -1 if the NPC is not in a Hydra or not in a vehicle
-   Direction 0 = forward flight mode (jet mode)
-   Direction 1 = vertical flight mode (hover mode)

## Related Functions

-   [NPC\_SetVehicleHydraThrusters](https://omp.itsneufox.com/docs/scripting/functions/NPC_SetVehicleHydraThrusters): Set thruster direction
-   [NPC\_GetVehicle](https://omp.itsneufox.com/docs/scripting/functions/NPC_GetVehicle): Get NPC's current vehicle
-   [NPC\_GetVehicleHealth](https://omp.itsneufox.com/docs/scripting/functions/NPC_GetVehicleHealth): Get vehicle health
-   [NPC\_PutInVehicle](https://omp.itsneufox.com/docs/scripting/functions/NPC_PutInVehicle): Put NPC in vehicle

## Related Callbacks

_No specific callbacks are triggered by this function._
