-
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(extra-natives/five): track switching
- Loading branch information
Showing
3 changed files
with
252 additions
and
10 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,22 @@ | ||
--- | ||
ns: CFX | ||
apiset: client | ||
game: gta5 | ||
--- | ||
## REGISTER_TRACK_SWITCH | ||
|
||
```c | ||
int REGISTER_TRACK_SWITCH(int trackIndex, int trackNode, int newIndex, int newNode, bool direction); | ||
``` | ||
Registers a track switch that when enabled will cause a train on the defined trackIndex, node and direction to change its current track index and begin traveling on the new node | ||
## Parameters | ||
* **trackIndex**: The index a train should be on | ||
* **trackNode**: The node a train should be on | ||
* **newIndex**: The new index for a train to be placed on | ||
* **newNode**: The new track node for a train to be placed on | ||
* **direction**: The direction a train should be traveling for this switch | ||
## Return value | ||
The track switch's handle or -1 if invalid. |
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_TRACK_SWITCH_ACTIVE | ||
|
||
```c | ||
void SET_TRACK_SWITCH_ACTIVE(int switchHandle, bool state); | ||
``` | ||
Sets the state of a track switch. | ||
## Parameters | ||
* **switchHandle**: The handle of the track switch. | ||
* **state**: if the track should be enabled or disabled. | ||