-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge Train movement natives (pr-2972)
b2cdc64 - feat(extra-natives/five): train movement natives
- Loading branch information
Showing
6 changed files
with
132 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
ns: CFX | ||
apiset: client | ||
game: gta5 | ||
--- | ||
## GET_TRAIN_CRUISE_SPEED | ||
|
||
```c | ||
float GET_TRAIN_CRUISE_SPEED(Vehicle train); | ||
``` | ||
Gets the trains desired speed. | ||
## Parameters | ||
* **train**: The train handle | ||
## Return value | ||
The desired cruise speed of the train. Not the speed the train is currently traveling at |
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,18 @@ | ||
--- | ||
ns: CFX | ||
apiset: client | ||
game: gta5 | ||
--- | ||
## GET_TRAIN_DIRECTION | ||
|
||
```c | ||
BOOL GET_TRAIN_DIRECTION(Vehicle train); | ||
``` | ||
Gets the direction the train is facing | ||
## Parameters | ||
* **train**: The train handle | ||
## Return value | ||
True if the train is moving forward on the track, 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,18 @@ | ||
--- | ||
ns: CFX | ||
apiset: client | ||
game: gta5 | ||
--- | ||
## GET_TRAIN_SPEED | ||
|
||
```c | ||
float GET_TRAIN_SPEED(Vehicle train); | ||
``` | ||
Gets the speed the train is currently going. | ||
## Parameters | ||
* **train**: The train handle | ||
## Return value | ||
The current speed of the train |
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,28 @@ | ||
--- | ||
ns: CFX | ||
apiset: client | ||
game: gta5 | ||
--- | ||
## GET_TRAIN_STATE | ||
|
||
```c | ||
int GET_TRAIN_STATE(Vehicle train); | ||
``` | ||
## Parameters | ||
* **train**: The train handle | ||
## Return value | ||
The trains current state | ||
```c | ||
enum eTrainState | ||
{ | ||
MOVING = 0, | ||
ENTERING_STATION, | ||
OPENING_DOORS, | ||
STOPPED, | ||
CLOSING_DOORS, | ||
LEAVING_STATION, | ||
} | ||
``` |
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: client | ||
game: gta5 | ||
--- | ||
## SET_TRAIN_STATE | ||
|
||
```c | ||
void SET_TRAIN_STATE(Vehicle train, int state); | ||
``` | ||
## Parameters | ||
* **train**: The train handle | ||
* **state**: The trains new state | ||
## Return value | ||
The trains current state, refer to [GET_TRAIN_STATE](?_0x81b50033) |