-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(server/gamestate): vehicles natives
* Added IS_VEHICLE_IN_AIR * Added IS_VEHICLE_DROWNING * Added GET_DEATH_STATE to check if a player is alive, dying or dead.
- Loading branch information
Showing
7 changed files
with
100 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
ns: CFX | ||
apiset: server | ||
--- | ||
## GET_PED_DEATH_STATE | ||
|
||
```c | ||
int GET_PED_DEATH_STATE(Ped ped); | ||
``` | ||
Retrieves the death state of the ped. | ||
```c | ||
enum eDeathState | ||
{ | ||
DeathState_Alive = 0, // The ped is alive | ||
DeathState_Dying = 1, // The ped is in the process of dying | ||
DeathState_Dead = 2, // The ped is dead | ||
DeathState_Max = 3 // Maximum health? maybe | ||
}; | ||
``` | ||
|
||
## Parameters | ||
* **ped**: The target ped. | ||
|
||
## Return value | ||
Returns the current death state of the ped as a value from the `eDeathState` enumeration. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
ns: CFX | ||
apiset: server | ||
--- | ||
## IS_VEHICLE_DROWNING | ||
|
||
```c | ||
bool IS_VEHICLE_DROWNING(Vehicle vehicle); | ||
``` | ||
Getter to check if the current vehicle is drowning. | ||
## Parameters | ||
* **vehicle**: The target vehicle. | ||
## Return value | ||
Return `true` if the vehicle is drowning (and the vehicle is underwater), `false` otherwise. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
ns: CFX | ||
apiset: server | ||
--- | ||
## IS_VEHICLE_IN_AIR | ||
|
||
```c | ||
bool IS_VEHICLE_IN_AIR(Vehicle vehicle); | ||
``` | ||
Getter to check if the current vehicle is in the air. | ||
## Parameters | ||
* **vehicle**: The target vehicle. | ||
## Return value | ||
Return `true` if the vehicle is in the air, `false` otherwise. |