Unnamed: 0
int64 0
0
| repo_id
stringlengths 5
186
| file_path
stringlengths 15
223
| content
stringlengths 1
32.8M
⌀ |
---|---|---|---|
0 | repos/exercism-ziglang | repos/exercism-ziglang/darts/HELP.md | # Help
## Running the tests
Write your code in `<exercise_name>.zig`.
To run the tests for an exercise, run:
```bash
zig test test_exercise_name.zig
```
in the exercise's root directory (replacing `exercise_name` with the name of the exercise).
## Submitting your solution
You can submit your solution using the `exercism submit darts.zig` command.
This command will upload your solution to the Exercism website and print the solution page's URL.
It's possible to submit an incomplete solution which allows you to:
- See how others have completed the exercise
- Request help from a mentor
## Need to get help?
If you'd like help solving the exercise, check the following pages:
- The [Zig track's documentation](https://exercism.org/docs/tracks/zig)
- The [Zig track's programming category on the forum](https://forum.exercism.org/c/programming/zig)
- [Exercism's programming category on the forum](https://forum.exercism.org/c/programming/5)
- The [Frequently Asked Questions](https://exercism.org/docs/using/faqs)
Should those resources not suffice, you could submit your (incomplete) solution to request mentoring.
- [The Zig Programming Language Documentation][documentation] is a great overview of all of the language features that Zig provides to those who use it.
- [Zig Learn][zig-learn] is an excellent primer that explains the language features that Zig has to offer.
- [Ziglings][ziglings] is highly recommended.
Learn Zig by fixing tiny broken programs.
- [The Zig Programming Language Discord][discord-zig] is the main [Discord][discord].
It provides a great way to get in touch with the Zig community at large, and get some quick, direct help for any Zig related problem.
- [#zig][irc] on irc.freenode.net is the main Zig IRC channel.
- [/r/Zig][reddit] is the main Zig subreddit.
- [Stack Overflow][stack-overflow] can be used to discover code snippets and solutions to problems that may have already asked and maybe solved by others.
[discord]: https://discordapp.com
[discord-zig]: https://discord.com/invite/gxsFFjE
[documentation]: https://ziglang.org/documentation/master
[irc]: https://webchat.freenode.net/?channels=%23zig
[reddit]: https://www.reddit.com/r/Zig
[stack-overflow]: https://stackoverflow.com/questions/tagged/zig
[zig-learn]: https://ziglearn.org/
[ziglings]: https://codeberg.org/ziglings/exercises |
0 | repos/exercism-ziglang | repos/exercism-ziglang/darts/darts.zig | const std = @import("std");
pub const Coordinate = struct {
x: f32,
y: f32,
pub fn init(x_coord: f32, y_coord: f32) Coordinate {
return Coordinate{ .x = x_coord, .y = y_coord };
}
pub fn score(self: Coordinate) usize {
const radius: f32 = std.math.sqrt(std.math.pow(f32, self.x, 2) + std.math.pow(f32, self.y, 2));
if (radius <= 1.0) {
return 10;
}
if (radius <= 5.0) {
return 5;
}
if (radius <= 10.0) {
return 1;
}
return 0;
}
};
|
0 | repos/exercism-ziglang/darts | repos/exercism-ziglang/darts/.exercism/metadata.json | {"track":"zig","exercise":"darts","id":"f3c4b9b8b6a74b11af1d1f4ecb95940b","url":"https://exercism.org/tracks/zig/exercises/darts","handle":"exilesprx","is_requester":true,"auto_approve":false} |
0 | repos/exercism-ziglang/darts | repos/exercism-ziglang/darts/.exercism/config.json | {
"authors": [
"massivelivefun"
],
"files": {
"solution": [
"darts.zig"
],
"test": [
"test_darts.zig"
],
"example": [
".meta/example.zig"
]
},
"blurb": "Calculate the points scored in a single toss of a Darts game.",
"source": "Inspired by an exercise created by a professor Della Paolera in Argentina"
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/isbn-verifier/test_isbn_verifier.zig | const std = @import("std");
const testing = std.testing;
const isValidIsbn10 = @import("isbn_verifier.zig").isValidIsbn10;
test "valid ISBN" {
try testing.expect(isValidIsbn10("3-598-21508-8"));
}
test "invalid ISBN check digit" {
try testing.expect(!isValidIsbn10("3-598-21508-9"));
}
test "valid ISBN with a check digit of 10" {
try testing.expect(isValidIsbn10("3-598-21507-X"));
}
test "check digit is a character other than x" {
try testing.expect(!isValidIsbn10("3-598-21507-A"));
}
test "invalid check digit in ISBN is not treated as zero" {
try testing.expect(!isValidIsbn10("4-598-21507-B"));
}
test "invalid character in ISBN is not treated as zero" {
try testing.expect(!isValidIsbn10("3-598-P1581-X"));
}
test "x is only valid as a check digit" {
try testing.expect(!isValidIsbn10("3-598-2X507-9"));
}
test "valid ISBN without separating dashes" {
try testing.expect(isValidIsbn10("3598215088"));
}
test "ISBN without separating dashes and x as check digit" {
try testing.expect(isValidIsbn10("359821507X"));
}
test "ISBN without check digit and dashes" {
try testing.expect(!isValidIsbn10("359821507"));
}
test "too long ISBN and no dashes" {
try testing.expect(!isValidIsbn10("3598215078X"));
}
test "too short ISBN" {
try testing.expect(!isValidIsbn10("00"));
}
test "ISBN without check digit" {
try testing.expect(!isValidIsbn10("3-598-21507"));
}
test "check digit of x should not be used for 0" {
try testing.expect(!isValidIsbn10("3-598-21515-X"));
}
test "empty ISBN" {
try testing.expect(!isValidIsbn10(""));
}
test "input is 9 characters" {
try testing.expect(!isValidIsbn10("134456729"));
}
test "invalid characters are not ignored after checking length" {
try testing.expect(!isValidIsbn10("3132P34035"));
}
test "invalid characters are not ignored before checking length" {
try testing.expect(!isValidIsbn10("3598P215088"));
}
test "input is too long but contains a valid ISBN" {
try testing.expect(!isValidIsbn10("98245726788"));
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/isbn-verifier/README.md | # ISBN Verifier
Welcome to ISBN Verifier on Exercism's Zig Track.
If you need help running the tests or submitting your code, check out `HELP.md`.
## Instructions
The [ISBN-10 verification process][isbn-verification] is used to validate book identification numbers.
These normally contain dashes and look like: `3-598-21508-8`
## ISBN
The ISBN-10 format is 9 digits (0 to 9) plus one check character (either a digit or an X only).
In the case the check character is an X, this represents the value '10'.
These may be communicated with or without hyphens, and can be checked for their validity by the following formula:
```text
(d₁ * 10 + d₂ * 9 + d₃ * 8 + d₄ * 7 + d₅ * 6 + d₆ * 5 + d₇ * 4 + d₈ * 3 + d₉ * 2 + d₁₀ * 1) mod 11 == 0
```
If the result is 0, then it is a valid ISBN-10, otherwise it is invalid.
## Example
Let's take the ISBN-10 `3-598-21508-8`.
We plug it in to the formula, and get:
```text
(3 * 10 + 5 * 9 + 9 * 8 + 8 * 7 + 2 * 6 + 1 * 5 + 5 * 4 + 0 * 3 + 8 * 2 + 8 * 1) mod 11 == 0
```
Since the result is 0, this proves that our ISBN is valid.
## Task
Given a string the program should check if the provided string is a valid ISBN-10.
Putting this into place requires some thinking about preprocessing/parsing of the string prior to calculating the check digit for the ISBN.
The program should be able to verify ISBN-10 both with and without separating dashes.
## Caveats
Converting from strings to numbers can be tricky in certain languages.
Now, it's even trickier since the check digit of an ISBN-10 may be 'X' (representing '10').
For instance `3-598-21507-X` is a valid ISBN-10.
[isbn-verification]: https://en.wikipedia.org/wiki/International_Standard_Book_Number
## Source
### Created by
- @ee7
### Based on
Converting a string into a number and some basic processing utilizing a relatable real world example. - https://en.wikipedia.org/wiki/International_Standard_Book_Number#ISBN-10_check_digit_calculation |
0 | repos/exercism-ziglang | repos/exercism-ziglang/isbn-verifier/isbn_verifier.zig | const std = @import("std");
pub fn isValidIsbn10(s: []const u8) bool {
var digits: usize = 0;
var sum: usize = 0;
for (s) |c| {
var value: usize = undefined;
switch (c) {
'-' => continue,
'X' => if (digits == 9) {
value = 10;
} else return false,
'0'...'9' => {
value = std.fmt.charToDigit(c, 10) catch 0;
},
else => return false,
}
sum += value * (10 - digits);
digits += 1;
}
return digits == 10 and sum % 11 == 0;
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/isbn-verifier/HELP.md | # Help
## Running the tests
Write your code in `<exercise_name>.zig`.
To run the tests for an exercise, run:
```bash
zig test test_exercise_name.zig
```
in the exercise's root directory (replacing `exercise_name` with the name of the exercise).
## Submitting your solution
You can submit your solution using the `exercism submit isbn_verifier.zig` command.
This command will upload your solution to the Exercism website and print the solution page's URL.
It's possible to submit an incomplete solution which allows you to:
- See how others have completed the exercise
- Request help from a mentor
## Need to get help?
If you'd like help solving the exercise, check the following pages:
- The [Zig track's documentation](https://exercism.org/docs/tracks/zig)
- The [Zig track's programming category on the forum](https://forum.exercism.org/c/programming/zig)
- [Exercism's programming category on the forum](https://forum.exercism.org/c/programming/5)
- The [Frequently Asked Questions](https://exercism.org/docs/using/faqs)
Should those resources not suffice, you could submit your (incomplete) solution to request mentoring.
- [The Zig Programming Language Documentation][documentation] is a great overview of all of the language features that Zig provides to those who use it.
- [Zig Learn][zig-learn] is an excellent primer that explains the language features that Zig has to offer.
- [Ziglings][ziglings] is highly recommended.
Learn Zig by fixing tiny broken programs.
- [The Zig Programming Language Discord][discord-zig] is the main [Discord][discord].
It provides a great way to get in touch with the Zig community at large, and get some quick, direct help for any Zig related problem.
- [#zig][irc] on irc.freenode.net is the main Zig IRC channel.
- [/r/Zig][reddit] is the main Zig subreddit.
- [Stack Overflow][stack-overflow] can be used to discover code snippets and solutions to problems that may have already asked and maybe solved by others.
[discord]: https://discordapp.com
[discord-zig]: https://discord.com/invite/gxsFFjE
[documentation]: https://ziglang.org/documentation/master
[irc]: https://webchat.freenode.net/?channels=%23zig
[reddit]: https://www.reddit.com/r/Zig
[stack-overflow]: https://stackoverflow.com/questions/tagged/zig
[zig-learn]: https://ziglearn.org/
[ziglings]: https://github.com/ratfactor/ziglings |
0 | repos/exercism-ziglang/isbn-verifier | repos/exercism-ziglang/isbn-verifier/.exercism/metadata.json | {"track":"zig","exercise":"isbn-verifier","id":"4e5dcd3d629c442a9c329f11a4d6cf8a","url":"https://exercism.org/tracks/zig/exercises/isbn-verifier","handle":"exilesprx","is_requester":true,"auto_approve":false} |
0 | repos/exercism-ziglang/isbn-verifier | repos/exercism-ziglang/isbn-verifier/.exercism/config.json | {
"authors": [
"ee7"
],
"files": {
"solution": [
"isbn_verifier.zig"
],
"test": [
"test_isbn_verifier.zig"
],
"example": [
".meta/example.zig"
]
},
"blurb": "Check if a given string is a valid ISBN-10 number.",
"source": "Converting a string into a number and some basic processing utilizing a relatable real world example.",
"source_url": "https://en.wikipedia.org/wiki/International_Standard_Book_Number#ISBN-10_check_digit_calculation"
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/difference-of-squares/README.md | # Difference of Squares
Welcome to Difference of Squares on Exercism's Zig Track.
If you need help running the tests or submitting your code, check out `HELP.md`.
## Instructions
Find the difference between the square of the sum and the sum of the squares of the first N natural numbers.
The square of the sum of the first ten natural numbers is
(1 + 2 + ... + 10)² = 55² = 3025.
The sum of the squares of the first ten natural numbers is
1² + 2² + ... + 10² = 385.
Hence the difference between the square of the sum of the first ten natural numbers and the sum of the squares of the first ten natural numbers is 3025 - 385 = 2640.
You are not expected to discover an efficient solution to this yourself from first principles; research is allowed, indeed, encouraged.
Finding the best algorithm for the problem is a key skill in software engineering.
## Source
### Created by
- @massivelivefun
### Based on
Problem 6 at Project Euler - https://projecteuler.net/problem=6 |
0 | repos/exercism-ziglang | repos/exercism-ziglang/difference-of-squares/HELP.md | # Help
## Running the tests
Write your code in `<exercise_name>.zig`.
To run the tests for an exercise, run:
```bash
zig test test_exercise_name.zig
```
in the exercise's root directory (replacing `exercise_name` with the name of the exercise).
## Submitting your solution
You can submit your solution using the `exercism submit difference_of_squares.zig` command.
This command will upload your solution to the Exercism website and print the solution page's URL.
It's possible to submit an incomplete solution which allows you to:
- See how others have completed the exercise
- Request help from a mentor
## Need to get help?
If you'd like help solving the exercise, check the following pages:
- The [Zig track's documentation](https://exercism.org/docs/tracks/zig)
- The [Zig track's programming category on the forum](https://forum.exercism.org/c/programming/zig)
- [Exercism's programming category on the forum](https://forum.exercism.org/c/programming/5)
- The [Frequently Asked Questions](https://exercism.org/docs/using/faqs)
Should those resources not suffice, you could submit your (incomplete) solution to request mentoring.
- [The Zig Programming Language Documentation][documentation] is a great overview of all of the language features that Zig provides to those who use it.
- [Zig Learn][zig-learn] is an excellent primer that explains the language features that Zig has to offer.
- [Ziglings][ziglings] is highly recommended.
Learn Zig by fixing tiny broken programs.
- [The Zig Programming Language Discord][discord-zig] is the main [Discord][discord].
It provides a great way to get in touch with the Zig community at large, and get some quick, direct help for any Zig related problem.
- [#zig][irc] on irc.freenode.net is the main Zig IRC channel.
- [/r/Zig][reddit] is the main Zig subreddit.
- [Stack Overflow][stack-overflow] can be used to discover code snippets and solutions to problems that may have already asked and maybe solved by others.
[discord]: https://discordapp.com
[discord-zig]: https://discord.com/invite/gxsFFjE
[documentation]: https://ziglang.org/documentation/master
[irc]: https://webchat.freenode.net/?channels=%23zig
[reddit]: https://www.reddit.com/r/Zig
[stack-overflow]: https://stackoverflow.com/questions/tagged/zig
[zig-learn]: https://ziglearn.org/
[ziglings]: https://github.com/ratfactor/ziglings |
0 | repos/exercism-ziglang | repos/exercism-ziglang/difference-of-squares/test_difference_of_squares.zig | const std = @import("std");
const testing = std.testing;
const difference_of_squares = @import("difference_of_squares.zig");
test "square of sum up to 1" {
const expected: usize = 1;
const actual = difference_of_squares.squareOfSum(1);
try testing.expectEqual(expected, actual);
}
test "square of sum up to 5" {
const expected: usize = 225;
const actual = difference_of_squares.squareOfSum(5);
try testing.expectEqual(expected, actual);
}
test "square of sum up to 100" {
const expected: usize = 25_502_500;
const actual = difference_of_squares.squareOfSum(100);
try testing.expectEqual(expected, actual);
}
test "sum of squares up to 1" {
const expected: usize = 1;
const actual = difference_of_squares.sumOfSquares(1);
try testing.expectEqual(expected, actual);
}
test "sum of squares up to 5" {
const expected: usize = 55;
const actual = difference_of_squares.sumOfSquares(5);
try testing.expectEqual(expected, actual);
}
test "sum of squares up to 100" {
const expected: usize = 338_350;
const actual = difference_of_squares.sumOfSquares(100);
try testing.expectEqual(expected, actual);
}
test "difference of squares up to 1" {
const expected: usize = 0;
const actual = difference_of_squares.differenceOfSquares(1);
try testing.expectEqual(expected, actual);
}
test "difference of squares up to 5" {
const expected: usize = 170;
const actual = difference_of_squares.differenceOfSquares(5);
try testing.expectEqual(expected, actual);
}
test "difference of squares up to 100" {
const expected: usize = 25_164_150;
const actual = difference_of_squares.differenceOfSquares(100);
try testing.expectEqual(expected, actual);
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/difference-of-squares/difference_of_squares.zig | pub fn squareOfSum(number: usize) usize {
const sum: usize = number * (number + 1) / 2;
return sum * sum;
}
pub fn sumOfSquares(number: usize) usize {
return (number * (number + 1) * (2 * number + 1)) / 6;
}
pub fn differenceOfSquares(number: usize) usize {
return squareOfSum(number) - sumOfSquares(number);
}
|
0 | repos/exercism-ziglang/difference-of-squares | repos/exercism-ziglang/difference-of-squares/.exercism/metadata.json | {"track":"zig","exercise":"difference-of-squares","id":"1ebbda10125c4dda9a686cc48e772e98","url":"https://exercism.org/tracks/zig/exercises/difference-of-squares","handle":"exilesprx","is_requester":true,"auto_approve":false} |
0 | repos/exercism-ziglang/difference-of-squares | repos/exercism-ziglang/difference-of-squares/.exercism/config.json | {
"authors": [
"massivelivefun"
],
"files": {
"solution": [
"difference_of_squares.zig"
],
"test": [
"test_difference_of_squares.zig"
],
"example": [
".meta/example.zig"
]
},
"blurb": "Find the difference between the square of the sum and the sum of the squares of the first N natural numbers.",
"source": "Problem 6 at Project Euler",
"source_url": "https://projecteuler.net/problem=6"
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/resistor-color-duo/resistor_color_duo.zig | pub const ColorBand = enum { black, brown, red, orange, yellow, green, blue, violet, grey, white };
pub fn colorCode(colors: [2]ColorBand) usize {
return @as(usize, @intFromEnum(colors[0])) * 10 + @as(usize, @intFromEnum(colors[1]));
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/resistor-color-duo/test_resistor_color_duo.zig | const std = @import("std");
const testing = std.testing;
const resistor_color_duo = @import("resistor_color_duo.zig");
const ColorBand = resistor_color_duo.ColorBand;
test "brown and black" {
const array = [_]ColorBand{ .brown, .black };
const expected: usize = 10;
const actual = resistor_color_duo.colorCode(array);
try testing.expectEqual(expected, actual);
}
test "blue and grey" {
const array = [_]ColorBand{ .blue, .grey };
const expected: usize = 68;
const actual = resistor_color_duo.colorCode(array);
try testing.expectEqual(expected, actual);
}
test "yellow and violet" {
const array = [_]ColorBand{ .yellow, .violet };
const expected: usize = 47;
const actual = resistor_color_duo.colorCode(array);
try testing.expectEqual(expected, actual);
}
test "white and red" {
const array = [_]ColorBand{ .white, .red };
const expected: usize = 92;
const actual = resistor_color_duo.colorCode(array);
try testing.expectEqual(expected, actual);
}
test "orange and orange" {
const array = [_]ColorBand{ .orange, .orange };
const expected: usize = 33;
const actual = resistor_color_duo.colorCode(array);
try testing.expectEqual(expected, actual);
}
test "black and brown, one-digit" {
const array = [_]ColorBand{ .black, .brown };
const expected: usize = 1;
const actual = resistor_color_duo.colorCode(array);
try testing.expectEqual(expected, actual);
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/resistor-color-duo/README.md | # Resistor Color Duo
Welcome to Resistor Color Duo on Exercism's Zig Track.
If you need help running the tests or submitting your code, check out `HELP.md`.
## Instructions
If you want to build something using a Raspberry Pi, you'll probably use _resistors_.
For this exercise, you need to know two things about them:
- Each resistor has a resistance value.
- Resistors are small - so small in fact that if you printed the resistance value on them, it would be hard to read.
To get around this problem, manufacturers print color-coded bands onto the resistors to denote their resistance values.
Each band has a position and a numeric value.
The first 2 bands of a resistor have a simple encoding scheme: each color maps to a single number.
For example, if they printed a brown band (value 1) followed by a green band (value 5), it would translate to the number 15.
In this exercise you are going to create a helpful program so that you don't have to remember the values of the bands.
The program will take color names as input and output a two digit number, even if the input is more than two colors!
The band colors are encoded as follows:
- Black: 0
- Brown: 1
- Red: 2
- Orange: 3
- Yellow: 4
- Green: 5
- Blue: 6
- Violet: 7
- Grey: 8
- White: 9
From the example above:
brown-green should return 15
brown-green-violet should return 15 too, ignoring the third color.
## Source
### Created by
- @massivelivefun
### Based on
Maud de Vries, Erik Schierboom - https://github.com/exercism/problem-specifications/issues/1464 |
0 | repos/exercism-ziglang | repos/exercism-ziglang/resistor-color-duo/HELP.md | # Help
## Running the tests
Write your code in `<exercise_name>.zig`.
To run the tests for an exercise, run:
```bash
zig test test_exercise_name.zig
```
in the exercise's root directory (replacing `exercise_name` with the name of the exercise).
## Submitting your solution
You can submit your solution using the `exercism submit resistor_color_duo.zig` command.
This command will upload your solution to the Exercism website and print the solution page's URL.
It's possible to submit an incomplete solution which allows you to:
- See how others have completed the exercise
- Request help from a mentor
## Need to get help?
If you'd like help solving the exercise, check the following pages:
- The [Zig track's documentation](https://exercism.org/docs/tracks/zig)
- The [Zig track's programming category on the forum](https://forum.exercism.org/c/programming/zig)
- [Exercism's programming category on the forum](https://forum.exercism.org/c/programming/5)
- The [Frequently Asked Questions](https://exercism.org/docs/using/faqs)
Should those resources not suffice, you could submit your (incomplete) solution to request mentoring.
- [The Zig Programming Language Documentation][documentation] is a great overview of all of the language features that Zig provides to those who use it.
- [Zig Learn][zig-learn] is an excellent primer that explains the language features that Zig has to offer.
- [Ziglings][ziglings] is highly recommended.
Learn Zig by fixing tiny broken programs.
- [The Zig Programming Language Discord][discord-zig] is the main [Discord][discord].
It provides a great way to get in touch with the Zig community at large, and get some quick, direct help for any Zig related problem.
- [#zig][irc] on irc.freenode.net is the main Zig IRC channel.
- [/r/Zig][reddit] is the main Zig subreddit.
- [Stack Overflow][stack-overflow] can be used to discover code snippets and solutions to problems that may have already asked and maybe solved by others.
[discord]: https://discordapp.com
[discord-zig]: https://discord.com/invite/gxsFFjE
[documentation]: https://ziglang.org/documentation/master
[irc]: https://webchat.freenode.net/?channels=%23zig
[reddit]: https://www.reddit.com/r/Zig
[stack-overflow]: https://stackoverflow.com/questions/tagged/zig
[zig-learn]: https://ziglearn.org/
[ziglings]: https://codeberg.org/ziglings/exercises |
0 | repos/exercism-ziglang/resistor-color-duo | repos/exercism-ziglang/resistor-color-duo/.exercism/metadata.json | {"track":"zig","exercise":"resistor-color-duo","id":"0d386e2dee2942288c73e88065ba4381","url":"https://exercism.org/tracks/zig/exercises/resistor-color-duo","handle":"exilesprx","is_requester":true,"auto_approve":false} |
0 | repos/exercism-ziglang/resistor-color-duo | repos/exercism-ziglang/resistor-color-duo/.exercism/config.json | {
"authors": [
"massivelivefun"
],
"files": {
"solution": [
"resistor_color_duo.zig"
],
"test": [
"test_resistor_color_duo.zig"
],
"example": [
".meta/example.zig"
]
},
"blurb": "Convert color codes, as used on resistors, to a numeric value.",
"source": "Maud de Vries, Erik Schierboom",
"source_url": "https://github.com/exercism/problem-specifications/issues/1464"
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/pangram/pangram.zig | const std = @import("std");
const print = std.debug.print;
pub fn isPangram(str: []const u8) bool {
var alphabet: [26]u8 = undefined;
for (str) |c| {
if (std.ascii.isAlphabetic(c)) {
// fill the alphabet array with 1s if the letter is found
// and the index is the letter's position in the alphabet
alphabet[std.ascii.toLower(c) - 'a'] = 1; // c - a = 99 - 97 = 2
}
}
return foundAll(&alphabet);
}
fn foundAll(s: *[26]u8) bool {
for (s) |x| {
if (x != 1) {
return false;
}
}
return true;
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/pangram/README.md | # Pangram
Welcome to Pangram on Exercism's Zig Track.
If you need help running the tests or submitting your code, check out `HELP.md`.
## Introduction
You work for a company that sells fonts through their website.
They'd like to show a different sentence each time someone views a font on their website.
To give a comprehensive sense of the font, the random sentences should use **all** the letters in the English alphabet.
They're running a competition to get suggestions for sentences that they can use.
You're in charge of checking the submissions to see if they are valid.
~~~~exercism/note
Pangram comes from Greek, παν γράμμα, pan gramma, which means "every letter".
The best known English pangram is:
> The quick brown fox jumps over the lazy dog.
~~~~
## Instructions
Your task is to figure out if a sentence is a pangram.
A pangram is a sentence using every letter of the alphabet at least once.
It is case insensitive, so it doesn't matter if a letter is lower-case (e.g. `k`) or upper-case (e.g. `K`).
For this exercise, a sentence is a pangram if it contains each of the 26 letters in the English alphabet.
## Source
### Created by
- @massivelivefun
### Based on
Wikipedia - https://en.wikipedia.org/wiki/Pangram |
0 | repos/exercism-ziglang | repos/exercism-ziglang/pangram/HELP.md | # Help
## Running the tests
Write your code in `<exercise_name>.zig`.
To run the tests for an exercise, run:
```bash
zig test test_exercise_name.zig
```
in the exercise's root directory (replacing `exercise_name` with the name of the exercise).
## Submitting your solution
You can submit your solution using the `exercism submit pangram.zig` command.
This command will upload your solution to the Exercism website and print the solution page's URL.
It's possible to submit an incomplete solution which allows you to:
- See how others have completed the exercise
- Request help from a mentor
## Need to get help?
If you'd like help solving the exercise, check the following pages:
- The [Zig track's documentation](https://exercism.org/docs/tracks/zig)
- The [Zig track's programming category on the forum](https://forum.exercism.org/c/programming/zig)
- [Exercism's programming category on the forum](https://forum.exercism.org/c/programming/5)
- The [Frequently Asked Questions](https://exercism.org/docs/using/faqs)
Should those resources not suffice, you could submit your (incomplete) solution to request mentoring.
- [The Zig Programming Language Documentation][documentation] is a great overview of all of the language features that Zig provides to those who use it.
- [Zig Learn][zig-learn] is an excellent primer that explains the language features that Zig has to offer.
- [Ziglings][ziglings] is highly recommended.
Learn Zig by fixing tiny broken programs.
- [The Zig Programming Language Discord][discord-zig] is the main [Discord][discord].
It provides a great way to get in touch with the Zig community at large, and get some quick, direct help for any Zig related problem.
- [#zig][irc] on irc.freenode.net is the main Zig IRC channel.
- [/r/Zig][reddit] is the main Zig subreddit.
- [Stack Overflow][stack-overflow] can be used to discover code snippets and solutions to problems that may have already asked and maybe solved by others.
[discord]: https://discordapp.com
[discord-zig]: https://discord.com/invite/gxsFFjE
[documentation]: https://ziglang.org/documentation/master
[irc]: https://webchat.freenode.net/?channels=%23zig
[reddit]: https://www.reddit.com/r/Zig
[stack-overflow]: https://stackoverflow.com/questions/tagged/zig
[zig-learn]: https://ziglearn.org/
[ziglings]: https://github.com/ratfactor/ziglings |
0 | repos/exercism-ziglang | repos/exercism-ziglang/pangram/test_pangram.zig | const std = @import("std");
const testing = std.testing;
const pangram = @import("pangram.zig");
test "empty sentence" {
try testing.expect(!pangram.isPangram(""));
}
test "perfect lower case" {
try testing.expect(pangram.isPangram("abcdefghijklmnopqrstuvwxyz"));
}
test "only lower case" {
try testing.expect(pangram.isPangram("the quick brown fox jumps over the lazy dog"));
}
test "missing the letter 'x'" {
try testing.expect(!pangram.isPangram("a quick movement of the enemy will jeopardize five gunboats"));
}
test "missing the letter 'h'" {
try testing.expect(!pangram.isPangram("five boxing wizards jump quickly at it"));
}
test "with underscores" {
try testing.expect(pangram.isPangram("the_quick_brown_fox_jumps_over_the_lazy_dog"));
}
test "with numbers" {
try testing.expect(pangram.isPangram("the 1 quick brown fox jumps over the 2 lazy dogs"));
}
test "missing letters replaced by numbers" {
try testing.expect(!pangram.isPangram("7h3 qu1ck brown fox jumps ov3r 7h3 lazy dog"));
}
test "mixed case and punctuation" {
try testing.expect(pangram.isPangram("\"Five quacking Zephyrs jolt my wax bed.\""));
}
test "a-m and A-M are 26 different characters but not a pangram" {
try testing.expect(!pangram.isPangram("abcdefghijklm ABCDEFGHIJKLM"));
}
test "non-alphanumeric printable ASCII" {
try testing.expect(!pangram.isPangram(" !\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"));
}
|
0 | repos/exercism-ziglang/pangram | repos/exercism-ziglang/pangram/.exercism/metadata.json | {"track":"zig","exercise":"pangram","id":"1bdd8ec73596487cb17d15f4a35c45ef","url":"https://exercism.org/tracks/zig/exercises/pangram","handle":"exilesprx","is_requester":true,"auto_approve":false} |
0 | repos/exercism-ziglang/pangram | repos/exercism-ziglang/pangram/.exercism/config.json | {
"authors": [
"massivelivefun"
],
"files": {
"solution": [
"pangram.zig"
],
"test": [
"test_pangram.zig"
],
"example": [
".meta/example.zig"
]
},
"blurb": "Determine if a sentence is a pangram.",
"source": "Wikipedia",
"source_url": "https://en.wikipedia.org/wiki/Pangram"
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/luhn/luhn.zig | const std = @import("std");
pub fn isValid(s: []const u8) bool {
var sum: usize = 0;
var digitCount: usize = 0;
var i: usize = s.len;
while (i > 0) : (i -= 1) {
switch (s[i - 1]) {
'0'...'9' => {
digitCount += 1;
const digit: u8 = std.fmt.charToDigit(s[i - 1], 10) catch unreachable;
if (digitCount % 2 != 0) {
sum += digit;
continue;
}
const val: usize = digit * 2;
if (val > 9) {
sum += val - 9;
continue;
}
sum += val;
},
' ' => continue,
else => return false,
}
}
return digitCount > 1 and sum % 10 == 0;
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/luhn/README.md | # Luhn
Welcome to Luhn on Exercism's Zig Track.
If you need help running the tests or submitting your code, check out `HELP.md`.
## Instructions
Given a number determine whether or not it is valid per the Luhn formula.
The [Luhn algorithm][luhn] is a simple checksum formula used to validate a variety of identification numbers, such as credit card numbers and Canadian Social Insurance Numbers.
The task is to check if a given string is valid.
## Validating a Number
Strings of length 1 or less are not valid.
Spaces are allowed in the input, but they should be stripped before checking.
All other non-digit characters are disallowed.
### Example 1: valid credit card number
```text
4539 3195 0343 6467
```
The first step of the Luhn algorithm is to double every second digit, starting from the right.
We will be doubling
```text
4_3_ 3_9_ 0_4_ 6_6_
```
If doubling the number results in a number greater than 9 then subtract 9 from the product.
The results of our doubling:
```text
8569 6195 0383 3437
```
Then sum all of the digits:
```text
8+5+6+9+6+1+9+5+0+3+8+3+3+4+3+7 = 80
```
If the sum is evenly divisible by 10, then the number is valid.
This number is valid!
### Example 2: invalid credit card number
```text
8273 1232 7352 0569
```
Double the second digits, starting from the right
```text
7253 2262 5312 0539
```
Sum the digits
```text
7+2+5+3+2+2+6+2+5+3+1+2+0+5+3+9 = 57
```
57 is not evenly divisible by 10, so this number is not valid.
[luhn]: https://en.wikipedia.org/wiki/Luhn_algorithm
## Source
### Created by
- @ee7
### Based on
The Luhn Algorithm on Wikipedia - https://en.wikipedia.org/wiki/Luhn_algorithm |
0 | repos/exercism-ziglang | repos/exercism-ziglang/luhn/test_luhn.zig | const std = @import("std");
const testing = std.testing;
const isValid = @import("luhn.zig").isValid;
test "single digit strings cannot be valid" {
try testing.expect(!isValid("1"));
}
test "a single zero is invalid" {
try testing.expect(!isValid("0"));
}
test "a simple valid SIN that remains valid if reversed" {
try testing.expect(isValid("059"));
}
test "a simple valid SIN that becomes invalid if reversed" {
try testing.expect(isValid("59"));
}
test "a valid Canadian SIN" {
try testing.expect(isValid("055 444 285"));
}
test "invalid Canadian SIN" {
try testing.expect(!isValid("055 444 286"));
}
test "invalid credit card" {
try testing.expect(!isValid("8273 1232 7352 0569"));
}
test "invalid long number with an even remainder" {
try testing.expect(!isValid("1 2345 6789 1234 5678 9012"));
}
test "invalid long number with a remainder divisible by 5" {
try testing.expect(!isValid("1 2345 6789 1234 5678 9013"));
}
test "valid number with an even number of digits" {
try testing.expect(isValid("095 245 88"));
}
test "valid number with an odd number of spaces" {
try testing.expect(isValid("234 567 891 234"));
}
test "valid strings with a non-digit added at the end become invalid" {
try testing.expect(!isValid("059a"));
}
test "valid strings with punctuation included become invalid" {
try testing.expect(!isValid("055-444-285"));
}
test "valid strings with symbols included become invalid" {
try testing.expect(!isValid("055# 444$ 285"));
}
test "single zero with space is invalid" {
try testing.expect(!isValid(" 0"));
}
test "more than a single zero is valid" {
try testing.expect(isValid("0000 0"));
}
test "input digit 9 is correctly converted to output digit 9" {
try testing.expect(isValid("091"));
}
test "very long input is valid" {
try testing.expect(isValid("9999999999 9999999999 9999999999 9999999999"));
}
test "valid luhn with an odd number of digits and non zero first digit" {
try testing.expect(isValid("109"));
}
test "using ascii value for non-doubled non-digit isn't allowed" {
try testing.expect(!isValid("055b 444 285"));
}
test "using ascii value for doubled non-digit isn't allowed" {
try testing.expect(!isValid(":9"));
}
test "non-numeric, non-space char in the middle with a sum that's divisible by 10 isn't allowed" {
try testing.expect(!isValid("59%59"));
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/luhn/HELP.md | # Help
## Running the tests
Write your code in `<exercise_name>.zig`.
To run the tests for an exercise, run:
```bash
zig test test_exercise_name.zig
```
in the exercise's root directory (replacing `exercise_name` with the name of the exercise).
## Submitting your solution
You can submit your solution using the `exercism submit luhn.zig` command.
This command will upload your solution to the Exercism website and print the solution page's URL.
It's possible to submit an incomplete solution which allows you to:
- See how others have completed the exercise
- Request help from a mentor
## Need to get help?
If you'd like help solving the exercise, check the following pages:
- The [Zig track's documentation](https://exercism.org/docs/tracks/zig)
- The [Zig track's programming category on the forum](https://forum.exercism.org/c/programming/zig)
- [Exercism's programming category on the forum](https://forum.exercism.org/c/programming/5)
- The [Frequently Asked Questions](https://exercism.org/docs/using/faqs)
Should those resources not suffice, you could submit your (incomplete) solution to request mentoring.
- [The Zig Programming Language Documentation][documentation] is a great overview of all of the language features that Zig provides to those who use it.
- [Zig Learn][zig-learn] is an excellent primer that explains the language features that Zig has to offer.
- [Ziglings][ziglings] is highly recommended.
Learn Zig by fixing tiny broken programs.
- [The Zig Programming Language Discord][discord-zig] is the main [Discord][discord].
It provides a great way to get in touch with the Zig community at large, and get some quick, direct help for any Zig related problem.
- [#zig][irc] on irc.freenode.net is the main Zig IRC channel.
- [/r/Zig][reddit] is the main Zig subreddit.
- [Stack Overflow][stack-overflow] can be used to discover code snippets and solutions to problems that may have already asked and maybe solved by others.
[discord]: https://discordapp.com
[discord-zig]: https://discord.com/invite/gxsFFjE
[documentation]: https://ziglang.org/documentation/master
[irc]: https://webchat.freenode.net/?channels=%23zig
[reddit]: https://www.reddit.com/r/Zig
[stack-overflow]: https://stackoverflow.com/questions/tagged/zig
[zig-learn]: https://ziglearn.org/
[ziglings]: https://codeberg.org/ziglings/exercises |
0 | repos/exercism-ziglang/luhn | repos/exercism-ziglang/luhn/.exercism/metadata.json | {"track":"zig","exercise":"luhn","id":"8a93f9c4b0c84ee1a3b680239e79cafa","url":"https://exercism.org/tracks/zig/exercises/luhn","handle":"exilesprx","is_requester":true,"auto_approve":false} |
0 | repos/exercism-ziglang/luhn | repos/exercism-ziglang/luhn/.exercism/config.json | {
"authors": [
"ee7"
],
"files": {
"solution": [
"luhn.zig"
],
"test": [
"test_luhn.zig"
],
"example": [
".meta/example.zig"
]
},
"blurb": "Given a number determine whether or not it is valid per the Luhn formula.",
"source": "The Luhn Algorithm on Wikipedia",
"source_url": "https://en.wikipedia.org/wiki/Luhn_algorithm"
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/armstrong-numbers/test_armstrong_numbers.zig | const std = @import("std");
const testing = std.testing;
const isArmstrongNumber = @import("armstrong_numbers.zig").isArmstrongNumber;
test "zero is an armstrong number" {
try testing.expect(isArmstrongNumber(0));
}
test "single-digit numbers are armstrong numbers" {
try testing.expect(isArmstrongNumber(5));
}
test "there are no two-digit armstrong numbers" {
try testing.expect(!isArmstrongNumber(10));
}
test "three-digit number that is an armstrong number" {
try testing.expect(isArmstrongNumber(153));
}
test "three-digit number that is not an armstrong number" {
try testing.expect(!isArmstrongNumber(100));
}
test "four-digit number that is an armstrong number" {
try testing.expect(isArmstrongNumber(9_474));
}
test "four-digit number that is not an armstrong number" {
try testing.expect(!isArmstrongNumber(9_475));
}
test "seven-digit number that is an armstrong number" {
try testing.expect(isArmstrongNumber(9_926_315));
}
test "seven-digit number that is not an armstrong number" {
try testing.expect(!isArmstrongNumber(9_926_314));
}
test "33-digit number that is an armstrong number" {
try testing.expect(isArmstrongNumber(186_709_961_001_538_790_100_634_132_976_990));
}
test "38-digit number that is not an armstrong number" {
try testing.expect(!isArmstrongNumber(99_999_999_999_999_999_999_999_999_999_999_999_999));
}
test "the largest and last armstrong number" {
try testing.expect(isArmstrongNumber(115_132_219_018_763_992_565_095_597_973_971_522_401));
}
test "the largest 128-bit unsigned integer value is not an armstrong number" {
try testing.expect(!isArmstrongNumber(340_282_366_920_938_463_463_374_607_431_768_211_455));
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/armstrong-numbers/armstrong_numbers.zig | const std = @import("std");
const print = std.debug.print;
pub fn isArmstrongNumber(num: u128) bool {
const allocator = std.heap.page_allocator;
const str = std.fmt.allocPrint(allocator, "{d}", .{num}) catch "Failed to format";
defer allocator.free(str);
var sum: u128 = 0;
for (str) |c| {
const digit: u8 = std.fmt.charToDigit(c, 10) catch 0;
sum += std.math.pow(u128, digit, @as(u128, str.len));
}
return num == sum;
}
|
0 | repos/exercism-ziglang | repos/exercism-ziglang/armstrong-numbers/README.md | # Armstrong Numbers
Welcome to Armstrong Numbers on Exercism's Zig Track.
If you need help running the tests or submitting your code, check out `HELP.md`.
## Instructions
An [Armstrong number][armstrong-number] is a number that is the sum of its own digits each raised to the power of the number of digits.
For example:
- 9 is an Armstrong number, because `9 = 9^1 = 9`
- 10 is _not_ an Armstrong number, because `10 != 1^2 + 0^2 = 1`
- 153 is an Armstrong number, because: `153 = 1^3 + 5^3 + 3^3 = 1 + 125 + 27 = 153`
- 154 is _not_ an Armstrong number, because: `154 != 1^3 + 5^3 + 4^3 = 1 + 125 + 64 = 190`
Write some code to determine whether a number is an Armstrong number.
[armstrong-number]: https://en.wikipedia.org/wiki/Narcissistic_number
## Source
### Created by
- @ee7
### Based on
Wikipedia - https://en.wikipedia.org/wiki/Narcissistic_number |
0 | repos/exercism-ziglang | repos/exercism-ziglang/armstrong-numbers/HELP.md | # Help
## Running the tests
Write your code in `<exercise_name>.zig`.
To run the tests for an exercise, run:
```bash
zig test test_exercise_name.zig
```
in the exercise's root directory (replacing `exercise_name` with the name of the exercise).
## Submitting your solution
You can submit your solution using the `exercism submit armstrong_numbers.zig` command.
This command will upload your solution to the Exercism website and print the solution page's URL.
It's possible to submit an incomplete solution which allows you to:
- See how others have completed the exercise
- Request help from a mentor
## Need to get help?
If you'd like help solving the exercise, check the following pages:
- The [Zig track's documentation](https://exercism.org/docs/tracks/zig)
- The [Zig track's programming category on the forum](https://forum.exercism.org/c/programming/zig)
- [Exercism's programming category on the forum](https://forum.exercism.org/c/programming/5)
- The [Frequently Asked Questions](https://exercism.org/docs/using/faqs)
Should those resources not suffice, you could submit your (incomplete) solution to request mentoring.
- [The Zig Programming Language Documentation][documentation] is a great overview of all of the language features that Zig provides to those who use it.
- [Zig Learn][zig-learn] is an excellent primer that explains the language features that Zig has to offer.
- [Ziglings][ziglings] is highly recommended.
Learn Zig by fixing tiny broken programs.
- [The Zig Programming Language Discord][discord-zig] is the main [Discord][discord].
It provides a great way to get in touch with the Zig community at large, and get some quick, direct help for any Zig related problem.
- [#zig][irc] on irc.freenode.net is the main Zig IRC channel.
- [/r/Zig][reddit] is the main Zig subreddit.
- [Stack Overflow][stack-overflow] can be used to discover code snippets and solutions to problems that may have already asked and maybe solved by others.
[discord]: https://discordapp.com
[discord-zig]: https://discord.com/invite/gxsFFjE
[documentation]: https://ziglang.org/documentation/master
[irc]: https://webchat.freenode.net/?channels=%23zig
[reddit]: https://www.reddit.com/r/Zig
[stack-overflow]: https://stackoverflow.com/questions/tagged/zig
[zig-learn]: https://ziglearn.org/
[ziglings]: https://github.com/ratfactor/ziglings |
0 | repos/exercism-ziglang/armstrong-numbers | repos/exercism-ziglang/armstrong-numbers/.exercism/metadata.json | {"track":"zig","exercise":"armstrong-numbers","id":"35a77f619b0b4cdda64038ab73e23ab2","url":"https://exercism.org/tracks/zig/exercises/armstrong-numbers","handle":"exilesprx","is_requester":true,"auto_approve":false} |
0 | repos/exercism-ziglang/armstrong-numbers | repos/exercism-ziglang/armstrong-numbers/.exercism/config.json | {
"authors": [
"ee7"
],
"files": {
"solution": [
"armstrong_numbers.zig"
],
"test": [
"test_armstrong_numbers.zig"
],
"example": [
".meta/example.zig"
]
},
"blurb": "Determine if a number is an Armstrong number.",
"source": "Wikipedia",
"source_url": "https://en.wikipedia.org/wiki/Narcissistic_number"
}
|
0 | repos | repos/dotenv/README.md | <h1 align="center"> dotenv 🌴 </h1>
[](https://github.com/dying-will-bullet/dotenv/actions/workflows/ci.yaml)
[](https://codecov.io/gh/dying-will-bullet/dotenv)

dotenv is a library that loads environment variables from a `.env` file into `std.os.environ`.
Storing configuration in the environment separate from code is based on The
[Twelve-Factor](http://12factor.net/config) App methodology.
This library is a Zig language port of [nodejs dotenv](https://github.com/motdotla/dotenv).
Test with Zig 0.12.0-dev.1664+8ca4a5240.
## Quick Start
Automatically find the `.env` file and load the variables into the process environment with just one line.
```zig
const std = @import("std");
const dotenv = @import("dotenv");
pub fn main() !void {
const allocator = std.heap.page_allocator;
try dotenv.load(allocator, .{});
}
```
By default, it will search for a file named `.env` in the working directory and its parent directories recursively.
Of course, you can specify a path if desired.
```zig
pub fn main() !void {
try dotenv.loadFrom(allocator, "/app/.env", .{});
}
```
**Since writing to `std.os.environ` requires a C `setenv` call, linking with C is necessary.**
If you only want to read and parse the contents of the `.env` file, you can try the following.
```zig
pub fn main() !void {
var envs = try dotenv.getDataFrom(allocator, ".env");
var it = envs.iterator();
while (it.next()) |*entry| {
std.debug.print(
"{s}={s}\n",
.{ entry.key_ptr.*, entry.value_ptr.*.? },
);
}
}
```
This does not require linking with a C library.
The caller owns the memory, so you need to free both the key and value in the hashmap.
## `.env` Syntax
```
NAME_1="VALUE_1"
NAME_2='VALUE_2'
NAME_3=VALUE_3
```
#### Multiline values
The value of a variable can span multiple lines(quotes are required).
```
PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----
ABCD...
-----END RSA PRIVATE KEY-----"
```
#### Comments
Comments start with a `#`.
```
# This is a comment
NAME="VALUE" # comment
```
#### Variable Expansion
You can reference a variable using `${}`, and the variable should be defined earlier.
```
HO="/home"
ME="/koyori"
HOME="${HO}${ME}" # equal to HOME=/home/koyori
```
## Installation
Add `dotenv` as dependency in `build.zig.zon`:
```
.{
.name = "my-project",
.version = "0.1.0",
.dependencies = .{
.dotenv = .{
.url = "https://github.com/dying-will-bullet/dotenv/archive/refs/tags/v0.1.1.tar.gz",
.hash = "1220f0f6736020856641d3644ef44f95ce21f3923d5dae7f9ac8658187574d36bcb8"
},
},
.paths = .{""}
}
```
Add `dotenv` as a module in `build.zig`:
```diff
diff --git a/build.zig b/build.zig
index 957f625..66dd12a 100644
--- a/build.zig
+++ b/build.zig
@@ -15,6 +15,9 @@ pub fn build(b: *std.Build) void {
// set a preferred release mode, allowing the user to decide how to optimize.
const optimize = b.standardOptimizeOption(.{});
+ const opts = .{ .target = target, .optimize = optimize };
+ const dotenv_module = b.dependency("dotenv", opts).module("dotenv");
+
const exe = b.addExecutable(.{
.name = "tmp",
// In this case the main source file is merely a path, however, in more
@@ -23,6 +26,8 @@ pub fn build(b: *std.Build) void {
.target = target,
.optimize = optimize,
});
+ exe.addModule("dotenv", dotenv_module);
+ // If you want to modify environment variables.
+ exe.linkSystemLibrary("c");
// This declares intent for the executable to be installed into the
// standard location when the user invokes the "install" step (the default
```
## LICENSE
MIT License Copyright (c) 2023, Hanaasagi
|
0 | repos | repos/dotenv/build.zig | const std = @import("std");
// Although this function looks imperative, note that its job is to
// declaratively construct a build graph that will be executed by an external
// runner.
pub fn build(b: *std.Build) void {
// Standard target options allows the person running `zig build` to choose
// what target to build for. Here we do not override the defaults, which
// means any target is allowed, and the default is native. Other options
// for restricting supported target set are available.
const target = b.standardTargetOptions(.{});
// Standard optimization options allow the person running `zig build` to select
// between Debug, ReleaseSafe, ReleaseFast, and ReleaseSmall. Here we do not
// set a preferred release mode, allowing the user to decide how to optimize.
const optimize = b.standardOptimizeOption(.{});
_ = b.addModule("dotenv", .{
.root_source_file = .{ .path = "src/lib.zig" },
});
const lib = b.addStaticLibrary(.{
.name = "dotenv",
// In this case the main source file is merely a path, however, in more
// complicated build scripts, this could be a generated file.
.root_source_file = .{ .path = "src/lib.zig" },
.target = target,
.optimize = optimize,
});
lib.linkSystemLibrary("c");
// This declares intent for the library to be installed into the standard
// location when the user invokes the "install" step (the default step when
// running `zig build`).
b.installArtifact(lib);
// Creates a step for unit testing. This only builds the test executable
// but does not run it.
const main_tests = b.addTest(.{
.root_source_file = .{ .path = "src/lib.zig" },
.target = target,
.optimize = optimize,
});
main_tests.linkSystemLibrary("c");
const run_main_tests = b.addRunArtifact(main_tests);
const test_step = b.step("test", "Run library tests");
test_step.dependOn(&run_main_tests.step);
}
|
0 | repos/dotenv | repos/dotenv/src/utils.zig | const std = @import("std");
const testing = std.testing;
/// libc setenv
pub extern "c" fn setenv(name: [*:0]const u8, value: [*:0]const u8, overwrite: c_int) c_int;
// https://github.com/ziglang/zig/wiki/Zig-Newcomer-Programming-FAQs#converting-from-t-to-0t
pub fn toCString(str: []const u8) ![std.fs.MAX_PATH_BYTES - 1:0]u8 {
if (std.debug.runtime_safety) {
std.debug.assert(std.mem.indexOfScalar(u8, str, 0) == null);
}
var path_with_null: [std.fs.MAX_PATH_BYTES - 1:0]u8 = undefined;
if (str.len >= std.fs.MAX_PATH_BYTES) {
return error.NameTooLong;
}
@memcpy(path_with_null[0..str.len], str);
path_with_null[str.len] = 0;
return path_with_null;
}
/// Default File name
const default_file_name = ".env";
/// Use to find an env file starting from the current directory and going upwards.
pub const FileFinder = struct {
filename: []const u8,
const Self = @This();
pub fn init(filename: []const u8) Self {
return Self{
.filename = filename,
};
}
/// Default filename is `.env`
pub fn default() Self {
return Self.init(default_file_name);
}
/// Find the file and return absolute path.
/// The return value should be freed by caller.
pub fn find(self: Self, allocator: std.mem.Allocator) ![]const u8 {
// TODO: allocator?
var buf: [std.fs.MAX_PATH_BYTES]u8 = undefined;
const cwd = try std.process.getCwd(&buf);
const path = try Self.recursiveFind(allocator, cwd, self.filename);
return path;
}
/// Find a file and automatically look in the parent directory if it is not found.
fn recursiveFind(allocator: std.mem.Allocator, dirname: []const u8, filename: []const u8) ![]const u8 {
const path = try std.fs.path.join(allocator, &.{ dirname, filename });
errdefer allocator.free(path);
const f = std.fs.openFileAbsolute(path, .{}) catch |e| {
// Find the file, but could not open it.
if (e != std.fs.File.OpenError.FileNotFound) {
return e;
} else {
// Not Found, try the parent dir
if (std.fs.path.dirname(dirname)) |parent| {
return Self.recursiveFind(allocator, parent, filename);
} else {
return std.fs.File.OpenError.FileNotFound;
}
}
};
defer f.close();
// Check the path is a file.
const metadata = try f.metadata();
if (metadata.kind() == .file) {
return path;
}
if (std.fs.path.dirname(dirname)) |parent| {
return Self.recursiveFind(allocator, parent, filename);
} else {
return std.fs.File.OpenError.FileNotFound;
}
}
};
test "test found" {
const allocator = testing.allocator;
var finder = FileFinder.init("./testdata/.env");
const path = try finder.find(allocator);
allocator.free(path);
}
test "test not found" {
const allocator = testing.allocator;
var finder = FileFinder.init("balabalabala");
const res = finder.find(allocator);
try testing.expect(res == std.fs.File.OpenError.FileNotFound);
}
|
0 | repos/dotenv | repos/dotenv/src/loader.zig | const std = @import("std");
const parser = @import("./parser.zig");
const setenv = @import("./utils.zig").setenv;
const toCString = @import("./utils.zig").toCString;
const Error = @import("./error.zig").Error;
const testing = std.testing;
pub const Options = struct {
/// override existed env value, default `false`
override: bool = false,
/// read and collect environment variables, but do not write them to the environment.
dry_run: bool = false,
};
const ParseState = enum {
complete,
escape,
strong_open,
strong_open_escape,
weak_open,
weak_open_escape,
comment,
whitespace,
};
pub fn Loader(comptime options: Options) type {
return struct {
allocator: std.mem.Allocator,
parser: parser.LineParser,
const Self = @This();
// --------------------------------------------------------------------------------
// Public API
// --------------------------------------------------------------------------------
pub fn init(allocator: std.mem.Allocator) Self {
return Self{
.allocator = allocator,
.parser = parser.LineParser.init(allocator),
};
}
pub fn deinit(self: *Self) void {
self.parser.deinit();
}
pub fn envs(self: *Self) *std.StringHashMap(?[]const u8) {
return &self.parser.ctx;
}
pub fn loadFromFile(self: *Self, path: []const u8) !void {
var f = try std.fs.cwd().openFile(path, .{});
defer f.close();
var br = std.io.bufferedReader(f.reader());
const reader = br.reader();
return try self.loadFromStream(reader);
}
pub fn loadFromStream(self: *Self, reader: anytype) !void {
while (true) {
// read a logical line.
const line = try self.readLine(reader);
if (line == null) {
return;
}
const result = try self.parser.parseLine(line.?);
if (result == null) {
continue;
}
if (options.dry_run) {
self.allocator.free(line.?);
continue;
}
const key = try toCString(result.?.key);
const value = try toCString(result.?.value);
// https://man7.org/linux/man-pages/man3/setenv.3.html
var err_code: c_int = undefined;
if (options.override) {
err_code = setenv(&key, &value, 1);
} else {
err_code = setenv(&key, &value, 0);
}
self.allocator.free(line.?);
if (err_code != 0) {
switch (err_code) {
22 => return Error.InvalidValue,
12 => return error.OutOfMemory,
else => unreachable,
}
}
}
}
// --------------------------------------------------------------------------------
// Core API
// --------------------------------------------------------------------------------
/// Read a logical line.
/// Multiple lines enclosed in quotation marks are considered as a single line.
/// e.g.
/// ```
/// a = "Line1
/// Line2"
/// ```
/// It will be returned as a single line.
fn readLine(self: Self, reader: anytype) !?[]const u8 {
var cur_state: ParseState = ParseState.complete;
var buf_pos: usize = undefined;
var cur_pos: usize = undefined;
var buf = std.ArrayList(u8).init(self.allocator);
defer buf.deinit();
// TODO: line size
// someone may use JSON text as the value for the env var.
var line_buf: [1024]u8 = undefined;
while (reader.readUntilDelimiterOrEof(&line_buf, '\n')) |data| {
buf_pos = buf.items.len;
if (data == null) {
if (cur_state == .complete) {
return null;
} else {
return Error.ParseError;
}
} else {
if (data.?.len == 0) {
continue;
}
try buf.appendSlice(data.?);
// resotre newline
try buf.append('\n');
if (std.mem.startsWith(u8, std.mem.trimLeft(
u8,
buf.items,
// ASCII Whitespace
&[_]u8{ ' ', '\x09', '\x0a', '\x0b', '\x0c', '\x0d' },
), "#")) {
return "";
}
const result = nextState(cur_state, buf.items[buf_pos..]);
cur_pos = result.new_pos;
cur_state = result.new_state;
switch (cur_state) {
.complete => {
if (std.mem.endsWith(u8, buf.items, "\n")) {
_ = buf.pop();
if (std.mem.endsWith(u8, buf.items, "\r")) {
_ = buf.pop();
}
}
return try buf.toOwnedSlice();
},
.comment => {
// truncate
try buf.resize(buf_pos + cur_pos);
return try buf.toOwnedSlice();
},
else => {
// do nothing
},
}
}
} else |err| {
return err;
}
}
};
}
fn nextState(prev_state: ParseState, buf: []const u8) struct { new_pos: usize, new_state: ParseState } {
var cur_state = prev_state;
var cur_pos: usize = 0;
for (0.., buf) |pos, c| {
cur_pos = pos;
cur_state = switch (cur_state) {
.whitespace => switch (c) {
'#' => return .{ .new_pos = cur_pos, .new_state = .comment },
'\\' => .escape,
'"' => .weak_open,
'\'' => .strong_open,
else => .complete,
},
.escape => .complete,
.complete => switch (c) {
'\\' => .escape,
'"' => .weak_open,
'\'' => .strong_open,
else => blk: {
if (std.ascii.isWhitespace(c) and c != '\n' and c != '\r') {
break :blk .whitespace;
} else {
break :blk .complete;
}
},
},
.weak_open => switch (c) {
'\\' => .weak_open_escape,
'"' => .complete,
else => .weak_open,
},
.weak_open_escape => .weak_open,
.strong_open => switch (c) {
'\\' => .strong_open_escape,
'\'' => .complete,
else => .strong_open,
},
.strong_open_escape => .strong_open,
.comment => unreachable,
};
}
return .{
.new_pos = cur_pos,
.new_state = cur_state,
};
}
test "test load" {
const allocator = testing.allocator;
const input =
\\KEY0=0
\\KEY1="1"
\\KEY2='2'
\\KEY3='th ree'
\\KEY4="fo ur"
\\KEY5=f\ ive
\\KEY6=
\\KEY7= # foo
\\KEY8 ="whitespace before ="
\\KEY9= "whitespace after ="
;
var fbs = std.io.fixedBufferStream(input);
const reader = fbs.reader();
var loader = Loader(.{}).init(allocator);
defer loader.deinit();
try loader.loadFromStream(reader);
try testing.expectEqualStrings(loader.envs().get("KEY0").?.?, "0");
try testing.expectEqualStrings(loader.envs().get("KEY1").?.?, "1");
try testing.expectEqualStrings(loader.envs().get("KEY2").?.?, "2");
try testing.expectEqualStrings(loader.envs().get("KEY3").?.?, "th ree");
try testing.expectEqualStrings(loader.envs().get("KEY4").?.?, "fo ur");
try testing.expectEqualStrings(loader.envs().get("KEY5").?.?, "f ive");
try testing.expect(loader.envs().get("KEY6").? == null);
try testing.expect(loader.envs().get("KEY7").? == null);
try testing.expectEqualStrings(loader.envs().get("KEY8").?.?, "whitespace before =");
try testing.expectEqualStrings(loader.envs().get("KEY9").?.?, "whitespace after =");
const r = std.os.getenv("KEY0");
try testing.expectEqualStrings(r.?, "0");
}
test "test multiline" {
const allocator = testing.allocator;
const input =
\\C="F
\\S"
;
var fbs = std.io.fixedBufferStream(input);
const reader = fbs.reader();
var loader = Loader(.{}).init(allocator);
defer loader.deinit();
try loader.loadFromStream(reader);
try testing.expectEqualStrings(loader.envs().get("C").?.?, "F\nS");
}
test "test not override" {
const allocator = testing.allocator;
const input =
\\HOME=/home/nayuta
;
var fbs = std.io.fixedBufferStream(input);
const reader = fbs.reader();
var loader = Loader(.{ .override = false }).init(allocator);
defer loader.deinit();
try loader.loadFromStream(reader);
const r = std.os.getenv("HOME");
try testing.expect(!std.mem.eql(u8, r.?, "/home/nayuta"));
}
test "test override" {
const allocator = testing.allocator;
const input =
\\HOME=/home/nayuta
;
var fbs = std.io.fixedBufferStream(input);
const reader = fbs.reader();
var loader = Loader(.{ .override = true }).init(allocator);
defer loader.deinit();
try loader.loadFromStream(reader);
const r = std.os.getenv("HOME");
try testing.expect(std.mem.eql(u8, r.?, "/home/nayuta"));
}
test "test ownership" {
const allocator = testing.allocator;
const input =
\\HOME=/home/korone
;
var fbs = std.io.fixedBufferStream(input);
const reader = fbs.reader();
var loader = Loader(.{ .dry_run = true }).init(allocator);
try loader.loadFromStream(reader);
var envs = loader.envs().move();
loader.deinit();
try testing.expect(std.mem.eql(u8, envs.get("HOME").?.?, "/home/korone"));
var it = envs.iterator();
while (it.next()) |*entry| {
allocator.free(entry.key_ptr.*);
if (entry.value_ptr.* != null) {
allocator.free(entry.value_ptr.*.?);
}
}
envs.deinit();
}
|
0 | repos/dotenv | repos/dotenv/src/parser.zig | const std = @import("std");
const Error = @import("./error.zig").Error;
const testing = std.testing;
const SubstitutionMode = enum {
none,
block,
escaped_block,
};
/// Parsed Result
pub const ParsedResult = struct {
// Key
key: []const u8,
// Value
value: []const u8,
};
// /// Parse a line and returns the parsed result.
// pub fn parseLine(line: []const u8, ctx: *std.StringHashMap(?[]const u8)) !?ParsedResult {
// var parser = LineParser.init(line, ctx);
// return try parser.parseLine();
// }
/// Line Parser
pub const LineParser = struct {
/// Context
ctx: std.StringHashMap(?[]const u8),
/// Line data
line: []const u8,
/// position
pos: usize,
allocator: std.mem.Allocator,
const Self = @This();
pub fn init(allocator: std.mem.Allocator) Self {
return Self{
.ctx = std.StringHashMap(?[]const u8).init(allocator),
.line = "",
.pos = 0,
.allocator = allocator,
};
}
pub fn deinit(self: *Self) void {
var it = self.ctx.iterator();
while (it.next()) |*entry| {
self.allocator.free(entry.key_ptr.*);
if (entry.value_ptr.* != null) {
self.allocator.free(entry.value_ptr.*.?);
}
}
self.ctx.deinit();
}
/// Skip whitespace character
fn skipWhitespace(self: *Self) void {
var i: usize = 0;
while (i < self.line.len) {
if (!std.ascii.isWhitespace(self.line[i])) {
break;
}
i += 1;
}
self.pos += i;
self.line = self.line[i..];
}
/// Next character should be `=`
fn expectEqual(self: *Self) !void {
if (!std.mem.startsWith(u8, self.line, "=")) {
return Error.InvalidValue;
}
self.line = self.line[1..];
self.pos += 1;
}
/// Parse a key
fn parseKey(self: *Self) ![]const u8 {
std.debug.assert(self.line.len > 0);
const first_char = self.line[0];
if (!std.ascii.isAlphabetic(first_char) or first_char == '_') {
return Error.InvalidKey;
}
var i: usize = 0;
while (i < self.line.len) {
if (!(std.ascii.isAlphanumeric(self.line[i]) or self.line[i] == '_' or self.line[i] == '.')) {
break;
}
i += 1;
}
self.pos += i;
const key = self.line[0..i];
self.line = self.line[i..];
return self.allocator.dupe(u8, key);
}
/// Parse a value
fn parseValue(self: *Self) ![]const u8 {
var strong_quote = false; // '
var weak_quote = false; // "
var escaped = false;
var expecting_end = false;
var output_buf = std.ArrayList(u8).init(self.allocator);
defer output_buf.deinit();
var output = output_buf.writer();
var substitution_mode = SubstitutionMode.none;
var name_buf = std.ArrayList(u8).init(self.allocator);
defer name_buf.deinit();
var substitution_name = name_buf.writer();
for (0.., self.line) |i, c| {
_ = i;
if (expecting_end) {
if (c == ' ' or c == '\t') {
continue;
} else if (c == '#') {
break;
} else {
return Error.InvalidValue;
}
} else if (escaped) {
if (c == '\\' or c == '\'' or c == '"' or c == '$' or c == ' ') {
try output.writeByte(c);
} else if (c == 'n') {
try output.writeByte('\n');
} else {
return Error.InvalidValue;
}
escaped = false;
} else if (strong_quote) {
if (c == '\'') {
strong_quote = false;
} else {
try output.writeByte(c);
}
} else if (substitution_mode != .none) {
if (std.ascii.isAlphanumeric(c)) {
try substitution_name.writeByte(c);
} else {
switch (substitution_mode) {
.none => unreachable,
.block => {
if (c == '{' and name_buf.items.len == 0) {
substitution_mode = .escaped_block;
} else {
try substitute_variables(&self.ctx, name_buf.items, output);
name_buf.clearRetainingCapacity();
if (c == '$') {
if (!strong_quote and !escaped) {
substitution_mode = .block;
} else {
substitution_mode = .none;
}
} else {
substitution_mode = .none;
try output.writeByte(c);
}
}
},
.escaped_block => {
if (c == '}') {
substitution_mode = .none;
try substitute_variables(&self.ctx, name_buf.items, output);
name_buf.clearRetainingCapacity();
} else {
try substitution_name.writeByte(c);
}
},
}
}
} else if (c == '$') {
if (!strong_quote and !escaped) {
substitution_mode = .block;
} else {
substitution_mode = .none;
}
} else if (weak_quote) {
if (c == '"') {
weak_quote = false;
} else if (c == '\\') {
escaped = true;
} else {
try output.writeByte(c);
}
} else if (c == '\'') {
strong_quote = true;
} else if (c == '"') {
weak_quote = true;
} else if (c == '\\') {
escaped = true;
} else if (c == ' ' or c == '\t') {
expecting_end = true;
} else {
try output.writeByte(c);
}
}
if (substitution_mode == .escaped_block or strong_quote or weak_quote) {
return Error.InvalidValue;
} else {
try substitute_variables(&self.ctx, name_buf.items, output);
name_buf.clearRetainingCapacity();
return output_buf.toOwnedSlice();
}
}
pub fn parseLine(self: *Self, line: []const u8) !?ParsedResult {
// Reset line data and state
self.line = line;
self.pos = 0;
self.skipWhitespace();
if (self.line.len == 0 or std.mem.startsWith(u8, self.line, "#")) {
return null;
}
var key = try self.parseKey();
self.skipWhitespace();
// export can be either an optional prefix or a key itself
if (std.mem.eql(u8, key, "export")) {
// here we check for an optional `=`, below we throw directly when it’s not found.
self.expectEqual() catch {
self.allocator.free(key);
key = try self.parseKey();
self.skipWhitespace();
try self.expectEqual();
};
} else {
try self.expectEqual();
}
self.skipWhitespace();
if (self.line.len == 0 or std.mem.startsWith(u8, self.line, "#")) {
try self.ctx.put(key, null);
return ParsedResult{ .key = key, .value = "" };
}
const parsed_value = try self.parseValue();
try self.ctx.put(key, parsed_value);
return ParsedResult{ .key = key, .value = parsed_value };
}
};
/// handle `KEY=${KEY_XXX}`
/// First, search `KEY_XXX` from the environment variables,
/// and then from the context.
fn substitute_variables(
ctx: *std.StringHashMap(?[]const u8),
name: []const u8,
output: anytype,
) !void {
if (std.os.getenv(name)) |value| {
_ = try output.write(value);
} else {
const value = ctx.get(name) orelse "";
_ = try output.write(value.?);
}
}
test "test parse" {
const allocator = testing.allocator;
const input =
\\KEY0=0
\\KEY1="1"
\\KEY2='2'
\\KEY3='th ree'
\\KEY4="fo ur"
\\KEY5=f\ ive
\\KEY6=
\\KEY7= # foo
\\KEY8 ="whitespace before ="
\\KEY9= "whitespace after ="
\\KEY10=${KEY0}?${KEY1}
\\export KEY11=tmux-256color
;
const expect = [_]?[]const u8{
"0",
"1",
"2",
"th ree",
"fo ur",
"f ive",
null,
null,
"whitespace before =",
"whitespace after =",
"0?1",
"tmux-256color",
};
var parser = LineParser.init(allocator);
defer parser.deinit();
var it = std.mem.split(u8, input, "\n");
var i: usize = 0;
while (it.next()) |line| {
var buf = std.ArrayList(u8).init(allocator);
defer buf.deinit();
try buf.writer().print("KEY{d}", .{i});
const key = buf.items;
_ = try parser.parseLine(line);
try testing.expect(parser.ctx.get(key) != null);
if (expect[i] == null) {
const value = parser.ctx.get(key).?;
try testing.expect(value == null);
} else {
const value = parser.ctx.get(key).?.?;
try testing.expectEqualStrings(expect[i].?, value);
}
i += 1;
}
}
|
0 | repos/dotenv | repos/dotenv/src/lib.zig | const std = @import("std");
const testing = std.testing;
const FileFinder = @import("./utils.zig").FileFinder;
pub const Loader = @import("./loader.zig").Loader;
/// Control loading behavior
pub const Options = @import("./loader.zig").Options;
/// Loads the `.env*` file from the current directory or parents.
///
/// If variables with the same names already exist in the environment, then their values will be
/// preserved when `options.override = false` (default behavior)
///
/// If you wish to ensure all variables are loaded from your `.env` file, ignoring variables
/// already existing in the environment, then pass `options.override = true`
///
/// Where multiple declarations for the same environment variable exist in `.env`
/// file, the *first one* will be applied.
pub fn load(allocator: std.mem.Allocator, comptime options: Options) !void {
var finder = FileFinder.default();
const path = try finder.find(allocator);
defer allocator.free(path);
try loadFrom(allocator, path, options);
}
/// Loads the `.env` file from the given path.
pub fn loadFrom(allocator: std.mem.Allocator, path: []const u8, comptime options: Options) !void {
var loader = Loader(options).init(allocator);
defer loader.deinit();
try loader.loadFromFile(path);
}
pub fn getData(allocator: std.mem.Allocator) !std.StringHashMap(?[]const u8) {
var finder = FileFinder.default();
const path = try finder.find(allocator);
return getDataFrom(allocator, path);
}
pub fn getDataFrom(allocator: std.mem.Allocator, path: []const u8) !std.StringHashMap(?[]const u8) {
var loader = Loader(.{ .dry_run = true }).init(allocator);
defer loader.deinit();
try loader.loadFromFile(path);
return loader.envs().move();
}
test "test load real file" {
try testing.expect(std.os.getenv("VAR1") == null);
try testing.expect(std.os.getenv("VAR2") == null);
try testing.expect(std.os.getenv("VAR3") == null);
try testing.expect(std.os.getenv("VAR4") == null);
try testing.expect(std.os.getenv("VAR5") == null);
try testing.expect(std.os.getenv("VAR6") == null);
try testing.expect(std.os.getenv("VAR7") == null);
try testing.expect(std.os.getenv("VAR8") == null);
try testing.expect(std.os.getenv("VAR9") == null);
try testing.expect(std.os.getenv("VAR10") == null);
try testing.expect(std.os.getenv("VAR11") == null);
try testing.expect(std.os.getenv("MULTILINE1") == null);
try testing.expect(std.os.getenv("MULTILINE2") == null);
try loadFrom(testing.allocator, "./testdata/.env", .{});
try testing.expectEqualStrings(std.os.getenv("VAR1").?, "hello!");
try testing.expectEqualStrings(std.os.getenv("VAR2").?, "'quotes within quotes'");
try testing.expectEqualStrings(std.os.getenv("VAR3").?, "double quoted with # hash in value");
try testing.expectEqualStrings(std.os.getenv("VAR4").?, "single quoted with # hash in value");
try testing.expectEqualStrings(std.os.getenv("VAR5").?, "not_quoted_with_#_hash_in_value");
try testing.expectEqualStrings(std.os.getenv("VAR6").?, "not_quoted_with_comment_beheind");
try testing.expectEqualStrings(std.os.getenv("VAR7").?, "not quoted with escaped space");
try testing.expectEqualStrings(std.os.getenv("VAR8").?, "double quoted with comment beheind");
try testing.expectEqualStrings(std.os.getenv("VAR9").?, "Variable starts with a whitespace");
try testing.expectEqualStrings(std.os.getenv("VAR10").?, "Value starts with a whitespace after =");
try testing.expectEqualStrings(std.os.getenv("VAR11").?, "Variable ends with a whitespace before =");
try testing.expectEqualStrings(std.os.getenv("MULTILINE1").?, "First Line\nSecond Line");
try testing.expectEqualStrings(
std.os.getenv("MULTILINE2").?,
"# First Line Comment\nSecond Line\n#Third Line Comment\nFourth Line\n",
);
// try load(testing.allocator, .{});
}
test {
std.testing.refAllDecls(@This());
}
|
0 | repos/dotenv | repos/dotenv/src/error.zig | pub const Error = error{
ParseError,
InvalidKey,
InvalidValue,
};
|
0 | repos/dotenv | repos/dotenv/examples/build.zig | const std = @import("std");
const pkg_name = "dotenv";
const pkg_path = "../src/lib.zig";
const examples = .{
"basic",
"substitution",
"dry-run",
};
pub fn build(b: *std.build.Builder) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
inline for (examples) |e| {
const example_path = e ++ "/main.zig";
const exe_name = "example-" ++ e;
const run_name = "run-" ++ e;
const run_desc = "Run the " ++ e ++ " example";
const exe = b.addExecutable(.{
.name = exe_name,
.root_source_file = .{ .path = example_path },
.target = target,
.optimize = optimize,
});
const mod = b.addModule("dotenv", .{
.source_file = .{ .path = "../src/lib.zig" },
});
exe.addModule("dotenv", mod);
exe.linkSystemLibrary("c");
b.installArtifact(exe);
const run_cmd = b.addRunArtifact(exe);
run_cmd.step.dependOn(b.getInstallStep());
const run_step = b.step(run_name, run_desc);
run_step.dependOn(&run_cmd.step);
}
}
|
0 | repos/dotenv/examples | repos/dotenv/examples/basic/main.zig | const std = @import("std");
const dotenv = @import("dotenv");
pub fn main() !void {
const allocator = std.heap.page_allocator;
std.debug.print(
"Before => GITHUB_REPOSITORY={s}\n",
.{std.os.getenv("GITHUB_REPOSITORY") orelse ""},
);
try dotenv.load(allocator, .{});
std.debug.print(
"After => GITHUB_REPOSITORY={s}\n",
.{std.os.getenv("GITHUB_REPOSITORY") orelse ""},
);
}
|
0 | repos/dotenv/examples | repos/dotenv/examples/substitution/main.zig | const std = @import("std");
const dotenv = @import("dotenv");
pub fn main() !void {
const allocator = std.heap.page_allocator;
try dotenv.loadFrom(allocator, ".env2", .{});
std.debug.print(
"VAR3=\"{s}\"\n",
.{std.os.getenv("VAR3") orelse ""},
);
}
|
0 | repos/dotenv/examples | repos/dotenv/examples/dry-run/main.zig | const std = @import("std");
const dotenv = @import("dotenv");
pub fn main() !void {
const allocator = std.heap.page_allocator;
std.debug.print(
"Before => HOME={s}\n",
.{std.os.getenv("HOME") orelse ""},
);
var envs = try dotenv.getDataFrom(allocator, "./.env3");
std.debug.print(
"After => HOME={s}\n",
.{std.os.getenv("HOME") orelse ""},
);
std.debug.print("Process envs have not been modified!\n\n", .{});
std.debug.print("Now list envs from the file:\n", .{});
var it = envs.iterator();
while (it.next()) |*entry| {
std.debug.print(
"{s}={s}\n",
.{ entry.key_ptr.*, entry.value_ptr.*.? },
);
}
}
|
0 | repos | repos/honey/README.md | # honey
honey is a small, embeddable scripting language written in Zig. At its core, honey takes inspiration from languages like Zig, JavaScript/TypeScript, Rust, and Elixir. It's designed to be a simple and easy to use language with a high ceiling for power users. Performance is a key goal of honey, and it's designed to be as fast as possible. Benchmarks will be provided in the future.
## building
honey can be built using this simple command:
```
zig build -Doptimize=ReleaseFast
```
## examples
### accumulator
Like JavaScript, honey supports `let` and `const` bindings. It also supports the continue expression (`i += 1` in this case) from Zig.
```zig
const ITERATIONS = 100;
// while loop form
while(i < ITERATIONS): (i += 1) {
@println("Iterations: ", i);
}
// for loop (exclusive)
for (0..ITERATIONS) |i| {
let doubled = i * 2;
@println("Iterations Doubled: ", doubled);
}
// for loop (inclusive)
for (0...ITERATIONS) |i| {
let tripled = i * 3;
@println("Iterations Tripled: ", tripled);
}
``` |
0 | repos | repos/honey/build.zig.zon | .{
.name = "honey",
.version = "0.1.1",
.dependencies = .{
.clap = .{
.url = "https://github.com/Hejsil/zig-clap/archive/refs/tags/0.9.1.tar.gz",
.hash = "122062d301a203d003547b414237229b09a7980095061697349f8bef41be9c30266b",
},
},
.paths = .{""},
}
|
0 | repos | repos/honey/build.zig | const std = @import("std");
pub fn build(b: *std.Build) !void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
// create exports for the wasm target
if (target.result.isWasm()) {
const exe = b.addExecutable(.{
.name = "honey",
.root_source_file = b.path("src/wasm.zig"),
.target = target,
.optimize = .ReleaseSmall,
.version = .{ .major = 0, .minor = 1, .patch = 1 },
});
exe.rdynamic = true;
exe.entry = .disabled;
const install = b.addInstallArtifact(exe, .{});
install.step.dependOn(&exe.step);
b.default_step.dependOn(&install.step);
return;
}
const clap = b.dependency("clap", .{
.target = target,
.optimize = optimize,
});
const exe = b.addExecutable(.{
.name = "honey",
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
// exe.use_lld = false;
// exe.use_llvm = false;
exe.root_module.addImport("clap", clap.module("clap"));
b.installArtifact(exe);
const run_cmd = b.addRunArtifact(exe);
run_cmd.step.dependOn(b.getInstallStep());
if (b.args) |args| {
run_cmd.addArgs(args);
}
const run_step = b.step("run", "Run the app");
run_step.dependOn(&run_cmd.step);
// dedicated step for checking if the app compiles (ZLS)
const exe_check = b.addExecutable(.{
.name = "check",
.root_source_file = b.path("src/main.zig"),
.target = target,
.optimize = optimize,
});
exe_check.root_module.addImport("clap", clap.module("clap"));
const check = b.step("check", "Check if the executable compiles");
check.dependOn(&exe_check.step);
// Step for running unit tests
const unit_tests = b.addTest(.{
.root_source_file = b.path("src/tests.zig"),
.target = target,
.optimize = optimize,
});
unit_tests.root_module.addImport("clap", clap.module("clap"));
const run_unit_tests = b.addRunArtifact(unit_tests);
const test_step = b.step("test", "Run unit tests");
test_step.dependOn(&run_unit_tests.step);
// Step for generating markdown documentation
const generate_md = b.addExecutable(.{
.name = "generate-md",
.root_source_file = b.path("src/compiler/generate_md.zig"),
.target = target,
.optimize = optimize,
});
const run_generate_md = b.addRunArtifact(generate_md);
const generate_md_step = b.step("generate", "Generates markdown documentation for the compiler");
generate_md_step.dependOn(&run_generate_md.step);
const wasm_target = try std.Build.parseTargetQuery(.{ .arch_os_abi = "wasm32-freestanding" });
const playground_exe = b.addExecutable(.{
.name = "honey",
.root_source_file = b.path("src/wasm.zig"),
.target = b.resolveTargetQuery(wasm_target),
.optimize = .ReleaseSmall,
.version = .{ .major = 0, .minor = 1, .patch = 0 },
});
playground_exe.rdynamic = true;
playground_exe.entry = .disabled;
const playground_install = b.addInstallArtifact(playground_exe, .{
.dest_dir = .{ .override = .{ .custom = "../playground/src/assets" } },
});
playground_install.step.dependOn(&playground_exe.step);
const run_bun = b.addSystemCommand(&.{ "bun", "run", "--cwd", "./playground", "dev" });
const playground_step = b.step("playground", "Builds the WASM library and runs the playground");
run_bun.step.dependOn(&playground_install.step);
playground_step.dependOn(&run_bun.step);
}
|
0 | repos/honey | repos/honey/src/wasm.zig | const std = @import("std");
const honey = @import("honey.zig");
pub const Lexer = @import("lexer/Lexer.zig");
pub const TokenData = @import("lexer/token.zig").TokenData;
pub const ast = @import("parser/ast.zig");
pub const Parser = @import("parser/Parser.zig");
pub const Compiler = @import("compiler/Compiler.zig");
pub const Bytecode = @import("compiler/Bytecode.zig");
pub const Vm = @import("vm/Vm.zig");
const allocator = std.heap.wasm_allocator;
/// A small buffer to hold a formatted string of the last popped value.
export var last_popped: [1024]u8 = undefined;
/// A generic writer used to wrap external JS functions.
pub fn JsWriter(comptime log_func: *const fn (msg: [*]const u8, len: usize) callconv(.C) void) type {
return struct {
const Self = @This();
/// Writes a message to the log.
pub fn write(self: *const Self, msg: []const u8) anyerror!usize {
_ = self;
log_func(msg.ptr, msg.len);
return msg.len;
}
/// Returns a writer that can be used for logging.
pub fn any(self: *const Self) std.io.AnyWriter {
return std.io.AnyWriter{
.context = self,
.writeFn = struct {
pub fn write(context: *const anyopaque, bytes: []const u8) !usize {
var writer: *const Self = @ptrCast(@alignCast(context));
return try writer.write(bytes);
}
}.write,
};
}
};
}
/// A log function exported by JS to log messages from the VM.
extern fn js_log(msg: [*]const u8, len: usize) void;
/// An error function exported by JS to log errors from the VM.
extern fn js_error(msg: [*]const u8, len: usize) void;
/// A function exported by JS to prompt the user for input.
extern fn js_prompt(msg: [*]const u8, len: usize) [*:0]u8;
/// A function exported by JS to display an alert message.
extern fn js_alert(msg: [*]const u8, len: usize) void;
/// A function exported by JS to generate random bytes.
extern fn js_random_bytes(len: usize) [*]u8;
pub const LogWriter = JsWriter(js_log);
pub const ErrorWriter = JsWriter(js_error);
pub const AlertWriter = JsWriter(js_alert);
/// Logs a message using the JS `console.log` function.
pub fn honeyLog(comptime fmt: []const u8, args: anytype) !void {
var log_writer = LogWriter{};
try log_writer.any().print(fmt, args);
}
/// Logs an error message using the JS `console.error` function.
pub fn honeyError(comptime fmt: []const u8, args: anytype) !void {
var error_writer = ErrorWriter{};
try error_writer.any().print(fmt, args);
}
/// Prints the given message and then prompts the user for input using JS `prompt`.
pub fn honeyPrompt(comptime buf_size: usize, comptime fmt: []const u8, args: anytype) ![*:0]const u8 {
var buf: [buf_size]u8 = undefined;
const fmted = try std.fmt.bufPrint(&buf, fmt, args);
return js_prompt(fmted.ptr, fmted.len);
}
/// Displays an alert message using the JS `alert` function.
pub fn honeyAlert(comptime buf_size: usize, comptime fmt: []const u8, args: anytype) !void {
var buf: [buf_size]u8 = undefined;
const fmted = std.fmt.bufPrint(&buf, fmt, args) catch |err| {
try honeyError("Error formatting alert message: {!}\n", .{err});
return;
};
js_alert(fmted.ptr, fmted.len);
}
const SeedType = u64;
const SeedSize = @sizeOf(SeedType);
/// Generates a random seed using the JS `crypto.getRandomValues` function.
pub fn generateSeed() SeedType {
const bytes = js_random_bytes(SeedSize);
defer allocator.free(bytes[0..SeedSize]);
return std.mem.readInt(SeedType, bytes[0..SeedSize], .big);
}
/// Allocates a slice of u8 for use in JS.
pub export fn allocU8(length: u32) [*]const u8 {
const slice = allocator.alloc(u8, length) catch @panic("failed to allocate memory");
return slice.ptr;
}
/// Deallocates a slice of u8 allocated by `allocU8`.
pub export fn deallocU8(slice: [*]const u8) void {
defer allocator.free(slice[0..SeedSize]);
}
/// Exposes the version to the WASM module.
export fn version() [*:0]const u8 {
return honey.version;
}
export fn run(source: [*]u8, source_len: usize) usize {
var log_writer = LogWriter{};
var error_writer = ErrorWriter{};
const result = compile(source[0..source_len], .{
.error_writer = error_writer.any(),
}) catch {
// `compile` already logs the error so we can just return 0 here.
return 0;
};
defer result.deinit();
var arena = std.heap.ArenaAllocator.init(allocator);
var vm = Vm.init(result.data, arena.allocator(), .{
.dump_bytecode = false,
.writer = log_writer.any(),
});
vm.run() catch {
vm.report();
return 0;
};
defer vm.deinit();
const output = std.fmt.bufPrint(&last_popped, "{s}", .{vm.getLastPopped() orelse .void}) catch |err| {
error_writer.any().print("Error formatting last popped value: {any}\n", .{err}) catch unreachable;
return 0;
};
return output.len;
}
fn tokenize(input: []const u8) Lexer.Data.Error!Lexer.Data {
var lexer = Lexer.init(input, allocator, null);
return try lexer.readAll();
}
const ParseOptions = struct {
error_writer: std.io.AnyWriter,
};
fn parse(source: []const u8, options: ParseOptions) !Result(ast.Program) {
var arena = std.heap.ArenaAllocator.init(allocator);
errdefer arena.deinit();
const tokens = try tokenize(source);
var parser = Parser.init(tokens, .{ .ally = arena.allocator(), .error_writer = options.error_writer });
defer parser.deinit();
const data = parser.parse() catch |err| {
parser.report();
return err;
};
return Result(ast.Program){
.data = data,
.arena = arena,
};
}
const CompileOptions = struct {
error_writer: std.io.AnyWriter,
};
fn compile(source: []const u8, options: CompileOptions) !Result(Bytecode) {
const result = try parse(source, .{
.error_writer = options.error_writer,
});
var arena = result.arena;
var compiler = Compiler.init(arena.allocator(), result.data, options.error_writer);
const program = compiler.compile() catch |err| {
compiler.report();
return err;
};
return Result(Bytecode){
.data = program,
.arena = result.arena,
};
}
const RunOptions = struct {
allocator: std.mem.Allocator,
error_writer: std.fs.File.Writer,
dump_bytecode: bool = false,
};
/// A result type that holds a value and an arena allocator.
/// Can be used to easily free the data allocated.
fn Result(comptime T: type) type {
return struct {
data: T,
arena: std.heap.ArenaAllocator,
pub fn deinit(self: @This()) void {
self.arena.deinit();
}
};
}
|
0 | repos/honey | repos/honey/src/main.zig | const std = @import("std");
const clap = @import("clap");
pub const honey = @import("honey.zig");
const Repl = @import("utils/Repl.zig");
const ast = @import("parser/ast.zig");
const Parser = @import("parser/Parser.zig");
pub const utils = @import("utils/utils.zig");
const Header =
\\
\\ _ _
\\ | || |___ _ _ ___ _ _
\\ | __ / _ \ ' \/ -_) || |
\\ |_||_\___/_||_\___|\_, |
\\ |__/
\\ A small, toy programming language.
\\ Version: v{s}
\\
\\
;
const Options =
\\ -h, --help Display this help menu and exit.
\\ -r, --repl Start the REPL.
\\ -d, --dump-bytecode Dumps the bytecode before running (only used for the bytecode engine)
\\ -p, --print-popped Prints the last popped value after the program runs
\\ -i, --input <input> Evaluate code from the command line.
\\ <file> Evaluate code from a given file.
;
/// The parsers used to parse the arguments
const ClapParsers = .{
.input = clap.parsers.string,
.file = clap.parsers.string,
};
pub fn main() !void {
var arena = std.heap.ArenaAllocator.init(std.heap.page_allocator);
defer arena.deinit();
const allocator = arena.allocator();
const stdout = std.io.getStdOut().writer();
const params = comptime clap.parseParamsComptime(Options);
// the parsers for the arguments
var diag = clap.Diagnostic{};
var res = clap.parse(clap.Help, ¶ms, &ClapParsers, .{ .diagnostic = &diag, .allocator = allocator }) catch |err| {
// Report useful error and exit
diag.report(stdout, err) catch {};
return;
};
defer res.deinit();
// print help and exit
// if (res.args.help != 0) {
// try stdout.print(Header ++ Options, .{honey.version});
// return;
// }
// handle REPL separately
if (res.args.repl != 0) {
try runRepl(allocator);
return;
}
const input: honey.Source = blk: {
if (res.args.input) |input| {
break :blk .{ .string = input };
} else if (res.positionals.len > 0) {
const handle = try std.fs.cwd().openFile(res.positionals[0], .{});
// 1024 chars should be enough for a path for now
var path_buf: [1024]u8 = undefined;
const full_path = try std.fs.cwd().realpath(res.positionals[0], &path_buf);
const file_name = std.fs.path.basename(full_path);
break :blk .{ .file = .{ .name = file_name, .handle = handle } };
} else {
// show help & exit
try stdout.print(Header ++ Options, .{honey.version});
return;
}
};
// close the file if we opened it
defer if (input == .file) input.file.handle.close();
const result = honey.run(input, .{
.allocator = allocator,
.error_writer = std.io.getStdErr().writer().any(),
.dump_bytecode = res.args.@"dump-bytecode" == 1,
}) catch |err| switch (err) {
// if the error is just telling us we encountered errors,
// we shouldn't barf the stacktrace back onto the user
error.EncounteredErrors => return,
inline else => return err,
};
defer result.deinit();
var vm = result.data;
if (res.args.@"print-popped" == 0) return;
if (vm.getLastPopped()) |value| {
std.debug.print("Result: {s}\n", .{value});
}
}
fn runRepl(allocator: std.mem.Allocator) !void {
var repl = try Repl.init(allocator, 1024);
defer repl.deinit();
try repl.addCommand("exit", "Exit the REPL", exit);
try repl.getStdOut().print("Honey v{s} - REPL\n", .{honey.version});
try repl.getStdOut().writeAll("Type ':exit' to exit the REPL.\n");
while (true) {
const input = try repl.prompt("repl > ") orelse continue;
// runInVm will print the error for us
var result = honey.run(.{ .string = input }, .{
.allocator = allocator,
.error_writer = std.io.getStdOut().writer().any(),
}) catch continue;
defer result.deinit();
if (result.data.getLastPopped()) |value| {
try repl.getStdOut().print("Output: {s}\n", .{value});
}
}
}
pub fn exit() !void {
std.posix.exit(0);
}
// Recursively loads all declarations for ZLS checking
comptime {
zlsAnalyze(@This());
}
/// A small utility function to expose all declarations at runtime
fn zlsAnalyze(comptime T: type) void {
inline for (declarations(T)) |decl| {
if (@TypeOf(@field(T, decl.name)) == type) {
zlsAnalyze(@field(T, decl.name));
}
_ = &@field(T, decl.name);
}
}
/// Returns all declarations of a type
fn declarations(comptime T: type) []const std.builtin.Type.Declaration {
return switch (@typeInfo(T)) {
.Struct => |info| info.decls,
.Enum => |info| info.decls,
.Union => |info| info.decls,
.Opaque => |info| info.decls,
else => &.{},
};
}
|
0 | repos/honey | repos/honey/src/honey.zig | const std = @import("std");
pub const Lexer = @import("lexer/Lexer.zig");
pub const TokenData = @import("lexer/token.zig").TokenData;
pub const ast = @import("parser/ast.zig");
pub const Parser = @import("parser/Parser.zig");
pub const Compiler = @import("compiler/Compiler.zig");
pub const Bytecode = @import("compiler/Bytecode.zig");
pub const Vm = @import("vm/Vm.zig");
pub const version = "0.1.1";
pub fn tokenize(input: []const u8, allocator: std.mem.Allocator, source_name: ?[]const u8) Lexer.Data.Error!Lexer.Data {
var lexer = Lexer.init(input, allocator, source_name);
errdefer lexer.deinit();
return lexer.readAll();
}
/// The source of the input to be parsed.
pub const Source = union(enum) {
file: struct {
name: []const u8,
handle: std.fs.File,
},
string: []const u8,
};
pub const ParseOptions = struct {
allocator: std.mem.Allocator,
error_writer: std.io.AnyWriter,
};
pub fn parse(source: Source, options: ParseOptions) !Result(ast.Program) {
var arena = std.heap.ArenaAllocator.init(options.allocator);
errdefer arena.deinit();
const input: []const u8 = switch (source) {
.string => |string| string,
.file => |file| try file.handle.readToEndAlloc(arena.allocator(), std.math.maxInt(usize)),
};
const lex_data = try tokenize(input, arena.allocator(), if (source == .file) source.file.name else null);
var parser = Parser.init(lex_data, .{
.ally = arena.allocator(),
.error_writer = options.error_writer,
});
defer parser.deinit();
const parsed_data = parser.parse() catch |err| {
parser.report();
return err;
};
return Result(ast.Program){
.data = parsed_data,
.arena = arena,
};
}
pub const CompileOptions = struct {
allocator: std.mem.Allocator,
error_writer: std.io.AnyWriter,
};
pub fn compile(source: Source, options: CompileOptions) !Result(Bytecode) {
const result = try parse(source, .{
.allocator = options.allocator,
.error_writer = options.error_writer,
});
var arena = result.arena;
var compiler = Compiler.init(arena.allocator(), result.data, options.error_writer);
const program = compiler.compile() catch {
compiler.report();
return error.EncounteredErrors;
};
return Result(Bytecode){
.data = program,
.arena = result.arena,
};
}
pub const RunOptions = struct {
allocator: std.mem.Allocator,
error_writer: std.io.AnyWriter,
dump_bytecode: bool = false,
};
pub fn run(source: Source, options: RunOptions) !Result(Vm) {
const result = try compile(source, .{
.allocator = options.allocator,
.error_writer = options.error_writer,
});
defer result.deinit();
var arena = std.heap.ArenaAllocator.init(options.allocator);
var vm = Vm.init(result.data, arena.allocator(), .{
.dump_bytecode = options.dump_bytecode,
.writer = options.error_writer,
});
vm.run() catch {
vm.report();
return error.EncounteredErrors;
};
return Result(Vm){ .data = vm, .arena = arena };
}
/// A result type that holds a value and an arena allocator.
/// Can be used to easily free the data allocated.
pub fn Result(comptime T: type) type {
return struct {
data: T,
arena: std.heap.ArenaAllocator,
pub fn deinit(self: @This()) void {
self.arena.deinit();
}
};
}
|
0 | repos/honey | repos/honey/src/tests.zig | const std = @import("std");
pub const Lexer = @import("lexer/Lexer.zig");
pub const Parser = @import("parser/Parser.zig");
pub const Compiler = @import("compiler/Compiler.zig");
pub const Vm = @import("vm/Vm.zig");
test {
std.testing.refAllDeclsRecursive(@This());
}
|
0 | repos/honey | repos/honey/src/wasm_builtins.zig | const std = @import("std");
const wasm = @import("wasm.zig");
const Vm = @import("vm/Vm.zig");
const Value = @import("compiler/value.zig").Value;
/// use the existing builtins.zig module
pub usingnamespace @import("builtins.zig");
pub fn alert(_: *Vm, args: []const Value) !?Value {
var alert_writer = wasm.AlertWriter{};
var buf = std.io.bufferedWriter(alert_writer.any());
const writer = buf.writer();
for (args) |arg| {
switch (arg) {
.string => writer.print("{s}", .{arg.string}) catch return error.PrintFailed,
inline else => writer.print("{s}", .{arg}) catch return error.PrintFailed,
}
}
buf.flush() catch return error.PrintFailed;
return null;
}
|
0 | repos/honey | repos/honey/src/builtins.zig | const std = @import("std");
const builtin = @import("builtin");
const honey = @import("../honey.zig");
const ast = @import("../parser/ast.zig");
const Value = @import("compiler/value.zig").Value;
const Vm = @import("vm/Vm.zig");
const wasm = @import("wasm.zig");
pub fn rand(_: *Vm, args: []const Value) !?Value {
var prng = std.rand.Xoshiro256.init(if (builtin.target.isWasm()) wasm: {
const seed = wasm.generateSeed();
break :wasm seed;
} else posix: {
var seed: u64 = undefined;
std.posix.getrandom(std.mem.asBytes(&seed)) catch return error.GetRandomFailed;
break :posix seed;
});
const random = prng.random();
const result = random.float(f64);
return switch (args.len) {
0 => .{ .number = result },
1 => blk: {
const arg = args[0];
if (arg != .number) {
return error.InvalidArgument;
}
const max = arg.number;
break :blk .{ .number = @floor(result * max) };
},
2 => blk: {
const arg0 = args[0];
const arg1 = args[1];
if (arg0 != .number or arg1 != .number) {
return error.InvalidArgument;
}
const min = arg0.number;
const max = arg1.number;
break :blk .{ .number = @floor(result * (max - min) + min) };
},
else => error.InvalidNumberOfArguments,
};
}
pub fn print(_: *Vm, args: []const Value) !?Value {
var under_writer = if (builtin.target.isWasm()) blk: {
break :blk wasm.LogWriter{};
} else blk: {
break :blk std.io.getStdErr().writer();
};
var buf = std.io.bufferedWriter(under_writer.any());
const writer = buf.writer();
for (args) |arg| {
switch (arg) {
.string => writer.print("{s}", .{arg.string}) catch return error.PrintFailed,
inline else => writer.print("{s}", .{arg}) catch return error.PrintFailed,
}
}
buf.flush() catch return error.PrintFailed;
return null;
}
pub fn println(_: *Vm, args: []const Value) !?Value {
var under_writer = if (builtin.target.isWasm()) blk: {
break :blk wasm.LogWriter{};
} else blk: {
break :blk std.io.getStdErr().writer();
};
var buf = std.io.bufferedWriter(under_writer.any());
const writer = buf.writer();
for (args) |arg| {
switch (arg) {
.string => writer.print("{s}", .{arg.string}) catch return error.PrintFailed,
inline else => writer.print("{s}", .{arg}) catch return error.PrintFailed,
}
}
writer.writeByte('\n') catch return error.PrintFailed;
buf.flush() catch return error.PrintFailed;
return null;
}
/// Returns the name of the operating system.
pub fn os(vm: *Vm, args: []const Value) !?Value {
if (args.len != 0) {
vm.reportError("os: expected 0 arguments but got {}", .{args.len});
return error.InvalidNumberOfArguments;
}
return try vm.createString(@tagName(builtin.os.tag));
}
/// The maximum size of a prompt message.
const MaxBufferSize = 1024;
/// Prints a given message and then prompts the user for input using stdin.
pub fn prompt(vm: *Vm, args: []const Value) !?Value {
if (args.len != 1 or args[0] != .string) {
return null;
}
const msg = args[0].string;
if (!builtin.target.isWasm()) {
const stderr = std.io.getStdErr().writer();
stderr.print("{s}", .{msg}) catch return error.PrintFailed;
// create a prompt buffer & a related stream
var prompt_buf: [MaxBufferSize]u8 = undefined;
var stream = std.io.fixedBufferStream(&prompt_buf);
// stream the prompt message to stdin
const stdin = std.io.getStdIn().reader();
stdin.streamUntilDelimiter(stream.writer(), '\n', MaxBufferSize) catch |err| switch (err) {
error.StreamTooLong => return error.PromptTooLong,
else => return error.PromptFailed,
};
// trim the prompt buffer of CRLF
const trimmed = std.mem.trim(u8, stream.getWritten(), "\r\n");
// create a new string within the evaluator's arena and return it
return try vm.createString(trimmed);
} else {
const result = wasm.honeyPrompt(MaxBufferSize, "{s}", .{msg}) catch return error.PromptFailed;
defer wasm.deallocU8(result);
return try vm.createString(result[0..std.mem.len(result)]);
}
}
pub fn parse_number(_: *Vm, args: []const Value) !?Value {
if (args.len != 1 or args[0] != .string) {
return error.InvalidNumberOfArguments;
}
const str = args[0].string;
const number = std.fmt.parseFloat(f64, str) catch return error.ParseFailed;
return .{ .number = number };
}
pub fn to_string(vm: *Vm, args: []const Value) !?Value {
if (args.len != 1) {
return error.InvalidNumberOfArguments;
}
// create small buffer to write to
var buf: [MaxBufferSize]u8 = undefined;
var stream = std.io.fixedBufferStream(&buf);
const writer = stream.writer();
writer.print("{s}", .{args[0]}) catch return error.PrintFailed;
// alloc a new string in the arena and return it
return try vm.createString(stream.getWritten());
}
/// Returns the length of a string, list, or dictionary.
pub fn len(_: *Vm, args: []const Value) !?Value {
if (args.len != 1) {
return error.InvalidNumberOfArguments;
}
return switch (args[0]) {
.string => |string| .{ .number = @floatFromInt(string.len) },
.list => |list| .{ .number = @floatFromInt(list.count()) },
.dict => |dict| .{ .number = @floatFromInt(dict.count()) },
else => error.InvalidArgument,
};
}
pub fn memory(vm: *Vm, args: []const Value) !?Value {
if (args.len != 0) {
return error.InvalidNumberOfArguments;
}
_ = vm;
// todo: implement memory
return .{ .number = 0 };
}
/// Returns the name of the type associated with the value
pub fn @"type"(vm: *Vm, args: []const Value) !?Value {
if (args.len != 1) {
vm.reportError("type: expected 1 argument but got {}", .{args.len});
return error.InvalidNumberOfArguments;
}
const arg = args[0];
// we don't need to allocate a string at the moment
// because all type names are embedded into the program
return Value{ .string = arg.typeName() };
}
|
0 | repos/honey/src | repos/honey/src/parser/Parser.zig | const std = @import("std");
const Lexer = @import("../lexer/Lexer.zig");
const Token = @import("../lexer/token.zig").Token;
const TokenTag = @import("../lexer/token.zig").TokenTag;
const TokenData = @import("../lexer/token.zig").TokenData;
const ast = @import("ast.zig");
const Program = ast.Program;
const Statement = ast.Statement;
const Expression = ast.Expression;
const Operator = ast.Operator;
const utils = @import("../utils/utils.zig");
pub const Precedence = enum {
lowest,
logical,
equals,
less_and_greater,
sum,
product,
exponent,
modulo,
prefix,
call,
index,
pub fn fromToken(token: Token) Precedence {
return switch (token) {
.@"or", .@"and" => .logical,
.equal, .not_equal => .equals,
.less_than, .greater_than, .less_than_equal, .greater_than_equal => .less_and_greater,
.plus, .minus => .sum,
.star, .slash => .product,
.doublestar => .exponent,
.modulo => .modulo,
.bang => .prefix,
.left_paren => .call,
.left_bracket, .dot => .index,
inline else => .lowest,
};
}
pub fn lessThan(self: Precedence, other: Precedence) bool {
return self.value() < other.value();
}
pub fn greaterThan(self: Precedence, other: Precedence) bool {
return self.value() > other.value();
}
pub fn value(self: Precedence) u8 {
return switch (self) {
inline else => |inner| @intFromEnum(inner),
};
}
};
pub const ParserError = error{
UnexpectedToken,
UnexpectedEOF,
NoPrefixParseRule,
NoInfixParseRule,
OutOfMemory,
NumberParseFailure,
ExpectedCurrentMismatch,
ExpectedPeekMismatch,
ExpectedElseCondition,
EncounteredErrors,
};
const ErrorData = struct {
err: ParserError,
msg: []const u8,
};
const Self = @This();
arena: std.heap.ArenaAllocator,
/// The main data compiled from the lexer
lex_data: Lexer.Data,
/// A cursor that iterates through the tokens
cursor: utils.Cursor(TokenData),
/// Spans that consist of the lines
line_data: []const utils.Span,
error_writer: std.io.AnyWriter,
diagnostics: utils.Diagnostics,
const ParserOptions = struct {
ally: std.mem.Allocator,
error_writer: std.io.AnyWriter,
};
/// Initializes the parser.
pub fn init(data: Lexer.Data, options: ParserOptions) Self {
return .{
.arena = std.heap.ArenaAllocator.init(options.ally),
.lex_data = data,
.cursor = utils.Cursor(TokenData).init(data.tokens.items),
.line_data = data.line_data.items,
.error_writer = options.error_writer,
.diagnostics = utils.Diagnostics.init(options.ally),
};
}
/// Deinitializes the parser.
pub fn deinit(self: *Self) void {
self.arena.deinit();
self.diagnostics.deinit();
self.lex_data.deinit();
}
pub fn allocator(self: *Self) std.mem.Allocator {
return self.arena.allocator();
}
/// Allocates a new value on the heap and returns a pointer to it.
fn moveToHeap(self: *Self, value: anytype) ParserError!*@TypeOf(value) {
const ptr = self.allocator().create(@TypeOf(value)) catch return ParserError.OutOfMemory;
ptr.* = value;
return ptr;
}
/// If there's more than 5 errors, we should stop reporting them to prevent
/// spamming the user with errors that may be caused by a single issue.
const MaxReportedErrors = 5;
/// Reports any errors that have occurred during execution to stderr
pub fn report(self: *Self) void {
if (!self.diagnostics.hasErrors()) {
return;
}
// todo: color!
const msg_data = self.diagnostics.errors.items(.msg);
const token_data = self.diagnostics.errors.items(.token_data);
for (msg_data, token_data, 0..) |msg, token_datum, index| {
self.printErrorAtToken(token_datum, msg) catch unreachable;
if (index < self.diagnostics.errors.len) {
self.error_writer.writeByte('\n') catch unreachable;
}
if (index >= MaxReportedErrors) {
break;
}
}
}
/// Attempts to match a token to the line that it exists on
pub fn findLineIndex(self: *Self, token_data: TokenData) ?usize {
return std.sort.binarySearch(utils.Span, token_data.position, self.line_data, {}, struct {
pub fn find(_: void, key: utils.Span, mid_item: utils.Span) std.math.Order {
if (key.start >= mid_item.start and key.end <= mid_item.end) {
return .eq;
} else if (key.end < mid_item.start) {
return .lt;
}
return .gt;
}
}.find);
}
/// Attempts to match a token to the line that it exists on
pub fn findLine(self: *Self, token_data: TokenData) ?utils.Span {
const result = self.findLineIndex(token_data);
return if (result) |found| self.line_data[found] else null;
}
/// Prints
pub fn printErrorAtToken(self: *Self, token_data: TokenData, msg: []const u8) !void {
const line_index = self.findLineIndex(token_data) orelse return ParserError.UnexpectedToken;
const line = self.line_data[line_index];
const column_index = token_data.position.start - line.start;
// todo: move to terminal
// we offset the line & column by one for one-indexing
try self.error_writer.print("[{s}:{d}:{d}] error: {s}\n", .{ self.lex_data.source_name, line_index + 1, column_index + 1, msg });
try self.error_writer.writeByte('\t');
_ = try self.error_writer.write(self.lex_data.getLineBySpan(line));
try self.error_writer.writeByte('\n');
try self.error_writer.writeByte('\t');
// pad up to the token
try self.error_writer.writeByteNTimes(' ', column_index);
// arrows to indicate token highlighted
const token_len = token_data.position.end - token_data.position.start;
try self.error_writer.writeByteNTimes('~', token_len + 1);
}
/// Parses the tokens into an AST.
pub fn parse(self: *Self) ParserError!Program {
var program = Program.init(self.allocator());
while (self.cursor.canRead()) {
const statement = self.parseStatement(true) catch continue;
if (statement) |stmt| {
try program.add(stmt);
}
}
if (self.diagnostics.hasErrors()) {
return ParserError.EncounteredErrors;
}
return program;
}
/// Parses a single statement from the tokens.
fn parseStatement(self: *Self, needs_terminated: bool) ParserError!?Statement {
return switch (self.currentToken()) {
.let, .@"const" => try self.parseVarDeclaration(),
.@"fn" => try self.parseFunctionDeclaration(),
.@"return" => blk: {
self.cursor.advance();
if (self.currentIs(.semicolon)) {
self.cursor.advance();
break :blk .{ .@"return" = .{ .expression = null } };
}
const expression = try self.parseExpression(.lowest);
if (needs_terminated) {
try self.expectSemicolon();
}
break :blk .{ .@"return" = .{ .expression = expression } };
},
.@"break" => blk: {
self.cursor.advance();
if (needs_terminated) {
try self.expectSemicolon();
}
// todo: break values
break :blk .@"break";
},
.@"continue" => blk: {
self.cursor.advance();
if (needs_terminated) {
try self.expectSemicolon();
}
break :blk .@"continue";
},
// skip comments
.comment => blk: {
self.cursor.advance();
break :blk null;
},
inline else => blk: {
// check for block statements before falling through to expression parsing
if (self.currentIs(.left_brace)) {
// if we encounter a left brace, we should check if it is a block statement or a dictionary
const encountered_key = self.peekIs(.identifier) or self.peekIs(.string);
// check for separator
const potential_sep = self.cursor.peekAhead(2);
const encountered_sep = potential_sep != null and potential_sep.?.token == .colon;
// if we didn't encounter a key or a separator, we should parse a block statement
if (!(encountered_key and encountered_sep)) {
break :blk .{ .block = try self.parseBlockStatement() };
}
}
const expression = try self.parseExpression(.lowest);
// try to parse an assignment statement
// todo: expand expressions to include dot operator (e.g., this.is.a.nested.identifier)
if (self.cursor.hasNext() and self.currentToken().isAssignment() and expression.canAssign()) {
break :blk try self.parseAssignmentStatement(expression, needs_terminated);
}
var terminated: bool = false;
switch (expression) {
.for_expr, .while_expr, .if_expr => if (self.currentIs(.semicolon)) {
self.cursor.advance();
terminated = true;
},
inline else => if (needs_terminated) {
try self.expectSemicolon();
terminated = true;
},
}
break :blk ast.createExpressionStatement(expression, terminated);
},
};
}
/// Reports an error if a semi-colon is missing
fn expectSemicolon(self: *Self) ParserError!void {
if (self.currentIs(.semicolon)) {
self.cursor.advance();
return;
}
// todo: is there a better way to implement this?
const prev = self.cursor.previous().?;
var position = prev.position.clone();
_ = position.offset(1);
_ = position.moveToEnd();
self.diagnostics.report("expected ';' after statement", .{}, .{
.token = prev.token,
// offset by 1 and move
.position = position,
});
return ParserError.UnexpectedToken;
}
/// Parses a let/const statement.
/// let x: int = 5; OR const x = 5;
fn parseVarDeclaration(self: *Self) ParserError!Statement {
const kind_token = self.currentToken();
if (kind_token != .let and kind_token != .@"const") {
return ParserError.UnexpectedToken;
}
try self.expectPeekAndAdvance(.identifier);
const identifier_token = self.currentToken();
// if the next token is a colon, we should expect a type name to be given
const type_token = if (self.peekIs(.colon)) token: {
self.cursor.advance();
try self.expectPeekAndAdvance(.identifier);
break :token self.currentToken();
} else null;
// we aren't storing the assignment token so we can skip past it once we peek at it
try self.expectPeekAndAdvance(.assignment);
self.cursor.advance();
const expression = try self.parseExpression(.lowest);
try self.expectSemicolon();
return .{ .variable = .{
.kind = kind_token,
.name = identifier_token.identifier,
.type = if (type_token) |token| token.identifier else null,
.expression = expression,
} };
}
fn parseAssignmentStatement(self: *Self, lhs: Expression, needs_terminated: bool) ParserError!Statement {
if (!lhs.canAssign()) {
return ParserError.UnexpectedToken;
}
const assignment_token_data = try self.readAndAdvance();
if (!assignment_token_data.token.isAssignment()) {
return ParserError.UnexpectedToken;
}
const rhs = try self.parseExpression(.lowest);
if (needs_terminated) {
try self.expectSemicolon();
}
// std.debug.print("Assignment: {s} {s} {s}\n", .{ lhs, assignment_token_data.token, rhs });
return ast.createAssignStatement(lhs, assignment_token_data.token, rhs);
}
fn parseFunctionDeclaration(self: *Self) ParserError!Statement {
try self.expectPeekAndAdvance(.identifier);
const identifier_data = try self.readAndAdvance();
const parameters = try self.parseFunctionParameters();
const body = try self.parseBlockStatement();
return .{ .@"fn" = .{
.name = identifier_data.token.identifier,
.parameters = parameters,
.body = body,
} };
}
fn parseFunctionParameters(self: *Self) ParserError![]const Expression {
const expressions = try self.parseExpressionList(.left_paren, .right_paren);
for (expressions) |expr| {
if (expr != .identifier) {
self.diagnostics.report("expected identifier but got: {}", .{expr}, self.cursor.current());
return ParserError.UnexpectedToken;
}
}
return expressions;
}
fn parseBlockStatement(self: *Self) ParserError!ast.BlockStatement {
try self.expectCurrentAndAdvance(.left_brace);
var statements = std.ArrayList(Statement).init(self.allocator());
while (!self.currentIs(.right_brace) and self.cursor.canRead()) {
const statement = try self.parseStatement(true) orelse continue;
statements.append(statement) catch return ParserError.OutOfMemory;
}
try self.expectCurrentAndAdvance(.right_brace);
return .{ .statements = statements.toOwnedSlice() catch return ParserError.OutOfMemory };
}
fn parseListExpression(self: *Self) ParserError!Expression {
// rewind back to the bracket before parsing as an expression list
self.cursor.rewind() catch return ParserError.UnexpectedEOF;
const list = try self.parseExpressionList(.left_bracket, .right_bracket);
return .{ .list = .{ .expressions = list } };
}
fn parseDictExpression(self: *Self) ParserError!Expression {
var keys = std.ArrayList(Expression).init(self.allocator());
var values = std.ArrayList(Expression).init(self.allocator());
errdefer keys.deinit();
errdefer values.deinit();
// parse as empty dictionary
if (self.currentIs(.right_brace)) {
self.cursor.advance();
return .{ .dict = .{
.keys = keys.toOwnedSlice() catch return ParserError.OutOfMemory,
.values = values.toOwnedSlice() catch return ParserError.OutOfMemory,
} };
}
while (self.cursor.canRead()) {
const key = try self.parseExpression(.lowest);
if (key != .identifier and key != .string) {
self.diagnostics.report("expected identifier or string but got: {}", .{key}, self.cursor.current());
return ParserError.UnexpectedToken;
}
try self.expectCurrentAndAdvance(.colon);
const value = try self.parseExpression(.lowest);
keys.append(key) catch return ParserError.OutOfMemory;
values.append(value) catch return ParserError.OutOfMemory;
// trailing commas are okay
if (self.currentIs(.comma) and self.peekIs(.right_brace)) {
self.cursor.advance();
}
if (self.currentIs(.right_brace)) {
self.cursor.advance();
break;
}
// if it's not a right brace, we should expect a comma
try self.expectCurrentAndAdvance(.comma);
}
return .{ .dict = .{
.keys = keys.toOwnedSlice() catch return ParserError.OutOfMemory,
.values = values.toOwnedSlice() catch return ParserError.OutOfMemory,
} };
}
fn parseIdentifier(self: *Self) ParserError!Expression {
const current = try self.readAndAdvance();
if (current.token != .identifier) {
self.diagnostics.report("expected identifier but got: {}", .{current.token}, self.cursor.current());
return ParserError.UnexpectedToken;
}
return .{ .identifier = current.token.identifier };
}
/// Parses an expression.
fn parseExpression(self: *Self, precedence: Precedence) ParserError!Expression {
var lhs = try self.parseExpressionAsPrefix();
while (self.cursor.canRead() and !self.peekIs(.semicolon) and precedence.lessThan(self.currentPrecedence())) {
const lhs_ptr = try self.moveToHeap(lhs);
lhs = try self.parseExpressionAsInfix(lhs_ptr);
}
return lhs;
}
fn parseIfBody(self: *Self) ParserError!ast.IfExpression.Body {
if (self.currentIs(.left_brace)) {
const block = try self.parseBlockStatement();
return .{ .block = block };
}
const parsed = try self.parseExpression(.lowest);
const expression = try self.moveToHeap(parsed);
return .{ .expression = expression };
}
fn parseIfExpression(self: *Self) ParserError!Expression {
if (!self.currentIs(.@"if")) {
self.diagnostics.report("expected if but got: {}", .{self.currentToken()}, self.cursor.current());
return ParserError.UnexpectedToken;
}
var condition_list = std.ArrayList(ast.IfExpression.ConditionData).init(self.allocator());
while (self.currentIs(.@"if")) {
self.cursor.advance();
try self.expectCurrentAndAdvance(.left_paren);
const parsed = try self.parseExpression(.lowest);
const condition_ptr = try self.moveToHeap(parsed);
try self.expectCurrentAndAdvance(.right_paren);
const body = try self.parseIfBody();
condition_list.append(.{ .condition = condition_ptr, .body = body }) catch return ParserError.OutOfMemory;
// if we don't have an else if, break out of the loop
if (!(self.currentIs(.@"else") and self.cursor.hasNext() and self.peekIs(.@"if"))) {
break;
}
}
const alternative = blk: {
if (!self.currentIs(.@"else")) {
break :blk null;
}
self.cursor.advance();
break :blk try self.parseIfBody();
};
return .{ .if_expr = .{
.condition_list = condition_list.toOwnedSlice() catch return ParserError.OutOfMemory,
.alternative = alternative,
} };
}
fn parseWhileExpression(self: *Self) ParserError!Expression {
try self.expectCurrentAndAdvance(.left_paren);
const parsed = try self.parseExpression(.lowest);
const condition_ptr = try self.moveToHeap(parsed);
try self.expectCurrentAndAdvance(.right_paren);
// encountered a post statement
// while (true) : (i += 1) {}
var post_stmt: ?Statement = null;
if (self.currentIs(.colon)) {
self.cursor.advance();
try self.expectCurrentAndAdvance(.left_paren);
post_stmt = try self.parseStatement(false);
try self.expectCurrentAndAdvance(.right_paren);
}
const body = try self.parseStatement(false) orelse {
self.diagnostics.report("expected statement but got: {}", .{self.currentToken()}, self.cursor.current());
return ParserError.UnexpectedToken;
};
return .{ .while_expr = .{
.condition = condition_ptr,
.body = try self.moveToHeap(body),
.post_stmt = if (post_stmt) |stmt| try self.moveToHeap(stmt) else null,
} };
}
fn parseForExpression(self: *Self) ParserError!Expression {
// for (0..10)
try self.expectCurrentAndAdvance(.left_paren);
const expr = if (self.peekIs(.inclusive_range) or self.peekIs(.exclusive_range)) range: {
if (!self.currentIs(.number) and !self.currentIs(.identifier)) {
self.diagnostics.report("expected number or identifier for range but got: {}", .{self.currentToken()}, self.cursor.current());
return ParserError.UnexpectedToken;
}
break :range try self.parseRange();
} else try self.parseExpression(.lowest);
try self.expectCurrentAndAdvance(.right_paren);
// |i|
const captures = try self.parseExpressionList(.pipe, .pipe);
for (captures) |capture_ptr| {
if (capture_ptr != .identifier) {
self.diagnostics.report("expected identifier but got: {}", .{capture_ptr}, self.cursor.current());
return ParserError.UnexpectedToken;
}
}
// { ... }
const body = try self.parseStatement(false) orelse {
self.diagnostics.report("expected statement but got: {}", .{self.currentToken()}, self.cursor.current());
return ParserError.UnexpectedToken;
};
return .{ .for_expr = .{
.expr = try self.moveToHeap(expr),
.captures = captures,
.body = try self.moveToHeap(body),
} };
}
fn parseRange(self: *Self) ParserError!Expression {
const start = try self.parseExpression(.lowest);
const start_ptr = try self.moveToHeap(start);
const inclusive = switch (self.currentToken()) {
.inclusive_range => true,
.exclusive_range => false,
inline else => {
self.diagnostics.report("expected range operator but got: {}", .{self.currentToken()}, self.cursor.current());
return ParserError.UnexpectedToken;
},
};
self.cursor.advance();
const end = try self.parseExpression(.lowest);
const end_ptr = try self.moveToHeap(end);
return .{ .range = .{ .start = start_ptr, .end = end_ptr, .inclusive = inclusive } };
}
/// Parses an expression by attempting to parse it as a prefix.
fn parseExpressionAsPrefix(self: *Self) ParserError!Expression {
const current = try self.readAndAdvance();
return switch (current.token) {
.plus, .minus, .bang => blk: {
const operator = Operator.fromTokenData(current) catch return ParserError.UnexpectedToken;
const parsed = try self.parseExpression(.prefix);
const rhs = try self.moveToHeap(parsed);
break :blk .{ .prefix = .{ .operator = operator, .rhs = rhs } };
},
.number => |inner| .{
.number = std.fmt.parseFloat(f64, inner) catch return ParserError.NumberParseFailure,
},
.string => |inner| .{ .string = inner },
.true => .{ .boolean = true },
.false => .{ .boolean = false },
.null => .null,
.identifier => |identifier| .{ .identifier = identifier },
.@"if" => blk: {
self.cursor.rewind() catch unreachable;
break :blk try self.parseIfExpression();
},
.@"while" => try self.parseWhileExpression(),
.@"for" => try self.parseForExpression(),
.left_bracket => try self.parseListExpression(),
.left_brace => try self.parseDictExpression(),
.builtin => |name| try self.parseBuiltinExpression(name),
.left_paren => blk: {
const parsed = try self.parseExpression(.lowest);
try self.expectCurrentAndAdvance(.right_paren);
break :blk parsed;
},
inline else => {
self.diagnostics.report("unable to parse '{s}' as prefix", .{current.token}, current);
return ParserError.NoPrefixParseRule;
},
};
}
/// Parses an expression into an infix expression.
fn parseExpressionAsInfix(self: *Self, lhs: *Expression) ParserError!Expression {
const token_data = try self.readAndAdvance();
switch (token_data.token) {
.left_paren => return try self.parseCallExpression(lhs),
.left_bracket => return try self.parseIndexExpression(lhs),
.dot => return try self.parseMemberExpression(lhs),
else => {},
}
const operator = Operator.fromTokenData(token_data) catch return ParserError.UnexpectedToken;
const parsed = try self.parseExpression(Precedence.fromToken(token_data.token));
const rhs = try self.moveToHeap(parsed);
return .{ .binary = .{ .lhs = lhs, .operator = operator, .rhs = rhs } };
}
/// Parses a call expression using the given identifier as the name.
fn parseCallExpression(self: *Self, expr: *Expression) ParserError!Expression {
if (expr.* != .identifier) {
self.diagnostics.report("expected identifier but got: {}", .{expr}, self.cursor.current());
return ParserError.UnexpectedToken;
}
// rewind the cursor to make sure we can use `parseExpressionList`
self.cursor.rewind() catch unreachable;
const arguments = try self.parseExpressionList(.left_paren, .right_paren);
return .{ .call = .{ .name = expr.identifier, .arguments = arguments } };
}
/// Parses a member expression given the LHS
fn parseMemberExpression(self: *Self, lhs: *Expression) ParserError!Expression {
if (!self.currentIs(.identifier)) {
self.diagnostics.report("expected identifier but got: {}", .{self.currentToken()}, self.cursor.current());
return ParserError.UnexpectedToken;
}
const member = try self.readAndAdvance();
return .{ .member = .{ .lhs = lhs, .member = member.token.identifier } };
}
/// Parses an index expression given the LHS
fn parseIndexExpression(self: *Self, lhs: *Expression) ParserError!Expression {
const index = try self.parseExpression(.lowest);
const index_ptr = try self.moveToHeap(index);
try self.expectCurrentAndAdvance(.right_bracket);
return .{ .index = .{ .lhs = lhs, .index = index_ptr } };
}
fn parseBuiltinExpression(self: *Self, raw_name: []const u8) ParserError!Expression {
const parameters = try self.parseExpressionList(.left_paren, .right_paren);
return .{ .builtin = .{ .name = raw_name[1..], .arguments = parameters } };
}
fn parseExpressionList(self: *Self, start: TokenTag, sentinel: TokenTag) ParserError![]const Expression {
try self.expectCurrentAndAdvance(start);
var parameters = std.ArrayList(Expression).init(self.allocator());
if (self.currentIs(sentinel)) {
self.cursor.advance();
return parameters.toOwnedSlice();
}
parameters.append(try self.parseExpression(.lowest)) catch unreachable;
while (self.currentIs(.comma)) {
self.cursor.advance();
// break out for trailing commas
if (self.currentIs(sentinel)) {
break;
}
parameters.append(try self.parseExpression(.lowest)) catch unreachable;
}
try self.expectCurrentAndAdvance(sentinel);
return parameters.toOwnedSlice();
}
/// Reads the current token and advances the cursor.
fn readAndAdvance(self: *Self) ParserError!TokenData {
return self.cursor.readAndAdvance() orelse return ParserError.UnexpectedEOF;
}
/// Returns the current token data.
fn currentToken(self: *Self) Token {
return self.cursor.current().token;
}
/// Returns the current token data.
fn peekToken(self: *Self) ParserError!Token {
if (self.cursor.peek()) |data| {
return data.token;
}
return ParserError.UnexpectedEOF;
}
/// Returns true if the current token is the given tag.
inline fn currentIs(self: *Self, tag: TokenTag) bool {
return self.cursor.canRead() and self.currentToken() == tag;
}
/// Returns true if the next token is the given tag.
inline fn peekIs(self: *Self, tag: TokenTag) bool {
const token = self.peekToken() catch return false;
return token == tag;
}
/// Throws an error if the current token is not the expected tag.
fn expectCurrentAndAdvance(self: *Self, tag: TokenTag) ParserError!void {
if (!self.cursor.canRead()) {
// offset by one so it doesn't highlight the previous token
self.diagnostics.report("expected '{s}' but got EOF", .{tag.name()}, self.cursor.previous().?.offset(1));
return ParserError.UnexpectedEOF;
}
if (!self.currentIs(tag)) {
self.diagnostics.report("expected '{s}' but got '{s}'", .{ tag.name(), self.currentToken() }, self.cursor.current());
return ParserError.ExpectedCurrentMismatch;
}
self.cursor.advance();
}
/// Throws an error if the current token is not the expected tag.
fn expectPeekAndAdvance(self: *Self, tag: TokenTag) ParserError!void {
const peek = self.cursor.peek() orelse {
// offset by one so it doesn't highlight the current token
self.diagnostics.report("expected token '{s}' but got EOF", .{tag.name()}, self.cursor.current().offset(1));
return ParserError.UnexpectedEOF;
};
if (!self.peekIs(tag)) {
self.diagnostics.report("expected token: '{s}' but got '{s}'", .{ tag.name(), peek }, peek);
return ParserError.ExpectedPeekMismatch;
}
self.cursor.advance();
}
/// Returns the precedence of the current token.
fn currentPrecedence(self: *Self) Precedence {
return Precedence.fromToken(self.currentToken());
}
/// Returns the precedence of the next token.
fn peekPrecedence(self: *Self) ParserError!Precedence {
return Precedence.fromToken(try self.peekToken());
}
/// A helper function for testing the parser.
fn parseAndExpect(input: []const u8, test_func: *const fn (*Program) anyerror!void) anyerror!void {
const honey = @import("../honey.zig");
const ally = std.testing.allocator;
var data = try honey.tokenize(input, ally);
errdefer data.deinit();
var parser = init(data, .{
.ally = ally,
.error_writer = std.io.getStdErr().writer().any(),
});
defer parser.deinit();
var program = parser.parse() catch |err| {
parser.report();
return err;
};
defer program.deinit();
try test_func(&program);
}
test "test simple parsing (1 + 2)" {
try parseAndExpect("1 + 2", struct {
pub fn func(program: *Program) anyerror!void {
var lhs = Expression{ .number = 1.0 };
var rhs = Expression{ .number = 2.0 };
const expected = ast.createBinaryStatement(&lhs, .plus, &rhs, false);
const statements = try program.statements.toOwnedSlice();
try std.testing.expectEqualDeep(expected, statements[0]);
}
}.func);
}
test "test parsing with precedence ((1 + 2) - 3)" {
try parseAndExpect("1 + 2 - 3", struct {
pub fn func(program: *Program) anyerror!void {
// 1 + 2
var lhs_1 = Expression{ .number = 1.0 };
var rhs = Expression{ .number = 2.0 };
var lhs_expr = Expression{ .binary = .{ .lhs = &lhs_1, .operator = .plus, .rhs = &rhs } };
// 3
var rhs_2 = Expression{ .number = 3.0 };
// ((1 + 2) - 3)
const expected = ast.createBinaryStatement(&lhs_expr, .minus, &rhs_2, false);
const statements = try program.statements.toOwnedSlice();
try std.testing.expectEqualDeep(expected, statements[0]);
}
}.func);
}
test "test parsing let statement" {
try parseAndExpect("let variable = 1;", struct {
pub fn func(program: *Program) anyerror!void {
const expected = Statement{ .variable = .{
.name = "variable",
.kind = .let,
.type = null,
.expression = Expression{ .number = 1.0 },
} };
const statements = try program.statements.toOwnedSlice();
try std.testing.expectEqualDeep(expected, statements[0]);
}
}.func);
}
test "test parsing builtin expression" {
try parseAndExpect("@print(1, 2, 3)", struct {
pub fn func(program: *Program) anyerror!void {
const expected = ast.createBuiltinStatement("print", &.{
Expression{ .number = 1.0 },
Expression{ .number = 2.0 },
Expression{ .number = 3.0 },
}, false);
const statements = try program.statements.toOwnedSlice();
try std.testing.expectEqualDeep(expected, statements[0]);
}
}.func);
}
test "test trailing comma" {
try parseAndExpect("@print(1, 2, 3, )", struct {
pub fn func(program: *Program) anyerror!void {
const expected = ast.createBuiltinStatement("print", &.{
Expression{ .number = 1.0 },
Expression{ .number = 2.0 },
Expression{ .number = 3.0 },
}, false);
const statements = try program.statements.toOwnedSlice();
try std.testing.expectEqualDeep(expected, statements[0]);
}
}.func);
}
test "test assignment types" {
try parseAndExpect("value = 1;", struct {
pub fn func(program: *Program) anyerror!void {
const expected = ast.createAssignStatement(
.{ .identifier = "value" },
.assignment,
Expression{ .number = 1.0 },
);
const statements = try program.statements.toOwnedSlice();
try std.testing.expectEqualDeep(expected, statements[0]);
}
}.func);
try parseAndExpect("value += 1;", struct {
pub fn func(program: *Program) anyerror!void {
const expected = ast.createAssignStatement(
.{ .identifier = "value" },
.plus_assignment,
Expression{ .number = 1.0 },
);
const statements = try program.statements.toOwnedSlice();
try std.testing.expectEqualDeep(expected, statements[0]);
}
}.func);
try parseAndExpect("value -= 1;", struct {
pub fn func(program: *Program) anyerror!void {
const expected = ast.createAssignStatement(
.{ .identifier = "value" },
.minus_assignment,
Expression{ .number = 1.0 },
);
const statements = try program.statements.toOwnedSlice();
try std.testing.expectEqualDeep(expected, statements[0]);
}
}.func);
try parseAndExpect("value *= 1;", struct {
pub fn func(program: *Program) anyerror!void {
const expected = ast.createAssignStatement(
.{ .identifier = "value" },
.star_assignment,
Expression{ .number = 1.0 },
);
const statements = try program.statements.toOwnedSlice();
try std.testing.expectEqualDeep(expected, statements[0]);
}
}.func);
try parseAndExpect("value /= 1;", struct {
pub fn func(program: *Program) anyerror!void {
const expected = ast.createAssignStatement(
.{ .identifier = "value" },
.slash_assignment,
Expression{ .number = 1.0 },
);
const statements = try program.statements.toOwnedSlice();
try std.testing.expectEqualDeep(expected, statements[0]);
}
}.func);
try parseAndExpect("value %= 1;", struct {
pub fn func(program: *Program) anyerror!void {
const expected = ast.createAssignStatement(
.{ .identifier = "value" },
.modulo_assignment,
Expression{ .number = 1.0 },
);
const statements = try program.statements.toOwnedSlice();
try std.testing.expectEqualDeep(expected, statements[0]);
}
}.func);
}
test "test parsing simple if expression" {
try parseAndExpect("if (x < y) x else y", struct {
pub fn func(program: *Program) anyerror!void {
var if_condition_lhs = Expression{ .identifier = "x" };
var if_condition_rhs = Expression{ .identifier = "y" };
var if_condition = Expression{ .binary = .{
.lhs = &if_condition_lhs,
.operator = .less_than,
.rhs = &if_condition_rhs,
} };
var x_identifier = Expression{ .identifier = "x" };
var y_identifier = Expression{ .identifier = "y" };
const expected = ast.createIfStatement(
&[_]ast.IfExpression.ConditionData{.{ .condition = &if_condition, .body = .{ .expression = &x_identifier } }},
.{ .expression = &y_identifier },
false,
);
const statements = try program.statements.toOwnedSlice();
try std.testing.expectEqualDeep(expected, statements[0]);
}
}.func);
}
test "test parsing simple while expression" {
try parseAndExpect("while (x < y) { doSomething(); }", struct {
pub fn func(program: *Program) anyerror!void {
var while_condition_lhs = Expression{ .identifier = "x" };
var while_condition_rhs = Expression{ .identifier = "y" };
var while_condition = Expression{ .binary = .{
.lhs = &while_condition_lhs,
.operator = .less_than,
.rhs = &while_condition_rhs,
} };
var block = ast.createBlockStatement(&[_]ast.Statement{
ast.createCallStatement("doSomething", &.{}, true),
});
const expected = ast.createWhileStatement(
&while_condition,
&block,
null,
false,
);
const statements = try program.statements.toOwnedSlice();
try std.testing.expectEqualDeep(expected, statements[0]);
}
}.func);
}
test "test parsing simple for expression" {
try parseAndExpect("for (0..10) |i| { doSomething(); }", struct {
pub fn func(program: *Program) anyerror!void {
var for_start = Expression{ .number = 0 };
var for_end = Expression{ .number = 10 };
var for_range = Expression{ .range = .{
.start = &for_start,
.end = &for_end,
.inclusive = false,
} };
var block = ast.createBlockStatement(&[_]ast.Statement{
ast.createCallStatement("doSomething", &.{}, true),
});
const capture_i = ast.Expression{ .identifier = "i" };
const expected = ast.createForStatement(
&for_range,
&.{capture_i},
&block,
false,
);
const statements = try program.statements.toOwnedSlice();
try std.testing.expectEqualDeep(expected, statements[0]);
}
}.func);
}
test "test parsing simple list expression" {
try parseAndExpect("[\"a\", 2, 3.5, true]", struct {
pub fn func(program: *Program) anyerror!void {
const a_expr = ast.Expression{ .string = "a" };
const two_expr = ast.Expression{ .number = 2 };
const three_float_expr = ast.Expression{ .number = 3.5 };
const true_expr = ast.Expression{ .boolean = true };
const list = ast.Expression{ .list = .{ .expressions = &.{
a_expr,
two_expr,
three_float_expr,
true_expr,
} } };
const expected = ast.createExpressionStatement(list, false);
const statements = try program.statements.toOwnedSlice();
try std.testing.expectEqualDeep(expected, statements[0]);
}
}.func);
}
test "test parsing simple dict expression" {
try parseAndExpect("{ a: 1, b: \"test\", \"c\": false }", struct {
pub fn func(program: *Program) anyerror!void {
const a_key = ast.Expression{ .identifier = "a" };
const b_key = ast.Expression{ .identifier = "b" };
const c_key = ast.Expression{ .string = "c" };
const keys = [_]ast.Expression{ a_key, b_key, c_key };
const a_expr = ast.Expression{ .number = 1.0 };
const b_expr = ast.Expression{ .string = "test" };
const c_expr = ast.Expression{ .boolean = false };
const values = [_]ast.Expression{ a_expr, b_expr, c_expr };
const dict = ast.Expression{ .dict = .{ .keys = &keys, .values = &values } };
const expected = ast.createExpressionStatement(dict, false);
const statements = try program.statements.toOwnedSlice();
try std.testing.expectEqualDeep(expected, statements[0]);
}
}.func);
}
test "test parsing empty dict expression" {
try parseAndExpect("dict = {};", struct {
pub fn func(program: *Program) anyerror!void {
const dict = ast.Expression{ .dict = .{
.keys = &.{},
.values = &.{},
} };
const statements = try program.statements.toOwnedSlice();
try std.testing.expectEqualDeep(dict, statements[0].assignment.rhs);
}
}.func);
}
test "test parsing simple indexing of list expression" {
try parseAndExpect("list[1]", struct {
pub fn func(program: *Program) anyerror!void {
var list_expr = ast.Expression{ .identifier = "list" };
var index_expr = ast.Expression{ .number = 1 };
const expected = ast.createIndexStatement(&list_expr, &index_expr, false);
const statements = try program.statements.toOwnedSlice();
try std.testing.expectEqualDeep(expected, statements[0]);
}
}.func);
}
test "test parsing simple indexing of dict expression" {
try parseAndExpect("dict[\"key\"]", struct {
pub fn func(program: *Program) anyerror!void {
var list_expr = ast.Expression{ .identifier = "dict" };
var index_expr = ast.Expression{ .string = "key" };
const expected = ast.createIndexStatement(&list_expr, &index_expr, false);
const statements = try program.statements.toOwnedSlice();
try std.testing.expectEqualDeep(expected, statements[0]);
}
}.func);
}
test "test parsing simple member indexing of dict expression" {
try parseAndExpect("dict.key", struct {
pub fn func(program: *Program) anyerror!void {
var list_expr = ast.Expression{ .identifier = "dict" };
const expected = ast.createMemberStatement(&list_expr, "key", false);
const statements = try program.statements.toOwnedSlice();
try std.testing.expectEqualDeep(expected, statements[0]);
}
}.func);
}
test "test parsing nested member indexing of dict expression" {
try parseAndExpect("a.b.c", struct {
pub fn func(program: *Program) anyerror!void {
var a_expr = ast.Expression{ .identifier = "a" };
var b_expr = ast.Expression{ .member = .{ .lhs = &a_expr, .member = "b" } };
const expected = ast.createMemberStatement(&b_expr, "c", false);
const statements = try program.statements.toOwnedSlice();
try std.testing.expectEqualDeep(expected, statements[0]);
}
}.func);
}
test "test span finding" {
const honey = @import("../honey.zig");
const source =
\\const a = 1;
\\const b = true;
\\const c = "false";
\\const d = null;
;
const ally = std.testing.allocator;
const data = try honey.tokenize(source, ally);
var parser = init(data, .{
.ally = ally,
.error_writer = std.io.getStdErr().writer().any(),
});
defer parser.deinit();
const true_token_data = data.tokens.items[8];
try std.testing.expectEqual(.true, true_token_data.token.tag());
const found_line_data = parser.findLine(true_token_data);
try std.testing.expect(found_line_data != null);
try std.testing.expectEqualDeep(utils.Span{ .start = 13, .end = 28 }, found_line_data.?);
}
|
0 | repos/honey/src | repos/honey/src/parser/ast.zig | const std = @import("std");
const Token = @import("../lexer/token.zig").Token;
const TokenData = @import("../lexer/token.zig").TokenData;
pub const Operator = enum {
/// `plus` is the `+` operator. It adds two numbers together.
plus,
/// `minus` is the `-` operator. It subtracts two numbers.
minus,
/// `star` is the `*` operator. It multiplies two numbers.
star,
/// `slash` is the `/` operator. It divides two numbers.
slash,
/// `modulo` is the `%` operator. It gets the remainder of two numbers.
modulo,
/// `doublestar` is the `**` operator. It raises a number to the power of another number.
doublestar,
/// `or` is the `or` operator.
/// If either the first or second operand is true, the result is true.
@"or",
/// `and` is the `and` operator.
/// If both the first and second operand are true, the result is true.
@"and",
/// `equal` is the `==` operator. It checks if two values are equal.
equal,
/// `not_equal` is the `!=` operator. It checks if two values are not equal.
not_equal,
/// `greater_than` is the `>` operator. It checks if the first value is greater than the second value.
greater_than,
/// `greater_than_equal` is the `>=` operator. It checks if the first value is greater than or equal to the second value.
greater_than_equal,
/// `less_than` is the `<` operator. It checks if the first value is less than the second value.
less_than,
/// `less_than_equal` is the `<=` operator. It checks if the first value is less than or equal to the second value.
less_than_equal,
/// `not` is the `!` operator. It negates a boolean value.
not,
pub fn fromTokenData(data: TokenData) !Operator {
return switch (data.token) {
.plus => .plus,
.minus => .minus,
.star => .star,
.slash => .slash,
.modulo => .modulo,
.doublestar => .doublestar,
.@"or" => .@"or",
.@"and" => .@"and",
.equal => .equal,
.not_equal => .not_equal,
.greater_than => .greater_than,
.greater_than_equal => .greater_than_equal,
.less_than => .less_than,
.less_than_equal => .less_than_equal,
.bang => .not,
else => error.InvalidOperator,
};
}
pub fn format(self: Operator, _: []const u8, _: std.fmt.FormatOptions, writer: anytype) !void {
switch (self) {
.plus => try writer.writeAll("+"),
.minus => try writer.writeAll("-"),
.star => try writer.writeAll("*"),
.slash => try writer.writeAll("/"),
.modulo => try writer.writeAll("%"),
.doublestar => try writer.writeAll("**"),
.@"or" => try writer.writeAll("or"),
.@"and" => try writer.writeAll("and"),
.equal => try writer.writeAll("=="),
.not_equal => try writer.writeAll("!="),
.greater_than => try writer.writeAll(">"),
.greater_than_equal => try writer.writeAll(">="),
.less_than => try writer.writeAll("<"),
.less_than_equal => try writer.writeAll("<="),
.not => try writer.writeAll("!"),
}
}
};
pub const Program = struct {
statements: std.ArrayList(Statement),
pub fn init(allocator: std.mem.Allocator) Program {
return .{ .statements = std.ArrayList(Statement).init(allocator) };
}
pub fn deinit(self: *Program) void {
self.statements.deinit();
}
pub fn add(self: *Program, statement: Statement) !void {
try self.statements.append(statement);
}
};
pub const Statement = union(enum) {
expression: ExpressionStatement,
variable: VariableStatement,
assignment: AssignmentStatement,
@"fn": FunctionDeclaration,
block: BlockStatement,
@"return": ReturnStatement,
@"break": void,
@"continue": void,
pub fn format(self: Statement, _: []const u8, _: std.fmt.FormatOptions, writer: anytype) !void {
return switch (self) {
.@"break", .@"continue" => try writer.print("{s};", .{@tagName(self)}),
inline else => |inner| writer.print("{s}", .{inner}),
};
}
};
pub const ExpressionStatement = struct {
expression: Expression,
terminated: bool,
pub fn format(self: ExpressionStatement, _: []const u8, _: std.fmt.FormatOptions, writer: anytype) !void {
return writer.print("{s}{s}", .{ self.expression, if (self.terminated) ";" else "" });
}
};
pub const VariableStatement = struct {
kind: Token,
name: []const u8,
type: ?[]const u8 = null,
expression: Expression,
pub fn isConst(self: VariableStatement) bool {
return self.kind == .@"const";
}
pub fn hasType(self: VariableStatement) bool {
return self.type != null;
}
pub fn format(self: VariableStatement, _: []const u8, _: std.fmt.FormatOptions, writer: anytype) !void {
return writer.print("{s} {s}{s}{s} = {s};", .{
if (self.kind == .let) "let" else "const",
self.name,
if (self.type != null) ": " else "",
if (self.type) |type_name| type_name else "",
self.expression,
});
}
};
pub const AssignmentStatement = struct {
lhs: Expression,
type: Token,
rhs: Expression,
pub fn format(self: AssignmentStatement, _: []const u8, _: std.fmt.FormatOptions, writer: anytype) !void {
return writer.print("{s} {s} {s};", .{ self.lhs, self.type, self.rhs });
}
/// Returns true if the assignment is a simple assignment.
pub fn isSimple(self: AssignmentStatement) bool {
return self.type == .assignment;
}
};
pub const FunctionDeclaration = struct {
name: []const u8,
parameters: []const Expression,
body: BlockStatement,
pub fn format(self: FunctionDeclaration, _: []const u8, _: std.fmt.FormatOptions, writer: anytype) !void {
try writer.print("fn {s}(", .{self.name});
for (self.parameters, 0..) |parameter, index| {
try writer.print("{s}", .{parameter});
if (index + 1 < self.parameters.len) {
try writer.writeAll(", ");
}
}
try writer.writeAll(") ");
try writer.print("{s}", .{self.body});
}
};
pub const BlockStatement = struct {
statements: []const Statement,
pub fn format(self: BlockStatement, _: []const u8, _: std.fmt.FormatOptions, writer: anytype) !void {
try writer.writeAll("{\n");
for (self.statements) |statement| {
try writer.print("{s}\n", .{statement});
}
try writer.writeAll("}\n");
}
};
pub const ReturnStatement = struct {
expression: ?Expression,
pub fn format(self: ReturnStatement, _: []const u8, _: std.fmt.FormatOptions, writer: anytype) !void {
if (self.expression) |expr| {
try writer.print("return {s};", .{expr});
} else {
try writer.writeAll("return;");
}
}
};
/// A prefix expression is an expression that has one operand.
/// For example, `-1` is a prefix expression.
pub const PrefixExpression = struct {
operator: Operator,
rhs: *Expression,
};
/// A binary expression is an expression that has two operands.
/// For example, `1 + 2` is a binary expression.
pub const BinaryExpression = struct {
lhs: *Expression,
operator: Operator,
rhs: *Expression,
};
/// An if expression is a conditional expression.
/// For example, `if (true) 1 else 2` is an if expression.
/// If expressions can have multiple conditions, such as `if (true) 1 else if (false) 2 else 3`.
/// They can be blocks or expresssions, such as `if (true) { return 1; } else { return 2; }` or `if (true) 1 else 2`.
pub const IfExpression = struct {
pub const Body = union(enum) {
block: BlockStatement,
expression: *Expression,
pub fn format(self: Body, _: []const u8, _: std.fmt.FormatOptions, writer: anytype) !void {
return switch (self) {
inline else => |inner| writer.print("{s}", .{inner}),
};
}
};
pub const ConditionData = struct { condition: *Expression, body: Body };
condition_list: []const ConditionData,
alternative: ?Body,
};
/// A while expression is a loop expression.
/// For example, `while (true) { doSomething(); }` is a while expression.
/// While expressions can also contain a post-statement that is executed after the loop body is executed.
/// For example, `while (true): (i += 1) { doSomething(); }` is a while expression with a post-statement.
pub const WhileExpression = struct {
condition: *Expression,
body: *Statement,
post_stmt: ?*Statement,
};
/// A range expression is an expression that represents a range of values.
/// Exclusive: for(0..10) |i| {}
/// Inclusive: for(0...10) |i| {}
pub const RangeExpression = struct {
start: *Expression,
end: *Expression,
inclusive: bool,
};
/// A list expression is an expression that represents a list of values.
/// For example, `["a", 2, true, var_name, null]
pub const ListExpression = struct {
expressions: []const Expression,
};
/// A dictionary expression is an expression that represents a dictionary of key-value pairs.
/// For example, `{"a": 1, "b": 2, "c": 3}`
pub const DictExpression = struct {
keys: []const Expression,
values: []const Expression,
};
/// An index expression is a list access operation that takes an expression and an index
pub const IndexExpression = struct {
lhs: *Expression,
index: *Expression,
};
/// A member expression is an expression that accesses a member of a class or dictionary.
/// For example, `foo.bar` is a member expression.
pub const MemberExpression = struct {
lhs: *Expression,
member: []const u8,
};
/// A for expression is a loop expression that iterates over a range of values or a collection.
/// For example, `for(0..10) |i| { doSomething(i); }` is a for expression.
pub const ForExpression = struct {
expr: *Expression,
captures: []const Expression,
body: *Statement,
};
/// Builtins are functions that are built into the language.
/// They are not user-defined and are used to provide basic functionality.
/// For example, `@print("Hello, world!")` is a builtin statement.
pub const BuiltinExpression = struct {
name: []const u8,
arguments: []const Expression,
};
/// A function call expression is a call to a function.
/// For example, `foo(1, 2, 3)` is a function call expression.
pub const FunctionCallExpression = struct {
name: []const u8,
arguments: []const Expression,
};
/// A callback expression is a function that is defined inline.
/// For example, `fn (a, b) { return a + b; }` is a callback expression.
pub const CallbackExpression = struct {
name: []const u8,
parameters: []const Expression,
body: BlockStatement,
};
pub const Expression = union(enum) {
/// A number literal, such as `1`, `2.5`, or `3.14159`.
number: f64,
/// An identifier, such as `foo`, `bar`, or `baz`.
identifier: []const u8,
/// A string literal, such as `"Hello, world!"`.
string: []const u8,
/// A boolean literal, either `true` or `false`.
boolean: bool,
/// A null literal
null: void,
/// A prefix expression, such as `-1`, `!true`, or `~0`.
prefix: PrefixExpression,
/// A binary expression, such as `1 + 2`, `3 * 4`, or `5 / 6`.
binary: BinaryExpression,
/// A range expression, such as `0..10` or `0...10`.
range: RangeExpression,
/// A list expression, such as `[1, 2, 3]` or `["a", 2, "c"]
list: ListExpression,
/// A dictionary expression, such as `{"a": 1, "b": 2, "c": 3}`.
dict: DictExpression,
/// An index expression, such as `list[0]` or `[0, 1, 2, 3][2]
index: IndexExpression,
/// A member expression, such as `foo.bar` or `baz.qux`.
member: MemberExpression,
/// An if expression, such as `if (true) { 1 } else { 2 }`.
/// TODO: Rename back to @"if" when ZLS fixes the bug with @"" identifiers.
if_expr: IfExpression,
/// A while expression, such as `while (true) { doSomething(); }`.
while_expr: WhileExpression,
/// A for expression, such as `for(0..10) |i| { doSomething(i); }`.
for_expr: ForExpression,
/// A builtin expression, such as `@print("Hello, world!")`.
builtin: BuiltinExpression,
/// A function call expression, such as `foo(1, 2, 3)`.
call: FunctionCallExpression,
/// A callback expression, such as `fn (a, b) { return a + b; }`.
callback: CallbackExpression,
/// A reference to a function, such as `foo` or `bar`. Written as `foo(...)` or `bar(...)`.
fn_ref: []const u8,
/// Returns true if the expression can be on the LHS of an assignment.
pub fn canAssign(self: Expression) bool {
return self == .identifier or self == .index or self == .member;
}
pub fn format(self: Expression, _: []const u8, _: std.fmt.FormatOptions, writer: anytype) !void {
return switch (self) {
.number => |inner| writer.print("{d}", .{inner}),
.identifier => |inner| writer.print("{s}", .{inner}),
.string => |inner| writer.print("\"{s}\"", .{inner}),
.boolean => |inner| writer.writeAll(if (inner) "true" else "false"),
.null => writer.writeAll("null"),
.prefix => |inner| writer.print("({s}{s})", .{ inner.operator, inner.rhs }),
.binary => |inner| writer.print("({s} {s} {s})", .{ inner.lhs, inner.operator, inner.rhs }),
.range => |inner| writer.print("{s}..{s}{s}", .{ inner.start, if (inner.inclusive) "." else "", inner.end }),
.list => |inner| {
try writer.writeAll("[");
for (inner.expressions, 0..) |expr, index| {
try writer.print("{s}", .{expr});
if (index + 1 < inner.expressions.len) {
try writer.writeAll(", ");
}
}
try writer.writeAll("]");
},
.dict => |inner| {
try writer.writeAll("{");
for (inner.keys, inner.values, 0..) |key, value, index| {
try writer.print("{s}: {s}", .{ key, value });
if (index + 1 < inner.keys.len) {
try writer.writeAll(", ");
}
}
try writer.writeAll("}");
},
.index => |inner| {
try writer.print("{s}[{s}]", .{ inner.lhs, inner.index });
},
.member => |inner| {
try writer.print("{s}.{s}", .{ inner.lhs, inner.member });
},
.if_expr => |inner| {
try writer.writeAll("if (");
for (inner.condition_list, 0..) |condition, index| {
try writer.print("{s}) {s}", .{ condition.condition, condition.body });
if (index + 1 < inner.condition_list.len) {
try writer.writeAll(" else if ");
}
}
if (inner.alternative) |alternative| {
try writer.print(" else {s}", .{alternative});
}
},
.while_expr => |inner| writer.print("while ({s}) {s}", .{ inner.condition, inner.body }),
.for_expr => |inner| writer.print("for ({s}) {s}", .{ inner.expr, inner.body }),
.builtin => |inner| {
try writer.print("@{s}(", .{inner.name});
for (inner.arguments, 0..) |argument, index| {
try writer.print("{s}", .{argument});
if (index + 1 < inner.arguments.len) {
try writer.writeAll(", ");
}
}
try writer.writeAll(")");
},
.call => |inner| {
try writer.print("{s}(", .{inner.name});
for (inner.arguments, 0..) |argument, index| {
try writer.print("{s}", .{argument});
if (index + 1 < inner.arguments.len) {
try writer.writeAll(", ");
}
}
try writer.writeAll(")");
},
.callback => |inner| {
try writer.writeAll("fn (");
for (inner.parameters, 0..) |parameter, index| {
try writer.print("{s}", .{parameter});
if (index + 1 < inner.parameters.len) {
try writer.writeAll(", ");
}
}
try writer.print(") {s}", .{inner.body});
},
.fn_ref => |inner| writer.print("{s}(...)", .{inner}),
};
}
};
pub fn createExpressionStatement(expression: Expression, terminated: bool) Statement {
return .{ .expression = .{ .expression = expression, .terminated = terminated } };
}
pub fn createPrefixStatement(operator: Operator, rhs: *Expression, terminated: bool) Statement {
return .{ .expression = .{ .expression = .{ .prefix = .{ .operator = operator, .rhs = rhs } }, .terminated = terminated } };
}
pub fn createBuiltinStatement(name: []const u8, arguments: []const Expression, terminated: bool) Statement {
return .{ .expression = .{ .expression = .{ .builtin = .{ .name = name, .arguments = arguments } }, .terminated = terminated } };
}
pub fn createBinaryStatement(lhs: *Expression, operator: Operator, rhs: *Expression, terminated: bool) Statement {
return .{ .expression = .{ .expression = .{ .binary = .{ .lhs = lhs, .operator = operator, .rhs = rhs } }, .terminated = terminated } };
}
pub fn createIfStatement(condition_list: []const IfExpression.ConditionData, alternative: ?IfExpression.Body, terminated: bool) Statement {
return .{ .expression = .{ .expression = .{ .if_expr = .{ .condition_list = condition_list, .alternative = alternative } }, .terminated = terminated } };
}
pub fn createWhileStatement(condition: *Expression, body: *Statement, post_stmt: ?*Statement, terminated: bool) Statement {
return .{ .expression = .{ .expression = .{ .while_expr = .{ .condition = condition, .body = body, .post_stmt = post_stmt } }, .terminated = terminated } };
}
pub fn createForStatement(expr: *Expression, captures: []const Expression, body: *Statement, terminated: bool) Statement {
return .{ .expression = .{ .expression = .{ .for_expr = .{ .expr = expr, .captures = captures, .body = body } }, .terminated = terminated } };
}
pub fn createIndexStatement(expr: *Expression, index_expr: *Expression, terminated: bool) Statement {
return .{ .expression = .{ .expression = .{ .index = .{ .lhs = expr, .index = index_expr } }, .terminated = terminated } };
}
pub fn createMemberStatement(expr: *Expression, member: []const u8, terminated: bool) Statement {
return .{ .expression = .{ .expression = .{ .member = .{ .lhs = expr, .member = member } }, .terminated = terminated } };
}
pub fn createCallStatement(name: []const u8, arguments: []const Expression, terminated: bool) Statement {
return .{ .expression = .{ .expression = .{ .call = .{ .name = name, .arguments = arguments } }, .terminated = terminated } };
}
pub fn createCallbackStatement(name: []const u8, parameters: []const Expression, body: BlockStatement, terminated: bool) Statement {
return .{ .expression = .{ .expression = .{ .callback = .{ .name = name, .parameters = parameters, .body = body } }, .terminated = terminated } };
}
pub fn createAssignStatement(lhs: Expression, @"type": Token, rhs: Expression) Statement {
return .{ .assignment = .{ .lhs = lhs, .type = @"type", .rhs = rhs } };
}
pub fn createVariableStatement(kind: Token, name: []const u8, @"type": ?[]const u8, expression: Expression) Statement {
return .{ .variable = .{ .kind = kind, .name = name, .type = @"type", .expression = expression } };
}
pub fn createFunctionStatement(name: []const u8, parameters: []const Expression, body: BlockStatement) Statement {
return .{ .@"fn" = .{ .name = name, .parameters = parameters, .body = body } };
}
pub fn createReturnStatement(expression: ?Expression) Statement {
return .{ .@"return" = .{ .expression = expression } };
}
pub fn createBlockStatement(statements: []const Statement) Statement {
return .{ .block = .{ .statements = statements } };
}
|
0 | repos/honey/src | repos/honey/src/lexer/Lexer.zig | const std = @import("std");
const utils = @import("../utils/utils.zig");
const Token = @import("token.zig").Token;
const TokenData = @import("token.zig").TokenData;
/// The character used to denote a builtin function
const BuiltinChar = '@';
/// A map of keywords to their respective tokens
const KeywordMap = std.StaticStringMap(Token).initComptime(.{
.{ "let", .let },
.{ "const", .@"const" },
.{ "fn", .@"fn" },
.{ "return", .@"return" },
.{ "if", .@"if" },
.{ "else", .@"else" },
.{ "while", .@"while" },
.{ "for", .@"for" },
.{ "break", .@"break" },
.{ "continue", .@"continue" },
.{ "true", .true },
.{ "false", .false },
.{ "null", .null },
.{ "or", .@"or" },
.{ "and", .@"and" },
});
pub const Data = struct {
pub const Error = std.mem.Allocator.Error;
/// The default source name to use when none is provided
/// This happens primarily due to direct input or the playground
const DefaultSourceName = "vm";
source_name: []const u8,
source: []const u8,
tokens: std.ArrayList(TokenData),
line_data: std.ArrayList(utils.Span),
pub fn init(ally: std.mem.Allocator, source: []const u8, source_name: ?[]const u8) Data {
return .{
.source = source,
.source_name = if (source_name) |name| name else DefaultSourceName,
.tokens = std.ArrayList(TokenData).init(ally),
.line_data = std.ArrayList(utils.Span).init(ally),
};
}
pub fn deinit(self: *Data) void {
self.tokens.deinit();
self.line_data.deinit();
}
pub fn addToken(self: *Data, token: TokenData) Error!void {
try self.tokens.append(token);
}
pub fn addLineData(self: *Data, datum: utils.Span) Error!void {
try self.line_data.append(datum);
}
/// Returns a slice of the source based on the line number provided
pub fn getLineByNum(self: *Data, line_no: usize) ?[]const u8 {
const line_index = line_no - 1;
// line index exceeds bounds. we *should* error here but a null is fine for now
if (line_index >= self.line_data.items.len) return null;
const line_data = self.line_data.items[line_index];
return self.source[line_data.start..line_data.end];
}
/// Returns a slice of the source based on the line data provided
pub fn getLineBySpan(self: *Data, line_data: utils.Span) []const u8 {
// todo: we should probably do error handling
return self.source[line_data.start..line_data.end];
}
};
const Self = @This();
const NewLineSeparator = '\n';
/// The allocator used to allocate the data from the lexer
ally: std.mem.Allocator,
/// The data accumulated from the lexer
data: Data,
/// The current position of the lexer
cursor: utils.Cursor(u8),
/// Where the current starting byte offset is
start_byte_offset: usize = 0,
pub fn init(input: []const u8, ally: std.mem.Allocator, source_name: ?[]const u8) Self {
return .{
.ally = ally,
.cursor = utils.Cursor(u8).init(input),
.data = Data.init(ally, input, source_name),
};
}
pub fn deinit(self: *Self) void {
self.data.deinit();
}
/// Reads as many tokens as possible from the current position
pub fn readAll(self: *Self) Data.Error!Data {
while (try self.read()) |token| {
try self.data.addToken(token);
}
return self.data;
}
/// Reads a single token from the current position or null if no token could be read
pub fn read(self: *Self) Data.Error!?TokenData {
try self.skipWhitespace();
if (!self.cursor.canRead()) {
return null;
}
if (self.readComment()) |token| {
return token;
}
if (self.readChar()) |token| {
return token;
}
return switch (self.cursor.current()) {
'0'...'9' => self.readNumberlike(),
'a'...'z', 'A'...'Z', '_' => self.readIdentifier(),
'"' => self.readString(),
BuiltinChar => self.readBuiltin(),
else => |char| blk: {
defer self.cursor.advance();
break :blk TokenData.create(.{ .invalid = char }, self.cursor.getCurrentPos(), self.cursor.getCurrentPos());
},
};
}
/// Returns true if the char is whitespace and
fn isNonNewLineWhitespace(char: u8) bool {
return std.ascii.isWhitespace(char) and char != NewLineSeparator;
}
/// Skips all whitespace from the current position
fn skipWhitespace(self: *Self) std.mem.Allocator.Error!void {
// i'd love to get rid of this (potential) infinite loop
// at the moment, it's here so that we can ensure we can
// add the last span to the list before we exit the loop
while (true) : (self.cursor.advance()) {
// if we encounter the end of the stream, add the last span and break
if (!self.cursor.canRead()) {
try self.createLineData();
break;
}
const current = self.cursor.current();
// break early if we encounter non-whitespace
if (!std.ascii.isWhitespace(current)) {
break;
}
// if we a new line, add a span to the list and advance the cursor
if (current == NewLineSeparator) {
try self.createLineData();
}
}
}
/// Creates a span from the Lexer's current `start_byte_offset` and the cursor's current index
/// Has the side effect of updating `start_byte_offset` to the next cursor index
fn createLineData(self: *Self) std.mem.Allocator.Error!void {
try self.data.addLineData(.{ .start = self.start_byte_offset, .end = self.cursor.index });
self.start_byte_offset = self.cursor.index + 1;
}
// Reads tokens from a map of characters to tokens or a fallback if no match was found
const TokenStringEntry = struct { []const u8, Token };
/// Attempts to read a token from a map of characters to tokens or a fallback if no match was found
/// This function will advance the cursor by the length of the matched string if a match is found
inline fn readStringMap(self: *Self, comptime map: []const TokenStringEntry, fallback: Token) Token {
// extremely ugly but we create a slice from the map and dereference it to get an array of entries to sort
comptime var sorted = map[0..].*;
// we sort the map by the length of the string in the entry
comptime std.mem.sort(TokenStringEntry, &sorted, {}, struct {
fn cmp(_: void, a: TokenStringEntry, b: TokenStringEntry) bool {
return a.@"0".len > b.@"0".len;
}
}.cmp);
inline for (sorted) |entry| {
const key, const value = entry;
const peeked = self.cursor.peekSliceOrNull(key.len);
if (peeked) |slice| {
if (std.mem.eql(u8, key, slice)) {
defer self.cursor.advanceAmount(key.len - 1);
return value;
}
}
}
return fallback;
}
/// Attempts to read a comment from the current position or null if no comment was found
fn readComment(self: *Self) ?TokenData {
if (self.cursor.current() != '/' or self.cursor.peek() != '/') {
return null;
}
const data, const position = self.cursor.readUntil(struct {
fn check(char: u8) bool {
return char == NewLineSeparator;
}
}.check);
return TokenData.create(.{ .comment = std.mem.trim(u8, data, "/") }, position.start, position.end);
}
/// Attempts to read a single/double character token from the current position or null if no token was found
fn readChar(self: *Self) ?TokenData {
const start = self.cursor.getCurrentPos();
const data: Token = switch (self.cursor.current()) {
'+' => self.readStringMap(&.{.{ "+=", .plus_assignment }}, .plus),
'-' => self.readStringMap(&.{.{ "-=", .minus_assignment }}, .minus),
'*' => self.readStringMap(&.{
.{ "**=", .doublestar_assignment },
.{ "**", .doublestar },
.{ "*=", .star_assignment },
}, .star),
// we do not need to worry about comments here because we parse them before we get to this point
'/' => self.readStringMap(&.{.{ "/=", .slash_assignment }}, .slash),
'%' => self.readStringMap(&.{.{ "%=", .modulo_assignment }}, .modulo),
'=' => self.readStringMap(&.{.{ "==", .equal }}, .assignment),
'!' => self.readStringMap(&.{.{ "!=", .not_equal }}, .bang),
'>' => self.readStringMap(&.{.{ ">=", .greater_than_equal }}, .greater_than),
'<' => self.readStringMap(&.{.{ "<=", .less_than_equal }}, .less_than),
'.' => self.readStringMap(&.{
.{ "...", .inclusive_range },
.{ "..", .exclusive_range },
}, .dot),
'(' => .left_paren,
')' => .right_paren,
'[' => .left_bracket,
']' => .right_bracket,
'{' => .left_brace,
'}' => .right_brace,
',' => .comma,
';' => .semicolon,
':' => .colon,
'|' => .pipe,
// if we don't have a match, we return null from the function
else => return null,
};
defer self.cursor.advance();
return TokenData.create(data, start, self.cursor.getCurrentPos());
}
/// Reads a string literal from the current position
fn readString(self: *Self) TokenData {
const start = self.cursor.getCurrentPos();
var escaped = false;
var seen: u2 = 0;
while (self.cursor.readAndAdvance()) |char| {
// don't do anything if we're in an escape sequence
if (escaped) {
escaped = false;
continue;
}
switch (char) {
'\\' => escaped = true,
'"' => {
seen += 1;
if (seen == 2) {
break;
}
},
else => {},
}
}
const end = self.cursor.getCurrentPos();
return TokenData.create(.{ .string = std.mem.trim(u8, self.cursor.input[start..end], "\"") }, start, end);
}
/// Reads a number-like token from the current position
fn readNumberlike(self: *Self) ?TokenData {
const start = self.cursor.getCurrentPos();
while (self.cursor.canRead()) : (self.cursor.advance()) {
switch (self.cursor.current()) {
// if we encounter a dot, we need to check if it's a decimal point or a range operator
'.' => if (self.cursor.peek() == '.') break,
'0'...'9', '_' => {},
inline else => break,
}
}
const end = self.cursor.getCurrentPos();
return TokenData.create(.{ .number = self.cursor.input[start..end] }, start, end - 1);
}
/// Reads a builtin function from the current position
fn readBuiltin(self: *Self) TokenData {
const start = self.cursor.getCurrentPos();
std.debug.assert(self.cursor.current() == BuiltinChar);
self.cursor.advance();
const data = self.readIdentifier();
return TokenData.create(.{ .builtin = self.cursor.input[start .. data.position.end + 1] }, start, data.position.end);
}
/// Reads an identifier from the current position
fn readIdentifier(self: *Self) TokenData {
const data, const position = self.cursor.readWhile(struct {
fn check(char: u8) bool {
return std.ascii.isDigit(char) or std.ascii.isAlphanumeric(char) or char == '_';
}
}.check);
return TokenData.create(
KeywordMap.get(data) orelse .{ .identifier = data },
position.start,
position.end,
);
}
/// A helper function to test the lexer
fn tokenizeAndExpect(input: []const u8, expected: []const TokenData) anyerror!void {
var lexer = Self.init(input, std.testing.allocator, null);
defer lexer.deinit();
const parsed = try lexer.readAll();
try std.testing.expectEqualDeep(expected, parsed.tokens.items);
}
test "test simple lexer" {
try tokenizeAndExpect("1 + 2 - 3;", &.{
TokenData.create(.{ .number = "1" }, 0, 0),
TokenData.create(.plus, 2, 2),
TokenData.create(.{ .number = "2" }, 4, 4),
TokenData.create(.minus, 6, 6),
TokenData.create(.{ .number = "3" }, 8, 8),
TokenData.create(.semicolon, 9, 9),
});
}
test "test char map lexing" {
try tokenizeAndExpect("2 ** 3", &.{
TokenData.create(.{ .number = "2" }, 0, 0),
TokenData.create(.doublestar, 2, 3),
TokenData.create(.{ .number = "3" }, 5, 5),
});
}
test "test keyword lexing" {
try tokenizeAndExpect("let x = 1", &.{
TokenData.create(.let, 0, 2),
TokenData.create(.{ .identifier = "x" }, 4, 4),
TokenData.create(.assignment, 6, 6),
TokenData.create(.{ .number = "1" }, 8, 8),
});
}
test "test builtin lexing" {
try tokenizeAndExpect("@foo()", &.{
TokenData.create(.{ .builtin = "@foo" }, 0, 3),
TokenData.create(.left_paren, 4, 4),
TokenData.create(.right_paren, 5, 5),
});
}
test "test string lexing" {
try tokenizeAndExpect("\"hello world\"", &.{
TokenData.create(.{ .string = "hello world" }, 0, 13),
});
}
test "test assignment lexing" {
try tokenizeAndExpect("x = 1", &.{
TokenData.create(.{ .identifier = "x" }, 0, 0),
TokenData.create(.assignment, 2, 2),
TokenData.create(.{ .number = "1" }, 4, 4),
});
try tokenizeAndExpect("x += 1", &.{
TokenData.create(.{ .identifier = "x" }, 0, 0),
TokenData.create(.plus_assignment, 2, 3),
TokenData.create(.{ .number = "1" }, 5, 5),
});
try tokenizeAndExpect("x -= 1", &.{
TokenData.create(.{ .identifier = "x" }, 0, 0),
TokenData.create(.minus_assignment, 2, 3),
TokenData.create(.{ .number = "1" }, 5, 5),
});
try tokenizeAndExpect("x *= 1", &.{
TokenData.create(.{ .identifier = "x" }, 0, 0),
TokenData.create(.star_assignment, 2, 3),
TokenData.create(.{ .number = "1" }, 5, 5),
});
try tokenizeAndExpect("x /= 1", &.{
TokenData.create(.{ .identifier = "x" }, 0, 0),
TokenData.create(.slash_assignment, 2, 3),
TokenData.create(.{ .number = "1" }, 5, 5),
});
try tokenizeAndExpect("x %= 1", &.{
TokenData.create(.{ .identifier = "x" }, 0, 0),
TokenData.create(.modulo_assignment, 2, 3),
TokenData.create(.{ .number = "1" }, 5, 5),
});
}
test "test list lexing" {
try tokenizeAndExpect("[1, 2, 33]", &.{
TokenData.create(.left_bracket, 0, 0),
TokenData.create(.{ .number = "1" }, 1, 1),
TokenData.create(.comma, 2, 2),
TokenData.create(.{ .number = "2" }, 4, 4),
TokenData.create(.comma, 5, 5),
TokenData.create(.{ .number = "33" }, 7, 8),
TokenData.create(.right_bracket, 9, 9),
});
}
test "ensure readStringMap sorts by length" {
const ally = std.testing.allocator;
const map = &[_]TokenStringEntry{
.{ "..", .exclusive_range },
.{ "...", .inclusive_range },
};
var lexer_1 = Self.init("...", ally);
defer lexer_1.deinit();
const token_1 = lexer_1.readStringMap(map, .dot);
try std.testing.expectEqual(.inclusive_range, token_1);
var lexer_2 = Self.init("..5", ally);
defer lexer_2.deinit();
const token_2 = lexer_2.readStringMap(map, .dot);
try std.testing.expectEqual(.exclusive_range, token_2);
}
|
0 | repos/honey/src | repos/honey/src/lexer/token.zig | const std = @import("std");
const utils = @import("../utils/utils.zig");
pub const TokenTag = enum {
/// .number represents an unparsed number (e.g. "123")
number,
/// .identifier represents an identifier (e.g. a variable name)
identifier,
/// .string represents a string literal (e.g. "hello world")
string,
/// .builtin represents a builtin function (e.g. @print)
builtin,
/// .comment represents a comment (e.g. // this is a comment)
comment,
/// .let represents the keyword 'let'
let,
/// .const represents the keyword 'const'
@"const",
/// .fn represents the keyword 'fn'
@"fn",
/// .return represents the keyword 'return'
@"return",
/// .if represents the keyword 'if'
@"if",
/// .else represents the keyword 'else'
@"else",
/// .while represents the keyword 'while'
@"while",
/// .for represents the keyword 'for'
@"for",
/// .break represents the keyword 'break'
@"break",
/// .continue represents the keyword 'continue'
@"continue",
/// .true represents the keyword 'true'
true,
/// .false represents the keyword 'false'
false,
/// .null represents the keyword 'null'
null,
/// .or represents the keyword 'or'
@"or",
/// .and represents the keyword 'and'
@"and",
/// .equal represents the characters '=='
equal,
/// .not_equal represents the characters '!='
not_equal,
/// .greater_than represents the character '>'
greater_than,
/// .greater_than_equal represents the characters '>='
greater_than_equal,
/// .less_than represents the character '<'
less_than,
/// .less_than_equal represents the characters '<='
less_than_equal,
/// .bang represents the character '!'
bang,
/// .plus represents the character '+'
plus,
/// .minus represents the character '-'
minus,
/// .star represents the character '*'
star,
/// .slash represents the character '/'
slash,
/// .modulo represents the character '%'
modulo,
/// .doublestar represents the character '**'
doublestar,
/// .semicolon represents the character ';'
semicolon,
/// .colon represents the character ':'
colon,
/// .assignment represents the character '='
assignment,
/// .plus_assignment represents the characters '+='
plus_assignment,
/// .minus_assignment represents the characters '-='
minus_assignment,
/// .star_assignment represents the characters '*='
star_assignment,
/// .slash_assignment represents the characters '/='
slash_assignment,
/// .modulo_assignment represents the characters '%='
modulo_assignment,
/// .doublestar_assignment represents the characters '**='
doublestar_assignment,
/// .comma represents the character ','
comma,
/// .left_paren represents the character '('
left_paren,
/// .right_paren represents the character ')'
right_paren,
/// .left_bracket represents the character '['
left_bracket,
/// .right_bracket represents the character ']'
right_bracket,
/// .left_brace represents the character '{'
left_brace,
/// .right_brace represents the character '}'
right_brace,
/// .dot represents the character '.'
dot,
/// .exclusive_range represents the characters '..'
exclusive_range,
/// .inclusive_range represents the characters '..='
inclusive_range,
/// .pipe represents the character '|'
pipe,
/// .invalid represents an invalid character
invalid,
pub fn name(self: TokenTag) []const u8 {
return switch (self) {
.equal => "==",
.not_equal => "!=",
.greater_than => ">",
.greater_than_equal => ">=",
.less_than => "<",
.less_than_equal => "<=",
.bang => "!",
.plus => "+",
.minus => "-",
.star => "*",
.slash => "/",
.modulo => "%",
.doublestar => "**",
.semicolon => ";",
.colon => ":",
.assignment => "=",
.plus_assignment => "+=",
.minus_assignment => "-=",
.star_assignment => "*=",
.slash_assignment => "/=",
.modulo_assignment => "%=",
.doublestar_assignment => "**=",
.comma => ",",
.left_paren => "(",
.right_paren => ")",
.left_bracket => "[",
.right_bracket => "]",
.left_brace => "{",
.right_brace => "}",
.dot => ".",
.exclusive_range => "..",
.inclusive_range => "...",
.pipe => "|",
inline else => @tagName(self),
};
}
};
pub const Token = union(TokenTag) {
number: []const u8,
identifier: []const u8,
string: []const u8,
builtin: []const u8,
comment: []const u8,
let,
@"const",
@"fn",
@"return",
@"if",
@"else",
@"while",
@"for",
@"break",
@"continue",
true,
false,
null,
@"or",
@"and",
equal,
not_equal,
greater_than,
greater_than_equal,
less_than,
less_than_equal,
bang,
plus,
minus,
star,
slash,
modulo,
doublestar,
semicolon,
colon,
assignment,
plus_assignment,
minus_assignment,
star_assignment,
slash_assignment,
modulo_assignment,
doublestar_assignment,
comma,
left_paren,
right_paren,
left_bracket,
right_bracket,
left_brace,
right_brace,
dot,
exclusive_range,
inclusive_range,
pipe,
invalid: u8,
pub fn tag(self: Token) TokenTag {
return std.meta.activeTag(self);
}
pub fn format(self: Token, _: []const u8, _: std.fmt.FormatOptions, writer: anytype) !void {
return switch (self) {
.number => |value| try writer.print("{s}", .{value}),
.identifier => |value| try writer.print("{s}", .{value}),
.string => |value| try writer.print("\"{s}\"", .{value}),
.builtin => |value| try writer.print("{s}", .{value}),
.comment => |comment| try writer.print("//{s}", .{comment}),
.invalid => |value| try writer.print("'{c}'", .{value}),
inline else => try writer.print("{s}", .{self.tag().name()}),
};
}
pub fn isAssignment(self: Token) bool {
return switch (self) {
.assignment,
.plus_assignment,
.minus_assignment,
.star_assignment,
.slash_assignment,
.modulo_assignment,
.doublestar_assignment,
=> true,
inline else => false,
};
}
};
pub const TokenData = struct {
token: Token,
position: utils.Span,
pub fn create(token: Token, start: usize, end: usize) TokenData {
return .{
.token = token,
.position = .{ .start = start, .end = end },
};
}
pub fn format(self: TokenData, _: []const u8, _: std.fmt.FormatOptions, writer: anytype) !void {
try writer.print("TokenData {{ .token = {s}, .position = {s} }}", .{ self.token, self.position });
}
/// Returns a new `TokenData` with the position offset by `value`
pub fn offset(self: TokenData, value: isize) TokenData {
var cloned = self.position.clone();
_ = cloned.offset(value);
return .{ .token = self.token, .position = cloned };
}
};
|
0 | repos/honey/src | repos/honey/src/utils/utils.zig | const std = @import("std");
pub const bytes = @import("bytes.zig");
pub const cursor = @import("cursor.zig");
pub const Cursor = cursor.Cursor;
pub const Span = cursor.Span;
pub const Diagnostics = @import("Diagnostics.zig");
pub const Repl = @import("Repl.zig");
pub const Stack = @import("stack.zig").Stack;
pub const Store = @import("store.zig").Store;
pub const Terminal = @import("Terminal.zig");
/// Returns a tuple of `N` elements, all of type `T`.
pub fn RepeatedTuple(comptime T: type, comptime N: comptime_int) type {
return std.meta.Tuple(&[_]type{T} ** N);
}
/// Merges all fields of a struct into a single struct.
pub fn mergeTuples(input: anytype) MergeTuples(@TypeOf(input)) {
const T = @TypeOf(input);
var x: MergeTuples(T) = undefined;
comptime var index = 0;
inline for (std.meta.fields(T)) |item| {
const a = @field(input, item.name);
inline for (comptime std.meta.fieldNames(item.type)) |name| {
@field(x, std.fmt.comptimePrint("{d}", .{index})) = @field(a, name);
index += 1;
}
}
return x;
}
fn MergeTuples(comptime T: type) type {
var fields: []const std.builtin.Type.StructField = &.{};
inline for (std.meta.fields(T)) |item| {
inline for (std.meta.fields(item.type)) |f| {
fields = fields ++ &[_]std.builtin.Type.StructField{structField(
std.fmt.comptimePrint("{d}", .{fields.len}),
f.type,
)};
}
}
return Struct(fields);
}
fn structField(comptime name: [:0]const u8, comptime T: type) std.builtin.Type.StructField {
return .{ .name = name, .type = T, .default_value = null, .is_comptime = false, .alignment = @alignOf(T) };
}
fn Struct(comptime fields: []const std.builtin.Type.StructField) type {
return @Type(.{ .Struct = .{ .layout = .auto, .fields = fields, .decls = &.{}, .is_tuple = false } });
}
|
0 | repos/honey/src | repos/honey/src/utils/stack.zig | const std = @import("std");
/// A stack is a data structure that allows you to push and pop values.
/// It is a LIFO (last in, first out) data structure.
pub fn Stack(comptime T: type) type {
return struct {
const Error = error{ OutOfMemory, StackEmpty, OutOfBounds };
const Self = @This();
/// The structure used to store the data in the stack.
data: std.ArrayList(T),
pub fn init(ally: std.mem.Allocator) Self {
return .{ .data = std.ArrayList(T).init(ally) };
}
pub fn deinit(self: *Self) void {
self.data.deinit();
}
pub fn size(self: *Self) usize {
return self.data.items.len;
}
/// Converts the stack index to the actual index in the data structure.
/// The index is reversed because the stack is a LIFO data structure.
inline fn resolveIndex(self: *Self, index: usize) Error!usize {
const actual_index = self.data.items.len - index - 1;
if (actual_index < 0 or actual_index >= self.data.items.len) {
return error.OutOfBounds;
}
return actual_index;
}
pub fn dump(self: *Self) void {
std.debug.print("------------- Stack -------------\n", .{});
if (self.data.items.len == 0) {
std.debug.print("Empty\n", .{});
} else {
for (0..self.data.items.len) |index| {
const resolved = self.resolveIndex(index) catch unreachable;
const item = self.data.items[resolved];
std.debug.print("#{d} - {s}\n", .{ index, item });
}
}
std.debug.print("---------------------------------\n", .{});
}
/// Returns the top value of the stack or an error if the stack is empty.
pub fn peek(self: *Self) Error!T {
if (self.data.items.len == 0) {
return Error.StackEmpty;
}
return self.data.items[self.data.items.len - 1];
}
/// Returns a pointer to the top value of the stack or an error if the stack is empty.
pub fn peekPtr(self: *Self) Error!*T {
if (self.data.items.len == 0) {
return Error.StackEmpty;
}
return &(self.data.items[self.data.items.len - 1]);
}
/// Returns the value at the specified index.
pub fn get(self: *Self, index: usize) Error!T {
return self.data.items[index];
}
/// Returns a pointer to the value at the specified index.
pub fn getPtr(self: *Self, index: usize) Error!*T {
return &(self.data.items[index]);
}
/// Sets the value at the specified index.
pub fn set(self: *Self, index: usize, value: T) Error!void {
if (index >= self.data.items.len) {
return error.OutOfBounds;
}
self.data.items[index] = value;
}
/// Pushes a value onto the stack.
pub fn push(self: *Self, value: T) Error!void {
self.data.append(value) catch return error.OutOfMemory;
}
/// Pops a value off the stack or returns an error if the stack is empty.
pub fn pop(self: *Self) Error!T {
if (self.data.items.len == 0) {
return error.StackEmpty;
}
return self.data.pop();
}
/// Pops and returns the top value of the stack or null if the stack is empty.
pub fn popOrNull(self: *Self) ?T {
return self.data.popOrNull();
}
};
}
|
0 | repos/honey/src | repos/honey/src/utils/cursor.zig | const std = @import("std");
pub const Span = struct {
/// The start of the span
start: usize,
/// The end of the span
end: usize,
pub fn format(self: Span, _: []const u8, _: std.fmt.FormatOptions, writer: anytype) !void {
try writer.print("{{ .start = {d}, .end = {d} }}", .{ self.start, self.end });
}
inline fn add(base: usize, offset_value: isize) usize {
const cast_base: isize = @intCast(base);
return @intCast(@addWithOverflow(cast_base, offset_value).@"0");
}
/// Clones the span
pub fn clone(self: Span) Span {
return .{ .start = self.start, .end = self.end };
}
/// Returns the length of the span
pub fn len(self: Span) usize {
return self.end - self.start;
}
pub fn offset(self: *Span, value: isize) *Span {
self.start += add(self.start, value);
self.end = add(self.end, value);
return self;
}
pub fn offsetStart(self: *Span, value: isize) *Span {
self.start += add(self.start, value);
return self;
}
pub fn offsetEnd(self: *Span, value: isize) *Span {
self.end = add(self.end, value);
return self;
}
pub fn offsetBoth(self: *Span, start_offset: isize, end_offset: isize) *Span {
self.start += add(self.start, start_offset);
self.end = add(self.end, end_offset);
return self;
}
pub fn moveToEnd(self: *Span) *Span {
self.start = self.end;
return self;
}
};
pub fn Cursor(comptime T: type) type {
return struct {
const Self = @This();
const PredFn = *const fn (T) bool;
const ReadResult = struct { []const T, Span };
input: []const T,
index: usize,
pub fn init(input: []const T) Self {
return Self{ .input = input, .index = 0 };
}
/// Returns the current position.
pub fn getCurrentPos(self: *Self) usize {
return self.index;
}
/// Returns the current value.
pub fn current(self: *Self) T {
return self.input[self.index];
}
/// Returns true if the cursor can still read values.
pub fn canRead(self: *Self) bool {
return self.index < self.input.len;
}
/// Advances the cursor by one position.
pub fn advance(self: *Self) void {
self.index += 1;
}
/// Advances the cursor by the given amount.
pub fn advanceAmount(self: *Self, amount: usize) void {
self.index += amount;
}
/// Rewinds the cursor by one position.
pub fn rewind(self: *Self) !void {
if (self.index == 0) return error.UnableToRewind;
self.index -= 1;
}
pub fn previous(self: *Self) ?T {
if (self.index == 0) return null;
return self.input[self.index - 1];
}
/// Reads the current value and advances the cursor by one position.
pub fn readAndAdvance(self: *Self) ?T {
if (self.index >= self.input.len) return null;
defer self.index += 1;
return self.input[self.index];
}
/// Reads values until the predicate returns false.
pub fn readUntil(self: *Self, comptime pred: PredFn) ReadResult {
const start: usize = self.index;
while (self.canRead() and !pred(self.current())) : (self.index += 1) {}
var end = self.index;
// If the last value was not read, rewind the cursor by one position.
if (start != end) end -= 1;
return .{ self.input[start..self.index], .{ .start = start, .end = end } };
}
/// Reads values while the predicate returns true.
pub fn readWhile(self: *Self, comptime pred: PredFn) ReadResult {
const start: usize = self.index;
while (self.canRead() and pred(self.current())) : (self.index += 1) {}
var end = self.index;
// If the last value was not read, rewind the cursor by one position.
if (start != end) end -= 1;
return .{ self.input[start..self.index], .{ .start = start, .end = end } };
}
/// Returns the next value without advancing the cursor or null if the cursor is at the end.
pub fn peek(self: *Self) ?T {
if (self.index + 1 >= self.input.len) return null;
return self.input[self.index + 1];
}
/// Returns the value at the given index or null if the index is out of bounds.
pub fn peekAhead(self: *Self, amount: usize) ?T {
if (self.index + amount >= self.input.len) return null;
return self.input[self.index + amount];
}
/// Returns a slice of the input from the current position to the given amount.
pub fn peekSlice(self: *Self, amount: usize) []const T {
return self.input[self.index..(self.index + amount)];
}
/// Returns a slice of the input from the cursor position to the given amount
/// or null if the index + amount exceeds the bounds
pub fn peekSliceOrNull(self: *Self, amount: usize) ?[]const T {
if (self.index + amount > self.input.len) return null;
return self.input[self.index..(self.index + amount)];
}
/// Slices the input given a start and end index
pub fn slice(self: *Self, start: usize, end: usize) []const T {
return self.input[start..end];
}
/// Returns true if the cursor is not at the end.
pub fn hasNext(self: *Self) bool {
return self.index + 1 < self.input.len;
}
};
}
|
0 | repos/honey/src | repos/honey/src/utils/Diagnostics.zig | const std = @import("std");
const token = @import("../lexer/token.zig");
const Self = @This();
pub const ErrorData = struct {
msg: []const u8,
token_data: token.TokenData,
};
/// The allocator used for printing error messages
ally: std.mem.Allocator,
/// The last error message
errors: std.MultiArrayList(ErrorData) = .{},
pub fn init(ally: std.mem.Allocator) Self {
return .{ .ally = ally };
}
/// Deinitializes the diagnostics
pub fn deinit(self: *Self) void {
for (self.errors.items(.msg)) |msg| {
self.ally.free(msg);
}
self.errors.deinit(self.ally);
}
/// Returns whether an error has been reported
pub fn hasErrors(self: *Self) bool {
return self.errors.len > 0;
}
/// Returns the number of errors reported
pub fn errorCount(self: *Self) usize {
return self.errors.len;
}
/// Reports an error
pub fn report(self: *Self, comptime fmt: []const u8, args: anytype, token_data: token.TokenData) void {
self.errors.append(self.ally, ErrorData{
// todo: errors over panics
.msg = std.fmt.allocPrint(self.ally, fmt, args) catch @panic("Failed to allocate error message"),
.token_data = token_data,
}) catch @panic("Failed to append error message");
}
|
0 | repos/honey/src | repos/honey/src/utils/Repl.zig | const std = @import("std");
const Self = @This();
const Command = struct {
const RunFn = *const fn () anyerror!void;
name: []const u8,
description: []const u8,
run: RunFn,
};
allocator: std.mem.Allocator,
buffer: []u8,
prefix: u8 = ':',
commands: std.StringHashMap(Command),
stdin: std.fs.File.Reader,
stdout: std.fs.File.Writer,
pub fn init(allocator: std.mem.Allocator, max_size: usize) !Self {
const buffer = try allocator.alloc(u8, max_size);
return .{
.allocator = allocator,
.buffer = buffer,
.commands = std.StringHashMap(Command).init(allocator),
.stdin = std.io.getStdIn().reader(),
.stdout = std.io.getStdOut().writer(),
};
}
pub fn initWithPrefix(allocator: std.mem.Allocator, max_size: usize, prefix: u8) !Self {
var self = try Self.init(allocator, max_size);
self.prefix = prefix;
return self;
}
pub fn addCommand(self: *Self, name: []const u8, description: []const u8, comptime run_func: Command.RunFn) !void {
const command = Command{
.name = name,
.description = description,
.run = run_func,
};
try self.commands.put(name, command);
}
pub fn deinit(self: *Self) void {
self.allocator.free(self.buffer);
}
pub fn prompt(self: Self, message: []const u8) !?[]const u8 {
_ = try self.stdout.write(message);
var stream = std.io.fixedBufferStream(self.buffer);
const writer = stream.writer();
self.stdin.streamUntilDelimiter(writer, '\n', null) catch |err| {
// EOF shouldn't be elevated to an error
if (err == error.EndOfStream) {
return null;
}
return err;
};
// ensure we strip whitespace
const trimmed = std.mem.trim(u8, stream.getWritten(), "\r\n");
if (trimmed.len < 1) {
return null;
} else if (trimmed.len > 1 and trimmed[0] == self.prefix) {
const command = self.commands.get(trimmed[1..]) orelse return null;
try command.run();
return null;
}
return trimmed;
}
pub fn getStdOut(self: Self) std.fs.File.Writer {
return self.stdout;
}
|
0 | repos/honey/src | repos/honey/src/utils/store.zig | const std = @import("std");
pub fn Store(comptime T: type) type {
return struct {
const Self = @This();
// We use a BufSet to store the keys so that the pointers to the keys are stable.
keys: std.BufSet,
values: std.StringHashMap(T),
/// Initializes the store with the given allocator.
pub fn init(ally: std.mem.Allocator) Self {
return .{
.keys = std.BufSet.init(ally),
.values = std.StringHashMap(T).init(ally),
};
}
/// Deinitializes the store.
pub fn deinit(self: *Self) void {
self.keys.deinit();
self.values.deinit();
}
/// Deletes the value with the given key.
pub fn delete(self: *Self, name: []const u8) void {
if (!self.values.contains(name)) {
return;
}
self.keys.remove(name);
self.values.remove(name);
}
/// Stores the given value under the given key.
pub fn store(self: *Self, key: []const u8, value: T) !void {
const result = self.values.getOrPut(key) catch unreachable;
if (!result.found_existing) {
// we have to store the slices ourselves because the hashmap doesn't copy them
try self.keys.insert(key);
result.key_ptr.* = self.keys.hash_map.getKey(key).?;
}
result.value_ptr.* = value;
}
/// Returns true if the store contains a value with the given key.
pub fn contains(self: *Self, key: []const u8) bool {
return self.values.contains(key);
}
/// Attempts to load the value with the given key.
pub fn load(self: *Self, name: []const u8) ?T {
return self.values.get(name);
}
};
}
|
0 | repos/honey/src | repos/honey/src/utils/Terminal.zig | const std = @import("std");
const Color = struct {};
const Self = @This();
stdout: std.fs.File.Writer,
pub fn init() Self {
return .{ .stdout = std.io.getStdOut().writer() };
}
pub fn writeColor(_: Self) void {}
|
0 | repos/honey/src | repos/honey/src/utils/bytes.zig | const std = @import("std");
/// The number of bytes per line in the dump.
const MaxBytesPerLine = 16;
const ByteFormat = "{X:0<2}";
/// Converts a float to a byte array.
pub inline fn floatToBytes(value: anytype) []const u8 {
const ValueType = @TypeOf(value);
const value_type_info = @typeInfo(ValueType);
if (value_type_info != .Float) {
@compileError("floatToBytes only works on floats");
} else if (@sizeOf(ValueType) % @sizeOf(u8) != 0) {
@compileError("floatToBytes only works on floats with a size that is a multiple of the size of u8");
}
const byte_count = @sizeOf(ValueType) / @sizeOf(u8);
return &@as([byte_count]u8, @bitCast(value));
}
/// Converts a byte array to a float.
pub inline fn bytesToFloat(comptime T: type, bytes: []const u8, endian: std.builtin.Endian) T {
const type_info = @typeInfo(T);
if (type_info != .Float) {
@compileError("bytesToFloat only works on floats");
} else if (@sizeOf(T) % @sizeOf(u8) != 0) {
@compileError("bytesToFloat only works on floats with a size that is a multiple of the size of u8");
}
const IntType = @Type(.{ .Int = .{ .bits = @bitSizeOf(T), .signedness = .unsigned } });
const int_value = std.mem.readInt(IntType, bytes[0..@sizeOf(T)], endian);
return @as(T, @bitCast(int_value));
}
pub fn dump(bytes: []const u8) void {
const line = ("-" ** (MaxBytesPerLine * 3 + 1)) ++ "\n";
std.debug.print(line, .{});
for (bytes, 0..) |byte, index| {
std.debug.print(ByteFormat, .{byte});
if (index % MaxBytesPerLine == MaxBytesPerLine - 1) {
std.debug.print("\n", .{});
} else {
std.debug.print(" ", .{});
}
}
std.debug.print("\n", .{});
std.debug.print(line, .{});
}
|
0 | repos/honey/src | repos/honey/src/vm/Vm.zig | const std = @import("std");
const utils = @import("../utils/utils.zig");
const honey = @import("../honey.zig");
const token = @import("../lexer/token.zig");
const Compiler = @import("../compiler/Compiler.zig");
const opcodes = @import("../compiler/opcodes.zig");
const Opcode = opcodes.Opcode;
const Bytecode = @import("../compiler/Bytecode.zig");
const Value = @import("../compiler/value.zig").Value;
const Self = @This();
/// The built-in functions for the VM
const BuiltinLibrary = if (@import("builtin").target.isWasm())
@import("../wasm_builtins.zig")
else
@import("../builtins.zig");
const HexFormat = "0x{x:0<2}";
/// The potential errors that can occur during execution
const VmError = error{
/// `OutOfMemory` is returned when the VM runs out of memory
OutOfMemory,
/// `StackOverflow` is returned when the stack overflows its bounds
StackOverflow,
/// `StackUnderflow` is returned when the a pop is attempted on an empty stack
StackUnderflow,
/// `InvalidOpcode` is returned when an invalid opcode is encountered
InvalidOpcode,
/// `VariableNotFound` is returned when a variable is not found in the VM
VariableNotFound,
/// `UnhandledInstruction` is returned when an instruction is encountered that is not handled
UnhandledInstruction,
/// `OutOfProgramBounds` is returned when the program counter goes out of bounds
OutOfProgramBounds,
/// `InvalidNumberType` is returned when a fetch is attempted with an invalid number type
InvalidNumberType,
/// `UnexpectedValueType` is returned when the type of a value is not what was expected
UnexpectedValueType,
/// `ListAccessOutOfBounds` is returned when a program attempts to access a list value out of bounds
ListAccessOutOfBounds,
/// `InvalidListKey` is returned when a program attempts to access a list value via a non-number value
InvalidListKey,
/// `GenericError` is returned when an error occurs that does not fit into any other category
GenericError,
};
/// The list used to keep track of objects in the VM
const ObjectList = std.SinglyLinkedList(*Value);
/// The map type used for variables in the VM
const VariableMap = std.StringArrayHashMap(Value);
/// The shape of the built-in functions in the VM
const BuiltinFn = *const fn (*Self, []const Value) anyerror!?Value;
/// A small struct to keep track of the current iterator
const Iterator = struct {
index: usize,
iterable: *Value,
pub fn len(self: *Iterator) usize {
return switch (self.iterable.*) {
.list => |list| list.count(),
.dict => |dict| dict.count(),
inline else => std.debug.panic("Unhandled iterable type: {s}", .{@tagName(self.iterable.*)}),
};
}
/// Returns true if the iterator has a next value
pub fn hasNext(self: *Iterator) bool {
return self.index < self.len();
}
/// Returns the value at the given index
fn get(self: *Iterator, index: usize) ?Value {
return switch (self.iterable.*) {
.list => |list| list.get(index),
.dict => |dict| dict.get(dict.keys()[index]),
inline else => unreachable,
};
}
/// Returns the next value in the iterator or null if there are no more values
pub fn next(self: *Iterator) void {
self.index += 1;
}
/// Returns the current value in the iterator or null if there are no more values
pub fn currentValue(self: *Iterator) ?Value {
return self.get(self.index);
}
/// Returns the current key in the iterator or null if there are no more values
pub fn currentKey(self: *Iterator) ?Value {
return switch (self.iterable.*) {
.list => .{ .number = @floatFromInt(self.index) },
.dict => |dict| .{ .string = dict.keys()[self.index] },
inline else => unreachable,
};
}
};
const CurrentInstructionData = struct { opcode: Opcode, program_counter: usize };
/// The allocator used for memory allocation in the VM
ally: std.mem.Allocator,
/// The bytecode object for the VM
bytecode: Bytecode,
/// The objects allocated in the arena for the VM (used for GC)
objects: ObjectList = .{},
/// The global constants in the VM
global_constants: VariableMap,
/// The global variables in the VM
global_variables: VariableMap,
/// Built-in functions for the VM
builtins: std.StringArrayHashMap(BuiltinFn),
/// Diagnostics for the VM
diagnostics: utils.Diagnostics,
/// Whether the VM is running or not
running: bool = true,
/// Where the program is currently executing
program_counter: usize = 0,
/// The current instruction being executed
current_instruction_data: CurrentInstructionData = .{
.opcode = undefined,
.program_counter = 0,
},
/// The stack pointer
stack_pointer: usize = 0,
/// The stack itself
stack: utils.Stack(Value),
/// Holds the last value popped from the stack
last_popped: ?Value = null,
/// The currently active iterators
active_iterator_stack: utils.Stack(Iterator),
/// The index of the currently active iterator
active_iterator_index: ?usize = null,
/// The virtual machine options
options: VmOptions,
/// The writer to use for output and debugging
writer: std.io.AnyWriter,
/// The options for the virtual machine
pub const VmOptions = struct {
/// If enabled, it will dump the bytecode into stderr before running the program
dump_bytecode: bool = false,
/// The writer used for output and debugging
writer: std.io.AnyWriter,
};
/// Initializes the VM with the needed values
pub fn init(bytecode: Bytecode, ally: std.mem.Allocator, options: VmOptions) Self {
var self = Self{
.ally = ally,
.bytecode = bytecode,
.global_constants = VariableMap.init(ally),
.global_variables = VariableMap.init(ally),
.builtins = std.StringArrayHashMap(BuiltinFn).init(ally),
.diagnostics = utils.Diagnostics.init(ally),
.stack = utils.Stack(Value).init(ally),
.active_iterator_stack = utils.Stack(Iterator).init(ally),
.options = options,
.writer = options.writer,
};
self.addBuiltinLibrary(BuiltinLibrary);
return self;
}
/// Deinitializes the VM
pub fn deinit(self: *Self) void {
self.active_iterator_stack.deinit();
self.stack.deinit();
self.diagnostics.deinit();
self.builtins.deinit();
self.global_constants.deinit();
self.global_variables.deinit();
}
/// Returns the allocator attached to the arena
pub fn allocator(self: *Self) std.mem.Allocator {
return self.ally;
}
/// Collects garbage in the VM
fn collectGarbage(self: *Self) VmError!void {
while (self.objects.popFirst()) |node| {
switch (node.data.*) {
.string => self.allocator().free(node.data.string),
.identifier => self.allocator().free(node.data.identifier),
inline else => {
self.reportError("Unhandled object type encountered during garbage collection: {s}", .{@tagName(node.data.*)});
return VmError.GenericError;
},
}
self.allocator().destroy(node.data);
}
}
/// Pushes an object onto the object list
fn trackObject(self: *Self, data: *Value) VmError!void {
const node = self.allocator().create(ObjectList.Node) catch |err| {
self.reportError("Failed to allocate memory for object list node: {any}", .{err});
return VmError.OutOfMemory;
};
node.* = .{ .data = data, .next = self.objects.first };
self.objects.prepend(node);
}
/// Creates a string object in the VM
pub fn createString(self: *Self, value: []const u8) !Value {
const string = self.allocator().dupe(u8, value) catch |err| {
self.reportError("Failed to allocate memory for string: {any}", .{err});
return VmError.OutOfMemory;
};
const created = self.allocator().create(Value) catch |err| {
self.reportError("Failed to allocate memory for string concatenation: {any}", .{err});
return error.OutOfMemory;
};
created.* = .{ .string = string };
// track object for GC
try self.trackObject(created);
return created.*;
}
/// Adds all public functions from the import as a built-in library
/// All built-ins are represented as a top-level call (e.g., `pub fn print` turns into `@print`)
pub fn addBuiltinLibrary(self: *Self, comptime import: type) void {
const decls = @typeInfo(import).Struct.decls;
inline for (decls) |decl| {
const DeclType = @TypeOf(@field(import, decl.name));
const decl_type_info = @typeInfo(DeclType);
// validate that the declaration is a function
// todo: we can use this for mapping native functions to a call in the VM
// to do so, we'll inspect the params of the function and generate a new function that takes a slice of values,
// maps them to the correct types, and then calls the native function
// e.g., pub fn print(data: []const u8) will turn into a function with the parameters (vm: *Vm, args: []const Value)
if (decl_type_info != .Fn) {
continue;
}
self.builtins.put(decl.name, @field(import, decl.name)) catch unreachable;
}
}
/// Returns the last value popped from the stack
pub fn getLastPopped(self: *Self) ?Value {
return self.last_popped;
}
/// Runs the VM
pub fn run(self: *Self) VmError!void {
if (self.options.dump_bytecode) {
self.writer.writeAll("------------ Bytecode ------------\n") catch unreachable;
self.bytecode.dump(self.writer) catch unreachable;
self.writer.writeAll("----------------------------------\n") catch unreachable;
}
while (self.running and self.program_counter < self.bytecode.instructions.len) {
const pc = self.program_counter;
const instruction = try self.fetchInstruction();
self.current_instruction_data = .{ .opcode = instruction, .program_counter = pc };
try self.execute(instruction);
}
}
/// Executes the instruction
fn execute(self: *Self, instruction: Opcode) VmError!void {
if (!self.running) {
return;
}
// if (self.objects.len() > 10240) {
// std.debug.print("Collecting garbage...\n", .{});
// try self.collectGarbage();
// }
switch (instruction) {
.@"return" => {
// todo: handle return values from functions
self.running = false;
return;
},
.@"const" => {
const constant = try self.fetchConstant();
try self.pushOrError(constant);
},
.list => {
const len = try self.fetchNumber(u16);
var list = Value.ListMap.init(self.allocator());
for (0..len) |index| {
var value = try self.popOrError();
// if it is heap-allocated, we need to initalize it
switch (value) {
.string => |string| value = try self.createString(string),
.list => |_| {},
else => {},
}
try list.put(index, value);
}
try self.pushOrError(.{ .list = list });
},
.dict => {
const len = try self.fetchNumber(u16);
var dict = Value.DictMap.init(self.allocator());
for (0..len) |_| {
const value = try self.popOrError();
const key = try self.popOrError();
try dict.put(key.string, value);
}
try self.pushOrError(.{ .dict = dict });
},
// constant value instructions
.true => try self.pushOrError(Value.True),
.false => try self.pushOrError(Value.False),
.null => try self.pushOrError(Value.Null),
.void => try self.pushOrError(Value.Void),
.pop => _ = try self.popOrError(),
// operation instructions
.add, .sub, .mul, .div, .mod, .pow => try self.executeArithmetic(instruction),
.eql, .neql, .@"and", .@"or" => try self.executeLogical(instruction),
.gt, .gt_eql, .lt, .lt_eql => try self.executeComparison(instruction),
.neg => {
const value = try self.popOrError();
if (value != .number) {
self.reportError("Attempted to negate non-number value: {s}", .{value});
return VmError.UnexpectedValueType;
}
try self.pushOrError(.{ .number = -value.number });
},
.not => {
const value = try self.popOrError();
if (value != .boolean) {
self.reportError("Attempted to negate non-boolean value: {s}", .{value});
return VmError.UnexpectedValueType;
}
try self.pushOrError(nativeBoolToValue(!value.boolean));
},
// jump instructions
.jump_if_false => {
const index = try self.fetchNumber(u16);
const value = try self.popOrError();
if (!value.boolean) self.program_counter += index;
},
.jump => {
const index = try self.fetchNumber(u16);
self.program_counter += index;
},
.loop => {
const offset = try self.fetchNumber(u16);
self.program_counter -= offset;
},
.declare_const, .declare_var => {
const decl_name = try self.fetchConstant();
const value = try self.popOrError();
const map = if (instruction == .declare_const) &self.global_constants else &self.global_variables;
const map_name = if (instruction == .declare_const) "constant" else "variable";
if (map.contains(decl_name.identifier)) {
self.reportError("Global {s} already declared: {s}", .{
map_name,
decl_name.identifier,
});
return VmError.GenericError;
}
map.putNoClobber(decl_name.identifier, value) catch |err| {
self.reportError("Failed to declare global {s}: {any}", .{ map_name, err });
return VmError.GenericError;
};
},
.set_global => {
const variable_name = try self.fetchConstant();
if (!self.global_variables.contains(variable_name.identifier)) {
// check if it's a constant & error if it is
if (self.global_constants.contains(variable_name.identifier)) {
self.reportError("Unable to reassign constant: {s}", .{variable_name.identifier});
return VmError.GenericError;
}
self.reportError("Variable not found: {s}", .{variable_name.identifier});
return VmError.VariableNotFound;
}
const value = try self.popOrError();
self.global_variables.put(variable_name.identifier, value) catch |err| {
self.reportError("Failed to set global variable: {any}", .{err});
return error.GenericError;
};
},
.set_local => {
const offset = try self.fetchNumber(u16);
const value = self.stack.pop() catch {
self.reportError("Local variable not found at offset {d}", .{offset});
return VmError.GenericError;
};
// std.debug.print("- Setting local variable at offset {d}: {s}\n", .{ offset, value });
self.stack.set(offset, value) catch |err| {
self.reportError("Failed to set local variable at offset {d}: {any}", .{ offset, err });
return VmError.GenericError;
};
},
.get_global => {
const global_name = try self.fetchConstant();
const value = if (self.global_variables.get(global_name.identifier)) |global|
global
else if (self.global_constants.get(global_name.identifier)) |constant|
constant
else {
// todo: builtin variables
self.reportError("Variable not found: {s}", .{global_name.identifier});
return VmError.GenericError;
};
try self.pushOrError(value);
},
.get_local => {
const offset = try self.fetchNumber(u16);
const value = self.stack.get(offset) catch {
self.reportError("Local variable not found at offset {d}", .{offset});
return VmError.GenericError;
};
// std.debug.print("* Getting local variable at offset {d}: {s}\n", .{ offset, value });
try self.pushOrError(value);
},
.get_index => {
const index_value = try self.popOrError();
const value = try self.popOrError();
switch (value) {
.list => {
if (index_value != .number) {
self.reportError("Expected index to be a number but got {s}", .{index_value});
return VmError.InvalidListKey;
}
if (@floor(index_value.number) != index_value.number) {
self.reportError("Expected index to be an integer but got {s}", .{index_value});
return VmError.GenericError;
}
const index: usize = @intFromFloat(index_value.number);
try self.pushOrError(value.list.get(index) orelse Value.Null);
},
.dict => try self.pushOrError(value.dict.get(index_value.string) orelse Value.Null),
inline else => {
self.reportError("Expected expression to be a list or dictionary but got {s}", .{value});
return VmError.GenericError;
},
}
},
.set_index => {
const new_value = try self.popOrError();
// fetch list, fetch index, update at index with new expression
const index_value = try self.popOrError();
var value = self.stack.peekPtr() catch unreachable;
switch (value.*) {
.list => {
if (index_value != .number) {
self.reportError("Expected list key to be number but got {s}", .{index_value});
return VmError.InvalidListKey;
}
const index: usize = @intFromFloat(index_value.number);
try value.list.put(index, new_value);
},
.dict => {
if (index_value != .string) {
self.reportError("Expected dictionary key to be string but got {s}", .{index_value});
return VmError.GenericError;
}
try value.dict.put(index_value.string, new_value);
},
inline else => {
self.reportError("Expected list or dictionary but got {s}", .{value});
return VmError.GenericError;
},
}
},
.set_member => {
const new_value = try self.popOrError();
// fetch list, fetch index, update at index with new expression
const index_value = try self.popOrError();
var value = self.stack.peekPtr() catch unreachable;
try value.dict.put(index_value.string, new_value);
},
.get_member => {
// self.stack.dump();
const index_value = try self.popOrError();
const value = try self.popOrError();
// self.stack.dump();
try self.pushOrError(value.dict.get(index_value.string) orelse Value.Null);
},
.call_builtin => {
const builtin = try self.fetchConstant();
const arg_count = try self.fetchNumber(u16);
var args_list = std.ArrayList(Value).init(self.allocator());
for (0..arg_count) |_| {
const arg = try self.popOrError();
args_list.append(arg) catch |err| {
self.reportError("Failed to append argument to builtin arguments: {any}", .{err});
return VmError.GenericError;
};
}
const args = args_list.toOwnedSlice() catch |err| {
self.reportError("Failed to convert arguments to owned slice: {any}", .{err});
return VmError.GenericError;
};
defer self.allocator().free(args);
std.mem.reverse(Value, args);
const run_func = self.builtins.get(builtin.identifier) orelse {
self.reportError("Builtin not found: @{s}", .{builtin.identifier});
return VmError.GenericError;
};
const output = run_func(self, args) catch return VmError.GenericError;
try self.pushOrError(if (output) |value| value else Value.Void);
},
.iterable_begin => {
var iterable = self.stack.peek() catch {
self.reportError("Expected iterable to begin but stack was empty", .{});
return VmError.StackUnderflow;
};
switch (iterable) {
.list, .dict => {},
inline else => {
self.reportError("Expected iterable to begin but got {s}", .{iterable});
return VmError.GenericError;
},
}
try self.setActiveIterator(.{ .index = 0, .iterable = &iterable });
},
.iterable_next => {
var iterator = try self.getActiveIterator();
iterator.next();
// std.debug.print("Iterating over {s} at index {d}\n", .{ iterator.iterable, iterator.index });
},
.iterable_has_next => {
var iterator = try self.getActiveIterator();
try self.pushOrError(nativeBoolToValue(iterator.hasNext()));
// self.stack.dump();
},
.iterable_value => {
var iterator = try self.getActiveIterator();
try self.pushOrError(iterator.currentValue() orelse Value.Null);
},
.iterable_key => {
var iterator = try self.getActiveIterator();
try self.pushOrError(iterator.currentKey() orelse Value.Null);
},
.iterable_end => {
try self.removeActiveIterator();
},
// inline else => {
// self.diagnostics.report("Unhandled instruction encountered (" ++ HexFormat ++ ") at PC {d}: {s}", .{
// instruction.byte(),
// self.program_counter,
// @tagName(instruction),~
// });
// return error.UnhandledInstruction;
// },
}
}
const ReportedToken = token.TokenData{
.token = .{ .invalid = '\x00' },
.position = .{ .start = 0, .end = 0 },
};
pub fn reportError(self: *Self, comptime fmt: []const u8, args: anytype) void {
// todo: we need to manage tokens in the compiler & vm somehow
self.diagnostics.report("[pc: {x:0>4} | op: .{s}]: " ++ fmt, utils.mergeTuples(.{
.{ self.current_instruction_data.program_counter, @tagName(self.current_instruction_data.opcode) },
args,
}), ReportedToken);
}
/// Reports any errors that have occurred during execution to stderr
pub fn report(self: *Self) void {
if (!self.diagnostics.hasErrors()) {
return;
}
const msg_data = self.diagnostics.errors.items(.msg);
for (msg_data) |msg| {
self.options.writer.print("error: {s}\n", .{msg}) catch unreachable;
}
}
/// Fetches the next byte from the program
fn fetchAndIncrement(self: *Self) VmError!u8 {
if (self.program_counter >= self.bytecode.instructions.len) {
self.reportError("Program counter ({d}) exceeded bounds of program ({d}).", .{ self.program_counter, self.bytecode.instructions.len });
return error.OutOfProgramBounds;
}
defer self.program_counter += 1;
return self.bytecode.instructions[self.program_counter];
}
/// Fetches the next instruction from the program
fn fetchInstruction(self: *Self) VmError!Opcode {
const instruction = try self.fetchAndIncrement();
return Opcode.fromByte(instruction) catch {
self.reportError("Invalid opcode (" ++ HexFormat ++ ") encountered.", .{instruction});
return error.InvalidOpcode;
};
}
/// Fetches the next `count` bytes from the program
fn fetchAmount(self: *Self, count: usize) VmError![]const u8 {
const end = self.program_counter + count;
if (end > self.bytecode.instructions.len) {
self.reportError("Program counter ({d}) exceeded bounds of program when fetching slice ({d}).", .{ end, self.bytecode.instructions.len });
return error.OutOfProgramBounds;
}
defer self.program_counter += count;
return self.bytecode.instructions[self.program_counter..end];
}
/// Fetches a number from the program
inline fn fetchNumber(self: *Self, comptime T: type) VmError!T {
if (@sizeOf(T) / 8 != 0) {
@compileError("Invalid number type size");
}
const bytes = try self.fetchAmount(@sizeOf(T));
return switch (@typeInfo(T)) {
.Int => std.mem.readInt(T, bytes[0..@sizeOf(T)], .big),
.Float => utils.bytes.bytesToFloat(T, bytes, .big),
inline else => @compileError("Invalid type"),
};
}
/// Fetches a constant from the program and pushes it onto the stack
fn fetchConstant(self: *Self) VmError!Value {
const index = try self.fetchNumber(u16);
if (index >= self.bytecode.constants.len) {
self.reportError("Constant index ({d}) exceeded bounds of constants ({d}).", .{ index, self.bytecode.constants.len });
return error.OutOfProgramBounds;
}
return self.bytecode.constants[index];
}
/// Gets the active iterator or returns null
fn getActiveIterator(self: *Self) VmError!*Iterator {
const index = self.active_iterator_index orelse {
self.reportError("No active iterator found", .{});
return VmError.GenericError;
};
const iterator = self.active_iterator_stack.getPtr(index) catch {
self.reportError("No active iterator found", .{});
return VmError.GenericError;
};
return iterator;
}
/// Removes the active iterator
fn removeActiveIterator(self: *Self) VmError!void {
_ = self.active_iterator_stack.pop() catch {
self.reportError("Failed to remove active iterator", .{});
return VmError.StackUnderflow;
};
self.active_iterator_index = if (self.active_iterator_stack.size() > 0) self.active_iterator_stack.size() - 1 else null;
}
/// Sets the active iterator
fn setActiveIterator(self: *Self, iterator: Iterator) VmError!void {
self.active_iterator_stack.push(iterator) catch return VmError.OutOfMemory;
self.active_iterator_index = self.active_iterator_stack.size() - 1;
}
/// Pushes a value onto the stack or reports and returns an error
fn pushOrError(self: *Self, value: Value) VmError!void {
// std.debug.print("Pushing value onto stack: {s}\n", .{value});
self.stack.push(value) catch |err| {
self.reportError("Failed to push value onto stack: {any}", .{err});
return error.StackOverflow;
};
// self.stack.dump();
}
fn freeValue(self: *Self, value: Value) void {
switch (value) {
.list => |list| {
var iterator = list.iterator();
while (iterator.next()) |entry| {
self.freeValue(entry.value_ptr.*);
}
},
.dict => |dict| {
var iterator = dict.iterator();
while (iterator.next()) |entry| {
self.freeValue(entry.value_ptr.*);
}
},
.string => |_| {
// todo: separate interned strings from reg strings
// don't free if interned
// self.allocator().free(string);
},
else => {},
}
}
/// Pops a value from the stack or reports and returns an error
fn popOrError(self: *Self) VmError!Value {
// when last popped becomes the penultimate, we will free the memory since we're holding no more references to it
if (self.last_popped) |last_popped| {
self.freeValue(last_popped);
}
// std.debug.print("Popping value from stack: {s}\n", .{self.stack.peek() catch return VmError.StackUnderflow});
self.last_popped = self.stack.pop() catch {
self.reportError("Failed to pop value from stack", .{});
return error.StackUnderflow;
};
// self.stack.dump();
return self.last_popped.?;
}
/// Pops `N` values from the stack or reports and returns an error
fn popCountOrError(self: *Self, comptime N: comptime_int) VmError!utils.RepeatedTuple(Value, N) {
var tuple: utils.RepeatedTuple(Value, N) = undefined;
inline for (0..N) |index| {
@field(tuple, std.fmt.comptimePrint("{d}", .{index})) = try self.popOrError();
}
return tuple;
}
/// Executes an arithmetic instruction
fn executeArithmetic(self: *Self, opcode: Opcode) VmError!void {
const rhs: Value, const lhs: Value = try self.popCountOrError(2);
// if the lhs is a string, we can assume we are concatenating
if (lhs == .string) {
const result = switch (opcode) {
// "hello" + "world" = "helloworld"
.add => blk: {
if (rhs != .string) {
self.reportError("Attempted to concatenate string with non-string value: {s}", .{rhs});
return error.UnexpectedValueType;
}
const concatted = self.allocator().create(Value) catch |err| {
self.reportError("Failed to allocate memory for string concatenation: {any}", .{err});
return error.OutOfMemory;
};
concatted.* = lhs.concat(rhs, self.allocator()) catch |err| {
self.reportError("Failed to concatenate strings: {any}", .{err});
return error.GenericError;
};
// track object for GC
try self.trackObject(concatted);
break :blk concatted;
},
// "hello" ** 3 = "hellohellohello"
.pow => blk: {
if (rhs != .number) {
self.reportError("Attempted to raise string to non-number power: {s}", .{rhs});
return error.UnexpectedValueType;
} else if (rhs.number < 0) {
self.reportError("Attempted to raise string to negative power: {d}", .{rhs.number});
return error.GenericError;
}
const power: usize = @intFromFloat(rhs.number);
const concatted = try self.multiplyStr(lhs.string, power);
errdefer self.allocator().free(concatted);
const value = self.allocator().create(Value) catch |err| {
self.reportError("Failed to allocate memory for string power operation: {any}", .{err});
return error.OutOfMemory;
};
errdefer self.allocator().destroy(value);
value.* = .{ .string = concatted };
// track object for GC
try self.trackObject(value);
break :blk value;
},
inline else => {
self.reportError("Unexpected opcode for string operation between {s} and {s}: {s}", .{ lhs, rhs, opcode });
return error.GenericError;
},
};
try self.pushOrError(result.*);
return;
}
if (lhs != .number or rhs != .number) {
self.reportError("Attempted to perform arithmetic on non-number values: {s} and {s}", .{ lhs, rhs });
return error.UnexpectedValueType;
}
try self.pushOrError(.{ .number = switch (opcode) {
.add => lhs.number + rhs.number,
.sub => lhs.number - rhs.number,
.mul => lhs.number * rhs.number,
.div => lhs.number / rhs.number,
.mod => @mod(lhs.number, rhs.number),
.pow => std.math.pow(@TypeOf(lhs.number), lhs.number, rhs.number),
inline else => unreachable,
} });
}
fn executeComparison(self: *Self, opcode: Opcode) VmError!void {
const rhs, const lhs = try self.popCountOrError(2);
if (lhs != .number or rhs != .number) {
self.reportError("Attempted to perform comparison on non-number values: {s} and {s}", .{ lhs, rhs });
return error.UnexpectedValueType;
}
try self.pushOrError(nativeBoolToValue(switch (opcode) {
.gt => lhs.number > rhs.number,
.gt_eql => lhs.number >= rhs.number,
.lt => lhs.number < rhs.number,
.lt_eql => lhs.number <= rhs.number,
inline else => unreachable,
}));
}
/// Executes a logical instruction
fn executeLogical(self: *Self, opcode: Opcode) VmError!void {
const rhs: Value, const lhs: Value = try self.popCountOrError(2);
const result = switch (opcode) {
.@"and" => lhs.@"and"(rhs) catch |err| {
self.reportError("Failed to perform logical AND operation: {any}", .{err});
return error.GenericError;
},
.@"or" => lhs.@"or"(rhs) catch |err| {
self.reportError("Failed to perform logical OR operation: {any}", .{err});
return error.GenericError;
},
.eql => nativeBoolToValue(lhs.equal(rhs)),
.neql => nativeBoolToValue(!lhs.equal(rhs)),
inline else => unreachable,
};
try self.pushOrError(result);
}
/// Multiplies a string by a power (e.g., "hello" ** 3 = "hellohellohello")
inline fn multiplyStr(self: *Self, value: []const u8, power: usize) ![]const u8 {
const buf = self.allocator().alloc(u8, value.len * power) catch |err| {
self.reportError("Failed to allocate memory for string power operation: {any}", .{err});
return error.OutOfMemory;
};
// todo: is there a better way to do this?
for (0..power) |index| {
const start = index * value.len;
const end = start + value.len;
@memcpy(buf[start..end], value);
}
return buf;
}
/// Converts a native boolean to the value constant equivalent
inline fn nativeBoolToValue(value: bool) Value {
return if (value) Value.True else Value.False;
}
test "ensure program results in correct value" {
const ally = std.testing.allocator;
const error_writer = std.io.getStdErr().writer().any();
const result = try honey.compile(.{ .string = "1 + 2" }, .{
.allocator = ally,
.error_writer = error_writer,
});
defer result.deinit();
var vm = Self.init(result.data, ally, .{
.error_writer = error_writer,
});
defer vm.deinit();
try vm.run();
try std.testing.expectEqual(Value{ .number = 3 }, vm.getLastPopped().?);
}
|
0 | repos/honey/src | repos/honey/src/compiler/Compiler.zig | const std = @import("std");
const utils = @import("../utils/utils.zig");
const token = @import("../lexer/token.zig");
const Token = token.Token;
const ast = @import("../parser/ast.zig");
const honey = @import("../honey.zig");
const opcodes = @import("opcodes.zig");
const Opcode = opcodes.Opcode;
const Instruction = opcodes.Instruction;
const Value = @import("value.zig").Value;
const Bytecode = @import("Bytecode.zig");
/// This represents a compiled instruction that has been added to the bytecode
const CompiledInstruction = struct {
/// The instruction's opcode
opcode: Opcode,
/// The index that the compiled instruction resides at in the bytecode
index: usize,
pub fn endIndex(self: CompiledInstruction) usize {
return self.index + self.opcode.width();
}
/// Returns the index of the (potential) next instruction given its index and its size
pub fn nextInstructionIndex(self: CompiledInstruction) usize {
return self.index + self.opcode.size();
}
};
/// The maximum offset that can be used in a jump instruction. Used as a placeholder until replaced with the actual offset
const MaxOffset = std.math.maxInt(u16);
/// The maximum number of local variables that can be used in a function
const MaxLocalVariables = std.math.maxInt(u8) + 1;
/// The map type used to store global identifiers declared in the program
const GlobalIdentifierMap = std.StringArrayHashMap(void);
const Self = @This();
const Error = error{
/// Occurs when the compiler encounters an invalid opcode
InvalidInstruction,
/// Occurs when an expected opcode isn't matched by the current opcode
OpcodeReplaceMismatch,
/// Occurs when an opcode's data can't be replaced
OpcodeReplaceFailure,
/// Occurs when an opcode fails to encode
OpcodeEncodeFailure,
/// Occurs when a statement that isn't supported in the compiler yet
UnsupportedStatement,
/// Occurs when an expression that isn't supported in the compiler yet
UnsupportedExpression,
/// Occurs when the compiler's allocator is out of memory
OutOfMemory,
/// Occurs when a user tries to access a local variable that is out of bounds
LocalOutOfBounds,
/// Occurs when a variable already exists in either the current scope or a parent scope
VariableAlreadyExists,
/// Occurs when the compiler encounters an unexpected type
UnexpectedType,
};
const Local = struct {
/// The name of the local variable
name: []const u8,
/// The depth of the scope the local variable was declared in
depth: u16,
/// Whether the local variable is a constant
is_const: bool,
};
const ScopeContext = struct {
const LocalArray = std.BoundedArray(Local, MaxLocalVariables);
/// The local variables being tracked by the compiler
local_variables: LocalArray = .{},
/// The depth of the current scope
current_depth: u16 = 0,
/// The current loop that the compiler is in
current_loop: ?ast.Expression = null,
/// The current break instructions being tracked for the current loop
break_statements: std.ArrayList(CompiledInstruction),
/// The current continue instructions being tracked for the current loop
continue_statements: std.ArrayList(CompiledInstruction),
/// Initializes the scope context
pub fn init(ally: std.mem.Allocator) ScopeContext {
return .{
.break_statements = std.ArrayList(CompiledInstruction).init(ally),
.continue_statements = std.ArrayList(CompiledInstruction).init(ally),
};
}
/// Deinitializes the scope context
pub fn deinit(self: *ScopeContext) void {
self.break_statements.deinit();
self.continue_statements.deinit();
}
/// Begins a new loop
pub fn beginLoop(self: *ScopeContext, loop: ast.Expression) void {
self.break_statements.clearRetainingCapacity();
self.continue_statements.clearRetainingCapacity();
self.current_loop = loop;
}
/// Adds a continue statement to the current loop
pub fn addBreak(self: *ScopeContext, instr: CompiledInstruction) !void {
try self.break_statements.append(instr);
}
/// Adds a continue statement to the current loop
pub fn addContinue(self: *ScopeContext, instr: CompiledInstruction) !void {
try self.continue_statements.append(instr);
}
/// Patches all break and continue statements with the correct offsets
pub fn patchLoop(self: *ScopeContext, compiler: *Self, post_loop_expr: CompiledInstruction, loop_end: CompiledInstruction) !void {
for (self.break_statements.items) |instr| {
try compiler.replace(instr, .{ .jump = @intCast(loop_end.endIndex() - instr.index) });
}
for (self.continue_statements.items) |instr| {
try compiler.replace(instr, .{ .jump = @intCast(post_loop_expr.endIndex() - instr.nextInstructionIndex()) });
}
}
/// Ends the current loop
pub fn endLoop(self: *ScopeContext) void {
self.break_statements.clearRetainingCapacity();
self.continue_statements.clearRetainingCapacity();
self.current_loop = null;
}
/// Returns the local variables in the current scope
inline fn getLocals(self: *ScopeContext) []Local {
return self.local_variables.slice();
}
/// Returns the number of local variables in the current scope
inline fn getLocalsCount(self: *ScopeContext) usize {
return self.local_variables.len;
}
/// Returns the last local variable in the current scope or null if there are no local variables
inline fn popLocal(self: *ScopeContext) ?Local {
return self.local_variables.popOrNull();
}
/// Returns a local variable by offset or errors if the index is out of bounds
inline fn getLocal(self: *ScopeContext, offset: u16) Error!Local {
return self.local_variables.get(@intCast(offset));
}
/// Returns the last local variable
/// This will panic or have UB if there are no local variables
inline fn getLastLocal(self: *ScopeContext) Local {
return self.local_variables.get(self.local_variables.len - 1);
}
/// Returns true if there is a local variable with the given name
inline fn hasLocal(self: *ScopeContext, name: []const u8) bool {
return self.resolveLocalOffset(name) != null;
}
/// Finds a local variable by name and returns its offset
inline fn resolveLocalOffset(self: *ScopeContext, name: []const u8) ?u16 {
for (self.getLocals(), 0..) |local, offset| {
if (std.mem.eql(u8, local.name, name)) {
return @intCast(offset);
}
}
return null;
}
/// Finds a local variable by name and returns it
inline fn resolveLocal(self: *ScopeContext, name: []const u8) ?Local {
for (self.getLocals()) |local| {
if (std.mem.eql(u8, local.name, name)) {
return local;
}
}
return null;
}
/// Attempts to add a local variable to the list of local variables and return its index
fn addLocal(self: *ScopeContext, name: []const u8, is_const: bool) Error!u16 {
self.local_variables.append(Local{
.name = name,
.depth = self.current_depth,
.is_const = is_const,
}) catch return Error.OutOfMemory;
return self.local_variables.len - 1;
}
/// Attempts to find a local variable by name. If found, it removes it from the list of local variables
fn removeLocal(self: *ScopeContext, name: []const u8) Error!void {
for (self.getLocals()) |local| {
if (std.mem.eql(u8, local.name, name)) {
_ = self.local_variables.popOrNull() orelse return Error.LocalOutOfBounds;
return;
}
}
}
};
/// A simple arena allocator used when compiling into bytecode
arena: std.heap.ArenaAllocator,
/// The current program being compiled
program: ast.Program,
/// The diagnostics used by the compiler
diagnostics: utils.Diagnostics,
/// The instructions being generated
instructions: std.ArrayList(u8),
/// A list of constant expressions used in the program
constants: std.ArrayList(Value),
/// A list of global identifiers declared in the program
declared_global_identifiers: GlobalIdentifierMap,
/// The last instruction that was added
last_compiled_instr: ?CompiledInstruction = null,
/// The instruction before the last instruction
penult_compiled_instr: ?CompiledInstruction = null,
/// Context about the current scope
scope_context: ScopeContext,
/// The writer used for error reporting
error_writer: std.io.AnyWriter,
/// Initializes the compiler
pub fn init(ally: std.mem.Allocator, program: ast.Program, error_writer: std.io.AnyWriter) Self {
return .{
.arena = std.heap.ArenaAllocator.init(ally),
.diagnostics = utils.Diagnostics.init(ally),
.program = program,
.instructions = std.ArrayList(u8).init(ally),
.constants = std.ArrayList(Value).init(ally),
.declared_global_identifiers = GlobalIdentifierMap.init(ally),
.scope_context = ScopeContext.init(ally),
.error_writer = error_writer,
};
}
/// Deinitializes the compiler
pub fn deinit(self: *Self) void {
self.arena.deinit();
self.diagnostics.deinit();
self.instructions.deinit();
self.constants.deinit();
self.declared_global_identifiers.deinit();
self.scope_context.deinit();
}
/// Adds an operation to the bytecode
fn addInstruction(self: *Self, instruction: opcodes.Instruction) Error!void {
const writer = self.instructions.writer();
const index = self.instructions.items.len;
try encode(writer, instruction);
// set last as penultimate instr
self.penult_compiled_instr = self.last_compiled_instr;
self.last_compiled_instr = CompiledInstruction{
.opcode = std.meta.activeTag(instruction),
.index = index,
};
}
/// Replaces the last instruction with a new instruction
/// The opcodes between the old and new instructions must match
fn replace(self: *Self, old: CompiledInstruction, new_instr: opcodes.Instruction) Error!void {
const new_opcode = std.meta.activeTag(new_instr);
if (old.opcode != new_opcode) {
self.reportError("Expected opcode to match but found {s} and {s}", .{ @tagName(old.opcode), @tagName(new_opcode) });
return error.OpcodeReplaceMismatch;
}
var stream = std.io.fixedBufferStream(self.instructions.items);
const prev_index = stream.pos;
stream.seekTo(old.index) catch return Error.OpcodeReplaceFailure;
try encode(stream.writer(), new_instr);
stream.seekTo(prev_index) catch return Error.OpcodeReplaceFailure;
}
/// Encodes an instruction into the given writer
fn encode(writer: anytype, instruction: opcodes.Instruction) Error!void {
// size of the opcode + size of the instruction
const op: Opcode = std.meta.activeTag(instruction);
op.encode(writer) catch return Error.OpcodeEncodeFailure;
switch (instruction) {
inline else => |value| opcodes.encode(value, writer) catch {
return Error.OpcodeEncodeFailure;
},
}
}
/// Returns the last instruction or errors if there is none
fn getLastInstruction(self: *Self) Error!CompiledInstruction {
return self.last_compiled_instr orelse Error.InvalidInstruction;
}
/// Returns the previous instruction before the last instruction or errors if there is none
fn getPreviousInstruction(self: *Self) Error!CompiledInstruction {
return self.penult_compiled_instr orelse Error.InvalidInstruction;
}
/// Returns true if there is a global variable/constant declared with the given name
fn hasGlobal(self: *Self, name: []const u8) bool {
return self.declared_global_identifiers.contains(name);
}
/// Marks a global variable/constant as declared with the given name
fn markGlobal(self: *Self, name: []const u8) !void {
try self.declared_global_identifiers.put(name, {});
}
const ReportedToken = token.TokenData{
.token = .{ .invalid = '\x00' },
.position = .{ .start = 0, .end = 0 },
};
pub fn reportError(self: *Self, comptime fmt: []const u8, args: anytype) void {
self.diagnostics.report(fmt, args, ReportedToken);
}
pub fn report(self: *Self) void {
if (!self.diagnostics.hasErrors()) {
return;
}
const msg_data = self.diagnostics.errors.items(.msg);
for (msg_data) |msg| {
self.error_writer.print("error: {s}\n", .{msg}) catch unreachable;
}
}
/// Compiles the program into bytecode
pub fn compile(self: *Self) !Bytecode {
for (self.program.statements.items) |statement| {
try self.compileStatement(statement);
}
return .{ .instructions = self.instructions.items, .constants = self.constants.items };
}
/// Compiles a statement into bytecode
fn compileStatement(self: *Self, statement: ast.Statement) Error!void {
switch (statement) {
.expression => |inner| {
try self.compileExpression(inner.expression);
// pop the result of the statement off the stack after it's done
try self.addInstruction(.pop);
},
.variable => |inner| {
// declare a global variable if we're at the top level
if (self.scope_context.current_depth <= 0) {
if (self.hasGlobal(inner.name)) {
self.reportError("Variable '{s}' already exists in the current scope", .{inner.name});
return Error.VariableAlreadyExists;
}
const index = try self.addConstant(.{ .identifier = inner.name });
try self.compileExpression(inner.expression);
try self.markGlobal(inner.name);
try self.addInstruction(if (inner.kind == .@"const") .{ .declare_const = index } else .{ .declare_var = index });
return;
}
// declare a local variable
// if the variable name already exists in the current scope, throw an error
for (self.scope_context.getLocals()) |local| {
if (local.depth <= self.scope_context.current_depth and std.mem.eql(u8, local.name, inner.name)) {
self.reportError("Variable {s} already exists in the current scope", .{inner.name});
return Error.VariableAlreadyExists;
}
}
_ = try self.scope_context.addLocal(inner.name, inner.kind == .@"const");
try self.compileExpression(inner.expression);
},
.assignment => |inner| switch (inner.lhs) {
.identifier => |name| {
if (self.scope_context.resolveLocalOffset(name)) |offset| {
// fetch local
const local = self.scope_context.getLocal(offset) catch |err| {
self.reportError("Local variable out of bounds: {s}", .{name});
return err;
};
// if local is a constant, error out
if (local.is_const) {
self.reportError("Cannot reassign constant variable: {s}", .{name});
return Error.VariableAlreadyExists;
}
if (!inner.isSimple()) {
try self.addInstruction(.{ .get_local = offset });
try self.compileExpression(inner.rhs);
const instr = try self.resolveAssignToInstr(inner.type);
try self.addInstruction(instr);
} else {
try self.compileExpression(inner.rhs);
}
try self.addInstruction(.{ .set_local = offset });
} else {
const index = try self.addConstant(.{ .identifier = name });
if (!inner.isSimple()) {
try self.addInstruction(.{ .get_global = index });
try self.compileExpression(inner.rhs);
const instr = try self.resolveAssignToInstr(inner.type);
try self.addInstruction(instr);
} else {
try self.compileExpression(inner.rhs);
}
try self.addInstruction(.{ .set_global = index });
}
},
.index => |index_expr| {
if (index_expr.lhs.* != .identifier) {
self.reportError("Expected identifier for index assignment but got: {s}", .{index_expr.lhs});
return Error.UnexpectedType;
}
const index_identifier = index_expr.lhs.identifier;
// fetch list, fetch index, update at index with new expression
if (self.scope_context.resolveLocalOffset(index_identifier)) |offset| {
// get list
try self.addInstruction(.{ .get_local = offset });
// compile index & fetch
try self.compileExpression(index_expr.index.*);
try self.compileExpression(inner.rhs);
try self.addInstruction(.set_index);
try self.addInstruction(.{ .set_local = offset });
} else {
const index = try self.addConstant(.{ .identifier = index_identifier });
try self.addInstruction(.{ .get_global = index });
// compile index & fetch
try self.compileExpression(index_expr.index.*);
try self.compileExpression(inner.rhs);
try self.addInstruction(.set_index);
try self.addInstruction(.{ .set_global = index });
}
},
.member => |member| {
try self.compileExpression(member.lhs.*);
const member_index = try self.addConstant(.{ .string = member.member });
try self.addInstruction(.{ .@"const" = member_index });
try self.compileExpression(inner.rhs);
try self.addInstruction(.set_member);
},
inline else => unreachable,
},
.block => |inner| {
// compile the block's statements & handle the scope depth
{
self.scope_context.current_depth += 1;
defer self.scope_context.current_depth -= 1;
for (inner.statements) |stmt| {
try self.compileStatement(stmt);
}
}
// pop after the block is done
while (self.scope_context.getLocalsCount() > 0 and self.scope_context.getLastLocal().depth > self.scope_context.current_depth) {
try self.addInstruction(.pop);
_ = self.scope_context.popLocal();
}
},
.@"return" => |inner| {
// todo: handle return values
_ = inner;
try self.addInstruction(.@"return");
},
.@"break" => {
if (self.scope_context.current_loop) |_| {
try self.addInstruction(.{ .jump = MaxOffset });
try self.scope_context.addBreak(try self.getLastInstruction());
} else {
self.reportError("break statement outside of loop", .{});
return Error.UnsupportedStatement;
}
},
.@"continue" => {
if (self.scope_context.current_loop) |_| {
try self.addInstruction(.{ .jump = MaxOffset });
try self.scope_context.addContinue(try self.getLastInstruction());
} else {
self.reportError("continue statement outside of loop", .{});
return Error.UnsupportedStatement;
}
},
inline else => return Error.UnsupportedStatement,
}
}
inline fn resolveAssignToInstr(self: *Self, token_value: Token) Error!opcodes.Instruction {
return switch (token_value) {
.plus_assignment => .add,
.minus_assignment => .sub,
.star_assignment => .mul,
.slash_assignment => .div,
.modulo_assignment => .mod,
.doublestar_assignment => .pow,
inline else => {
self.reportError("Unsupported assignment type: {s}", .{token_value});
return error.UnsupportedStatement;
},
};
}
/// Resolves a prefix operator its instruction equivalent
inline fn resolvePrefixToInstr(self: *Self, operator: ast.Operator) Error!opcodes.Instruction {
return switch (operator) {
.minus => .neg,
.not => .not,
inline else => {
self.reportError("unexpected operator: {s}", .{operator});
return error.InvalidInstruction;
},
};
}
/// Resolves an infix operator to its instruction equivalent
inline fn resolveInfixToInstr(self: *Self, operator: ast.Operator) Error!opcodes.Instruction {
return switch (operator) {
.plus => .add,
.minus => .sub,
.star => .mul,
.slash => .div,
.modulo => .mod,
.doublestar => .pow,
.equal => .eql,
.not_equal => .neql,
.less_than => .lt,
.less_than_equal => .lt_eql,
.greater_than => .gt,
.greater_than_equal => .gt_eql,
.@"and" => .@"and",
.@"or" => .@"or",
inline else => {
self.reportError("unexpected infix operator: {s}", .{operator});
return error.UnexpectedType;
},
};
}
/// Attempts to add a constant to the list of constants and return its index
fn addConstant(self: *Self, value: Value) Error!u16 {
// if it already exists, return the index
for (self.constants.items, 0..) |current, index| {
if (current.equal(value)) {
return @intCast(index);
}
}
self.constants.append(value) catch return Error.OutOfMemory;
return @intCast(self.constants.items.len - 1);
}
/// Compiles an expression to opcodes
fn compileExpression(self: *Self, expression: ast.Expression) Error!void {
switch (expression) {
.binary => |inner| {
try self.compileExpression(inner.lhs.*);
try self.compileExpression(inner.rhs.*);
const instr = try self.resolveInfixToInstr(inner.operator);
try self.addInstruction(instr);
},
.prefix => |inner| {
try self.compileExpression(inner.rhs.*);
const instr = try self.resolvePrefixToInstr(inner.operator);
try self.addInstruction(instr);
},
.if_expr => |inner| {
var jump_instr: CompiledInstruction = undefined;
var jif_instr: CompiledInstruction = undefined;
// if the condition is false, jump to the else block
const condition_data = inner.condition_list[0];
try self.compileExpression(condition_data.condition.*);
try self.addInstruction(.{ .jump_if_false = MaxOffset });
jif_instr = try self.getLastInstruction();
const jif_offset_start = self.instructions.items.len;
// compile body & add jump after the body
try self.compileIfBody(condition_data.body);
try self.addInstruction(.{ .jump = MaxOffset });
const jfwd_offset_start = self.instructions.items.len;
jump_instr = try self.getLastInstruction();
const jif_offset_end = self.instructions.items.len;
// if there's an else block, compile it. otherwise, just add a void instruction
if (inner.alternative) |alternative| {
try self.compileIfBody(alternative);
} else {
try self.addInstruction(.void);
}
const jfwd_offset_end = self.instructions.items.len;
try self.replace(jif_instr, .{ .jump_if_false = @intCast(jif_offset_end - jif_offset_start) });
try self.replace(jump_instr, .{ .jump = @intCast(jfwd_offset_end - jfwd_offset_start) });
},
.while_expr => |inner| {
var jif_target: CompiledInstruction = undefined;
// the loop should start before the condition
const loop_start_instr = try self.getLastInstruction();
self.scope_context.beginLoop(expression);
defer self.scope_context.endLoop();
try self.compileExpression(inner.condition.*);
try self.addInstruction(.{ .jump_if_false = MaxOffset });
jif_target = try self.getLastInstruction();
try self.compileStatement(inner.body.*);
const post_loop_expr = try self.getLastInstruction();
// if there's a post statement, compile it after the loop body
if (inner.post_stmt) |post_stmt| {
try self.compileStatement(post_stmt.*);
}
const last_loop_instr = try self.getLastInstruction();
const loop_start_offset: u16 = @intCast(last_loop_instr.nextInstructionIndex() - loop_start_instr.index);
try self.addInstruction(.{ .loop = @intCast(loop_start_offset) });
const end_loop_instr = try self.getLastInstruction();
const end_loop_offset: u16 = @intCast(end_loop_instr.index - jif_target.index);
try self.replace(jif_target, .{ .jump_if_false = end_loop_offset });
try self.scope_context.patchLoop(self, post_loop_expr, end_loop_instr);
// todo: only add a void instr if the loop body is empty
try self.addInstruction(.void);
},
.for_expr => |inner| {
// todo: list iteration
switch (inner.expr.*) {
.range => |range| {
var jif_target: CompiledInstruction = undefined;
// the loop should start before the condition
try self.compileExpression(range.start.*);
// todo: multi-capture
const capture_name = inner.captures[0].identifier;
const capture_offset = try self.scope_context.addLocal(capture_name, false);
self.scope_context.beginLoop(expression);
defer self.scope_context.endLoop();
const loop_start_instr = try self.getLastInstruction();
try self.compileExpression(range.end.*);
try self.addInstruction(.{ .get_local = capture_offset });
try self.addInstruction(if (range.inclusive) .gt_eql else .gt);
try self.addInstruction(.{ .jump_if_false = MaxOffset });
jif_target = try self.getLastInstruction();
try self.compileStatement(inner.body.*);
const post_loop_expr = try self.getLastInstruction();
// increment the capture variable
try self.addInstruction(.{ .get_local = capture_offset });
// todo: stepping?
const increment_const = try self.addConstant(.{ .number = 1 });
try self.addInstruction(.{ .@"const" = increment_const });
// todo: decrementing loops? e.g., 10..0
try self.addInstruction(.add);
try self.addInstruction(.{ .set_local = capture_offset });
const step_instr = try self.getLastInstruction();
try self.addInstruction(.{ .loop = @intCast(step_instr.nextInstructionIndex() - loop_start_instr.index) });
const loop_end_instr = try self.getLastInstruction();
// remove local after loop is done
try self.scope_context.removeLocal(capture_name);
try self.addInstruction(.pop);
// todo: only add a void instr if the loop body is empty
try self.addInstruction(.void);
try self.scope_context.patchLoop(self, post_loop_expr, loop_end_instr);
try self.replace(jif_target, .{ .jump_if_false = @intCast(loop_end_instr.index - jif_target.index) });
},
inline else => {
// self.diagnostics.report("expression {s} is not iterable", .{inner.expr});
// return Error.UnsupportedStatement;
// compile the expression and iterate over it
var jif_target: CompiledInstruction = undefined;
// the loop should start before the condition
try self.compileExpression(inner.expr.*);
// todo: multi-captures
// how should we handle multi-captures with dictionaries? (e.g., for (dict_1, dict_2) {})
const capture_value_name = inner.captures[0].identifier;
// const capture_key_name: ?[]const u8 = if (inner.captures.len > 1) inner.captures[1].identifier else null;
const capture_value_offset = try self.scope_context.addLocal(capture_value_name, false);
// const capture_key_offset: ?u16 = if (capture_key_name) |name| try self.scope_context.addLocal(
// name,
// false,
// ) else null;
self.scope_context.beginLoop(expression);
defer self.scope_context.endLoop();
try self.addInstruction(.iterable_begin);
const loop_start_instr = try self.getLastInstruction();
try self.addInstruction(.iterable_has_next);
try self.addInstruction(.{ .jump_if_false = MaxOffset });
jif_target = try self.getLastInstruction();
try self.addInstruction(.iterable_value);
try self.addInstruction(.{ .set_local = capture_value_offset });
// if (capture_key_offset) |offset| {
// try self.addInstruction(.iterable_key);
// try self.addInstruction(.{ .set_local = offset });
// }
try self.compileStatement(inner.body.*);
const post_loop_expr = try self.getLastInstruction();
try self.addInstruction(.iterable_next);
try self.addInstruction(.{ .loop = MaxOffset });
const loop_target = try self.getLastInstruction();
// remove locals after loop is done
try self.scope_context.removeLocal(capture_value_name);
// if (capture_key_name) |name| try self.scope_context.removeLocal(name);
try self.addInstruction(.iterable_end);
try self.addInstruction(.pop);
// todo: only add a void instr if the loop body is empty
try self.addInstruction(.void);
try self.scope_context.patchLoop(self, post_loop_expr, loop_target);
try self.replace(jif_target, .{ .jump_if_false = @intCast(loop_target.index - jif_target.index) });
try self.replace(loop_target, .{ .loop = @intCast(loop_target.nextInstructionIndex() - loop_start_instr.nextInstructionIndex()) });
},
}
},
.index => |value| {
try self.compileExpression(value.lhs.*);
try self.compileExpression(value.index.*);
try self.addInstruction(.get_index);
},
.member => |value| {
try self.compileExpression(value.lhs.*);
// compile identifier to string to prevent VM from trying to resolve it
// todo: we should clean up the indexing code
const index = try self.addConstant(.{ .string = value.member });
try self.addInstruction(.{ .@"const" = index });
try self.addInstruction(.get_member);
},
.number => |value| {
const index = try self.addConstant(.{ .number = value });
try self.addInstruction(.{ .@"const" = index });
},
.string => |value| {
const index = try self.addConstant(.{ .string = value });
try self.addInstruction(.{ .@"const" = index });
},
.list => |value| {
var index: usize = value.expressions.len;
while (index > 0) {
index -= 1;
try self.compileExpression(value.expressions[index]);
}
try self.addInstruction(.{ .list = @intCast(value.expressions.len) });
},
.dict => |dict| {
// compile the dictionary in reverse order so we can pop in the correct order
var index: usize = dict.keys.len;
while (index > 0) {
// we decrement before accessing to avoid underflows
index -= 1;
// fetch key and declare it
const key = dict.keys[index];
const key_index = try self.addConstant(.{ .string = if (key == .identifier) key.identifier else key.string });
try self.addInstruction(.{ .@"const" = key_index });
// compile value after key
const value = dict.values[index];
try self.compileExpression(value);
}
try self.addInstruction(.{ .dict = @intCast(dict.keys.len) });
},
.boolean => |value| try self.addInstruction(if (value) .true else .false),
.null => try self.addInstruction(.null),
.identifier => |value| {
if (self.scope_context.resolveLocalOffset(value)) |offset| {
try self.addInstruction(.{ .get_local = offset });
} else {
const index = try self.addConstant(.{ .identifier = value });
try self.addInstruction(.{ .get_global = index });
}
},
.builtin => |inner| {
const index = try self.addConstant(.{ .identifier = inner.name });
for (inner.arguments) |arg| {
try self.compileExpression(arg);
}
try self.addInstruction(.{ .call_builtin = .{
.constant_index = index,
.arg_count = @as(u16, @intCast(inner.arguments.len)),
} });
},
inline else => {
self.reportError("Unsupported expression type: {s}", .{expression});
return error.UnsupportedExpression;
},
}
}
/// Compiles an if body to opcodes
inline fn compileIfBody(self: *Self, body: ast.IfExpression.Body) Error!void {
switch (body) {
.block => |block| {
for (block.statements) |statement| {
try self.compileStatement(statement);
}
try self.addInstruction(.void);
},
.expression => |expr| try self.compileExpression(expr.*),
}
}
/// Helper function that compiles a source and tests it against a provided function
inline fn compileAndTest(source: []const u8, test_fn: *const fn (bytecode: Bytecode) anyerror!void) !void {
const ally = std.testing.allocator;
var program = ast.Program.init(ally);
defer program.deinit();
const result = try honey.parse(.{ .string = source }, .{
.allocator = ally,
.error_writer = std.io.getStdErr().writer().any(),
});
defer result.deinit();
var compiler = Self.init(ally, result.data);
defer compiler.deinit();
const bytecode = try compiler.compile();
try test_fn(bytecode);
}
/// Helper function that compiles a source and tests that it errors via a provided function
inline fn compileAndTestError(source: []const u8, test_fn: *const fn (bytecode_union: anytype) anyerror!void) !void {
const ally = std.testing.allocator;
var program = ast.Program.init(ally);
defer program.deinit();
const result = try honey.parse(.{ .string = source }, .{
.allocator = ally,
.error_writer = std.io.getStdErr().writer().any(),
});
defer result.deinit();
var compiler = Self.init(ally, result.data);
defer compiler.deinit();
const err = compiler.compile();
try test_fn(err);
}
test "test simple addition compilation" {
try compileAndTest("1 + 2", struct {
fn run(bytecode: Bytecode) anyerror!void {
const expected_bytes = opcodes.make(&[_]Instruction{
.{ .@"const" = 0x00 },
.{ .@"const" = 0x01 },
.add,
.pop,
});
try std.testing.expectEqualSlices(u8, expected_bytes, bytecode.instructions);
try std.testing.expectEqualSlices(Value, &.{ .{ .number = 1 }, .{ .number = 2 } }, bytecode.constants);
}
}.run);
}
test "ensure compiler errors on existing variable" {
const source =
\\{
\\ let test = 1;
\\ let test = 2;
\\}
;
try compileAndTestError(source, struct {
fn run(bytecode_union: anytype) anyerror!void {
try std.testing.expectError(Error.VariableAlreadyExists, bytecode_union);
}
}.run);
}
test "ensure compiler errors on reassignment of const variable" {
const source =
\\{
\\ const test = 1;
\\ test = 2;
\\}
;
try compileAndTestError(source, struct {
fn run(bytecode_union: anytype) anyerror!void {
try std.testing.expectError(Error.VariableAlreadyExists, bytecode_union);
}
}.run);
}
test "test simple list compilation" {
try compileAndTest("[1, 2, 3]", struct {
fn run(bytecode: Bytecode) anyerror!void {
// lists are compiled in reverse order so they can be popped and appended correctly
const expected_bytes = opcodes.make(&[_]Instruction{
.{ .@"const" = 0x00 },
.{ .@"const" = 0x01 },
.{ .@"const" = 0x02 },
.{ .list = 3 },
.pop,
});
try std.testing.expectEqualSlices(u8, expected_bytes, bytecode.instructions);
try std.testing.expectEqualSlices(Value, &.{ .{ .number = 3 }, .{ .number = 2 }, .{ .number = 1 } }, bytecode.constants);
}
}.run);
}
test "test simple list access compilation" {
const source =
\\{
\\ const test = [1, 2, 3];
\\ const value = test[1];
\\}
;
try compileAndTest(source, struct {
fn run(bytecode: Bytecode) anyerror!void {
const expected_bytes = opcodes.make(&[_]Instruction{
// const test = [1, 2, 3];
.{ .@"const" = 0x00 },
.{ .@"const" = 0x01 },
.{ .@"const" = 0x02 },
.{ .list = 3 },
// const value = test[1];
.{ .get_local = 0 },
.{ .@"const" = 0x02 },
.get_index,
.pop,
.pop,
});
try std.testing.expectEqualSlices(u8, expected_bytes, bytecode.instructions);
try std.testing.expectEqualSlices(Value, &.{ .{ .number = 3 }, .{ .number = 2 }, .{ .number = 1 } }, bytecode.constants);
}
}.run);
}
|
0 | repos/honey/src | repos/honey/src/compiler/opcodes.zig | const std = @import("std");
pub const Opcode = enum(u8) {
/// The `return` opcode is used to return from a function.
@"return" = 0x00,
/// The `const` opcode is used to push a constant value onto the stack.
@"const" = 0x01,
/// The `list` opcode is used to create a list from the values on the stack.
list = 0x02,
/// The `dict` opcode is used to create a dictionary from the values on the stack.
dict = 0x03,
/// The `pop` opcode is used to pop a value from the stack.
pop = 0x04,
/// The `jump` opcode is used to jump to an instruction.
jump = 0x05,
/// The `jump_if_false` opcode is used to jump to an instruction if the top of the stack is false.
/// The top of the stack is popped.
jump_if_false = 0x06,
/// The `loop` opcode is used to jump back `n` instructions.
loop = 0x07,
/// The `true` opcode is used to push a true value onto the stack.
true = 0x10,
/// The `false` opcode is used to push a false value onto the stack.
false = 0x11,
/// The `null` opcode is used to push a null value onto the stack.
null = 0x12,
/// The `void` opcode is used to push a void value onto the stack - this is used for functions or blocks that do not return a value.
void = 0x13,
/// The `add` opcode is used to add two values.
add = 0x20,
/// The `sub` opcode is used to subtract two values.
sub = 0x21,
/// The `mul` opcode is used to multiply two values.
mul = 0x22,
/// The `div` opcode is used to divide two values.
div = 0x23,
/// The `mod` opcode is used to calculate the remainder of two values.
mod = 0x24,
/// The `pow` opcode is used to calculate the power of two values.
pow = 0x25,
/// The `neg` opcode is used to negate a value (e.g., `-1`)
neg = 0x26,
/// The `eql` opcode is used to check if two values are equal.
eql = 0x30,
/// The `neql` opcode is used to check if two values are not equal.
neql = 0x31,
/// The `less_than` opcode is used to check if the first value is less than the second value.
lt = 0x32,
/// The `less_than_or_eql` opcode is used to check if the first value is less than or equal to the second value.
lt_eql = 0x33,
/// The `greater_than` opcode is used to check if the first value is greater than the second value.
gt = 0x34,
/// The `greater_than_or_eql` opcode is used to check if the first value is greater than or equal to the second value.
gt_eql = 0x35,
/// The `and` opcode is used to check if both values are true.
@"and" = 0x40,
/// The `or` opcode is used to check if either value is true.
@"or" = 0x41,
/// The `not` opcode is used to negate a value (e.g., `!true`).
not = 0x42,
/// The `call_builtin` opcode is used to call a builtin function.
call_builtin = 0x50,
/// The `declare_const` opcode is used to declare a global constant.
declare_const = 0x60,
/// The `declare_var` opcode is used to declare a global variable.
declare_var = 0x61,
/// The `set_global` opcode is used to set the value of a global variable.
set_global = 0x62,
/// The `get_global` opcode is used to resolve the value of a global variable.
get_global = 0x63,
/// The `set_local` opcode is used to set the value of a local variable.
set_local = 0x70,
/// The `get_local` opcode is used to get the value of a local variable.
get_local = 0x71,
/// The `set_index` opcode is used to set the value of a list.
set_index = 0x72,
/// The `get_index` opcode is used to get the value of a list.
get_index = 0x73,
/// The `set_member` opcode is used to set the value of a member in a class/dictionary.
set_member = 0x74,
/// The `get_member` opcode is used to get the value of a member in a class/dictionary.
get_member = 0x75,
/// The `iterable_begin` opcode is used to get the beginning of an iterable.
iterable_begin = 0x80,
/// The `iterable_end` opcode is used to get the end of an iterable.
iterable_end = 0x81,
/// The `iterable_next` opcode is used to get the next value of an iterable.
iterable_next = 0x82,
/// The `iterable_has_next` opcode is used to check if there is a next value in an iterable.
iterable_has_next = 0x83,
/// The `iterable_current` opcode is used to get the current value of an iterable.
iterable_value = 0x84,
/// The `iterable_key` opcode is used to get the key of an iterable.
iterable_key = 0x85,
/// Converts the given opcode to a byte.
pub fn byte(self: Opcode) u8 {
return @intFromEnum(self);
}
/// Returns the size of the opcode with its operands;
pub fn size(self: Opcode) usize {
return self.width() + 1;
}
/// Returns the width of the opcode.
pub fn width(self: Opcode) usize {
return switch (self) {
inline else => |inner| @sizeOf(inner.payload()),
};
}
/// Returns the payload of the opcode.
pub fn payload(self: Opcode) type {
@setEvalBranchQuota(3000);
return switch (self) {
inline else => |inner| std.meta.TagPayload(Instruction, inner),
};
}
/// Returns the opcode corresponding to the given byte.
pub fn fromByte(data: u8) !Opcode {
return try std.meta.intToEnum(Opcode, data);
}
/// Encodes the given opcode into a byte array.
pub fn encode(self: Opcode, writer: anytype) !void {
return try writer.writeByte(self.byte());
}
pub fn format(self: Opcode, _: []const u8, _: std.fmt.FormatOptions, writer: anytype) !void {
return switch (self) {
inline else => writer.writeAll(@tagName(self)),
};
}
};
pub const Instruction = union(Opcode) {
@"return": void,
@"const": u16,
list: u16,
dict: u16,
pop: void,
jump: u16,
jump_if_false: u16,
loop: u16,
true: void,
false: void,
null: void,
void: void,
add: void,
sub: void,
mul: void,
div: void,
mod: void,
pow: void,
neg: void,
eql: void,
neql: void,
lt: void,
lt_eql: void,
gt: void,
gt_eql: void,
@"and": void,
@"or": void,
not: void,
call_builtin: struct { constant_index: u16, arg_count: u16 },
declare_const: u16,
declare_var: u16,
set_global: u16,
get_global: u16,
set_local: u16,
get_local: u16,
set_index: void,
get_index: void,
set_member: void,
get_member: void,
iterable_begin: void,
iterable_end: void,
iterable_next: void,
iterable_has_next: void,
iterable_value: void,
iterable_key: void,
pub fn opcode(self: Instruction) Opcode {
return std.meta.stringToEnum(Opcode, @tagName(self)) orelse unreachable;
}
};
/// Encodes the given value into a byte array.
pub fn encode(value: anytype, writer: anytype) !void {
const ValueType = @TypeOf(value);
const value_type_info = @typeInfo(ValueType);
switch (value_type_info) {
.Int => try writer.writeInt(ValueType, value, .big),
.Float => {
const value_bytes = @as([@sizeOf(value)]u8, @bitCast(value));
try writer.writeAll(&value_bytes);
},
.Struct => |inner| {
inline for (inner.fields) |field| {
try encode(@field(value, field.name), writer);
}
},
.Void => {},
inline else => @panic("Unsupported type: " ++ @typeName(ValueType)),
}
}
/// Creates a program from the given instructions.
/// This is an inline function, so the byte array will not go out of scope when the function returns.
pub inline fn make(comptime instructions: []const Instruction) []const u8 {
// compute the size of the program at comptime
comptime var size: usize = 0;
inline for (instructions) |instruction| {
// size of the opcode + size of the instruction
const active_tag = comptime std.meta.activeTag(instruction);
const payload = std.meta.TagPayload(Instruction, active_tag);
size += @sizeOf(Opcode) + @sizeOf(payload);
}
var make_buf = [_]u8{0} ** size;
var stream = std.io.fixedBufferStream(&make_buf);
const writer = stream.writer();
inline for (instructions) |instruction| {
// size of the opcode + size of the instruction
const opcode: Opcode = comptime std.meta.activeTag(instruction);
opcode.encode(writer) catch @panic("Failed to encode opcode");
switch (instruction) {
inline else => |value| encode(value, writer) catch @panic("Failed to encode instruction"),
}
}
return &make_buf;
}
test "ensure make outputs the correct program" {
const program = make(&.{
.{ .@"const" = 0x00 },
.{ .@"const" = 0x01 },
.add,
});
// zig fmt: off
try std.testing.expectEqualSlices(u8, &.{
Opcode.@"const".byte(),
0x00, 0x00,
Opcode.@"const".byte(),
0x00, 0x01,
Opcode.add.byte(),
}, program);
}
test "ensure width outputs the correct operand width" {
try std.testing.expectEqual(@as(usize, @intCast(0)), Opcode.@"return".width());
try std.testing.expectEqual(@as(usize, @intCast(2)), Opcode.@"const".width());
} |
0 | repos/honey/src | repos/honey/src/compiler/Bytecode.zig | const std = @import("std");
const opcodes = @import("opcodes.zig");
const Opcode = opcodes.Opcode;
const Instruction = opcodes.Instruction;
const Value = @import("value.zig").Value;
const Self = @This();
/// The generated instructions
instructions: []const u8,
/// The constant pool for which the instructions can refer to
constants: []const Value,
/// Dumps the formatted instruction data into the provided writer
pub fn dump(self: Self, writer: anytype) !void {
try writer.print("{s}\n", .{self});
}
/// Dumps the raw instruction data into the provided writer
pub fn dumpRaw(self: Self, width: u8, writer: anytype) !void {
for (self.instructions, 1..) |byte, i| {
try writer.print("{x:0>2} ", .{byte});
if (i % width == 0) try writer.print("\n", .{});
}
}
/// Generates human-readable bytecode instructions as a string
pub fn format(self: Self, _: []const u8, _: std.fmt.FormatOptions, writer: anytype) !void {
var index: usize = 0;
while (index < self.instructions.len) {
const instruction = self.instructions[index];
try writer.print("{x:0>4}", .{index});
const opcode = Opcode.fromByte(instruction) catch std.debug.panic("unexpected opcode: 0x{x:0>2}", .{instruction});
index += 1;
try writer.print(" {s}", .{opcode});
const operands = self.instructions[index .. index + opcode.width()];
// formats the opcode
try self.formatOpcode(opcode, operands, writer);
index += opcode.width();
if (index < self.instructions.len) {
try writer.writeAll("\n");
}
}
}
fn formatOpcode(self: Self, opcode: Opcode, operands: []const u8, writer: anytype) !void {
if (opcode.width() <= 0) return;
switch (opcode) {
.@"const" => {
const const_idx = std.mem.readInt(u16, operands[0..2], .big);
try writer.print(" {s}", .{self.constants[const_idx]});
},
.list, .dict => {
const size = std.mem.readInt(u16, operands[0..2], .big);
try writer.print(" {d}", .{size});
},
.jump, .jump_if_false, .loop => {
const instr_idx = std.mem.readInt(u16, operands[0..2], .big);
try writer.print(" {x:0>4}", .{instr_idx});
},
.declare_const, .declare_var, .get_global, .set_global => {
const const_idx = std.mem.readInt(u16, operands[0..2], .big);
try writer.print(" {s}", .{self.constants[const_idx]});
},
.get_local, .set_local => {
const stack_slot = std.mem.readInt(u16, operands[0..2], .big);
try writer.print(" {d}", .{stack_slot});
},
.call_builtin => {
const const_idx = std.mem.readInt(u16, operands[0..2], .big);
const arg_count = std.mem.readInt(u16, operands[2..4], .big);
try writer.print(" {s} (arg count: {d})", .{ self.constants[const_idx], arg_count });
},
inline else => {},
}
}
test "ensure formatted instructions are correct" {
const expected =
\\0000 const 1
\\0003 const 2
\\0006 const 65535
;
var buf: [1024]u8 = undefined;
var stream = std.io.fixedBufferStream(&buf);
const writer = stream.writer();
const bytecode = Self{
.instructions = opcodes.make(&.{
.{ .@"const" = 0 },
.{ .@"const" = 1 },
.{ .@"const" = 2 },
}),
.constants = &.{
.{ .number = 1 },
.{ .number = 2 },
.{ .number = 65535 },
},
};
try std.fmt.format(writer, "{s}", .{bytecode});
try std.testing.expectEqualSlices(u8, expected, stream.getWritten());
}
|
0 | repos/honey/src | repos/honey/src/compiler/generate_md.zig | const std = @import("std");
const opcodes = @import("opcodes.zig");
const OutputPath = "src/compiler/ARCHITECTURE.md";
const Header =
\\ # Architecture
\\ This document describes the architecture of the virtual machine.
\\
\\ ## Instructions
\\
;
/// Generates the architecture documentation and dumps it to the output path.
pub fn main() !void {
var file = try std.fs.cwd().createFile(OutputPath, .{});
defer file.close();
var table = Table.init(std.heap.page_allocator);
defer table.deinit();
try table.addRow(&.{ "Name", "Opcode", "Operands" });
const instructions = @typeInfo(opcodes.Instruction).Union.fields;
inline for (instructions) |instruction| {
const opcode = comptime std.meta.stringToEnum(opcodes.Opcode, instruction.name).?;
try table.addRow(&.{
std.fmt.comptimePrint("`{s}`", .{instruction.name}),
std.fmt.comptimePrint("0x{x:0>2}", .{@intFromEnum(opcode)}),
comptime printTypeName(instruction.type),
});
}
try file.writeAll(Header);
try table.write(file.writer());
}
fn printTypeName(comptime T: type) []const u8 {
return switch (@typeInfo(T)) {
.Struct => |inner| name: {
const fields = inner.fields;
comptime var name: []const u8 = "";
inline for (fields, 0..) |field, index| {
name = name ++ printTypeName(field.type);
if (index != fields.len - 1) {
name = name ++ std.fmt.comptimePrint(", ", .{});
}
}
break :name name;
},
else => @typeName(T),
};
}
const Table = struct {
const String = []const u8;
const Row = struct {
data: std.ArrayList(String),
pub fn init(allocator: std.mem.Allocator, data: []const String) !Row {
var list = std.ArrayList(String).init(allocator);
for (data) |cell| {
try list.append(cell);
}
return .{ .data = list };
}
pub fn width(self: *Row) usize {
var total: usize = 0;
for (self.data.items) |cell| {
total += cell.len;
}
return total;
}
pub fn deinit(self: *Row) void {
self.data.deinit();
}
};
allocator: std.mem.Allocator,
rows: std.ArrayList(Row),
column_widths: std.ArrayList(usize),
pub fn init(allocator: std.mem.Allocator) Table {
return .{
.allocator = allocator,
.rows = std.ArrayList(Row).init(allocator),
.column_widths = std.ArrayList(usize).init(allocator),
};
}
pub fn deinit(self: *Table) void {
for (self.rows.items) |*row| {
row.deinit();
}
self.rows.deinit();
}
/// Adds a row to the table.
pub fn addRow(self: *Table, data: []const String) !void {
const row = try Row.init(self.allocator, data);
try self.rows.append(row);
}
/// Returns the number of columns in the table.
pub inline fn columnCount(self: *Table) usize {
return self.rows.items[0].data.items.len;
}
/// Returns the width of the given column.
pub inline fn calculateColumnWidths(self: *Table) !void {
if (self.rows.items.len == 0) {
return error.ExpectedRowData;
}
self.column_widths.clearAndFree();
const column_count = self.columnCount();
for (self.rows.items) |*row| {
for (row.data.items, 0..) |cell, column_index| {
if (column_index >= column_count) {
return error.UnmatchedColumnCount;
}
if (self.column_widths.items.len <= column_index) {
try self.column_widths.append(cell.len);
} else if (self.column_widths.items[column_index] < cell.len) {
self.column_widths.items[column_index] = cell.len;
}
}
}
}
pub inline fn writeDivider(writer: anytype, divider_width: usize) !void {
try writer.writeByteNTimes('-', divider_width);
try writer.writeByte('\n');
}
inline fn writeCell(self: *Table, writer: anytype, cell: String, index: usize, width: usize) !void {
try writer.writeByte('|');
try writer.writeByte(' ');
try writer.print("{s}", .{cell});
// subtract the cell length and add 1 for the space
try writer.writeByteNTimes(' ', width - cell.len + 1);
if (index == self.columnCount() - 1) {
try writer.writeByte('|');
}
}
pub inline fn writeCrossedDivider(self: *Table, writer: anytype) !void {
for (self.column_widths.items, 0..) |width, column| {
try writer.writeByte('|');
try writer.writeByte(' ');
try writer.writeByteNTimes('-', width);
try writer.writeByte(' ');
if (column == self.columnCount() - 1) {
try writer.writeByte('|');
}
}
try writer.writeByte('\n');
}
/// Writes the table to the given writer.
pub fn write(self: *Table, writer: anytype) !void {
try self.calculateColumnWidths();
for (self.rows.items, 0..) |*row, row_index| {
if (row_index == 1) {
try self.writeCrossedDivider(writer);
}
for (row.data.items, 0..) |cell, column_index| {
try self.writeCell(
writer,
cell,
column_index,
self.column_widths.items[column_index],
);
}
try writer.writeByte('\n');
}
}
};
|
0 | repos/honey/src | repos/honey/src/compiler/ARCHITECTURE.md | # Architecture
This document describes the architecture of the virtual machine.
## Instructions
| Name | Opcode | Operands |
| --------------- | ------ | -------- |
| `return` | 0x00 | void |
| `const` | 0x01 | u16 |
| `list` | 0x02 | u16 |
| `dict` | 0x03 | u16 |
| `pop` | 0x04 | void |
| `jump` | 0x05 | u16 |
| `jump_if_false` | 0x06 | u16 |
| `loop` | 0x07 | u16 |
| `true` | 0x10 | void |
| `false` | 0x11 | void |
| `null` | 0x12 | void |
| `void` | 0x13 | void |
| `add` | 0x20 | void |
| `sub` | 0x21 | void |
| `mul` | 0x22 | void |
| `div` | 0x23 | void |
| `mod` | 0x24 | void |
| `pow` | 0x25 | void |
| `neg` | 0x26 | void |
| `eql` | 0x30 | void |
| `neql` | 0x31 | void |
| `lt` | 0x32 | void |
| `lt_eql` | 0x33 | void |
| `gt` | 0x34 | void |
| `gt_eql` | 0x35 | void |
| `and` | 0x40 | void |
| `or` | 0x41 | void |
| `not` | 0x42 | void |
| `call_builtin` | 0x50 | u16, u16 |
| `declare_const` | 0x60 | u16 |
| `declare_var` | 0x61 | u16 |
| `set_global` | 0x62 | u16 |
| `get_global` | 0x63 | u16 |
| `set_local` | 0x70 | u16 |
| `get_local` | 0x71 | u16 |
| `set_index` | 0x72 | void |
| `get_index` | 0x73 | void |
| `set_member` | 0x74 | void |
| `get_member` | 0x75 | void |
|
0 | repos/honey/src | repos/honey/src/compiler/value.zig | const std = @import("std");
pub const Value = union(enum) {
pub const Error = error{
ExpectedNumber,
ExpectedString,
ExpectedBoolean,
UnexpectedType,
OutOfMemory,
};
pub const True = Value{ .boolean = true };
pub const False = Value{ .boolean = false };
pub const Null = Value{ .null = {} };
pub const Void = Value{ .void = {} };
pub const ListMap = std.AutoArrayHashMap(usize, Value);
pub const DictMap = std.StringArrayHashMap(Value);
/// `constant` represents an index to a constant in the constant pool.
/// This constant is a value that is known at compile time.
constant: u16,
/// `number` represents a numerical value, both integers and floats.
number: f64,
/// `boolean` represents a boolean value (true or false).
boolean: bool,
/// `null` represents the null value and will be used for optional values.
null: void,
/// `void` represents the void value and will be used for functions that do not return a value.
void: void,
/// `string` represents a string object.
string: []const u8,
/// `identifier` represents an identifier.
identifier: []const u8,
/// `list` represents a list of values
list: ListMap,
/// `dict` represents a dictionary of values
dict: DictMap,
/// Calculates the maximum width of the payload in bytes.
pub inline fn maxWidth() usize {
comptime var max_width: usize = 0;
inline for (std.enums.values(Value)) |value| {
const current_width = value.width();
if (current_width > max_width) max_width = current_width;
}
return max_width;
}
/// Returns the width of the payload in bytes.
pub fn width(self: Value) usize {
return switch (self) {
inline else => |inner| @as(usize, @sizeOf(@TypeOf(inner))),
};
}
pub fn isVoid(self: Value) bool {
return self == .void;
}
/// Checks if two values are equal.
pub fn equal(self: Value, other: Value) bool {
return switch (self) {
.number => |value| if (other == .number) value == other.number else false,
.boolean => |value| if (other == .boolean) value == other.boolean else false,
.null => other == .null,
// todo: string hash comparison
.string => |value| if (other == .string) std.mem.eql(u8, value, other.string) else false,
.list => |value| {
if (other != .list or value.count() != other.list.count()) {
return false;
}
var value_iterator = value.iterator();
while (value_iterator.next()) |value_entry| {
// get other entry from current entry's key
const other_entry = other.list.get(value_entry.key_ptr.*);
if (other_entry == null) {
return false;
}
if (value_entry.value_ptr.* == .string and other_entry.? == .string) {}
if (!value_entry.value_ptr.equal(other_entry.?)) return false;
}
return true;
},
.dict => |value| {
if (other != .dict or value.count() != other.dict.count()) {
return false;
}
// todo: implement dict comparison
return true;
},
inline else => false,
};
}
pub fn plus(self: Value, other: Value) Error!Value {
return switch (self) {
.number => |value| switch (other) {
.number => |other_value| .{ .number = value + other_value },
inline else => return error.ExpectedNumber,
},
inline else => return error.UnexpectedType,
};
}
pub fn minus(self: Value, other: Value) Error!Value {
if (self == .number and other == .number) {
return .{ .number = self.number - other.number };
}
return error.ExpectedNumber;
}
pub fn multiply(self: Value, other: Value) Error!Value {
if (self == .number and other == .number) {
return .{ .number = self.number * other.number };
}
return error.ExpectedNumber;
}
pub fn divide(self: Value, other: Value) Error!Value {
if (self == .number and other == .number) {
return .{ .number = self.number / other.number };
}
return error.ExpectedNumber;
}
pub fn modulo(self: Value, other: Value) Error!Value {
if (self == .number and other == .number) {
return .{ .number = @mod(self.number, other.number) };
}
return error.ExpectedNumber;
}
pub fn power(self: Value, other: Value) Error!Value {
if (self == .number and other == .number) {
return .{ .number = std.math.pow(@TypeOf(self.number), self.number, other.number) };
}
return error.ExpectedNumber;
}
pub fn @"or"(self: Value, other: Value) Error!Value {
if (self == .boolean and other == .boolean) {
return .{ .boolean = self.boolean or other.boolean };
}
return error.ExpectedBoolean;
}
pub fn @"and"(self: Value, other: Value) Error!Value {
if (self == .boolean and other == .boolean) {
return .{ .boolean = self.boolean and other.boolean };
}
return error.ExpectedBoolean;
}
pub fn not(self: Value) Error!Value {
if (self == .boolean) {
return .{ .boolean = !self.boolean };
}
return error.ExpectedBoolean;
}
pub fn greaterThan(self: Value, other: Value) Error!Value {
if (self == .number and other == .number) {
return .{ .boolean = self.number > other.number };
}
return error.ExpectedNumber;
}
pub fn greaterThanEqual(self: Value, other: Value) Error!Value {
if (self == .number and other == .number) {
return .{ .boolean = self.number >= other.number };
}
return error.ExpectedNumber;
}
pub fn lessThan(self: Value, other: Value) Error!Value {
if (self == .number and other == .number) {
return .{ .boolean = self.number < other.number };
}
return error.ExpectedNumber;
}
pub fn lessThanEqual(self: Value, other: Value) Error!Value {
if (self == .number and other == .number) {
return .{ .boolean = self.number <= other.number };
}
return error.ExpectedNumber;
}
pub fn concat(self: Value, other: Value, allocator: std.mem.Allocator) Error!Value {
if (self != .string or other != .string) return error.ExpectedString;
const value = std.mem.concat(allocator, u8, &.{ self.string, other.string }) catch return error.OutOfMemory;
errdefer allocator.free(value);
return .{ .string = value };
}
/// Formats a value.
pub fn format(self: Value, _: []const u8, _: std.fmt.FormatOptions, writer: anytype) !void {
switch (self) {
.number => |value| try writer.print("{d}", .{value}),
.boolean => |value| try writer.writeAll(if (value) "true" else "false"),
.null => try writer.writeAll("null"),
.void => try writer.writeAll("void"),
.string => |value| try writer.print("\"{s}\"", .{value}),
.identifier => |value| try writer.print("{s}", .{value}),
.list => |value| {
var iterator = value.iterator();
var index: usize = 0;
try writer.writeAll("[");
while (iterator.next()) |entry| : (index += 1) {
try writer.print("{s}", .{entry.value_ptr});
if (index < value.count() - 1) {
try writer.writeAll(", ");
}
}
try writer.writeAll("]");
},
.dict => |value| {
var iterator = value.iterator();
try writer.writeAll("{");
var index: usize = 0;
while (iterator.next()) |entry| : (index += 1) {
try writer.print(" {s}: {s}", .{ entry.key_ptr.*, entry.value_ptr });
if (index < value.count() - 1) {
try writer.writeAll(",");
}
}
try writer.writeAll(" }");
},
inline else => try writer.print("{s}", .{@tagName(self)}),
}
}
/// Returns the name of the type associated with the value
pub fn typeName(self: Value) []const u8 {
return switch (self) {
// todo: return class names
inline else => @tagName(self),
};
}
};
|
0 | repos | repos/ScriptHookVZig/CHANGELOG.md | <!-- insertion marker -->
## [0.2.0](https://github.com/nitanmarcel/ScriptHookVZig/releases/tag/0.2.0) - 2024-06-15
<small>[Compare with v0.0.1](https://github.com/nitanmarcel/ScriptHookVZig/compare/v0.0.1...0.2.0)</small>
### Added
- Add documentation ([2578064](https://github.com/nitanmarcel/ScriptHookVZig/commit/2578064efeb54f744748ea665e0c0391aefb7e9a) by Marcel Alexandru Nitan).
### Fixed
- Fix multiline docs ([7d070da](https://github.com/nitanmarcel/ScriptHookVZig/commit/7d070da74319e6915f0440094b9db6b9cd75a962) by Marcel Alexandru Nitan).
- Fix missing natives ([d8e344d](https://github.com/nitanmarcel/ScriptHookVZig/commit/d8e344d5459ac257dc8d91477f46574c3e8ddec2) by Marcel Alexandru Nitan).
### Changed
- Change the symbol reading handling ([05bd62f](https://github.com/nitanmarcel/ScriptHookVZig/commit/05bd62f02ef24f9ad4792af759fbc4ed6231b341) by Marcel Alexandru Nitan).
## [v0.0.1](https://github.com/nitanmarcel/ScriptHookVZig/releases/tag/v0.0.1) - 2024-06-13
<small>[Compare with first commit](https://github.com/nitanmarcel/ScriptHookVZig/compare/617e544d00010b84c89beb1888d7e32995b6875d...v0.0.1)</small>
### Added
- Add documented natives from gta5-nativedb-data ([dbc453a](https://github.com/nitanmarcel/ScriptHookVZig/commit/dbc453a4e586ae4415ae09a2dc4b946b9d4a70a7) by Marcel Alexandru Nitan).
### Fixed
- Fix README preview ([231bec3](https://github.com/nitanmarcel/ScriptHookVZig/commit/231bec3aa43fc92d1044e23a8e43346aec0870f3) by Nitan Alexandru Marcel).
## [0.0.1](https://github.com/nitanmarcel/ScriptHookVZig/releases/tag/0.0.1) - 2024-06-13
<small>[Compare with first commit](https://github.com/nitanmarcel/ScriptHookVZig/compare/617e544d00010b84c89beb1888d7e32995b6875d...0.0.1)</small>
### Added
- Add documented natives from gta5-nativedb-data ([dbc453a](https://github.com/nitanmarcel/ScriptHookVZig/commit/dbc453a4e586ae4415ae09a2dc4b946b9d4a70a7) by Marcel Alexandru Nitan).
### Fixed
- Fix README preview ([231bec3](https://github.com/nitanmarcel/ScriptHookVZig/commit/231bec3aa43fc92d1044e23a8e43346aec0870f3) by Nitan Alexandru Marcel).
|
0 | repos | repos/ScriptHookVZig/README.md | # ScriptHookVZig
Develop GTA V mods with the help of Zig
- [ScriptHookVZig](#scripthookvzig)
- [Requirements](#requirements)
- [Usage](#usage)
- [Adding to build.zig.zon](#adding-to-buildzigzon)
- [Adding to build.zig](#adding-to-buildzig)
- [Your first script](#your-first-script)
- [Documentation](#documentation)
- [Thanks](#thanks)
- [LICENSE](#license)
## Requirements
- Zig 0.12.0=>
- [ScriptHookV v1.0.3179.0](http://www.dev-c.com/gtav/scripthookv/) and it's [requirements](https://gtaforums.com/topic/932648-script-hook-v/)
## Usage
### Adding to build.zig.zon
```zig
zig fetch git+https://github.com/nitanmarcel/ScriptHookVZig#{LastCommitHash} -- save
```
### Adding to build.zig
```zig
// Shared/Dynamic library is required
const lib = b.addSharedLibrary(.{
.name = "{name}",
.root_source_file = b.path("src/root.zig"),
.target = target,
.optimize = optimize,
});
// Add ScriptHookVZig as a dependency
const shvz_dep = b.dependency("shvz", .{});
// Import is as a module
lib.root_module.addImport("shvz", shvz_dep.module("shvz"));
// Save the dll
b.installArtifact(lib);
// Copy bin/{name}.dll (zig-0.13.0 and above) / lib/{name}.dll (zig-0.12.0) to the GTA root folder where ScriptHookV.dll is located and rename the library extension to .asi: {name}.dll -> {name}.asi
```
### Your first script
```zig
// import the module
const shvz = @import("shvz");
// Create the script main function
pub export fn scriptMain() void {}
pub const DLL_PROCESS_ATTACH: std.os.windows.DWORD = 1;
pub const DLL_THREAD_ATTACH: std.os.windows.DWORD = 2;
pub const DLL_THREAD_DETACH: std.os.windows.DWORD = 3;
pub const DLL_PROCESS_DETACH: std.os.windows.DWORD = 4;
/// Main entry point. Will be loaded by ScriptHookV.dll
pub fn DllMain(hInstance: std.os.windows.HINSTANCE, reason: std.os.windows.DWORD, lpReserved: std.os.windows.LPVOID) std.os.windows.BOOL {
_ = lpReserved;
switch (reason) {
DLL_PROCESS_ATTACH => {
// shvz.init() REQUIRED
// It handles opening the ScriptHookV.dll library and read symbols from it
shvz.init() catch |e| { };
// register the script's entry point
shvz.main.scriptRegister(hInstance, scriptMain);
},
DLL_PROCESS_DETACH => {
// Unregister the script's entry point
// Call this before shvz.deInit() to ensure taht we didn't unloaded ScriptHookV.dll library.
shvz.main.scriptUnregister(scriptMain);
// call shvz.deInit() REQUIRED
// Will close the loaded ScriptHookV.dll library freeing memory
shvz.deinit();
},
else => {},
}
return std.os.windows.TRUE;
}
```
## Documentation
- You can find a set of examples (C) and a readme in the [ScriptHookV SDK](http://www.dev-c.com/gtav/scripthookv/) archive and help on [gtaforums](https://gtaforums.com).
- Natives are documented on [Github Pages](https://nitanmarcel.github.io/ScriptHookVZig/#natives.natives)
- The example project in here only showcases the setup for this respective zig library.
## Thanks
- [Alexander Blade - Script Hook V](http://www.dev-c.com).
- Discord Zig - For guiding me with some things.
- [c2z](https://github.com/lassade/c2z/) - Helped in the translation of over 6000 native methods from ScriptHookV sdk.
- [alloc8or](https://github.com/alloc8or/gta5-nativedb-data) - Most of the native methods are pulled from his [gta5-nativedb-data repo](https://github.com/alloc8or/gta5-nativedb-data/blob/master/natives.json)
## LICENSE
- MIT
|
0 | repos | repos/ScriptHookVZig/build.zig.zon | .{
.name = "ScriptHookVZig",
// This is a [Semantic Version](https://semver.org/).
// In a future version of Zig it will be used for package deduplication.
.version = "0.0.1",
// This field is optional.
// This is currently advisory only; Zig does not yet do anything
// with this value.
//.minimum_zig_version = "0.11.0",
// This field is optional.
// Each dependency must either provide a `url` and `hash`, or a `path`.
// `zig build --fetch` can be used to fetch all dependencies of a package, recursively.
// Once all dependencies are fetched, `zig build` no longer requires
// internet connectivity.
.dependencies = .{
// See `zig fetch --save <url>` for a command-line interface for adding dependencies.
//.example = .{
// // When updating this field to a new URL, be sure to delete the corresponding
// // `hash`, otherwise you are communicating that you expect to find the old hash at
// // the new URL.
// .url = "https://example.com/foo.tar.gz",
//
// // This is computed from the file contents of the directory of files that is
// // obtained after fetching `url` and applying the inclusion rules given by
// // `paths`.
// //
// // This field is the source of truth; packages do not come from a `url`; they
// // come from a `hash`. `url` is just one of many possible mirrors for how to
// // obtain a package matching this `hash`.
// //
// // Uses the [multihash](https://multiformats.io/multihash/) format.
// .hash = "...",
//
// // When this is provided, the package is found in a directory relative to the
// // build root. In this case the package's hash is irrelevant and therefore not
// // computed. This field and `url` are mutually exclusive.
// .path = "foo",
// // When this is set to `true`, a package is declared to be lazily
// // fetched. This makes the dependency only get fetched if it is
// // actually used.
// .lazy = false,
//},
},
// Specifies the set of files and directories that are included in this package.
// Only files and directories listed here are included in the `hash` that
// is computed for this package.
// Paths are relative to the build root. Use the empty string (`""`) to refer to
// the build root itself.
// A directory listed here means that all files within, recursively, are included.
.paths = .{
// This makes *all* files, recursively, included in this package. It is generally
// better to explicitly list the files and directories instead, to insure that
// fetching from tarballs, file system paths, and version control all result
// in the same contents hash.
"",
// For example...
//"build.zig",
//"build.zig.zon",
//"src",
//"LICENSE",
//"README.md",
},
}
|
0 | repos | repos/ScriptHookVZig/build.zig | const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
// Compile a library to allow building docs
const natives_lib = b.addSharedLibrary(.{
.name = "shvz",
.root_source_file = b.path("src/shvz.zig"),
.target = target,
.optimize = optimize,
});
b.installDirectory(.{
.source_dir = natives_lib.getEmittedDocs(),
.install_dir = .prefix,
.install_subdir = "docs",
});
// MODULE
_ = b.addModule("shvz", .{ .root_source_file = b.path("src/shvz.zig") });
}
|
0 | repos/ScriptHookVZig | repos/ScriptHookVZig/scripts/gen_natives.py | import urllib.request
import json
import os
import subprocess
JSON_URL = "https://raw.githubusercontent.com/alloc8or/gta5-nativedb-data/master/natives.json"
NATIVES_PATH = os.path.join(os.path.dirname(__file__), "../src/natives.zig")
TYPE_MAPPINGS = {
"bool": "bool",
"char": "u8",
"signed char": "i8",
"unsigned char": "u8",
"short": "c_short",
"unsigned short": "c_ushort",
"int": "c_int",
"unsigned int": "c_uint",
"long": "c_long",
"unsigned long": "c_ulong",
"long long": "c_longlong",
"unsigned long long": "c_ulonglong",
"float": "f32",
"double": "f64",
"long double": "c_longdouble",
"int8_t": "i8",
"uint8_t": "u8",
"int16_t": "i16",
"uint16_t": "u16",
"int32_t": "i32",
"uint32_t": "u32",
"int64_t": "i64",
"uint64_t": "u64",
"__int128": "i128",
"unsigned __int128": "u128",
"intptr_t": "isize",
"uintptr_t": "usize",
"size_t": "usize",
"va_list": "[*c]u8",
"__va_list_tag": "[*c]u8",
"ptrdiff_t": "isize",
"ssize_t": "isize",
"std::vector": "cpp.Vector",
"std::array": "cpp.Array",
"std::string": "cpp.String",
"Any": "types.Any",
"uint": "types.uint",
"Hash": "types.Hash",
"Entity": "types.Entity",
"Player": "types.Player",
"FireId": "types.FireId",
"Ped": "types.Ped",
"Vehicle": "types.Vehicle",
"Cam": "types.Cam",
"CarGenerator": "types.CarGenerator",
"Group": "types.Group",
"Train": "types.Train",
"Pickup": "types.Pickup",
"Object": "types.Object",
"Weapon": "types.Weapon",
"Interior": "types.Interior",
"Blip": "types.Blip",
"Texture": "types.Texture",
"TextureDict": "types.TextureDict",
"CoverPoint": "types.CoverPoint",
"Camera": "types.Camera",
"TaskSequence": "types.TaskSequence",
"ColourIndex": "types.ColourIndex",
"Sphere": "types.Sphere",
"ScrHandle": "types.ScrHandle",
"Vector3": "types.Vector3",
"BOOL": "windows.BOOL"
}
IDS = [
"SYSTEM", "APP", "AUDIO", "BRAIN", "CAM", "CLOCK", "CUTSCENE", "DATAFILE", "DECORATOR",
"DLC", "ENTITY", "EVENT", "FILES", "FIRE", "GRAPHICS", "HUD", "INTERIOR", "ITEMSET",
"LOADINGSCREEN", "LOCALIZATION", "MISC", "MOBILE", "MONEY", "NETSHOPPING", "NETWORK",
"OBJECT", "PAD", "PATHFIND", "PED", "PHYSICS", "PLAYER", "RECORDING", "REPLAY",
"SAVEMIGRATION", "SCRIPT", "SECURITY", "SHAPETEST", "SOCIALCLUB", "STATS", "STREAMING",
"TASK", "VEHICLE", "WATER", "WEAPON", "ZONE"
]
def convert_type(type):
is_const = type.startswith("const")
is_pointer = type.endswith("*")
if is_const:
type = type[len("const "):].rstrip("*")
if is_pointer:
type = type.rstrip("*")
type = TYPE_MAPPINGS.get(type, type)
if is_const:
type = f"const {type}"
if is_pointer:
type = f"[*c]{type}"
return type
def convert_return_type(type):
return "void" if type == "void" else convert_type(type)
def write_comment(io, comment):
if comment:
io.write(f"\t/// {comment}\n")
io.write("\t///\n")
def write_struct_start(io, name):
io.write(f"pub const {name} = struct {{\n")
def write_struct_end(io):
io.write("\n};\n\n")
def write_func(io, hash, comments, name, aliases, params, return_type):
for comment in comments:
write_comment(io, comment)
for alias in aliases:
write_comment(io, f"Used to be known as {alias}")
joined_params = ', '.join(f"@\"{param['name']}\": {convert_type(param['type'])}" for param in params) if params else ""
io.write(f"\tpub fn {name}({joined_params}) {convert_return_type(return_type)} {{\n")
joined_param_names = f"@as(u64, @intCast({int(hash, 16)}))"
if params:
joined_param_names += ", " + ', '.join(f'@"{param['name']}"' for param in params)
invoke_statement = "_ = nativeCaller.invoke" if return_type == "void" else "return nativeCaller.invoke"
io.write(f"\t\t{invoke_statement}{len(params)}({joined_param_names});\n")
io.write("\t}\n")
with urllib.request.urlopen(JSON_URL) as response:
natives = json.load(response)
with open(NATIVES_PATH, "w") as out_file:
out_file.write('const std = @import("std");\n')
out_file.write('const nativeCaller = @import("nativeCaller.zig");\n')
out_file.write('const types = @import("types.zig");\n')
out_file.write('const windows = std.os.windows;\n\n');
for id in IDS:
namespace = natives[id]
write_struct_start(out_file, id)
for hash, details in namespace.items():
comments = details.get("comment", "").split("\n")
name = details["name"]
params = details.get("params", [])
return_type = details["return_type"]
old_names = details.get("old_names", [])
write_func(out_file, hash, comments, name, old_names, params, return_type)
write_struct_end(out_file)
subprocess.run(["zig", "fmt", NATIVES_PATH]) |
0 | repos/ScriptHookVZig | repos/ScriptHookVZig/example/build.zig.zon | .{
.name = "example",
.version = "0.0.0",
.dependencies = .{
.shvz = .{
.path = "../",
},
.logz = .{
.url = "git+https://github.com/karlseguin/log.zig.git#adc6910d2e8f50e0ec5a4792d6a7136f46778061",
.hash = "1220a5687ab17f0691a64d19dfd7be1299df64d2e030bf7d56a7e0be041fbb289845",
},
},
.paths = .{
"",
},
}
|
0 | repos/ScriptHookVZig | repos/ScriptHookVZig/example/build.zig | const std = @import("std");
pub fn build(b: *std.Build) void {
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
// Shared/Dynamic library is required
const lib = b.addSharedLibrary(.{
.name = "example",
.root_source_file = b.path("src/root.zig"),
.target = target,
.optimize = optimize,
});
// Add ScriptHookVZig as a dependency
const shvz_dep = b.dependency("shvz", .{});
// Import is as a module
lib.root_module.addImport("shvz", shvz_dep.module("shvz"));
// https://github.com/karlseguin/log.zig
const logz = b.dependency("logz", .{});
lib.root_module.addImport("logz", logz.module("logz"));
b.installArtifact(lib);
}
|
0 | repos/ScriptHookVZig/example | repos/ScriptHookVZig/example/src/root.zig | const std = @import("std");
const shvz = @import("shvz");
// Script entry point
pub export fn scriptMain() void {
var c_string = "Hello World".*;
var c_text_entry = "STRING".*;
// Start loop
while (true) {
// Write text on the screen.
// All of this and more usage examples can be found in the ScriptHookV sdk: http://www.dev-c.com/gtav/scripthookv/
shvz.natives.HUD.SET_TEXT_FONT(0);
shvz.natives.HUD.SET_TEXT_SCALE(0.55, 0.55);
shvz.natives.HUD.SET_TEXT_COLOUR(255, 255, 255, 255);
shvz.natives.HUD.SET_TEXT_WRAP(0.0, 1.0);
shvz.natives.HUD.SET_TEXT_CENTRE(std.os.windows.TRUE);
shvz.natives.HUD.SET_TEXT_DROPSHADOW(0, 0, 0, 0, 0);
shvz.natives.HUD.SET_TEXT_EDGE(1, 0, 0, 0, 205);
shvz.natives.HUD.BEGIN_TEXT_COMMAND_DISPLAY_TEXT(&c_text_entry);
shvz.natives.HUD.ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(&c_string);
shvz.natives.HUD.END_TEXT_COMMAND_DISPLAY_TEXT(0.5, 0.5, 0);
// Wait 0 seconds.
shvz.main.WAIT(0);
}
}
// Required for the main entry point;
pub const DLL_PROCESS_ATTACH: std.os.windows.DWORD = 1;
pub const DLL_THREAD_ATTACH: std.os.windows.DWORD = 2;
pub const DLL_THREAD_DETACH: std.os.windows.DWORD = 3;
pub const DLL_PROCESS_DETACH: std.os.windows.DWORD = 4;
/// Main entry point. Will be loaded by ScriptHookV.dll
pub export fn DllMain(hInstance: std.os.windows.HINSTANCE, reason: std.os.windows.DWORD, lpReserved: std.os.windows.LPVOID) std.os.windows.BOOL {
_ = lpReserved;
switch (reason) {
DLL_PROCESS_ATTACH => {
// shvz.init() REQUIRED
// It handles opening the ScriptHookV.dll library and read symbols from it
shvz.init() catch {};
// register the script's entry point
shvz.main.scriptRegister(hInstance, scriptMain);
},
DLL_PROCESS_DETACH => {
// Unregister the script's entry point
// Call this before shvz.deInit() to ensure taht we didn't unloaded ScriptHookV.dll library.
shvz.main.scriptUnregister(scriptMain);
// call shvz.deInit() REQUIRED
// Will close the loaded ScriptHookV.dll library freeing memory
shvz.deinit();
},
else => {},
}
return std.os.windows.TRUE;
}
|
0 | repos/ScriptHookVZig | repos/ScriptHookVZig/src/nativeCaller.zig | const std = @import("std");
const utils = @import("utils.zig");
fn nativeCall() u64 {
const call = utils.findSymbol(*const fn () callconv(.C) u64, "?nativeCall@@YAPEA_KXZ");
return call.?();
}
fn nativeInit(hash: u64) void {
const call = utils.findSymbol(*const fn (u64) callconv(.C) void, "?nativeInit@@YAX_K@Z");
call.?(hash);
}
fn nativePush64(val: u64) void {
const call = utils.findSymbol(*const fn (u64) callconv(.C) void, "?nativePush64@@YAX_K@Z");
call.?(val);
}
pub fn nativePush(val: anytype) void {
if (@sizeOf(@TypeOf(val)) > @sizeOf(u64)) {
@compileError("val is larger than u64");
}
var v64: u64 = 0;
const src = std.mem.asBytes(&val);
@memcpy(std.mem.asBytes(&v64)[0..src.len], src);
nativePush64(v64);
}
pub fn invoke0(hash: u64) type {
nativeInit(hash);
return nativeCall();
}
pub fn invoke1(hash: u64, T1: anytype) u64 {
nativeInit(hash);
nativePush(T1);
return nativeCall();
}
pub fn invoke2(hash: u64, T1: anytype, T2: anytype) u64 {
nativeInit(hash);
nativePush(T1);
nativePush(T2);
return nativeCall();
}
pub fn invoke3(hash: u64, T1: anytype, T2: anytype, T3: anytype) u64 {
nativeInit(hash);
nativePush(T1);
nativePush(T2);
nativePush(T3);
return nativeCall();
}
pub fn invoke4(hash: u64, T1: anytype, T2: anytype, T3: anytype, T4: anytype) u64 {
nativeInit(hash);
nativePush(T1);
nativePush(T2);
nativePush(T3);
nativePush(T4);
return nativeCall();
}
pub fn invoke5(hash: u64, T1: anytype, T2: anytype, T3: anytype, T4: anytype, T5: anytype) u64 {
nativeInit(hash);
nativePush(T1);
nativePush(T2);
nativePush(T3);
nativePush(T4);
nativePush(T5);
return nativeCall();
}
pub fn invoke6(hash: u64, T1: anytype, T2: anytype, T3: anytype, T4: anytype, T5: anytype, T6: anytype) u64 {
nativeInit(hash);
nativePush(T1);
nativePush(T2);
nativePush(T3);
nativePush(T4);
nativePush(T5);
nativePush(T6);
return nativeCall();
}
pub fn invoke7(hash: u64, T1: anytype, T2: anytype, T3: anytype, T4: anytype, T5: anytype, T6: anytype, T7: anytype) u64 {
nativeInit(hash);
nativePush(T1);
nativePush(T2);
nativePush(T3);
nativePush(T4);
nativePush(T5);
nativePush(T6);
nativePush(T7);
return nativeCall();
}
pub fn invoke8(hash: u64, T1: anytype, T2: anytype, T3: anytype, T4: anytype, T5: anytype, T6: anytype, T7: anytype, T8: anytype) u64 {
nativeInit(hash);
nativePush(T1);
nativePush(T2);
nativePush(T3);
nativePush(T4);
nativePush(T5);
nativePush(T6);
nativePush(T7);
nativePush(T8);
return nativeCall();
}
pub fn invoke9(hash: u64, T1: anytype, T2: anytype, T3: anytype, T4: anytype, T5: anytype, T6: anytype, T7: anytype, T8: anytype, T9: anytype) u64 {
nativeInit(hash);
nativePush(T1);
nativePush(T2);
nativePush(T3);
nativePush(T4);
nativePush(T5);
nativePush(T6);
nativePush(T7);
nativePush(T8);
nativePush(T9);
return nativeCall();
}
pub fn invoke10(hash: u64, T1: anytype, T2: anytype, T3: anytype, T4: anytype, T5: anytype, T6: anytype, T7: anytype, T8: anytype, T9: anytype, T10: anytype) u64 {
nativeInit(hash);
nativePush(T1);
nativePush(T2);
nativePush(T3);
nativePush(T4);
nativePush(T5);
nativePush(T6);
nativePush(T7);
nativePush(T8);
nativePush(T9);
nativePush(T10);
return nativeCall();
}
pub fn invoke11(hash: u64, T1: anytype, T2: anytype, T3: anytype, T4: anytype, T5: anytype, T6: anytype, T7: anytype, T8: anytype, T9: anytype, T10: anytype, T11: anytype) u64 {
nativeInit(hash);
nativePush(T1);
nativePush(T2);
nativePush(T3);
nativePush(T4);
nativePush(T5);
nativePush(T6);
nativePush(T7);
nativePush(T8);
nativePush(T9);
nativePush(T10);
nativePush(T11);
return nativeCall();
}
pub fn invoke12(hash: u64, T1: anytype, T2: anytype, T3: anytype, T4: anytype, T5: anytype, T6: anytype, T7: anytype, T8: anytype, T9: anytype, T10: anytype, T11: anytype, T12: anytype) u64 {
nativeInit(hash);
nativePush(T1);
nativePush(T2);
nativePush(T3);
nativePush(T4);
nativePush(T5);
nativePush(T6);
nativePush(T7);
nativePush(T8);
nativePush(T9);
nativePush(T10);
nativePush(T11);
nativePush(T12);
return nativeCall();
}
pub fn invoke13(hash: u64, T1: anytype, T2: anytype, T3: anytype, T4: anytype, T5: anytype, T6: anytype, T7: anytype, T8: anytype, T9: anytype, T10: anytype, T11: anytype, T12: anytype, T13: anytype) u64 {
nativeInit(hash);
nativePush(T1);
nativePush(T2);
nativePush(T3);
nativePush(T4);
nativePush(T5);
nativePush(T6);
nativePush(T7);
nativePush(T8);
nativePush(T9);
nativePush(T10);
nativePush(T11);
nativePush(T12);
nativePush(T13);
return nativeCall();
}
pub fn invoke14(hash: u64, T1: anytype, T2: anytype, T3: anytype, T4: anytype, T5: anytype, T6: anytype, T7: anytype, T8: anytype, T9: anytype, T10: anytype, T11: anytype, T12: anytype, T13: anytype, T14: anytype) u64 {
nativeInit(hash);
nativePush(T1);
nativePush(T2);
nativePush(T3);
nativePush(T4);
nativePush(T5);
nativePush(T6);
nativePush(T7);
nativePush(T8);
nativePush(T9);
nativePush(T10);
nativePush(T11);
nativePush(T12);
nativePush(T13);
nativePush(T14);
return nativeCall();
}
pub fn invoke15(hash: u64, T1: anytype, T2: anytype, T3: anytype, T4: anytype, T5: anytype, T6: anytype, T7: anytype, T8: anytype, T9: anytype, T10: anytype, T11: anytype, T12: anytype, T13: anytype, T14: anytype, T15: anytype) u64 {
nativeInit(hash);
nativePush(T1);
nativePush(T2);
nativePush(T3);
nativePush(T4);
nativePush(T5);
nativePush(T6);
nativePush(T7);
nativePush(T8);
nativePush(T9);
nativePush(T10);
nativePush(T11);
nativePush(T12);
nativePush(T13);
nativePush(T14);
nativePush(T15);
return nativeCall();
}
pub fn invoke16(hash: u64, T1: anytype, T2: anytype, T3: anytype, T4: anytype, T5: anytype, T6: anytype, T7: anytype, T8: anytype, T9: anytype, T10: anytype, T11: anytype, T12: anytype, T13: anytype, T14: anytype, T15: anytype, T16: anytype) u64 {
nativeInit(hash);
nativePush(T1);
nativePush(T2);
nativePush(T3);
nativePush(T4);
nativePush(T5);
nativePush(T6);
nativePush(T7);
nativePush(T8);
nativePush(T9);
nativePush(T10);
nativePush(T11);
nativePush(T12);
nativePush(T13);
nativePush(T14);
nativePush(T15);
nativePush(T16);
return nativeCall();
}
pub fn invoke17(hash: u64, T1: anytype, T2: anytype, T3: anytype, T4: anytype, T5: anytype, T6: anytype, T7: anytype, T8: anytype, T9: anytype, T10: anytype, T11: anytype, T12: anytype, T13: anytype, T14: anytype, T15: anytype, T16: anytype, T17: anytype) u64 {
nativeInit(hash);
nativePush(T1);
nativePush(T2);
nativePush(T3);
nativePush(T4);
nativePush(T5);
nativePush(T6);
nativePush(T7);
nativePush(T8);
nativePush(T9);
nativePush(T10);
nativePush(T11);
nativePush(T12);
nativePush(T13);
nativePush(T14);
nativePush(T15);
nativePush(T16);
nativePush(T17);
return nativeCall();
}
pub fn invoke18(hash: u64, T1: anytype, T2: anytype, T3: anytype, T4: anytype, T5: anytype, T6: anytype, T7: anytype, T8: anytype, T9: anytype, T10: anytype, T11: anytype, T12: anytype, T13: anytype, T14: anytype, T15: anytype, T16: anytype, T17: anytype, T18: anytype) u64 {
nativeInit(hash);
nativePush(T1);
nativePush(T2);
nativePush(T3);
nativePush(T4);
nativePush(T5);
nativePush(T6);
nativePush(T7);
nativePush(T8);
nativePush(T9);
nativePush(T10);
nativePush(T11);
nativePush(T12);
nativePush(T13);
nativePush(T14);
nativePush(T15);
nativePush(T16);
nativePush(T17);
nativePush(T18);
return nativeCall();
}
pub fn invoke19(hash: u64, T1: anytype, T2: anytype, T3: anytype, T4: anytype, T5: anytype, T6: anytype, T7: anytype, T8: anytype, T9: anytype, T10: anytype, T11: anytype, T12: anytype, T13: anytype, T14: anytype, T15: anytype, T16: anytype, T17: anytype, T18: anytype, T19: anytype) u64 {
nativeInit(hash);
nativePush(T1);
nativePush(T2);
nativePush(T3);
nativePush(T4);
nativePush(T5);
nativePush(T6);
nativePush(T7);
nativePush(T8);
nativePush(T9);
nativePush(T10);
nativePush(T11);
nativePush(T12);
nativePush(T13);
nativePush(T14);
nativePush(T15);
nativePush(T16);
nativePush(T17);
nativePush(T18);
nativePush(T19);
return nativeCall();
}
pub fn invoke20(hash: u64, T1: anytype, T2: anytype, T3: anytype, T4: anytype, T5: anytype, T6: anytype, T7: anytype, T8: anytype, T9: anytype, T10: anytype, T11: anytype, T12: anytype, T13: anytype, T14: anytype, T15: anytype, T16: anytype, T17: anytype, T18: anytype, T19: anytype, T20: anytype) u64 {
nativeInit(hash);
nativePush(T1);
nativePush(T2);
nativePush(T3);
nativePush(T4);
nativePush(T5);
nativePush(T6);
nativePush(T7);
nativePush(T8);
nativePush(T9);
nativePush(T10);
nativePush(T11);
nativePush(T12);
nativePush(T13);
nativePush(T14);
nativePush(T15);
nativePush(T16);
nativePush(T17);
nativePush(T18);
nativePush(T19);
nativePush(T20);
return nativeCall();
}
pub fn invoke21(hash: u64, T1: anytype, T2: anytype, T3: anytype, T4: anytype, T5: anytype, T6: anytype, T7: anytype, T8: anytype, T9: anytype, T10: anytype, T11: anytype, T12: anytype, T13: anytype, T14: anytype, T15: anytype, T16: anytype, T17: anytype, T18: anytype, T19: anytype, T20: anytype, T21: anytype) u64 {
nativeInit(hash);
nativePush(T1);
nativePush(T2);
nativePush(T3);
nativePush(T4);
nativePush(T5);
nativePush(T6);
nativePush(T7);
nativePush(T8);
nativePush(T9);
nativePush(T10);
nativePush(T11);
nativePush(T12);
nativePush(T13);
nativePush(T14);
nativePush(T15);
nativePush(T16);
nativePush(T17);
nativePush(T18);
nativePush(T19);
nativePush(T20);
nativePush(T21);
return nativeCall();
}
pub fn invoke22(hash: u64, T1: anytype, T2: anytype, T3: anytype, T4: anytype, T5: anytype, T6: anytype, T7: anytype, T8: anytype, T9: anytype, T10: anytype, T11: anytype, T12: anytype, T13: anytype, T14: anytype, T15: anytype, T16: anytype, T17: anytype, T18: anytype, T19: anytype, T20: anytype, T21: anytype, T22: anytype) u64 {
nativeInit(hash);
nativePush(T1);
nativePush(T2);
nativePush(T3);
nativePush(T4);
nativePush(T5);
nativePush(T6);
nativePush(T7);
nativePush(T8);
nativePush(T9);
nativePush(T10);
nativePush(T11);
nativePush(T12);
nativePush(T13);
nativePush(T14);
nativePush(T15);
nativePush(T16);
nativePush(T17);
nativePush(T18);
nativePush(T19);
nativePush(T20);
nativePush(T21);
nativePush(T22);
return nativeCall();
}
pub fn invoke23(hash: u64, T1: anytype, T2: anytype, T3: anytype, T4: anytype, T5: anytype, T6: anytype, T7: anytype, T8: anytype, T9: anytype, T10: anytype, T11: anytype, T12: anytype, T13: anytype, T14: anytype, T15: anytype, T16: anytype, T17: anytype, T18: anytype, T19: anytype, T20: anytype, T21: anytype, T22: anytype, T23: anytype) u64 {
nativeInit(hash);
nativePush(T1);
nativePush(T2);
nativePush(T3);
nativePush(T4);
nativePush(T5);
nativePush(T6);
nativePush(T7);
nativePush(T8);
nativePush(T9);
nativePush(T10);
nativePush(T11);
nativePush(T12);
nativePush(T13);
nativePush(T14);
nativePush(T15);
nativePush(T16);
nativePush(T17);
nativePush(T18);
nativePush(T19);
nativePush(T20);
nativePush(T21);
nativePush(T22);
nativePush(T23);
return nativeCall();
}
pub fn invoke24(hash: u64, T1: anytype, T2: anytype, T3: anytype, T4: anytype, T5: anytype, T6: anytype, T7: anytype, T8: anytype, T9: anytype, T10: anytype, T11: anytype, T12: anytype, T13: anytype, T14: anytype, T15: anytype, T16: anytype, T17: anytype, T18: anytype, T19: anytype, T20: anytype, T21: anytype, T22: anytype, T23: anytype, T24: anytype) u64 {
nativeInit(hash);
nativePush(T1);
nativePush(T2);
nativePush(T3);
nativePush(T4);
nativePush(T5);
nativePush(T6);
nativePush(T7);
nativePush(T8);
nativePush(T9);
nativePush(T10);
nativePush(T11);
nativePush(T12);
nativePush(T13);
nativePush(T14);
nativePush(T15);
nativePush(T16);
nativePush(T17);
nativePush(T18);
nativePush(T19);
nativePush(T20);
nativePush(T21);
nativePush(T22);
nativePush(T23);
nativePush(T24);
return nativeCall();
}
pub fn invoke25(hash: u64, T1: anytype, T2: anytype, T3: anytype, T4: anytype, T5: anytype, T6: anytype, T7: anytype, T8: anytype, T9: anytype, T10: anytype, T11: anytype, T12: anytype, T13: anytype, T14: anytype, T15: anytype, T16: anytype, T17: anytype, T18: anytype, T19: anytype, T20: anytype, T21: anytype, T22: anytype, T23: anytype, T24: anytype, T25: anytype) u64 {
nativeInit(hash);
nativePush(T1);
nativePush(T2);
nativePush(T3);
nativePush(T4);
nativePush(T5);
nativePush(T6);
nativePush(T7);
nativePush(T8);
nativePush(T9);
nativePush(T10);
nativePush(T11);
nativePush(T12);
nativePush(T13);
nativePush(T14);
nativePush(T15);
nativePush(T16);
nativePush(T17);
nativePush(T18);
nativePush(T19);
nativePush(T20);
nativePush(T21);
nativePush(T22);
nativePush(T23);
nativePush(T24);
nativePush(T25);
return nativeCall();
}
pub fn invoke26(hash: u64, T1: anytype, T2: anytype, T3: anytype, T4: anytype, T5: anytype, T6: anytype, T7: anytype, T8: anytype, T9: anytype, T10: anytype, T11: anytype, T12: anytype, T13: anytype, T14: anytype, T15: anytype, T16: anytype, T17: anytype, T18: anytype, T19: anytype, T20: anytype, T21: anytype, T22: anytype, T23: anytype, T24: anytype, T25: anytype, T26: anytype) u64 {
nativeInit(hash);
nativePush(T1);
nativePush(T2);
nativePush(T3);
nativePush(T4);
nativePush(T5);
nativePush(T6);
nativePush(T7);
nativePush(T8);
nativePush(T9);
nativePush(T10);
nativePush(T11);
nativePush(T12);
nativePush(T13);
nativePush(T14);
nativePush(T15);
nativePush(T16);
nativePush(T17);
nativePush(T18);
nativePush(T19);
nativePush(T20);
nativePush(T21);
nativePush(T22);
nativePush(T23);
nativePush(T24);
nativePush(T25);
nativePush(T26);
return nativeCall();
}
|
0 | repos/ScriptHookVZig | repos/ScriptHookVZig/src/panic_handler.zig | const std = @import("std");
const allocator = std.heap.page_allocator;
pub fn panicThread(comptime fmt: []const u8, args: anytype) noreturn {
const cwd = std.fs.cwd();
if (std.fmt.allocPrint(allocator, fmt, args)) |message| {
defer allocator.free(message);
if (std.fmt.allocPrint(allocator, "ScriptHookVZig-Panic-{any}.log", .{std.time.timestamp()})) |filename| {
defer allocator.free(filename);
if (cwd.createFile(filename, .{})) |f| {
defer f.close();
_ = f.writeAll(message) catch {};
} else |_| {}
} else |_| {}
} else |_| {}
@panic("PANIC");
}
pub fn panic(comptime fmt: []const u8, args: anytype) void {
if (std.Thread.spawn(.{}, panicThread, .{ fmt, args })) |thread| {
thread.detach();
} else |_| {}
}
|
0 | repos/ScriptHookVZig | repos/ScriptHookVZig/src/utils.zig | const std = @import("std");
const panic_handler = @import("panic_handler.zig");
pub fn findSymbol(comptime T: type, name: [:0]const u8) ?T {
const hModule = std.os.windows.kernel32.GetModuleHandleW(std.unicode.utf8ToUtf16LeStringLiteral("ScriptHookV.dll"));
if (hModule == null) {
panic_handler.panic("Failed to get handle for ScriptHookV.dll", .{});
return null;
}
const addr = std.os.windows.kernel32.GetProcAddress(hModule.?, name.ptr);
if (addr == null) {
panic_handler.panic("Failed to find symbol: {s}", .{name});
return null;
}
return @as(T, @ptrCast(@alignCast(addr.?)));
}
|
0 | repos/ScriptHookVZig | repos/ScriptHookVZig/src/types.zig | const std = @import("std");
const DWORD = std.os.windows.DWORD;
pub const Void = DWORD;
pub const Any = DWORD;
pub const uint = DWORD;
pub const Hash = DWORD;
pub const Entity = c_int;
pub const Player = c_int;
pub const FireId = c_int;
pub const Ped = c_int;
pub const Vehicle = c_int;
pub const Cam = c_int;
pub const CarGenerator = c_int;
pub const Group = c_int;
pub const Train = c_int;
pub const Pickup = c_int;
pub const Object = c_int;
pub const Weapon = c_int;
pub const Interior = c_int;
pub const Blip = c_int;
pub const Texture = c_int;
pub const TextureDict = c_int;
pub const CoverPoint = c_int;
pub const Camera = c_int;
pub const TaskSequence = c_int;
pub const ColourIndex = c_int;
pub const Sphere = c_int;
pub const ScrHandle = c_int;
pub const Vector3 = extern struct { x: f32, _paddingx: DWORD, y: f32, _paddingy: DWORD, z: f32, _paddingz: DWORD };
|
0 | repos/ScriptHookVZig | repos/ScriptHookVZig/src/main.zig | const std = @import("std");
const utils = @import("utils.zig");
/// Create texture
/// texFileName - texture file name, it's best to specify full texture path and use PNG textures
/// returns internal texture id
/// Texture deletion is performed automatically when game reloads scripts
/// Can be called only in the same thread as natives
pub fn createTexture_(texFileName: [*c]const u8) c_int {
const sym = utils.findSymbol(*const fn ([*c]const u8) callconv(.C) c_int, "?createTexture@@YAHPEBD@Z");
return sym.?(texFileName);
}
/// Draw texture
/// id - texture id recieved from createTexture()
/// index - each texture can have up to 64 different instances on screen at one time
/// level - draw level, being used in global draw order, texture instance with least level draws first
/// time - how much time (ms) texture instance will stay on screen, the amount of time should be enough
/// for it to stay on screen until the next corresponding drawTexture() call
/// sizeX,Y - size in screen space, should be in the range from 0.0 to 1.0, e.g setting this to 0.2 means that
/// texture instance will take 20% of the screen space
/// centerX,Y - center position in texture space, e.g. 0.5 means real texture center
/// posX,Y - position in screen space, [0.0, 0.0] - top left corner, [1.0, 1.0] - bottom right,
/// texture instance is positioned according to it's center
/// rotation - should be in the range from 0.0 to 1.0
/// screenHeightScaleFactor - screen aspect ratio, used for texture size correction, you can get it using natives
/// r,g,b,a - color, should be in the range from 0.0 to 1.0
///
/// Texture instance draw parameters are updated each time script performs corresponding call to drawTexture()
/// You should always check your textures layout for 16:9, 16:10 and 4:3 screen aspects, for ex. in 1280x720,
/// 1440x900 and 1024x768 screen resolutions, use windowed mode for this
/// Can be called only in the same thread as natives
pub fn drawTexture_(id: c_int, index: c_int, level: c_int, time: c_int, sizeX: f32, sizeY: f32, centerX: f32, centerY: f32, posX: f32, posY: f32, rotation: f32, screenHeightScaleFactor: f32, r: f32, g: f32, b: f32, a: f32) void {
const sym = utils.findSymbol(*const fn (c_int, c_int, c_int, c_int, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32, f32) callconv(.C) void, "?drawTexture@@YAXHHHHMMMMMMMMMMMM@Z");
sym.?(id, index, level, time, sizeX, sizeY, centerX, centerY, posX, posY, rotation, screenHeightScaleFactor, r, g, b, a);
}
/// IDXGISwapChain::Present callback
/// Called right before the actual Present method call, render test calls don't trigger callbacks
/// When the game uses DX10 it actually uses DX11 with DX10 feature level
/// Remember that you can't call natives inside
/// void OnPresent(IDXGISwapChain *swapChain);
pub const PresentCallback = ?*const fn (?*anyopaque) callconv(.C) void;
/// Register IDXGISwapChain::Present callback
/// must be called on dll attach
pub fn presentCallbackRegister_(cb: PresentCallback) void {
const sym = utils.findSymbol(*const fn (PresentCallback) callconv(.C) void, "?presentCallbackRegister@@YAXP6AXPEAX@Z@Z");
sym.?(cb);
}
/// Unregister IDXGISwapChain::Present callback
/// must be called on dll detach
pub fn presentCallbackUnregister_(cb: PresentCallback) void {
const sym = utils.findSymbol(*const fn (PresentCallback) callconv(.C) void, "?presentCallbackUnregister@@YAXP6AXPEAX@Z@Z");
sym.?(cb);
}
/// DWORD key, WORD repeats, BYTE scanCode, BOOL isExtended, BOOL isWithAlt, BOOL wasDownBefore, BOOL isUpNow
pub const KeyboardHandler = ?*const fn (std.os.windows.DWORD, std.os.windows.WORD, std.os.windows.BYTE, std.os.windows.BOOL, std.os.windows.BOOL, std.os.windows.BOOL, std.os.windows.BOOL) callconv(.C) void;
/// Register keyboard handler
/// must be called on dll attach
pub fn keyboardHandlerRegister_(handler: KeyboardHandler) void {
const sym = utils.findSymbol(*const fn (KeyboardHandler) callconv(.C) void, "?keyboardHandlerRegister@@YAXP6AXKGEHHHH@Z@Z");
sym.?(handler);
}
/// Unregister keyboard handler
/// must be called on dll detach
pub fn keyboardHandlerUnegister_(handler: KeyboardHandler) void {
const sym = utils.findSymbol(*const fn (KeyboardHandler) callconv(.C) void, "?keyboardHandlerUnregister@@YAXP6AXKGEHHHH@Z@Z");
sym.?(handler);
}
pub fn scriptWait(ms: std.os.windows.DWORD) void {
const sym = utils.findSymbol(*const fn (std.os.windows.DWORD) callconv(.C) void, "?scriptWait@@YAXK@Z");
sym.?(ms);
}
pub fn scriptRegister(instance: std.os.windows.HINSTANCE, LP_SCRIPT_MAIN: *const fn () callconv(.C) void) void {
const sym = utils.findSymbol(*const fn (std.os.windows.HINSTANCE, *const fn () callconv(.C) void) callconv(.C) void, "?scriptRegister@@YAXPEAUHINSTANCE__@@P6AXXZ@Z");
sym.?(instance, LP_SCRIPT_MAIN);
}
pub fn scriptRegisterAdditionalThread(instance: std.os.windows.HINSTANCE, LP_SCRIPT_MAIN: *const fn () callconv(.C) void) void {
const sym = utils.findSymbol(*const fn (std.os.windows.HINSTANCE, *const fn () callconv(.C) void) callconv(.C) void, "?scriptRegisterAdditionalThread@@YAXPEAUHINSTANCE__@@P6AXXZ@Z");
sym.?(instance, LP_SCRIPT_MAIN);
}
pub fn scriptUnregister(LP_SCRIPT_MAIN: *const fn () callconv(.C) void) void {
const sym = utils.findSymbol(*const fn (*const fn () callconv(.C) void) callconv(.C) void, "?scriptUnregister@@YAXP6AXXZ@Z");
sym.?(LP_SCRIPT_MAIN);
}
pub fn scriptUnregisterInstance(instance: std.os.windows.HINSTANCE) void {
const sym = utils.findSymbol(*const fn (std.os.windows.HINSTANCE) callconv(.C) void, "?scriptUnregister@@YAXPEAUHINSTANCE__@@@Z");
sym.?(instance);
}
fn nativeCall() u64 {
const call = utils.findSymbol(*const fn () callconv(.C) u64, "?nativeCall@@YAPEA_KXZ");
return call.?();
}
fn nativeInit(hash: u64) void {
const call = utils.findSymbol(*const fn (u64) callconv(.C) void, "?nativeInit@@YAX_K@Z");
call.?(hash);
}
fn nativePush64(val: u64) void {
const call = utils.findSymbol(*const fn (u64) callconv(.C) void, "?nativePush64@@YAX_K@Z");
call.?(val);
}
pub fn nativePush(val: anytype) void {
if (@sizeOf(@TypeOf(val)) > @sizeOf(u64)) {
@compileError("val is larger than u64");
}
var v64: u64 = 0;
const src = std.mem.asBytes(&val);
@memcpy(std.mem.asBytes(&v64)[0..src.len], src);
nativePush64(v64);
}
pub fn WAIT(time: std.os.windows.DWORD) void {
scriptWait(time);
}
pub fn TERMINATE() void {
scriptWait(@as(std.os.windows.DWORD, @intCast(4294967295)));
}
/// Returns pointer to global variable
/// make sure that you check game version before accessing globals because
/// ids may differ between patches
pub fn getGlobalPtr(globalId: c_int) [*c]u64 {
const sym = utils.findSymbol(*const fn (c_int) callconv(.C) [*]u64, "?getGlobalPtr@@YAPEA_KH@Z");
return sym.?(globalId);
}
/// Get entities from internal pools
/// return value represents filled array elements count
/// can be called only in the same thread as natives
pub fn worldGetAllVehicles(arr: [*c]c_int, arrSize: c_int) c_int {
const sym = utils.findSymbol(*const fn ([*c]c_int, c_int) callconv(.C) c_int, "?worldGetAllVehicles@@YAHPEAHH@Z");
return sym.?(arr, arrSize);
}
/// Get entities from internal pools
/// return value represents filled array elements count
/// can be called only in the same thread as natives
pub fn worldGetAllPeds(arr: [*c]c_int, arrSize: c_int) c_int {
const sym = utils.findSymbol(*const fn ([*c]c_int, c_int) callconv(.C) c_int, "?worldGetAllPeds@@YAHPEAHH@Z");
return sym.?(arr, arrSize);
}
/// Get entities from internal pools
/// return value represents filled array elements count
/// can be called only in the same thread as natives
pub fn worldGetAllObjects(arr: [*c]c_int, arrSize: c_int) c_int {
const sym = utils.findSymbol(*const fn ([*c]c_int, c_int) callconv(.C) c_int, "?worldGetAllObjects@@YAHPEAHH@Z");
return sym.?(arr, arrSize);
}
/// Get entities from internal pools
/// return value represents filled array elements count
/// can be called only in the same thread as natives
pub fn worldGetAllPickups(arr: [*c]c_int, arrSize: c_int) c_int {
const sym = utils.findSymbol(*const fn ([*c]c_int, c_int) callconv(.C) c_int, "?worldGetAllPickups@@YAHPEAHH@Z");
return sym.?(arr, arrSize);
}
/// Returns base object pointer using it's script handle
/// make sure that you check game version before accessing object fields because
/// offsets may differ between patches
pub fn getScriptHandleBaseAddress(handle: c_int) [*c]std.os.windows.BYTE {
const sym = utils.findSymbol(*const fn (c_int) callconv(.C) [*c]std.os.windows.BYTE, "?getScriptHandleBaseAddress@@YAPEAEH@Z");
return sym.?(handle);
}
pub const eGameVersion = extern struct {
bits: c_int = 0,
pub const VER_1_0_335_2_STEAM: eGameVersion = .{ .bits = 0 };
pub const VER_1_0_335_2_NOSTEAM: eGameVersion = .{ .bits = 1 };
pub const VER_1_0_350_1_STEAM: eGameVersion = .{ .bits = 2 };
pub const VER_1_0_350_2_NOSTEAM: eGameVersion = .{ .bits = 3 };
pub const VER_1_0_372_2_STEAM: eGameVersion = .{ .bits = 4 };
pub const VER_1_0_372_2_NOSTEAM: eGameVersion = .{ .bits = 5 };
pub const VER_1_0_393_2_STEAM: eGameVersion = .{ .bits = 6 };
pub const VER_1_0_393_2_NOSTEAM: eGameVersion = .{ .bits = 7 };
pub const VER_1_0_393_4_STEAM: eGameVersion = .{ .bits = 8 };
pub const VER_1_0_393_4_NOSTEAM: eGameVersion = .{ .bits = 9 };
pub const VER_1_0_463_1_STEAM: eGameVersion = .{ .bits = 10 };
pub const VER_1_0_463_1_NOSTEAM: eGameVersion = .{ .bits = 11 };
pub const VER_1_0_505_2_STEAM: eGameVersion = .{ .bits = 12 };
pub const VER_1_0_505_2_NOSTEAM: eGameVersion = .{ .bits = 13 };
pub const VER_1_0_573_1_STEAM: eGameVersion = .{ .bits = 14 };
pub const VER_1_0_573_1_NOSTEAM: eGameVersion = .{ .bits = 15 };
pub const VER_1_0_617_1_STEAM: eGameVersion = .{ .bits = 16 };
pub const VER_1_0_617_1_NOSTEAM: eGameVersion = .{ .bits = 17 };
pub const VER_SIZE: eGameVersion = .{ .bits = 18 };
pub const VER_UNK: eGameVersion = .{ .bits = -1 };
};
pub fn getGameVersion() eGameVersion {
const sym = utils.findSymbol(*const fn () callconv(.C) eGameVersion, "?getGameVersion@@YA?AW4eGameVersion@@XZ");
return sym.?();
}
|
0 | repos/ScriptHookVZig | repos/ScriptHookVZig/src/shvz.zig | const std = @import("std");
/// Natives
pub const natives = @import("natives.zig");
/// Enums
pub const enums = @import("enums.zig");
/// Main
pub const main = @import("main.zig");
// Types
pub const types = @import("types.zig");
var ScriptHookVDLL: std.DynLib = undefined;
pub fn init() !void {
ScriptHookVDLL = try std.DynLib.open("ScriptHookV.dll");
}
pub fn deinit() void {
ScriptHookVDLL.close();
}
|
0 | repos/ScriptHookVZig | repos/ScriptHookVZig/src/natives.zig | const std = @import("std");
const nativeCaller = @import("nativeCaller.zig");
const types = @import("types.zig");
const windows = std.os.windows;
pub const SYSTEM = struct {
/// Pauses execution of the current script, please note this behavior is only seen when called from one of the game script files(ysc). In order to wait an asi script use "static void WAIT(DWORD time);" found in main.h
pub fn WAIT(ms: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5683038035346286502)), ms);
}
/// Examples:
/// g_384A = SYSTEM::START_NEW_SCRIPT("cellphone_flashhand", 1424);
/// l_10D = SYSTEM::START_NEW_SCRIPT("taxiService", 1828);
/// SYSTEM::START_NEW_SCRIPT("AM_MP_YACHT", 5000);
/// SYSTEM::START_NEW_SCRIPT("emergencycall", 512);
/// SYSTEM::START_NEW_SCRIPT("emergencycall", 512);
/// SYSTEM::START_NEW_SCRIPT("FM_maintain_cloud_header_data", 1424);
/// SYSTEM::START_NEW_SCRIPT("FM_Mission_Controller", 31000);
/// SYSTEM::START_NEW_SCRIPT("tennis_family", 3650);
/// SYSTEM::START_NEW_SCRIPT("Celebrations", 3650);
/// Decompiled examples of usage when starting a script:
///
/// SCRIPT::REQUEST_SCRIPT(a_0);
/// if (SCRIPT::HAS_SCRIPT_LOADED(a_0)) {
/// SYSTEM::START_NEW_SCRIPT(a_0, v_3);
/// SCRIPT::SET_SCRIPT_AS_NO_LONGER_NEEDED(a_0);
/// return 1;
/// }
///
/// or:
/// v_2 = "MrsPhilips2";
/// SCRIPT::REQUEST_SCRIPT(v_2);
/// while (!SCRIPT::HAS_SCRIPT_LOADED(v_2)) {
/// SCRIPT::REQUEST_SCRIPT(v_2);
/// SYSTEM::WAIT(0);
/// }
/// sub_8792(36);
/// SYSTEM::START_NEW_SCRIPT(v_2, 17000);
/// SCRIPT::SET_SCRIPT_AS_NO_LONGER_NEEDED(v_2);
pub fn START_NEW_SCRIPT(scriptName: [*c]const u8, stackSize: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(16723644071793487432)), scriptName, stackSize);
}
/// return : script thread id, 0 if failed
/// Pass pointer to struct of args in p1, size of struct goes into p2
pub fn START_NEW_SCRIPT_WITH_ARGS(scriptName: [*c]const u8, args: [*c]types.Any, argCount: c_int, stackSize: c_int) c_int {
return nativeCaller.invoke4(@as(u64, @intCast(13311091582424151521)), scriptName, args, argCount, stackSize);
}
/// Used to be known as _START_NEW_STREAMED_SCRIPT
pub fn START_NEW_SCRIPT_WITH_NAME_HASH(scriptHash: types.Hash, stackSize: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(16941529988248844946)), scriptHash, stackSize);
}
/// Used to be known as _START_NEW_STREAMED_SCRIPT_WITH_ARGS
pub fn START_NEW_SCRIPT_WITH_NAME_HASH_AND_ARGS(scriptHash: types.Hash, args: [*c]types.Any, argCount: c_int, stackSize: c_int) c_int {
return nativeCaller.invoke4(@as(u64, @intCast(14175969932617039480)), scriptHash, args, argCount, stackSize);
}
/// Counts up. Every 1000 is 1 real-time second. Use SETTIMERA(int value) to set the timer (e.g.: SETTIMERA(0)).
pub fn TIMERA() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(9468377998387232075)));
}
pub fn TIMERB() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(14544731519793341300)));
}
pub fn SETTIMERA(value: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13957193594485226082)), value);
}
pub fn SETTIMERB(value: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6548545859220659790)), value);
}
/// Gets the current frame time.
pub fn TIMESTEP() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(1348042466)));
}
pub fn SIN(value: f32) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(841539415165780831)), value);
}
pub fn COS(value: f32) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(15059950717509440412)), value);
}
pub fn SQRT(value: f32) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(8203653444578285572)), value);
}
pub fn POW(base: f32, exponent: f32) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(16384690022721388078)), base, exponent);
}
/// Used to be known as _LOG10
pub fn LOG10(value: f32) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(16723807522761735712)), value);
}
/// Calculates the magnitude of a vector.
pub fn VMAG(x: f32, y: f32, z: f32) f32 {
return nativeCaller.invoke3(@as(u64, @intCast(7290534975576991276)), x, y, z);
}
/// Calculates the magnitude of a vector but does not perform Sqrt operations. (Its way faster)
pub fn VMAG2(x: f32, y: f32, z: f32) f32 {
return nativeCaller.invoke3(@as(u64, @intCast(12163849536751198296)), x, y, z);
}
/// Calculates distance between vectors.
pub fn VDIST(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32) f32 {
return nativeCaller.invoke6(@as(u64, @intCast(3046839180162419877)), x1, y1, z1, x2, y2, z2);
}
/// Calculates distance between vectors but does not perform Sqrt operations. (Its way faster)
pub fn VDIST2(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32) f32 {
return nativeCaller.invoke6(@as(u64, @intCast(13233308750539886151)), x1, y1, z1, x2, y2, z2);
}
pub fn SHIFT_LEFT(value: c_int, bitShift: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(17138829061642276328)), value, bitShift);
}
pub fn SHIFT_RIGHT(value: c_int, bitShift: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(10948002598818267253)), value, bitShift);
}
pub fn FLOOR(value: f32) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(17532204621987346500)), value);
}
/// I'm guessing this rounds a float value up to the next whole number, and FLOOR rounds it down
pub fn CEIL(value: f32) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(1288057844309609610)), value);
}
pub fn ROUND(value: f32) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(17499705547816067449)), value);
}
pub fn TO_FLOAT(value: c_int) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(13536264826763565705)), value);
}
/// THREAD_PRIO_HIGHEST = 0
/// THREAD_PRIO_NORMAL = 1
/// THREAD_PRIO_LOWEST = 2
/// THREAD_PRIO_MANUAL_UPDATE = 100
/// Used to be known as SET_THREAD_PRIORITY
pub fn SET_THIS_THREAD_PRIORITY(priority: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4807132933123863201)), priority);
}
};
pub const APP = struct {
pub fn APP_DATA_VALID() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9541624474208495030)));
}
pub fn APP_GET_INT(property: [*c]const u8) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(15250747526420995403)), property);
}
pub fn APP_GET_FLOAT(property: [*c]const u8) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(1519115109592212258)), property);
}
pub fn APP_GET_STRING(property: [*c]const u8) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(8402311974982136092)), property);
}
pub fn APP_SET_INT(property: [*c]const u8, value: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6953151268396176913)), property, value);
}
pub fn APP_SET_FLOAT(property: [*c]const u8, value: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2726762982940924580)), property, value);
}
pub fn APP_SET_STRING(property: [*c]const u8, value: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4608023460562018740)), property, value);
}
/// Called in the gamescripts like:
/// APP::APP_SET_APP("car");
/// APP::APP_SET_APP("dog");
pub fn APP_SET_APP(appName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14974539588691365163)), appName);
}
pub fn APP_SET_BLOCK(blockName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2750208806671753107)), blockName);
}
pub fn APP_CLEAR_BLOCK() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(6909048714621058490)));
}
pub fn APP_CLOSE_APP() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(16437124754795595260)));
}
pub fn APP_CLOSE_BLOCK() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(16781534775082749688)));
}
pub fn APP_HAS_LINKED_SOCIAL_CLUB_ACCOUNT() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8209752708115631520)));
}
pub fn APP_HAS_SYNCED_DATA(appName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14578758488050192767)), appName);
}
pub fn APP_SAVE_DATA() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(10792264451834177631)));
}
pub fn APP_GET_DELETED_FILE_STATUS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(14521076533707067814)));
}
pub fn APP_DELETE_APP_DATA(appName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4905856963927646211)), appName);
}
};
pub const AUDIO = struct {
/// All found occurrences in b617d, sorted alphabetically and identical lines removed: https://pastebin.com/RFb4GTny
/// AUDIO::PLAY_PED_RINGTONE("Remote_Ring", PLAYER::PLAYER_PED_ID(), 1);
/// AUDIO::PLAY_PED_RINGTONE("Dial_and_Remote_Ring", PLAYER::PLAYER_PED_ID(), 1);
pub fn PLAY_PED_RINGTONE(ringtoneName: [*c]const u8, ped: types.Ped, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(18006911401335853477)), ringtoneName, ped, p2);
}
pub fn IS_PED_RINGTONE_PLAYING(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2201800761837236535)), ped);
}
pub fn STOP_PED_RINGTONE(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7807801664119263378)), ped);
}
pub fn IS_MOBILE_PHONE_CALL_ONGOING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8401415412829442636)));
}
pub fn IS_MOBILE_INTERFERENCE_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14461535876444114384)));
}
pub fn GET_CURRENT_TV_SHOW_PLAY_TIME() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(15941237740113055093)));
}
pub fn CREATE_NEW_SCRIPTED_CONVERSATION() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(15188699854293085782)));
}
/// NOTE: ones that are -1, 0 - 35 are determined by a function where it gets a TextLabel from a global then runs,
/// GET_CHARACTER_FROM_AUDIO_CONVERSATION_FILENAME and depending on what the result is it goes in check order of 0 - 9 then A - Z then z (lowercase). So it will then return 0 - 35 or -1 if it's 'z'. The func to handle that ^^ is func_67 in dialog_handler.c atleast in TU27 Xbox360 scripts.
/// p0 is -1, 0 - 35
/// p1 is a char or string (whatever you wanna call it)
/// p2 is Global 10597 + i * 6. 'i' is a while(i < 70) loop
/// p3 is again -1, 0 - 35
/// p4 is again -1, 0 - 35
/// p5 is either 0 or 1 (bool ?)
/// p6 is either 0 or 1 (The func to determine this is bool)
/// p7 is either 0 or 1 (The func to determine this is bool)
/// p8 is either 0 or 1 (The func to determine this is bool)
/// p9 is 0 - 3 (Determined by func_60 in dialogue_handler.c)
/// p10 is either 0 or 1 (The func to determine this is bool)
/// p11 is either 0 or 1 (The func to determine this is bool)
/// p12 is unknown as in TU27 X360 scripts it only goes to p11.
pub fn ADD_LINE_TO_CONVERSATION(index: c_int, p1: [*c]const u8, p2: [*c]const u8, p3: c_int, p4: c_int, p5: windows.BOOL, p6: windows.BOOL, p7: windows.BOOL, p8: windows.BOOL, p9: c_int, p10: windows.BOOL, p11: windows.BOOL, p12: windows.BOOL) void {
_ = nativeCaller.invoke13(@as(u64, @intCast(14262783695077848646)), index, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12);
}
/// 4 calls in the b617d scripts. The only one with p0 and p2 in clear text:
/// AUDIO::ADD_PED_TO_CONVERSATION(5, l_AF, "DINAPOLI");
/// =================================================
/// One of the 2 calls in dialogue_handler.c p0 is in a while-loop, and so is determined to also possibly be 0 - 15.
pub fn ADD_PED_TO_CONVERSATION(index: c_int, ped: types.Ped, p2: [*c]const u8) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(10797930671033112295)), index, ped, p2);
}
pub fn SET_POSITION_FOR_NULL_CONV_PED(p0: types.Any, p1: f32, p2: f32, p3: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(3739050673429329158)), p0, p1, p2, p3);
}
pub fn SET_ENTITY_FOR_NULL_CONV_PED(p0: c_int, entity: types.Entity) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9884111149781616373)), p0, entity);
}
/// This native controls where the game plays audio from. By default the microphone is positioned on the player.
/// When p0 is true the game will play audio from the 3 positions inputted.
/// It is recommended to set all 3 positions to the same value as mixing different positions doesn't seem to work well.
/// The scripts mostly use it with only one position such as in fbi3.c:
/// AUDIO::SET_MICROPHONE_POSITION(true, ENTITY::GET_ENTITY_COORDS(iLocal_3091, true), ENTITY::GET_ENTITY_COORDS(iLocal_3091, true), ENTITY::GET_ENTITY_COORDS(iLocal_3091, true));
pub fn SET_MICROPHONE_POSITION(toggle: windows.BOOL, x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, x3: f32, y3: f32, z3: f32) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(13163618112166545250)), toggle, x1, y1, z1, x2, y2, z2, x3, y3, z3);
}
pub fn SET_CONVERSATION_AUDIO_CONTROLLED_BY_ANIM(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(816983326938755307)), p0);
}
pub fn SET_CONVERSATION_AUDIO_PLACEHOLDER(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7017487132777061428)), p0);
}
pub fn START_SCRIPT_PHONE_CONVERSATION(p0: windows.BOOL, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2679183906295232117)), p0, p1);
}
pub fn PRELOAD_SCRIPT_PHONE_CONVERSATION(p0: windows.BOOL, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6918862395442375402)), p0, p1);
}
pub fn START_SCRIPT_CONVERSATION(p0: windows.BOOL, p1: windows.BOOL, p2: windows.BOOL, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(7716854381323604700)), p0, p1, p2, p3);
}
pub fn PRELOAD_SCRIPT_CONVERSATION(p0: windows.BOOL, p1: windows.BOOL, p2: windows.BOOL, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(4268477180684627335)), p0, p1, p2, p3);
}
pub fn START_PRELOADED_CONVERSATION() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(2550192969488200581)));
}
pub fn GET_IS_PRELOADED_CONVERSATION_READY() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(16659770340757966842)));
}
pub fn IS_SCRIPTED_CONVERSATION_ONGOING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(1618283570897280573)));
}
pub fn IS_SCRIPTED_CONVERSATION_LOADED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(16072595822230333239)));
}
pub fn GET_CURRENT_SCRIPTED_CONVERSATION_LINE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(5189087877674051930)));
}
pub fn PAUSE_SCRIPTED_CONVERSATION(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9597361534365281042)), p0);
}
pub fn RESTART_SCRIPTED_CONVERSATION() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(11163060481669253548)));
}
pub fn STOP_SCRIPTED_CONVERSATION(p0: windows.BOOL) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(15536837052699336378)), p0);
}
pub fn SKIP_TO_NEXT_SCRIPTED_CONVERSATION_LINE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(10836784865951738624)));
}
/// Example from carsteal3.c: AUDIO::INTERRUPT_CONVERSATION(PLAYER::PLAYER_PED_ID(), "CST4_CFAA", "FRANKLIN");
/// Voicelines can be found in GTAV\x64\audio\sfx in files starting with "SS_" which seems to mean scripted speech.
pub fn INTERRUPT_CONVERSATION(ped: types.Ped, voiceline: [*c]const u8, speaker: [*c]const u8) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(11536147665999638438)), ped, voiceline, speaker);
}
/// One call found in the b617d scripts:
/// AUDIO::INTERRUPT_CONVERSATION_AND_PAUSE(NETWORK::NET_TO_PED(l_3989._f26F[0/*1*/]), "CONV_INTERRUPT_QUIT_IT", "LESTER");
pub fn INTERRUPT_CONVERSATION_AND_PAUSE(ped: types.Ped, p1: [*c]const u8, speaker: [*c]const u8) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(9973588037931162680)), ped, p1, speaker);
}
pub fn GET_VARIATION_CHOSEN_FOR_SCRIPTED_LINE(p0: [*c]types.Any) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(12257097615618389348)), p0);
}
pub fn SET_NO_DUCKING_FOR_CONVERSATION(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13061246563229938192)), p0);
}
/// This native does absolutely nothing, just a nullsub
pub fn REGISTER_SCRIPT_WITH_AUDIO(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14334286158367002001)), p0);
}
/// This native does absolutely nothing, just a nullsub
pub fn UNREGISTER_SCRIPT_WITH_AUDIO() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(12133695624530130202)));
}
/// All occurrences and usages found in b617d: https://pastebin.com/NzZZ2Tmm
/// Full list of mission audio bank names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/missionAudioBankNames.json
/// p2 is always -1
pub fn REQUEST_MISSION_AUDIO_BANK(audioBank: [*c]const u8, p1: windows.BOOL, p2: types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(8306253829043839218)), audioBank, p1, p2);
}
/// All occurrences and usages found in b617d, sorted alphabetically and identical lines removed: https://pastebin.com/XZ1tmGEz
/// Full list of ambient audio bank names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ambientAudioBankNames.json
/// p2 is always -1
pub fn REQUEST_AMBIENT_AUDIO_BANK(audioBank: [*c]const u8, p1: windows.BOOL, p2: types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(18303473030733143449)), audioBank, p1, p2);
}
/// All occurrences and usages found in b617d, sorted alphabetically and identical lines removed: https://pastebin.com/AkmDAVn6
/// Full list of script audio bank names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scriptAudioBankNames.json
/// p2 is always -1
pub fn REQUEST_SCRIPT_AUDIO_BANK(audioBank: [*c]const u8, p1: windows.BOOL, p2: types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(3423943577717663365)), audioBank, p1, p2);
}
/// p2 is always -1
pub fn HINT_MISSION_AUDIO_BANK(audioBank: [*c]const u8, p1: windows.BOOL, p2: types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(4644968955775517671)), audioBank, p1, p2);
}
/// p2 is always -1
pub fn HINT_AMBIENT_AUDIO_BANK(audioBank: [*c]const u8, p1: windows.BOOL, p2: types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(10343658073732034396)), audioBank, p1, p2);
}
/// p2 is always -1
pub fn HINT_SCRIPT_AUDIO_BANK(audioBank: [*c]const u8, p1: windows.BOOL, p2: types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(18102229875105383194)), audioBank, p1, p2);
}
pub fn RELEASE_MISSION_AUDIO_BANK() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(1065429086337593735)));
}
pub fn RELEASE_AMBIENT_AUDIO_BANK() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(7297900821373167933)));
}
/// Full list of script audio bank names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scriptAudioBankNames.json
pub fn RELEASE_NAMED_SCRIPT_AUDIO_BANK(audioBank: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8641588576275202416)), audioBank);
}
pub fn RELEASE_SCRIPT_AUDIO_BANK() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(8803845475387808831)));
}
pub fn UNHINT_AMBIENT_AUDIO_BANK() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(1850837445463126104)));
}
pub fn UNHINT_SCRIPT_AUDIO_BANK() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(11153497549183620011)));
}
pub fn UNHINT_NAMED_SCRIPT_AUDIO_BANK(audioBank: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1249640680755152030)), audioBank);
}
pub fn GET_SOUND_ID() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(4828851653567843141)));
}
pub fn RELEASE_SOUND_ID(soundId: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3837005861822892282)), soundId);
}
/// All found occurrences in b617d, sorted alphabetically and identical lines removed: https://pastebin.com/A8Ny8AHZ
/// Full list of audio / sound names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/soundNames.json
pub fn PLAY_SOUND(soundId: c_int, audioName: [*c]const u8, audioRef: [*c]const u8, p3: windows.BOOL, p4: types.Any, p5: windows.BOOL) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(9220157394528049453)), soundId, audioName, audioRef, p3, p4, p5);
}
/// List: https://pastebin.com/DCeRiaLJ
/// All occurrences as of Cayo Perico Heist DLC (b2189), sorted alphabetically and identical lines removed: https://git.io/JtLxM
/// Full list of audio / sound names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/soundNames.json
pub fn PLAY_SOUND_FRONTEND(soundId: c_int, audioName: [*c]const u8, audioRef: [*c]const u8, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(7477453855356397301)), soundId, audioName, audioRef, p3);
}
/// Only call found in the b617d scripts:
/// AUDIO::PLAY_DEFERRED_SOUND_FRONTEND("BACK", "HUD_FREEMODE_SOUNDSET");
/// Full list of audio / sound names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/soundNames.json
pub fn PLAY_DEFERRED_SOUND_FRONTEND(soundName: [*c]const u8, soundsetName: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14617094552583026718)), soundName, soundsetName);
}
/// All found occurrences in b617d, sorted alphabetically and identical lines removed: https://pastebin.com/f2A7vTj0
/// No changes made in b678d.
/// gtaforums.com/topic/795622-audio-for-mods
/// Full list of audio / sound names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/soundNames.json
pub fn PLAY_SOUND_FROM_ENTITY(soundId: c_int, audioName: [*c]const u8, entity: types.Entity, audioRef: [*c]const u8, isNetwork: windows.BOOL, p5: types.Any) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(16600059863515181549)), soundId, audioName, entity, audioRef, isNetwork, p5);
}
/// Only used with "formation_flying_blips_soundset" and "biker_formation_blips_soundset".
/// p1 is always the model of p2
pub fn PLAY_SOUND_FROM_ENTITY_HASH(soundId: c_int, model: types.Hash, entity: types.Entity, soundSetHash: types.Hash, p4: types.Any, p5: types.Any) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(6600116691201550477)), soundId, model, entity, soundSetHash, p4, p5);
}
/// All found occurrences in b617d, sorted alphabetically and identical lines removed: https://pastebin.com/eeFc5DiW
/// gtaforums.com/topic/795622-audio-for-mods
/// Full list of audio / sound names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/soundNames.json
pub fn PLAY_SOUND_FROM_COORD(soundId: c_int, audioName: [*c]const u8, x: f32, y: f32, z: f32, audioRef: [*c]const u8, isNetwork: windows.BOOL, range: c_int, p8: windows.BOOL) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(10197986523051753760)), soundId, audioName, x, y, z, audioRef, isNetwork, range, p8);
}
pub fn UPDATE_SOUND_COORD(soundId: c_int, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(9134362695735698539)), soundId, x, y, z);
}
pub fn STOP_SOUND(soundId: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11795143047108103093)), soundId);
}
/// Could this be used alongside either,
/// SET_NETWORK_ID_EXISTS_ON_ALL_MACHINES or _SET_NETWORK_ID_SYNC_TO_PLAYER to make it so other players can hear the sound while online? It'd be a bit troll-fun to be able to play the Zancudo UFO creepy sounds globally.
pub fn GET_NETWORK_ID_FROM_SOUND_ID(soundId: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(3306751126589651981)), soundId);
}
pub fn GET_SOUND_ID_FROM_NETWORK_ID(netId: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(8441487127002881156)), netId);
}
pub fn SET_VARIABLE_ON_SOUND(soundId: c_int, variable: [*c]const u8, p2: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(12496135779187878326)), soundId, variable, p2);
}
/// From the scripts, p0:
/// "ArmWrestlingIntensity",
/// "INOUT",
/// "Monkey_Stream",
/// "ZoomLevel"
pub fn SET_VARIABLE_ON_STREAM(variable: [*c]const u8, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3430960290047061881)), variable, p1);
}
pub fn OVERRIDE_UNDERWATER_STREAM(p0: [*c]const u8, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17485733166032374742)), p0, p1);
}
/// AUDIO::SET_VARIABLE_ON_UNDER_WATER_STREAM("inTunnel", 1.0);
/// AUDIO::SET_VARIABLE_ON_UNDER_WATER_STREAM("inTunnel", 0.0);
pub fn SET_VARIABLE_ON_UNDER_WATER_STREAM(variableName: [*c]const u8, value: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8303194209078339010)), variableName, value);
}
pub fn HAS_SOUND_FINISHED(soundId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(18211939454132455653)), soundId);
}
/// Plays ambient speech. See also _0x444180DB.
/// ped: The ped to play the ambient speech.
/// speechName: Name of the speech to play, eg. "GENERIC_HI".
/// speechParam: Can be one of the following:
/// SPEECH_PARAMS_STANDARD
/// SPEECH_PARAMS_ALLOW_REPEAT
/// SPEECH_PARAMS_BEAT
/// SPEECH_PARAMS_FORCE
/// SPEECH_PARAMS_FORCE_FRONTEND
/// SPEECH_PARAMS_FORCE_NO_REPEAT_FRONTEND
/// SPEECH_PARAMS_FORCE_NORMAL
/// SPEECH_PARAMS_FORCE_NORMAL_CLEAR
/// SPEECH_PARAMS_FORCE_NORMAL_CRITICAL
/// SPEECH_PARAMS_FORCE_SHOUTED
/// SPEECH_PARAMS_FORCE_SHOUTED_CLEAR
/// SPEECH_PARAMS_FORCE_SHOUTED_CRITICAL
/// SPEECH_PARAMS_FORCE_PRELOAD_ONLY
/// SPEECH_PARAMS_MEGAPHONE
/// SPEECH_PARAMS_HELI
/// SPEECH_PARAMS_FORCE_MEGAPHONE
/// SPEECH_PARAMS_FORCE_HELI
/// SPEECH_PARAMS_INTERRUPT
/// SPEECH_PARAMS_INTERRUPT_SHOUTED
/// SPEECH_PARAMS_INTERRUPT_SHOUTED_CLEAR
/// SPEECH_PARAMS_INTERRUPT_SHOUTED_CRITICAL
/// SPEECH_PARAMS_INTERRUPT_NO_FORCE
/// SPEECH_PARAMS_INTERRUPT_FRONTEND
/// SPEECH_PARAMS_INTERRUPT_NO_FORCE_FRONTEND
/// SPEECH_PARAMS_ADD_BLIP
/// SPEECH_PARAMS_ADD_BLIP_ALLOW_REPEAT
/// SPEECH_PARAMS_ADD_BLIP_FORCE
/// SPEECH_PARAMS_ADD_BLIP_SHOUTED
/// SPEECH_PARAMS_ADD_BLIP_SHOUTED_FORCE
/// SPEECH_PARAMS_ADD_BLIP_INTERRUPT
/// SPEECH_PARAMS_ADD_BLIP_INTERRUPT_FORCE
/// SPEECH_PARAMS_FORCE_PRELOAD_ONLY_SHOUTED
/// SPEECH_PARAMS_FORCE_PRELOAD_ONLY_SHOUTED_CLEAR
/// SPEECH_PARAMS_FORCE_PRELOAD_ONLY_SHOUTED_CRITICAL
/// SPEECH_PARAMS_SHOUTED
/// SPEECH_PARAMS_SHOUTED_CLEAR
/// SPEECH_PARAMS_SHOUTED_CRITICAL
/// Note: A list of Name and Parameters can be found here https://pastebin.com/1GZS5dCL
/// Full list of speeches and voices names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/speeches.json
/// Used to be known as _PLAY_AMBIENT_SPEECH1
pub fn PLAY_PED_AMBIENT_SPEECH_NATIVE(ped: types.Ped, speechName: [*c]const u8, speechParam: [*c]const u8, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(10233584479118828642)), ped, speechName, speechParam, p3);
}
/// Plays ambient speech. See also _0x5C57B85D.
/// See PLAY_PED_AMBIENT_SPEECH_NATIVE for parameter specifications.
/// Full list of speeches and voices names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/speeches.json
/// Used to be known as _PLAY_AMBIENT_SPEECH2
pub fn PLAY_PED_AMBIENT_SPEECH_AND_CLONE_NATIVE(ped: types.Ped, speechName: [*c]const u8, speechParam: [*c]const u8, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(14309091921686936505)), ped, speechName, speechParam, p3);
}
/// This is the same as PLAY_PED_AMBIENT_SPEECH_NATIVE and PLAY_PED_AMBIENT_SPEECH_AND_CLONE_NATIVE but it will allow you to play a speech file from a specific voice file. It works on players and all peds, even animals.
/// EX (C#):
/// GTA.Native.Function.Call(Hash.PLAY_PED_AMBIENT_SPEECH_WITH_VOICE_NATIVE, Game.Player.Character, "GENERIC_INSULT_HIGH", "s_m_y_sheriff_01_white_full_01", "SPEECH_PARAMS_FORCE_SHOUTED", 0);
/// The first param is the ped you want to play it on, the second is the speech name, the third is the voice name, the fourth is the speech param, and the last param is usually always 0.
/// Full list of speeches and voices names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/speeches.json
/// Used to be known as _PLAY_AMBIENT_SPEECH_WITH_VOICE
pub fn PLAY_PED_AMBIENT_SPEECH_WITH_VOICE_NATIVE(ped: types.Ped, speechName: [*c]const u8, voiceName: [*c]const u8, speechParam: [*c]const u8, p4: windows.BOOL) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(3829013244756636440)), ped, speechName, voiceName, speechParam, p4);
}
/// Full list of speeches and voices names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/speeches.json
/// Used to be known as _PLAY_AMBIENT_SPEECH_AT_COORDS
pub fn PLAY_AMBIENT_SPEECH_FROM_POSITION_NATIVE(speechName: [*c]const u8, voiceName: [*c]const u8, x: f32, y: f32, z: f32, speechParam: [*c]const u8) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(17105797387423809093)), speechName, voiceName, x, y, z, speechParam);
}
/// This native enables the audio flag "TrevorRageIsOverridden" and sets the voice effect to `voiceEffect`
pub fn OVERRIDE_TREVOR_RAGE(voiceEffect: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1417901953124670078)), voiceEffect);
}
pub fn RESET_TREVOR_RAGE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(16682744453613688032)));
}
pub fn SET_PLAYER_ANGRY(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16871640547856543889)), ped, toggle);
}
/// Needs another parameter [int p2]. The signature is PED::PLAY_PAIN(Ped ped, int painID, int p1, int p2);
/// Last 2 parameters always seem to be 0.
/// EX: Function.Call(Hash.PLAY_PAIN, TestPed, 6, 0, 0);
/// Known Pain IDs
/// ________________________
/// 1 - Doesn't seem to do anything. Does NOT crash the game like previously said. (Latest patch)
/// 6 - Scream (Short)
/// 7 - Scared Scream (Kinda Long)
/// 8 - On Fire
pub fn PLAY_PAIN(ped: types.Ped, painID: c_int, p1: c_int, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(13590422653806206188)), ped, painID, p1, p3);
}
pub fn RELEASE_WEAPON_AUDIO() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(14864904916758982725)));
}
/// mode can be any of these:
/// SLOWMO_T1_TRAILER_SMASH
/// SLOWMO_T1_RAYFIRE_EXPLOSION
/// SLOWMO_PROLOGUE_VAULT
/// NIGEL_02_SLOWMO_SETTING
/// JSH_EXIT_TUNNEL_SLOWMO
/// SLOWMO_BIG_SCORE_JUMP
/// SLOWMO_FIB4_TRUCK_SMASH
/// SLOWMO_EXTREME_04
/// SLOW_MO_METH_HOUSE_RAYFIRE
/// BARRY_02_SLOWMO
/// BARRY_01_SLOWMO
pub fn ACTIVATE_AUDIO_SLOWMO_MODE(mode: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14992489562141276024)), mode);
}
/// see ACTIVATE_AUDIO_SLOWMO_MODE for modes
pub fn DEACTIVATE_AUDIO_SLOWMO_MODE(mode: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15980519519720713302)), mode);
}
/// Audio List
/// gtaforums.com/topic/795622-audio-for-mods/
/// All found occurrences in b617d, sorted alphabetically and identical lines removed: https://pastebin.com/FTeAj4yZ
pub fn SET_AMBIENT_VOICE_NAME(ped: types.Ped, name: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7818360706947881051)), ped, name);
}
/// Used to be known as _SET_AMBIENT_VOICE_NAME_HASH
pub fn SET_AMBIENT_VOICE_NAME_HASH(ped: types.Ped, hash: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11120476930948589968)), ped, hash);
}
/// Used to be known as _GET_AMBIENT_VOICE_NAME_HASH
pub fn GET_AMBIENT_VOICE_NAME_HASH(ped: types.Ped) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(6782488807935956022)), ped);
}
/// Assigns some ambient voice to the ped.
/// Used to be known as _SET_PED_SCREAM
pub fn SET_PED_VOICE_FULL(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4669965713077873128)), ped);
}
pub fn SET_PED_RACE_AND_VOICE_GROUP(ped: types.Ped, p1: c_int, voiceGroup: types.Hash) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(1980104060019931335)), ped, p1, voiceGroup);
}
/// From the scripts:
/// AUDIO::SET_PED_VOICE_GROUP(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("PAIGE_PVG"));
/// AUDIO::SET_PED_VOICE_GROUP(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("TALINA_PVG"));
/// AUDIO::SET_PED_VOICE_GROUP(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("FEMALE_LOST_BLACK_PVG"));
/// AUDIO::SET_PED_VOICE_GROUP(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("FEMALE_LOST_WHITE_PVG"));
/// Used to be known as _SET_PED_VOICE_GROUP
pub fn SET_PED_VOICE_GROUP(ped: types.Ped, voiceGroupHash: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8997220342924992947)), ped, voiceGroupHash);
}
/// Dat151RelType == 29
/// Used to be known as _SET_PED_VOICE_GROUP_RACE
pub fn SET_PED_VOICE_GROUP_FROM_RACE_TO_PVG(ped: types.Ped, voiceGroupHash: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(840978186039458582)), ped, voiceGroupHash);
}
/// BOOL p1: 0 = Female; 1 = Male
/// Used to be known as _SET_PED_AUDIO_GENDER
pub fn SET_PED_GENDER(ped: types.Ped, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11904189438099079638)), ped, p1);
}
/// Used to be known as _SET_PED_MUTE
pub fn STOP_CURRENT_PLAYING_SPEECH(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8823625181532992711)), ped);
}
pub fn STOP_CURRENT_PLAYING_AMBIENT_SPEECH(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13312289524232936207)), ped);
}
pub fn IS_AMBIENT_SPEECH_PLAYING(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10408602366793727917)), ped);
}
pub fn IS_SCRIPTED_SPEECH_PLAYING(p0: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14743273960543126772)), p0);
}
pub fn IS_ANY_SPEECH_PLAYING(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8255223690533510857)), ped);
}
pub fn IS_ANY_POSITIONAL_SPEECH_PLAYING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(3515674106585787896)));
}
/// Checks if the ped can play the speech or has the speech file, p2 is usually false.
/// Used to be known as _CAN_PED_SPEAK
pub fn DOES_CONTEXT_EXIST_FOR_THIS_PED(ped: types.Ped, speechName: [*c]const u8, p2: windows.BOOL) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(5312448707695254138)), ped, speechName, p2);
}
pub fn IS_PED_IN_CURRENT_CONVERSATION(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(332865596560769548)), ped);
}
/// Sets the ped drunk sounds. Only works with PLAYER_PED_ID
/// ====================================================
/// As mentioned above, this only sets the drunk sound to ped/player.
/// To give the Ped a drunk effect with drunk walking animation try using SET_PED_MOVEMENT_CLIPSET
/// Below is an example
/// if (!Function.Call<bool>(Hash.HAS_ANIM_SET_LOADED, "move_m@drunk@verydrunk"))
/// {
/// Function.Call(Hash.REQUEST_ANIM_SET, "move_m@drunk@verydrunk");
/// }
/// Function.Call(Hash.SET_PED_MOVEMENT_CLIPSET, Ped.Handle, "move_m@drunk@verydrunk", 0x3E800000);
/// And to stop the effect use
/// RESET_PED_MOVEMENT_CLIPSET
pub fn SET_PED_IS_DRUNK(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10795923819931986826)), ped, toggle);
}
/// Plays sounds from a ped with chop model. For example it used to play bark or sniff sounds. p1 is always 3 or 4294967295 in decompiled scripts. By a quick disassembling I can assume that this arg is unused.
/// This native is works only when you call it on the ped with right model (ac_chop only ?)
/// Speech Name can be: CHOP_SNIFF_SEQ CHOP_WHINE CHOP_LICKS_MOUTH CHOP_PANT bark GROWL SNARL BARK_SEQ
pub fn PLAY_ANIMAL_VOCALIZATION(pedHandle: types.Ped, p1: c_int, speechName: [*c]const u8) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(17151515459292797962)), pedHandle, p1, speechName);
}
pub fn IS_ANIMAL_VOCALIZATION_PLAYING(pedHandle: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14007848093023379389)), pedHandle);
}
/// mood can be 0 or 1 (it's not a boolean value!). Effects audio of the animal.
pub fn SET_ANIMAL_MOOD(animal: types.Ped, mood: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14742448247598603323)), animal, mood);
}
pub fn IS_MOBILE_PHONE_RADIO_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(12924461877893738878)));
}
pub fn SET_MOBILE_PHONE_RADIO_STATE(state: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13774378573840577503)), state);
}
/// Returns 255 (radio off index) if the function fails.
pub fn GET_PLAYER_RADIO_STATION_INDEX() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(16766751624649170067)));
}
/// Returns active radio station name
pub fn GET_PLAYER_RADIO_STATION_NAME() [*c]const u8 {
return nativeCaller.invoke0(@as(u64, @intCast(17786742166479351043)));
}
/// Converts radio station index to string. Use HUD::GET_FILENAME_FOR_AUDIO_CONVERSATION to get the user-readable text.
pub fn GET_RADIO_STATION_NAME(radioStation: c_int) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(12866443377061439673)), radioStation);
}
pub fn GET_PLAYER_RADIO_STATION_GENRE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(11921478027720445163)));
}
pub fn IS_RADIO_RETUNING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(11624255977718632037)));
}
pub fn IS_RADIO_FADED_OUT() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(443220042696381232)));
}
/// Tune Forward...
pub fn SET_RADIO_RETUNE_UP() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(18385502500354595165)));
}
/// Tune Backwards...
pub fn SET_RADIO_RETUNE_DOWN() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(15955074384889273849)));
}
/// List of radio stations that are in the wheel, in clockwise order, as of LS Tuners DLC: https://git.io/J8a3k
/// An older list including hidden radio stations: https://pastebin.com/Kj9t38KF
pub fn SET_RADIO_TO_STATION_NAME(stationName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14312116532935479559)), stationName);
}
/// List of radio stations that are in the wheel, in clockwise order, as of LS Tuners DLC: https://git.io/J8a3k
/// An older list including hidden radio stations: https://pastebin.com/Kj9t38KF
pub fn SET_VEH_RADIO_STATION(vehicle: types.Vehicle, radioStation: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1989465795936398022)), vehicle, radioStation);
}
/// Used to be known as _SET_VEH_HAS_RADIO_OVERRIDE
pub fn SET_VEH_HAS_NORMAL_RADIO(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4487122755207780399)), vehicle);
}
/// Used to be known as _IS_VEHICLE_RADIO_ENABLED
pub fn IS_VEHICLE_RADIO_ON(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(857019373655947543)), vehicle);
}
pub fn SET_VEH_FORCED_RADIO_THIS_FRAME(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13943246726267993616)), vehicle);
}
/// Full list of static emitters by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/staticEmitters.json
pub fn SET_EMITTER_RADIO_STATION(emitterName: [*c]const u8, radioStation: [*c]const u8, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(12462994012102129927)), emitterName, radioStation, p2);
}
/// Example:
/// AUDIO::SET_STATIC_EMITTER_ENABLED((Any*)"LOS_SANTOS_VANILLA_UNICORN_01_STAGE", false); AUDIO::SET_STATIC_EMITTER_ENABLED((Any*)"LOS_SANTOS_VANILLA_UNICORN_02_MAIN_ROOM", false); AUDIO::SET_STATIC_EMITTER_ENABLED((Any*)"LOS_SANTOS_VANILLA_UNICORN_03_BACK_ROOM", false);
/// This turns off surrounding sounds not connected directly to peds.
/// Full list of static emitters by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/staticEmitters.json
pub fn SET_STATIC_EMITTER_ENABLED(emitterName: [*c]const u8, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4151524163803265259)), emitterName, toggle);
}
/// Full list of static emitters by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/staticEmitters.json
/// Used to be known as _LINK_STATIC_EMITTER_TO_ENTITY
pub fn LINK_STATIC_EMITTER_TO_ENTITY(emitterName: [*c]const u8, entity: types.Entity) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7286034922052847791)), emitterName, entity);
}
/// Sets radio station by index.
pub fn SET_RADIO_TO_STATION_INDEX(radioStation: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11968792548046558991)), radioStation);
}
pub fn SET_FRONTEND_RADIO_ACTIVE(active: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17866461894064860088)), active);
}
/// "news" that play on the radio after you've done something in story mode(?)
pub fn UNLOCK_MISSION_NEWS_STORY(newsStory: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12782811667038416321)), newsStory);
}
/// Used to be known as GET_NUMBER_OF_PASSENGER_VOICE_VARIATIONS
pub fn IS_MISSION_NEWS_STORY_UNLOCKED(newsStory: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7414222364659619956)), newsStory);
}
pub fn GET_AUDIBLE_MUSIC_TRACK_TEXT_ID() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(5814594605652792411)));
}
pub fn PLAY_END_CREDITS_MUSIC(play: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14795288279680600320)), play);
}
pub fn SKIP_RADIO_FORWARD() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(7916129512124750885)));
}
pub fn FREEZE_RADIO_STATION(radioStation: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3769294338740074691)), radioStation);
}
pub fn UNFREEZE_RADIO_STATION(radioStation: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18158589894405624285)), radioStation);
}
pub fn SET_RADIO_AUTO_UNFREEZE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13955141577658083728)), toggle);
}
pub fn SET_INITIAL_PLAYER_STATION(radioStation: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9833995800756988045)), radioStation);
}
pub fn SET_USER_RADIO_CONTROL_ENABLED(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1869590208789261902)), toggle);
}
/// Only found this one in the decompiled scripts:
/// AUDIO::SET_RADIO_TRACK("RADIO_03_HIPHOP_NEW", "ARM1_RADIO_STARTS");
pub fn SET_RADIO_TRACK(radioStation: [*c]const u8, radioTrack: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12940960428246098699)), radioStation, radioTrack);
}
/// Used to be known as _SET_RADIO_TRACK_MIX
pub fn SET_RADIO_TRACK_WITH_START_OFFSET(radioStationName: [*c]const u8, mixName: [*c]const u8, p2: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(3220081778324545110)), radioStationName, mixName, p2);
}
pub fn SET_NEXT_RADIO_TRACK(radioName: [*c]const u8, radioTrack: [*c]const u8, p2: [*c]const u8, p3: [*c]const u8) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(6191592767246369712)), radioName, radioTrack, p2, p3);
}
pub fn SET_VEHICLE_RADIO_LOUD(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13506045344488295374)), vehicle, toggle);
}
/// Used to be known as _IS_VEHICLE_RADIO_LOUD
pub fn CAN_VEHICLE_RECEIVE_CB_RADIO(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(228013862591714732)), vehicle);
}
pub fn SET_MOBILE_RADIO_ENABLED_DURING_GAMEPLAY(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1195764362099706803)), toggle);
}
pub fn DOES_PLAYER_VEH_HAVE_RADIO() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(1195309752322279585)));
}
/// Used to be known as _IS_PLAYER_VEHICLE_RADIO_ENABLED
pub fn IS_PLAYER_VEH_RADIO_ENABLE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6864568025735202625)));
}
/// can't seem to enable radio on cop cars etc
pub fn SET_VEHICLE_RADIO_ENABLED(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4294324703405435915)), vehicle, toggle);
}
pub fn SET_POSITIONED_PLAYER_VEHICLE_RADIO_EMITTER_ENABLED(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15710668341870853775)), p0);
}
/// Examples:
/// AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_01_CLASS_ROCK", "END_CREDITS_KILL_MICHAEL", 1);
/// AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_01_CLASS_ROCK", "END_CREDITS_KILL_MICHAEL", 1);
/// AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_01_CLASS_ROCK", "END_CREDITS_KILL_TREVOR", 1);
/// AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_01_CLASS_ROCK", "END_CREDITS_SAVE_MICHAEL_TREVOR", 1);
/// AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_01_CLASS_ROCK", "OFF_ROAD_RADIO_ROCK_LIST", 1);
/// AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_06_COUNTRY", "MAGDEMO2_RADIO_DINGHY", 1);
/// AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_16_SILVERLAKE", "SEA_RACE_RADIO_PLAYLIST", 1);
/// AUDIO::SET_CUSTOM_RADIO_TRACK_LIST("RADIO_01_CLASS_ROCK", "OFF_ROAD_RADIO_ROCK_LIST", 1);
pub fn SET_CUSTOM_RADIO_TRACK_LIST(radioStation: [*c]const u8, trackListName: [*c]const u8, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(5638588730332109746)), radioStation, trackListName, p2);
}
/// 3 calls in the b617d scripts, removed duplicate.
/// AUDIO::CLEAR_CUSTOM_RADIO_TRACK_LIST("RADIO_16_SILVERLAKE");
/// AUDIO::CLEAR_CUSTOM_RADIO_TRACK_LIST("RADIO_01_CLASS_ROCK");
pub fn CLEAR_CUSTOM_RADIO_TRACK_LIST(radioStation: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1609177368812381182)), radioStation);
}
/// Used to be known as _MAX_RADIO_STATION_INDEX
pub fn GET_NUM_UNLOCKED_RADIO_STATIONS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(17393480977256291815)));
}
pub fn FIND_RADIO_STATION_INDEX(stationNameHash: types.Hash) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(10189192497809277579)), stationNameHash);
}
/// 6 calls in the b617d scripts, removed identical lines:
/// AUDIO::SET_RADIO_STATION_MUSIC_ONLY("RADIO_01_CLASS_ROCK", 1);
/// AUDIO::SET_RADIO_STATION_MUSIC_ONLY(AUDIO::GET_RADIO_STATION_NAME(10), 0);
/// AUDIO::SET_RADIO_STATION_MUSIC_ONLY(AUDIO::GET_RADIO_STATION_NAME(10), 1);
pub fn SET_RADIO_STATION_MUSIC_ONLY(radioStation: [*c]const u8, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8596201885425639714)), radioStation, toggle);
}
pub fn SET_RADIO_FRONTEND_FADE_TIME(fadeTime: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3212981541312017806)), fadeTime);
}
/// AUDIO::UNLOCK_RADIO_STATION_TRACK_LIST("RADIO_16_SILVERLAKE", "MIRRORPARK_LOCKED");
pub fn UNLOCK_RADIO_STATION_TRACK_LIST(radioStation: [*c]const u8, trackListName: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(223714790757418793)), radioStation, trackListName);
}
/// Used to be known as _LOCK_RADIO_STATION_TRACK_LIST
pub fn LOCK_RADIO_STATION_TRACK_LIST(radioStation: [*c]const u8, trackListName: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18401249181066767603)), radioStation, trackListName);
}
/// Just a nullsub (i.e. does absolutely nothing) since build 1604.
/// Used to be known as _UPDATE_LSUR
pub fn UPDATE_UNLOCKABLE_DJ_RADIO_TRACKS(enableMixes: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5165303600949523728)), enableMixes);
}
/// Disables the radio station (hides it from the radio wheel).
/// Used to be known as _SET_RADIO_STATION_DISABLED
/// Used to be known as _LOCK_RADIO_STATION
pub fn LOCK_RADIO_STATION(radioStationName: [*c]const u8, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5151446947609482641)), radioStationName, toggle);
}
/// Doesn't have an effect in Story Mode.
/// Used to be known as _SET_RADIO_STATION_IS_VISIBLE
pub fn SET_RADIO_STATION_AS_FAVOURITE(radioStation: [*c]const u8, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5525894727350360205)), radioStation, toggle);
}
/// Used to be known as _IS_RADIO_STATION_VISIBLE
pub fn IS_RADIO_STATION_FAVOURITED(radioStation: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3105096544373697145)), radioStation);
}
pub fn GET_NEXT_AUDIBLE_BEAT(out1: [*c]f32, out2: [*c]f32, out3: [*c]c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(14288240297836553973)), out1, out2, out3);
}
/// Changes start time of a tracklist (milliseconds)
/// R* uses a random int: MISC::GET_RANDOM_INT_IN_RANGE(0, 13) * 60000)
/// Used to be known as _FORCE_RADIO_TRACK_LIST_POSITION
pub fn FORCE_MUSIC_TRACK_LIST(radioStation: [*c]const u8, trackListName: [*c]const u8, milliseconds: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(5623580937310184828)), radioStation, trackListName, milliseconds);
}
/// Used to be known as _GET_CURRENT_RADIO_TRACK_PLAYBACK_TIME
pub fn GET_CURRENT_TRACK_PLAY_TIME(radioStationName: [*c]const u8) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(4496226186989941441)), radioStationName);
}
/// Used to be known as _GET_CURRENT_RADIO_TRACK_NAME
pub fn GET_CURRENT_TRACK_SOUND_NAME(radioStationName: [*c]const u8) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(3807349008842726624)), radioStationName);
}
pub fn SET_VEHICLE_MISSILE_WARNING_ENABLED(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17525287951118717177)), vehicle, toggle);
}
/// Full list of ambient zones by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ambientZones.json
pub fn SET_AMBIENT_ZONE_STATE(zoneName: [*c]const u8, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(13664060191501999686)), zoneName, p1, p2);
}
/// This function also has a p2, unknown. Signature AUDIO::CLEAR_AMBIENT_ZONE_STATE(const char* zoneName, bool p1, Any p2);
/// Still needs more research.
/// Full list of ambient zones by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ambientZones.json
pub fn CLEAR_AMBIENT_ZONE_STATE(zoneName: [*c]const u8, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2417821992125818111)), zoneName, p1);
}
pub fn SET_AMBIENT_ZONE_LIST_STATE(ambientZone: [*c]const u8, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(10901238110512533054)), ambientZone, p1, p2);
}
pub fn CLEAR_AMBIENT_ZONE_LIST_STATE(ambientZone: [*c]const u8, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1300494407988977572)), ambientZone, p1);
}
/// Full list of ambient zones by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ambientZones.json
pub fn SET_AMBIENT_ZONE_STATE_PERSISTENT(ambientZone: [*c]const u8, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2118468919339294011)), ambientZone, p1, p2);
}
/// Full list of ambient zones by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ambientZones.json
pub fn SET_AMBIENT_ZONE_LIST_STATE_PERSISTENT(ambientZone: [*c]const u8, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(17538017154727691745)), ambientZone, p1, p2);
}
/// Full list of ambient zones by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ambientZones.json
pub fn IS_AMBIENT_ZONE_ENABLED(ambientZone: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(135813300961836955)), ambientZone);
}
pub fn REFRESH_CLOSEST_OCEAN_SHORELINE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(6713735284247588366)));
}
/// All occurrences found in b617d, sorted alphabetically and identical lines removed:
/// AUDIO::SET_CUTSCENE_AUDIO_OVERRIDE("_AK");
/// AUDIO::SET_CUTSCENE_AUDIO_OVERRIDE("_CUSTOM");
/// AUDIO::SET_CUTSCENE_AUDIO_OVERRIDE("_TOOTHLESS");
/// Full list of cutscene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/cutsceneNames.json
pub fn SET_CUTSCENE_AUDIO_OVERRIDE(name: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4272779084872942809)), name);
}
/// Used to be known as GET_PLAYER_HEADSET_SOUND_ALTERNATE
/// Used to be known as _SET_VARIABLE_ON_CUTSCENE_AUDIO
pub fn SET_VARIABLE_ON_SYNCH_SCENE_AUDIO(variableName: [*c]const u8, value: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13601609279912048264)), variableName, value);
}
/// Plays the given police radio message.
/// All found occurrences in b617d, sorted alphabetically and identical lines removed: https://pastebin.com/GBnsQ5hr
/// Full list of police report names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/policeReportNames.json
pub fn PLAY_POLICE_REPORT(name: [*c]const u8, p1: f32) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(16135224756727311126)), name, p1);
}
/// Used to be known as _DISABLE_POLICE_REPORTS
/// Used to be known as _CANCEL_CURRENT_POLICE_REPORT
pub fn CANCEL_ALL_POLICE_REPORTS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(13040471442308772207)));
}
/// Plays the siren sound of a vehicle which is otherwise activated when fastly double-pressing the horn key.
/// Only works on vehicles with a police siren.
pub fn BLIP_SIREN(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1986128932158055094)), vehicle);
}
/// Overrides the vehicle's horn hash.
/// When changing this hash on a vehicle, it will not return the 'overwritten' hash. It will still always return the default horn hash (same as GET_VEHICLE_DEFAULT_HORN)
/// vehicle - the vehicle whose horn should be overwritten
/// mute - p1 seems to be an option for muting the horn
/// p2 - maybe a horn id, since the function AUDIO::GET_VEHICLE_DEFAULT_HORN(veh) exists?
pub fn OVERRIDE_VEH_HORN(vehicle: types.Vehicle, override: windows.BOOL, hornHash: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(4385413544159347542)), vehicle, override, hornHash);
}
/// Checks whether the horn of a vehicle is currently played.
pub fn IS_HORN_ACTIVE(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11343437243661181217)), vehicle);
}
/// Makes pedestrians sound their horn longer, faster and more agressive when they use their horn.
pub fn SET_AGGRESSIVE_HORNS(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4133168733379211737)), toggle);
}
/// Does nothing (it's a nullsub).
pub fn SET_RADIO_POSITION_AUDIO_MUTE(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(209765349828934295)), p0);
}
/// SET_VEHICLE_CONVERSATIONS_PERSIST?
pub fn SET_VEHICLE_CONVERSATIONS_PERSIST(p0: windows.BOOL, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6393765101370660340)), p0, p1);
}
pub fn SET_VEHICLE_CONVERSATIONS_PERSIST_NEW(p0: windows.BOOL, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(11229652372472148355)), p0, p1, p2);
}
pub fn IS_STREAM_PLAYING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(15068944498283895160)));
}
pub fn GET_STREAM_PLAY_TIME() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(5652787034970432475)));
}
/// Example:
/// AUDIO::LOAD_STREAM("CAR_STEAL_1_PASSBY", "CAR_STEAL_1_SOUNDSET");
/// All found occurrences in the b678d decompiled scripts: https://pastebin.com/3rma6w5w
/// Stream names often ends with "_MASTER", "_SMALL" or "_STREAM". Also "_IN", "_OUT" and numbers.
/// soundSet is often set to 0 in the scripts. These are common to end the soundSets: "_SOUNDS", "_SOUNDSET" and numbers.
/// Full list of audio / sound names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/soundNames.json
pub fn LOAD_STREAM(streamName: [*c]const u8, soundSet: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(2242675453442413023)), streamName, soundSet);
}
/// Example:
/// AUDIO::LOAD_STREAM_WITH_START_OFFSET("STASH_TOXIN_STREAM", 2400, "FBI_05_SOUNDS");
/// Only called a few times in the scripts.
/// Full list of audio / sound names by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/soundNames.json
pub fn LOAD_STREAM_WITH_START_OFFSET(streamName: [*c]const u8, startOffset: c_int, soundSet: [*c]const u8) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(6467568711430256402)), streamName, startOffset, soundSet);
}
pub fn PLAY_STREAM_FROM_PED(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9873189826558735825)), ped);
}
pub fn PLAY_STREAM_FROM_VEHICLE(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13187512395955731962)), vehicle);
}
/// Used with AUDIO::LOAD_STREAM
/// Example from finale_heist2b.c4:
/// TASK::TASK_SYNCHRONIZED_SCENE(l_4C8[2/*14*/], l_4C8[2/*14*/]._f7, l_30A, "push_out_vault_l", 4.0, -1.5, 5, 713, 4.0, 0);
/// PED::SET_SYNCHRONIZED_SCENE_PHASE(l_4C8[2/*14*/]._f7, 0.0);
/// PED::FORCE_PED_AI_AND_ANIMATION_UPDATE(l_4C8[2/*14*/], 0, 0);
/// PED::SET_PED_COMBAT_ATTRIBUTES(l_4C8[2/*14*/], 38, 1);
/// PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(l_4C8[2/*14*/], 1);
/// if (AUDIO::LOAD_STREAM("Gold_Cart_Push_Anim_01", "BIG_SCORE_3B_SOUNDS")) {
/// AUDIO::PLAY_STREAM_FROM_OBJECT(l_36F[0/*1*/]);
/// }
pub fn PLAY_STREAM_FROM_OBJECT(object: types.Object) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16981556202366523133)), object);
}
pub fn PLAY_STREAM_FRONTEND() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(6412250883756258804)));
}
/// Used to be known as SPECIAL_FRONTEND_EQUAL
pub fn PLAY_STREAM_FROM_POSITION(x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2397092858668377451)), x, y, z);
}
pub fn STOP_STREAM() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(11849403913525625169)));
}
pub fn STOP_PED_SPEAKING(ped: types.Ped, shaking: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11341426432931849171)), ped, shaking);
}
pub fn BLOCK_ALL_SPEECH_FROM_PED(ped: types.Ped, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(17919030089904285950)), ped, p1, p2);
}
pub fn STOP_PED_SPEAKING_SYNCED(ped: types.Ped, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12350983052834378864)), ped, p1);
}
pub fn DISABLE_PED_PAIN_AUDIO(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12223926206249021672)), ped, toggle);
}
/// Common in the scripts:
/// AUDIO::IS_AMBIENT_SPEECH_DISABLED(PLAYER::PLAYER_PED_ID());
pub fn IS_AMBIENT_SPEECH_DISABLED(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10604900741009915903)), ped);
}
pub fn BLOCK_SPEECH_CONTEXT_GROUP(p0: [*c]const u8, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12152915442233817467)), p0, p1);
}
pub fn UNBLOCK_SPEECH_CONTEXT_GROUP(p0: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3083486709265083890)), p0);
}
pub fn SET_SIREN_WITH_NO_DRIVER(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2301065097431137522)), vehicle, toggle);
}
/// Used to be known as _SET_SIREN_KEEP_ON
pub fn SET_SIREN_BYPASS_MP_DRIVER_CHECK(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17691493407055483956)), vehicle, toggle);
}
/// Used to be known as _TRIGGER_SIREN
pub fn TRIGGER_SIREN_AUDIO(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7405038211763814842)), vehicle);
}
/// Used to be known as _SOUND_VEHICLE_HORN_THIS_FRAME
pub fn SET_HORN_PERMANENTLY_ON(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11245928624285173525)), vehicle);
}
pub fn SET_HORN_ENABLED(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8563176606583573774)), vehicle, toggle);
}
pub fn SET_AUDIO_VEHICLE_PRIORITY(vehicle: types.Vehicle, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16525471215939746068)), vehicle, p1);
}
pub fn SET_HORN_PERMANENTLY_ON_TIME(vehicle: types.Vehicle, time: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11329637667895357080)), vehicle, time);
}
pub fn USE_SIREN_AS_HORN(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18055825785383972600)), vehicle, toggle);
}
/// This native sets the audio of the specified vehicle to the audioName (p1).
/// Use the audioNameHash found in vehicles.meta
/// Example:
/// _SET_VEHICLE_AUDIO(veh, "ADDER");
/// The selected vehicle will now have the audio of the Adder.
/// Used to be known as _SET_VEHICLE_AUDIO
/// Used to be known as _FORCE_VEHICLE_ENGINE_AUDIO
pub fn FORCE_USE_AUDIO_GAME_OBJECT(vehicle: types.Vehicle, audioName: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5695999342423706424)), vehicle, audioName);
}
/// Used to be known as _PRELOAD_VEHICLE_AUDIO
pub fn PRELOAD_VEHICLE_AUDIO_BANK(vehicleModel: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14577283838636984958)), vehicleModel);
}
pub fn SET_VEHICLE_STARTUP_REV_SOUND(vehicle: types.Vehicle, p1: [*c]const u8, p2: [*c]const u8) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(17435709577742980892)), vehicle, p1, p2);
}
/// Used to be known as _RESET_VEHICLE_STARTUP_REV_SOUND
pub fn RESET_VEHICLE_STARTUP_REV_SOUND(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15194245252994173335)), vehicle);
}
pub fn SET_VEHICLE_FORCE_REVERSE_WARNING(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10952671477917319270)), p0, p1);
}
pub fn IS_VEHICLE_AUDIBLY_DAMAGED(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6753148804760854258)), vehicle);
}
pub fn SET_VEHICLE_AUDIO_ENGINE_DAMAGE_FACTOR(vehicle: types.Vehicle, damageFactor: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6478345086363979066)), vehicle, damageFactor);
}
/// intensity: 0.0f - 1.0f, only used once with 1.0f in R* Scripts (nigel2)
/// Makes an engine rattling noise when you decelerate, you need to be going faster to hear lower values
pub fn SET_VEHICLE_AUDIO_BODY_DAMAGE_FACTOR(vehicle: types.Vehicle, intensity: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(124778452841184670)), vehicle, intensity);
}
pub fn ENABLE_VEHICLE_FANBELT_DAMAGE(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2019638435461318354)), vehicle, toggle);
}
pub fn ENABLE_VEHICLE_EXHAUST_POPS(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3162860040914967898)), vehicle, toggle);
}
/// SET_VEHICLE_BOOST_ACTIVE(vehicle, 1, 0);
/// SET_VEHICLE_BOOST_ACTIVE(vehicle, 0, 0);
/// Will give a boost-soundeffect.
pub fn SET_VEHICLE_BOOST_ACTIVE(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5333632485742295457)), vehicle, toggle);
}
pub fn SET_PLAYER_VEHICLE_ALARM_AUDIO_ACTIVE(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8060789696654383242)), vehicle, toggle);
}
pub fn SET_SCRIPT_UPDATE_DOOR_AUDIO(doorHash: types.Hash, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(486391216160038251)), doorHash, toggle);
}
/// doorId: see SET_VEHICLE_DOOR_SHUT
pub fn PLAY_VEHICLE_DOOR_OPEN_SOUND(vehicle: types.Vehicle, doorId: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4202875855019354157)), vehicle, doorId);
}
/// doorId: see SET_VEHICLE_DOOR_SHUT
pub fn PLAY_VEHICLE_DOOR_CLOSE_SOUND(vehicle: types.Vehicle, doorId: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7107901401240039220)), vehicle, doorId);
}
/// Works for planes only.
pub fn ENABLE_STALL_WARNING_SOUNDS(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13932175539696029618)), vehicle, toggle);
}
pub fn _ENABLE_DRAG_RACE_STATIONARY_WARNING_SOUNDS(vehicle: types.Vehicle, enable: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13761734000011181391)), vehicle, enable);
}
/// Hardcoded to return 1
pub fn IS_GAME_IN_CONTROL_OF_MUSIC() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(7865778738160678141)));
}
pub fn SET_GPS_ACTIVE(active: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4311058836203103464)), active);
}
/// Called 38 times in the scripts. There are 5 different audioNames used.
/// One unknown removed below.
/// AUDIO::PLAY_MISSION_COMPLETE_AUDIO("DEAD");
/// AUDIO::PLAY_MISSION_COMPLETE_AUDIO("FRANKLIN_BIG_01");
/// AUDIO::PLAY_MISSION_COMPLETE_AUDIO("GENERIC_FAILED");
/// AUDIO::PLAY_MISSION_COMPLETE_AUDIO("TREVOR_SMALL_01");
pub fn PLAY_MISSION_COMPLETE_AUDIO(audioName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12770144453462408297)), audioName);
}
pub fn IS_MISSION_COMPLETE_PLAYING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(1847333620734394250)));
}
pub fn IS_MISSION_COMPLETE_READY_FOR_UI() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8008982896674322616)));
}
pub fn BLOCK_DEATH_JINGLE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17389727270974467564)), toggle);
}
/// Used to prepare a scene where the surrounding sound is muted or a bit changed. This does not play any sound.
/// List of all usable scene names found in b617d. Sorted alphabetically and identical names removed: https://pastebin.com/MtM9N9CC
/// Full list of audio scene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/audioSceneNames.json
pub fn START_AUDIO_SCENE(scene: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(88524962657658098)), scene);
}
/// Full list of audio scene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/audioSceneNames.json
pub fn STOP_AUDIO_SCENE(scene: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16134218418505442952)), scene);
}
/// ??
pub fn STOP_AUDIO_SCENES() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(13459003645209002401)));
}
/// Full list of audio scene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/audioSceneNames.json
pub fn IS_AUDIO_SCENE_ACTIVE(scene: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13140202257820324389)), scene);
}
/// Full list of audio scene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/audioSceneNames.json
pub fn SET_AUDIO_SCENE_VARIABLE(scene: [*c]const u8, variable: [*c]const u8, value: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(17231240493402826344)), scene, variable, value);
}
pub fn SET_AUDIO_SCRIPT_CLEANUP_TIME(time: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11958033039665568197)), time);
}
/// All found occurrences in b678d:
/// https://pastebin.com/ceu67jz8
/// Used to be known as _DYNAMIC_MIXER_RELATED_FN
pub fn ADD_ENTITY_TO_AUDIO_MIX_GROUP(entity: types.Entity, groupName: [*c]const u8, p2: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(1529380729329191296)), entity, groupName, p2);
}
pub fn REMOVE_ENTITY_FROM_AUDIO_MIX_GROUP(entity: types.Entity, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1795608933623082656)), entity, p1);
}
/// Used to be known as AUDIO_IS_SCRIPTED_MUSIC_PLAYING
pub fn AUDIO_IS_MUSIC_PLAYING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9538619863173364286)));
}
/// This is an alias of AUDIO_IS_MUSIC_PLAYING.
/// Used to be known as _AUDIO_IS_SCRIPTED_MUSIC_PLAYING_2
pub fn AUDIO_IS_SCRIPTED_MUSIC_PLAYING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(3302154423580083327)));
}
/// All music event names found in the b617d scripts: https://pastebin.com/GnYt0R3P
/// Full list of music event names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/musicEventNames.json
pub fn PREPARE_MUSIC_EVENT(eventName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2184674316064724362)), eventName);
}
/// All music event names found in the b617d scripts: https://pastebin.com/GnYt0R3P
/// Full list of music event names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/musicEventNames.json
pub fn CANCEL_MUSIC_EVENT(eventName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6563900810404773285)), eventName);
}
/// List of all usable event names found in b617d used with this native. Sorted alphabetically and identical names removed: https://pastebin.com/RzDFmB1W
/// All music event names found in the b617d scripts: https://pastebin.com/GnYt0R3P
/// Full list of music event names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/musicEventNames.json
pub fn TRIGGER_MUSIC_EVENT(eventName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8101227722246563600)), eventName);
}
pub fn IS_MUSIC_ONESHOT_PLAYING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(11571905952892451617)));
}
pub fn GET_MUSIC_PLAYTIME() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(16690571381759561851)));
}
pub fn SET_GLOBAL_RADIO_SIGNAL_LEVEL(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1556964644180597976)), p0);
}
pub fn RECORD_BROKEN_GLASS(x: f32, y: f32, z: f32, radius: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(18150072924382293149)), x, y, z, radius);
}
pub fn CLEAR_ALL_BROKEN_GLASS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(12907890408356333843)));
}
pub fn SCRIPT_OVERRIDES_WIND_ELEVATION(p0: windows.BOOL, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8122502030125737524)), p0, p1);
}
pub fn SET_PED_WALLA_DENSITY(p0: f32, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1484761153065925273)), p0, p1);
}
pub fn SET_PED_INTERIOR_WALLA_DENSITY(p0: f32, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10086101100699743710)), p0, p1);
}
pub fn FORCE_PED_PANIC_WALLA() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(445116036604426858)));
}
/// Example:
/// bool prepareAlarm = AUDIO::PREPARE_ALARM("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS");
/// Full list of alarm names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/alarmSounds.json
pub fn PREPARE_ALARM(alarmName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11345884900650014003)), alarmName);
}
/// Example:
/// This will start the alarm at Fort Zancudo.
/// AUDIO::START_ALARM("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS", 1);
/// First parameter (char) is the name of the alarm.
/// Second parameter (bool) is unknown, it does not seem to make a difference if this one is 0 or 1.
/// ----------
/// It DOES make a difference but it has to do with the duration or something I dunno yet
/// ----------
/// Found in the b617d scripts:
/// AUDIO::START_ALARM("AGENCY_HEIST_FIB_TOWER_ALARMS", 0);
/// AUDIO::START_ALARM("AGENCY_HEIST_FIB_TOWER_ALARMS_UPPER", 1);
/// AUDIO::START_ALARM("AGENCY_HEIST_FIB_TOWER_ALARMS_UPPER_B", 0);
/// AUDIO::START_ALARM("BIG_SCORE_HEIST_VAULT_ALARMS", a_0);
/// AUDIO::START_ALARM("FBI_01_MORGUE_ALARMS", 1);
/// AUDIO::START_ALARM("FIB_05_BIOTECH_LAB_ALARMS", 0);
/// AUDIO::START_ALARM("JEWEL_STORE_HEIST_ALARMS", 0);
/// AUDIO::START_ALARM("PALETO_BAY_SCORE_ALARM", 1);
/// AUDIO::START_ALARM("PALETO_BAY_SCORE_CHICKEN_FACTORY_ALARM", 0);
/// AUDIO::START_ALARM("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS", 1);
/// AUDIO::START_ALARM("PORT_OF_LS_HEIST_SHIP_ALARMS", 0);
/// AUDIO::START_ALARM("PRISON_ALARMS", 0);
/// AUDIO::START_ALARM("PROLOGUE_VAULT_ALARMS", 0);
/// Full list of alarm names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/alarmSounds.json
pub fn START_ALARM(alarmName: [*c]const u8, p2: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(240361013244630962)), alarmName, p2);
}
/// Example:
/// This will stop the alarm at Fort Zancudo.
/// AUDIO::STOP_ALARM("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS", 1);
/// First parameter (char) is the name of the alarm.
/// Second parameter (bool) has to be true (1) to have any effect.
/// Full list of alarm names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/alarmSounds.json
pub fn STOP_ALARM(alarmName: [*c]const u8, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11658374460494404161)), alarmName, toggle);
}
pub fn STOP_ALL_ALARMS(stop: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3420847337706966162)), stop);
}
/// Example:
/// bool playing = AUDIO::IS_ALARM_PLAYING("PORT_OF_LS_HEIST_FORT_ZANCUDO_ALARMS");
/// Full list of alarm names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/alarmSounds.json
pub fn IS_ALARM_PLAYING(alarmName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2478164843485265036)), alarmName);
}
/// Returns hash of default vehicle horn
/// Hash is stored in audVehicleAudioEntity
pub fn GET_VEHICLE_DEFAULT_HORN(vehicle: types.Vehicle) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(150410257217231276)), vehicle);
}
/// Used to be known as _GET_VEHICLE_HORN_HASH
pub fn GET_VEHICLE_DEFAULT_HORN_IGNORE_MODS(vehicle: types.Vehicle) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(12445095905966123072)), vehicle);
}
pub fn RESET_PED_AUDIO_FLAGS(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17675423155129611061)), ped);
}
/// Enables/disables ped's "loud" footstep sound.
/// Used to be known as _SET_PED_AUDIO_FOOTSTEP_LOUD
pub fn SET_PED_FOOTSTEPS_EVENTS_ENABLED(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(455909428772601479)), ped, toggle);
}
/// Enables/disables ped's "quiet" footstep sound.
/// Used to be known as _SET_PED_AUDIO_FOOTSTEP_QUIET
pub fn SET_PED_CLOTH_EVENTS_ENABLED(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3015789596365711661)), ped, toggle);
}
/// Sets audio flag "OverridePlayerGroundMaterial"
pub fn OVERRIDE_PLAYER_GROUND_MATERIAL(hash: types.Hash, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15189648466101620985)), hash, toggle);
}
pub fn USE_FOOTSTEP_SCRIPT_SWEETENERS(ped: types.Ped, p1: windows.BOOL, hash: types.Hash) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(13784886756864773626)), ped, p1, hash);
}
/// Sets audio flag "OverrideMicrophoneSettings"
/// Used to be known as _OVERRIDE_MICROPHONE_SETTINGS
pub fn OVERRIDE_MICROPHONE_SETTINGS(hash: types.Hash, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8464302270526627472)), hash, toggle);
}
pub fn FREEZE_MICROPHONE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(15382795360080579857)));
}
/// If value is set to true, and ambient siren sound will be played.
/// Appears to enable/disable an audio flag.
/// Used to be known as _FORCE_AMBIENT_SIREN
pub fn DISTANT_COP_CAR_SIRENS(value: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6134863619627039445)), value);
}
pub fn SET_SIREN_CAN_BE_CONTROLLED_BY_AUDIO(vehicle: types.Vehicle, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4898242922278320149)), vehicle, p1);
}
pub fn ENABLE_STUNT_JUMP_AUDIO() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(13266743810898358267)));
}
/// Possible flag names:
/// "ActivateSwitchWheelAudio"
/// "AllowAmbientSpeechInSlowMo"
/// "AllowCutsceneOverScreenFade"
/// "AllowForceRadioAfterRetune"
/// "AllowPainAndAmbientSpeechToPlayDuringCutscene"
/// "AllowPlayerAIOnMission"
/// "AllowPoliceScannerWhenPlayerHasNoControl"
/// "AllowRadioDuringSwitch"
/// "AllowRadioOverScreenFade"
/// "AllowScoreAndRadio"
/// "AllowScriptedSpeechInSlowMo"
/// "AvoidMissionCompleteDelay"
/// "DisableAbortConversationForDeathAndInjury"
/// "DisableAbortConversationForRagdoll"
/// "DisableBarks"
/// "DisableFlightMusic"
/// "DisableReplayScriptStreamRecording"
/// "EnableHeadsetBeep"
/// "ForceConversationInterrupt"
/// "ForceSeamlessRadioSwitch"
/// "ForceSniperAudio"
/// "FrontendRadioDisabled"
/// "HoldMissionCompleteWhenPrepared"
/// "IsDirectorModeActive"
/// "IsPlayerOnMissionForSpeech"
/// "ListenerReverbDisabled"
/// "LoadMPData"
/// "MobileRadioInGame"
/// "OnlyAllowScriptTriggerPoliceScanner"
/// "PlayMenuMusic"
/// "PoliceScannerDisabled"
/// "ScriptedConvListenerMaySpeak"
/// "SpeechDucksScore"
/// "SuppressPlayerScubaBreathing"
/// "WantedMusicDisabled"
/// "WantedMusicOnMission"
/// -------------------------------
/// No added flag names between b393d and b573d, including b573d.
/// #######################################################################
/// "IsDirectorModeActive" is an audio flag which will allow you to play speech infinitely without any pauses like in Director Mode.
/// -----------------------------------------------------------------------
/// All flag IDs and hashes:
/// ID: 00 | Hash: 0x0FED7A7F
/// ID: 01 | Hash: 0x20A7858F
/// ID: 02 | Hash: 0xA11C2259
/// ID: 03 | Hash: 0x08DE4700
/// ID: 04 | Hash: 0x989F652F
/// ID: 05 | Hash: 0x3C9E76BA
/// ID: 06 | Hash: 0xA805FEB0
/// ID: 07 | Hash: 0x4B94EA26
/// ID: 08 | Hash: 0x803ACD34
/// ID: 09 | Hash: 0x7C741226
/// ID: 10 | Hash: 0x31DB9EBD
/// ID: 11 | Hash: 0xDF386F18
/// ID: 12 | Hash: 0x669CED42
/// ID: 13 | Hash: 0x51F22743
/// ID: 14 | Hash: 0x2052B35C
/// ID: 15 | Hash: 0x071472DC
/// ID: 16 | Hash: 0xF9928BCC
/// ID: 17 | Hash: 0x7ADBDD48
/// ID: 18 | Hash: 0xA959BA1A
/// ID: 19 | Hash: 0xBBE89B60
/// ID: 20 | Hash: 0x87A08871
/// ID: 21 | Hash: 0xED1057CE
/// ID: 22 | Hash: 0x1584AD7A
/// ID: 23 | Hash: 0x8582CFCB
/// ID: 24 | Hash: 0x7E5E2FB0
/// ID: 25 | Hash: 0xAE4F72DB
/// ID: 26 | Hash: 0x5D16D1FA
/// ID: 27 | Hash: 0x06B2F4B8
/// ID: 28 | Hash: 0x5D4CDC96
/// ID: 29 | Hash: 0x8B5A48BA
/// ID: 30 | Hash: 0x98FBD539
/// ID: 31 | Hash: 0xD8CB0473
/// ID: 32 | Hash: 0x5CBB4874
/// ID: 33 | Hash: 0x2E9F93A9
/// ID: 34 | Hash: 0xD93BEA86
/// ID: 35 | Hash: 0x92109B7D
/// ID: 36 | Hash: 0xB7EC9E4D
/// ID: 37 | Hash: 0xCABDBB1D
/// ID: 38 | Hash: 0xB3FD4A52
/// ID: 39 | Hash: 0x370D94E5
/// ID: 40 | Hash: 0xA0F7938F
/// ID: 41 | Hash: 0xCBE1CE81
/// ID: 42 | Hash: 0xC27F1271
/// ID: 43 | Hash: 0x9E3258EB
/// ID: 44 | Hash: 0x551CDA5B
/// ID: 45 | Hash: 0xCB6D663C
/// ID: 46 | Hash: 0x7DACE87F
/// ID: 47 | Hash: 0xF9DE416F
/// ID: 48 | Hash: 0x882E6E9E
/// ID: 49 | Hash: 0x16B447E7
/// ID: 50 | Hash: 0xBD867739
/// ID: 51 | Hash: 0xA3A58604
/// ID: 52 | Hash: 0x7E046BBC
/// ID: 53 | Hash: 0xD95FDB98
/// ID: 54 | Hash: 0x5842C0ED
/// ID: 55 | Hash: 0x285FECC6
/// ID: 56 | Hash: 0x9351AC43
/// ID: 57 | Hash: 0x50032E75
/// ID: 58 | Hash: 0xAE6D0D59
/// ID: 59 | Hash: 0xD6351785
/// ID: 60 | Hash: 0xD25D71BC
/// ID: 61 | Hash: 0x1F7F6423
/// ID: 62 | Hash: 0xE24C3AA6
/// ID: 63 | Hash: 0xBFFDD2B7
pub fn SET_AUDIO_FLAG(flagName: [*c]const u8, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13398162446994666074)), flagName, toggle);
}
/// p1 is always 0 in the scripts
pub fn PREPARE_SYNCHRONIZED_AUDIO_EVENT(audioEvent: [*c]const u8, p1: types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(14387816404730881894)), audioEvent, p1);
}
pub fn PREPARE_SYNCHRONIZED_AUDIO_EVENT_FOR_SCENE(sceneID: c_int, audioEvent: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(189124577488416373)), sceneID, audioEvent);
}
pub fn PLAY_SYNCHRONIZED_AUDIO_EVENT(sceneID: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10029468361250168109)), sceneID);
}
pub fn STOP_SYNCHRONIZED_AUDIO_EVENT(sceneID: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10580829704081196080)), sceneID);
}
pub fn INIT_SYNCH_SCENE_AUDIO_WITH_POSITION(audioEvent: [*c]const u8, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(14478485378191566548)), audioEvent, x, y, z);
}
/// Used to be known as _SET_SYNCHRONIZED_AUDIO_EVENT_POSITION_THIS_FRAME
pub fn INIT_SYNCH_SCENE_AUDIO_WITH_ENTITY(audioEvent: [*c]const u8, entity: types.Entity) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10739419675661918597)), audioEvent, entity);
}
/// Needs to be called every frame.
/// Audio mode to apply this frame: https://alloc8or.re/gta5/doc/enums/audSpecialEffectMode.txt
pub fn SET_AUDIO_SPECIAL_EFFECT_MODE(mode: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1321278500475067292)), mode);
}
/// Found in the b617d scripts, duplicates removed:
/// AUDIO::SET_PORTAL_SETTINGS_OVERRIDE("V_CARSHOWROOM_PS_WINDOW_UNBROKEN", "V_CARSHOWROOM_PS_WINDOW_BROKEN");
/// AUDIO::SET_PORTAL_SETTINGS_OVERRIDE("V_CIA_PS_WINDOW_UNBROKEN", "V_CIA_PS_WINDOW_BROKEN");
/// AUDIO::SET_PORTAL_SETTINGS_OVERRIDE("V_DLC_HEIST_APARTMENT_DOOR_CLOSED", "V_DLC_HEIST_APARTMENT_DOOR_OPEN");
/// AUDIO::SET_PORTAL_SETTINGS_OVERRIDE("V_FINALEBANK_PS_VAULT_INTACT", "V_FINALEBANK_PS_VAULT_BLOWN");
/// AUDIO::SET_PORTAL_SETTINGS_OVERRIDE("V_MICHAEL_PS_BATHROOM_WITH_WINDOW", "V_MICHAEL_PS_BATHROOM_WITHOUT_WINDOW");
pub fn SET_PORTAL_SETTINGS_OVERRIDE(p0: [*c]const u8, p1: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(310109384757357541)), p0, p1);
}
/// Found in the b617d scripts, duplicates removed:
/// AUDIO::REMOVE_PORTAL_SETTINGS_OVERRIDE("V_CARSHOWROOM_PS_WINDOW_UNBROKEN");
/// AUDIO::REMOVE_PORTAL_SETTINGS_OVERRIDE("V_CIA_PS_WINDOW_UNBROKEN");
/// AUDIO::REMOVE_PORTAL_SETTINGS_OVERRIDE("V_DLC_HEIST_APARTMENT_DOOR_CLOSED");
/// AUDIO::REMOVE_PORTAL_SETTINGS_OVERRIDE("V_FINALEBANK_PS_VAULT_INTACT");
/// AUDIO::REMOVE_PORTAL_SETTINGS_OVERRIDE("V_MICHAEL_PS_BATHROOM_WITH_WINDOW");
pub fn REMOVE_PORTAL_SETTINGS_OVERRIDE(p0: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13023281597564293675)), p0);
}
/// STOP_S[MOKE_GRENADE_EXPLOSION_SOUNDS]?
pub fn STOP_SMOKE_GRENADE_EXPLOSION_SOUNDS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(16494114044158053506)));
}
pub fn GET_MUSIC_VOL_SLIDER() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(4199794962240674238)));
}
/// Used to be known as _SET_PED_TALK
pub fn REQUEST_TENNIS_BANKS(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5393692883528867911)), ped);
}
pub fn UNREQUEST_TENNIS_BANKS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(94776799139586789)));
}
pub fn SET_SKIP_MINIGUN_SPIN_UP_AUDIO(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13759423876992128477)), p0);
}
pub fn STOP_CUTSCENE_AUDIO() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(9250491198493388294)));
}
/// Used to be known as _HAS_MULTIPLAYER_AUDIO_DATA_LOADED
pub fn HAS_LOADED_MP_DATA_SET() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6073122710248405990)));
}
/// Used to be known as _HAS_MULTIPLAYER_AUDIO_DATA_UNLOADED
pub fn HAS_LOADED_SP_DATA_SET() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6579947836550891252)));
}
/// Used to be known as _GET_VEHICLE_DEFAULT_HORN_VARIATION
pub fn GET_VEHICLE_HORN_SOUND_INDEX(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(15366064404548442126)), vehicle);
}
/// Used to be known as _SET_VEHICLE_HORN_VARIATION
pub fn SET_VEHICLE_HORN_SOUND_INDEX(vehicle: types.Vehicle, value: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(238945735878862800)), vehicle, value);
}
};
pub const BRAIN = struct {
/// BRAIN::ADD_SCRIPT_TO_RANDOM_PED("pb_prostitute", ${s_f_y_hooker_01}, 100, 0);
/// - Nacorpio
/// -----
/// Hardcoded to not work in Multiplayer.
pub fn ADD_SCRIPT_TO_RANDOM_PED(name: [*c]const u8, model: types.Hash, p2: f32, p3: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(5685009978224958668)), name, model, p2, p3);
}
/// Registers a script for any object with a specific model hash.
/// BRAIN::REGISTER_OBJECT_SCRIPT_BRAIN("ob_telescope", ${prop_telescope_01}, 100, 4.0, -1, 9);
/// - Nacorpio
pub fn REGISTER_OBJECT_SCRIPT_BRAIN(scriptName: [*c]const u8, modelHash: types.Hash, p2: c_int, activationRange: f32, p4: c_int, p5: c_int) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(858019504694160418)), scriptName, modelHash, p2, activationRange, p4, p5);
}
pub fn IS_OBJECT_WITHIN_BRAIN_ACTIVATION_RANGE(object: types.Object) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14752126902777032791)), object);
}
pub fn REGISTER_WORLD_POINT_SCRIPT_BRAIN(scriptName: [*c]const u8, activationRange: f32, p2: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(4385504615524893885)), scriptName, activationRange, p2);
}
/// Gets whether the world point the calling script is registered to is within desired range of the player.
pub fn IS_WORLD_POINT_WITHIN_BRAIN_ACTIVATION_RANGE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14196521158419141712)));
}
pub fn ENABLE_SCRIPT_BRAIN_SET(brainSet: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7469868092304107627)), brainSet);
}
pub fn DISABLE_SCRIPT_BRAIN_SET(brainSet: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1502040148594978959)), brainSet);
}
pub fn REACTIVATE_ALL_WORLD_BRAINS_THAT_ARE_WAITING_TILL_OUT_OF_RANGE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(810908834336276356)));
}
/// Used to be known as _PREPARE_SCRIPT_BRAIN
pub fn REACTIVATE_ALL_OBJECT_BRAINS_THAT_ARE_WAITING_TILL_OUT_OF_RANGE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(5590442645911470424)));
}
/// Possible values:
/// act_cinema
/// am_mp_carwash_launch
/// am_mp_carwash_control
/// am_mp_property_ext
/// chop
/// fairgroundHub
/// launcher_BasejumpHeli
/// launcher_BasejumpPack
/// launcher_CarWash
/// launcher_golf
/// launcher_Hunting_Ambient
/// launcher_MrsPhilips
/// launcher_OffroadRacing
/// launcher_pilotschool
/// launcher_Racing
/// launcher_rampage
/// launcher_rampage
/// launcher_range
/// launcher_stunts
/// launcher_stunts
/// launcher_tennis
/// launcher_Tonya
/// launcher_Triathlon
/// launcher_Yoga
/// ob_mp_bed_low
/// ob_mp_bed_med
pub fn REACTIVATE_NAMED_WORLD_BRAINS_WAITING_TILL_OUT_OF_RANGE(scriptName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7883622405120481329)), scriptName);
}
/// Looks like a cousin of above function _6D6840CEE8845831 as it was found among them. Must be similar
/// Here are possible values of argument -
/// "ob_tv"
/// "launcher_Darts"
pub fn REACTIVATE_NAMED_OBJECT_BRAINS_WAITING_TILL_OUT_OF_RANGE(scriptName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7967343064991084592)), scriptName);
}
};
pub const CAM = struct {
/// ease - smooth transition between the camera's positions
/// easeTime - Time in milliseconds for the transition to happen
/// If you have created a script (rendering) camera, and want to go back to the
/// character (gameplay) camera, call this native with render set to 0.
/// Setting ease to 1 will smooth the transition.
pub fn RENDER_SCRIPT_CAMS(render: windows.BOOL, ease: windows.BOOL, easeTime: c_int, p3: windows.BOOL, p4: windows.BOOL, p5: types.Any) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(569060033405794044)), render, ease, easeTime, p3, p4, p5);
}
/// This native makes the gameplay camera zoom into first person/third person with a special effect.
/// Used to be known as _RENDER_FIRST_PERSON_CAM
pub fn STOP_RENDERING_SCRIPT_CAMS_USING_CATCH_UP(render: windows.BOOL, p1: f32, p2: c_int, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(14418823738263598738)), render, p1, p2, p3);
}
/// "DEFAULT_SCRIPTED_CAMERA"
/// "DEFAULT_ANIMATED_CAMERA"
/// "DEFAULT_SPLINE_CAMERA"
/// "DEFAULT_SCRIPTED_FLY_CAMERA"
/// "TIMED_SPLINE_CAMERA"
pub fn CREATE_CAM(camName: [*c]const u8, p1: windows.BOOL) types.Cam {
return nativeCaller.invoke2(@as(u64, @intCast(14094047806098104639)), camName, p1);
}
/// camName is always set to "DEFAULT_SCRIPTED_CAMERA" in Rockstar's scripts.
/// ------------
/// Camera names found in the b617d scripts:
/// "DEFAULT_ANIMATED_CAMERA"
/// "DEFAULT_SCRIPTED_CAMERA"
/// "DEFAULT_SCRIPTED_FLY_CAMERA"
/// "DEFAULT_SPLINE_CAMERA"
/// ------------
/// Side Note: It seems p8 is basically to represent what would be the bool p1 within CREATE_CAM native. As well as the p9 since it's always 2 in scripts seems to represent what would be the last param within SET_CAM_ROT native which normally would be 2.
pub fn CREATE_CAM_WITH_PARAMS(camName: [*c]const u8, posX: f32, posY: f32, posZ: f32, rotX: f32, rotY: f32, rotZ: f32, fov: f32, p8: windows.BOOL, p9: c_int) types.Cam {
return nativeCaller.invoke10(@as(u64, @intCast(13047372873132765537)), camName, posX, posY, posZ, rotX, rotY, rotZ, fov, p8, p9);
}
pub fn CREATE_CAMERA(camHash: types.Hash, p1: windows.BOOL) types.Cam {
return nativeCaller.invoke2(@as(u64, @intCast(6790575688875026045)), camHash, p1);
}
/// p9 uses 2 by default
pub fn CREATE_CAMERA_WITH_PARAMS(camHash: types.Hash, posX: f32, posY: f32, posZ: f32, rotX: f32, rotY: f32, rotZ: f32, fov: f32, p8: windows.BOOL, p9: types.Any) types.Cam {
return nativeCaller.invoke10(@as(u64, @intCast(7692046877019140653)), camHash, posX, posY, posZ, rotX, rotY, rotZ, fov, p8, p9);
}
/// BOOL param indicates whether the cam should be destroyed if it belongs to the calling script.
pub fn DESTROY_CAM(cam: types.Cam, bScriptHostCam: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9680778529535173353)), cam, bScriptHostCam);
}
/// BOOL param indicates whether the cam should be destroyed if it belongs to the calling script.
pub fn DESTROY_ALL_CAMS(bScriptHostCam: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10259113460775751968)), bScriptHostCam);
}
/// Returns whether or not the passed camera handle exists.
pub fn DOES_CAM_EXIST(cam: types.Cam) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12081242549857203470)), cam);
}
/// Set camera as active/inactive.
pub fn SET_CAM_ACTIVE(cam: types.Cam, active: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(175562857184911236)), cam, active);
}
/// Returns whether or not the passed camera handle is active.
pub fn IS_CAM_ACTIVE(cam: types.Cam) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16119145122951410996)), cam);
}
pub fn IS_CAM_RENDERING(cam: types.Cam) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(210555333278735226)), cam);
}
pub fn GET_RENDERING_CAM() types.Cam {
return nativeCaller.invoke0(@as(u64, @intCast(5923634223534172858)));
}
pub fn GET_CAM_COORD(cam: types.Cam) types.Vector3 {
return nativeCaller.invoke1(@as(u64, @intCast(13456818321258898862)), cam);
}
/// The last parameter, as in other "ROT" methods, is usually 2.
pub fn GET_CAM_ROT(cam: types.Cam, rotationOrder: c_int) types.Vector3 {
return nativeCaller.invoke2(@as(u64, @intCast(9020793739271880210)), cam, rotationOrder);
}
pub fn GET_CAM_FOV(cam: types.Cam) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(14065597356113244778)), cam);
}
pub fn GET_CAM_NEAR_CLIP(cam: types.Cam) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(14204532778782893233)), cam);
}
pub fn GET_CAM_FAR_CLIP(cam: types.Cam) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(13117469482393839274)), cam);
}
/// Used to be known as _GET_CAM_NEAR_DOF
pub fn GET_CAM_NEAR_DOF(cam: types.Cam) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(14006525941184027164)), cam);
}
pub fn GET_CAM_FAR_DOF(cam: types.Cam) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(2693026888527434647)), cam);
}
/// Used to be known as _GET_CAM_DOF_STRENGTH
pub fn GET_CAM_DOF_STRENGTH(cam: types.Cam) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(491265921572888872)), cam);
}
pub fn SET_CAM_PARAMS(cam: types.Cam, posX: f32, posY: f32, posZ: f32, rotX: f32, rotY: f32, rotZ: f32, fieldOfView: f32, p8: types.Any, p9: c_int, p10: c_int, p11: c_int) void {
_ = nativeCaller.invoke12(@as(u64, @intCast(13823924928455167674)), cam, posX, posY, posZ, rotX, rotY, rotZ, fieldOfView, p8, p9, p10, p11);
}
/// Sets the position of the cam.
pub fn SET_CAM_COORD(cam: types.Cam, posX: f32, posY: f32, posZ: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(5566862829459727406)), cam, posX, posY, posZ);
}
/// Sets the rotation of the cam.
/// Last parameter unknown.
/// Last parameter seems to always be set to 2.
pub fn SET_CAM_ROT(cam: types.Cam, rotX: f32, rotY: f32, rotZ: f32, rotationOrder: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(9626222390276852487)), cam, rotX, rotY, rotZ, rotationOrder);
}
/// Sets the field of view of the cam.
/// ---------------------------------------------
/// Min: 1.0f
/// Max: 130.0f
pub fn SET_CAM_FOV(cam: types.Cam, fieldOfView: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12771105691888832583)), cam, fieldOfView);
}
pub fn SET_CAM_NEAR_CLIP(cam: types.Cam, nearClip: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14376773126884446594)), cam, nearClip);
}
pub fn SET_CAM_FAR_CLIP(cam: types.Cam, farClip: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12551654390081779822)), cam, farClip);
}
pub fn FORCE_CAM_FAR_CLIP(cam: types.Cam, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12303098090079590963)), cam, p1);
}
pub fn SET_CAM_MOTION_BLUR_STRENGTH(cam: types.Cam, strength: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8002746985627579110)), cam, strength);
}
pub fn SET_CAM_NEAR_DOF(cam: types.Cam, nearDOF: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4586000372299456044)), cam, nearDOF);
}
pub fn SET_CAM_FAR_DOF(cam: types.Cam, farDOF: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17138750295828967136)), cam, farDOF);
}
pub fn SET_CAM_DOF_STRENGTH(cam: types.Cam, dofStrength: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6837197941419931799)), cam, dofStrength);
}
pub fn SET_CAM_DOF_PLANES(cam: types.Cam, p1: f32, p2: f32, p3: f32, p4: f32) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(4392293246028958172)), cam, p1, p2, p3, p4);
}
pub fn SET_CAM_USE_SHALLOW_DOF_MODE(cam: types.Cam, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1632951117018387131)), cam, toggle);
}
pub fn SET_USE_HI_DOF() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(11617882012875573908)));
}
/// Only used in R* Script fm_mission_controller_2020
/// Used to be known as _SET_USE_HI_DOF_IN_CUTSCENE
pub fn SET_USE_HI_DOF_ON_SYNCED_SCENE_THIS_UPDATE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(8294091220252767815)));
}
pub fn SET_CAM_DOF_OVERRIDDEN_FOCUS_DISTANCE(camera: types.Cam, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17680639860638495196)), camera, p1);
}
pub fn SET_CAM_DOF_OVERRIDDEN_FOCUS_DISTANCE_BLEND_LEVEL(p0: types.Any, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16217928179736693701)), p0, p1);
}
/// This native has its name defined inside its codE
/// Used to be known as _SET_CAM_DOF_FNUMBER_OF_LENS
pub fn SET_CAM_DOF_FNUMBER_OF_LENS(camera: types.Cam, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9066367097664261211)), camera, p1);
}
/// Native name labeled within its code
/// Used to be known as _SET_CAM_DOF_FOCAL_LENGTH_MULTIPLIER
pub fn SET_CAM_DOF_FOCAL_LENGTH_MULTIPLIER(camera: types.Cam, multiplier: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5167200893940322298)), camera, multiplier);
}
/// This native has a name defined inside its code
/// Used to be known as _SET_CAM_DOF_FOCUS_DISTANCE_BIAS
pub fn SET_CAM_DOF_FOCUS_DISTANCE_BIAS(camera: types.Cam, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14297220887994283998)), camera, p1);
}
/// This native has a name defined inside its code
/// Used to be known as _SET_CAM_DOF_MAX_NEAR_IN_FOCUS_DISTANCE
pub fn SET_CAM_DOF_MAX_NEAR_IN_FOCUS_DISTANCE(camera: types.Cam, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14079741466297652781)), camera, p1);
}
/// This native has a name defined inside its code
/// Used to be known as _SET_CAM_DOF_MAX_NEAR_IN_FOCUS_DISTANCE_BLEND_LEVEL
pub fn SET_CAM_DOF_MAX_NEAR_IN_FOCUS_DISTANCE_BLEND_LEVEL(camera: types.Cam, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3199045888357818236)), camera, p1);
}
/// This native has a name defined inside its code
pub fn SET_CAM_DOF_SHOULD_KEEP_LOOK_AT_TARGET_IN_FOCUS(camera: types.Cam, state: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9003732846178615560)), camera, state);
}
/// Last param determines if its relative to the Entity
pub fn ATTACH_CAM_TO_ENTITY(cam: types.Cam, entity: types.Entity, xOffset: f32, yOffset: f32, zOffset: f32, isRelative: windows.BOOL) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(18364409510355558627)), cam, entity, xOffset, yOffset, zOffset, isRelative);
}
pub fn ATTACH_CAM_TO_PED_BONE(cam: types.Cam, ped: types.Ped, boneIndex: c_int, x: f32, y: f32, z: f32, heading: windows.BOOL) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(7035708528672633873)), cam, ped, boneIndex, x, y, z, heading);
}
/// Used to be known as _ATTACH_CAM_TO_PED_BONE_2
pub fn HARD_ATTACH_CAM_TO_PED_BONE(cam: types.Cam, ped: types.Ped, boneIndex: c_int, p3: f32, p4: f32, p5: f32, p6: f32, p7: f32, p8: f32, p9: windows.BOOL) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(1484242793922864141)), cam, ped, boneIndex, p3, p4, p5, p6, p7, p8, p9);
}
/// Example from am_mp_drone script:
/// CAM::HARD_ATTACH_CAM_TO_ENTITY(Local_190.f_169, NETWORK::NET_TO_OBJ(Local_190.f_159), 0f, 0f, 180f, Var0, 1);
/// Used to be known as _ATTACH_CAM_TO_ENTITY_WITH_FIXED_DIRECTION
pub fn HARD_ATTACH_CAM_TO_ENTITY(cam: types.Cam, entity: types.Entity, xRot: f32, yRot: f32, zRot: f32, xOffset: f32, yOffset: f32, zOffset: f32, isRelative: windows.BOOL) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(2317769247792682727)), cam, entity, xRot, yRot, zRot, xOffset, yOffset, zOffset, isRelative);
}
/// This native works with vehicles only. Bone indexes are usually given by this native GET_ENTITY_BONE_INDEX_BY_NAME.
/// Used to be known as _ATTACH_CAM_TO_VEHICLE_BONE
pub fn ATTACH_CAM_TO_VEHICLE_BONE(cam: types.Cam, vehicle: types.Vehicle, boneIndex: c_int, relativeRotation: windows.BOOL, rotX: f32, rotY: f32, rotZ: f32, offsetX: f32, offsetY: f32, offsetZ: f32, fixedDirection: windows.BOOL) void {
_ = nativeCaller.invoke11(@as(u64, @intCast(10210769942916820850)), cam, vehicle, boneIndex, relativeRotation, rotX, rotY, rotZ, offsetX, offsetY, offsetZ, fixedDirection);
}
pub fn DETACH_CAM(cam: types.Cam) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11743905585564462466)), cam);
}
/// The native seems to only be called once.
/// The native is used as so,
/// CAM::SET_CAM_INHERIT_ROLL_VEHICLE(l_544, getElem(2, &l_525, 4));
/// In the exile1 script.
pub fn SET_CAM_INHERIT_ROLL_VEHICLE(cam: types.Cam, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5040054220485114598)), cam, p1);
}
pub fn POINT_CAM_AT_COORD(cam: types.Cam, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(17822036457080948739)), cam, x, y, z);
}
/// p5 always seems to be 1 i.e TRUE
pub fn POINT_CAM_AT_ENTITY(cam: types.Cam, entity: types.Entity, p2: f32, p3: f32, p4: f32, p5: windows.BOOL) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(6215178559440742620)), cam, entity, p2, p3, p4, p5);
}
/// Parameters p0-p5 seems correct. The bool p6 is unknown, but through every X360 script it's always 1. Please correct p0-p5 if any prove to be wrong.
pub fn POINT_CAM_AT_PED_BONE(cam: types.Cam, ped: types.Ped, boneIndex: c_int, x: f32, y: f32, z: f32, p6: windows.BOOL) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(7544292382081432641)), cam, ped, boneIndex, x, y, z, p6);
}
pub fn STOP_CAM_POINTING(cam: types.Cam) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17526522486315440094)), cam);
}
/// Allows you to aim and shoot at the direction the camera is facing.
pub fn SET_CAM_AFFECTS_AIMING(cam: types.Cam, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10096445253756247181)), cam, toggle);
}
/// Rotates the radar to match the camera's Z rotation
/// Used to be known as _SET_CAM_CONTROLS_RADAR_ROTATION
pub fn SET_CAM_CONTROLS_MINI_MAP_HEADING(cam: types.Cam, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7357576148255889445)), cam, toggle);
}
/// When set to true shadows appear more smooth but less detailed.
/// Set to false by default.
/// Used to be known as _SET_CAM_SMOOTH_SHADOWS
pub fn SET_CAM_IS_INSIDE_VEHICLE(cam: types.Cam, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11706670002120752258)), cam, toggle);
}
pub fn ALLOW_MOTION_BLUR_DECAY(p0: types.Any, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2814775853572051814)), p0, p1);
}
/// NOTE: Debugging functions are not present in the retail version of the game.
pub fn SET_CAM_DEBUG_NAME(camera: types.Cam, name: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1987178221944560960)), camera, name);
}
/// Used to be known as _GET_DEBUG_CAMERA
pub fn GET_DEBUG_CAM() types.Cam {
return nativeCaller.invoke0(@as(u64, @intCast(8629968653990921974)));
}
/// I filled p1-p6 (the floats) as they are as other natives with 6 floats in a row are similar and I see no other method. So if a test from anyone proves them wrong please correct.
/// p7 (length) determines the length of the spline, affects camera path and duration of transition between previous node and this one
/// p8 big values ~100 will slow down the camera movement before reaching this node
/// p9 != 0 seems to override the rotation/pitch (bool?)
pub fn ADD_CAM_SPLINE_NODE(camera: types.Cam, x: f32, y: f32, z: f32, xRot: f32, yRot: f32, zRot: f32, length: c_int, smoothingStyle: c_int, rotationOrder: c_int) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(9658470085705661243)), camera, x, y, z, xRot, yRot, zRot, length, smoothingStyle, rotationOrder);
}
/// p0 is the spline camera to which the node is being added.
/// p1 is the camera used to create the node.
/// p3 is always 3 in scripts. It might be smoothing style or rotation order.
pub fn ADD_CAM_SPLINE_NODE_USING_CAMERA_FRAME(cam: types.Cam, cam2: types.Cam, length: c_int, p3: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(765376944147697268)), cam, cam2, length, p3);
}
/// p0 is the spline camera to which the node is being added.
/// p1 is the camera used to create the node.
/// p3 is always 3 in scripts. It might be smoothing style or rotation order.
pub fn ADD_CAM_SPLINE_NODE_USING_CAMERA(cam: types.Cam, cam2: types.Cam, length: c_int, p3: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(1132696415976092923)), cam, cam2, length, p3);
}
/// p2 is always 2 in scripts. It might be smoothing style or rotation order.
pub fn ADD_CAM_SPLINE_NODE_USING_GAMEPLAY_FRAME(cam: types.Cam, length: c_int, p2: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(6958756472036117044)), cam, length, p2);
}
pub fn SET_CAM_SPLINE_PHASE(cam: types.Cam, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2606274068640751698)), cam, p1);
}
/// Can use this with SET_CAM_SPLINE_PHASE to set the float it this native returns.
/// (returns 1.0f when no nodes has been added, reached end of non existing spline)
pub fn GET_CAM_SPLINE_PHASE(cam: types.Cam) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(13057235177729052826)), cam);
}
/// I'm pretty sure the parameter is the camera as usual, but I am not certain so I'm going to leave it as is.
pub fn GET_CAM_SPLINE_NODE_PHASE(cam: types.Cam) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(15695298228073802902)), cam);
}
/// I named p1 as timeDuration as it is obvious. I'm assuming tho it is ran in ms(Milliseconds) as usual.
pub fn SET_CAM_SPLINE_DURATION(cam: types.Cam, timeDuration: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1405496505074404570)), cam, timeDuration);
}
pub fn SET_CAM_SPLINE_SMOOTHING_STYLE(cam: types.Cam, smoothingStyle: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15109845112018561629)), cam, smoothingStyle);
}
pub fn GET_CAM_SPLINE_NODE_INDEX(cam: types.Cam) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(12838381411535099558)), cam);
}
pub fn SET_CAM_SPLINE_NODE_EASE(cam: types.Cam, easingFunction: c_int, p2: c_int, p3: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(9491371531531098669)), cam, easingFunction, p2, p3);
}
pub fn SET_CAM_SPLINE_NODE_VELOCITY_SCALE(cam: types.Cam, p1: c_int, scale: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(11977426473294180767)), cam, p1, scale);
}
pub fn OVERRIDE_CAM_SPLINE_VELOCITY(cam: types.Cam, p1: c_int, p2: f32, p3: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(4662966829301039942)), cam, p1, p2, p3);
}
/// Max value for p1 is 15.
pub fn OVERRIDE_CAM_SPLINE_MOTION_BLUR(cam: types.Cam, p1: c_int, p2: f32, p3: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(9065601397766565205)), cam, p1, p2, p3);
}
pub fn SET_CAM_SPLINE_NODE_EXTRA_FLAGS(cam: types.Cam, p1: c_int, flags: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(8931101277165371504)), cam, p1, flags);
}
pub fn IS_CAM_SPLINE_PAUSED(cam: types.Cam) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(184915161366755428)), cam);
}
/// Previous declaration void SET_CAM_ACTIVE_WITH_INTERP(Cam camTo, Cam camFrom, int duration, BOOL easeLocation, BOOL easeRotation) is completely wrong. The last two params are integers not BOOLs...
pub fn SET_CAM_ACTIVE_WITH_INTERP(camTo: types.Cam, camFrom: types.Cam, duration: c_int, easeLocation: c_int, easeRotation: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(11510535963658572452)), camTo, camFrom, duration, easeLocation, easeRotation);
}
pub fn IS_CAM_INTERPOLATING(cam: types.Cam) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(247583394219865388)), cam);
}
/// Possible shake types (updated b617d):
/// DEATH_FAIL_IN_EFFECT_SHAKE
/// DRUNK_SHAKE
/// FAMILY5_DRUG_TRIP_SHAKE
/// HAND_SHAKE
/// JOLT_SHAKE
/// LARGE_EXPLOSION_SHAKE
/// MEDIUM_EXPLOSION_SHAKE
/// SMALL_EXPLOSION_SHAKE
/// ROAD_VIBRATION_SHAKE
/// SKY_DIVING_SHAKE
/// VIBRATE_SHAKE
/// Full list of cam shake types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/camShakeTypesCompact.json
pub fn SHAKE_CAM(cam: types.Cam, @"type": [*c]const u8, amplitude: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(7648559245709621282)), cam, @"type", amplitude);
}
/// Example from michael2 script.
/// CAM::ANIMATED_SHAKE_CAM(l_5069, "shake_cam_all@", "light", "", 1f);
pub fn ANIMATED_SHAKE_CAM(cam: types.Cam, p1: [*c]const u8, p2: [*c]const u8, p3: [*c]const u8, amplitude: f32) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(11706103286567630797)), cam, p1, p2, p3, amplitude);
}
pub fn IS_CAM_SHAKING(cam: types.Cam) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7720506665349145723)), cam);
}
pub fn SET_CAM_SHAKE_AMPLITUDE(cam: types.Cam, amplitude: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15653866047499144448)), cam, amplitude);
}
pub fn STOP_CAM_SHAKING(cam: types.Cam, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13685584137032321731)), cam, p1);
}
/// CAM::SHAKE_SCRIPT_GLOBAL("HAND_SHAKE", 0.2);
/// Full list of cam shake types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/camShakeTypesCompact.json
pub fn SHAKE_SCRIPT_GLOBAL(p0: [*c]const u8, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17638576219001388746)), p0, p1);
}
/// CAM::ANIMATED_SHAKE_SCRIPT_GLOBAL("SHAKE_CAM_medium", "medium", "", 0.5f);
/// Full list of cam shake types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/camShakeTypesCompact.json
pub fn ANIMATED_SHAKE_SCRIPT_GLOBAL(p0: [*c]const u8, p1: [*c]const u8, p2: [*c]const u8, p3: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(14045289057447832881)), p0, p1, p2, p3);
}
/// In drunk_controller.c4, sub_309
/// if (CAM::IS_SCRIPT_GLOBAL_SHAKING()) {
/// CAM::STOP_SCRIPT_GLOBAL_SHAKING(0);
/// }
pub fn IS_SCRIPT_GLOBAL_SHAKING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14488835398135026194)));
}
/// In drunk_controller.c4, sub_309
/// if (CAM::IS_SCRIPT_GLOBAL_SHAKING()) {
/// CAM::STOP_SCRIPT_GLOBAL_SHAKING(0);
/// }
pub fn STOP_SCRIPT_GLOBAL_SHAKING(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2061937563044885648)), p0);
}
/// p1: 0..16
pub fn TRIGGER_VEHICLE_PART_BROKEN_CAMERA_SHAKE(vehicle: types.Vehicle, p1: c_int, p2: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(6743805870974465696)), vehicle, p1, p2);
}
/// Atleast one time in a script for the zRot Rockstar uses GET_ENTITY_HEADING to help fill the parameter.
/// p9 is unknown at this time.
/// p10 throughout all the X360 Scripts is always 2.
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
pub fn PLAY_CAM_ANIM(cam: types.Cam, animName: [*c]const u8, animDictionary: [*c]const u8, x: f32, y: f32, z: f32, xRot: f32, yRot: f32, zRot: f32, p9: windows.BOOL, p10: c_int) windows.BOOL {
return nativeCaller.invoke11(@as(u64, @intCast(11109553116855739282)), cam, animName, animDictionary, x, y, z, xRot, yRot, zRot, p9, p10);
}
pub fn IS_CAM_PLAYING_ANIM(cam: types.Cam, animName: [*c]const u8, animDictionary: [*c]const u8) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(14485302465778347250)), cam, animName, animDictionary);
}
pub fn SET_CAM_ANIM_CURRENT_PHASE(cam: types.Cam, phase: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4703346548920268198)), cam, phase);
}
pub fn GET_CAM_ANIM_CURRENT_PHASE(cam: types.Cam) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(11604419118627989168)), cam);
}
/// Examples:
/// CAM::PLAY_SYNCHRONIZED_CAM_ANIM(l_2734, NETWORK::NETWORK_GET_LOCAL_SCENE_FROM_NETWORK_ID(l_2739), "PLAYER_EXIT_L_CAM", "mp_doorbell");
/// CAM::PLAY_SYNCHRONIZED_CAM_ANIM(l_F0D[7/*1*/], l_F4D[15/*1*/], "ah3b_attackheli_cam2", "missheistfbi3b_helicrash");
pub fn PLAY_SYNCHRONIZED_CAM_ANIM(p0: types.Any, p1: types.Any, animName: [*c]const u8, animDictionary: [*c]const u8) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(16370301635947768332)), p0, p1, animName, animDictionary);
}
pub fn SET_FLY_CAM_HORIZONTAL_RESPONSE(cam: types.Cam, p1: f32, p2: f32, p3: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(5782438440912250290)), cam, p1, p2, p3);
}
/// Used to be known as _SET_FLY_CAM_VERTICAL_SPEED_MULTIPLIER
pub fn SET_FLY_CAM_VERTICAL_RESPONSE(cam: types.Cam, p1: f32, p2: f32, p3: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(16728542991814967738)), cam, p1, p2, p3);
}
/// Used to be known as _SET_CAMERA_RANGE
pub fn SET_FLY_CAM_MAX_HEIGHT(cam: types.Cam, height: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18000924204615933303)), cam, height);
}
pub fn SET_FLY_CAM_COORD_AND_CONSTRAIN(cam: types.Cam, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(14491576813728499914)), cam, x, y, z);
}
pub fn SET_FLY_CAM_VERTICAL_CONTROLS_THIS_UPDATE(cam: types.Cam) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14462682002538728340)), cam);
}
pub fn WAS_FLY_CAM_CONSTRAINED_ON_PREVIOUS_UDPATE(cam: types.Cam) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6649742794127782265)), cam);
}
pub fn IS_SCREEN_FADED_OUT() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(12785665044532404610)));
}
pub fn IS_SCREEN_FADED_IN() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6522783478398879352)));
}
pub fn IS_SCREEN_FADING_OUT() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8753528501838783119)));
}
pub fn IS_SCREEN_FADING_IN() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6653025866621830517)));
}
/// Fades the screen in.
/// duration: The time the fade should take, in milliseconds.
pub fn DO_SCREEN_FADE_IN(duration: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15341760935224295475)), duration);
}
/// Fades the screen out.
/// duration: The time the fade should take, in milliseconds.
pub fn DO_SCREEN_FADE_OUT(duration: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9879590510830748335)), duration);
}
pub fn SET_WIDESCREEN_BORDERS(p0: windows.BOOL, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15912601297522708506)), p0, p1);
}
pub fn ARE_WIDESCREEN_BORDERS_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(5222457023442406623)));
}
pub fn GET_GAMEPLAY_CAM_COORD() types.Vector3 {
return nativeCaller.invoke0(@as(u64, @intCast(1501657350880041783)));
}
/// p0 dosen't seem to change much, I tried it with 0, 1, 2:
/// 0-Pitch(X): -70.000092
/// 0-Roll(Y): -0.000001
/// 0-Yaw(Z): -43.886459
/// 1-Pitch(X): -70.000092
/// 1-Roll(Y): -0.000001
/// 1-Yaw(Z): -43.886463
/// 2-Pitch(X): -70.000092
/// 2-Roll(Y): -0.000002
/// 2-Yaw(Z): -43.886467
pub fn GET_GAMEPLAY_CAM_ROT(rotationOrder: c_int) types.Vector3 {
return nativeCaller.invoke1(@as(u64, @intCast(9473152089056669883)), rotationOrder);
}
pub fn GET_GAMEPLAY_CAM_FOV() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(7278264845348258099)));
}
/// some camera effect that is used in the drunk-cheat, and turned off (by setting it to 0.0) along with the shaking effects once the drunk cheat is disabled.
pub fn SET_GAMEPLAY_CAM_MOTION_BLUR_SCALING_THIS_UPDATE(p0: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5222630506162255769)), p0);
}
/// some camera effect that is (also) used in the drunk-cheat, and turned off (by setting it to 0.0) along with the shaking effects once the drunk cheat is disabled.
pub fn SET_GAMEPLAY_CAM_MAX_MOTION_BLUR_STRENGTH_THIS_UPDATE(p0: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(154661188599136908)), p0);
}
pub fn GET_GAMEPLAY_CAM_RELATIVE_HEADING() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(8373888685549897095)));
}
/// Sets the camera position relative to heading in float from -360 to +360.
/// Heading is alwyas 0 in aiming camera.
pub fn SET_GAMEPLAY_CAM_RELATIVE_HEADING(heading: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13036833585655820785)), heading);
}
pub fn GET_GAMEPLAY_CAM_RELATIVE_PITCH() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(4208727876790119842)));
}
/// This native sets the camera's pitch (rotation on the x-axis).
pub fn SET_GAMEPLAY_CAM_RELATIVE_PITCH(angle: f32, scalingFactor: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7856627101237848957)), angle, scalingFactor);
}
pub fn RESET_GAMEPLAY_CAM_FULL_ATTACH_PARENT_TRANSFORM_TIMER() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(8256718813708787198)));
}
/// Used to be known as _SET_GAMEPLAY_CAM_RELATIVE_ROTATION
pub fn FORCE_CAMERA_RELATIVE_HEADING_AND_PITCH(roll: f32, pitch: f32, yaw: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(5215322525155035828)), roll, pitch, yaw);
}
pub fn FORCE_BONNET_CAMERA_RELATIVE_HEADING_AND_PITCH(p0: f32, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2931881434367298106)), p0, p1);
}
/// Does nothing
/// Used to be known as _SET_GAMEPLAY_CAM_RAW_YAW
pub fn SET_FIRST_PERSON_SHOOTER_CAMERA_HEADING(yaw: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1169125920733647986)), yaw);
}
/// Used to be known as _SET_GAMEPLAY_CAM_RAW_PITCH
pub fn SET_FIRST_PERSON_SHOOTER_CAMERA_PITCH(pitch: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8475233452046769242)), pitch);
}
pub fn SET_SCRIPTED_CAMERA_IS_FIRST_PERSON_THIS_FRAME(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5088837565914833719)), p0);
}
/// Possible shake types (updated b617d):
/// DEATH_FAIL_IN_EFFECT_SHAKE
/// DRUNK_SHAKE
/// FAMILY5_DRUG_TRIP_SHAKE
/// HAND_SHAKE
/// JOLT_SHAKE
/// LARGE_EXPLOSION_SHAKE
/// MEDIUM_EXPLOSION_SHAKE
/// SMALL_EXPLOSION_SHAKE
/// ROAD_VIBRATION_SHAKE
/// SKY_DIVING_SHAKE
/// VIBRATE_SHAKE
/// Full list of cam shake types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/camShakeTypesCompact.json
pub fn SHAKE_GAMEPLAY_CAM(shakeName: [*c]const u8, intensity: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18254747994658183119)), shakeName, intensity);
}
pub fn IS_GAMEPLAY_CAM_SHAKING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(102466813717061513)));
}
/// Sets the amplitude for the gameplay (i.e. 3rd or 1st) camera to shake. Used in script "drunk_controller.ysc.c4" to simulate making the player drunk.
pub fn SET_GAMEPLAY_CAM_SHAKE_AMPLITUDE(amplitude: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12141142277564455005)), amplitude);
}
pub fn STOP_GAMEPLAY_CAM_SHAKING(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1078962439376650616)), p0);
}
/// Forces gameplay cam to specified ped as if you were the ped or spectating it
pub fn SET_GAMEPLAY_CAM_FOLLOW_PED_THIS_UPDATE(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10068584170564634536)), ped);
}
/// Examples when this function will return 0 are:
/// - During busted screen.
/// - When player is coming out from a hospital.
/// - When player is coming out from a police station.
/// - When player is buying gun from AmmuNation.
pub fn IS_GAMEPLAY_CAM_RENDERING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(4158460389144916168)));
}
pub fn IS_INTERPOLATING_FROM_SCRIPT_CAMS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(3477944451262818370)));
}
pub fn IS_INTERPOLATING_TO_SCRIPT_CAMS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8095826636772152125)));
}
pub fn SET_GAMEPLAY_CAM_ALTITUDE_FOV_SCALING_STATE(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15821364073188638961)), p0);
}
/// Shows the crosshair even if it wouldn't show normally. Only works for one frame, so make sure to call it repeatedly.
/// Used to be known as _ENABLE_CROSSHAIR_THIS_FRAME
pub fn DISABLE_GAMEPLAY_CAM_ALTITUDE_FOV_SCALING_THIS_UPDATE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(16897236249372944239)));
}
pub fn IS_GAMEPLAY_CAM_LOOKING_BEHIND() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8141848874360864425)));
}
/// Used to be known as _DISABLE_CAM_COLLISION_FOR_ENTITY
pub fn SET_GAMEPLAY_CAM_IGNORE_ENTITY_COLLISION_THIS_UPDATE(entity: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3093237379154053077)), entity);
}
pub fn DISABLE_CAM_COLLISION_FOR_OBJECT(entity: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5280522926486084266)), entity);
}
pub fn BYPASS_CAMERA_COLLISION_BUOYANCY_TEST_THIS_UPDATE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(12036198751708399698)));
}
pub fn SET_GAMEPLAY_CAM_ENTITY_TO_LIMIT_FOCUS_OVER_BOUNDING_SPHERE_THIS_UPDATE(entity: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18244453507302826565)), entity);
}
/// Sets some flag on cinematic camera
pub fn DISABLE_FIRST_PERSON_CAMERA_WATER_CLIPPING_TEST_THIS_UPDATE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(12769987082907843376)));
}
pub fn SET_FOLLOW_CAM_IGNORE_ATTACH_PARENT_MOVEMENT_THIS_UPDATE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(15959032629851251145)));
}
pub fn IS_SPHERE_VISIBLE(x: f32, y: f32, z: f32, radius: f32) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(16374342614917681119)), x, y, z, radius);
}
pub fn IS_FOLLOW_PED_CAM_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14327026183995711737)));
}
/// From the scripts:
/// CAM::SET_FOLLOW_PED_CAM_THIS_UPDATE("FOLLOW_PED_ATTACHED_TO_ROPE_CAMERA", 0);
/// CAM::SET_FOLLOW_PED_CAM_THIS_UPDATE("FOLLOW_PED_ON_EXILE1_LADDER_CAMERA", 1500);
/// CAM::SET_FOLLOW_PED_CAM_THIS_UPDATE("FOLLOW_PED_SKY_DIVING_CAMERA", 0);
/// CAM::SET_FOLLOW_PED_CAM_THIS_UPDATE("FOLLOW_PED_SKY_DIVING_CAMERA", 3000);
/// CAM::SET_FOLLOW_PED_CAM_THIS_UPDATE("FOLLOW_PED_SKY_DIVING_FAMILY5_CAMERA", 0);
/// CAM::SET_FOLLOW_PED_CAM_THIS_UPDATE("FOLLOW_PED_SKY_DIVING_CAMERA", 0);
/// Used to be known as SET_FOLLOW_PED_CAM_CUTSCENE_CHAT
pub fn SET_FOLLOW_PED_CAM_THIS_UPDATE(camName: [*c]const u8, p1: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(4945255707617020113)), camName, p1);
}
pub fn USE_SCRIPT_CAM_FOR_AMBIENT_POPULATION_ORIGIN_THIS_FRAME(p0: windows.BOOL, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2815877335269666450)), p0, p1);
}
pub fn SET_FOLLOW_PED_CAM_LADDER_ALIGN_THIS_UPDATE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(14427593876267358554)));
}
/// minimum: Degrees between -180f and 180f.
/// maximum: Degrees between -180f and 180f.
/// Clamps the gameplay camera's current yaw.
/// Eg. SET_THIRD_PERSON_CAM_RELATIVE_HEADING_LIMITS_THIS_UPDATE(0.0f, 0.0f) will set the horizontal angle directly behind the player.
/// Used to be known as _CLAMP_GAMEPLAY_CAM_YAW
pub fn SET_THIRD_PERSON_CAM_RELATIVE_HEADING_LIMITS_THIS_UPDATE(minimum: f32, maximum: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10347368856049835662)), minimum, maximum);
}
/// minimum: Degrees between -90f and 90f.
/// maximum: Degrees between -90f and 90f.
/// Clamps the gameplay camera's current pitch.
/// Eg. SET_THIRD_PERSON_CAM_RELATIVE_PITCH_LIMITS_THIS_UPDATE(0.0f, 0.0f) will set the vertical angle directly behind the player.
/// Used to be known as _CLAMP_GAMEPLAY_CAM_PITCH
pub fn SET_THIRD_PERSON_CAM_RELATIVE_PITCH_LIMITS_THIS_UPDATE(minimum: f32, maximum: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11895908327409623521)), minimum, maximum);
}
/// Seems to animate the gameplay camera zoom.
/// Eg. SET_THIRD_PERSON_CAM_ORBIT_DISTANCE_LIMITS_THIS_UPDATE(1f, 1000f);
/// will animate the camera zooming in from 1000 meters away.
/// Game scripts use it like this:
/// // Setting this to 1 prevents V key from changing zoom
/// PLAYER::SET_PLAYER_FORCED_ZOOM(PLAYER::PLAYER_ID(), 1);
/// // These restrict how far you can move cam up/down left/right
/// CAM::SET_THIRD_PERSON_CAM_RELATIVE_HEADING_LIMITS_THIS_UPDATE(-20f, 50f);
/// CAM::SET_THIRD_PERSON_CAM_RELATIVE_PITCH_LIMITS_THIS_UPDATE(-60f, 0f);
/// CAM::SET_THIRD_PERSON_CAM_ORBIT_DISTANCE_LIMITS_THIS_UPDATE(1f, 1f);
/// Used to be known as _ANIMATE_GAMEPLAY_CAM_ZOOM
pub fn SET_THIRD_PERSON_CAM_ORBIT_DISTANCE_LIMITS_THIS_UPDATE(p0: f32, distance: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16081825916459691649)), p0, distance);
}
pub fn _GET_THIRD_PERSON_CAM_MIN_ORBIT_DISTANCE_SPRING() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(13566372284347914117)));
}
pub fn _GET_THIRD_PERSON_CAM_MAX_ORBIT_DISTANCE_SPRING() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(15301307486492324845)));
}
/// Forces gameplay cam to specified vehicle as if you were in it
pub fn SET_IN_VEHICLE_CAM_STATE_THIS_UPDATE(p0: types.Vehicle, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16855309667613334692)), p0, p1);
}
/// Disables first person camera for the current frame.
/// Found in decompiled scripts:
/// GRAPHICS::DRAW_DEBUG_TEXT_2D("Disabling First Person Cam", 0.5, 0.8, 0.0, 0, 0, 255, 255);
/// CAM::DISABLE_ON_FOOT_FIRST_PERSON_VIEW_THIS_UPDATE();
/// Used to be known as _DISABLE_FIRST_PERSON_CAM_THIS_FRAME
pub fn DISABLE_ON_FOOT_FIRST_PERSON_VIEW_THIS_UPDATE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(16010004042676488415)));
}
pub fn DISABLE_FIRST_PERSON_FLASH_EFFECT_THIS_UPDATE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(6431786605995149745)));
}
pub fn BLOCK_FIRST_PERSON_ORIENTATION_RESET_THIS_UPDATE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(11499900500155795434)));
}
pub fn GET_FOLLOW_PED_CAM_ZOOM_LEVEL() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(3739897472903648233)));
}
/// See viewmode enum in CAM.GET_FOLLOW_VEHICLE_CAM_VIEW_MODE for return value
pub fn GET_FOLLOW_PED_CAM_VIEW_MODE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(10181871448879805754)));
}
/// Sets the type of Player camera:
/// 0 - Third Person Close
/// 1 - Third Person Mid
/// 2 - Third Person Far
/// 4 - First Person
pub fn SET_FOLLOW_PED_CAM_VIEW_MODE(viewMode: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6507594667565250308)), viewMode);
}
pub fn IS_FOLLOW_VEHICLE_CAM_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14681144155113444502)));
}
pub fn SET_FOLLOW_VEHICLE_CAM_HIGH_ANGLE_MODE_THIS_UPDATE(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10515745590155828119)), p0);
}
/// Used to be known as SET_TIME_IDLE_DROP
pub fn SET_FOLLOW_VEHICLE_CAM_HIGH_ANGLE_MODE_EVERY_UPDATE(p0: windows.BOOL, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11384558816065405334)), p0, p1);
}
pub fn SET_TABLE_GAMES_CAMERA_THIS_UPDATE(hash: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8773263032172758242)), hash);
}
pub fn GET_FOLLOW_VEHICLE_CAM_ZOOM_LEVEL() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(17186343154491045520)));
}
pub fn SET_FOLLOW_VEHICLE_CAM_ZOOM_LEVEL(zoomLevel: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1821227447711403146)), zoomLevel);
}
/// Returns the type of camera:
/// enum _viewmode //0xA11D7CA8
/// {
/// THIRD_PERSON_NEAR = 0,
/// THIRD_PERSON_MEDIUM = 1,
/// THIRD_PERSON_FAR = 2,
/// CINEMATIC = 3,
/// FIRST_PERSON = 4
/// };
pub fn GET_FOLLOW_VEHICLE_CAM_VIEW_MODE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(11889317863454124718)));
}
/// Sets the type of Player camera in vehicles:
/// viewmode: see CAM.GET_FOLLOW_VEHICLE_CAM_VIEW_MODE
pub fn SET_FOLLOW_VEHICLE_CAM_VIEW_MODE(viewMode: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12404388335382335304)), viewMode);
}
/// context: see _GET_CAM_ACTIVE_VIEW_MODE_CONTEXT
pub fn GET_CAM_VIEW_MODE_FOR_CONTEXT(context: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(17183360736828670690)), context);
}
/// context: see _GET_CAM_ACTIVE_VIEW_MODE_CONTEXT, viewmode: see CAM.GET_FOLLOW_VEHICLE_CAM_VIEW_MODE
pub fn SET_CAM_VIEW_MODE_FOR_CONTEXT(context: c_int, viewMode: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3035835048754334994)), context, viewMode);
}
/// enum Context
/// {
/// ON_FOOT,
/// IN_VEHICLE,
/// ON_BIKE,
/// IN_BOAT,
/// IN_AIRCRAFT,
/// IN_SUBMARINE,
/// IN_HELI,
/// IN_TURRET
/// };
/// Used to be known as _GET_CAM_ACTIVE_VIEW_MODE_CONTEXT
pub fn GET_CAM_ACTIVE_VIEW_MODE_CONTEXT() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(1858572934129894143)));
}
/// Used to be known as _USE_STUNT_CAMERA_THIS_FRAME
pub fn USE_VEHICLE_CAM_STUNT_SETTINGS_THIS_UPDATE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(7247364277489308010)));
}
/// Sets gameplay camera to hash
/// Used to be known as _SET_GAMEPLAY_CAM_HASH
pub fn USE_DEDICATED_STUNT_CAMERA_THIS_UPDATE(camName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4781294551213673946)), camName);
}
pub fn FORCE_VEHICLE_CAM_STUNT_SETTINGS_THIS_UPDATE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(766305181431055354)));
}
/// Used to be known as _SET_FOLLOW_TURRET_SEAT_CAM
pub fn SET_FOLLOW_VEHICLE_CAM_SEAT_THIS_UPDATE(seatIndex: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6670053907971023151)), seatIndex);
}
pub fn IS_AIM_CAM_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(7560939217536642311)));
}
/// Used to be known as _IS_AIM_CAM_THIRD_PERSON_ACTIVE
pub fn IS_AIM_CAM_ACTIVE_IN_ACCURATE_MODE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8412024722259143625)));
}
pub fn IS_FIRST_PERSON_AIM_CAM_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6788171017574572351)));
}
pub fn DISABLE_AIM_CAM_THIS_UPDATE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(1887568996038165238)));
}
/// Used to be known as _GET_GAMEPLAY_CAM_ZOOM
pub fn GET_FIRST_PERSON_AIM_CAM_ZOOM_FACTOR() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(9134756639609966960)));
}
pub fn SET_FIRST_PERSON_AIM_CAM_ZOOM_FACTOR(zoomFactor: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8109095963221318602)), zoomFactor);
}
pub fn SET_FIRST_PERSON_AIM_CAM_ZOOM_FACTOR_LIMITS_THIS_UPDATE(p0: f32, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14902565917035304903)), p0, p1);
}
pub fn SET_FIRST_PERSON_AIM_CAM_RELATIVE_HEADING_LIMITS_THIS_UPDATE(p0: f32, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3422501687745517806)), p0, p1);
}
/// Used to be known as _SET_FIRST_PERSON_CAM_PITCH_RANGE
pub fn SET_FIRST_PERSON_AIM_CAM_RELATIVE_PITCH_LIMITS_THIS_UPDATE(p0: f32, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13617868421263211504)), p0, p1);
}
/// Used to be known as _SET_FIRST_PERSON_CAM_NEAR_CLIP
pub fn SET_FIRST_PERSON_AIM_CAM_NEAR_CLIP_THIS_UPDATE(p0: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(790298410384163763)), p0);
}
/// Used to be known as _SET_THIRD_PERSON_AIM_CAM_NEAR_CLIP
pub fn SET_THIRD_PERSON_AIM_CAM_NEAR_CLIP_THIS_UPDATE(p0: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4761823267666126430)), p0);
}
pub fn SET_ALLOW_CUSTOM_VEHICLE_DRIVE_BY_CAM_THIS_UPDATE(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4614199466959077749)), p0);
}
pub fn FORCE_TIGHTSPACE_CUSTOM_FRAMING_THIS_UPDATE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(4038402205414366805)));
}
/// Used to be known as _GET_GAMEPLAY_CAM_COORDS
pub fn GET_FINAL_RENDERED_CAM_COORD() types.Vector3 {
return nativeCaller.invoke0(@as(u64, @intCast(11673588752110908488)));
}
/// p0 seems to consistently be 2 across scripts
/// Function is called faily often by CAM::CREATE_CAM_WITH_PARAMS
/// Used to be known as _GET_GAMEPLAY_CAM_ROT_2
pub fn GET_FINAL_RENDERED_CAM_ROT(rotationOrder: c_int) types.Vector3 {
return nativeCaller.invoke1(@as(u64, @intCast(6579280224713453051)), rotationOrder);
}
/// Used to be known as GET_FINAL_RENDERED_IN_WHEN_FRIENDLY_ROT
pub fn GET_FINAL_RENDERED_REMOTE_PLAYER_CAM_ROT(player: types.Player, rotationOrder: c_int) types.Vector3 {
return nativeCaller.invoke2(@as(u64, @intCast(2778788713819758380)), player, rotationOrder);
}
/// Gets some camera fov
pub fn GET_FINAL_RENDERED_CAM_FOV() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(9289819125479829492)));
}
/// Used to be known as GET_FINAL_RENDERED_IN_WHEN_FRIENDLY_FOV
pub fn GET_FINAL_RENDERED_REMOTE_PLAYER_CAM_FOV(player: types.Player) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(6860660581892864928)), player);
}
/// Used to be known as _GET_GAMEPLAY_CAM_NEAR_CLIP
pub fn GET_FINAL_RENDERED_CAM_NEAR_CLIP() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(14990273171478638995)));
}
/// Used to be known as _GET_GAMEPLAY_CAM_FAR_CLIP
pub fn GET_FINAL_RENDERED_CAM_FAR_CLIP() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(16125362517181313276)));
}
/// Used to be known as _GET_GAMEPLAY_CAM_NEAR_DOF
pub fn GET_FINAL_RENDERED_CAM_NEAR_DOF() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(11544136502667607451)));
}
/// Used to be known as _GET_GAMEPLAY_CAM_FAR_DOF
pub fn GET_FINAL_RENDERED_CAM_FAR_DOF() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(10916992866160419889)));
}
/// Used to be known as _GET_GAMEPLAY_CAM_FAR_CLIP_2
pub fn GET_FINAL_RENDERED_CAM_MOTION_BLUR_STRENGTH() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(1598669674660486169)));
}
pub fn SET_GAMEPLAY_COORD_HINT(x: f32, y: f32, z: f32, duration: c_int, blendOutDuration: c_int, blendInDuration: c_int, p6: c_int) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(15355828677610573747)), x, y, z, duration, blendOutDuration, blendInDuration, p6);
}
pub fn SET_GAMEPLAY_PED_HINT(ped: types.Ped, x1: f32, y1: f32, z1: f32, p4: windows.BOOL, duration: c_int, blendOutDuration: c_int, blendInDuration: c_int) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(3118850947964815571)), ped, x1, y1, z1, p4, duration, blendOutDuration, blendInDuration);
}
/// Focuses the camera on the specified vehicle.
pub fn SET_GAMEPLAY_VEHICLE_HINT(vehicle: types.Vehicle, offsetX: f32, offsetY: f32, offsetZ: f32, p4: windows.BOOL, time: c_int, easeInTime: c_int, easeOutTime: c_int) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(11685009353825786926)), vehicle, offsetX, offsetY, offsetZ, p4, time, easeInTime, easeOutTime);
}
pub fn SET_GAMEPLAY_OBJECT_HINT(object: types.Object, xOffset: f32, yOffset: f32, zOffset: f32, p4: windows.BOOL, time: c_int, easeInTime: c_int, easeOutTime: c_int) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(9504975693516778182)), object, xOffset, yOffset, zOffset, p4, time, easeInTime, easeOutTime);
}
/// p8 could be some sort of flag. Scripts use:
/// -244429742
/// 0
/// 1726668277
/// 1844968929
pub fn SET_GAMEPLAY_ENTITY_HINT(entity: types.Entity, xOffset: f32, yOffset: f32, zOffset: f32, p4: windows.BOOL, time: c_int, easeInTime: c_int, easeOutTime: c_int, p8: c_int) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(1774019519209267864)), entity, xOffset, yOffset, zOffset, p4, time, easeInTime, easeOutTime, p8);
}
pub fn IS_GAMEPLAY_HINT_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(16510476724605573952)));
}
pub fn STOP_GAMEPLAY_HINT(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17612549121656326422)), p0);
}
/// This native does absolutely nothing, just a nullsub
pub fn STOP_GAMEPLAY_HINT_BEING_CANCELLED_THIS_UPDATE(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14758428755229485427)), p0);
}
pub fn STOP_CODE_GAMEPLAY_HINT(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2628637378079399196)), p0);
}
pub fn IS_CODE_GAMEPLAY_HINT_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(13795248093864063013)));
}
pub fn SET_GAMEPLAY_HINT_FOV(FOV: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5851306195055681823)), FOV);
}
/// Used to be known as _SET_GAMEPLAY_HINT_ANIM_OFFSETZ
pub fn SET_GAMEPLAY_HINT_FOLLOW_DISTANCE_SCALAR(value: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17923692362181134753)), value);
}
/// Used to be known as _SET_GAMEPLAY_HINT_ANGLE
pub fn SET_GAMEPLAY_HINT_BASE_ORBIT_PITCH_OFFSET(value: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15129902587980036168)), value);
}
/// Used to be known as _SET_GAMEPLAY_HINT_ANIM_OFFSETX
pub fn SET_GAMEPLAY_HINT_CAMERA_RELATIVE_SIDE_OFFSET(xOffset: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6736085478560457016)), xOffset);
}
/// Used to be known as _SET_GAMEPLAY_HINT_ANIM_OFFSETY
pub fn SET_GAMEPLAY_HINT_CAMERA_RELATIVE_VERTICAL_OFFSET(yOffset: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14494580242613233412)), yOffset);
}
/// Used to be known as GET_IS_MULTIPLAYER_BRIEF
/// Used to be known as _SET_GAMEPLAY_HINT_ANIM_CLOSEUP
pub fn SET_GAMEPLAY_HINT_CAMERA_BLEND_TO_FOLLOW_PED_MEDIUM_VIEW_MODE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16376001585667894848)), toggle);
}
pub fn SET_CINEMATIC_BUTTON_ACTIVE(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5865550924448349599)), p0);
}
pub fn IS_CINEMATIC_CAM_RENDERING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(12777102243323636200)));
}
/// p0 argument found in the b617d scripts: "DRUNK_SHAKE"
/// Full list of cam shake types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/camShakeTypesCompact.json
pub fn SHAKE_CINEMATIC_CAM(shakeType: [*c]const u8, amount: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15916306959303242703)), shakeType, amount);
}
pub fn IS_CINEMATIC_CAM_SHAKING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(13528970971632434954)));
}
pub fn SET_CINEMATIC_CAM_SHAKE_AMPLITUDE(p0: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14349813123090427879)), p0);
}
pub fn STOP_CINEMATIC_CAM_SHAKING(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2465973172114597591)), p0);
}
/// Used to be known as _DISABLE_VEHICLE_FIRST_PERSON_CAM_THIS_FRAME
pub fn DISABLE_CINEMATIC_BONNET_CAMERA_THIS_UPDATE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(12537769756257640378)));
}
pub fn DISABLE_CINEMATIC_VEHICLE_IDLE_MODE_THIS_UPDATE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(7128350477778453974)));
}
/// Resets the vehicle idle camera timer. Calling this in a loop will disable the idle camera.
/// Used to be known as _INVALIDATE_VEHICLE_IDLE_CAM
pub fn INVALIDATE_CINEMATIC_VEHICLE_IDLE_MODE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(11406773403435500658)));
}
/// Resets the idle camera timer. Calling that in a loop once every few seconds is enough to disable the idle cinematic camera.
pub fn INVALIDATE_IDLE_CAM() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(17650381910379109920)));
}
pub fn IS_CINEMATIC_IDLE_CAM_RENDERING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14599872450384025376)));
}
/// Used to be known as _IS_IN_VEHICLE_CAM_DISABLED
pub fn IS_CINEMATIC_FIRST_PERSON_VEHICLE_INTERIOR_CAM_RENDERING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(5706835701728451392)));
}
/// hash is always JOAAT("CAMERA_MAN_SHOT") in decompiled scripts
pub fn CREATE_CINEMATIC_SHOT(p0: types.Hash, time: c_int, p2: windows.BOOL, entity: types.Entity) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(8366282011938524977)), p0, time, p2, entity);
}
/// Hash is always JOAAT("CAMERA_MAN_SHOT") in decompiled scripts
pub fn IS_CINEMATIC_SHOT_ACTIVE(p0: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14744560268273159113)), p0);
}
/// Only used once in carsteal3 with p0 set to -1096069633 (CAMERA_MAN_SHOT)
pub fn STOP_CINEMATIC_SHOT(p0: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8530036391243548558)), p0);
}
pub fn FORCE_CINEMATIC_RENDERING_THIS_UPDATE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11825271136428513964)), toggle);
}
pub fn SET_CINEMATIC_NEWS_CHANNEL_ACTIVE_THIS_UPDATE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(15897049075608932934)));
}
/// Toggles the vehicle cinematic cam; requires the player ped to be in a vehicle to work.
pub fn SET_CINEMATIC_MODE_ACTIVE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15920353646728379726)), toggle);
}
pub fn IS_IN_VEHICLE_MOBILE_PHONE_CAMERA_RENDERING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(2243637913380698102)));
}
pub fn DISABLE_CINEMATIC_SLOW_MO_THIS_UPDATE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(1728440085408580099)));
}
pub fn IS_BONNET_CINEMATIC_CAM_RENDERING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(15507582718153417355)));
}
/// Tests some cinematic camera flags
/// Used to be known as _IS_CINEMATIC_CAM_ACTIVE
pub fn IS_CINEMATIC_CAM_INPUT_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(17722201759336331158)));
}
pub fn IGNORE_MENU_PREFERENCE_FOR_BONNET_CAMERA_THIS_UPDATE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(8901987107742153711)));
}
/// Used to be known as STOP_CUTSCENE_CAM_SHAKING
pub fn BYPASS_CUTSCENE_CAM_RENDERING_THIS_UPDATE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(15808373553457658374)));
}
pub fn STOP_CUTSCENE_CAM_SHAKING(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3624371460847073079)), p0);
}
/// Hardcoded to only work in multiplayer.
pub fn SET_CUTSCENE_CAM_FAR_CLIP_THIS_UPDATE(p0: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1359762501013896869)), p0);
}
pub fn GET_FOCUS_PED_ON_SCREEN(p0: f32, p1: c_int, p2: f32, p3: f32, p4: f32, p5: f32, p6: f32, p7: c_int, p8: c_int) types.Ped {
return nativeCaller.invoke9(@as(u64, @intCast(9881283267424887882)), p0, p1, p2, p3, p4, p5, p6, p7, p8);
}
pub fn DISABLE_NEAR_CLIP_SCAN_THIS_UPDATE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(6504261568552221279)));
}
/// if p0 is 0, effect is cancelled
/// if p0 is 1, effect zooms in, gradually tilts cam clockwise apx 30 degrees, wobbles slowly. Motion blur is active until cancelled.
/// if p0 is 2, effect immediately tilts cam clockwise apx 30 degrees, begins to wobble slowly, then gradually tilts cam back to normal. The wobbling will continue until the effect is cancelled.
/// Used to be known as _SET_CAM_EFFECT
pub fn SET_CAM_DEATH_FAIL_EFFECT_STATE(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9279862214405765913)), p0);
}
pub fn SET_FIRST_PERSON_FLASH_EFFECT_TYPE(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6647848214678348050)), p0);
}
/// From b617 scripts:
/// CAM::SET_FIRST_PERSON_FLASH_EFFECT_VEHICLE_MODEL_NAME("DINGHY");
/// CAM::SET_FIRST_PERSON_FLASH_EFFECT_VEHICLE_MODEL_NAME("ISSI2");
/// CAM::SET_FIRST_PERSON_FLASH_EFFECT_VEHICLE_MODEL_NAME("SPEEDO");
/// Used to be known as _SET_GAMEPLAY_CAM_VEHICLE_CAMERA
pub fn SET_FIRST_PERSON_FLASH_EFFECT_VEHICLE_MODEL_NAME(vehicleName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2441605928887934459)), vehicleName);
}
/// Used to be known as _SET_GAMEPLAY_CAM_VEHICLE_CAMERA_NAME
pub fn SET_FIRST_PERSON_FLASH_EFFECT_VEHICLE_MODEL_HASH(vehicleModel: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1295450322785262919)), vehicleModel);
}
pub fn IS_ALLOWED_INDEPENDENT_CAMERA_MODES() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(16929306397907469714)));
}
pub fn CAMERA_PREVENT_COLLISION_SETTINGS_FOR_TRIPLEHEAD_IN_INTERIORS_THIS_UPDATE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(7077205095449206642)));
}
/// Used to be known as _REPLAY_FREE_CAM_GET_MAX_RANGE
pub fn REPLAY_GET_MAX_DISTANCE_ALLOWED_FROM_PLAYER() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(10087196057075278262)));
}
};
pub const CLOCK = struct {
/// SET_CLOCK_TIME(12, 34, 56);
pub fn SET_CLOCK_TIME(hour: c_int, minute: c_int, second: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(5171176378044663256)), hour, minute, second);
}
pub fn PAUSE_CLOCK(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4635862130881195037)), toggle);
}
pub fn ADVANCE_CLOCK_TIME_TO(hour: c_int, minute: c_int, second: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(14468542163779599163)), hour, minute, second);
}
pub fn ADD_TO_CLOCK_TIME(hours: c_int, minutes: c_int, seconds: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(15498842407160086754)), hours, minutes, seconds);
}
/// Gets the current ingame hour, expressed without zeros. (09:34 will be represented as 9)
pub fn GET_CLOCK_HOURS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(2675767815307398015)));
}
/// Gets the current ingame clock minute.
pub fn GET_CLOCK_MINUTES() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(1428407088615670002)));
}
/// Gets the current ingame clock second. Note that ingame clock seconds change really fast since a day in GTA is only 48 minutes in real life.
pub fn GET_CLOCK_SECONDS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(5282326276443980912)));
}
pub fn SET_CLOCK_DATE(day: c_int, month: c_int, year: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(12724429943787777255)), day, month, year);
}
/// Gets the current day of the week.
/// 0: Sunday
/// 1: Monday
/// 2: Tuesday
/// 3: Wednesday
/// 4: Thursday
/// 5: Friday
/// 6: Saturday
pub fn GET_CLOCK_DAY_OF_WEEK() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(15668837556037559135)));
}
pub fn GET_CLOCK_DAY_OF_MONTH() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(4400224173958044981)));
}
pub fn GET_CLOCK_MONTH() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(13530826567613306785)));
}
pub fn GET_CLOCK_YEAR() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(10815244861152360215)));
}
pub fn GET_MILLISECONDS_PER_GAME_MINUTE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(3425916725698957787)));
}
/// Gets system time as year, month, day, hour, minute and second.
/// Example usage:
/// int year;
/// int month;
/// int day;
/// int hour;
/// int minute;
/// int second;
/// TIME::GET_POSIX_TIME(&year, &month, &day, &hour, &minute, &second);
pub fn GET_POSIX_TIME(year: [*c]c_int, month: [*c]c_int, day: [*c]c_int, hour: [*c]c_int, minute: [*c]c_int, second: [*c]c_int) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(15728979107437549134)), year, month, day, hour, minute, second);
}
/// Gets current UTC time
/// Used to be known as _GET_LOCAL_TIME
/// Used to be known as _GET_UTC_TIME
pub fn GET_UTC_TIME(year: [*c]c_int, month: [*c]c_int, day: [*c]c_int, hour: [*c]c_int, minute: [*c]c_int, second: [*c]c_int) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(9302150507821724883)), year, month, day, hour, minute, second);
}
/// Gets local system time as year, month, day, hour, minute and second.
/// Example usage:
/// int year;
/// int month;
/// int day;
/// int hour;
/// int minute;
/// int second;
/// or use std::tm struct
/// TIME::GET_LOCAL_TIME(&year, &month, &day, &hour, &minute, &second);
pub fn GET_LOCAL_TIME(year: [*c]c_int, month: [*c]c_int, day: [*c]c_int, hour: [*c]c_int, minute: [*c]c_int, second: [*c]c_int) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(5820807480810575688)), year, month, day, hour, minute, second);
}
};
pub const CUTSCENE = struct {
/// flags: Usually 8
/// Full list of cutscene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/cutsceneNames.json
pub fn REQUEST_CUTSCENE(cutsceneName: [*c]const u8, flags: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8828871934635515401)), cutsceneName, flags);
}
/// flags: Usually 8
/// playbackFlags: Which scenes should be played.
/// Example: 0x105 (bit 0, 2 and 8 set) will enable scene 1, 3 and 9.
/// Full list of cutscene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/cutsceneNames.json
/// Used to be known as _REQUEST_CUTSCENE_EX
pub fn REQUEST_CUTSCENE_WITH_PLAYBACK_LIST(cutsceneName: [*c]const u8, playbackFlags: c_int, flags: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(13996590508742325644)), cutsceneName, playbackFlags, flags);
}
pub fn REMOVE_CUTSCENE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(4903000637243045999)));
}
pub fn HAS_CUTSCENE_LOADED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14240191319203509049)));
}
/// Full list of cutscene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/cutsceneNames.json
pub fn HAS_THIS_CUTSCENE_LOADED(cutsceneName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2489713879041514556)), cutsceneName);
}
/// Sets the cutscene's owning thread ID.
pub fn SET_SCRIPT_CAN_START_CUTSCENE(threadId: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10204583826990466435)), threadId);
}
pub fn CAN_REQUEST_ASSETS_FOR_CUTSCENE_ENTITY() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(13072748828914211275)));
}
pub fn IS_CUTSCENE_PLAYBACK_FLAG_SET(flag: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8194102893592393936)), flag);
}
pub fn SET_CUTSCENE_ENTITY_STREAMING_FLAGS(cutsceneEntName: [*c]const u8, p1: c_int, p2: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(5503899417280873666)), cutsceneEntName, p1, p2);
}
/// Simply loads the cutscene and doesn't do extra stuff that REQUEST_CUTSCENE does.
/// Full list of cutscene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/cutsceneNames.json
pub fn REQUEST_CUT_FILE(cutsceneName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(478316426198057658)), cutsceneName);
}
/// Simply checks if the cutscene has loaded and doesn't check via CutSceneManager as opposed to HAS_[THIS]_CUTSCENE_LOADED.
/// Full list of cutscene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/cutsceneNames.json
pub fn HAS_CUT_FILE_LOADED(cutsceneName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11658014873199322670)), cutsceneName);
}
/// Simply unloads the cutscene and doesn't do extra stuff that REMOVE_CUTSCENE does.
/// Full list of cutscene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/cutsceneNames.json
pub fn REMOVE_CUT_FILE(cutsceneName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14991769197972412498)), cutsceneName);
}
/// Full list of cutscene names by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/cutsceneNames.json
/// Used to be known as _GET_CUT_FILE_NUM_SECTIONS
pub fn GET_CUT_FILE_CONCAT_COUNT(cutsceneName: [*c]const u8) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(773586550140027132)), cutsceneName);
}
/// flags: Usually 0.
pub fn START_CUTSCENE(flags: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1760164965717704571)), flags);
}
/// flags: Usually 0.
pub fn START_CUTSCENE_AT_COORDS(x: f32, y: f32, z: f32, flags: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(2061203472233668543)), x, y, z, flags);
}
pub fn STOP_CUTSCENE(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14350482124138379374)), p0);
}
pub fn STOP_CUTSCENE_IMMEDIATELY() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(15141310657442105886)));
}
/// p3 could be heading. Needs more research.
pub fn SET_CUTSCENE_ORIGIN(x: f32, y: f32, z: f32, p3: f32, p4: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(13263861752237510439)), x, y, z, p3, p4);
}
pub fn SET_CUTSCENE_ORIGIN_AND_ORIENTATION(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, p6: c_int) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(78958077777363754)), x1, y1, z1, x2, y2, z2, p6);
}
pub fn GET_CUTSCENE_TIME() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(16583870847647734457)));
}
pub fn GET_CUTSCENE_TOTAL_DURATION() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(17173264735913935060)));
}
pub fn GET_CUTSCENE_END_TIME() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(10888994807344787353)));
}
pub fn GET_CUTSCENE_PLAY_DURATION() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(6726195801414038179)));
}
pub fn WAS_CUTSCENE_SKIPPED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(4668092540563346793)));
}
pub fn HAS_CUTSCENE_FINISHED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8938107252012227927)));
}
pub fn IS_CUTSCENE_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(11029968252726419332)));
}
pub fn IS_CUTSCENE_PLAYING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(15259006430109172510)));
}
pub fn GET_CUTSCENE_SECTION_PLAYING() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(5260497291091203032)));
}
pub fn GET_ENTITY_INDEX_OF_CUTSCENE_ENTITY(cutsceneEntName: [*c]const u8, modelHash: types.Hash) types.Entity {
return nativeCaller.invoke2(@as(u64, @intCast(733699554847515382)), cutsceneEntName, modelHash);
}
pub fn GET_CUTSCENE_CONCAT_SECTION_PLAYING() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(6358511906326560152)));
}
/// This function is hard-coded to always return 1.
pub fn IS_CUTSCENE_AUTHORIZED(cutsceneName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5542736990898262622)), cutsceneName);
}
pub fn DOES_CUTSCENE_HANDLE_EXIST(cutsceneHandle: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(5750418796423043084)), cutsceneHandle);
}
pub fn REGISTER_ENTITY_FOR_CUTSCENE(cutscenePed: types.Ped, cutsceneEntName: [*c]const u8, p2: c_int, modelHash: types.Hash, p4: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(16432540299811996392)), cutscenePed, cutsceneEntName, p2, modelHash, p4);
}
pub fn GET_ENTITY_INDEX_OF_REGISTERED_ENTITY(cutsceneEntName: [*c]const u8, modelHash: types.Hash) types.Entity {
return nativeCaller.invoke2(@as(u64, @intCast(13867737904326268109)), cutsceneEntName, modelHash);
}
/// Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json
pub fn SET_VEHICLE_MODEL_PLAYER_WILL_EXIT_SCENE(modelHash: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9193802044567663399)), modelHash);
}
/// Only used twice in R* scripts
pub fn SET_CUTSCENE_TRIGGER_AREA(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(10995202345175778490)), x1, y1, z1, x2, y2, z2);
}
/// modelHash (p1) was always 0 in R* scripts
pub fn CAN_SET_ENTER_STATE_FOR_REGISTERED_ENTITY(cutsceneEntName: [*c]const u8, modelHash: types.Hash) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(7231948969982433205)), cutsceneEntName, modelHash);
}
pub fn CAN_SET_EXIT_STATE_FOR_REGISTERED_ENTITY(cutsceneEntName: [*c]const u8, modelHash: types.Hash) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5506323796818019938)), cutsceneEntName, modelHash);
}
pub fn CAN_SET_EXIT_STATE_FOR_CAMERA(p0: windows.BOOL) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12883616598381802528)), p0);
}
/// Toggles a value (bool) for cutscenes.
pub fn SET_PAD_CAN_SHAKE_DURING_CUTSCENE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14275151645856674820)), toggle);
}
pub fn SET_CUTSCENE_FADE_VALUES(p0: windows.BOOL, p1: windows.BOOL, p2: windows.BOOL, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(9265015192487249876)), p0, p1, p2, p3);
}
pub fn SET_CUTSCENE_MULTIHEAD_FADE(p0: windows.BOOL, p1: windows.BOOL, p2: windows.BOOL, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(2338616680855544775)), p0, p1, p2, p3);
}
pub fn SET_CUTSCENE_MULTIHEAD_FADE_MANUAL(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(499495251841909634)), p0);
}
pub fn IS_MULTIHEAD_FADE_UP() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(11600839529331203547)));
}
/// Stops current cutscene with a fade transition
/// p0: always true in R* Scripts
/// You will need to manually fade the screen back in
/// SET_CUTSCENE_INPUTS_PARTIALLY_FADE?
pub fn NETWORK_SET_MOCAP_CUTSCENE_CAN_BE_SKIPPED(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3392190530248128754)), p0);
}
pub fn SET_CAR_GENERATORS_CAN_UPDATE_DURING_CUTSCENE(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16387078250494245990)), p0);
}
pub fn CAN_USE_MOBILE_PHONE_DURING_CUTSCENE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6836166058594642748)));
}
pub fn SET_CUTSCENE_CAN_BE_SKIPPED(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4754298153418524448)), p0);
}
/// Used to be known as REGISTER_SYNCHRONISED_SCRIPT_SPEECH
pub fn SET_CAN_DISPLAY_MINIMAP_DURING_CUTSCENE_THIS_UPDATE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(2391697727604071172)));
}
/// Full list of ped components by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pedComponentVariations.json
pub fn SET_CUTSCENE_PED_COMPONENT_VARIATION(cutsceneEntName: [*c]const u8, componentId: c_int, drawableId: c_int, textureId: c_int, modelHash: types.Hash) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(13403248738641624009)), cutsceneEntName, componentId, drawableId, textureId, modelHash);
}
pub fn SET_CUTSCENE_PED_COMPONENT_VARIATION_FROM_PED(cutsceneEntName: [*c]const u8, ped: types.Ped, modelHash: types.Hash) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(3050837379472601305)), cutsceneEntName, ped, modelHash);
}
pub fn DOES_CUTSCENE_ENTITY_EXIST(cutsceneEntName: [*c]const u8, modelHash: types.Hash) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5304943546014522457)), cutsceneEntName, modelHash);
}
/// Thanks R*! ;)
/// if ((l_161 == 0) || (l_161 == 2)) {
/// sub_2ea27("Trying to set Jimmy prop variation");
/// CUTSCENE::SET_CUTSCENE_PED_PROP_VARIATION("Jimmy_Boston", 1, 0, 0, 0);
/// }
/// Full list of ped components by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pedComponentVariations.json
pub fn SET_CUTSCENE_PED_PROP_VARIATION(cutsceneEntName: [*c]const u8, componentId: c_int, drawableId: c_int, textureId: c_int, modelHash: types.Hash) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(380081700068038435)), cutsceneEntName, componentId, drawableId, textureId, modelHash);
}
/// Possibly HAS_CUTSCENE_CUT_THIS_FRAME, needs more research.
/// Used to be known as _HAS_CUTSCENE_CUT_THIS_FRAME
pub fn HAS_CUTSCENE_CUT_THIS_FRAME() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8109819150992781379)));
}
};
pub const DATAFILE = struct {
/// Adds the given requestID to the watch list.
pub fn DATAFILE_WATCH_REQUEST_ID(requestId: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12495366615396551068)), requestId);
}
pub fn DATAFILE_CLEAR_WATCH_LIST() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(7838636614011932953)));
}
pub fn DATAFILE_IS_VALID_REQUEST_ID(index: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(18215624226298333304)), index);
}
pub fn DATAFILE_HAS_LOADED_FILE_DATA(requestId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1585076544250520403)), requestId);
}
pub fn DATAFILE_HAS_VALID_FILE_DATA(requestId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(17927738018238751391)), requestId);
}
pub fn DATAFILE_SELECT_ACTIVE_FILE(requestId: c_int, p1: types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(2511432525605240631)), requestId, p1);
}
pub fn DATAFILE_DELETE_REQUESTED_FILE(requestId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10330872441733488896)), requestId);
}
pub fn UGC_CREATE_CONTENT(data: [*c]types.Any, dataCount: c_int, contentName: [*c]const u8, description: [*c]const u8, tagsCsv: [*c]const u8, contentTypeName: [*c]const u8, publish: windows.BOOL, p7: types.Any) windows.BOOL {
return nativeCaller.invoke8(@as(u64, @intCast(14430984433500463641)), data, dataCount, contentName, description, tagsCsv, contentTypeName, publish, p7);
}
pub fn UGC_CREATE_MISSION(contentName: [*c]const u8, description: [*c]const u8, tagsCsv: [*c]const u8, contentTypeName: [*c]const u8, publish: windows.BOOL, p5: types.Any) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(11956990938096993543)), contentName, description, tagsCsv, contentTypeName, publish, p5);
}
pub fn UGC_UPDATE_CONTENT(contentId: [*c]const u8, data: [*c]types.Any, dataCount: c_int, contentName: [*c]const u8, description: [*c]const u8, tagsCsv: [*c]const u8, contentTypeName: [*c]const u8, p7: types.Any) windows.BOOL {
return nativeCaller.invoke8(@as(u64, @intCast(7245863352565463401)), contentId, data, dataCount, contentName, description, tagsCsv, contentTypeName, p7);
}
pub fn UGC_UPDATE_MISSION(contentId: [*c]const u8, contentName: [*c]const u8, description: [*c]const u8, tagsCsv: [*c]const u8, contentTypeName: [*c]const u8, p5: types.Any) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(5063698106916904595)), contentId, contentName, description, tagsCsv, contentTypeName, p5);
}
pub fn UGC_SET_PLAYER_DATA(contentId: [*c]const u8, rating: f32, contentTypeName: [*c]const u8, p3: types.Any) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(7578855087601623363)), contentId, rating, contentTypeName, p3);
}
pub fn DATAFILE_SELECT_UGC_DATA(p0: c_int, p1: types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(12005124007913019300)), p0, p1);
}
pub fn DATAFILE_SELECT_UGC_STATS(p0: c_int, p1: windows.BOOL, p2: types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(11290734992637045821)), p0, p1, p2);
}
pub fn DATAFILE_SELECT_UGC_PLAYER_DATA(p0: c_int, p1: types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5945182624153545536)), p0, p1);
}
pub fn DATAFILE_SELECT_CREATOR_STATS(p0: c_int, p1: types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(74692667292169764)), p0, p1);
}
/// Loads a User-Generated Content (UGC) file. These files can be found in "[GTA5]\data\ugc" and "[GTA5]\common\patch\ugc". They seem to follow a naming convention, most likely of "[name]_[part].ugc". See example below for usage.
/// Returns whether or not the file was successfully loaded.
/// Example:
/// DATAFILE::DATAFILE_LOAD_OFFLINE_UGC("RockstarPlaylists") // loads "rockstarplaylists_00.ugc"
/// Used to be known as _LOAD_UGC_FILE
pub fn DATAFILE_LOAD_OFFLINE_UGC(filename: [*c]const u8, p1: types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(14205351586031732196)), filename, p1);
}
pub fn DATAFILE_CREATE(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15163717397261259758)), p0);
}
pub fn DATAFILE_DELETE(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11149155450699001339)), p0);
}
pub fn DATAFILE_STORE_MISSION_HEADER(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3374907331190686072)), p0);
}
pub fn DATAFILE_FLUSH_MISSION_HEADER() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(14220209040707242114)));
}
pub fn DATAFILE_GET_FILE_DICT(p0: c_int) [*c]types.Any {
return nativeCaller.invoke1(@as(u64, @intCast(10406542809864368822)), p0);
}
pub fn DATAFILE_START_SAVE_TO_CLOUD(filename: [*c]const u8, p1: types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(9492688829345390341)), filename, p1);
}
pub fn DATAFILE_UPDATE_SAVE_TO_CLOUD(p0: [*c]windows.BOOL) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5619887515254096192)), p0);
}
pub fn DATAFILE_IS_SAVE_PENDING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(13752751532590934223)));
}
pub fn DATAFILE_LOAD_OFFLINE_UGC_FOR_ADDITIONAL_DATA_FILE(p0: types.Any, p1: types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(12028815608529821405)), p0, p1);
}
pub fn DATAFILE_DELETE_FOR_ADDITIONAL_DATA_FILE(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7696859974742861515)), p0);
}
pub fn DATAFILE_GET_FILE_DICT_FOR_ADDITIONAL_DATA_FILE(p0: types.Any) [*c]types.Any {
return nativeCaller.invoke1(@as(u64, @intCast(15850525331203614105)), p0);
}
/// Used to be known as _OBJECT_VALUE_ADD_BOOLEAN
pub fn DATADICT_SET_BOOL(objectData: [*c]types.Any, key: [*c]const u8, value: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(3824192712233886501)), objectData, key, value);
}
/// Used to be known as _OBJECT_VALUE_ADD_INTEGER
pub fn DATADICT_SET_INT(objectData: [*c]types.Any, key: [*c]const u8, value: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(16708413188189276373)), objectData, key, value);
}
/// Used to be known as _OBJECT_VALUE_ADD_FLOAT
pub fn DATADICT_SET_FLOAT(objectData: [*c]types.Any, key: [*c]const u8, value: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(14014670713589665886)), objectData, key, value);
}
/// Used to be known as _OBJECT_VALUE_ADD_STRING
pub fn DATADICT_SET_STRING(objectData: [*c]types.Any, key: [*c]const u8, value: [*c]const u8) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(10372780042086834956)), objectData, key, value);
}
/// Used to be known as _OBJECT_VALUE_ADD_VECTOR3
pub fn DATADICT_SET_VECTOR(objectData: [*c]types.Any, key: [*c]const u8, valueX: f32, valueY: f32, valueZ: f32) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(5536220773918473710)), objectData, key, valueX, valueY, valueZ);
}
/// Used to be known as _OBJECT_VALUE_ADD_OBJECT
pub fn DATADICT_CREATE_DICT(objectData: [*c]types.Any, key: [*c]const u8) [*c]types.Any {
return nativeCaller.invoke2(@as(u64, @intCast(11770427483498950369)), objectData, key);
}
/// Used to be known as _OBJECT_VALUE_ADD_ARRAY
pub fn DATADICT_CREATE_ARRAY(objectData: [*c]types.Any, key: [*c]const u8) [*c]types.Any {
return nativeCaller.invoke2(@as(u64, @intCast(6562152048279318111)), objectData, key);
}
/// Used to be known as _OBJECT_VALUE_GET_BOOLEAN
pub fn DATADICT_GET_BOOL(objectData: [*c]types.Any, key: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(1262859536984702700)), objectData, key);
}
/// Used to be known as _OBJECT_VALUE_GET_INTEGER
pub fn DATADICT_GET_INT(objectData: [*c]types.Any, key: [*c]const u8) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(8714587784846092300)), objectData, key);
}
/// Used to be known as _OBJECT_VALUE_GET_FLOAT
pub fn DATADICT_GET_FLOAT(objectData: [*c]types.Any, key: [*c]const u8) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(459652227145635623)), objectData, key);
}
/// Used to be known as _OBJECT_VALUE_GET_STRING
pub fn DATADICT_GET_STRING(objectData: [*c]types.Any, key: [*c]const u8) [*c]const u8 {
return nativeCaller.invoke2(@as(u64, @intCast(4408982148052305010)), objectData, key);
}
/// Used to be known as _OBJECT_VALUE_GET_VECTOR3
pub fn DATADICT_GET_VECTOR(objectData: [*c]types.Any, key: [*c]const u8) types.Vector3 {
return nativeCaller.invoke2(@as(u64, @intCast(5101800707108382156)), objectData, key);
}
/// Used to be known as _OBJECT_VALUE_GET_OBJECT
pub fn DATADICT_GET_DICT(objectData: [*c]types.Any, key: [*c]const u8) [*c]types.Any {
return nativeCaller.invoke2(@as(u64, @intCast(13166798819796250338)), objectData, key);
}
/// Used to be known as _OBJECT_VALUE_GET_ARRAY
pub fn DATADICT_GET_ARRAY(objectData: [*c]types.Any, key: [*c]const u8) [*c]types.Any {
return nativeCaller.invoke2(@as(u64, @intCast(8833875170271058413)), objectData, key);
}
/// Types:
/// 1 = Boolean
/// 2 = Integer
/// 3 = Float
/// 4 = String
/// 5 = Vector3
/// 6 = Object
/// 7 = Array
/// Used to be known as _OBJECT_VALUE_GET_TYPE
pub fn DATADICT_GET_TYPE(objectData: [*c]types.Any, key: [*c]const u8) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(224148558715188081)), objectData, key);
}
/// Used to be known as _ARRAY_VALUE_ADD_BOOLEAN
pub fn DATAARRAY_ADD_BOOL(arrayData: [*c]types.Any, value: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17920093003080436854)), arrayData, value);
}
/// Used to be known as _ARRAY_VALUE_ADD_INTEGER
pub fn DATAARRAY_ADD_INT(arrayData: [*c]types.Any, value: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14609034328411203899)), arrayData, value);
}
/// Used to be known as _ARRAY_VALUE_ADD_FLOAT
pub fn DATAARRAY_ADD_FLOAT(arrayData: [*c]types.Any, value: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6316744868199890774)), arrayData, value);
}
/// Used to be known as _ARRAY_VALUE_ADD_STRING
pub fn DATAARRAY_ADD_STRING(arrayData: [*c]types.Any, value: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3388503252636987050)), arrayData, value);
}
/// Used to be known as _ARRAY_VALUE_ADD_VECTOR3
pub fn DATAARRAY_ADD_VECTOR(arrayData: [*c]types.Any, valueX: f32, valueY: f32, valueZ: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(4647588385826861250)), arrayData, valueX, valueY, valueZ);
}
/// Used to be known as _ARRAY_VALUE_ADD_OBJECT
pub fn DATAARRAY_ADD_DICT(arrayData: [*c]types.Any) [*c]types.Any {
return nativeCaller.invoke1(@as(u64, @intCast(7532632714145023895)), arrayData);
}
/// Used to be known as _ARRAY_VALUE_GET_BOOLEAN
pub fn DATAARRAY_GET_BOOL(arrayData: [*c]types.Any, arrayIndex: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5819128487743635732)), arrayData, arrayIndex);
}
/// Used to be known as _ARRAY_VALUE_GET_INTEGER
pub fn DATAARRAY_GET_INT(arrayData: [*c]types.Any, arrayIndex: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(4493151604661122238)), arrayData, arrayIndex);
}
/// Used to be known as _ARRAY_VALUE_GET_FLOAT
pub fn DATAARRAY_GET_FLOAT(arrayData: [*c]types.Any, arrayIndex: c_int) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(13890552284671627189)), arrayData, arrayIndex);
}
/// Used to be known as _ARRAY_VALUE_GET_STRING
pub fn DATAARRAY_GET_STRING(arrayData: [*c]types.Any, arrayIndex: c_int) [*c]const u8 {
return nativeCaller.invoke2(@as(u64, @intCast(15272550673523371858)), arrayData, arrayIndex);
}
/// Used to be known as _ARRAY_VALUE_GET_VECTOR3
pub fn DATAARRAY_GET_VECTOR(arrayData: [*c]types.Any, arrayIndex: c_int) types.Vector3 {
return nativeCaller.invoke2(@as(u64, @intCast(10169238896371196554)), arrayData, arrayIndex);
}
/// Used to be known as _ARRAY_VALUE_GET_OBJECT
pub fn DATAARRAY_GET_DICT(arrayData: [*c]types.Any, arrayIndex: c_int) [*c]types.Any {
return nativeCaller.invoke2(@as(u64, @intCast(10042936787056858207)), arrayData, arrayIndex);
}
/// Used to be known as _ARRAY_VALUE_GET_SIZE
pub fn DATAARRAY_GET_COUNT(arrayData: [*c]types.Any) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(458719005676202541)), arrayData);
}
/// Types:
/// 1 = Boolean
/// 2 = Integer
/// 3 = Float
/// 4 = String
/// 5 = Vector3
/// 6 = Object
/// 7 = Array
/// Used to be known as _ARRAY_VALUE_GET_TYPE
pub fn DATAARRAY_GET_TYPE(arrayData: [*c]types.Any, arrayIndex: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(4179363190438798277)), arrayData, arrayIndex);
}
};
pub const DECORATOR = struct {
pub fn DECOR_SET_TIME(entity: types.Entity, propertyName: [*c]const u8, timestamp: c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(10785795346691705508)), entity, propertyName, timestamp);
}
/// This function sets metadata of type bool to specified entity.
pub fn DECOR_SET_BOOL(entity: types.Entity, propertyName: [*c]const u8, value: windows.BOOL) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(7718763143089052529)), entity, propertyName, value);
}
/// Used to be known as _DECOR_SET_FLOAT
pub fn DECOR_SET_FLOAT(entity: types.Entity, propertyName: [*c]const u8, value: f32) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(2385414517758572090)), entity, propertyName, value);
}
/// Sets property to int.
pub fn DECOR_SET_INT(entity: types.Entity, propertyName: [*c]const u8, value: c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(928773269352455696)), entity, propertyName, value);
}
pub fn DECOR_GET_BOOL(entity: types.Entity, propertyName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(15766652691334493659)), entity, propertyName);
}
/// Used to be known as _DECOR_GET_FLOAT
pub fn DECOR_GET_FLOAT(entity: types.Entity, propertyName: [*c]const u8) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(7288129253306036035)), entity, propertyName);
}
pub fn DECOR_GET_INT(entity: types.Entity, propertyName: [*c]const u8) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(11559779936061977240)), entity, propertyName);
}
/// Returns whether or not the specified property is set for the entity.
pub fn DECOR_EXIST_ON(entity: types.Entity, propertyName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(389028657215641183)), entity, propertyName);
}
pub fn DECOR_REMOVE(entity: types.Entity, propertyName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(67166044987557664)), entity, propertyName);
}
/// https://alloc8or.re/gta5/doc/enums/eDecorType.txt
pub fn DECOR_REGISTER(propertyName: [*c]const u8, @"type": c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11518245437423485902)), propertyName, @"type");
}
/// type: see DECOR_REGISTER
pub fn DECOR_IS_REGISTERED_AS_TYPE(propertyName: [*c]const u8, @"type": c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5698454273970863048)), propertyName, @"type");
}
/// Called after all decorator type initializations.
pub fn DECOR_REGISTER_LOCK() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(12236648430102876744)));
}
};
pub const DLC = struct {
pub fn ARE_ANY_CCS_PENDING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(2603021602281049973)));
}
/// Returns true if the given DLC pack is present.
pub fn IS_DLC_PRESENT(dlcHash: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9306008721141064158)), dlcHash);
}
/// This function is hard-coded to always return 1.
pub fn DLC_CHECK_CLOUD_DATA_CORRECT() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(17501120204742742665)));
}
/// This function is hard-coded to always return 0.
pub fn GET_EXTRACONTENT_CLOUD_RESULT() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(10703197673380910469)));
}
/// This function is hard-coded to always return 1.
pub fn DLC_CHECK_COMPAT_PACK_CONFIGURATION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(11678873001097585408)));
}
/// Used to be known as _GET_EXTRA_CONTENT_PACK_HAS_BEEN_INSTALLED
pub fn GET_EVER_HAD_BAD_PACK_ORDER() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(10173902347349693109)));
}
pub fn GET_IS_LOADING_SCREEN_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(1211654058606673609)));
}
pub fn GET_IS_INITIAL_LOADING_SCREEN_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14151289062761319619)));
}
/// Sets the value of the specified variable to 0.
/// Always returns true.
/// Used to be known as _NULLIFY
pub fn HAS_CLOUD_REQUESTS_FINISHED(p0: [*c]windows.BOOL, unused: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5107847532010784240)), p0, unused);
}
/// Unloads GROUP_MAP (GTAO/MP) DLC data and loads GROUP_MAP_SP DLC. Neither are loaded by default, ON_ENTER_MP is a cognate to this function and loads MP DLC (and unloads SP DLC by extension).
/// Works in singleplayer.
/// Used to be known as _LOAD_SP_DLC_MAPS
pub fn ON_ENTER_SP() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(15546720902295687881)));
}
/// This loads the GTA:O dlc map parts (high end garages, apartments).
/// Works in singleplayer.
/// In order to use GTA:O heist IPL's you have to call this native with the following params: SET_INSTANCE_PRIORITY_MODE(1);
/// Used to be known as _LOAD_MP_DLC_MAPS
pub fn ON_ENTER_MP() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(614956098268163829)));
}
};
pub const ENTITY = struct {
/// Checks whether an entity exists in the game world.
pub fn DOES_ENTITY_EXIST(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8230805619690780346)), entity);
}
pub fn DOES_ENTITY_BELONG_TO_THIS_SCRIPT(entity: types.Entity, p1: windows.BOOL) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(15989713108567949778)), entity, p1);
}
pub fn DOES_ENTITY_HAVE_DRAWABLE(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(436126333621822605)), entity);
}
pub fn DOES_ENTITY_HAVE_PHYSICS(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15750752776961675364)), entity);
}
/// Used to be known as _DOES_ENTITY_HAVE_SKELETON_DATA
pub fn DOES_ENTITY_HAVE_SKELETON(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8524955002948550081)), entity);
}
/// Used to be known as _DOES_ENTITY_HAVE_ANIM_DIRECTOR
pub fn DOES_ENTITY_HAVE_ANIM_DIRECTOR(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2402925601363484329)), entity);
}
/// P3 is always 3 as far as i cant tell
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
pub fn HAS_ENTITY_ANIM_FINISHED(entity: types.Entity, animDict: [*c]const u8, animName: [*c]const u8, p3: c_int) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(2357372060430414962)), entity, animDict, animName, p3);
}
pub fn HAS_ENTITY_BEEN_DAMAGED_BY_ANY_OBJECT(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10802896790238288997)), entity);
}
pub fn HAS_ENTITY_BEEN_DAMAGED_BY_ANY_PED(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6944368192628204689)), entity);
}
pub fn HAS_ENTITY_BEEN_DAMAGED_BY_ANY_VEHICLE(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16128801213299861960)), entity);
}
/// Entity 1 = Victim
/// Entity 2 = Attacker
/// p2 seems to always be 1
pub fn HAS_ENTITY_BEEN_DAMAGED_BY_ENTITY(entity1: types.Entity, entity2: types.Entity, p2: windows.BOOL) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(14442313745284758776)), entity1, entity2, p2);
}
/// traceType is always 17 in the scripts.
/// There is other codes used for traceType:
/// 19 - in jewelry_prep1a
/// 126 - in am_hunt_the_beast
/// 256 & 287 - in fm_mission_controller
pub fn HAS_ENTITY_CLEAR_LOS_TO_ENTITY(entity1: types.Entity, entity2: types.Entity, traceType: c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(18221554983472701868)), entity1, entity2, traceType);
}
/// Used to be known as _HAS_ENTITY_CLEAR_LOS_TO_ENTITY_2
pub fn HAS_ENTITY_CLEAR_LOS_TO_ENTITY_ADJUST_FOR_COVER(entity1: types.Entity, entity2: types.Entity, traceType: c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(4128637757460972318)), entity1, entity2, traceType);
}
/// Has the entity1 got a clear line of sight to the other entity2 from the direction entity1 is facing.
/// This is one of the most CPU demanding BOOL natives in the game; avoid calling this in things like nested for-loops
pub fn HAS_ENTITY_CLEAR_LOS_TO_ENTITY_IN_FRONT(entity1: types.Entity, entity2: types.Entity) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(173335856089985402)), entity1, entity2);
}
/// Called on tick.
/// Tested with vehicles, returns true whenever the vehicle is touching any entity.
/// Note: for vehicles, the wheels can touch the ground and it will still return false, but if the body of the vehicle touches the ground, it will return true.
pub fn HAS_ENTITY_COLLIDED_WITH_ANYTHING(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10064703972973583892)), entity);
}
pub fn _GET_LAST_ENTITY_HIT_BY_ENTITY(entity: types.Entity) types.Entity {
return nativeCaller.invoke1(@as(u64, @intCast(12060328599668413329)), entity);
}
pub fn GET_LAST_MATERIAL_HIT_BY_ENTITY(entity: types.Entity) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(6646480253144489036)), entity);
}
pub fn GET_COLLISION_NORMAL_OF_LAST_HIT_FOR_ENTITY(entity: types.Entity) types.Vector3 {
return nativeCaller.invoke1(@as(u64, @intCast(16457794246291140210)), entity);
}
/// Based on carmod_shop script decompile this takes a vehicle parameter. It is called when repair is done on initial enter.
pub fn FORCE_ENTITY_AI_AND_ANIMATION_UPDATE(entity: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4683160558567068594)), entity);
}
/// Returns a float value representing animation's current playtime with respect to its total playtime. This value increasing in a range from [0 to 1] and wrap back to 0 when it reach 1.
/// Example:
/// 0.000000 - mark the starting of animation.
/// 0.500000 - mark the midpoint of the animation.
/// 1.000000 - mark the end of animation.
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
pub fn GET_ENTITY_ANIM_CURRENT_TIME(entity: types.Entity, animDict: [*c]const u8, animName: [*c]const u8) f32 {
return nativeCaller.invoke3(@as(u64, @intCast(3777817843249745730)), entity, animDict, animName);
}
/// Returns a float value representing animation's total playtime in milliseconds.
/// Example:
/// GET_ENTITY_ANIM_TOTAL_TIME(PLAYER_ID(),"amb@world_human_yoga@female@base","base_b")
/// return 20800.000000
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
pub fn GET_ENTITY_ANIM_TOTAL_TIME(entity: types.Entity, animDict: [*c]const u8, animName: [*c]const u8) f32 {
return nativeCaller.invoke3(@as(u64, @intCast(5817849383723590496)), entity, animDict, animName);
}
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
/// Used to be known as _GET_ANIM_DURATION
pub fn GET_ANIM_DURATION(animDict: [*c]const u8, animName: [*c]const u8) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(18365099070646179728)), animDict, animName);
}
pub fn GET_ENTITY_ATTACHED_TO(entity: types.Entity) types.Entity {
return nativeCaller.invoke1(@as(u64, @intCast(5242962755833553187)), entity);
}
/// Gets the current coordinates for a specified entity.
/// `entity` = The entity to get the coordinates from.
/// `alive` = Unused by the game, potentially used by debug builds of GTA in order to assert whether or not an entity was alive.
pub fn GET_ENTITY_COORDS(entity: types.Entity, alive: windows.BOOL) types.Vector3 {
return nativeCaller.invoke2(@as(u64, @intCast(4607031842625162586)), entity, alive);
}
/// Gets the entity's forward vector.
pub fn GET_ENTITY_FORWARD_VECTOR(entity: types.Entity) types.Vector3 {
return nativeCaller.invoke1(@as(u64, @intCast(754716164444708753)), entity);
}
/// Gets the X-component of the entity's forward vector.
pub fn GET_ENTITY_FORWARD_X(entity: types.Entity) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(10066934134177064661)), entity);
}
/// Gets the Y-component of the entity's forward vector.
pub fn GET_ENTITY_FORWARD_Y(entity: types.Entity) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(9685635723418703120)), entity);
}
/// Returns the heading of the entity in degrees. Also know as the "Yaw" of an entity.
pub fn GET_ENTITY_HEADING(entity: types.Entity) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(16734619320245782804)), entity);
}
/// Gets the heading of the entity physics in degrees, which tends to be more accurate than just "GET_ENTITY_HEADING". This can be clearly seen while, for example, ragdolling a ped/player.
/// NOTE: The name and description of this native are based on independent research. If you find this native to be more suitable under a different name and/or described differently, please feel free to do so.
/// Used to be known as _GET_ENTITY_PHYSICS_HEADING
pub fn GET_ENTITY_HEADING_FROM_EULERS(entity: types.Entity) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(9541990891763836702)), entity);
}
/// Returns an integer value of entity's current health.
/// Example of range for ped:
/// - Player [0 to 200]
/// - Ped [100 to 200]
/// - Vehicle [0 to 1000]
/// - Object [0 to 1000]
/// Health is actually a float value but this native casts it to int.
/// In order to get the actual value, do:
/// float health = *(float *)(entityAddress + 0x280);
pub fn GET_ENTITY_HEALTH(entity: types.Entity) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(17217360309205258761)), entity);
}
/// Return an integer value of entity's maximum health.
/// Example:
/// - Player = 200
/// - Ped = 150
pub fn GET_ENTITY_MAX_HEALTH(entity: types.Entity) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(1573822666447981628)), entity);
}
/// For instance: ENTITY::SET_ENTITY_MAX_HEALTH(PLAYER::PLAYER_PED_ID(), 200); // director_mode.c4: 67849
pub fn SET_ENTITY_MAX_HEALTH(entity: types.Entity, value: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1616366714517706933)), entity, value);
}
pub fn GET_ENTITY_HEIGHT(entity: types.Entity, X: f32, Y: f32, Z: f32, atTop: windows.BOOL, inWorldCoords: windows.BOOL) f32 {
return nativeCaller.invoke6(@as(u64, @intCast(6507777749973288157)), entity, X, Y, Z, atTop, inWorldCoords);
}
/// Return height (z-dimension) above ground.
/// Example: The pilot in a titan plane is 1.844176 above ground.
/// How can i convert it to meters?
/// Everything seems to be in meters, probably this too.
pub fn GET_ENTITY_HEIGHT_ABOVE_GROUND(entity: types.Entity) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(2149720059000459493)), entity);
}
pub fn GET_ENTITY_MATRIX(entity: types.Entity, forwardVector: [*c]types.Vector3, rightVector: [*c]types.Vector3, upVector: [*c]types.Vector3, position: [*c]types.Vector3) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(17055972306262151479)), entity, forwardVector, rightVector, upVector, position);
}
/// Returns the model hash from the entity
pub fn GET_ENTITY_MODEL(entity: types.Entity) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(11477336068289496245)), entity);
}
/// Converts world coords (posX - Z) to coords relative to the entity
/// Example:
/// posX is given as 50
/// entity's x coord is 40
/// the returned x coord will then be 10 or -10, not sure haven't used this in a while (think it is 10 though).
pub fn GET_OFFSET_FROM_ENTITY_GIVEN_WORLD_COORDS(entity: types.Entity, posX: f32, posY: f32, posZ: f32) types.Vector3 {
return nativeCaller.invoke4(@as(u64, @intCast(2482816124249826099)), entity, posX, posY, posZ);
}
/// Offset values are relative to the entity.
/// x = left/right
/// y = forward/backward
/// z = up/down
pub fn GET_OFFSET_FROM_ENTITY_IN_WORLD_COORDS(entity: types.Entity, offsetX: f32, offsetY: f32, offsetZ: f32) types.Vector3 {
return nativeCaller.invoke4(@as(u64, @intCast(1772715284438788168)), entity, offsetX, offsetY, offsetZ);
}
pub fn GET_ENTITY_PITCH(entity: types.Entity) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(15302601003449311742)), entity);
}
/// w is the correct parameter name!
pub fn GET_ENTITY_QUATERNION(entity: types.Entity, x: [*c]f32, y: [*c]f32, z: [*c]f32, w: [*c]f32) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(8878569394405243416)), entity, x, y, z, w);
}
/// Displays the current ROLL axis of the entity [-180.0000/180.0000+]
/// (Sideways Roll) such as a vehicle tipped on its side
pub fn GET_ENTITY_ROLL(entity: types.Entity) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(9447991552259743967)), entity);
}
/// rotationOrder is the order yaw, pitch and roll is applied. Usually 2. Returns a vector where the Z coordinate is the yaw.
/// rotationOrder refers to the order yaw pitch roll is applied; value ranges from 0 to 5 and is usually *2* in scripts.
/// What you use for rotationOrder when getting must be the same as rotationOrder when setting the rotation.
/// What it returns is the yaw on the z part of the vector, which makes sense considering R* considers z as vertical. Here's a picture for those of you who don't understand pitch, yaw, and roll: www.allstar.fiu.edu/aero/images/pic5-1.gif
/// Rotation Orders:
/// 0: ZYX - Rotate around the z-axis, then the y-axis and finally the x-axis.
/// 1: YZX - Rotate around the y-axis, then the z-axis and finally the x-axis.
/// 2: ZXY - Rotate around the z-axis, then the x-axis and finally the y-axis.
/// 3: XZY - Rotate around the x-axis, then the z-axis and finally the y-axis.
/// 4: YXZ - Rotate around the y-axis, then the x-axis and finally the z-axis.
/// 5: XYZ - Rotate around the x-axis, then the y-axis and finally the z-axis.
pub fn GET_ENTITY_ROTATION(entity: types.Entity, rotationOrder: c_int) types.Vector3 {
return nativeCaller.invoke2(@as(u64, @intCast(12663385257975586489)), entity, rotationOrder);
}
pub fn GET_ENTITY_ROTATION_VELOCITY(entity: types.Entity) types.Vector3 {
return nativeCaller.invoke1(@as(u64, @intCast(2394667074804365699)), entity);
}
/// Returns the name of the script that owns/created the entity or nullptr. Second parameter is unused, can just be a nullptr.
pub fn GET_ENTITY_SCRIPT(entity: types.Entity, script: [*c]types.ScrHandle) [*c]const u8 {
return nativeCaller.invoke2(@as(u64, @intCast(12027359293266032456)), entity, script);
}
/// result is in meters per second
/// ------------------------------------------------------------
/// So would the conversion to mph and km/h, be along the lines of this.
/// float speed = GET_ENTITY_SPEED(veh);
/// float kmh = (speed * 3.6);
/// float mph = (speed * 2.236936);
/// ------------------------------------------------------------
pub fn GET_ENTITY_SPEED(entity: types.Entity) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(15349247917266452847)), entity);
}
/// Relative can be used for getting speed relative to the frame of the vehicle, to determine for example, if you are going in reverse (-y speed) or not (+y speed).
pub fn GET_ENTITY_SPEED_VECTOR(entity: types.Entity, relative: windows.BOOL) types.Vector3 {
return nativeCaller.invoke2(@as(u64, @intCast(11136680643181378317)), entity, relative);
}
pub fn GET_ENTITY_UPRIGHT_VALUE(entity: types.Entity) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(10803807467542486943)), entity);
}
pub fn GET_ENTITY_VELOCITY(entity: types.Entity) types.Vector3 {
return nativeCaller.invoke1(@as(u64, @intCast(5189785806902891689)), entity);
}
/// Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).
pub fn GET_OBJECT_INDEX_FROM_ENTITY_INDEX(entity: types.Entity) types.Object {
return nativeCaller.invoke1(@as(u64, @intCast(15556481442984724950)), entity);
}
/// Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).
pub fn GET_PED_INDEX_FROM_ENTITY_INDEX(entity: types.Entity) types.Ped {
return nativeCaller.invoke1(@as(u64, @intCast(334009695758536769)), entity);
}
/// Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).
pub fn GET_VEHICLE_INDEX_FROM_ENTITY_INDEX(entity: types.Entity) types.Vehicle {
return nativeCaller.invoke1(@as(u64, @intCast(5427955931250817728)), entity);
}
/// Returns the coordinates of an entity-bone.
pub fn GET_WORLD_POSITION_OF_ENTITY_BONE(entity: types.Entity, boneIndex: c_int) types.Vector3 {
return nativeCaller.invoke2(@as(u64, @intCast(4947482061849130808)), entity, boneIndex);
}
pub fn GET_NEAREST_PLAYER_TO_ENTITY(entity: types.Entity) types.Player {
return nativeCaller.invoke1(@as(u64, @intCast(8184874700316724659)), entity);
}
pub fn GET_NEAREST_PLAYER_TO_ENTITY_ON_TEAM(entity: types.Entity, team: c_int) types.Player {
return nativeCaller.invoke2(@as(u64, @intCast(5605193934252643127)), entity, team);
}
pub fn GET_NEAREST_PARTICIPANT_TO_ENTITY(entity: types.Entity) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(18428008751355912447)), entity);
}
/// Returns:
/// 0 = no entity
/// 1 = ped
/// 2 = vehicle
/// 3 = object
pub fn GET_ENTITY_TYPE(entity: types.Entity) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(10001710134357738757)), entity);
}
/// A population type, from the following enum: https://alloc8or.re/gta5/doc/enums/ePopulationType.txt
pub fn GET_ENTITY_POPULATION_TYPE(entity: types.Entity) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(17795153826185276927)), entity);
}
pub fn IS_AN_ENTITY(handle: types.ScrHandle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8295288192219550113)), handle);
}
pub fn IS_ENTITY_A_PED(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5929769480716891198)), entity);
}
pub fn IS_ENTITY_A_MISSION_ENTITY(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(755240282434935612)), entity);
}
pub fn IS_ENTITY_A_VEHICLE(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7694118761768769374)), entity);
}
pub fn IS_ENTITY_AN_OBJECT(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10189615146141002062)), entity);
}
/// Checks if entity is within x/y/zSize distance of x/y/z.
/// Last three are unknown ints, almost always p7 = 0, p8 = 1, p9 = 0
pub fn IS_ENTITY_AT_COORD(entity: types.Entity, xPos: f32, yPos: f32, zPos: f32, xSize: f32, ySize: f32, zSize: f32, p7: windows.BOOL, p8: windows.BOOL, p9: c_int) windows.BOOL {
return nativeCaller.invoke10(@as(u64, @intCast(2357081991963017295)), entity, xPos, yPos, zPos, xSize, ySize, zSize, p7, p8, p9);
}
/// Checks if entity1 is within the box defined by x/y/zSize of entity2.
/// Last three parameters are almost alwasy p5 = 0, p6 = 1, p7 = 0
pub fn IS_ENTITY_AT_ENTITY(entity1: types.Entity, entity2: types.Entity, xSize: f32, ySize: f32, zSize: f32, p5: windows.BOOL, p6: windows.BOOL, p7: c_int) windows.BOOL {
return nativeCaller.invoke8(@as(u64, @intCast(8438462313122816391)), entity1, entity2, xSize, ySize, zSize, p5, p6, p7);
}
/// Whether the entity is attached to any other entity.
pub fn IS_ENTITY_ATTACHED(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12918091122985027735)), entity);
}
pub fn IS_ENTITY_ATTACHED_TO_ANY_OBJECT(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14938748105593315532)), entity);
}
pub fn IS_ENTITY_ATTACHED_TO_ANY_PED(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12782111407971274001)), entity);
}
pub fn IS_ENTITY_ATTACHED_TO_ANY_VEHICLE(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2786199138849258315)), entity);
}
pub fn IS_ENTITY_ATTACHED_TO_ENTITY(from: types.Entity, to: types.Entity) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(17275370056189556520)), from, to);
}
pub fn IS_ENTITY_DEAD(entity: types.Entity, p1: windows.BOOL) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(6887467227441538385)), entity, p1);
}
pub fn IS_ENTITY_IN_AIR(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9830856524580389046)), entity);
}
/// `p8` is a debug flag invoking functions in the same path as ``DRAW_MARKER``
/// `p10` is some entity flag check, also used in `IS_ENTITY_AT_ENTITY`, `IS_ENTITY_IN_AREA`, and `IS_ENTITY_AT_COORD`.
/// See IS_POINT_IN_ANGLED_AREA for the definition of an angled area.
pub fn IS_ENTITY_IN_ANGLED_AREA(entity: types.Entity, x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, width: f32, debug: windows.BOOL, includeZ: windows.BOOL, p10: types.Any) windows.BOOL {
return nativeCaller.invoke11(@as(u64, @intCast(5845968004384409482)), entity, x1, y1, z1, x2, y2, z2, width, debug, includeZ, p10);
}
pub fn IS_ENTITY_IN_AREA(entity: types.Entity, x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, p7: windows.BOOL, p8: windows.BOOL, p9: types.Any) windows.BOOL {
return nativeCaller.invoke10(@as(u64, @intCast(6085324774352294245)), entity, x1, y1, z1, x2, y2, z2, p7, p8, p9);
}
/// Full list of zones by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/zones.json
pub fn IS_ENTITY_IN_ZONE(entity: types.Entity, zone: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(13134252393473667185)), entity, zone);
}
pub fn IS_ENTITY_IN_WATER(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14965638415315453347)), entity);
}
/// Get how much of the entity is submerged. 1.0f is whole entity.
pub fn GET_ENTITY_SUBMERGED_LEVEL(entity: types.Entity) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(16724957362389795278)), entity);
}
pub fn SET_ENTITY_REQUIRES_MORE_EXPENSIVE_RIVER_CHECK(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7588002504561402861)), entity, toggle);
}
/// Returns true if the entity is in between the minimum and maximum values for the 2d screen coords.
/// This means that it will return true even if the entity is behind a wall for example, as long as you're looking at their location.
/// Chipping
pub fn IS_ENTITY_ON_SCREEN(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16598549118451140683)), entity);
}
/// See also PED::IS_SCRIPTED_SCENARIO_PED_USING_CONDITIONAL_ANIM 0x6EC47A344923E1ED 0x3C30B447
/// Taken from ENTITY::IS_ENTITY_PLAYING_ANIM(PLAYER::PLAYER_PED_ID(), "creatures@shark@move", "attack_player", 3)
/// p4 is always 3 in the scripts.
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
pub fn IS_ENTITY_PLAYING_ANIM(entity: types.Entity, animDict: [*c]const u8, animName: [*c]const u8, taskFlag: c_int) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(2237014829242392265)), entity, animDict, animName, taskFlag);
}
/// a static ped will not react to natives like "APPLY_FORCE_TO_ENTITY" or "SET_ENTITY_VELOCITY" and oftentimes will not react to task-natives like "TASK::TASK_COMBAT_PED". The only way I know of to make one of these peds react is to ragdoll them (or sometimes to use CLEAR_PED_TASKS_IMMEDIATELY(). Static peds include almost all far-away peds, beach-combers, peds in certain scenarios, peds crossing a crosswalk, peds walking to get back into their cars, and others. If anyone knows how to make a ped non-static without ragdolling them, please edit this with the solution.
/// how can I make an entity static???
pub fn IS_ENTITY_STATIC(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1304045565746447143)), entity);
}
pub fn IS_ENTITY_TOUCHING_ENTITY(entity: types.Entity, targetEntity: types.Entity) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(1729313755305976980)), entity, targetEntity);
}
pub fn IS_ENTITY_TOUCHING_MODEL(entity: types.Entity, modelHash: types.Hash) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(1099496473397398668)), entity, modelHash);
}
pub fn IS_ENTITY_UPRIGHT(entity: types.Entity, angle: f32) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5995405076656232874)), entity, angle);
}
pub fn IS_ENTITY_UPSIDEDOWN(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2142966313329761649)), entity);
}
pub fn IS_ENTITY_VISIBLE(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5176593366545292405)), entity);
}
pub fn IS_ENTITY_VISIBLE_TO_SCRIPT(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15534827559198002738)), entity);
}
pub fn IS_ENTITY_OCCLUDED(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16365004017189333860)), entity);
}
pub fn WOULD_ENTITY_BE_OCCLUDED(entityModelHash: types.Hash, x: f32, y: f32, z: f32, p4: windows.BOOL) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(17175930811431119938)), entityModelHash, x, y, z, p4);
}
pub fn IS_ENTITY_WAITING_FOR_WORLD_COLLISION(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15013874209943373455)), entity);
}
/// Applies a force to the specified entity.
/// **List of force types (p1)**:
/// public enum ForceType
/// {
/// MinForce = 0,
/// MaxForceRot = 1,
/// MinForce2 = 2,
/// MaxForceRot2 = 3,
/// ForceNoRot = 4,
/// ForceRotPlusForce = 5
/// }
/// Research/documentation on the gtaforums can be found here https://gtaforums.com/topic/885669-precisely-define-object-physics/) and here https://gtaforums.com/topic/887362-apply-forces-and-momentums-to-entityobject/.
/// p6/relative - makes the xyz force not relative to world coords, but to something else
/// p7/highForce - setting false will make the force really low
pub fn APPLY_FORCE_TO_ENTITY_CENTER_OF_MASS(entity: types.Entity, forceType: c_int, x: f32, y: f32, z: f32, p5: windows.BOOL, isDirectionRel: windows.BOOL, isForceRel: windows.BOOL, p8: windows.BOOL) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(1801159460433909150)), entity, forceType, x, y, z, p5, isDirectionRel, isForceRel, p8);
}
/// Documented here:
/// gtaforums.com/topic/885669-precisely-define-object-physics/
/// gtaforums.com/topic/887362-apply-forces-and-momentums-to-entityobject/
/// forceFlags:
/// First bit (lowest): Strong force flag, factor 100
/// Second bit: Unkown flag
/// Third bit: Momentum flag=1 (vector (x,y,z) is a momentum, more research needed)
/// If higher bits are unequal 0 the function doesn't applay any forces at all.
/// (As integer possible values are 0-7)
/// 0: weak force
/// 1: strong force
/// 2: same as 0 (2nd bit?)
/// 3: same as 1
/// 4: weak momentum
/// 5: strong momentum
/// 6: same as 4
/// 7: same as 5
/// isLocal: vector defined in local (body-fixed) coordinate frame
/// isMassRel: if true the force gets multiplied with the objects mass (this is why it was known as highForce) and different objects will have the same acceleration.
/// p8 !!! Whenever I set this !=0, my script stopped.
pub fn APPLY_FORCE_TO_ENTITY(entity: types.Entity, forceFlags: c_int, x: f32, y: f32, z: f32, offX: f32, offY: f32, offZ: f32, boneIndex: c_int, isDirectionRel: windows.BOOL, ignoreUpVec: windows.BOOL, isForceRel: windows.BOOL, p12: windows.BOOL, p13: windows.BOOL) void {
_ = nativeCaller.invoke14(@as(u64, @intCast(14264742704217730328)), entity, forceFlags, x, y, z, offX, offY, offZ, boneIndex, isDirectionRel, ignoreUpVec, isForceRel, p12, p13);
}
/// Attaches entity1 to bone (boneIndex) of entity2.
/// boneIndex - this is different to boneID, use GET_PED_BONE_INDEX to get the index from the ID. use the index for attaching to specific bones. entity1 will be attached to entity2's centre if bone index given doesn't correspond to bone indexes for that entity type.
/// useSoftPinning - if set to false attached entity will not detach when fixed
/// collision - controls collision between the two entities (FALSE disables collision).
/// isPed - pitch doesnt work when false and roll will only work on negative numbers (only peds)
/// vertexIndex - position of vertex
/// fixedRot - if false it ignores entity vector
pub fn ATTACH_ENTITY_TO_ENTITY(entity1: types.Entity, entity2: types.Entity, boneIndex: c_int, xPos: f32, yPos: f32, zPos: f32, xRot: f32, yRot: f32, zRot: f32, p9: windows.BOOL, useSoftPinning: windows.BOOL, collision: windows.BOOL, isPed: windows.BOOL, vertexIndex: c_int, fixedRot: windows.BOOL, p15: types.Any) void {
_ = nativeCaller.invoke16(@as(u64, @intCast(7753999234533660383)), entity1, entity2, boneIndex, xPos, yPos, zPos, xRot, yRot, zRot, p9, useSoftPinning, collision, isPed, vertexIndex, fixedRot, p15);
}
/// Used to be known as _ATTACH_ENTITY_BONE_TO_ENTITY_BONE
pub fn ATTACH_ENTITY_BONE_TO_ENTITY_BONE(entity1: types.Entity, entity2: types.Entity, boneIndex1: c_int, boneIndex2: c_int, p4: windows.BOOL, p5: windows.BOOL) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(6649766434954560876)), entity1, entity2, boneIndex1, boneIndex2, p4, p5);
}
/// Used to be known as _ATTACH_ENTITY_BONE_TO_ENTITY_BONE_PHYSICALLY
pub fn ATTACH_ENTITY_BONE_TO_ENTITY_BONE_Y_FORWARD(entity1: types.Entity, entity2: types.Entity, boneIndex1: c_int, boneIndex2: c_int, p4: windows.BOOL, p5: windows.BOOL) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(18236928417976046649)), entity1, entity2, boneIndex1, boneIndex2, p4, p5);
}
/// breakForce is the amount of force required to break the bond.
/// p14 - is always 1 in scripts
/// p15 - is 1 or 0 in scripts - unknoun what it does
/// p16 - controls collision between the two entities (FALSE disables collision).
/// p17 - do not teleport entity to be attached to the position of the bone Index of the target entity (if 1, entity will not be teleported to target bone)
/// p18 - is always 2 in scripts.
pub fn ATTACH_ENTITY_TO_ENTITY_PHYSICALLY(entity1: types.Entity, entity2: types.Entity, boneIndex1: c_int, boneIndex2: c_int, xPos1: f32, yPos1: f32, zPos1: f32, xPos2: f32, yPos2: f32, zPos2: f32, xRot: f32, yRot: f32, zRot: f32, breakForce: f32, fixedRot: windows.BOOL, p15: windows.BOOL, collision: windows.BOOL, p17: windows.BOOL, p18: c_int) void {
_ = nativeCaller.invoke19(@as(u64, @intCast(14080318970639913209)), entity1, entity2, boneIndex1, boneIndex2, xPos1, yPos1, zPos1, xPos2, yPos2, zPos2, xRot, yRot, zRot, breakForce, fixedRot, p15, collision, p17, p18);
}
pub fn ATTACH_ENTITY_TO_ENTITY_PHYSICALLY_OVERRIDE_INVERSE_MASS(firstEntityIndex: types.Entity, secondEntityIndex: types.Entity, firstEntityBoneIndex: c_int, secondEntityBoneIndex: c_int, secondEntityOffsetX: f32, secondEntityOffsetY: f32, secondEntityOffsetZ: f32, firstEntityOffsetX: f32, firstEntityOffsetY: f32, firstEntityOffsetZ: f32, vecRotationX: f32, vecRotationY: f32, vecRotationZ: f32, physicalStrength: f32, constrainRotation: windows.BOOL, doInitialWarp: windows.BOOL, collideWithEntity: windows.BOOL, addInitialSeperation: windows.BOOL, rotOrder: c_int, invMassScaleA: f32, invMassScaleB: f32) void {
_ = nativeCaller.invoke21(@as(u64, @intCast(1624121411865611172)), firstEntityIndex, secondEntityIndex, firstEntityBoneIndex, secondEntityBoneIndex, secondEntityOffsetX, secondEntityOffsetY, secondEntityOffsetZ, firstEntityOffsetX, firstEntityOffsetY, firstEntityOffsetZ, vecRotationX, vecRotationY, vecRotationZ, physicalStrength, constrainRotation, doInitialWarp, collideWithEntity, addInitialSeperation, rotOrder, invMassScaleA, invMassScaleB);
}
/// Called to update entity attachments.
pub fn PROCESS_ENTITY_ATTACHMENTS(entity: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17584309764505279599)), entity);
}
/// Returns the index of the bone. If the bone was not found, -1 will be returned.
/// list:
/// https://pastebin.com/D7JMnX1g
/// BoneNames:
/// chassis,
/// windscreen,
/// seat_pside_r,
/// seat_dside_r,
/// bodyshell,
/// suspension_lm,
/// suspension_lr,
/// platelight,
/// attach_female,
/// attach_male,
/// bonnet,
/// boot,
/// chassis_dummy, //Center of the dummy
/// chassis_Control, //Not found yet
/// door_dside_f, //Door left, front
/// door_dside_r, //Door left, back
/// door_pside_f, //Door right, front
/// door_pside_r, //Door right, back
/// Gun_GripR,
/// windscreen_f,
/// platelight, //Position where the light above the numberplate is located
/// VFX_Emitter,
/// window_lf, //Window left, front
/// window_lr, //Window left, back
/// window_rf, //Window right, front
/// window_rr, //Window right, back
/// engine, //Position of the engine
/// gun_ammo,
/// ROPE_ATTATCH, //Not misspelled. In script "finale_heist2b.c4".
/// wheel_lf, //Wheel left, front
/// wheel_lr, //Wheel left, back
/// wheel_rf, //Wheel right, front
/// wheel_rr, //Wheel right, back
/// exhaust, //Exhaust. shows only the position of the stock-exhaust
/// overheat, //A position on the engine(not exactly sure, how to name it)
/// misc_e, //Not a car-bone.
/// seat_dside_f, //Driver-seat
/// seat_pside_f, //Seat next to driver
/// Gun_Nuzzle,
/// seat_r
/// I doubt that the function is case-sensitive, since I found a "Chassis" and a "chassis". - Just tested: Definitely not case-sensitive.
pub fn GET_ENTITY_BONE_INDEX_BY_NAME(entity: types.Entity, boneName: [*c]const u8) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(18118288114022001850)), entity, boneName);
}
pub fn CLEAR_ENTITY_LAST_DAMAGE_ENTITY(entity: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12046242566872886458)), entity);
}
/// Deletes the specified entity, then sets the handle pointed to by the pointer to NULL.
pub fn DELETE_ENTITY(entity: [*c]types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12555119163340016073)), entity);
}
/// If `collision` is set to true, both entities won't collide with the other until the distance between them is above 4 meters.
/// Set `dynamic` to true to keep velocity after dettaching
pub fn DETACH_ENTITY(entity: types.Entity, dynamic: windows.BOOL, collision: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(10816174385029791581)), entity, dynamic, collision);
}
/// Freezes or unfreezes an entity preventing its coordinates to change by the player if set to `true`. You can still change the entity position using SET_ENTITY_COORDS.
pub fn FREEZE_ENTITY_POSITION(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4795391166277829702)), entity, toggle);
}
/// True means it can be deleted by the engine when switching lobbies/missions/etc, false means the script is expected to clean it up.
/// "Allow Freeze If No Collision"
/// Used to be known as _SET_ENTITY_REGISTER
/// Used to be known as _SET_ENTITY_SOMETHING
/// Used to be known as _SET_ENTITY_CLEANUP_BY_ENGINE
pub fn SET_ENTITY_SHOULD_FREEZE_WAITING_ON_COLLISION(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4111792081076072460)), entity, toggle);
}
/// delta and bitset are guessed fields. They are based on the fact that most of the calls have 0 or nil field types passed in.
/// The only time bitset has a value is 0x4000 and the only time delta has a value is during stealth with usually <1.0f values.
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
pub fn PLAY_ENTITY_ANIM(entity: types.Entity, animName: [*c]const u8, animDict: [*c]const u8, p3: f32, loop: windows.BOOL, stayInAnim: windows.BOOL, p6: windows.BOOL, delta: f32, bitset: types.Any) windows.BOOL {
return nativeCaller.invoke9(@as(u64, @intCast(9201443540889044737)), entity, animName, animDict, p3, loop, stayInAnim, p6, delta, bitset);
}
/// p4 and p7 are usually 1000.0f.
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
pub fn PLAY_SYNCHRONIZED_ENTITY_ANIM(entity: types.Entity, syncedScene: c_int, animation: [*c]const u8, propName: [*c]const u8, p4: f32, p5: f32, p6: types.Any, p7: f32) windows.BOOL {
return nativeCaller.invoke8(@as(u64, @intCast(14372992612441344646)), entity, syncedScene, animation, propName, p4, p5, p6, p7);
}
/// p6,p7 probably animname and animdict
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
pub fn PLAY_SYNCHRONIZED_MAP_ENTITY_ANIM(x1: f32, y1: f32, z1: f32, x2: f32, y2: types.Any, z2: f32, p6: [*c]const u8, p7: [*c]const u8, p8: f32, p9: f32, p10: types.Any, p11: f32) windows.BOOL {
return nativeCaller.invoke12(@as(u64, @intCast(13386181702782614468)), x1, y1, z1, x2, y2, z2, p6, p7, p8, p9, p10, p11);
}
pub fn STOP_SYNCHRONIZED_MAP_ENTITY_ANIM(x1: f32, y1: f32, z1: f32, x2: f32, y2: types.Any, z2: f32) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(1290172078422734581)), x1, y1, z1, x2, y2, z2);
}
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
/// RAGEPluginHook list: docs.ragepluginhook.net/html/62951c37-a440-478c-b389-c471230ddfc5.htm
pub fn STOP_ENTITY_ANIM(entity: types.Entity, animation: [*c]const u8, animGroup: [*c]const u8, p3: f32) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(2882391207405552608)), entity, animation, animGroup, p3);
}
/// p1 sync task id?
pub fn STOP_SYNCHRONIZED_ENTITY_ANIM(entity: types.Entity, p1: f32, p2: windows.BOOL) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(4887391290816356835)), entity, p1, p2);
}
/// if (ENTITY::HAS_ANIM_EVENT_FIRED(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("CreateObject")))
pub fn HAS_ANIM_EVENT_FIRED(entity: types.Entity, actionHash: types.Hash) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(16930382980430948642)), entity, actionHash);
}
/// In the script "player_scene_t_bbfight.c4":
/// "if (ENTITY::FIND_ANIM_EVENT_PHASE(&l_16E, &l_19F[v_4/*16*/], v_9, &v_A, &v_B))"
/// -- &l_16E (p0) is requested as an anim dictionary earlier in the script.
/// -- &l_19F[v_4/*16*/] (p1) is used in other natives in the script as the "animation" param.
/// -- v_9 (p2) is instantiated as "victim_fall"; I'm guessing that's another anim
/// --v_A and v_B (p3 & p4) are both set as -1.0, but v_A is used immediately after this native for:
/// "if (v_A < ENTITY::GET_ENTITY_ANIM_CURRENT_TIME(...))"
/// Both v_A and v_B are seemingly used to contain both Vector3's and floats, so I can't say what either really is other than that they are both output parameters. p4 looks more like a *Vector3 though
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
pub fn FIND_ANIM_EVENT_PHASE(animDictionary: [*c]const u8, animName: [*c]const u8, p2: [*c]const u8, p3: [*c]types.Any, p4: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(572447722979338151)), animDictionary, animName, p2, p3, p4);
}
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
pub fn SET_ENTITY_ANIM_CURRENT_TIME(entity: types.Entity, animDictionary: [*c]const u8, animName: [*c]const u8, time: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(4938129207985637751)), entity, animDictionary, animName, time);
}
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
pub fn SET_ENTITY_ANIM_SPEED(entity: types.Entity, animDictionary: [*c]const u8, animName: [*c]const u8, speedMultiplier: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(2941309488218838902)), entity, animDictionary, animName, speedMultiplier);
}
/// Makes the specified entity (ped, vehicle or object) persistent. Persistent entities will not automatically be removed by the engine.
/// p1 has no effect when either its on or off
/// maybe a quick disassembly will tell us what it does
/// p2 has no effect when either its on or off
/// maybe a quick disassembly will tell us what it does
pub fn SET_ENTITY_AS_MISSION_ENTITY(entity: types.Entity, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(12498487530917625361)), entity, p1, p2);
}
/// Marks the specified entity (ped, vehicle or object) as no longer needed if its population type is set to the mission type.
/// If the entity is ped, it will also clear their tasks immediately just like when CLEAR_PED_TASKS_IMMEDIATELY is called.
/// Entities marked as no longer needed, will be deleted as the engine sees fit.
/// Use this if you just want to just let the game delete the ped:
/// void MarkPedAsAmbientPed(Ped ped) {
/// auto addr = getScriptHandleBaseAddress(ped);
/// if (!addr) {
/// return;
/// }
/// //the game uses only lower 4 bits as entity population type
/// BYTE origValue = *(BYTE *)(addr + 0xDA);
/// *(BYTE *)(addr + 0xDA) = ((origValue & 0xF0) | ePopulationType::POPTYPE_RANDOM_AMBIENT);
/// }
pub fn SET_ENTITY_AS_NO_LONGER_NEEDED(entity: [*c]types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13201920304224023247)), entity);
}
/// This is an alias of SET_ENTITY_AS_NO_LONGER_NEEDED.
pub fn SET_PED_AS_NO_LONGER_NEEDED(ped: [*c]types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2708314027382316259)), ped);
}
/// This is an alias of SET_ENTITY_AS_NO_LONGER_NEEDED.
pub fn SET_VEHICLE_AS_NO_LONGER_NEEDED(vehicle: [*c]types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7105548214330024505)), vehicle);
}
/// This is an alias of SET_ENTITY_AS_NO_LONGER_NEEDED.
pub fn SET_OBJECT_AS_NO_LONGER_NEEDED(object: [*c]types.Object) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4243004287814575078)), object);
}
pub fn SET_ENTITY_CAN_BE_DAMAGED(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1684627360525536614)), entity, toggle);
}
/// Used to be known as _GET_ENTITY_CAN_BE_DAMAGED
pub fn GET_ENTITY_CAN_BE_DAMAGED(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15662611112691867807)), entity);
}
pub fn SET_ENTITY_CAN_BE_DAMAGED_BY_RELATIONSHIP_GROUP(entity: types.Entity, bCanBeDamaged: windows.BOOL, relGroup: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(16297840812409717017)), entity, bCanBeDamaged, relGroup);
}
pub fn SET_ENTITY_CAN_ONLY_BE_DAMAGED_BY_SCRIPT_PARTICIPANTS(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3832048011171643195)), entity, toggle);
}
/// Sets whether the entity can be targeted without being in line-of-sight.
pub fn SET_ENTITY_CAN_BE_TARGETED_WITHOUT_LOS(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15247350545182087321)), entity, toggle);
}
pub fn SET_ENTITY_COLLISION(entity: types.Entity, toggle: windows.BOOL, keepPhysics: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(1914599121192125055)), entity, toggle, keepPhysics);
}
/// Used to be known as _GET_ENTITY_COLLISON_DISABLED
pub fn GET_ENTITY_COLLISION_DISABLED(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14767841371638916224)), entity);
}
/// Used to be known as _SET_ENTITY_COLLISION_2
pub fn SET_ENTITY_COMPLETELY_DISABLE_COLLISION(entity: types.Entity, toggle: windows.BOOL, keepPhysics: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(11438164406836389148)), entity, toggle, keepPhysics);
}
/// p7 is always 1 in the scripts. Set to 1, an area around the destination coords for the moved entity is cleared from other entities.
///
/// Often ends with 1, 0, 0, 1); in the scripts. It works.
/// Axis - Invert Axis Flags
pub fn SET_ENTITY_COORDS(entity: types.Entity, xPos: f32, yPos: f32, zPos: f32, xAxis: windows.BOOL, yAxis: windows.BOOL, zAxis: windows.BOOL, clearArea: windows.BOOL) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(469568048723526251)), entity, xPos, yPos, zPos, xAxis, yAxis, zAxis, clearArea);
}
/// Used to be known as _SET_ENTITY_COORDS_2
pub fn SET_ENTITY_COORDS_WITHOUT_PLANTS_RESET(entity: types.Entity, xPos: f32, yPos: f32, zPos: f32, alive: windows.BOOL, deadFlag: windows.BOOL, ragdollFlag: windows.BOOL, clearArea: windows.BOOL) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(7068527076383885671)), entity, xPos, yPos, zPos, alive, deadFlag, ragdollFlag, clearArea);
}
/// Axis - Invert Axis Flags
pub fn SET_ENTITY_COORDS_NO_OFFSET(entity: types.Entity, xPos: f32, yPos: f32, zPos: f32, xAxis: windows.BOOL, yAxis: windows.BOOL, zAxis: windows.BOOL) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(2565419363613909893)), entity, xPos, yPos, zPos, xAxis, yAxis, zAxis);
}
pub fn SET_ENTITY_DYNAMIC(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1664324764839715786)), entity, toggle);
}
/// Set the heading of an entity in degrees also known as "Yaw".
pub fn SET_ENTITY_HEADING(entity: types.Entity, heading: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10242646436556216334)), entity, heading);
}
/// health >= 0
/// male ped ~= 100 - 200
/// female ped ~= 0 - 100
pub fn SET_ENTITY_HEALTH(entity: types.Entity, health: c_int, instigator: types.Entity, weaponType: types.Hash) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(7743618636000454307)), entity, health, instigator, weaponType);
}
/// Sets a ped or an object totally invincible. It doesn't take any kind of damage. Peds will not ragdoll on explosions and the tazer animation won't apply either.
/// If you use this for a ped and you want Ragdoll to stay enabled, then do:
/// *(DWORD *)(pedAddress + 0x188) |= (1 << 9);
/// Use this if you want to get the invincibility status:
/// bool IsPedInvincible(Ped ped)
/// {
/// auto addr = getScriptHandleBaseAddress(ped);
/// if (addr)
/// {
/// DWORD flag = *(DWORD *)(addr + 0x188);
/// return ((flag & (1 << 8)) != 0) || ((flag & (1 << 9)) != 0);
/// }
/// return false;
/// }
pub fn SET_ENTITY_INVINCIBLE(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4071836030646819540)), entity, toggle);
}
pub fn SET_ENTITY_IS_TARGET_PRIORITY(entity: types.Entity, p1: windows.BOOL, p2: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(16862287563816601378)), entity, p1, p2);
}
pub fn SET_ENTITY_LIGHTS(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9005975120541333620)), entity, toggle);
}
/// Loads collision grid for an entity spawned outside of a player's loaded area. This allows peds to execute tasks rather than sit dormant because of a lack of a physics grid.
/// Certainly not the main usage of this native but when set to true for a Vehicle, it will prevent the vehicle to explode if it is spawned far away from the player.
pub fn SET_ENTITY_LOAD_COLLISION_FLAG(entity: types.Entity, toggle: windows.BOOL, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(992985146056095358)), entity, toggle, p2);
}
pub fn HAS_COLLISION_LOADED_AROUND_ENTITY(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16818533798995768097)), entity);
}
pub fn SET_ENTITY_MAX_SPEED(entity: types.Entity, speed: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1028689870813569457)), entity, speed);
}
pub fn SET_ENTITY_ONLY_DAMAGED_BY_PLAYER(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8786559155253806920)), entity, toggle);
}
pub fn SET_ENTITY_ONLY_DAMAGED_BY_RELATIONSHIP_GROUP(entity: types.Entity, p1: windows.BOOL, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(8080229049909162114)), entity, p1, p2);
}
/// Enable / disable each type of damage.
/// waterProof is damage related to water not drowning
/// --------------
/// p7 is to to '1' in am_mp_property_ext/int: ENTITY::SET_ENTITY_PROOFS(uParam0->f_19, true, true, true, true, true, true, 1, true);
pub fn SET_ENTITY_PROOFS(entity: types.Entity, bulletProof: windows.BOOL, fireProof: windows.BOOL, explosionProof: windows.BOOL, collisionProof: windows.BOOL, meleeProof: windows.BOOL, steamProof: windows.BOOL, p7: windows.BOOL, waterProof: windows.BOOL) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(18081400121429920696)), entity, bulletProof, fireProof, explosionProof, collisionProof, meleeProof, steamProof, p7, waterProof);
}
/// Used to be known as _GET_ENTITY_PROOFS
pub fn GET_ENTITY_PROOFS(entity: types.Entity, bulletProof: [*c]windows.BOOL, fireProof: [*c]windows.BOOL, explosionProof: [*c]windows.BOOL, collisionProof: [*c]windows.BOOL, meleeProof: [*c]windows.BOOL, steamProof: [*c]windows.BOOL, p7: [*c]windows.BOOL, drownProof: [*c]windows.BOOL) windows.BOOL {
return nativeCaller.invoke9(@as(u64, @intCast(13730588776204058303)), entity, bulletProof, fireProof, explosionProof, collisionProof, meleeProof, steamProof, p7, drownProof);
}
/// w is the correct parameter name!
pub fn SET_ENTITY_QUATERNION(entity: types.Entity, x: f32, y: f32, z: f32, w: f32) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(8624986918210506503)), entity, x, y, z, w);
}
pub fn SET_ENTITY_RECORDS_COLLISIONS(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(743271985761492581)), entity, toggle);
}
/// rotationOrder refers to the order yaw pitch roll is applied
/// value ranges from 0 to 5. What you use for rotationOrder when setting must be the same as rotationOrder when getting the rotation.
/// Unsure what value corresponds to what rotation order, more testing will be needed for that.
/// For the most part R* uses 1 or 2 as the order.
/// p5 is usually set as true
pub fn SET_ENTITY_ROTATION(entity: types.Entity, pitch: f32, roll: f32, yaw: f32, rotationOrder: c_int, p5: windows.BOOL) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(9593978580461510151)), entity, pitch, roll, yaw, rotationOrder, p5);
}
/// p2 is always 0.
pub fn SET_ENTITY_VISIBLE(entity: types.Entity, toggle: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(16869464999882091451)), entity, toggle, p2);
}
pub fn SET_ENTITY_WATER_REFLECTION_FLAG(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14072557277826119145)), entity, toggle);
}
pub fn SET_ENTITY_MIRROR_REFLECTION_FLAG(entity: types.Entity, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16601244377441519632)), entity, p1);
}
/// Note that the third parameter(denoted as z) is "up and down" with positive numbers encouraging upwards movement.
pub fn SET_ENTITY_VELOCITY(entity: types.Entity, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(2060884443309461871)), entity, x, y, z);
}
/// Used to be known as _SET_ENTITY_ANGULAR_VELOCITY
pub fn SET_ENTITY_ANGULAR_VELOCITY(entity: types.Entity, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(9455699069722763822)), entity, x, y, z);
}
pub fn SET_ENTITY_HAS_GRAVITY(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5352284360007020277)), entity, toggle);
}
/// LOD distance can be 0 to 0xFFFF (higher values will result in 0xFFFF) as it is actually stored as a 16-bit value (aka uint16_t).
pub fn SET_ENTITY_LOD_DIST(entity: types.Entity, value: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6424377629148148579)), entity, value);
}
/// Returns the LOD distance of an entity.
pub fn GET_ENTITY_LOD_DIST(entity: types.Entity) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(4709008698181652950)), entity);
}
/// skin - everything alpha except skin
/// Set entity alpha level. Ranging from 0 to 255 but chnages occur after every 20 percent (after every 51).
pub fn SET_ENTITY_ALPHA(entity: types.Entity, alphaLevel: c_int, skin: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(4945100874290747328)), entity, alphaLevel, skin);
}
pub fn GET_ENTITY_ALPHA(entity: types.Entity) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(6505365780593284294)), entity);
}
pub fn RESET_ENTITY_ALPHA(entity: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11177514605217251962)), entity);
}
/// Similar to RESET_ENTITY_ALPHA
pub fn RESET_PICKUP_ENTITY_GLOW(entity: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5262563609888675910)), entity);
}
pub fn SET_PICKUP_COLLIDES_WITH_PROJECTILES(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14891091564646364812)), p0, p1);
}
/// Only called once in the scripts.
/// Related to weapon objects.
pub fn SET_ENTITY_SORT_BIAS(entity: types.Entity, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6646038842053626818)), entity, p1);
}
pub fn SET_ENTITY_ALWAYS_PRERENDER(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12442619067061659273)), entity, toggle);
}
pub fn SET_ENTITY_RENDER_SCORCHED(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8290950499265355856)), entity, toggle);
}
/// Example here: www.gtaforums.com/topic/830463-help-with-turning-lights-green-and-causing-peds-to-crash-into-each-other/#entry1068211340
/// 0 = green
/// 1 = red
/// 2 = yellow
/// 3 = reset changes
/// changing lights may not change the behavior of vehicles
pub fn SET_ENTITY_TRAFFICLIGHT_OVERRIDE(entity: types.Entity, state: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6324702480186075844)), entity, state);
}
pub fn SET_ENTITY_IS_IN_VEHICLE(entity: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8712463782327583317)), entity);
}
/// Only works with objects!
pub fn CREATE_MODEL_SWAP(x: f32, y: f32, z: f32, radius: f32, originalModel: types.Hash, newModel: types.Hash, p6: windows.BOOL) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(10575709229457912483)), x, y, z, radius, originalModel, newModel, p6);
}
pub fn REMOVE_MODEL_SWAP(x: f32, y: f32, z: f32, radius: f32, originalModel: types.Hash, newModel: types.Hash, p6: windows.BOOL) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(233078436508346798)), x, y, z, radius, originalModel, newModel, p6);
}
/// p5 = sets as true in scripts
/// Same as the comment for CREATE_MODEL_SWAP unless for some reason p5 affects it this only works with objects as well.
/// Network players do not see changes done with this.
pub fn CREATE_MODEL_HIDE(x: f32, y: f32, z: f32, radius: f32, modelHash: types.Hash, p5: windows.BOOL) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(9986658107151672440)), x, y, z, radius, modelHash, p5);
}
pub fn CREATE_MODEL_HIDE_EXCLUDING_SCRIPT_OBJECTS(x: f32, y: f32, z: f32, radius: f32, modelHash: types.Hash, p5: windows.BOOL) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(4202613097555345279)), x, y, z, radius, modelHash, p5);
}
/// This native makes entities visible that are hidden by the native CREATE_MODEL_HIDE.
/// p5 should be false, true does nothing
pub fn REMOVE_MODEL_HIDE(x: f32, y: f32, z: f32, radius: f32, modelHash: types.Hash, p5: windows.BOOL) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(15700393205701531493)), x, y, z, radius, modelHash, p5);
}
pub fn CREATE_FORCED_OBJECT(x: f32, y: f32, z: f32, p3: types.Any, modelHash: types.Hash, p5: windows.BOOL) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(1517291459887904858)), x, y, z, p3, modelHash, p5);
}
pub fn REMOVE_FORCED_OBJECT(x: f32, y: f32, z: f32, p3: f32, modelHash: types.Hash) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(7040946315261434735)), x, y, z, p3, modelHash);
}
/// Calling this function disables collision between two entities.
/// The importance of the order for entity1 and entity2 is unclear.
/// The third parameter, `thisFrame`, decides whether the collision is to be disabled until it is turned back on, or if it's just this frame.
pub fn SET_ENTITY_NO_COLLISION_ENTITY(entity1: types.Entity, entity2: types.Entity, thisFrameOnly: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(11907189013180015946)), entity1, entity2, thisFrameOnly);
}
pub fn SET_ENTITY_MOTION_BLUR(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2980682187891773776)), entity, toggle);
}
/// p1 always false.
pub fn SET_CAN_AUTO_VAULT_ON_ENTITY(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16224989919468624492)), entity, toggle);
}
/// p1 always false.
pub fn SET_CAN_CLIMB_ON_ENTITY(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12108740162522121295)), entity, toggle);
}
/// Only called within 1 script for x360. 'fm_mission_controller' and it used on an object.
/// Ran after these 2 natives,
/// set_object_targettable(uParam0, 0);
/// set_entity_invincible(uParam0, 1);
pub fn SET_WAIT_FOR_COLLISIONS_BEFORE_PROBE(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15884061753822341267)), entity, toggle);
}
/// Used to be known as _SET_ENTITY_DECALS_DISABLED
pub fn SET_ENTITY_NOWEAPONDECALS(entity: types.Entity, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3183549886422598409)), entity, p1);
}
pub fn SET_ENTITY_USE_MAX_DISTANCE_FOR_WATER_REFLECTION(entity: types.Entity, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1876078757970742166)), entity, p1);
}
/// Gets the world rotation of the specified bone of the specified entity.
/// Used to be known as _GET_WORLD_ROTATION_OF_ENTITY_BONE
/// Used to be known as _GET_ENTITY_BONE_ROTATION
pub fn GET_ENTITY_BONE_ROTATION(entity: types.Entity, boneIndex: c_int) types.Vector3 {
return nativeCaller.invoke2(@as(u64, @intCast(14871612343888918406)), entity, boneIndex);
}
/// Gets the world position of the specified bone of the specified entity.
/// Used to be known as _GET_WORLD_POSITION_OF_ENTITY_BONE_2
/// Used to be known as _GET_ENTITY_BONE_POSITION_2
pub fn GET_ENTITY_BONE_POSTION(entity: types.Entity, boneIndex: c_int) types.Vector3 {
return nativeCaller.invoke2(@as(u64, @intCast(5113953277438213275)), entity, boneIndex);
}
/// Gets the local rotation of the specified bone of the specified entity.
/// Used to be known as _GET_ENTITY_BONE_ROTATION_LOCAL
pub fn GET_ENTITY_BONE_OBJECT_ROTATION(entity: types.Entity, boneIndex: c_int) types.Vector3 {
return nativeCaller.invoke2(@as(u64, @intCast(13658628585779162110)), entity, boneIndex);
}
pub fn GET_ENTITY_BONE_OBJECT_POSTION(entity: types.Entity, boneIndex: c_int) types.Vector3 {
return nativeCaller.invoke2(@as(u64, @intCast(14921067459188760534)), entity, boneIndex);
}
/// Used to be known as _GET_ENTITY_BONE_COUNT
pub fn GET_ENTITY_BONE_COUNT(entity: types.Entity) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(12909811064680103963)), entity);
}
/// Used to be known as _ENABLE_ENTITY_UNK
pub fn ENABLE_ENTITY_BULLET_COLLISION(entity: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7845683761433816714)), entity);
}
pub fn SET_ENTITY_CAN_ONLY_BE_DAMAGED_BY_ENTITY(entity1: types.Entity, entity2: types.Entity) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12789033567567803820)), entity1, entity2);
}
pub fn SET_ENTITY_CANT_CAUSE_COLLISION_DAMAGED_ENTITY(entity1: types.Entity, entity2: types.Entity) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7545045469853649647)), entity1, entity2);
}
/// p1 is always set to 1
pub fn SET_ALLOW_MIGRATE_TO_SPECTATOR(entity: types.Entity, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3959558973732041790)), entity, p1);
}
/// Gets the handle of an entity with a specific model hash attached to another entity, such as an object attached to a ped.
/// This native does not appear to have anything to do with pickups as in scripts it is used with objects.
/// Example from fm_mission_controller_2020.c:
/// iVar8 = ENTITY::GET_ENTITY_OF_TYPE_ATTACHED_TO_ENTITY(bParam0->f_9, joaat("p_cs_clipboard"));
/// Used to be known as _GET_ENTITY_ATTACHED_TO_WITH_HASH
pub fn GET_ENTITY_OF_TYPE_ATTACHED_TO_ENTITY(entity: types.Entity, modelHash: types.Hash) types.Entity {
return nativeCaller.invoke2(@as(u64, @intCast(2274923869864836390)), entity, modelHash);
}
pub fn SET_PICK_UP_BY_CARGOBOB_DISABLED(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15544190040613569430)), entity, toggle);
}
};
pub const EVENT = struct {
pub fn SET_DECISION_MAKER(ped: types.Ped, name: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13115786772067832046)), ped, name);
}
/// eventType: https://alloc8or.re/gta5/doc/enums/eEventType.txt
pub fn CLEAR_DECISION_MAKER_EVENT_RESPONSE(name: types.Hash, eventType: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5749188085697907048)), name, eventType);
}
/// eventType: https://alloc8or.re/gta5/doc/enums/eEventType.txt
/// This is limited to 4 blocked events at a time.
pub fn BLOCK_DECISION_MAKER_EVENT(name: types.Hash, eventType: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16442587251302569719)), name, eventType);
}
/// eventType: https://alloc8or.re/gta5/doc/enums/eEventType.txt
pub fn UNBLOCK_DECISION_MAKER_EVENT(name: types.Hash, eventType: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15550257657199499752)), name, eventType);
}
/// eventType: https://alloc8or.re/gta5/doc/enums/eEventType.txt
pub fn ADD_SHOCKING_EVENT_AT_POSITION(eventType: c_int, x: f32, y: f32, z: f32, duration: f32) c_int {
return nativeCaller.invoke5(@as(u64, @intCast(15706379927697040873)), eventType, x, y, z, duration);
}
/// eventType: https://alloc8or.re/gta5/doc/enums/eEventType.txt
pub fn ADD_SHOCKING_EVENT_FOR_ENTITY(eventType: c_int, entity: types.Entity, duration: f32) c_int {
return nativeCaller.invoke3(@as(u64, @intCast(9212381037151687714)), eventType, entity, duration);
}
/// eventType: https://alloc8or.re/gta5/doc/enums/eEventType.txt
pub fn IS_SHOCKING_EVENT_IN_SPHERE(eventType: c_int, x: f32, y: f32, z: f32, radius: f32) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(1401934189730442130)), eventType, x, y, z, radius);
}
pub fn REMOVE_SHOCKING_EVENT(event: types.ScrHandle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3231987544506158309)), event);
}
pub fn REMOVE_ALL_SHOCKING_EVENTS(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16909865403413505868)), p0);
}
pub fn REMOVE_SHOCKING_EVENT_SPAWN_BLOCKING_AREAS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(3751239098112338654)));
}
pub fn SUPPRESS_SHOCKING_EVENTS_NEXT_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(3430099330061811081)));
}
/// eventType: https://alloc8or.re/gta5/doc/enums/eEventType.txt
pub fn SUPPRESS_SHOCKING_EVENT_TYPE_NEXT_FRAME(eventType: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4598998255302463280)), eventType);
}
pub fn SUPPRESS_AGITATION_EVENTS_NEXT_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(6862209615884637522)));
}
};
pub const FILES = struct {
/// Character types:
/// 0 = Michael,
/// 1 = Franklin,
/// 2 = Trevor,
/// 3 = MPMale,
/// 4 = MPFemale
/// Used to be known as _GET_NUM_DECORATIONS
pub fn GET_NUM_TATTOO_SHOP_DLC_ITEMS(character: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(2850627672003375369)), character);
}
/// Character types:
/// 0 = Michael,
/// 1 = Franklin,
/// 2 = Trevor,
/// 3 = MPMale,
/// 4 = MPFemale
/// enum TattooZoneData
/// {
/// ZONE_TORSO = 0,
/// ZONE_HEAD = 1,
/// ZONE_LEFT_ARM = 2,
/// ZONE_RIGHT_ARM = 3,
/// ZONE_LEFT_LEG = 4,
/// ZONE_RIGHT_LEG = 5,
/// ZONE_UNKNOWN = 6,
/// ZONE_NONE = 7,
/// };
/// struct outComponent
/// {
/// // these vars are suffixed with 4 bytes of padding each.
/// uint unk;
/// int unk2;
/// uint tattooCollectionHash;
/// uint tattooNameHash;
/// int unk3;
/// TattooZoneData zoneId;
/// uint unk4;
/// uint unk5;
/// // maybe more, not sure exactly, decompiled scripts are very vague around this part.
/// }
/// Used to be known as _GET_TATTOO_COLLECTION_DATA
pub fn GET_TATTOO_SHOP_DLC_ITEM_DATA(characterType: c_int, decorationIndex: c_int, outComponent: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(18398955005361528966)), characterType, decorationIndex, outComponent);
}
/// Returns some sort of index/offset for overlays/decorations.
/// Character types:
/// 0 = Michael,
/// 1 = Franklin,
/// 2 = Trevor,
/// 3 = MPMale,
/// 4 = MPFemale
pub fn GET_TATTOO_SHOP_DLC_ITEM_INDEX(overlayHash: types.Hash, p1: types.Any, character: c_int) c_int {
return nativeCaller.invoke3(@as(u64, @intCast(1158624018000152172)), overlayHash, p1, character);
}
pub fn INIT_SHOP_PED_COMPONENT(outComponent: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2201187712157007926)), outComponent);
}
pub fn INIT_SHOP_PED_PROP(outProp: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16936397132598576399)), outProp);
}
pub fn SETUP_SHOP_PED_APPAREL_QUERY(p0: c_int, p1: c_int, p2: c_int, p3: c_int) c_int {
return nativeCaller.invoke4(@as(u64, @intCast(5833383634230766431)), p0, p1, p2, p3);
}
/// character is 0 for Michael, 1 for Franklin, 2 for Trevor, 3 for freemode male, and 4 for freemode female.
/// componentId is between 0 and 11 and corresponds to the usual component slots.
/// p1 could be the outfit number; unsure.
/// p2 is usually -1; unknown function.
/// p3 appears to be for selecting between clothes and props; false is used with components/clothes, true is used with props.
/// p4 is usually -1; unknown function.
/// componentId is -1 when p3 is true in decompiled scripts.
/// Used to be known as _GET_NUM_PROPS_FROM_OUTFIT
pub fn SETUP_SHOP_PED_APPAREL_QUERY_TU(character: c_int, p1: c_int, p2: c_int, p3: windows.BOOL, p4: c_int, componentId: c_int) c_int {
return nativeCaller.invoke6(@as(u64, @intCast(11231794408604973249)), character, p1, p2, p3, p4, componentId);
}
/// See https://git.io/JtcRf for example and structs.
pub fn GET_SHOP_PED_QUERY_COMPONENT(componentId: c_int, outComponent: [*c]types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2638600355764635289)), componentId, outComponent);
}
/// Returns some sort of index/offset for components.
/// Needs _GET_NUM_PROPS_FROM_OUTFIT to be called with p3 = false and componentId with the drawable's component slot first, returns -1 otherwise.
pub fn GET_SHOP_PED_QUERY_COMPONENT_INDEX(componentHash: types.Hash) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(10872413608648956791)), componentHash);
}
/// More info here: https://gist.github.com/root-cause/3b80234367b0c856d60bf5cb4b826f86
pub fn GET_SHOP_PED_COMPONENT(componentHash: types.Hash, outComponent: [*c]types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8412973304352499552)), componentHash, outComponent);
}
/// See https://git.io/JtcRf for example and structs.
pub fn GET_SHOP_PED_QUERY_PROP(componentId: c_int, outProp: [*c]types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16016102137930089341)), componentId, outProp);
}
/// Returns some sort of index/offset for props.
/// Needs _GET_NUM_PROPS_FROM_OUTFIT to be called with p3 = true and componentId = -1 first, returns -1 otherwise.
pub fn GET_SHOP_PED_QUERY_PROP_INDEX(componentHash: types.Hash) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(7848613078669061783)), componentHash);
}
/// More info here: https://gist.github.com/root-cause/3b80234367b0c856d60bf5cb4b826f86
pub fn GET_SHOP_PED_PROP(componentHash: types.Hash, outProp: [*c]types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6727445416123430652)), componentHash, outProp);
}
pub fn GET_HASH_NAME_FOR_COMPONENT(entity: types.Entity, componentId: c_int, drawableVariant: c_int, textureVariant: c_int) types.Hash {
return nativeCaller.invoke4(@as(u64, @intCast(245643714767553352)), entity, componentId, drawableVariant, textureVariant);
}
pub fn GET_HASH_NAME_FOR_PROP(entity: types.Entity, componentId: c_int, propIndex: c_int, propTextureIndex: c_int) types.Hash {
return nativeCaller.invoke4(@as(u64, @intCast(6728765040443181277)), entity, componentId, propIndex, propTextureIndex);
}
pub fn GET_SHOP_PED_APPAREL_VARIANT_COMPONENT_COUNT(componentHash: types.Hash) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(13941685280410692826)), componentHash);
}
/// `propHash`: Ped helmet prop hash?
/// This native returns 1 when the player helmet has a visor (there is another prop index for the same helmet with closed/opened visor variant) that can be toggled. 0 if there's no alternative version with a visor for this helmet prop.
/// Used to be known as _GET_SHOP_PED_APPAREL_VARIANT_PROP_COUNT
pub fn GET_SHOP_PED_APPAREL_VARIANT_PROP_COUNT(propHash: types.Hash) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(15279214153607464547)), propHash);
}
pub fn GET_VARIANT_COMPONENT(componentHash: types.Hash, variantComponentIndex: c_int, nameHash: [*c]types.Hash, enumValue: [*c]c_int, componentType: [*c]c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(7931387062980731830)), componentHash, variantComponentIndex, nameHash, enumValue, componentType);
}
/// Used to be known as _GET_VARIANT_PROP
pub fn GET_VARIANT_PROP(componentHash: types.Hash, variantPropIndex: c_int, nameHash: [*c]types.Hash, enumValue: [*c]c_int, anchorPoint: [*c]c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(15572179945206005350)), componentHash, variantPropIndex, nameHash, enumValue, anchorPoint);
}
/// Returns number of possible values of the forcedComponentIndex argument of GET_FORCED_COMPONENT.
/// Used to be known as _GET_NUM_FORCED_COMPONENTS
pub fn GET_SHOP_PED_APPAREL_FORCED_COMPONENT_COUNT(componentHash: types.Hash) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(14319717569941854403)), componentHash);
}
/// Returns number of possible values of the forcedPropIndex argument of GET_FORCED_PROP.
pub fn GET_SHOP_PED_APPAREL_FORCED_PROP_COUNT(componentHash: types.Hash) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(105105237482510502)), componentHash);
}
pub fn GET_FORCED_COMPONENT(componentHash: types.Hash, forcedComponentIndex: c_int, nameHash: [*c]types.Hash, enumValue: [*c]c_int, componentType: [*c]c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(7823858164020053403)), componentHash, forcedComponentIndex, nameHash, enumValue, componentType);
}
pub fn GET_FORCED_PROP(componentHash: types.Hash, forcedPropIndex: c_int, nameHash: [*c]types.Hash, enumValue: [*c]c_int, anchorPoint: [*c]c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(16269962752828533021)), componentHash, forcedPropIndex, nameHash, enumValue, anchorPoint);
}
/// Full list of restriction tags by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pedApparelRestrictionTags.json
/// componentId/last parameter seems to be unused.
pub fn DOES_SHOP_PED_APPAREL_HAVE_RESTRICTION_TAG(componentHash: types.Hash, restrictionTagHash: types.Hash, componentId: c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(3755412669879426045)), componentHash, restrictionTagHash, componentId);
}
/// Used to be known as _DOES_CUSTOMIZATION_COMPONENT_HAVE_RESTRICTION_TAG
pub fn DOES_CURRENT_PED_COMPONENT_HAVE_RESTRICTION_TAG(ped: types.Ped, componentId: c_int, restrictionTagHash: types.Hash) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(8617270768035830725)), ped, componentId, restrictionTagHash);
}
/// Used to be known as _DOES_CUSTOMIZATION_PROP_HAVE_RESTRICTION_TAG
pub fn DOES_CURRENT_PED_PROP_HAVE_RESTRICTION_TAG(ped: types.Ped, componentId: c_int, restrictionTagHash: types.Hash) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(15503284050957542784)), ped, componentId, restrictionTagHash);
}
/// characters
/// 0: Michael
/// 1: Franklin
/// 2: Trevor
/// 3: MPMale
/// 4: MPFemale
pub fn SETUP_SHOP_PED_OUTFIT_QUERY(character: c_int, p1: windows.BOOL) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(17580894975001529384)), character, p1);
}
/// outfitIndex: from 0 to SETUP_SHOP_PED_OUTFIT_QUERY(characterIndex, false) - 1.
/// See https://git.io/JtcB8 for example and outfit struct.
pub fn GET_SHOP_PED_QUERY_OUTFIT(outfitIndex: c_int, outfit: [*c]types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7888405507221880406)), outfitIndex, outfit);
}
pub fn GET_SHOP_PED_OUTFIT(p0: types.Any, p1: [*c]types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13228515175478630301)), p0, p1);
}
pub fn GET_SHOP_PED_OUTFIT_LOCATE(p0: types.Any) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(521470237441234286)), p0);
}
/// See https://git.io/JtcBH for example and structs.
pub fn GET_SHOP_PED_OUTFIT_PROP_VARIANT(outfitHash: types.Hash, variantIndex: c_int, outPropVariant: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(12248034933198625979)), outfitHash, variantIndex, outPropVariant);
}
/// See https://git.io/JtcBH for example and structs.
/// Used to be known as _GET_PROP_FROM_OUTFIT
pub fn GET_SHOP_PED_OUTFIT_COMPONENT_VARIANT(outfitHash: types.Hash, variantIndex: c_int, outComponentVariant: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(1869732884373307711)), outfitHash, variantIndex, outComponentVariant);
}
pub fn GET_NUM_DLC_VEHICLES() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(12081019053034058395)));
}
/// dlcVehicleIndex is 0 to GET_NUM_DLC_VEHICLS() - 1
pub fn GET_DLC_VEHICLE_MODEL(dlcVehicleIndex: c_int) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(17059665609335452476)), dlcVehicleIndex);
}
/// dlcVehicleIndex takes a number from 0 - GET_NUM_DLC_VEHICLES() - 1.
/// outData is a struct of 3 8-byte items.
/// The Second item in the struct *(Hash *)(outData + 1) is the vehicle hash.
pub fn GET_DLC_VEHICLE_DATA(dlcVehicleIndex: c_int, outData: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(3694797619997143542)), dlcVehicleIndex, outData);
}
pub fn GET_DLC_VEHICLE_FLAGS(dlcVehicleIndex: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(6145704927502204146)), dlcVehicleIndex);
}
/// Returns the total number of DLC weapons.
pub fn GET_NUM_DLC_WEAPONS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(17169801364938531687)));
}
/// Returns the total number of DLC weapons that are available in SP (availableInSP field in shop_weapon.meta).
/// Used to be known as _GET_NUM_DLC_WEAPONS_SP
pub fn GET_NUM_DLC_WEAPONS_SP() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(4710965711659709865)));
}
/// dlcWeaponIndex takes a number from 0 - GET_NUM_DLC_WEAPONS() - 1.
/// struct DlcWeaponData
/// {
/// int emptyCheck; //use DLC1::IS_CONTENT_ITEM_LOCKED on this
/// int padding1;
/// int weaponHash;
/// int padding2;
/// int unk;
/// int padding3;
/// int weaponCost;
/// int padding4;
/// int ammoCost;
/// int padding5;
/// int ammoType;
/// int padding6;
/// int defaultClipSize;
/// int padding7;
/// char nameLabel[64];
/// char descLabel[64];
/// char desc2Label[64]; // usually "the" + name
/// char upperCaseNameLabel[64];
/// };
pub fn GET_DLC_WEAPON_DATA(dlcWeaponIndex: c_int, outData: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(8760131098298343758)), dlcWeaponIndex, outData);
}
/// Same as GET_DLC_WEAPON_DATA but only works for DLC weapons that are available in SP.
/// Used to be known as _GET_DLC_WEAPON_DATA_SP
pub fn GET_DLC_WEAPON_DATA_SP(dlcWeaponIndex: c_int, outData: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(3533134305400830515)), dlcWeaponIndex, outData);
}
/// Returns the total number of DLC weapon components.
pub fn GET_NUM_DLC_WEAPON_COMPONENTS(dlcWeaponIndex: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(4635370828358050302)), dlcWeaponIndex);
}
/// Returns the total number of DLC weapon components that are available in SP.
/// Used to be known as _GET_NUM_DLC_WEAPON_COMPONENTS_SP
pub fn GET_NUM_DLC_WEAPON_COMPONENTS_SP(dlcWeaponIndex: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(12477920330437198875)), dlcWeaponIndex);
}
/// p0 seems to be the weapon index
/// p1 seems to be the weapon component index
/// struct DlcComponentData{
/// int attachBone;
/// int padding1;
/// int bActiveByDefault;
/// int padding2;
/// int unk;
/// int padding3;
/// int componentHash;
/// int padding4;
/// int unk2;
/// int padding5;
/// int componentCost;
/// int padding6;
/// char nameLabel[64];
/// char descLabel[64];
/// };
pub fn GET_DLC_WEAPON_COMPONENT_DATA(dlcWeaponIndex: c_int, dlcWeapCompIndex: c_int, ComponentDataPtr: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(7851349349450394616)), dlcWeaponIndex, dlcWeapCompIndex, ComponentDataPtr);
}
/// Same as GET_DLC_WEAPON_COMPONENT_DATA but only works for DLC components that are available in SP.
/// Used to be known as _GET_DLC_WEAPON_COMPONENT_DATA_SP
pub fn GET_DLC_WEAPON_COMPONENT_DATA_SP(dlcWeaponIndex: c_int, dlcWeapCompIndex: c_int, ComponentDataPtr: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(3591023065493486812)), dlcWeaponIndex, dlcWeapCompIndex, ComponentDataPtr);
}
/// Used to be known as _IS_OUTFIT_EMPTY
/// Used to be known as _IS_DLC_DATA_EMPTY
pub fn IS_CONTENT_ITEM_LOCKED(itemHash: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15336920792406041660)), itemHash);
}
pub fn IS_DLC_VEHICLE_MOD(hash: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(388639975248345132)), hash);
}
pub fn GET_DLC_VEHICLE_MOD_LOCK_HASH(hash: types.Hash) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(13877984106848006143)), hash);
}
/// From fm_deathmatch_creator and fm_race_creator:
/// FILES::REVERT_CONTENT_CHANGESET_GROUP_FOR_ALL(joaat("GROUP_MAP_SP"));
/// FILES::EXECUTE_CONTENT_CHANGESET_GROUP_FOR_ALL(joaat("GROUP_MAP"));
/// Used to be known as _LOAD_CONTENT_CHANGE_SET_GROUP
pub fn EXECUTE_CONTENT_CHANGESET_GROUP_FOR_ALL(hash: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7777142021290122247)), hash);
}
/// From fm_deathmatch_creator and fm_race_creator:
/// FILES::REVERT_CONTENT_CHANGESET_GROUP_FOR_ALL(joaat("GROUP_MAP_SP"));
/// FILES::EXECUTE_CONTENT_CHANGESET_GROUP_FOR_ALL(joaat("GROUP_MAP"));
/// Used to be known as _UNLOAD_CONTENT_CHANGE_SET_GROUP
pub fn REVERT_CONTENT_CHANGESET_GROUP_FOR_ALL(hash: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4330624631414418213)), hash);
}
};
pub const FIRE = struct {
/// Starts a fire:
/// xyz: Location of fire
/// maxChildren: The max amount of times a fire can spread to other objects. Must be 25 or less, or the function will do nothing.
/// isGasFire: Whether or not the fire is powered by gasoline.
pub fn START_SCRIPT_FIRE(X: f32, Y: f32, Z: f32, maxChildren: c_int, isGasFire: windows.BOOL) types.FireId {
return nativeCaller.invoke5(@as(u64, @intCast(7747142977873524872)), X, Y, Z, maxChildren, isGasFire);
}
pub fn REMOVE_SCRIPT_FIRE(fireHandle: types.FireId) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9220355218917582655)), fireHandle);
}
pub fn START_ENTITY_FIRE(entity: types.Entity) types.FireId {
return nativeCaller.invoke1(@as(u64, @intCast(17773976481860363231)), entity);
}
pub fn STOP_ENTITY_FIRE(entity: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9155205527417199359)), entity);
}
pub fn IS_ENTITY_ON_FIRE(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2941975181394786827)), entity);
}
pub fn GET_NUMBER_OF_FIRES_IN_RANGE(x: f32, y: f32, z: f32, radius: f32) c_int {
return nativeCaller.invoke4(@as(u64, @intCast(5821699207502803717)), x, y, z, radius);
}
/// Used to be known as _SET_FIRE_SPREAD_RATE
pub fn SET_FLAMMABILITY_MULTIPLIER(p0: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10320291858383673786)), p0);
}
pub fn STOP_FIRE_IN_RANGE(x: f32, y: f32, z: f32, radius: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(390276194669331103)), x, y, z, radius);
}
/// Returns TRUE if it found something. FALSE if not.
pub fn GET_CLOSEST_FIRE_POS(outPosition: [*c]types.Vector3, x: f32, y: f32, z: f32) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(3831049718424668191)), outPosition, x, y, z);
}
/// BOOL isAudible = If explosion makes a sound.
/// BOOL isInvisible = If the explosion is invisible or not.
/// explosionType: https://alloc8or.re/gta5/doc/enums/eExplosionTag.txt
pub fn ADD_EXPLOSION(x: f32, y: f32, z: f32, explosionType: c_int, damageScale: f32, isAudible: windows.BOOL, isInvisible: windows.BOOL, cameraShake: f32, noDamage: windows.BOOL) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(16405817240112490924)), x, y, z, explosionType, damageScale, isAudible, isInvisible, cameraShake, noDamage);
}
/// isAudible: If explosion makes a sound.
/// isInvisible: If the explosion is invisible or not.
/// explosionType: See ADD_EXPLOSION.
pub fn ADD_OWNED_EXPLOSION(ped: types.Ped, x: f32, y: f32, z: f32, explosionType: c_int, damageScale: f32, isAudible: windows.BOOL, isInvisible: windows.BOOL, cameraShake: f32) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(1669324415570677779)), ped, x, y, z, explosionType, damageScale, isAudible, isInvisible, cameraShake);
}
/// isAudible: If explosion makes a sound.
/// isInvisible: If the explosion is invisible or not.
/// explosionType: See ADD_EXPLOSION.
/// Used to be known as _ADD_SPECFX_EXPLOSION
pub fn ADD_EXPLOSION_WITH_USER_VFX(x: f32, y: f32, z: f32, explosionType: c_int, explosionFx: types.Hash, damageScale: f32, isAudible: windows.BOOL, isInvisible: windows.BOOL, cameraShake: f32) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(3953386303019438610)), x, y, z, explosionType, explosionFx, damageScale, isAudible, isInvisible, cameraShake);
}
/// explosionType: See ADD_EXPLOSION.
pub fn IS_EXPLOSION_IN_AREA(explosionType: c_int, x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32) windows.BOOL {
return nativeCaller.invoke7(@as(u64, @intCast(3327801747854774496)), explosionType, x1, y1, z1, x2, y2, z2);
}
/// explosionType: See ADD_EXPLOSION.
pub fn IS_EXPLOSION_ACTIVE_IN_AREA(explosionType: c_int, x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32) windows.BOOL {
return nativeCaller.invoke7(@as(u64, @intCast(6949072141113044724)), explosionType, x1, y1, z1, x2, y2, z2);
}
/// explosionType: See ADD_EXPLOSION.
pub fn IS_EXPLOSION_IN_SPHERE(explosionType: c_int, x: f32, y: f32, z: f32, radius: f32) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(12326212991055881347)), explosionType, x, y, z, radius);
}
/// explosionType: See ADD_EXPLOSION.
/// Used to be known as _GET_ENTITY_INSIDE_EXPLOSION_SPHERE
pub fn GET_OWNER_OF_EXPLOSION_IN_SPHERE(explosionType: c_int, x: f32, y: f32, z: f32, radius: f32) types.Entity {
return nativeCaller.invoke5(@as(u64, @intCast(12956101742097265014)), explosionType, x, y, z, radius);
}
/// explosionType: See ADD_EXPLOSION, -1 for any explosion type
pub fn IS_EXPLOSION_IN_ANGLED_AREA(explosionType: c_int, x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, width: f32) windows.BOOL {
return nativeCaller.invoke8(@as(u64, @intCast(11563456883644030027)), explosionType, x1, y1, z1, x2, y2, z2, width);
}
/// Returns a handle to the first entity within the a circle spawned inside the 2 points from a radius.
/// explosionType: See ADD_EXPLOSION.
/// Used to be known as _GET_PED_INSIDE_EXPLOSION_AREA
/// Used to be known as _GET_ENTITY_INSIDE_EXPLOSION_AREA
pub fn GET_OWNER_OF_EXPLOSION_IN_ANGLED_AREA(explosionType: c_int, x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, radius: f32) types.Entity {
return nativeCaller.invoke8(@as(u64, @intCast(1493589382222802156)), explosionType, x1, y1, z1, x2, y2, z2, radius);
}
};
pub const GRAPHICS = struct {
/// NOTE: Debugging functions are not present in the retail version of the game.
pub fn SET_DEBUG_LINES_AND_SPHERES_DRAWING_ACTIVE(enabled: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1683057616194752709)), enabled);
}
pub fn DRAW_DEBUG_LINE(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, r: c_int, g: c_int, b: c_int, alpha: c_int) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(9214274567968275632)), x1, y1, z1, x2, y2, z2, r, g, b, alpha);
}
/// NOTE: Debugging functions are not present in the retail version of the game.
pub fn DRAW_DEBUG_LINE_WITH_TWO_COLOURS(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, r1: c_int, g1: c_int, b1: c_int, r2: c_int, g2: c_int, b2: c_int, alpha1: c_int, alpha2: c_int) void {
_ = nativeCaller.invoke14(@as(u64, @intCast(15616698641015177108)), x1, y1, z1, x2, y2, z2, r1, g1, b1, r2, g2, b2, alpha1, alpha2);
}
/// NOTE: Debugging functions are not present in the retail version of the game.
pub fn DRAW_DEBUG_SPHERE(x: f32, y: f32, z: f32, radius: f32, red: c_int, green: c_int, blue: c_int, alpha: c_int) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(12310182876797576754)), x, y, z, radius, red, green, blue, alpha);
}
pub fn DRAW_DEBUG_BOX(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, r: c_int, g: c_int, b: c_int, alpha: c_int) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(592835387914023869)), x1, y1, z1, x2, y2, z2, r, g, b, alpha);
}
/// NOTE: Debugging functions are not present in the retail version of the game.
pub fn DRAW_DEBUG_CROSS(x: f32, y: f32, z: f32, size: f32, red: c_int, green: c_int, blue: c_int, alpha: c_int) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(8336471418351163449)), x, y, z, size, red, green, blue, alpha);
}
/// NOTE: Debugging functions are not present in the retail version of the game.
pub fn DRAW_DEBUG_TEXT(text: [*c]const u8, x: f32, y: f32, z: f32, red: c_int, green: c_int, blue: c_int, alpha: c_int) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(4108375870853646568)), text, x, y, z, red, green, blue, alpha);
}
/// NOTE: Debugging functions are not present in the retail version of the game.
pub fn DRAW_DEBUG_TEXT_2D(text: [*c]const u8, x: f32, y: f32, z: f32, red: c_int, green: c_int, blue: c_int, alpha: c_int) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(11798074867750820495)), text, x, y, z, red, green, blue, alpha);
}
/// Draws a depth-tested line from one point to another.
/// ----------------
/// x1, y1, z1 : Coordinates for the first point
/// x2, y2, z2 : Coordinates for the second point
/// r, g, b, alpha : Color with RGBA-Values
/// I recommend using a predefined function to call this.
/// [VB.NET]
/// Public Sub DrawLine(from As Vector3, [to] As Vector3, col As Color)
/// [Function].Call(Hash.DRAW_LINE, from.X, from.Y, from.Z, [to].X, [to].Y, [to].Z, col.R, col.G, col.B, col.A)
/// End Sub
/// [C#]
/// public void DrawLine(Vector3 from, Vector3 to, Color col)
/// {
/// Function.Call(Hash.DRAW_LINE, from.X, from.Y, from.Z, to.X, to.Y, to.Z, col.R, col.G, col.B, col.A);
/// }
pub fn DRAW_LINE(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, red: c_int, green: c_int, blue: c_int, alpha: c_int) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(7742345298724472448)), x1, y1, z1, x2, y2, z2, red, green, blue, alpha);
}
/// x/y/z - Location of a vertex (in world coords), presumably.
/// ----------------
/// x1, y1, z1 : Coordinates for the first point
/// x2, y2, z2 : Coordinates for the second point
/// x3, y3, z3 : Coordinates for the third point
/// r, g, b, alpha : Color with RGBA-Values
/// Keep in mind that only one side of the drawn triangle is visible: It's the side, in which the vector-product of the vectors heads to: (b-a)x(c-a) Or (b-a)x(c-b).
/// But be aware: The function seems to work somehow differently. I have trouble having them drawn in rotated orientation. Try it yourself and if you somehow succeed, please edit this and post your solution.
/// I recommend using a predefined function to call this.
/// [VB.NET]
/// Public Sub DrawPoly(a As Vector3, b As Vector3, c As Vector3, col As Color)
/// [Function].Call(Hash.DRAW_POLY, a.X, a.Y, a.Z, b.X, b.Y, b.Z, c.X, c.Y, c.Z, col.R, col.G, col.B, col.A)
/// End Sub
/// [C#]
/// public void DrawPoly(Vector3 a, Vector3 b, Vector3 c, Color col)
/// {
/// Function.Call(Hash.DRAW_POLY, a.X, a.Y, a.Z, b.X, b.Y, b.Z, c.X, c.Y, c.Z, col.R, col.G, col.B, col.A);
/// }
/// BTW: Intersecting triangles are not supported: They overlap in the order they were called.
pub fn DRAW_POLY(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, x3: f32, y3: f32, z3: f32, red: c_int, green: c_int, blue: c_int, alpha: c_int) void {
_ = nativeCaller.invoke13(@as(u64, @intCast(12404726881981786193)), x1, y1, z1, x2, y2, z2, x3, y3, z3, red, green, blue, alpha);
}
/// Used for drawling Deadline trailing lights, see deadline.ytd
/// p15 through p23 are values that appear to be related to illiumation, scaling, and rotation; more testing required.
/// For UVW mapping (u,v,w parameters), reference your favourite internet resource for more details.
/// Used to be known as _DRAW_SPRITE_POLY
pub fn DRAW_TEXTURED_POLY(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, x3: f32, y3: f32, z3: f32, red: c_int, green: c_int, blue: c_int, alpha: c_int, textureDict: [*c]const u8, textureName: [*c]const u8, @"u1": f32, v1: f32, w1: f32, @"u2": f32, v2: f32, w2: f32, @"u3": f32, v3: f32, w3: f32) void {
_ = nativeCaller.invoke24(@as(u64, @intCast(2965620363887581480)), x1, y1, z1, x2, y2, z2, x3, y3, z3, red, green, blue, alpha, textureDict, textureName, @"u1", v1, w1, @"u2", v2, w2, @"u3", v3, w3);
}
/// Used for drawling Deadline trailing lights, see deadline.ytd
/// Each vertex has its own colour that is blended/illuminated on the texture. Additionally, the R, G, and B components are floats that are int-casted internally.
/// For UVW mapping (u,v,w parameters), reference your favourite internet resource for more details.
/// Used to be known as _DRAW_SPRITE_POLY_2
pub fn DRAW_TEXTURED_POLY_WITH_THREE_COLOURS(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, x3: f32, y3: f32, z3: f32, red1: f32, green1: f32, blue1: f32, alpha1: c_int, red2: f32, green2: f32, blue2: f32, alpha2: c_int, red3: f32, green3: f32, blue3: f32, alpha3: c_int, textureDict: [*c]const u8, textureName: [*c]const u8, @"u1": f32, v1: f32, w1: f32, @"u2": f32, v2: f32, w2: f32, @"u3": f32, v3: f32, w3: f32) void {
_ = nativeCaller.invoke32(@as(u64, @intCast(8317438921807005035)), x1, y1, z1, x2, y2, z2, x3, y3, z3, red1, green1, blue1, alpha1, red2, green2, blue2, alpha2, red3, green3, blue3, alpha3, textureDict, textureName, @"u1", v1, w1, @"u2", v2, w2, @"u3", v3, w3);
}
/// x,y,z = start pos
/// x2,y2,z2 = end pos
/// Draw's a 3D Box between the two x,y,z coords.
/// --------------
/// Keep in mind that the edges of the box do only align to the worlds base-vectors. Therefore something like rotation cannot be applied. That means this function is pretty much useless, unless you want a static unicolor box somewhere.
/// I recommend using a predefined function to call this.
/// [VB.NET]
/// Public Sub DrawBox(a As Vector3, b As Vector3, col As Color)
/// [Function].Call(Hash.DRAW_BOX,a.X, a.Y, a.Z,b.X, b.Y, b.Z,col.R, col.G, col.B, col.A)
/// End Sub
/// [C#]
/// public void DrawBox(Vector3 a, Vector3 b, Color col)
/// {
/// Function.Call(Hash.DRAW_BOX,a.X, a.Y, a.Z,b.X, b.Y, b.Z,col.R, col.G, col.B, col.A);
/// }
pub fn DRAW_BOX(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, red: c_int, green: c_int, blue: c_int, alpha: c_int) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(15251887762495533650)), x1, y1, z1, x2, y2, z2, red, green, blue, alpha);
}
pub fn SET_BACKFACECULLING(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2574487836998217939)), toggle);
}
pub fn SET_DEPTHWRITING(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14251915283817955185)), toggle);
}
pub fn BEGIN_TAKE_MISSION_CREATOR_PHOTO() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(2148801526940884200)));
}
pub fn GET_STATUS_OF_TAKE_MISSION_CREATOR_PHOTO() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(10423456863573476435)));
}
pub fn FREE_MEMORY_FOR_MISSION_CREATOR_PHOTO() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(740472198017080842)));
}
pub fn LOAD_MISSION_CREATOR_PHOTO(p0: [*c]types.Any, p1: types.Any, p2: types.Any, p3: types.Any) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(5215805510928798128)), p0, p1, p2, p3);
}
pub fn GET_STATUS_OF_LOAD_MISSION_CREATOR_PHOTO(p0: [*c]types.Any) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(1617065839810769495)), p0);
}
pub fn BEGIN_CREATE_MISSION_CREATOR_PHOTO_PREVIEW() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9197995495574268934)));
}
pub fn GET_STATUS_OF_CREATE_MISSION_CREATOR_PHOTO_PREVIEW() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(6558110179164768868)));
}
pub fn FREE_MEMORY_FOR_MISSION_CREATOR_PHOTO_PREVIEW() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(3778225335211594910)));
}
pub fn BEGIN_TAKE_HIGH_QUALITY_PHOTO() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(11996522629490130333)));
}
pub fn GET_STATUS_OF_TAKE_HIGH_QUALITY_PHOTO() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(967332321029885091)));
}
pub fn FREE_MEMORY_FOR_HIGH_QUALITY_PHOTO() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(15564946096525386737)));
}
pub fn SET_TAKEN_PHOTO_IS_MUGSHOT(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1998493613207973342)), toggle);
}
pub fn SET_ARENA_THEME_AND_VARIATION_FOR_TAKEN_PHOTO(p0: types.Any, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17579650158572987517)), p0, p1);
}
pub fn SET_ON_ISLAND_X_FOR_TAKEN_PHOTO(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12526307699588224088)), p0);
}
/// 1 match in 1 script. cellphone_controller.
/// p0 is -1 in scripts.
pub fn SAVE_HIGH_QUALITY_PHOTO(unused: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4462067139630668716)), unused);
}
pub fn GET_STATUS_OF_SAVE_HIGH_QUALITY_PHOTO() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(868155147919581344)));
}
pub fn BEGIN_CREATE_LOW_QUALITY_COPY_OF_PHOTO(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8473048136402056884)), p0);
}
/// Used to be known as _GET_STATUS_OF_DRAW_LOW_QUALITY_PHOTO
pub fn GET_STATUS_OF_CREATE_LOW_QUALITY_COPY_OF_PHOTO(p0: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(14664460079109911141)), p0);
}
pub fn FREE_MEMORY_FOR_LOW_QUALITY_PHOTO() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(7643409598396980682)));
}
pub fn DRAW_LOW_QUALITY_PHOTO_TO_PHONE(p0: windows.BOOL, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1185274728117465470)), p0, p1);
}
/// This function is hard-coded to always return 0.
pub fn GET_MAXIMUM_NUMBER_OF_PHOTOS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(3806162157312716991)));
}
/// This function is hard-coded to always return 96.
/// Used to be known as _GET_MAXIMUM_NUMBER_OF_PHOTOS_2
pub fn GET_MAXIMUM_NUMBER_OF_CLOUD_PHOTOS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(15876498958784795887)));
}
/// Used to be known as _GET_NUMBER_OF_PHOTOS
/// Used to be known as _GET_CURRENT_NUMBER_OF_PHOTOS
pub fn GET_CURRENT_NUMBER_OF_CLOUD_PHOTOS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(5129971523656009434)));
}
/// 2 matches across 2 scripts. Only showed in appcamera & appmedia. Both were 0.
pub fn QUEUE_OPERATION_TO_CREATE_SORTED_LIST_OF_PHOTOS(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3065044247237059994)), p0);
}
/// 3 matches across 3 scripts. First 2 were 0, 3rd was 1. Possibly a bool.
/// appcamera, appmedia, and cellphone_controller.
pub fn GET_STATUS_OF_SORTED_LIST_OPERATION(p0: types.Any) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(17707822952791368369)), p0);
}
pub fn CLEAR_STATUS_OF_SORTED_LIST_OPERATION() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(5402396288790681964)));
}
/// This function is hard-coded to always return 0.
pub fn DOES_THIS_PHOTO_SLOT_CONTAIN_A_VALID_PHOTO(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16686363420566301835)), p0);
}
/// This function is hard-coded to always return 0.
pub fn LOAD_HIGH_QUALITY_PHOTO(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(17037894025228314090)), p0);
}
/// Hardcoded to always return 2.
/// Used to be known as _RETURN_TWO
pub fn GET_LOAD_HIGH_QUALITY_PHOTO_STATUS(p0: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(4661138211621164270)), p0);
}
/// Used to be known as _DRAW_LIGHT_WITH_RANGE_WITH_SHADOW
/// Used to be known as _DRAW_LIGHT_WITH_RANGE_AND_SHADOW
pub fn DRAW_LIGHT_WITH_RANGEEX(x: f32, y: f32, z: f32, r: c_int, g: c_int, b: c_int, range: f32, intensity: f32, shadow: f32) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(17626695965285041557)), x, y, z, r, g, b, range, intensity, shadow);
}
pub fn DRAW_LIGHT_WITH_RANGE(posX: f32, posY: f32, posZ: f32, colorR: c_int, colorG: c_int, colorB: c_int, range: f32, intensity: f32) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(17483451453036157908)), posX, posY, posZ, colorR, colorG, colorB, range, intensity);
}
/// Parameters:
/// * pos - coordinate where the spotlight is located
/// * dir - the direction vector the spotlight should aim at from its current position
/// * r,g,b - color of the spotlight
/// * distance - the maximum distance the light can reach
/// * brightness - the brightness of the light
/// * roundness - "smoothness" of the circle edge
/// * radius - the radius size of the spotlight
/// * falloff - the falloff size of the light's edge (example: www.i.imgur.com/DemAWeO.jpg)
/// Example in C# (spotlight aims at the closest vehicle):
/// Vector3 myPos = Game.Player.Character.Position;
/// Vehicle nearest = World.GetClosestVehicle(myPos , 1000f);
/// Vector3 destinationCoords = nearest.Position;
/// Vector3 dirVector = destinationCoords - myPos;
/// dirVector.Normalize();
/// Function.Call(Hash.DRAW_SPOT_LIGHT, pos.X, pos.Y, pos.Z, dirVector.X, dirVector.Y, dirVector.Z, 255, 255, 255, 100.0f, 1f, 0.0f, 13.0f, 1f);
pub fn DRAW_SPOT_LIGHT(posX: f32, posY: f32, posZ: f32, dirX: f32, dirY: f32, dirZ: f32, colorR: c_int, colorG: c_int, colorB: c_int, distance: f32, brightness: f32, hardness: f32, radius: f32, falloff: f32) void {
_ = nativeCaller.invoke14(@as(u64, @intCast(15057305032293387059)), posX, posY, posZ, dirX, dirY, dirZ, colorR, colorG, colorB, distance, brightness, hardness, radius, falloff);
}
/// Used to be known as _DRAW_SPOT_LIGHT_WITH_SHADOW
pub fn DRAW_SHADOWED_SPOT_LIGHT(posX: f32, posY: f32, posZ: f32, dirX: f32, dirY: f32, dirZ: f32, colorR: c_int, colorG: c_int, colorB: c_int, distance: f32, brightness: f32, roundness: f32, radius: f32, falloff: f32, shadowId: c_int) void {
_ = nativeCaller.invoke15(@as(u64, @intCast(6614196010357986523)), posX, posY, posZ, dirX, dirY, dirZ, colorR, colorG, colorB, distance, brightness, roundness, radius, falloff, shadowId);
}
pub fn FADE_UP_PED_LIGHT(p0: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14533550605700730747)), p0);
}
/// Used to be known as _ENTITY_DESCRIPTION_TEXT
pub fn UPDATE_LIGHTS_ON_ENTITY(entity: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16045693110842147038)), entity);
}
pub fn SET_LIGHT_OVERRIDE_MAX_INTENSITY_SCALE(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10827032344667600053)), p0);
}
pub fn GET_LIGHT_OVERRIDE_MAX_INTENSITY_SCALE() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(4124120950292314003)));
}
/// enum MarkerTypes
/// {
/// MarkerTypeUpsideDownCone = 0,
/// MarkerTypeVerticalCylinder = 1,
/// MarkerTypeThickChevronUp = 2,
/// MarkerTypeThinChevronUp = 3,
/// MarkerTypeCheckeredFlagRect = 4,
/// MarkerTypeCheckeredFlagCircle = 5,
/// MarkerTypeVerticleCircle = 6,
/// MarkerTypePlaneModel = 7,
/// MarkerTypeLostMCDark = 8,
/// MarkerTypeLostMCLight = 9,
/// MarkerTypeNumber0 = 10,
/// MarkerTypeNumber1 = 11,
/// MarkerTypeNumber2 = 12,
/// MarkerTypeNumber3 = 13,
/// MarkerTypeNumber4 = 14,
/// MarkerTypeNumber5 = 15,
/// MarkerTypeNumber6 = 16,
/// MarkerTypeNumber7 = 17,
/// MarkerTypeNumber8 = 18,
/// MarkerTypeNumber9 = 19,
/// MarkerTypeChevronUpx1 = 20,
/// MarkerTypeChevronUpx2 = 21,
/// MarkerTypeChevronUpx3 = 22,
/// MarkerTypeHorizontalCircleFat = 23,
/// MarkerTypeReplayIcon = 24,
/// MarkerTypeHorizontalCircleSkinny = 25,
/// MarkerTypeHorizontalCircleSkinny_Arrow = 26,
/// MarkerTypeHorizontalSplitArrowCircle = 27,
/// MarkerTypeDebugSphere = 28,
/// MarkerTypeDallorSign = 29,
/// MarkerTypeHorizontalBars = 30,
/// MarkerTypeWolfHead = 31
/// };
/// dirX/Y/Z represent a heading on each axis in which the marker should face, alternatively you can rotate each axis independently with rotX/Y/Z (and set dirX/Y/Z all to 0).
/// faceCamera - Rotates only the y-axis (the heading) towards the camera
/// p19 - no effect, default value in script is 2
/// rotate - Rotates only on the y-axis (the heading)
/// textureDict - Name of texture dictionary to load texture from (e.g. "GolfPutting")
/// textureName - Name of texture inside dictionary to load (e.g. "PuttingMarker")
/// drawOnEnts - Draws the marker onto any entities that intersect it
/// basically what he said, except textureDict and textureName are totally not const char*, or if so, then they are always set to 0/NULL/nullptr in every script I checked, eg:
/// bj.c: graphics::draw_marker(6, vParam0, 0f, 0f, 1f, 0f, 0f, 0f, 4f, 4f, 4f, 240, 200, 80, iVar1, 0, 0, 2, 0, 0, 0, false);
/// his is what I used to draw an amber downward pointing chevron "V", has to be redrawn every frame. The 180 is for 180 degrees rotation around the Y axis, the 50 is alpha, assuming max is 100, but it will accept 255.
/// GRAPHICS::DRAW_MARKER(2, v.x, v.y, v.z + 2, 0, 0, 0, 0, 180, 0, 2, 2, 2, 255, 128, 0, 50, 0, 1, 1, 0, 0, 0, 0);
pub fn DRAW_MARKER(@"type": c_int, posX: f32, posY: f32, posZ: f32, dirX: f32, dirY: f32, dirZ: f32, rotX: f32, rotY: f32, rotZ: f32, scaleX: f32, scaleY: f32, scaleZ: f32, red: c_int, green: c_int, blue: c_int, alpha: c_int, bobUpAndDown: windows.BOOL, faceCamera: windows.BOOL, p19: c_int, rotate: windows.BOOL, textureDict: [*c]const u8, textureName: [*c]const u8, drawOnEnts: windows.BOOL) void {
_ = nativeCaller.invoke24(@as(u64, @intCast(2902427857584726153)), @"type", posX, posY, posZ, dirX, dirY, dirZ, rotX, rotY, rotZ, scaleX, scaleY, scaleZ, red, green, blue, alpha, bobUpAndDown, faceCamera, p19, rotate, textureDict, textureName, drawOnEnts);
}
/// Used to be known as _DRAW_MARKER_2
pub fn DRAW_MARKER_EX(@"type": c_int, posX: f32, posY: f32, posZ: f32, dirX: f32, dirY: f32, dirZ: f32, rotX: f32, rotY: f32, rotZ: f32, scaleX: f32, scaleY: f32, scaleZ: f32, red: c_int, green: c_int, blue: c_int, alpha: c_int, bobUpAndDown: windows.BOOL, faceCamera: windows.BOOL, p19: types.Any, rotate: windows.BOOL, textureDict: [*c]const u8, textureName: [*c]const u8, drawOnEnts: windows.BOOL, p24: windows.BOOL, p25: windows.BOOL) void {
_ = nativeCaller.invoke26(@as(u64, @intCast(16728384355880522042)), @"type", posX, posY, posZ, dirX, dirY, dirZ, rotX, rotY, rotZ, scaleX, scaleY, scaleZ, red, green, blue, alpha, bobUpAndDown, faceCamera, p19, rotate, textureDict, textureName, drawOnEnts, p24, p25);
}
/// Draws a 3D sphere, typically seen in the GTA:O freemode event "Penned In".
/// Example https://imgur.com/nCbtS4H
/// alpha - The alpha for the sphere. Goes from 0.0 to 1.0.
/// Used to be known as _DRAW_SPHERE
pub fn DRAW_MARKER_SPHERE(x: f32, y: f32, z: f32, radius: f32, red: c_int, green: c_int, blue: c_int, alpha: f32) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(8759527637269938450)), x, y, z, radius, red, green, blue, alpha);
}
/// Creates a checkpoint. Returns the handle of the checkpoint.
/// 20/03/17 : Attention, checkpoints are already handled by the game itself, so you must not loop it like markers.
/// Parameters:
/// * type - The type of checkpoint to create. See below for a list of checkpoint types.
/// * pos1 - The position of the checkpoint.
/// * pos2 - The position of the next checkpoint to point to.
/// * radius - The radius of the checkpoint.
/// * color - The color of the checkpoint.
/// * reserved - Special parameter, see below for details. Usually set to 0 in the scripts.
/// Checkpoint types:
/// 0-4---------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker
/// 5-9---------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker
/// 10-14-------Ring: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker
/// 15-19-------1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker
/// 20-24-------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker
/// 25-29-------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker
/// 30-34-------Cylinder: 1 arrow, 2 arrow, 3 arrows, CycleArrow, Checker
/// 35-38-------Ring: Airplane Up, Left, Right, UpsideDown
/// 39----------?
/// 40----------Ring: just a ring
/// 41----------?
/// 42-44-------Cylinder w/ number (uses 'reserved' parameter)
/// 45-47-------Cylinder no arrow or number
/// If using type 42-44, reserved sets number / number and shape to display
/// 0-99------------Just numbers (0-99)
/// 100-109-----------------Arrow (0-9)
/// 110-119------------Two arrows (0-9)
/// 120-129----------Three arrows (0-9)
/// 130-139----------------Circle (0-9)
/// 140-149------------CycleArrow (0-9)
/// 150-159----------------Circle (0-9)
/// 160-169----Circle w/ pointer (0-9)
/// 170-179-------Perforated ring (0-9)
/// 180-189----------------Sphere (0-9)
pub fn CREATE_CHECKPOINT(@"type": c_int, posX1: f32, posY1: f32, posZ1: f32, posX2: f32, posY2: f32, posZ2: f32, diameter: f32, red: c_int, green: c_int, blue: c_int, alpha: c_int, reserved: c_int) c_int {
return nativeCaller.invoke13(@as(u64, @intCast(86958739780190155)), @"type", posX1, posY1, posZ1, posX2, posY2, posZ2, diameter, red, green, blue, alpha, reserved);
}
/// Used to be known as _SET_CHECKPOINT_SCALE
pub fn SET_CHECKPOINT_INSIDE_CYLINDER_HEIGHT_SCALE(checkpoint: c_int, scale: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5430019150407735619)), checkpoint, scale);
}
/// Used to be known as _SET_CHECKPOINT_ICON_SCALE
pub fn SET_CHECKPOINT_INSIDE_CYLINDER_SCALE(checkpoint: c_int, scale: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4927523499458061606)), checkpoint, scale);
}
/// Sets the cylinder height of the checkpoint.
/// Parameters:
/// * nearHeight - The height of the checkpoint when inside of the radius.
/// * farHeight - The height of the checkpoint when outside of the radius.
/// * radius - The radius of the checkpoint.
pub fn SET_CHECKPOINT_CYLINDER_HEIGHT(checkpoint: c_int, nearHeight: f32, farHeight: f32, radius: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(2812404413663640969)), checkpoint, nearHeight, farHeight, radius);
}
/// Sets the checkpoint color.
pub fn SET_CHECKPOINT_RGBA(checkpoint: c_int, red: c_int, green: c_int, blue: c_int, alpha: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(8171560653204965367)), checkpoint, red, green, blue, alpha);
}
/// Sets the checkpoint icon color.
/// Used to be known as _SET_CHECKPOINT_ICON_RGBA
pub fn SET_CHECKPOINT_RGBA2(checkpoint: c_int, red: c_int, green: c_int, blue: c_int, alpha: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(13396591030873621888)), checkpoint, red, green, blue, alpha);
}
/// This does not move an existing checkpoint... so wtf.
pub fn SET_CHECKPOINT_CLIPPLANE_WITH_POS_NORM(checkpoint: c_int, posX: f32, posY: f32, posZ: f32, unkX: f32, unkY: f32, unkZ: f32) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(17662332791826895197)), checkpoint, posX, posY, posZ, unkX, unkY, unkZ);
}
pub fn SET_CHECKPOINT_FORCE_OLD_ARROW_POINTING(checkpoint: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18227889100701437140)), checkpoint);
}
/// Unknown. Called after creating a checkpoint (type: 51) in the creators.
pub fn SET_CHECKPOINT_DECAL_ROT_ALIGNED_TO_CAMERA_ROT(checkpoint: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7015826629489998630)), checkpoint);
}
pub fn SET_CHECKPOINT_FORCE_DIRECTION(checkpoint: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15789243440724251116)), checkpoint);
}
pub fn SET_CHECKPOINT_DIRECTION(checkpoint: c_int, posX: f32, posY: f32, posZ: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(4357389317274367309)), checkpoint, posX, posY, posZ);
}
pub fn DELETE_CHECKPOINT(checkpoint: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17720881635468301614)), checkpoint);
}
pub fn DONT_RENDER_IN_GAME_UI(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2495638117343839498)), p0);
}
pub fn FORCE_RENDER_IN_GAME_UI(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15872265059507774555)), toggle);
}
/// This function can requests texture dictonaries from following RPFs:
/// scaleform_generic.rpf
/// scaleform_minigames.rpf
/// scaleform_minimap.rpf
/// scaleform_web.rpf
/// last param isnt a toggle
pub fn REQUEST_STREAMED_TEXTURE_DICT(textureDict: [*c]const u8, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16114705809917771221)), textureDict, p1);
}
pub fn HAS_STREAMED_TEXTURE_DICT_LOADED(textureDict: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(91750494399812324)), textureDict);
}
pub fn SET_STREAMED_TEXTURE_DICT_AS_NO_LONGER_NEEDED(textureDict: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13703517772758820869)), textureDict);
}
/// Draws a rectangle on the screen.
/// -x: The relative X point of the center of the rectangle. (0.0-1.0, 0.0 is the left edge of the screen, 1.0 is the right edge of the screen)
/// -y: The relative Y point of the center of the rectangle. (0.0-1.0, 0.0 is the top edge of the screen, 1.0 is the bottom edge of the screen)
/// -width: The relative width of the rectangle. (0.0-1.0, 1.0 means the whole screen width)
/// -height: The relative height of the rectangle. (0.0-1.0, 1.0 means the whole screen height)
/// -R: Red part of the color. (0-255)
/// -G: Green part of the color. (0-255)
/// -B: Blue part of the color. (0-255)
/// -A: Alpha part of the color. (0-255, 0 means totally transparent, 255 means totally opaque)
/// The total number of rectangles to be drawn in one frame is apparently limited to 399.
pub fn DRAW_RECT(x: f32, y: f32, width: f32, height: f32, r: c_int, g: c_int, b: c_int, a: c_int, p8: windows.BOOL) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(4206795403398567152)), x, y, width, height, r, g, b, a, p8);
}
/// Sets a flag defining whether or not script draw commands should continue being drawn behind the pause menu. This is usually used for TV channels and other draw commands that are used with a world render target.
pub fn SET_SCRIPT_GFX_DRAW_BEHIND_PAUSEMENU(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14282936202403724237)), toggle);
}
/// Sets the draw order for script draw commands.
/// Examples from decompiled scripts:
/// GRAPHICS::SET_SCRIPT_GFX_DRAW_ORDER(7);
/// GRAPHICS::DRAW_RECT(0.5, 0.5, 3.0, 3.0, v_4, v_5, v_6, a_0._f172, 0);
/// GRAPHICS::SET_SCRIPT_GFX_DRAW_ORDER(1);
/// GRAPHICS::DRAW_RECT(0.5, 0.5, 1.5, 1.5, 0, 0, 0, 255, 0);
/// Used to be known as _SET_2D_LAYER
/// Used to be known as _SET_UI_LAYER
pub fn SET_SCRIPT_GFX_DRAW_ORDER(drawOrder: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7042254994863937538)), drawOrder);
}
/// horizontalAlign: The horizontal alignment. This can be 67 ('C'), 76 ('L'), or 82 ('R').
/// verticalAlign: The vertical alignment. This can be 67 ('C'), 66 ('B'), or 84 ('T').
/// This function anchors script draws to a side of the safe zone. This needs to be called to make the interface independent of the player's safe zone configuration.
/// These values are equivalent to alignX and alignY in common:/data/ui/frontend.xml, which can be used as a baseline for default alignment.
/// Using any other value (including 0) will result in the safe zone not being taken into account for this draw. The canonical value for this is 'I' (73).
/// For example, you can use SET_SCRIPT_GFX_ALIGN(0, 84) to only scale on the Y axis (to the top), but not change the X axis.
/// To reset the value, use RESET_SCRIPT_GFX_ALIGN.
/// Used to be known as _SET_SCREEN_DRAW_POSITION
/// Used to be known as _SCREEN_DRAW_POSITION_BEGIN
pub fn SET_SCRIPT_GFX_ALIGN(horizontalAlign: c_int, verticalAlign: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13305974099546635958)), horizontalAlign, verticalAlign);
}
/// This function resets the alignment set using SET_SCRIPT_GFX_ALIGN and SET_SCRIPT_GFX_ALIGN_PARAMS to the default values ('I', 'I'; 0, 0, 0, 0).
/// This should be used after having used the aforementioned functions in order to not affect any other scripts attempting to draw.
/// Used to be known as _SCREEN_DRAW_POSITION_END
pub fn RESET_SCRIPT_GFX_ALIGN() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(16403195341277969835)));
}
/// Sets the draw offset/calculated size for SET_SCRIPT_GFX_ALIGN. If using any alignment other than left/top, the game expects the width/height to be configured using this native in order to get a proper starting position for the draw command.
/// Used to be known as _SCREEN_DRAW_POSITION_RATIO
pub fn SET_SCRIPT_GFX_ALIGN_PARAMS(x: f32, y: f32, w: f32, h: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(17699927744894097309)), x, y, w, h);
}
/// Calculates the effective X/Y fractions when applying the values set by SET_SCRIPT_GFX_ALIGN and SET_SCRIPT_GFX_ALIGN_PARAMS
/// Used to be known as _GET_SCRIPT_GFX_POSITION
pub fn GET_SCRIPT_GFX_ALIGN_POSITION(x: f32, y: f32, calculatedX: [*c]f32, calculatedY: [*c]f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(7915346457264043186)), x, y, calculatedX, calculatedY);
}
/// Gets the scale of safe zone. if the safe zone size scale is max, it will return 1.0.
pub fn GET_SAFE_ZONE_SIZE() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(13470556441847568368)));
}
/// Draws a 2D sprite on the screen.
/// Parameters:
/// textureDict - Name of texture dictionary to load texture from (e.g. "CommonMenu", "MPWeaponsCommon", etc.)
/// textureName - Name of texture to load from texture dictionary (e.g. "last_team_standing_icon", "tennis_icon", etc.)
/// screenX/Y - Screen offset (0.5 = center)
/// scaleX/Y - Texture scaling. Negative values can be used to flip the texture on that axis. (0.5 = half)
/// heading - Texture rotation in degrees (default = 0.0) positive is clockwise, measured in degrees
/// red,green,blue - Sprite color (default = 255/255/255)
/// alpha - opacity level
pub fn DRAW_SPRITE(textureDict: [*c]const u8, textureName: [*c]const u8, screenX: f32, screenY: f32, width: f32, height: f32, heading: f32, red: c_int, green: c_int, blue: c_int, alpha: c_int, p11: windows.BOOL, p12: types.Any) void {
_ = nativeCaller.invoke13(@as(u64, @intCast(16717272063779526800)), textureDict, textureName, screenX, screenY, width, height, heading, red, green, blue, alpha, p11, p12);
}
/// Used in arcade games and Beam hack minigame in Doomsday Heist. I will most certainly dive into this to try replicate arcade games.
/// x position must be between 0.0 and 1.0 (1.0 being the most right side of the screen)
/// y position must be between 0.0 and 1.0 (1.0 being the most bottom side of the screen)
/// width 0.0 - 1.0 is the reasonable amount generally
/// height 0.0 - 1.0 is the reasonable amount generally
/// p6 almost always 0.0
/// p11 seems to be unknown but almost always 0 int
pub fn DRAW_SPRITE_ARX(textureDict: [*c]const u8, textureName: [*c]const u8, x: f32, y: f32, width: f32, height: f32, p6: f32, red: c_int, green: c_int, blue: c_int, alpha: c_int, p11: types.Any, p12: types.Any) void {
_ = nativeCaller.invoke13(@as(u64, @intCast(3259221273759489504)), textureDict, textureName, x, y, width, height, p6, red, green, blue, alpha, p11, p12);
}
/// Similar to _DRAW_SPRITE, but seems to be some kind of "interactive" sprite, at least used by render targets.
/// These seem to be the only dicts ever requested by this native:
/// prop_screen_biker_laptop
/// Prop_Screen_GR_Disruption
/// Prop_Screen_TaleOfUs
/// prop_screen_nightclub
/// Prop_Screen_IE_Adhawk
/// prop_screen_sm_free_trade_shipping
/// prop_screen_hacker_truck
/// MPDesktop
/// Prop_Screen_Nightclub
/// And a few others
/// Used to be known as _DRAW_INTERACTIVE_SPRITE
pub fn DRAW_SPRITE_NAMED_RENDERTARGET(textureDict: [*c]const u8, textureName: [*c]const u8, screenX: f32, screenY: f32, width: f32, height: f32, heading: f32, red: c_int, green: c_int, blue: c_int, alpha: c_int, p11: types.Any) void {
_ = nativeCaller.invoke12(@as(u64, @intCast(3154009034243605640)), textureDict, textureName, screenX, screenY, width, height, heading, red, green, blue, alpha, p11);
}
/// Similar to DRAW_SPRITE, but allows to specify the texture coordinates used to draw the sprite.
/// u1, v1 - texture coordinates for the top-left corner
/// u2, v2 - texture coordinates for the bottom-right corner
/// Used to be known as _DRAW_SPRITE_UV
pub fn DRAW_SPRITE_ARX_WITH_UV(textureDict: [*c]const u8, textureName: [*c]const u8, x: f32, y: f32, width: f32, height: f32, @"u1": f32, v1: f32, @"u2": f32, v2: f32, heading: f32, red: c_int, green: c_int, blue: c_int, alpha: c_int, p15: types.Any) void {
_ = nativeCaller.invoke16(@as(u64, @intCast(10772944127051384614)), textureDict, textureName, x, y, width, height, @"u1", v1, @"u2", v2, heading, red, green, blue, alpha, p15);
}
/// Example:
/// GRAPHICS::ADD_ENTITY_ICON(a_0, "MP_Arrow");
/// I tried this and nothing happened...
pub fn ADD_ENTITY_ICON(entity: types.Entity, icon: [*c]const u8) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(11300726557217082832)), entity, icon);
}
pub fn SET_ENTITY_ICON_VISIBILITY(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16206413183313164849)), entity, toggle);
}
pub fn SET_ENTITY_ICON_COLOR(entity: types.Entity, red: c_int, green: c_int, blue: c_int, alpha: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(2116508604963152440)), entity, red, green, blue, alpha);
}
/// Sets the on-screen drawing origin for draw-functions (which is normally x=0,y=0 in the upper left corner of the screen) to a world coordinate.
/// From now on, the screen coordinate which displays the given world coordinate on the screen is seen as x=0,y=0.
/// Example in C#:
/// Vector3 boneCoord = somePed.GetBoneCoord(Bone.SKEL_Head);
/// Function.Call(Hash.SET_DRAW_ORIGIN, boneCoord.X, boneCoord.Y, boneCoord.Z, 0);
/// Function.Call(Hash.DRAW_SPRITE, "helicopterhud", "hud_corner", -0.01, -0.015, 0.013, 0.013, 0.0, 255, 0, 0, 200);
/// Function.Call(Hash.DRAW_SPRITE, "helicopterhud", "hud_corner", 0.01, -0.015, 0.013, 0.013, 90.0, 255, 0, 0, 200);
/// Function.Call(Hash.DRAW_SPRITE, "helicopterhud", "hud_corner", -0.01, 0.015, 0.013, 0.013, 270.0, 255, 0, 0, 200);
/// Function.Call(Hash.DRAW_SPRITE, "helicopterhud", "hud_corner", 0.01, 0.015, 0.013, 0.013, 180.0, 255, 0, 0, 200);
/// Function.Call(Hash.CLEAR_DRAW_ORIGIN);
/// Result: www11.pic-upload.de/19.06.15/bkqohvil2uao.jpg
/// If the pedestrian starts walking around now, the sprites are always around her head, no matter where the head is displayed on the screen.
/// This function also effects the drawing of texts and other UI-elements.
/// The effect can be reset by calling GRAPHICS::CLEAR_DRAW_ORIGIN().
pub fn SET_DRAW_ORIGIN(x: f32, y: f32, z: f32, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(12249800829367284758)), x, y, z, p3);
}
/// Resets the screen's draw-origin which was changed by the function GRAPHICS::SET_DRAW_ORIGIN(...) back to x=0,y=0.
/// See GRAPHICS::SET_DRAW_ORIGIN(...) for further information.
pub fn CLEAR_DRAW_ORIGIN() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(18377889423277741999)));
}
/// Used to be known as _SET_BINK_MOVIE_REQUESTED
/// Used to be known as _SET_BINK_MOVIE
pub fn SET_BINK_MOVIE(name: [*c]const u8) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(3714800504997819099)), name);
}
/// Used to be known as _PLAY_BINK_MOVIE
pub fn PLAY_BINK_MOVIE(binkMovie: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8129785171846797116)), binkMovie);
}
/// Used to be known as _STOP_BINK_MOVIE
pub fn STOP_BINK_MOVIE(binkMovie: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7160840376094853514)), binkMovie);
}
/// Used to be known as _RELEASE_BINK_MOVIE
pub fn RELEASE_BINK_MOVIE(binkMovie: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(349399433429839244)), binkMovie);
}
/// Used to be known as _DRAW_BINK_MOVIE
pub fn DRAW_BINK_MOVIE(binkMovie: c_int, p1: f32, p2: f32, p3: f32, p4: f32, p5: f32, r: c_int, g: c_int, b: c_int, a: c_int) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(8149518882665624120)), binkMovie, p1, p2, p3, p4, p5, r, g, b, a);
}
/// In percentage: 0.0 - 100.0
/// Used to be known as _SET_BINK_MOVIE_PROGRESS
/// Used to be known as _SET_BINK_MOVIE_TIME
pub fn SET_BINK_MOVIE_TIME(binkMovie: c_int, progress: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(916116680606070138)), binkMovie, progress);
}
/// In percentage: 0.0 - 100.0
/// Used to be known as _GET_BINK_MOVIE_TIME
pub fn GET_BINK_MOVIE_TIME(binkMovie: c_int) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(10238896192160644905)), binkMovie);
}
/// binkMovie: Is return value from _SET_BINK_MOVIE. Has something to do with bink volume? (audRequestedSettings::SetVolumeCurveScale)
/// Used to be known as _SET_BINK_MOVIE_UNK
/// Used to be known as _SET_BINK_MOVIE_VOLUME
pub fn SET_BINK_MOVIE_VOLUME(binkMovie: c_int, value: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12678542322193343011)), binkMovie, value);
}
/// Might be more appropriate in AUDIO?
pub fn ATTACH_TV_AUDIO_TO_ENTITY(entity: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9537407365930223155)), entity);
}
/// Used to be known as _SET_BINK_MOVIE_UNK_2
pub fn SET_BINK_MOVIE_AUDIO_FRONTEND(binkMovie: c_int, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17876742484996010541)), binkMovie, p1);
}
/// Probably changes tvs from being a 3d audio to being "global" audio
pub fn SET_TV_AUDIO_FRONTEND(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1242197853481080692)), toggle);
}
/// Used to be known as _SET_BINK_SHOULD_SKIP
pub fn SET_BINK_SHOULD_SKIP(binkMovie: c_int, bShouldSkip: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7495631954956680050)), binkMovie, bShouldSkip);
}
pub fn LOAD_MOVIE_MESH_SET(movieMeshSetName: [*c]const u8) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(13141613960760453361)), movieMeshSetName);
}
pub fn RELEASE_MOVIE_MESH_SET(movieMeshSet: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16938489685853376899)), movieMeshSet);
}
pub fn QUERY_MOVIE_MESH_SET_STATE(p0: types.Any) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(11200013318199660267)), p0);
}
/// int screenresx,screenresy;
/// GET_SCREEN_RESOLUTION(&screenresx,&screenresy);
pub fn GET_SCREEN_RESOLUTION(x: [*c]c_int, y: [*c]c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9839617397771089444)), x, y);
}
/// Returns current screen resolution.
/// Used to be known as _GET_SCREEN_ACTIVE_RESOLUTION
/// Used to be known as _GET_ACTIVE_SCREEN_RESOLUTION
pub fn GET_ACTUAL_SCREEN_RESOLUTION(x: [*c]c_int, y: [*c]c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9744838726593289683)), x, y);
}
/// Used to be known as _GET_SCREEN_ASPECT_RATIO
/// Used to be known as _GET_ASPECT_RATIO
pub fn GET_ASPECT_RATIO(b: windows.BOOL) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(17379530557664791943)), b);
}
pub fn GET_SCREEN_ASPECT_RATIO() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(12892654320168440041)));
}
/// Setting Aspect Ratio Manually in game will return:
/// false - for Narrow format Aspect Ratios (3:2, 4:3, 5:4, etc. )
/// true - for Wide format Aspect Ratios (5:3, 16:9, 16:10, etc. )
/// Setting Aspect Ratio to "Auto" in game will return "false" or "true" based on the actual set Resolution Ratio.
pub fn GET_IS_WIDESCREEN() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(3517113235013310725)));
}
/// false = Any resolution < 1280x720
/// true = Any resolution >= 1280x720
pub fn GET_IS_HIDEF() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9578365966413583049)));
}
pub fn ADJUST_NEXT_POS_SIZE_AS_NORMALIZED_16_9() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(17270116489102613116)));
}
/// Enables Night Vision.
/// Example:
/// C#: Function.Call(Hash.SET_NIGHTVISION, true);
/// C++: GRAPHICS::SET_NIGHTVISION(true);
/// BOOL toggle:
/// true = turns night vision on for your player.
/// false = turns night vision off for your player.
pub fn SET_NIGHTVISION(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1798662448701634653)), toggle);
}
pub fn GET_REQUESTINGNIGHTVISION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(3889835590572031265)));
}
/// Used to be known as _IS_NIGHTVISION_INACTIVE
/// Used to be known as _IS_NIGHTVISION_ACTIVE
pub fn GET_USINGNIGHTVISION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(2450701416357846905)));
}
pub fn SET_EXPOSURETWEAK(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17237962906896647673)), toggle);
}
pub fn FORCE_EXPOSURE_READBACK(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9316531306299677051)), toggle);
}
pub fn OVERRIDE_NIGHTVISION_LIGHT_RANGE(p0: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4898364700755669529)), p0);
}
pub fn SET_NOISEOVERIDE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16683513473157047241)), toggle);
}
pub fn SET_NOISINESSOVERIDE(value: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14657664533053181031)), value);
}
/// Convert a world coordinate into its relative screen coordinate. (WorldToScreen)
/// Returns a boolean; whether or not the operation was successful. It will return false if the coordinates given are not visible to the rendering camera.
/// For .NET users...
/// VB:
/// Public Shared Function World3DToScreen2d(pos as vector3) As Vector2
/// Dim x2dp, y2dp As New Native.OutputArgument
/// Native.Function.Call(Of Boolean)(Native.Hash.GET_SCREEN_COORD_FROM_WORLD_COORD , pos.x, pos.y, pos.z, x2dp, y2dp)
/// Return New Vector2(x2dp.GetResult(Of Single), y2dp.GetResult(Of Single))
///
/// End Function
/// C#:
/// Vector2 World3DToScreen2d(Vector3 pos)
/// {
/// var x2dp = new OutputArgument();
/// var y2dp = new OutputArgument();
/// Function.Call<bool>(Hash.GET_SCREEN_COORD_FROM_WORLD_COORD , pos.X, pos.Y, pos.Z, x2dp, y2dp);
/// return new Vector2(x2dp.GetResult<float>(), y2dp.GetResult<float>());
/// }
/// //USE VERY SMALL VALUES FOR THE SCALE OF RECTS/TEXT because it is dramatically larger on screen than in 3D, e.g '0.05' small.
/// Used to be called _WORLD3D_TO_SCREEN2D
/// I thought we lost you from the scene forever. It does seem however that calling SET_DRAW_ORIGIN then your natives, then ending it. Seems to work better for certain things such as keeping boxes around people for a predator missile e.g.
/// Used to be known as _WORLD3D_TO_SCREEN2D
pub fn GET_SCREEN_COORD_FROM_WORLD_COORD(worldX: f32, worldY: f32, worldZ: f32, screenX: [*c]f32, screenY: [*c]f32) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(3812348786834502901)), worldX, worldY, worldZ, screenX, screenY);
}
/// Returns the texture resolution of the passed texture dict+name.
/// Note: Most texture resolutions are doubled compared to the console version of the game.
pub fn GET_TEXTURE_RESOLUTION(textureDict: [*c]const u8, textureName: [*c]const u8) types.Vector3 {
return nativeCaller.invoke2(@as(u64, @intCast(3851544041993800721)), textureDict, textureName);
}
/// Overriding ped badge texture to a passed texture. It's synced between players (even custom textures!), don't forget to request used dict on *all* clients to make it sync properly. Can be removed by passing empty strings.
/// Used to be known as _OVERRIDE_PED_BADGE_TEXTURE
pub fn OVERRIDE_PED_CREW_LOGO_TEXTURE(ped: types.Ped, txd: [*c]const u8, txn: [*c]const u8) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(10802831712772537022)), ped, txd, txn);
}
pub fn SET_DISTANCE_BLUR_STRENGTH_OVERRIDE(p0: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16323629444521985850)), p0);
}
/// Purpose of p0 and p1 unknown.
pub fn SET_FLASH(p0: f32, p1: f32, fadeIn: f32, duration: f32, fadeOut: f32) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(772440552382255046)), p0, p1, fadeIn, duration, fadeOut);
}
pub fn DISABLE_OCCLUSION_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(3920930695678831183)));
}
/// Does not affect weapons, particles, fire/explosions, flashlights or the sun.
/// When set to true, all emissive textures (including ped components that have light effects), street lights, building lights, vehicle lights, etc will all be turned off.
/// Used in Humane Labs Heist for EMP.
/// state: True turns off all artificial light sources in the map: buildings, street lights, car lights, etc. False turns them back on.
/// Used to be known as _SET_BLACKOUT
pub fn SET_ARTIFICIAL_LIGHTS_STATE(state: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1326417132894082308)), state);
}
/// If "blackout" is enabled, this native allows you to ignore "blackout" for vehicles.
/// Used to be known as _SET_ARTIFICIAL_LIGHTS_STATE_AFFECTS_VEHICLES
pub fn SET_ARTIFICIAL_VEHICLE_LIGHTS_STATE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16334986584629394738)), toggle);
}
pub fn DISABLE_HDTEX_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(14076683465507996338)));
}
/// Creates a tracked point, useful for checking the visibility of a 3D point on screen.
pub fn CREATE_TRACKED_POINT() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(16341667072337373792)));
}
pub fn SET_TRACKED_POINT_INFO(point: c_int, x: f32, y: f32, z: f32, radius: f32) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(1607446090157984944)), point, x, y, z, radius);
}
pub fn IS_TRACKED_POINT_VISIBLE(point: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14149410262693846184)), point);
}
pub fn DESTROY_TRACKED_POINT(point: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12852649963575233090)), point);
}
/// This function is hard-coded to always return 0.
pub fn SET_GRASS_CULL_SPHERE(p0: f32, p1: f32, p2: f32, p3: f32) c_int {
return nativeCaller.invoke4(@as(u64, @intCast(13698119011954473204)), p0, p1, p2, p3);
}
/// This native does absolutely nothing, just a nullsub
pub fn REMOVE_GRASS_CULL_SPHERE(handle: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7059777638832842950)), handle);
}
pub fn PROCGRASS_ENABLE_CULLSPHERE(handle: c_int, x: f32, y: f32, z: f32, scale: f32) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(12561028117532162662)), handle, x, y, z, scale);
}
pub fn PROCGRASS_DISABLE_CULLSPHERE(handle: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7249836441833976858)), handle);
}
pub fn PROCGRASS_IS_CULLSPHERE_ENABLED(handle: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3189168727600683312)), handle);
}
pub fn PROCGRASS_ENABLE_AMBSCALESCAN() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(1512180552135033000)));
}
pub fn PROCGRASS_DISABLE_AMBSCALESCAN() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(151075124549033450)));
}
pub fn DISABLE_PROCOBJ_CREATION() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(1590549533371010372)));
}
pub fn ENABLE_PROCOBJ_CREATION() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(6767742304592156306)));
}
pub fn GRASSBATCH_ENABLE_FLATTENING_EXT_IN_SPHERE(x: f32, y: f32, z: f32, p3: types.Any, p4: f32, p5: f32, p6: f32, scale: f32) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(12315584048234523051)), x, y, z, p3, p4, p5, p6, scale);
}
/// Wraps 0xAAE9BE70EC7C69AB with FLT_MAX as p7, Jenkins: 0x73E96210?
/// Used to be known as _GRASS_LOD_SHRINK_SCRIPT_AREAS
pub fn GRASSBATCH_ENABLE_FLATTENING_IN_SPHERE(x: f32, y: f32, z: f32, radius: f32, p4: f32, p5: f32, p6: f32) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(7896322433186174385)), x, y, z, radius, p4, p5, p6);
}
/// Used to be known as _GRASS_LOD_RESET_SCRIPT_AREAS
pub fn GRASSBATCH_DISABLE_FLATTENING() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(3471309577180905342)));
}
pub fn CASCADE_SHADOWS_INIT_SESSION() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(287220246558562848)));
}
pub fn CASCADE_SHADOWS_SET_CASCADE_BOUNDS(p0: types.Any, p1: windows.BOOL, p2: f32, p3: f32, p4: f32, p5: f32, p6: windows.BOOL, p7: f32) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(15173591053574405309)), p0, p1, p2, p3, p4, p5, p6, p7);
}
pub fn CASCADE_SHADOWS_SET_CASCADE_BOUNDS_SCALE(p0: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6849763198520265199)), p0);
}
pub fn CASCADE_SHADOWS_SET_ENTITY_TRACKER_SCALE(p0: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6817798212543404296)), p0);
}
pub fn CASCADE_SHADOWS_SET_SPLIT_Z_EXP_WEIGHT(p0: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3960461105462580311)), p0);
}
pub fn CASCADE_SHADOWS_SET_BOUND_POSITION(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2709943034131777777)), p0);
}
/// When this is set to ON, shadows only draw as you get nearer.
/// When OFF, they draw from a further distance.
/// Used to be known as _SET_FAR_SHADOWS_SUPPRESSED
pub fn CASCADE_SHADOWS_ENABLE_ENTITY_TRACKER(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9290006893322648331)), toggle);
}
pub fn CASCADE_SHADOWS_SET_SCREEN_SIZE_CHECK_ENABLED(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2737131065035116745)), p0);
}
/// Possible values:
/// "CSM_ST_POINT"
/// "CSM_ST_LINEAR"
/// "CSM_ST_TWOTAP"
/// "CSM_ST_BOX3x3"
/// "CSM_ST_BOX4x4"
/// "CSM_ST_DITHER2_LINEAR"
/// "CSM_ST_CUBIC"
/// "CSM_ST_DITHER4"
/// "CSM_ST_DITHER16"
/// "CSM_ST_SOFT16"
/// "CSM_ST_DITHER16_RPDB"
/// "CSM_ST_POISSON16_RPDB_GNORM"
/// "CSM_ST_HIGHRES_BOX4x4"
/// "CSM_ST_CLOUDS_SIMPLE"
/// "CSM_ST_CLOUDS_LINEAR"
/// "CSM_ST_CLOUDS_TWOTAP"
/// "CSM_ST_CLOUDS_BOX3x3"
/// "CSM_ST_CLOUDS_BOX4x4"
/// "CSM_ST_CLOUDS_DITHER2_LINEAR"
/// "CSM_ST_CLOUDS_SOFT16"
/// "CSM_ST_CLOUDS_DITHER16_RPDB"
/// "CSM_ST_CLOUDS_POISSON16_RPDB_GNORM"
/// Used to be known as _CASCADESHADOWS_SET_TYPE
pub fn CASCADE_SHADOWS_SET_SHADOW_SAMPLE_TYPE(@"type": [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12762520455654676786)), @"type");
}
/// Used to be known as _CASCADESHADOWS_RESET_TYPE
pub fn CASCADE_SHADOWS_CLEAR_SHADOW_SAMPLE_TYPE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(2867516576068883237)));
}
pub fn CASCADE_SHADOWS_SET_AIRCRAFT_MODE(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7916195510439559296)), p0);
}
pub fn CASCADE_SHADOWS_SET_DYNAMIC_DEPTH_MODE(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15248365671629653265)), p0);
}
pub fn CASCADE_SHADOWS_SET_DYNAMIC_DEPTH_VALUE(p0: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(192573910898679882)), p0);
}
pub fn CASCADE_SHADOWS_ENABLE_FREEZER(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(785664339886957234)), p0);
}
pub fn WATER_REFLECTION_SET_SCRIPT_OBJECT_VISIBILITY(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14575440171862471098)), p0);
}
pub fn GOLF_TRAIL_SET_ENABLED(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11897467357575402158)), toggle);
}
/// p8 seems to always be false.
pub fn GOLF_TRAIL_SET_PATH(p0: f32, p1: f32, p2: f32, p3: f32, p4: f32, p5: f32, p6: f32, p7: f32, p8: windows.BOOL) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(3540747268938747711)), p0, p1, p2, p3, p4, p5, p6, p7, p8);
}
pub fn GOLF_TRAIL_SET_RADIUS(p0: f32, p1: f32, p2: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2631741890581638788)), p0, p1, p2);
}
pub fn GOLF_TRAIL_SET_COLOUR(p0: c_int, p1: c_int, p2: c_int, p3: c_int, p4: c_int, p5: c_int, p6: c_int, p7: c_int, p8: c_int, p9: c_int, p10: c_int, p11: c_int) void {
_ = nativeCaller.invoke12(@as(u64, @intCast(1340207016701830657)), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11);
}
pub fn GOLF_TRAIL_SET_TESSELLATION(p0: c_int, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15828568054653660486)), p0, p1);
}
pub fn GOLF_TRAIL_SET_FIXED_CONTROL_POINT_ENABLE(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13853471602805276254)), p0);
}
/// 12 matches across 4 scripts. All 4 scripts were job creators.
/// type ranged from 0 - 2.
/// p4 was always 0.2f. Likely scale.
/// assuming p5 - p8 is RGBA, the graphic is always yellow (255, 255, 0, 255).
/// Tested but noticed nothing.
pub fn GOLF_TRAIL_SET_FIXED_CONTROL_POINT(@"type": c_int, xPos: f32, yPos: f32, zPos: f32, p4: f32, red: c_int, green: c_int, blue: c_int, alpha: c_int) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(12806833762798642646)), @"type", xPos, yPos, zPos, p4, red, green, blue, alpha);
}
/// Only appeared in Golf & Golf_mp. Parameters were all ptrs
pub fn GOLF_TRAIL_SET_SHADER_PARAMS(p0: f32, p1: f32, p2: f32, p3: f32, p4: f32) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(11312436481022512119)), p0, p1, p2, p3, p4);
}
pub fn GOLF_TRAIL_SET_FACING(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(501977542329226221)), p0);
}
pub fn GOLF_TRAIL_GET_MAX_HEIGHT() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(11853930920893677485)));
}
pub fn GOLF_TRAIL_GET_VISUAL_CONTROL_POINT(p0: c_int) types.Vector3 {
return nativeCaller.invoke1(@as(u64, @intCast(11846236626667239610)), p0);
}
/// Toggles Heatvision on/off.
pub fn SET_SEETHROUGH(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9081669462265990368)), toggle);
}
/// Used to be known as _IS_SEETHROUGH_ACTIVE
pub fn GET_USINGSEETHROUGH() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(4951719587391998931)));
}
pub fn SEETHROUGH_RESET() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(8117258950743642668)));
}
/// Used to be known as _SEETHROUGH_SET_FADE_START_DISTANCE
pub fn SEETHROUGH_SET_FADE_STARTDISTANCE(distance: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12073555032749902753)), distance);
}
/// Used to be known as _SEETHROUGH_SET_FADE_END_DISTANCE
pub fn SEETHROUGH_SET_FADE_ENDDISTANCE(distance: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11346108270625876927)), distance);
}
/// Used to be known as _SEETHROUGH_GET_MAX_THICKNESS
pub fn SEETHROUGH_GET_MAX_THICKNESS() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(4889693381928478783)));
}
/// 0.0 = you will not be able to see people behind the walls. 50.0 and more = you will see everyone through the walls. More value is "better" view. See https://gfycat.com/FirmFlippantGourami
/// min: 1.0
/// max: 10000.0
/// Used to be known as _SEETHROUGH_SET_MAX_THICKNESS
pub fn SEETHROUGH_SET_MAX_THICKNESS(thickness: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(905131731184149215)), thickness);
}
/// Used to be known as _SEETHROUGH_SET_NOISE_AMOUNT_MIN
pub fn SEETHROUGH_SET_NOISE_MIN(amount: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18399899251051486469)), amount);
}
/// Used to be known as _SEETHROUGH_SET_NOISE_AMOUNT_MAX
pub fn SEETHROUGH_SET_NOISE_MAX(amount: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18356601573743802846)), amount);
}
/// Used to be known as _SEETHROUGH_SET_HI_LIGHT_INTENSITY
pub fn SEETHROUGH_SET_HILIGHT_INTENSITY(intensity: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1865913799274274088)), intensity);
}
/// Used to be known as _SEETHROUGH_SET_HI_LIGHT_NOISE
pub fn SEETHROUGH_SET_HIGHLIGHT_NOISE(noise: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1600704195218575570)), noise);
}
/// min: 0.0
/// max: 0.75
pub fn SEETHROUGH_SET_HEATSCALE(index: c_int, heatScale: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15551123033653007377)), index, heatScale);
}
/// Used to be known as _SEETHROUGH_SET_COLOR_NEAR
pub fn SEETHROUGH_SET_COLOR_NEAR(red: c_int, green: c_int, blue: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(1190659471955939422)), red, green, blue);
}
/// Setter for GET_MOTIONBLUR_MAX_VEL_SCALER
pub fn SET_MOTIONBLUR_MAX_VEL_SCALER(p0: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12954113891772397274)), p0);
}
/// Getter for SET_MOTIONBLUR_MAX_VEL_SCALER
pub fn GET_MOTIONBLUR_MAX_VEL_SCALER() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(16542640528184125927)));
}
pub fn SET_FORCE_MOTIONBLUR(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7661176602240703057)), toggle);
}
pub fn TOGGLE_PLAYER_DAMAGE_OVERLAY(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16590553418165958251)), toggle);
}
/// Sets an value related to timecycles.
pub fn RESET_ADAPTATION(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16420900173499972727)), p0);
}
/// time in ms to transition to fully blurred screen
/// Used to be known as _TRANSITION_TO_BLURRED
pub fn TRIGGER_SCREENBLUR_FADE_IN(transitionTime: f32) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11756825268821131228)), transitionTime);
}
/// time in ms to transition from fully blurred to normal
/// Used to be known as _TRANSITION_FROM_BLURRED
pub fn TRIGGER_SCREENBLUR_FADE_OUT(transitionTime: f32) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(17270399324890869973)), transitionTime);
}
/// Used to be known as PAUSED_SCREENBLUR_LOADED
pub fn DISABLE_SCREENBLUR_FADE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(16033135267915810216)));
}
/// Used to be known as IS_PARTICLE_FX_DELAYED_BLINK
pub fn GET_SCREENBLUR_FADE_CURRENT_TIME() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(6686367688574230067)));
}
/// Returns whether screen transition to blur/from blur is running.
pub fn IS_SCREENBLUR_FADE_RUNNING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8872773480040538281)));
}
/// Used to be known as _ENABLE_GAMEPLAY_CAM
/// Used to be known as _SET_FROZEN_RENDERING_DISABLED
pub fn TOGGLE_PAUSED_RENDERPHASES(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16123540706355665591)), toggle);
}
pub fn GET_TOGGLE_PAUSED_RENDERPHASES_STATUS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(16950893879719108190)));
}
pub fn RESET_PAUSED_RENDERPHASES() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(16269377434949960732)));
}
pub fn GRAB_PAUSEMENU_OWNERSHIP() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(9591780051132529276)));
}
/// Used to be known as _SET_HIDOF_ENV_BLUR_PARAMS
pub fn SET_HIDOF_OVERRIDE(p0: windows.BOOL, p1: windows.BOOL, nearplaneOut: f32, nearplaneIn: f32, farplaneOut: f32, farplaneIn: f32) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(13419994135530749653)), p0, p1, nearplaneOut, nearplaneIn, farplaneOut, farplaneIn);
}
pub fn SET_LOCK_ADAPTIVE_DOF_DISTANCE(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13072247808449217444)), p0);
}
pub fn PHONEPHOTOEDITOR_TOGGLE(p0: windows.BOOL) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8845719116291772813)), p0);
}
pub fn PHONEPHOTOEDITOR_IS_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(13613730802488418646)));
}
pub fn PHONEPHOTOEDITOR_SET_FRAME_TXD(textureDict: [*c]const u8, p1: windows.BOOL) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(2881939983279181283)), textureDict, p1);
}
/// GRAPHICS::START_PARTICLE_FX_NON_LOOPED_AT_COORD("scr_paleto_roof_impact", -140.8576f, 6420.789f, 41.1391f, 0f, 0f, 267.3957f, 0x3F800000, 0, 0, 0);
/// Axis - Invert Axis Flags
/// Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json
/// -------------------------------------------------------------------
/// C#
/// Function.Call<int>(Hash.START_PARTICLE_FX_NON_LOOPED_AT_COORD, = you are calling this function.
/// char *effectname = This is an in-game effect name, for e.g. "scr_fbi4_trucks_crash" is used to give the effects when truck crashes etc
/// float x, y, z pos = this one is Simple, you just have to declare, where do you want this effect to take place at, so declare the ordinates
/// float xrot, yrot, zrot = Again simple? just mention the value in case if you want the effect to rotate.
/// float scale = is declare the scale of the effect, this may vary as per the effects for e.g 1.0f
/// bool xaxis, yaxis, zaxis = To bool the axis values.
/// example:
/// Function.Call<int>(Hash.START_PARTICLE_FX_NON_LOOPED_AT_COORD, "scr_fbi4_trucks_crash", GTA.Game.Player.Character.Position.X, GTA.Game.Player.Character.Position.Y, GTA.Game.Player.Character.Position.Z + 4f, 0, 0, 0, 5.5f, 0, 0, 0);
pub fn START_PARTICLE_FX_NON_LOOPED_AT_COORD(effectName: [*c]const u8, xPos: f32, yPos: f32, zPos: f32, xRot: f32, yRot: f32, zRot: f32, scale: f32, xAxis: windows.BOOL, yAxis: windows.BOOL, zAxis: windows.BOOL) windows.BOOL {
return nativeCaller.invoke11(@as(u64, @intCast(2671361570822135507)), effectName, xPos, yPos, zPos, xRot, yRot, zRot, scale, xAxis, yAxis, zAxis);
}
/// Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json
/// Used to be known as _START_PARTICLE_FX_NON_LOOPED_AT_COORD_2
pub fn START_NETWORKED_PARTICLE_FX_NON_LOOPED_AT_COORD(effectName: [*c]const u8, xPos: f32, yPos: f32, zPos: f32, xRot: f32, yRot: f32, zRot: f32, scale: f32, xAxis: windows.BOOL, yAxis: windows.BOOL, zAxis: windows.BOOL, p11: windows.BOOL) windows.BOOL {
return nativeCaller.invoke12(@as(u64, @intCast(17684370438765941597)), effectName, xPos, yPos, zPos, xRot, yRot, zRot, scale, xAxis, yAxis, zAxis, p11);
}
/// GRAPHICS::START_PARTICLE_FX_NON_LOOPED_ON_PED_BONE("scr_sh_bong_smoke", PLAYER::PLAYER_PED_ID(), -0.025f, 0.13f, 0f, 0f, 0f, 0f, 31086, 0x3F800000, 0, 0, 0);
/// Axis - Invert Axis Flags
/// Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json
pub fn START_PARTICLE_FX_NON_LOOPED_ON_PED_BONE(effectName: [*c]const u8, ped: types.Ped, offsetX: f32, offsetY: f32, offsetZ: f32, rotX: f32, rotY: f32, rotZ: f32, boneIndex: c_int, scale: f32, axisX: windows.BOOL, axisY: windows.BOOL, axisZ: windows.BOOL) windows.BOOL {
return nativeCaller.invoke13(@as(u64, @intCast(1044398152630765081)), effectName, ped, offsetX, offsetY, offsetZ, rotX, rotY, rotZ, boneIndex, scale, axisX, axisY, axisZ);
}
/// Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json
/// Used to be known as _START_PARTICLE_FX_NON_LOOPED_ON_PED_BONE_2
pub fn START_NETWORKED_PARTICLE_FX_NON_LOOPED_ON_PED_BONE(effectName: [*c]const u8, ped: types.Ped, offsetX: f32, offsetY: f32, offsetZ: f32, rotX: f32, rotY: f32, rotZ: f32, boneIndex: c_int, scale: f32, axisX: windows.BOOL, axisY: windows.BOOL, axisZ: windows.BOOL) windows.BOOL {
return nativeCaller.invoke13(@as(u64, @intCast(11825162084267246287)), effectName, ped, offsetX, offsetY, offsetZ, rotX, rotY, rotZ, boneIndex, scale, axisX, axisY, axisZ);
}
/// Starts a particle effect on an entity for example your player.
/// Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json
/// Example:
/// C#:
/// Function.Call(Hash.REQUEST_NAMED_PTFX_ASSET, "scr_rcbarry2"); Function.Call(Hash.USE_PARTICLE_FX_ASSET, "scr_rcbarry2"); Function.Call(Hash.START_PARTICLE_FX_NON_LOOPED_ON_ENTITY, "scr_clown_appears", Game.Player.Character, 0.0, 0.0, -0.5, 0.0, 0.0, 0.0, 1.0, false, false, false);
/// Internally this calls the same function as GRAPHICS::START_PARTICLE_FX_NON_LOOPED_ON_PED_BONE
/// however it uses -1 for the specified bone index, so it should be possible to start a non looped fx on an entity bone using that native
/// -can confirm START_PARTICLE_FX_NON_LOOPED_ON_PED_BONE does NOT work on vehicle bones.
pub fn START_PARTICLE_FX_NON_LOOPED_ON_ENTITY(effectName: [*c]const u8, entity: types.Entity, offsetX: f32, offsetY: f32, offsetZ: f32, rotX: f32, rotY: f32, rotZ: f32, scale: f32, axisX: windows.BOOL, axisY: windows.BOOL, axisZ: windows.BOOL) windows.BOOL {
return nativeCaller.invoke12(@as(u64, @intCast(960291159887317458)), effectName, entity, offsetX, offsetY, offsetZ, rotX, rotY, rotZ, scale, axisX, axisY, axisZ);
}
/// Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json
/// Used to be known as _START_PARTICLE_FX_NON_LOOPED_ON_ENTITY_2
pub fn START_NETWORKED_PARTICLE_FX_NON_LOOPED_ON_ENTITY(effectName: [*c]const u8, entity: types.Entity, offsetX: f32, offsetY: f32, offsetZ: f32, rotX: f32, rotY: f32, rotZ: f32, scale: f32, axisX: windows.BOOL, axisY: windows.BOOL, axisZ: windows.BOOL) windows.BOOL {
return nativeCaller.invoke12(@as(u64, @intCast(14510230605445337405)), effectName, entity, offsetX, offsetY, offsetZ, rotX, rotY, rotZ, scale, axisX, axisY, axisZ);
}
/// Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json
/// Used to be known as _START_NETWORKED_PARTICLE_FX_NON_LOOPED_ON_ENTITY_BONE
pub fn START_PARTICLE_FX_NON_LOOPED_ON_ENTITY_BONE(effectName: [*c]const u8, entity: types.Entity, offsetX: f32, offsetY: f32, offsetZ: f32, rotX: f32, rotY: f32, rotZ: f32, boneIndex: c_int, scale: f32, axisX: windows.BOOL, axisY: windows.BOOL, axisZ: windows.BOOL) windows.BOOL {
return nativeCaller.invoke13(@as(u64, @intCast(194203058799858469)), effectName, entity, offsetX, offsetY, offsetZ, rotX, rotY, rotZ, boneIndex, scale, axisX, axisY, axisZ);
}
/// only works on some fx's, not networked
pub fn SET_PARTICLE_FX_NON_LOOPED_COLOUR(r: f32, g: f32, b: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2743882230916493922)), r, g, b);
}
/// Usage example for C#:
/// Function.Call(Hash.SET_PARTICLE_FX_NON_LOOPED_ALPHA, new InputArgument[] { 0.1f });
/// Note: the argument alpha ranges from 0.0f-1.0f !
pub fn SET_PARTICLE_FX_NON_LOOPED_ALPHA(alpha: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8581201661510857468)), alpha);
}
pub fn SET_PARTICLE_FX_NON_LOOPED_SCALE(scale: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13253909332277308362)), scale);
}
/// Used to be known as _SET_PARTICLE_FX_NON_LOOPED_EMITTER_SCALE
pub fn SET_PARTICLE_FX_NON_LOOPED_EMITTER_SIZE(p0: f32, p1: f32, scale: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2174677594349752942)), p0, p1, scale);
}
/// Used only once in the scripts (taxi_clowncar)
pub fn SET_PARTICLE_FX_FORCE_VEHICLE_INTERIOR(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10150709601296759610)), toggle);
}
/// GRAPHICS::START_PARTICLE_FX_LOOPED_AT_COORD("scr_fbi_falling_debris", 93.7743f, -749.4572f, 70.86904f, 0f, 0f, 0f, 0x3F800000, 0, 0, 0, 0)
/// p11 seems to be always 0
/// Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json
pub fn START_PARTICLE_FX_LOOPED_AT_COORD(effectName: [*c]const u8, x: f32, y: f32, z: f32, xRot: f32, yRot: f32, zRot: f32, scale: f32, xAxis: windows.BOOL, yAxis: windows.BOOL, zAxis: windows.BOOL, p11: windows.BOOL) c_int {
return nativeCaller.invoke12(@as(u64, @intCast(16250382670785745127)), effectName, x, y, z, xRot, yRot, zRot, scale, xAxis, yAxis, zAxis, p11);
}
/// Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json
pub fn START_PARTICLE_FX_LOOPED_ON_PED_BONE(effectName: [*c]const u8, ped: types.Ped, xOffset: f32, yOffset: f32, zOffset: f32, xRot: f32, yRot: f32, zRot: f32, boneIndex: c_int, scale: f32, xAxis: windows.BOOL, yAxis: windows.BOOL, zAxis: windows.BOOL) c_int {
return nativeCaller.invoke13(@as(u64, @intCast(17477812592399448188)), effectName, ped, xOffset, yOffset, zOffset, xRot, yRot, zRot, boneIndex, scale, xAxis, yAxis, zAxis);
}
/// Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json
pub fn START_PARTICLE_FX_LOOPED_ON_ENTITY(effectName: [*c]const u8, entity: types.Entity, xOffset: f32, yOffset: f32, zOffset: f32, xRot: f32, yRot: f32, zRot: f32, scale: f32, xAxis: windows.BOOL, yAxis: windows.BOOL, zAxis: windows.BOOL) c_int {
return nativeCaller.invoke12(@as(u64, @intCast(1937722214304277783)), effectName, entity, xOffset, yOffset, zOffset, xRot, yRot, zRot, scale, xAxis, yAxis, zAxis);
}
/// Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json
pub fn START_PARTICLE_FX_LOOPED_ON_ENTITY_BONE(effectName: [*c]const u8, entity: types.Entity, xOffset: f32, yOffset: f32, zOffset: f32, xRot: f32, yRot: f32, zRot: f32, boneIndex: c_int, scale: f32, xAxis: windows.BOOL, yAxis: windows.BOOL, zAxis: windows.BOOL) c_int {
return nativeCaller.invoke13(@as(u64, @intCast(14333625685297823499)), effectName, entity, xOffset, yOffset, zOffset, xRot, yRot, zRot, boneIndex, scale, xAxis, yAxis, zAxis);
}
/// Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json
/// Used to be known as _START_PARTICLE_FX_LOOPED_ON_ENTITY_2
pub fn START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY(effectName: [*c]const u8, entity: types.Entity, xOffset: f32, yOffset: f32, zOffset: f32, xRot: f32, yRot: f32, zRot: f32, scale: f32, xAxis: windows.BOOL, yAxis: windows.BOOL, zAxis: windows.BOOL, r: f32, g: f32, b: f32, a: f32) c_int {
return nativeCaller.invoke16(@as(u64, @intCast(8025670286167043613)), effectName, entity, xOffset, yOffset, zOffset, xRot, yRot, zRot, scale, xAxis, yAxis, zAxis, r, g, b, a);
}
/// Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json
/// Used to be known as _START_PARTICLE_FX_LOOPED_ON_ENTITY_BONE_2
pub fn START_NETWORKED_PARTICLE_FX_LOOPED_ON_ENTITY_BONE(effectName: [*c]const u8, entity: types.Entity, xOffset: f32, yOffset: f32, zOffset: f32, xRot: f32, yRot: f32, zRot: f32, boneIndex: c_int, scale: f32, xAxis: windows.BOOL, yAxis: windows.BOOL, zAxis: windows.BOOL, r: f32, g: f32, b: f32, a: f32) c_int {
return nativeCaller.invoke17(@as(u64, @intCast(15988411105938116355)), effectName, entity, xOffset, yOffset, zOffset, xRot, yRot, zRot, boneIndex, scale, xAxis, yAxis, zAxis, r, g, b, a);
}
/// p1 is always 0 in the native scripts
pub fn STOP_PARTICLE_FX_LOOPED(ptfxHandle: c_int, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10337337331096316310)), ptfxHandle, p1);
}
pub fn REMOVE_PARTICLE_FX(ptfxHandle: c_int, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14123658133604488143)), ptfxHandle, p1);
}
pub fn REMOVE_PARTICLE_FX_FROM_ENTITY(entity: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13330284274827555877)), entity);
}
pub fn REMOVE_PARTICLE_FX_IN_RANGE(X: f32, Y: f32, Z: f32, radius: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(15932040156801233669)), X, Y, Z, radius);
}
pub fn FORCE_PARTICLE_FX_IN_VEHICLE_INTERIOR(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13403037783925019849)), p0, p1);
}
pub fn DOES_PARTICLE_FX_LOOPED_EXIST(ptfxHandle: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8408201869211353243)), ptfxHandle);
}
pub fn SET_PARTICLE_FX_LOOPED_OFFSETS(ptfxHandle: c_int, x: f32, y: f32, z: f32, rotX: f32, rotY: f32, rotZ: f32) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(17860691097194871875)), ptfxHandle, x, y, z, rotX, rotY, rotZ);
}
pub fn SET_PARTICLE_FX_LOOPED_EVOLUTION(ptfxHandle: c_int, propertyName: [*c]const u8, amount: f32, noNetwork: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(6848931988011301858)), ptfxHandle, propertyName, amount, noNetwork);
}
/// only works on some fx's
/// p4 = 0
pub fn SET_PARTICLE_FX_LOOPED_COLOUR(ptfxHandle: c_int, r: f32, g: f32, b: f32, p4: windows.BOOL) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(9191676997121112123)), ptfxHandle, r, g, b, p4);
}
pub fn SET_PARTICLE_FX_LOOPED_ALPHA(ptfxHandle: c_int, alpha: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8243915066403984430)), ptfxHandle, alpha);
}
pub fn SET_PARTICLE_FX_LOOPED_SCALE(ptfxHandle: c_int, scale: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12989032969121712429)), ptfxHandle, scale);
}
/// Used to be known as _SET_PARTICLE_FX_LOOPED_RANGE
pub fn SET_PARTICLE_FX_LOOPED_FAR_CLIP_DIST(ptfxHandle: c_int, range: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15902655278810117441)), ptfxHandle, range);
}
pub fn _SET_PARTICLE_FX_LOOPED_CAMERA_BIAS(ptfxHandle: c_int, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4683953633256592067)), ptfxHandle, p1);
}
pub fn SET_PARTICLE_FX_CAM_INSIDE_VEHICLE(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17204881356220425488)), p0);
}
pub fn SET_PARTICLE_FX_CAM_INSIDE_NONPLAYER_VEHICLE(vehicle: types.Vehicle, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12461019496964028086)), vehicle, p1);
}
pub fn SET_PARTICLE_FX_SHOOTOUT_BOAT(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10876078591633374965)), p0);
}
pub fn CLEAR_PARTICLE_FX_SHOOTOUT_BOAT() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(3036862817743095515)));
}
pub fn SET_PARTICLE_FX_BLOOD_SCALE(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10413185619881797664)), p0);
}
pub fn DISABLE_IN_WATER_PTFX(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14974872340656247644)), toggle);
}
/// Used to be known as SET_PARTICLE_FX_BLOOD_SCALE
pub fn DISABLE_DOWNWASH_PTFX(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6876420319975958689)), toggle);
}
pub fn SET_PARTICLE_FX_SLIPSTREAM_LODRANGE_SCALE(scale: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3116677267589698824)), scale);
}
/// Creates cartoon effect when Michel smokes the weed
/// Used to be known as SET_CAMERA_ENDTIME
pub fn ENABLE_CLOWN_BLOOD_VFX(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15573809274285527667)), toggle);
}
/// Creates a motion-blur sort of effect, this native does not seem to work, however by using the `START_SCREEN_EFFECT` native with `DrugsMichaelAliensFight` as the effect parameter, you should be able to get the effect.
pub fn ENABLE_ALIEN_BLOOD_VFX(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11371060260457810037)), toggle);
}
pub fn SET_PARTICLE_FX_BULLET_IMPACT_SCALE(scale: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2874185409664238614)), scale);
}
pub fn SET_PARTICLE_FX_BULLET_IMPACT_LODRANGE_SCALE(p0: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13515550063721294629)), p0);
}
pub fn SET_PARTICLE_FX_BULLET_TRACE_NO_ANGLE_REJECT(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14576713032136906099)), p0);
}
pub fn SET_PARTICLE_FX_BANG_SCRAPE_LODRANGE_SCALE(p0: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6116502520489929357)), p0);
}
pub fn SET_PARTICLE_FX_FOOT_LODRANGE_SCALE(p0: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10709341635739330739)), p0);
}
/// Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json
pub fn SET_PARTICLE_FX_FOOT_OVERRIDE_NAME(p0: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13419910228775246459)), p0);
}
pub fn SET_SKIDMARK_RANGE_SCALE(scale: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6755124405730726025)), scale);
}
pub fn SET_PTFX_FORCE_VEHICLE_INTERIOR_FLAG(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14299788691179374339)), p0);
}
pub fn REGISTER_POSTFX_BULLET_IMPACT(weaponWorldPosX: f32, weaponWorldPosY: f32, weaponWorldPosZ: f32, intensity: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(1659877675174752041)), weaponWorldPosX, weaponWorldPosY, weaponWorldPosZ, intensity);
}
pub fn FORCE_POSTFX_BULLET_IMPACTS_AFTER_HUD(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11171071476308214995)), p0);
}
/// From the b678d decompiled scripts:
/// GRAPHICS::USE_PARTICLE_FX_ASSET("FM_Mission_Controler");
/// GRAPHICS::USE_PARTICLE_FX_ASSET("scr_apartment_mp");
/// GRAPHICS::USE_PARTICLE_FX_ASSET("scr_indep_fireworks");
/// GRAPHICS::USE_PARTICLE_FX_ASSET("scr_mp_cig_plane");
/// GRAPHICS::USE_PARTICLE_FX_ASSET("scr_mp_creator");
/// GRAPHICS::USE_PARTICLE_FX_ASSET("scr_ornate_heist");
/// GRAPHICS::USE_PARTICLE_FX_ASSET("scr_prison_break_heist_station");
/// Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json
/// Used to be known as _SET_PTFX_ASSET_NEXT_CALL
/// Used to be known as _USE_PARTICLE_FX_ASSET_NEXT_CALL
pub fn USE_PARTICLE_FX_ASSET(name: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7798175403732277905)), name);
}
/// Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json
/// Used to be known as _SET_PTFX_ASSET_OLD_2_NEW
/// Used to be known as _SET_PARTICLE_FX_ASSET_OLD_TO_NEW
pub fn SET_PARTICLE_FX_OVERRIDE(oldAsset: [*c]const u8, newAsset: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16869971367703305945)), oldAsset, newAsset);
}
/// Resets the effect of SET_PARTICLE_FX_OVERRIDE
/// Full list of particle effect dictionaries and effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/particleEffectsCompact.json
/// Used to be known as _RESET_PARTICLE_FX_ASSET_OLD_TO_NEW
pub fn RESET_PARTICLE_FX_OVERRIDE(name: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9928279102562192046)), name);
}
/// Returns ptfxHandle
/// effectName: scr_sv_drag_burnout
pub fn _START_VEHICLE_PARTICLE_FX_LOOPED(vehicle: types.Vehicle, effectName: [*c]const u8, frontBack: windows.BOOL, leftRight: windows.BOOL, localOnly: windows.BOOL) c_int {
return nativeCaller.invoke5(@as(u64, @intCast(16079710916964128794)), vehicle, effectName, frontBack, leftRight, localOnly);
}
pub fn SET_WEATHER_PTFX_USE_OVERRIDE_SETTINGS(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11847690765046516449)), p0);
}
pub fn SET_WEATHER_PTFX_OVERRIDE_CURR_LEVEL(p0: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17837491694972713071)), p0);
}
pub fn WASH_DECALS_IN_RANGE(x: f32, y: f32, z: f32, range: f32, p4: f32) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(11254602384772869615)), x, y, z, range, p4);
}
pub fn WASH_DECALS_FROM_VEHICLE(vehicle: types.Vehicle, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6589091028502690836)), vehicle, p1);
}
/// Fades nearby decals within the range specified
pub fn FADE_DECALS_IN_RANGE(x: f32, y: f32, z: f32, p3: f32, p4: f32) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(15528089199422007008)), x, y, z, p3, p4);
}
/// Removes all decals in range from a position, it includes the bullet holes, blood pools, petrol...
pub fn REMOVE_DECALS_IN_RANGE(x: f32, y: f32, z: f32, range: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(6731523856112450658)), x, y, z, range);
}
pub fn REMOVE_DECALS_FROM_OBJECT(obj: types.Object) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14769305104806538425)), obj);
}
pub fn REMOVE_DECALS_FROM_OBJECT_FACING(obj: types.Object, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(12031075102061565004)), obj, x, y, z);
}
pub fn REMOVE_DECALS_FROM_VEHICLE(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16798175259792805207)), vehicle);
}
/// decal types:
/// public enum DecalTypes
/// {
/// splatters_blood = 1010,
/// splatters_blood_dir = 1015,
/// splatters_blood_mist = 1017,
/// splatters_mud = 1020,
/// splatters_paint = 1030,
/// splatters_water = 1040,
/// splatters_water_hydrant = 1050,
/// splatters_blood2 = 1110,
/// weapImpact_metal = 4010,
/// weapImpact_concrete = 4020,
/// weapImpact_mattress = 4030,
/// weapImpact_mud = 4032,
/// weapImpact_wood = 4050,
/// weapImpact_sand = 4053,
/// weapImpact_cardboard = 4040,
/// weapImpact_melee_glass = 4100,
/// weapImpact_glass_blood = 4102,
/// weapImpact_glass_blood2 = 4104,
/// weapImpact_shotgun_paper = 4200,
/// weapImpact_shotgun_mattress,
/// weapImpact_shotgun_metal,
/// weapImpact_shotgun_wood,
/// weapImpact_shotgun_dirt,
/// weapImpact_shotgun_tvscreen,
/// weapImpact_shotgun_tvscreen2,
/// weapImpact_shotgun_tvscreen3,
/// weapImpact_melee_concrete = 4310,
/// weapImpact_melee_wood = 4312,
/// weapImpact_melee_metal = 4314,
/// burn1 = 4421,
/// burn2,
/// burn3,
/// burn4,
/// burn5,
/// bang_concrete_bang = 5000,
/// bang_concrete_bang2,
/// bang_bullet_bang,
/// bang_bullet_bang2 = 5004,
/// bang_glass = 5031,
/// bang_glass2,
/// solidPool_water = 9000,
/// solidPool_blood,
/// solidPool_oil,
/// solidPool_petrol,
/// solidPool_mud,
/// porousPool_water,
/// porousPool_blood,
/// porousPool_oil,
/// porousPool_petrol,
/// porousPool_mud,
/// porousPool_water_ped_drip,
/// liquidTrail_water = 9050
/// }
pub fn ADD_DECAL(decalType: c_int, posX: f32, posY: f32, posZ: f32, p4: f32, p5: f32, p6: f32, p7: f32, p8: f32, p9: f32, width: f32, height: f32, rCoef: f32, gCoef: f32, bCoef: f32, opacity: f32, timeout: f32, p17: windows.BOOL, p18: windows.BOOL, p19: windows.BOOL) c_int {
return nativeCaller.invoke20(@as(u64, @intCast(12898912183395138989)), decalType, posX, posY, posZ, p4, p5, p6, p7, p8, p9, width, height, rCoef, gCoef, bCoef, opacity, timeout, p17, p18, p19);
}
pub fn ADD_PETROL_DECAL(x: f32, y: f32, z: f32, groundLvl: f32, width: f32, transparency: f32) c_int {
return nativeCaller.invoke6(@as(u64, @intCast(5715651525905747448)), x, y, z, groundLvl, width, transparency);
}
/// Used to be known as _ADD_PETROL_DECAL_2
/// Used to be known as _ADD_OIL_DECAL
pub fn ADD_OIL_DECAL(x: f32, y: f32, z: f32, groundLvl: f32, width: f32, transparency: f32) c_int {
return nativeCaller.invoke6(@as(u64, @intCast(1327857695801580126)), x, y, z, groundLvl, width, transparency);
}
pub fn START_PETROL_TRAIL_DECALS(p0: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11073365279950801213)), p0);
}
pub fn ADD_PETROL_TRAIL_DECAL_INFO(x: f32, y: f32, z: f32, p3: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(10840859641856300666)), x, y, z, p3);
}
pub fn END_PETROL_TRAIL_DECALS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(725699894922983117)));
}
pub fn REMOVE_DECAL(decal: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17095440315324356185)), decal);
}
pub fn IS_DECAL_ALIVE(decal: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14309298625833532684)), decal);
}
pub fn GET_DECAL_WASH_LEVEL(decal: c_int) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(3620723085438652675)), decal);
}
pub fn SET_DISABLE_PETROL_DECALS_IGNITING_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(15656002518046496732)));
}
pub fn SET_DISABLE_PETROL_DECALS_RECYCLING_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(2868706865191635757)));
}
pub fn SET_DISABLE_DECAL_RENDERING_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(5430492890577892866)));
}
pub fn GET_IS_PETROL_DECAL_IN_RANGE(xCoord: f32, yCoord: f32, zCoord: f32, radius: f32) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(3389512424302388228)), xCoord, yCoord, zCoord, radius);
}
/// Used to be known as _ADD_DECAL_TO_MARKER
/// Used to be known as _OVERRIDE_DECAL_TEXTURE
pub fn PATCH_DECAL_DIFFUSE_MAP(decalType: c_int, textureDict: [*c]const u8, textureName: [*c]const u8) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(9959085237601067136)), decalType, textureDict, textureName);
}
/// Used to be known as _UNDO_DECAL_TEXTURE_OVERRIDE
pub fn UNPATCH_DECAL_DIFFUSE_MAP(decalType: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13253373268039149085)), decalType);
}
pub fn MOVE_VEHICLE_DECALS(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9568134640113103488)), p0, p1);
}
/// boneIndex is always chassis_dummy in the scripts. The x/y/z params are location relative to the chassis bone.
/// Used to be known as _ADD_CLAN_DECAL_TO_VEHICLE
pub fn ADD_VEHICLE_CREW_EMBLEM(vehicle: types.Vehicle, ped: types.Ped, boneIndex: c_int, x1: f32, x2: f32, x3: f32, y1: f32, y2: f32, y3: f32, z1: f32, z2: f32, z3: f32, scale: f32, p13: types.Any, alpha: c_int) windows.BOOL {
return nativeCaller.invoke15(@as(u64, @intCast(4795168919056341587)), vehicle, ped, boneIndex, x1, x2, x3, y1, y2, y3, z1, z2, z3, scale, p13, alpha);
}
pub fn ABORT_VEHICLE_CREW_EMBLEM_REQUEST(p0: [*c]c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9416116996428509279)), p0);
}
pub fn REMOVE_VEHICLE_CREW_EMBLEM(vehicle: types.Vehicle, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15145605771007711204)), vehicle, p1);
}
pub fn GET_VEHICLE_CREW_EMBLEM_REQUEST_STATE(vehicle: types.Vehicle, p1: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(18313344151913083647)), vehicle, p1);
}
/// Used to be known as _HAS_VEHICLE_GOT_DECAL
/// Used to be known as _DOES_VEHICLE_HAVE_DECAL
pub fn DOES_VEHICLE_HAVE_CREW_EMBLEM(vehicle: types.Vehicle, p1: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(436166767530844789)), vehicle, p1);
}
pub fn DISABLE_COMPOSITE_SHOTGUN_DECALS(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1027552737622020593)), toggle);
}
pub fn DISABLE_SCUFF_DECALS(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(159487857601412559)), toggle);
}
pub fn SET_DECAL_BULLET_IMPACT_RANGE_SCALE(p0: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5103042483956573948)), p0);
}
pub fn OVERRIDE_INTERIOR_SMOKE_NAME(name: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3038331618218043136)), name);
}
pub fn OVERRIDE_INTERIOR_SMOKE_LEVEL(level: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1585545850718698514)), level);
}
pub fn OVERRIDE_INTERIOR_SMOKE_END() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(17272815833152992190)));
}
/// Used with 'NG_filmnoir_BW{01,02}' timecycles and the "NOIR_FILTER_SOUNDS" audioref.
/// Used to be known as _REGISTER_NOIR_SCREEN_EFFECT_THIS_FRAME
pub fn REGISTER_NOIR_LENS_EFFECT() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(11839954009542385070)));
}
pub fn DISABLE_VEHICLE_DISTANTLIGHTS(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14553816234644632482)), toggle);
}
pub fn RENDER_SHADOWED_LIGHTS_WITH_NO_SHADOWS(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(229696053525114331)), p0);
}
pub fn REQUEST_EARLY_LIGHT_CHECK() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(11019735899804132594)));
}
/// Forces footstep tracks on all surfaces.
/// Used to be known as _SET_FORCE_PED_FOOTSTEPS_TRACKS
pub fn USE_SNOW_FOOT_VFX_WHEN_UNSHELTERED(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12604921234040708288)), toggle);
}
pub fn _FORCE_ALLOW_SNOW_FOOT_VFX_ON_ICE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11764144904840346476)), toggle);
}
/// Forces vehicle trails on all surfaces.
/// Used to be known as _SET_FORCE_VEHICLE_TRAILS
pub fn USE_SNOW_WHEEL_VFX_WHEN_UNSHELTERED(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5532655643731181536)), toggle);
}
/// Used to be known as _DISABLE_SCRIPT_AMBIENT_EFFECTS
pub fn DISABLE_REGION_VFX(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17282985733030960013)), p0);
}
pub fn _FORCE_GROUND_SNOW_PASS(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7971076272913160696)), toggle);
}
/// Only one match in the scripts:
/// GRAPHICS::PRESET_INTERIOR_AMBIENT_CACHE("int_carrier_hanger");
/// Used to be known as _PRESET_INTERIOR_AMBIENT_CACHE
pub fn PRESET_INTERIOR_AMBIENT_CACHE(timecycleModifierName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15492965952886818078)), timecycleModifierName);
}
/// Loads the specified timecycle modifier. Modifiers are defined separately in another file (e.g. "timecycle_mods_1.xml")
/// Parameters:
/// modifierName - The modifier to load (e.g. "V_FIB_IT3", "scanline_cam", etc.)
/// Full list of timecycle modifiers by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/timecycleModifiers.json
pub fn SET_TIMECYCLE_MODIFIER(modifierName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3211975551654944577)), modifierName);
}
pub fn SET_TIMECYCLE_MODIFIER_STRENGTH(strength: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9432789202013202099)), strength);
}
/// Full list of timecycle modifiers by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/timecycleModifiers.json
pub fn SET_TRANSITION_TIMECYCLE_MODIFIER(modifierName: [*c]const u8, transition: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4309758426879203100)), modifierName, transition);
}
/// Used to be known as _SET_TRANSITION_TIMECYCLE_MODIFIER_STOP_WITH_BLEND
pub fn SET_TRANSITION_OUT_OF_TIMECYCLE_MODIFIER(strength: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2069973225690361349)), strength);
}
pub fn CLEAR_TIMECYCLE_MODIFIER() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(1083088722320385809)));
}
/// Only use for this in the PC scripts is:
/// if (GRAPHICS::GET_TIMECYCLE_MODIFIER_INDEX() != -1)
pub fn GET_TIMECYCLE_MODIFIER_INDEX() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(18299208839268596582)));
}
pub fn GET_TIMECYCLE_TRANSITION_MODIFIER_INDEX() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(5016960269850212540)));
}
pub fn GET_IS_TIMECYCLE_TRANSITIONING_OUT() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(11011733221677349785)));
}
pub fn PUSH_TIMECYCLE_MODIFIER() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(6410651044935755444)));
}
pub fn POP_TIMECYCLE_MODIFIER() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(4362080213785518366)));
}
pub fn SET_CURRENT_PLAYER_TCMODIFIER(modifierName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13543212342515224043)), modifierName);
}
pub fn SET_PLAYER_TCMODIFIER_TRANSITION(value: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13685180278807499268)), value);
}
pub fn SET_NEXT_PLAYER_TCMODIFIER(modifierName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13788175408801174833)), modifierName);
}
pub fn ADD_TCMODIFIER_OVERRIDE(modifierName1: [*c]const u8, modifierName2: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1913515869824373916)), modifierName1, modifierName2);
}
/// Used to be known as REMOVE_TCMODIFIER_OVERRIDE
pub fn CLEAR_ALL_TCMODIFIER_OVERRIDES(p0: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1577159921918073952)), p0);
}
/// Full list of timecycle modifiers by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/timecycleModifiers.json
/// Used to be known as _SET_EXTRA_TIMECYCLE_MODIFIER
pub fn SET_EXTRA_TCMODIFIER(modifierName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5807107619408119149)), modifierName);
}
/// Clears the secondary timecycle modifier usually set with _SET_EXTRA_TIMECYCLE_MODIFIER
/// Used to be known as _CLEAR_EXTRA_TIMECYCLE_MODIFIER
pub fn CLEAR_EXTRA_TCMODIFIER() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(10578042356565706202)));
}
/// See GET_TIMECYCLE_MODIFIER_INDEX for use, works the same just for the secondary timecycle modifier.
/// Returns an integer representing the Timecycle modifier
/// Used to be known as _GET_EXTRA_TIMECYCLE_MODIFIER_INDEX
pub fn GET_EXTRA_TCMODIFIER() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(13476221356207065453)));
}
/// The same as SET_TIMECYCLE_MODIFIER_STRENGTH but for the secondary timecycle modifier.
/// Used to be known as _SET_EXTRA_TIMECYCLE_MODIFIER_STRENGTH
/// Used to be known as _ENABLE_EXTRA_TIMECYCLE_MODIFIER_STRENGTH
pub fn ENABLE_MOON_CYCLE_OVERRIDE(strength: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3184760656109826057)), strength);
}
/// Resets the extra timecycle modifier strength normally set with 0x2C328AF17210F009
/// Used to be known as _RESET_EXTRA_TIMECYCLE_MODIFIER_STRENGTH
pub fn DISABLE_MOON_CYCLE_OVERRIDE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(3168047960216479545)));
}
pub fn REQUEST_SCALEFORM_MOVIE(scaleformName: [*c]const u8) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(1296532278728670831)), scaleformName);
}
/// Another REQUEST_SCALEFORM_MOVIE equivalent.
/// Used to be known as _REQUEST_SCALEFORM_MOVIE_2
pub fn REQUEST_SCALEFORM_MOVIE_WITH_IGNORE_SUPER_WIDESCREEN(scaleformName: [*c]const u8) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(7343092289874906331)), scaleformName);
}
pub fn REQUEST_SCALEFORM_MOVIE_INSTANCE(scaleformName: [*c]const u8) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(14201055364078303238)), scaleformName);
}
/// Similar to REQUEST_SCALEFORM_MOVIE, but seems to be some kind of "interactive" scaleform movie?
/// These seem to be the only scaleforms ever requested by this native:
/// "breaking_news"
/// "desktop_pc"
/// "ECG_MONITOR"
/// "Hacking_PC"
/// "TEETH_PULLING"
/// Note: Unless this hash is out-of-order, this native is next-gen only.
/// Used to be known as _REQUEST_SCALEFORM_MOVIE3
/// Used to be known as _REQUEST_SCALEFORM_MOVIE_INTERACTIVE
pub fn REQUEST_SCALEFORM_MOVIE_SKIP_RENDER_WHILE_PAUSED(scaleformName: [*c]const u8) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(13620791902492182722)), scaleformName);
}
pub fn HAS_SCALEFORM_MOVIE_LOADED(scaleformHandle: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9651244295395497742)), scaleformHandle);
}
/// val is 1-20 (0 will return false)
pub fn IS_ACTIVE_SCALEFORM_MOVIE_DELETING(val: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3443867491242756587)), val);
}
/// val is 1-20. Return is related to INSTRUCTIONAL_BUTTONS, COLOUR_SWITCHER_02, etc?
pub fn IS_SCALEFORM_MOVIE_DELETING(val: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9666232367297717054)), val);
}
/// Only values used in the scripts are:
/// "heist_mp"
/// "heistmap_mp"
/// "instructional_buttons"
/// "heist_pre"
/// Used to be known as _HAS_NAMED_SCALEFORM_MOVIE_LOADED
pub fn HAS_SCALEFORM_MOVIE_FILENAME_LOADED(scaleformName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(872675186769785655)), scaleformName);
}
pub fn HAS_SCALEFORM_CONTAINER_MOVIE_LOADED_INTO_PARENT(scaleformHandle: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9373984299572259837)), scaleformHandle);
}
pub fn SET_SCALEFORM_MOVIE_AS_NO_LONGER_NEEDED(scaleformHandle: [*c]c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2095068147598518289)), scaleformHandle);
}
pub fn SET_SCALEFORM_MOVIE_TO_USE_SYSTEM_TIME(scaleform: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7894442985399373320)), scaleform, toggle);
}
pub fn SET_SCALEFORM_MOVIE_TO_USE_LARGE_RT(scaleformHandle: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3671366047641330747)), scaleformHandle, toggle);
}
/// This native is used in some casino scripts to fit the scaleform in the rendertarget.
/// Used to be known as _SET_SCALEFORM_FIT_RENDERTARGET
pub fn SET_SCALEFORM_MOVIE_TO_USE_SUPER_LARGE_RT(scaleformHandle: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16621079839524304153)), scaleformHandle, toggle);
}
pub fn DRAW_SCALEFORM_MOVIE(scaleformHandle: c_int, x: f32, y: f32, width: f32, height: f32, red: c_int, green: c_int, blue: c_int, alpha: c_int, p9: c_int) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(6095387740489730707)), scaleformHandle, x, y, width, height, red, green, blue, alpha, p9);
}
/// unk is not used so no need
pub fn DRAW_SCALEFORM_MOVIE_FULLSCREEN(scaleform: c_int, red: c_int, green: c_int, blue: c_int, alpha: c_int, p5: c_int) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(1005998793517194209)), scaleform, red, green, blue, alpha, p5);
}
pub fn DRAW_SCALEFORM_MOVIE_FULLSCREEN_MASKED(scaleform1: c_int, scaleform2: c_int, red: c_int, green: c_int, blue: c_int, alpha: c_int) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(14939424981715340517)), scaleform1, scaleform2, red, green, blue, alpha);
}
pub fn DRAW_SCALEFORM_MOVIE_3D(scaleform: c_int, posX: f32, posY: f32, posZ: f32, rotX: f32, rotY: f32, rotZ: f32, p7: f32, p8: f32, p9: f32, scaleX: f32, scaleY: f32, scaleZ: f32, rotationOrder: c_int) void {
_ = nativeCaller.invoke14(@as(u64, @intCast(9787761741249990264)), scaleform, posX, posY, posZ, rotX, rotY, rotZ, p7, p8, p9, scaleX, scaleY, scaleZ, rotationOrder);
}
/// Used to be known as _DRAW_SCALEFORM_MOVIE_3D_NON_ADDITIVE
pub fn DRAW_SCALEFORM_MOVIE_3D_SOLID(scaleform: c_int, posX: f32, posY: f32, posZ: f32, rotX: f32, rotY: f32, rotZ: f32, p7: f32, p8: f32, p9: f32, scaleX: f32, scaleY: f32, scaleZ: f32, rotationOrder: c_int) void {
_ = nativeCaller.invoke14(@as(u64, @intCast(2082232021396608757)), scaleform, posX, posY, posZ, rotX, rotY, rotZ, p7, p8, p9, scaleX, scaleY, scaleZ, rotationOrder);
}
/// Calls the Scaleform function.
/// Used to be known as _CALL_SCALEFORM_MOVIE_FUNCTION_VOID
pub fn CALL_SCALEFORM_MOVIE_METHOD(scaleform: c_int, method: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18147656602949702963)), scaleform, method);
}
/// Calls the Scaleform function and passes the parameters as floats.
/// The number of parameters passed to the function varies, so the end of the parameter list is represented by -1.0.
/// Used to be known as _CALL_SCALEFORM_MOVIE_FUNCTION_FLOAT_PARAMS
pub fn CALL_SCALEFORM_MOVIE_METHOD_WITH_NUMBER(scaleform: c_int, methodName: [*c]const u8, param1: f32, param2: f32, param3: f32, param4: f32, param5: f32) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(15024976308019809262)), scaleform, methodName, param1, param2, param3, param4, param5);
}
/// Calls the Scaleform function and passes the parameters as strings.
/// The number of parameters passed to the function varies, so the end of the parameter list is represented by 0 (NULL).
/// Used to be known as _CALL_SCALEFORM_MOVIE_FUNCTION_STRING_PARAMS
pub fn CALL_SCALEFORM_MOVIE_METHOD_WITH_STRING(scaleform: c_int, methodName: [*c]const u8, param1: [*c]const u8, param2: [*c]const u8, param3: [*c]const u8, param4: [*c]const u8, param5: [*c]const u8) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(5889616307707767031)), scaleform, methodName, param1, param2, param3, param4, param5);
}
/// Calls the Scaleform function and passes both float and string parameters (in their respective order).
/// The number of parameters passed to the function varies, so the end of the float parameters is represented by -1.0, and the end of the string parameters is represented by 0 (NULL).
/// NOTE: The order of parameters in the function prototype is important! All float parameters must come first, followed by the string parameters.
/// Examples:
/// // function MY_FUNCTION(floatParam1, floatParam2, stringParam)
/// GRAPHICS::CALL_SCALEFORM_MOVIE_METHOD_WITH_NUMBER_AND_STRING(scaleform, "MY_FUNCTION", 10.0, 20.0, -1.0, -1.0, -1.0, "String param", 0, 0, 0, 0);
/// // function MY_FUNCTION_2(floatParam, stringParam1, stringParam2)
/// GRAPHICS::CALL_SCALEFORM_MOVIE_METHOD_WITH_NUMBER_AND_STRING(scaleform, "MY_FUNCTION_2", 10.0, -1.0, -1.0, -1.0, -1.0, "String param #1", "String param #2", 0, 0, 0);
/// Used to be known as _CALL_SCALEFORM_MOVIE_FUNCTION_MIXED_PARAMS
pub fn CALL_SCALEFORM_MOVIE_METHOD_WITH_NUMBER_AND_STRING(scaleform: c_int, methodName: [*c]const u8, floatParam1: f32, floatParam2: f32, floatParam3: f32, floatParam4: f32, floatParam5: f32, stringParam1: [*c]const u8, stringParam2: [*c]const u8, stringParam3: [*c]const u8, stringParam4: [*c]const u8, stringParam5: [*c]const u8) void {
_ = nativeCaller.invoke12(@as(u64, @intCast(17250525507777368241)), scaleform, methodName, floatParam1, floatParam2, floatParam3, floatParam4, floatParam5, stringParam1, stringParam2, stringParam3, stringParam4, stringParam5);
}
/// Pushes a function from the Hud component Scaleform onto the stack. Same behavior as GRAPHICS::BEGIN_SCALEFORM_MOVIE_METHOD, just a hud component id instead of a Scaleform.
/// Known components:
/// 19 - MP_RANK_BAR
/// 20 - HUD_DIRECTOR_MODE
/// This native requires more research - all information can be found inside of 'hud.gfx'. Using a decompiler, the different components are located under "scripts\__Packages\com\rockstargames\gtav\hud\hudComponents" and "scripts\__Packages\com\rockstargames\gtav\Multiplayer".
/// Used to be known as _PUSH_SCALEFORM_MOVIE_FUNCTION_FROM_HUD_COMPONENT
/// Used to be known as _BEGIN_SCALEFORM_MOVIE_METHOD_HUD_COMPONENT
pub fn BEGIN_SCALEFORM_SCRIPT_HUD_MOVIE_METHOD(hudComponent: c_int, methodName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(11008087205089361877)), hudComponent, methodName);
}
/// Push a function from the Scaleform onto the stack
/// Used to be known as _PUSH_SCALEFORM_MOVIE_FUNCTION
pub fn BEGIN_SCALEFORM_MOVIE_METHOD(scaleform: c_int, methodName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(17790495150362356046)), scaleform, methodName);
}
/// Starts frontend (pause menu) scaleform movie methods.
/// This can be used when you want to make custom frontend menus, and customize things like images or text in the menus etc.
/// Use `BEGIN_SCALEFORM_MOVIE_METHOD_ON_FRONTEND_HEADER` for header scaleform functions.
/// Used to be known as _PUSH_SCALEFORM_MOVIE_FUNCTION_N
/// Used to be known as _BEGIN_SCALEFORM_MOVIE_METHOD_N
pub fn BEGIN_SCALEFORM_MOVIE_METHOD_ON_FRONTEND(methodName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12346832217046066118)), methodName);
}
/// Starts frontend (pause menu) scaleform movie methods for header options.
/// Use `BEGIN_SCALEFORM_MOVIE_METHOD_ON_FRONTEND` to customize the content inside the frontend menus.
/// Used to be known as _BEGIN_SCALEFORM_MOVIE_METHOD_V
pub fn BEGIN_SCALEFORM_MOVIE_METHOD_ON_FRONTEND_HEADER(methodName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13349962621701283484)), methodName);
}
/// Pops and calls the Scaleform function on the stack
/// Used to be known as _POP_SCALEFORM_MOVIE_FUNCTION_VOID
pub fn END_SCALEFORM_MOVIE_METHOD() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(14301579258302520915)));
}
/// Used to be known as _POP_SCALEFORM_MOVIE_FUNCTION
/// Used to be known as _END_SCALEFORM_MOVIE_METHOD_RETURN
pub fn END_SCALEFORM_MOVIE_METHOD_RETURN_VALUE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(14198340658526877830)));
}
/// methodReturn: The return value of this native: END_SCALEFORM_MOVIE_METHOD_RETURN_VALUE
/// Returns true if the return value of a scaleform function is ready to be collected (using GET_SCALEFORM_MOVIE_METHOD_RETURN_VALUE_STRING or GET_SCALEFORM_MOVIE_METHOD_RETURN_VALUE_INT).
/// Used to be known as _GET_SCALEFORM_MOVIE_FUNCTION_RETURN_BOOL
pub fn IS_SCALEFORM_MOVIE_METHOD_RETURN_VALUE_READY(methodReturn: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8543320341737964758)), methodReturn);
}
/// methodReturn: The return value of this native: END_SCALEFORM_MOVIE_METHOD_RETURN_VALUE
/// Used to get a return value from a scaleform function. Returns an int in the same way GET_SCALEFORM_MOVIE_METHOD_RETURN_VALUE_STRING returns a string.
/// Used to be known as _GET_SCALEFORM_MOVIE_FUNCTION_RETURN_INT
pub fn GET_SCALEFORM_MOVIE_METHOD_RETURN_VALUE_INT(methodReturn: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(3307875949375152182)), methodReturn);
}
/// methodReturn: The return value of this native: END_SCALEFORM_MOVIE_METHOD_RETURN_VALUE
/// Used to be known as _GET_SCALEFORM_MOVIE_METHOD_RETURN_VALUE_BOOL
pub fn GET_SCALEFORM_MOVIE_METHOD_RETURN_VALUE_BOOL(methodReturn: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15567396024569157473)), methodReturn);
}
/// methodReturn: The return value of this native: END_SCALEFORM_MOVIE_METHOD_RETURN_VALUE
/// Used to get a return value from a scaleform function. Returns a string in the same way GET_SCALEFORM_MOVIE_METHOD_RETURN_VALUE_INT returns an int.
/// Used to be known as SITTING_TV
/// Used to be known as _GET_SCALEFORM_MOVIE_FUNCTION_RETURN_STRING
pub fn GET_SCALEFORM_MOVIE_METHOD_RETURN_VALUE_STRING(methodReturn: c_int) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(16276669321232011845)), methodReturn);
}
/// Pushes an integer for the Scaleform function onto the stack.
/// Used to be known as _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_INT
/// Used to be known as _PUSH_SCALEFORM_MOVIE_METHOD_PARAMETER_INT
pub fn SCALEFORM_MOVIE_METHOD_ADD_PARAM_INT(value: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14109922879970035366)), value);
}
/// Pushes a float for the Scaleform function onto the stack.
/// Used to be known as _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_FLOAT
/// Used to be known as _PUSH_SCALEFORM_MOVIE_METHOD_PARAMETER_FLOAT
pub fn SCALEFORM_MOVIE_METHOD_ADD_PARAM_FLOAT(value: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15462887953135416602)), value);
}
/// Pushes a boolean for the Scaleform function onto the stack.
/// Used to be known as _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_BOOL
/// Used to be known as _PUSH_SCALEFORM_MOVIE_METHOD_PARAMETER_BOOL
pub fn SCALEFORM_MOVIE_METHOD_ADD_PARAM_BOOL(value: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14232541106153632856)), value);
}
/// Called prior to adding a text component to the UI. After doing so, GRAPHICS::END_TEXT_COMMAND_SCALEFORM_STRING is called.
/// Examples:
/// GRAPHICS::BEGIN_TEXT_COMMAND_SCALEFORM_STRING("NUMBER");
/// HUD::ADD_TEXT_COMPONENT_INTEGER(MISC::ABSI(a_1));
/// GRAPHICS::END_TEXT_COMMAND_SCALEFORM_STRING();
/// GRAPHICS::BEGIN_TEXT_COMMAND_SCALEFORM_STRING("STRING");
/// HUD::ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(a_2);
/// GRAPHICS::END_TEXT_COMMAND_SCALEFORM_STRING();
/// GRAPHICS::BEGIN_TEXT_COMMAND_SCALEFORM_STRING("STRTNM2");
/// HUD::ADD_TEXT_COMPONENT_SUBSTRING_TEXT_LABEL_HASH_KEY(v_3);
/// HUD::ADD_TEXT_COMPONENT_SUBSTRING_TEXT_LABEL_HASH_KEY(v_4);
/// GRAPHICS::END_TEXT_COMMAND_SCALEFORM_STRING();
/// GRAPHICS::BEGIN_TEXT_COMMAND_SCALEFORM_STRING("STRTNM1");
/// HUD::ADD_TEXT_COMPONENT_SUBSTRING_TEXT_LABEL_HASH_KEY(v_3);
/// GRAPHICS::END_TEXT_COMMAND_SCALEFORM_STRING();
/// Used to be known as _BEGIN_TEXT_COMPONENT
pub fn BEGIN_TEXT_COMMAND_SCALEFORM_STRING(componentType: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9237872426053230165)), componentType);
}
/// Used to be known as _END_TEXT_COMPONENT
pub fn END_TEXT_COMMAND_SCALEFORM_STRING() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(3904107679495919961)));
}
/// Same as END_TEXT_COMMAND_SCALEFORM_STRING but does not perform HTML conversion for text tokens.
/// END_TEXT_COMMAND_VIA_SPECIAL_MODIFIABLE_STRING?
/// Used to be known as _END_TEXT_COMMAND_SCALEFORM_STRING_2
pub fn END_TEXT_COMMAND_UNPARSED_SCALEFORM_STRING() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(12560118625101213831)));
}
/// Same as SCALEFORM_MOVIE_METHOD_ADD_PARAM_TEXTURE_NAME_STRING
/// Both SCALEFORM_MOVIE_METHOD_ADD_PARAM_TEXTURE_NAME_STRING / _SCALEFORM_MOVIE_METHOD_ADD_PARAM_TEXTURE_NAME_STRING_2 works, but _SCALEFORM_MOVIE_METHOD_ADD_PARAM_TEXTURE_NAME_STRING_2 is usually used for "name" (organisation, players..).
/// Used to be known as _PUSH_SCALEFORM_MOVIE_METHOD_PARAMETER_STRING_2
/// Used to be known as _SCALEFORM_MOVIE_METHOD_ADD_PARAM_TEXTURE_NAME_STRING_2
pub fn SCALEFORM_MOVIE_METHOD_ADD_PARAM_LITERAL_STRING(string: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8646405517797544368)), string);
}
/// Used to be known as _PUSH_SCALEFORM_MOVIE_FUNCTION_PARAMETER_STRING
/// Used to be known as _PUSH_SCALEFORM_MOVIE_METHOD_PARAMETER_STRING
pub fn SCALEFORM_MOVIE_METHOD_ADD_PARAM_TEXTURE_NAME_STRING(string: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13434598638770258789)), string);
}
/// Used to be known as _PUSH_SCALEFORM_MOVIE_METHOD_PARAMETER_BUTTON_NAME
pub fn SCALEFORM_MOVIE_METHOD_ADD_PARAM_PLAYER_NAME_STRING(string: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16733755764273145408)), string);
}
pub fn DOES_LATEST_BRIEF_STRING_EXIST(p0: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6801982385926626661)), p0);
}
/// Used to be known as _SCALEFORM_MOVIE_METHOD_ADD_PARAM_INT_STRING
pub fn SCALEFORM_MOVIE_METHOD_ADD_PARAM_LATEST_BRIEF_STRING(value: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17028891057506688003)), value);
}
/// Used to be known as _REQUEST_HUD_SCALEFORM
pub fn REQUEST_SCALEFORM_SCRIPT_HUD_MOVIE(hudComponent: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10593741883486582762)), hudComponent);
}
/// Used to be known as _HAS_HUD_SCALEFORM_LOADED
pub fn HAS_SCALEFORM_SCRIPT_HUD_MOVIE_LOADED(hudComponent: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16099904157786624320)), hudComponent);
}
pub fn REMOVE_SCALEFORM_SCRIPT_HUD_MOVIE(hudComponent: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17602974824764755863)), hudComponent);
}
pub fn PASS_KEYBOARD_INPUT_TO_SCALEFORM(scaleformHandle: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15116273975514179940)), scaleformHandle);
}
pub fn SET_TV_CHANNEL(channel: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13451050475020240974)), channel);
}
pub fn GET_TV_CHANNEL() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(18167001216789485973)));
}
pub fn SET_TV_VOLUME(volume: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2991163607304019420)), volume);
}
pub fn GET_TV_VOLUME() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(2409567900673795611)));
}
/// All calls to this native are preceded by calls to GRAPHICS::SET_SCRIPT_GFX_DRAW_ORDER and GRAPHICS::SET_SCRIPT_GFX_DRAW_BEHIND_PAUSEMENU, respectively.
/// "act_cinema.ysc", line 1483:
/// HUD::SET_HUD_COMPONENT_POSITION(15, 0.0, -0.0375);
/// HUD::SET_TEXT_RENDER_ID(l_AE);
/// GRAPHICS::SET_SCRIPT_GFX_DRAW_ORDER(4);
/// GRAPHICS::SET_SCRIPT_GFX_DRAW_BEHIND_PAUSEMENU(1);
/// if (GRAPHICS::IS_TVSHOW_CURRENTLY_PLAYING(${movie_arthouse})) {
/// GRAPHICS::DRAW_TV_CHANNEL(0.5, 0.5, 0.7375, 1.0, 0.0, 255, 255, 255, 255);
/// } else {
/// GRAPHICS::DRAW_TV_CHANNEL(0.5, 0.5, 1.0, 1.0, 0.0, 255, 255, 255, 255);
/// }
/// "am_mp_property_int.ysc", line 102545:
/// if (ENTITY::DOES_ENTITY_EXIST(a_2._f3)) {
/// if (HUD::IS_NAMED_RENDERTARGET_LINKED(ENTITY::GET_ENTITY_MODEL(a_2._f3))) {
/// HUD::SET_TEXT_RENDER_ID(a_2._f1);
/// GRAPHICS::SET_SCRIPT_GFX_DRAW_ORDER(4);
/// GRAPHICS::SET_SCRIPT_GFX_DRAW_BEHIND_PAUSEMENU(1);
/// GRAPHICS::DRAW_TV_CHANNEL(0.5, 0.5, 1.0, 1.0, 0.0, 255, 255, 255, 255);
/// if (GRAPHICS::GET_TV_CHANNEL() == -1) {
/// sub_a8fa5(a_2, 1);
/// } else {
/// sub_a8fa5(a_2, 1);
/// GRAPHICS::ATTACH_TV_AUDIO_TO_ENTITY(a_2._f3);
/// }
/// HUD::SET_TEXT_RENDER_ID(HUD::GET_DEFAULT_SCRIPT_RENDERTARGET_RENDER_ID());
/// }
/// }
pub fn DRAW_TV_CHANNEL(xPos: f32, yPos: f32, xScale: f32, yScale: f32, rotation: f32, red: c_int, green: c_int, blue: c_int, alpha: c_int) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(18292543404032564720)), xPos, yPos, xScale, yScale, rotation, red, green, blue, alpha);
}
/// Loads specified video sequence into the TV Channel
/// TV_Channel ranges from 0-2
/// VideoSequence can be any of the following:
/// "PL_STD_CNT" CNT Standard Channel
/// "PL_STD_WZL" Weazel Standard Channel
/// "PL_LO_CNT"
/// "PL_LO_WZL"
/// "PL_SP_WORKOUT"
/// "PL_SP_INV" - Jay Norris Assassination Mission Fail
/// "PL_SP_INV_EXP" - Jay Norris Assassination Mission Success
/// "PL_LO_RS" - Righteous Slaughter Ad
/// "PL_LO_RS_CUTSCENE" - Righteous Slaughter Cut-scene
/// "PL_SP_PLSH1_INTRO"
/// "PL_LES1_FAME_OR_SHAME"
/// "PL_STD_WZL_FOS_EP2"
/// "PL_MP_WEAZEL" - Weazel Logo on loop
/// "PL_MP_CCTV" - Generic CCTV loop
/// Restart:
/// 0=video sequence continues as normal
/// 1=sequence restarts from beginning every time that channel is selected
/// The above playlists work as intended, and are commonly used, but there are many more playlists, as seen in `tvplaylists.xml`. A pastebin below outlines all playlists, they will be surronded by the name tag I.E. (<Name>PL_STD_CNT</Name> = PL_STD_CNT).
/// https://pastebin.com/zUzGB6h7
/// Used to be known as _LOAD_TV_CHANNEL_SEQUENCE
pub fn SET_TV_CHANNEL_PLAYLIST(tvChannel: c_int, playlistName: [*c]const u8, restart: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(17848763143056129675)), tvChannel, playlistName, restart);
}
pub fn SET_TV_CHANNEL_PLAYLIST_AT_HOUR(tvChannel: c_int, playlistName: [*c]const u8, hour: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2450456787070675944)), tvChannel, playlistName, hour);
}
pub fn _SET_TV_CHANNEL_PLAYLIST_DIRTY(tvChannel: c_int, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17186614780862978378)), tvChannel, p1);
}
pub fn CLEAR_TV_CHANNEL_PLAYLIST(tvChannel: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13741560447150080960)), tvChannel);
}
/// Used to be known as _IS_PLAYLIST_UNK
pub fn IS_PLAYLIST_ON_CHANNEL(tvChannel: c_int, p1: types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(2265605279497216609)), tvChannel, p1);
}
/// Used to be known as _LOAD_TV_CHANNEL
/// Used to be known as _IS_TV_PLAYLIST_ITEM_PLAYING
pub fn IS_TVSHOW_CURRENTLY_PLAYING(videoCliphash: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(781783322249886560)), videoCliphash);
}
pub fn ENABLE_MOVIE_KEYFRAME_WAIT(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8413146329544280937)), toggle);
}
pub fn SET_TV_PLAYER_WATCHING_THIS_FRAME(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15115587853151499572)), p0);
}
pub fn GET_CURRENT_TV_CLIP_NAMEHASH() types.Hash {
return nativeCaller.invoke0(@as(u64, @intCast(3477669521453706752)));
}
pub fn ENABLE_MOVIE_SUBTITLES(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9745691034725833072)), toggle);
}
pub fn UI3DSCENE_IS_AVAILABLE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(15249487164880033997)));
}
/// All presets can be found in common\data\ui\uiscenes.meta
pub fn UI3DSCENE_PUSH_PRESET(presetName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(17424049431099838106)), presetName);
}
/// It's called after UI3DSCENE_IS_AVAILABLE and UI3DSCENE_PUSH_PRESET
/// presetName was always "CELEBRATION_WINNER"
/// All presets can be found in common\data\ui\uiscenes.meta
pub fn UI3DSCENE_ASSIGN_PED_TO_SLOT(presetName: [*c]const u8, ped: types.Ped, slot: c_int, posX: f32, posY: f32, posZ: f32) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(11008203140876031178)), presetName, ped, slot, posX, posY, posZ);
}
pub fn UI3DSCENE_CLEAR_PATCHED_DATA() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(8809800505743578133)));
}
pub fn UI3DSCENE_MAKE_PUSHED_PRESET_PERSISTENT(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1192295468473375163)), toggle);
}
/// This native enables/disables the gold putting grid display (https://i.imgur.com/TC6cku6.png).
/// This requires these two natives to be called as well to configure the grid: `TERRAINGRID_SET_PARAMS` and `TERRAINGRID_SET_COLOURS`.
pub fn TERRAINGRID_ACTIVATE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11769762961958936165)), toggle);
}
/// This native is used along with these two natives: `TERRAINGRID_ACTIVATE` and `TERRAINGRID_SET_COLOURS`.
/// This native configures the location, size, rotation, normal height, and the difference ratio between min, normal and max.
/// All those natives combined they will output something like this: https://i.imgur.com/TC6cku6.png
/// This native renders a box at the given position, with a special shader that renders a grid on world geometry behind it. This box does not have backface culling.
/// The forward args here are a direction vector, something similar to what's returned by GET_ENTITY_FORWARD_VECTOR.
/// normalHeight and heightDiff are used for positioning the color gradient of the grid, colors specified via TERRAINGRID_SET_COLOURS.
/// Example with box superimposed on the image to demonstrate: https://i.imgur.com/wdqskxd.jpg
pub fn TERRAINGRID_SET_PARAMS(x: f32, y: f32, z: f32, forwardX: f32, forwardY: f32, forwardZ: f32, sizeX: f32, sizeY: f32, sizeZ: f32, gridScale: f32, glowIntensity: f32, normalHeight: f32, heightDiff: f32) void {
_ = nativeCaller.invoke13(@as(u64, @intCast(2040066263258861128)), x, y, z, forwardX, forwardY, forwardZ, sizeX, sizeY, sizeZ, gridScale, glowIntensity, normalHeight, heightDiff);
}
/// This native is used along with these two natives: `TERRAINGRID_ACTIVATE` and `TERRAINGRID_SET_PARAMS`.
/// This native sets the colors for the golf putting grid. the 'min...' values are for the lower areas that the grid covers, the 'max...' values are for the higher areas that the grid covers, all remaining values are for the 'normal' ground height.
/// All those natives combined they will output something like this: https://i.imgur.com/TC6cku6.png
pub fn TERRAINGRID_SET_COLOURS(lowR: c_int, lowG: c_int, lowB: c_int, lowAlpha: c_int, r: c_int, g: c_int, b: c_int, alpha: c_int, highR: c_int, highG: c_int, highB: c_int, highAlpha: c_int) void {
_ = nativeCaller.invoke12(@as(u64, @intCast(6694083083363615687)), lowR, lowG, lowB, lowAlpha, r, g, b, alpha, highR, highG, highB, highAlpha);
}
/// duration - is how long to play the effect for in milliseconds. If 0, it plays the default length
/// if loop is true, the effect won't stop until you call ANIMPOSTFX_STOP on it. (only loopable effects)
/// Full list of animpostFX / screen effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animPostFxNamesCompact.json
/// Used to be known as _START_SCREEN_EFFECT
pub fn ANIMPOSTFX_PLAY(effectName: [*c]const u8, duration: c_int, looped: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2451857716230485796)), effectName, duration, looped);
}
/// See ANIMPOSTFX_PLAY
/// Full list of animpostFX / screen effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animPostFxNamesCompact.json
/// Used to be known as _STOP_SCREEN_EFFECT
pub fn ANIMPOSTFX_STOP(effectName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(472459433978216675)), effectName);
}
/// See ANIMPOSTFX_PLAY
/// Full list of animpostFX / screen effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animPostFxNamesCompact.json
/// Used to be known as _ANIMPOSTFX_GET_UNK
pub fn ANIMPOSTFX_GET_CURRENT_TIME(effectName: [*c]const u8) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(16382750340049432953)), effectName);
}
/// Returns whether the specified effect is active.
/// See ANIMPOSTFX_PLAY
/// Full list of animpostFX / screen effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animPostFxNamesCompact.json
/// Used to be known as _GET_SCREEN_EFFECT_IS_ACTIVE
pub fn ANIMPOSTFX_IS_RUNNING(effectName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3939873869940501739)), effectName);
}
/// Stops ALL currently playing effects.
/// Used to be known as _STOP_ALL_SCREEN_EFFECTS
pub fn ANIMPOSTFX_STOP_ALL() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(13037318497635138437)));
}
/// Stops the effect and sets a value (bool) in its data (+0x199) to false.
/// See ANIMPOSTFX_PLAY
/// Full list of animpostFX / screen effects by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animPostFxNamesCompact.json
/// Used to be known as _ANIMPOSTFX_STOP_AND_DO_UNK
pub fn ANIMPOSTFX_STOP_AND_FLUSH_REQUESTS(effectName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15141273338572521868)), effectName);
}
};
pub const HUD = struct {
/// Initializes the text entry for the the text next to a loading prompt. All natives for building UI texts can be used here
/// e.g
/// void StartLoadingMessage(char *text, int spinnerType = 3)
/// {
/// BEGIN_TEXT_COMMAND_BUSYSPINNER_ON("STRING");
/// ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(text);
/// END_TEXT_COMMAND_BUSYSPINNER_ON(spinnerType);
/// }
/// /*OR*/
/// void ShowLoadingMessage(char *text, int spinnerType = 3, int timeMs = 10000)
/// {
/// BEGIN_TEXT_COMMAND_BUSYSPINNER_ON("STRING");
/// ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(text);
/// END_TEXT_COMMAND_BUSYSPINNER_ON(spinnerType);
/// WAIT(timeMs);
/// BUSYSPINNER_OFF();
/// }
/// These are some localized strings used in the loading spinner.
/// "PM_WAIT" = Please Wait
/// "CELEB_WPLYRS" = Waiting For Players.
/// "CELL_SPINNER2" = Scanning storage.
/// "ERROR_CHECKYACHTNAME" = Registering your yacht's name. Please wait.
/// "ERROR_CHECKPROFANITY" = Checking your text for profanity. Please wait.
/// "FM_COR_AUTOD" = Just spinner no text
/// "FM_IHELP_WAT2" = Waiting for other players
/// "FM_JIP_WAITO" = Game options are being set
/// "FMMC_DOWNLOAD" = Downloading
/// "FMMC_PLYLOAD" = Loading
/// "FMMC_STARTTRAN" = Launching session
/// "HUD_QUITTING" = Quiting session
/// "KILL_STRIP_IDM" = Waiting for to accept
/// "MP_SPINLOADING" = Loading
/// Used to be known as _SET_LOADING_PROMPT_TEXT_ENTRY
/// Used to be known as _BEGIN_TEXT_COMMAND_BUSY_STRING
pub fn BEGIN_TEXT_COMMAND_BUSYSPINNER_ON(string: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12367304027125689791)), string);
}
/// enum eBusySpinnerType
/// {
/// BUSY_SPINNER_LEFT,
/// BUSY_SPINNER_LEFT_2,
/// BUSY_SPINNER_LEFT_3,
/// BUSY_SPINNER_SAVE,
/// BUSY_SPINNER_RIGHT,
/// };
/// Used to be known as _SHOW_LOADING_PROMPT
/// Used to be known as _END_TEXT_COMMAND_BUSY_STRING
pub fn END_TEXT_COMMAND_BUSYSPINNER_ON(busySpinnerType: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13624224649877445044)), busySpinnerType);
}
/// Removes the loading prompt at the bottom right of the screen.
/// Used to be known as _REMOVE_LOADING_PROMPT
pub fn BUSYSPINNER_OFF() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(1212439384324545549)));
}
pub fn PRELOAD_BUSYSPINNER() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(14292933746084667288)));
}
/// Used to be known as _IS_LOADING_PROMPT_BEING_DISPLAYED
pub fn BUSYSPINNER_IS_ON() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(15286058012351506709)));
}
pub fn BUSYSPINNER_IS_DISPLAYING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(12872856395699497419)));
}
/// Used to be known as _DISABLE_PAUSE_MENU_BUSYSPINNER
pub fn DISABLE_PAUSEMENU_SPINNER(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10540085660267596682)), p0);
}
/// Shows the cursor on screen for one frame.
/// Used to be known as _SHOW_CURSOR_THIS_FRAME
/// Used to be known as _SET_MOUSE_CURSOR_ACTIVE_THIS_FRAME
pub fn SET_MOUSE_CURSOR_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(12315038331679700003)));
}
/// Changes the mouse cursor's sprite.
/// 1 = Normal
/// 6 = Left Arrow
/// 7 = Right Arrow
/// Used to be known as _SET_CURSOR_SPRITE
/// Used to be known as _SET_MOUSE_CURSOR_SPRITE
pub fn SET_MOUSE_CURSOR_STYLE(spriteId: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10212140842084607314)), spriteId);
}
/// Shows/hides the frontend cursor on the pause menu or similar menus.
/// Clicking off and then on the game window will show it again.
/// Used to be known as _SET_MOUSE_CURSOR_VISIBLE_IN_MENUS
pub fn SET_MOUSE_CURSOR_VISIBLE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10962134389170235274)), toggle);
}
/// Returns TRUE if mouse is hovering above instructional buttons. Works with all buttons gfx, such as popup_warning, pause_menu_instructional_buttons, instructional_buttons, etc. Note: You have to call TOGGLE_MOUSE_BUTTONS on the scaleform if you want this native to work.
/// Used to be known as _IS_MOUSE_CURSOR_ABOVE_INSTRUCTIONAL_BUTTONS
pub fn IS_MOUSE_ROLLED_OVER_INSTRUCTIONAL_BUTTONS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(4439083715409864450)));
}
pub fn GET_MOUSE_EVENT(scaleformHandle: c_int, p1: [*c]types.Any, p2: [*c]types.Any, p3: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(7145850591938301609)), scaleformHandle, p1, p2, p3);
}
pub fn THEFEED_ONLY_SHOW_TOOLTIPS(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8004397031036586490)), toggle);
}
/// Used to be known as _CLEAR_NOTIFICATIONS_POS
pub fn THEFEED_SET_SCRIPTED_MENU_HEIGHT(pos: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6150101939890469272)), pos);
}
/// Stops loading screen tips shown by invoking `THEFEED_SHOW`
/// Used to be known as _THEFEED_DISABLE
/// Used to be known as _THEFEED_DISABLE_LOADING_SCREEN_TIPS
pub fn THEFEED_HIDE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(3641304572445219184)));
}
/// Once called each frame hides all above radar notifications.
/// Used to be known as _HIDE_HUD_NOTIFICATIONS_THIS_FRAME
pub fn THEFEED_HIDE_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(2736072222996364455)));
}
/// Displays loading screen tips, requires `THEFEED_AUTO_POST_GAMETIPS_ON` to be called beforehand.
/// Used to be known as _THEFEED_ENABLE
/// Used to be known as _THEFEED_DISPLAY_LOADING_SCREEN_TIPS
pub fn THEFEED_SHOW() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(1571656529949308399)));
}
pub fn THEFEED_FLUSH_QUEUE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(12177085331921854394)));
}
/// Removes a notification instantly instead of waiting for it to disappear
/// Used to be known as _REMOVE_NOTIFICATION
pub fn THEFEED_REMOVE_ITEM(notificationId: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13709960893284214311)), notificationId);
}
pub fn THEFEED_FORCE_RENDER_ON() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(11618180799823637500)));
}
/// Enables loading screen tips to be be shown (`THEFEED_SHOW`), blocks other kinds of notifications from being displayed (at least from current script). Call `0xADED7F5748ACAFE6` to display those again.
/// Used to be known as _THEFEED_HIDE_GTAO_TOOLTIPS
pub fn THEFEED_FORCE_RENDER_OFF() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(6354659923928739388)));
}
pub fn THEFEED_PAUSE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(18281275929582043968)));
}
pub fn THEFEED_RESUME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(16270694327106528865)));
}
pub fn THEFEED_IS_PAUSED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(12235151267021336592)));
}
/// Used to be known as _THEFEED_ENABLE_BASELINE_OFFSET
/// Used to be known as THEFEED_SPS_EXTEND_WIDESCREEN_ON
pub fn THEFEED_REPORT_LOGO_ON() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(15295222714265570915)));
}
/// Used to be known as _THEFEED_DISABLE_BASELINE_OFFSET
/// Used to be known as THEFEED_SPS_EXTEND_WIDESCREEN_OFF
pub fn THEFEED_REPORT_LOGO_OFF() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(13156671256699709934)));
}
/// Returns the handle for the notification currently displayed on the screen. Name may be a hash collision, but describes the function accurately.
/// Used to be known as _GET_CURRENT_NOTIFICATION
/// Used to be known as _THEFEED_GET_CURRENT_NOTIFICATION
/// Used to be known as THEFEED_GET_FIRST_VISIBLE_DELETE_REMAINING
pub fn THEFEED_GET_LAST_SHOWN_PHONE_ACTIVATABLE_FEED_ID() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(9382448590019246282)));
}
/// Enables loading screen tips to be be shown (`THEFEED_SHOW`), blocks other kinds of notifications from being displayed (at least from current script). Call `THEFEED_AUTO_POST_GAMETIPS_OFF` to display those again.
/// Used to be known as THEFEED_COMMENT_TELEPORT_POOL_ON
pub fn THEFEED_AUTO_POST_GAMETIPS_ON() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(6253448231566743636)));
}
/// Displays "normal" notifications again after calling `THEFEED_AUTO_POST_GAMETIPS_ON` (those that were drawn before calling this native too), though those will have a weird offset and stay on screen forever (tested with notifications created from same script).
/// Used to be known as _THEFEED_SHOW_GTAO_TOOLTIPS
/// Used to be known as THEFEED_COMMENT_TELEPORT_POOL_OFF
pub fn THEFEED_AUTO_POST_GAMETIPS_OFF() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(12532813350900117478)));
}
/// From the decompiled scripts:
/// HUD::THEFEED_SET_BACKGROUND_COLOR_FOR_NEXT_POST(6);
/// HUD::THEFEED_SET_BACKGROUND_COLOR_FOR_NEXT_POST(184);
/// HUD::THEFEED_SET_BACKGROUND_COLOR_FOR_NEXT_POST(190);
/// sets background color for the next notification
/// 6 = red
/// 184 = green
/// 190 = yellow
/// Here is a list of some colors that can be used: https://gyazo.com/68bd384455fceb0a85a8729e48216e15
/// Used to be known as _SET_NOTIFICATION_BACKGROUND_COLOR
/// Used to be known as _THEFEED_NEXT_POST_BACKGROUND_COLOR
/// Used to be known as _THEFEED_SET_NEXT_POST_BACKGROUND_COLOR
pub fn THEFEED_SET_BACKGROUND_COLOR_FOR_NEXT_POST(hudColorIndex: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10588202547000612572)), hudColorIndex);
}
/// Used to be known as _SET_NOTIFICATION_FLASH_COLOR
/// Used to be known as _THEFEED_SET_ANIMPOSTFX_COLOR
pub fn THEFEED_SET_RGBA_PARAMETER_FOR_NEXT_MESSAGE(red: c_int, green: c_int, blue: c_int, alpha: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(1676196205975159618)), red, green, blue, alpha);
}
/// Related to notification color flashing, setting count to 0 invalidates a `THEFEED_SET_RGBA_PARAMETER_FOR_NEXT_MESSAGE` call for the target notification.
/// Used to be known as _THEFEED_SET_ANIMPOSTFX_COUNT
pub fn THEFEED_SET_FLASH_DURATION_PARAMETER_FOR_NEXT_MESSAGE(count: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1706174414124341386)), count);
}
/// Used to be known as _THEFEED_SET_ANIMPOSTFX_SOUND
pub fn THEFEED_SET_VIBRATE_PARAMETER_FOR_NEXT_MESSAGE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5335776666659240758)), toggle);
}
/// Used to be known as _THEFEED_CLEAR_ANIMPOSTFX
pub fn THEFEED_RESET_ALL_PARAMETERS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(18291460208433472862)));
}
/// Requires manual management of game stream handles (i.e., 0xBE4390CB40B3E627).
/// Used to be known as _THEFEED_SET_NEXT_POST_PERSISTENT
pub fn THEFEED_FREEZE_NEXT_POST() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(18297005273246196520)));
}
/// Used to be known as _THEFEED_FLUSH_PERSISTENT
pub fn THEFEED_CLEAR_FROZEN_POST() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(9294953794500671018)));
}
/// Used to be known as _THEFEED_SET_FLUSH_ANIMPOSTFX
pub fn THEFEED_SET_SNAP_FEED_ITEM_POSITIONS(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13467163360803175216)), p0);
}
/// Used in the native scripts to reference "GET_PEDHEADSHOT_TXD_STRING" and "CHAR_DEFAULT".
/// Used to be known as _THEFEED_ADD_TXD_REF
pub fn THEFEED_UPDATE_ITEM_TEXTURE(txdString1: [*c]const u8, txnString1: [*c]const u8, txdString2: [*c]const u8, txnString2: [*c]const u8) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(3566492953030704978)), txdString1, txnString1, txdString2, txnString2);
}
/// Declares the entry type of a notification, for example "STRING".
/// int ShowNotification(char *text)
/// {
/// BEGIN_TEXT_COMMAND_THEFEED_POST("STRING");
/// ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(text);
/// return END_TEXT_COMMAND_THEFEED_POST_TICKER(1, 1);
/// }
/// Used to be known as _SET_NOTIFICATION_TEXT_ENTRY
pub fn BEGIN_TEXT_COMMAND_THEFEED_POST(text: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2316831480196236324)), text);
}
/// List of picture names: https://pastebin.com/XdpJVbHz
/// Example result: https://i.imgur.com/SdEZ22m.png
/// Used to be known as _SET_NOTIFICATION_MESSAGE_2
pub fn END_TEXT_COMMAND_THEFEED_POST_STATS(statTitle: [*c]const u8, iconEnum: c_int, stepVal: windows.BOOL, barValue: c_int, isImportant: windows.BOOL, pictureTextureDict: [*c]const u8, pictureTextureName: [*c]const u8) c_int {
return nativeCaller.invoke7(@as(u64, @intCast(3134112053357788297)), statTitle, iconEnum, stepVal, barValue, isImportant, pictureTextureDict, pictureTextureName);
}
/// This function can show pictures of every texture that can be requested by REQUEST_STREAMED_TEXTURE_DICT.
/// List of picNames: https://pastebin.com/XdpJVbHz
/// flash is a bool for fading in.
/// iconTypes:
/// 1 : Chat Box
/// 2 : Email
/// 3 : Add Friend Request
/// 4 : Nothing
/// 5 : Nothing
/// 6 : Nothing
/// 7 : Right Jumping Arrow
/// 8 : RP Icon
/// 9 : $ Icon
/// "sender" is the very top header. This can be any old string.
/// "subject" is the header under the sender.
/// Used to be known as _SET_NOTIFICATION_MESSAGE
pub fn END_TEXT_COMMAND_THEFEED_POST_MESSAGETEXT(txdName: [*c]const u8, textureName: [*c]const u8, flash: windows.BOOL, iconType: c_int, sender: [*c]const u8, subject: [*c]const u8) c_int {
return nativeCaller.invoke6(@as(u64, @intCast(2075484565200204495)), txdName, textureName, flash, iconType, sender, subject);
}
/// This function can show pictures of every texture that can be requested by REQUEST_STREAMED_TEXTURE_DICT.
/// Needs more research.
/// Only one type of usage in the scripts:
/// HUD::END_TEXT_COMMAND_THEFEED_POST_MESSAGETEXT_SUBTITLE_LABEL("CHAR_ACTING_UP", "CHAR_ACTING_UP", 0, 0, "DI_FEED_CHAR", a_0);
/// Used to be known as _SET_NOTIFICATION_MESSAGE_3
/// Used to be known as _END_TEXT_COMMAND_THEFEED_POST_MESSAGETEXT_ENTRY
/// Used to be known as _END_TEXT_COMMAND_THEFEED_POST_MESSAGETEXT_GXT_ENTRY
pub fn END_TEXT_COMMAND_THEFEED_POST_MESSAGETEXT_SUBTITLE_LABEL(txdName: [*c]const u8, textureName: [*c]const u8, flash: windows.BOOL, iconType: c_int, sender: [*c]const u8, subject: [*c]const u8) c_int {
return nativeCaller.invoke6(@as(u64, @intCast(14336506708921755308)), txdName, textureName, flash, iconType, sender, subject);
}
/// This function can show pictures of every texture that can be requested by REQUEST_STREAMED_TEXTURE_DICT.
/// NOTE: 'duration' is a multiplier, so 1.0 is normal, 2.0 is twice as long (very slow), and 0.5 is half as long.
/// Example, only occurrence in the scripts:
/// v_8 = HUD::END_TEXT_COMMAND_THEFEED_POST_MESSAGETEXT_TU("CHAR_SOCIAL_CLUB", "CHAR_SOCIAL_CLUB", 0, 0, &v_9, "", a_5);
/// Used to be known as _SET_NOTIFICATION_MESSAGE_4
pub fn END_TEXT_COMMAND_THEFEED_POST_MESSAGETEXT_TU(txdName: [*c]const u8, textureName: [*c]const u8, flash: windows.BOOL, iconType: c_int, sender: [*c]const u8, subject: [*c]const u8, duration: f32) c_int {
return nativeCaller.invoke7(@as(u64, @intCast(2190457049005153131)), txdName, textureName, flash, iconType, sender, subject, duration);
}
/// This function can show pictures of every texture that can be requested by REQUEST_STREAMED_TEXTURE_DICT.
/// List of picNames https://pastebin.com/XdpJVbHz
/// flash is a bool for fading in.
/// iconTypes:
/// 1 : Chat Box
/// 2 : Email
/// 3 : Add Friend Request
/// 4 : Nothing
/// 5 : Nothing
/// 6 : Nothing
/// 7 : Right Jumping Arrow
/// 8 : RP Icon
/// 9 : $ Icon
/// "sender" is the very top header. This can be any old string.
/// "subject" is the header under the sender.
/// "duration" is a multiplier, so 1.0 is normal, 2.0 is twice as long (very slow), and 0.5 is half as long.
/// "clanTag" shows a crew tag in the "sender" header, after the text. You need to use 3 underscores as padding. Maximum length of this field seems to be 7. (e.g. "MK" becomes "___MK", "ACE" becomes "___ACE", etc.)
/// Used to be known as _SET_NOTIFICATION_MESSAGE_CLAN_TAG
pub fn END_TEXT_COMMAND_THEFEED_POST_MESSAGETEXT_WITH_CREW_TAG(txdName: [*c]const u8, textureName: [*c]const u8, flash: windows.BOOL, iconType: c_int, sender: [*c]const u8, subject: [*c]const u8, duration: f32, clanTag: [*c]const u8) c_int {
return nativeCaller.invoke8(@as(u64, @intCast(6683196358793214270)), txdName, textureName, flash, iconType, sender, subject, duration, clanTag);
}
/// This function can show pictures of every texture that can be requested by REQUEST_STREAMED_TEXTURE_DICT.
/// List of picNames: https://pastebin.com/XdpJVbHz
/// flash is a bool for fading in.
/// iconTypes:
/// 1 : Chat Box
/// 2 : Email
/// 3 : Add Friend Request
/// 4 : Nothing
/// 5 : Nothing
/// 6 : Nothing
/// 7 : Right Jumping Arrow
/// 8 : RP Icon
/// 9 : $ Icon
/// "sender" is the very top header. This can be any old string.
/// "subject" is the header under the sender.
/// "duration" is a multiplier, so 1.0 is normal, 2.0 is twice as long (very slow), and 0.5 is half as long.
/// "clanTag" shows a crew tag in the "sender" header, after the text. You need to use 3 underscores as padding. Maximum length of this field seems to be 7. (e.g. "MK" becomes "___MK", "ACE" becomes "___ACE", etc.)
/// iconType2 is a mirror of iconType. It shows in the "subject" line, right under the original iconType.
/// int IconNotification(char *text, char *text2, char *Subject)
/// {
/// BEGIN_TEXT_COMMAND_THEFEED_POST("STRING");
/// ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(text);
/// _SET_NOTIFICATION_MESSAGE_CLAN_TAG_2("CHAR_SOCIAL_CLUB", "CHAR_SOCIAL_CLUB", 1, 7, text2, Subject, 1.0f, "__EXAMPLE", 7);
/// return END_TEXT_COMMAND_THEFEED_POST_TICKER(1, 1);
/// }
/// Used to be known as _SET_NOTIFICATION_MESSAGE_CLAN_TAG_2
pub fn END_TEXT_COMMAND_THEFEED_POST_MESSAGETEXT_WITH_CREW_TAG_AND_ADDITIONAL_ICON(txdName: [*c]const u8, textureName: [*c]const u8, flash: windows.BOOL, iconType1: c_int, sender: [*c]const u8, subject: [*c]const u8, duration: f32, clanTag: [*c]const u8, iconType2: c_int, p9: c_int) c_int {
return nativeCaller.invoke10(@as(u64, @intCast(5988526260858920886)), txdName, textureName, flash, iconType1, sender, subject, duration, clanTag, iconType2, p9);
}
/// Used to be known as _DRAW_NOTIFICATION
pub fn END_TEXT_COMMAND_THEFEED_POST_TICKER(blink: windows.BOOL, p1: windows.BOOL) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(3375311854262816803)), blink, p1);
}
/// Used to be known as _DRAW_NOTIFICATION_2
pub fn END_TEXT_COMMAND_THEFEED_POST_TICKER_FORCED(blink: windows.BOOL, p1: windows.BOOL) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(4970289087243395310)), blink, p1);
}
/// Used to be known as _DRAW_NOTIFICATION_3
pub fn END_TEXT_COMMAND_THEFEED_POST_TICKER_WITH_TOKENS(blink: windows.BOOL, p1: windows.BOOL) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(4003278526116448320)), blink, p1);
}
/// Shows an "award" notification above the minimap, example: https://i.imgur.com/e2DNaKX.png
/// Example:
/// HUD::BEGIN_TEXT_COMMAND_THEFEED_POST("HUNT");
/// HUD::END_TEXT_COMMAND_THEFEED_POST_AWARD("Hunting", "Hunting_Gold_128", 0, 109, "HUD_MED_UNLKED");
/// Used to be known as _DRAW_NOTIFICATION_ICON
/// Used to be known as _DRAW_NOTIFICATION_AWARD
pub fn END_TEXT_COMMAND_THEFEED_POST_AWARD(textureDict: [*c]const u8, textureName: [*c]const u8, rpBonus: c_int, colorOverlay: c_int, titleLabel: [*c]const u8) c_int {
return nativeCaller.invoke5(@as(u64, @intCast(12261431993475881085)), textureDict, textureName, rpBonus, colorOverlay, titleLabel);
}
/// Used to be known as _NOTIFICATION_SEND_APARTMENT_INVITE
/// Used to be known as _DRAW_NOTIFICATION_APARTMENT_INVITE
pub fn END_TEXT_COMMAND_THEFEED_POST_CREWTAG(p0: windows.BOOL, p1: windows.BOOL, p2: [*c]c_int, p3: c_int, isLeader: windows.BOOL, unk0: windows.BOOL, clanDesc: c_int, R: c_int, G: c_int, B: c_int) c_int {
return nativeCaller.invoke10(@as(u64, @intCast(10937524850872979244)), p0, p1, p2, p3, isLeader, unk0, clanDesc, R, G, B);
}
/// Used to be known as _NOTIFICATION_SEND_CLAN_INVITE
/// Used to be known as _DRAW_NOTIFICATION_CLAN_INVITE
pub fn END_TEXT_COMMAND_THEFEED_POST_CREWTAG_WITH_GAME_NAME(p0: windows.BOOL, p1: windows.BOOL, p2: [*c]c_int, p3: c_int, isLeader: windows.BOOL, unk0: windows.BOOL, clanDesc: c_int, playerName: [*c]const u8, R: c_int, G: c_int, B: c_int) c_int {
return nativeCaller.invoke11(@as(u64, @intCast(1403930481009053214)), p0, p1, p2, p3, isLeader, unk0, clanDesc, playerName, R, G, B);
}
pub fn END_TEXT_COMMAND_THEFEED_POST_UNLOCK(gxtLabel1: [*c]const u8, p1: c_int, gxtLabel2: [*c]const u8) c_int {
return nativeCaller.invoke3(@as(u64, @intCast(3741948630837060419)), gxtLabel1, p1, gxtLabel2);
}
pub fn END_TEXT_COMMAND_THEFEED_POST_UNLOCK_TU(gxtLabel1: [*c]const u8, p1: c_int, gxtLabel2: [*c]const u8, p3: c_int) c_int {
return nativeCaller.invoke4(@as(u64, @intCast(14480105214373658815)), gxtLabel1, p1, gxtLabel2, p3);
}
pub fn END_TEXT_COMMAND_THEFEED_POST_UNLOCK_TU_WITH_COLOR(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any) c_int {
return nativeCaller.invoke6(@as(u64, @intCast(8854174245385855112)), p0, p1, p2, p3, p4, p5);
}
/// Used to be known as _DRAW_NOTIFICATION_4
pub fn END_TEXT_COMMAND_THEFEED_POST_MPTICKER(blink: windows.BOOL, p1: windows.BOOL) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(17303051221525879610)), blink, p1);
}
/// Used to be known as END_TEXT_COMMAND_THEFEED_POST_CREW_RANKUP
pub fn END_TEXT_COMMAND_THEFEED_POST_CREW_RANKUP_WITH_LITERAL_FLAG(p0: [*c]const u8, p1: [*c]const u8, p2: [*c]const u8, p3: windows.BOOL, p4: windows.BOOL) c_int {
return nativeCaller.invoke5(@as(u64, @intCast(10303338122199270884)), p0, p1, p2, p3, p4);
}
/// This function can show pictures of every texture that can be requested by REQUEST_STREAMED_TEXTURE_DICT.
/// List of picNames: https://pastebin.com/XdpJVbHz
/// HUD colors and their values: https://pastebin.com/d9aHPbXN
/// Shows a deathmatch score above the minimap, example: https://i.imgur.com/YmoMklG.png
pub fn END_TEXT_COMMAND_THEFEED_POST_VERSUS_TU(txdName1: [*c]const u8, textureName1: [*c]const u8, count1: c_int, txdName2: [*c]const u8, textureName2: [*c]const u8, count2: c_int, hudColor1: c_int, hudColor2: c_int) c_int {
return nativeCaller.invoke8(@as(u64, @intCast(13152510946485217686)), txdName1, textureName1, count1, txdName2, textureName2, count2, hudColor1, hudColor2);
}
/// returns a notification handle, prints out a notification like below:
/// type range: 0 - 2
/// if you set type to 1, image goes from 0 - 39 - Xbox you can add text to
/// example:
/// HUD::END_TEXT_COMMAND_THEFEED_POST_REPLAY_INPUT(1, 20, "Who you trynna get crazy with, ese? Don't you know I'm LOCO?!");
/// - https://imgur.com/lGBPCz3
/// Used to be known as _DRAW_NOTIFICATION_WITH_ICON
/// Used to be known as _END_TEXT_COMMAND_THEFEED_POST_REPLAY_ICON
pub fn END_TEXT_COMMAND_THEFEED_POST_REPLAY(@"type": c_int, image: c_int, text: [*c]const u8) c_int {
return nativeCaller.invoke3(@as(u64, @intCast(15132861299754369391)), @"type", image, text);
}
/// returns a notification handle, prints out a notification like below:
/// type range: 0 - 2
/// if you set type to 1, button accepts "~INPUT_SOMETHING~"
/// example:
/// HUD::END_TEXT_COMMAND_THEFEED_POST_REPLAY_INPUT(1, "~INPUT_TALK~", "Who you trynna get crazy with, ese? Don't you know I'm LOCO?!");
/// - https://imgur.com/UPy0Ial
/// Examples from the scripts:
/// l_D1[1/*1*/]=HUD::END_TEXT_COMMAND_THEFEED_POST_REPLAY_INPUT(1,"~INPUT_REPLAY_START_STOP_RECORDING~","");
/// l_D1[2/*1*/]=HUD::END_TEXT_COMMAND_THEFEED_POST_REPLAY_INPUT(1,"~INPUT_SAVE_REPLAY_CLIP~","");
/// l_D1[1/*1*/]=HUD::END_TEXT_COMMAND_THEFEED_POST_REPLAY_INPUT(1,"~INPUT_REPLAY_START_STOP_RECORDING~","");
/// l_D1[2/*1*/]=HUD::END_TEXT_COMMAND_THEFEED_POST_REPLAY_INPUT(1,"~INPUT_REPLAY_START_STOP_RECORDING_SECONDARY~","");
/// Used to be known as _DRAW_NOTIFICATION_WITH_BUTTON
/// Used to be known as _END_TEXT_COMMAND_THEFEED_POST_REPLAY_INPUT
pub fn END_TEXT_COMMAND_THEFEED_POST_REPLAY_INPUT(@"type": c_int, button: [*c]const u8, text: [*c]const u8) c_int {
return nativeCaller.invoke3(@as(u64, @intCast(15955324172998177628)), @"type", button, text);
}
/// void ShowSubtitle(const char *text)
/// {
/// BEGIN_TEXT_COMMAND_PRINT("STRING");
/// ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(text);
/// END_TEXT_COMMAND_PRINT(2000, true);
/// }
/// Used to be known as _SET_TEXT_ENTRY_2
pub fn BEGIN_TEXT_COMMAND_PRINT(GxtEntry: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13292998748565841533)), GxtEntry);
}
/// Draws the subtitle at middle center of the screen.
/// int duration = time in milliseconds to show text on screen before disappearing
/// drawImmediately = If true, the text will be drawn immediately, if false, the text will be drawn after the previous subtitle has finished
/// Used to be known as _DRAW_SUBTITLE_TIMED
/// Used to be known as _DRAW_SUBTITLE_TIMED
pub fn END_TEXT_COMMAND_PRINT(duration: c_int, drawImmediately: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11346543740400845814)), duration, drawImmediately);
}
/// nothin doin.
/// BOOL Message(const char* text)
/// {
/// BEGIN_TEXT_COMMAND_IS_MESSAGE_DISPLAYED("STRING");
/// ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(text);
/// return END_TEXT_COMMAND_IS_MESSAGE_DISPLAYED();
/// }
pub fn BEGIN_TEXT_COMMAND_IS_MESSAGE_DISPLAYED(text: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9598939907525681683)), text);
}
pub fn END_TEXT_COMMAND_IS_MESSAGE_DISPLAYED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9987754355478197779)));
}
/// The following were found in the decompiled script files:
/// STRING, TWOSTRINGS, NUMBER, PERCENTAGE, FO_TWO_NUM, ESMINDOLLA, ESDOLLA, MTPHPER_XPNO, AHD_DIST, CMOD_STAT_0, CMOD_STAT_1, CMOD_STAT_2, CMOD_STAT_3, DFLT_MNU_OPT, F3A_TRAFDEST, ES_HELP_SOC3
/// ESDOLLA - cash
/// ESMINDOLLA - cash (negative)
/// Used to be known as _SET_TEXT_ENTRY
/// Used to be known as _SET_TEXT_ENTRY
pub fn BEGIN_TEXT_COMMAND_DISPLAY_TEXT(text: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2736978246810207435)), text);
}
/// After applying the properties to the text (See HUD::SET_TEXT_), this will draw the text in the applied position. Also 0.0f < x, y < 1.0f, percentage of the axis.
/// Used to be known as _DRAW_TEXT
/// Used to be known as _DRAW_TEXT
pub fn END_TEXT_COMMAND_DISPLAY_TEXT(x: f32, y: f32, p2: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(14772192000654010967)), x, y, p2);
}
/// Used to be known as _SET_TEXT_ENTRY_FOR_WIDTH
/// Used to be known as _BEGIN_TEXT_COMMAND_WIDTH
/// Used to be known as _BEGIN_TEXT_COMMAND_GET_WIDTH
pub fn BEGIN_TEXT_COMMAND_GET_SCREEN_WIDTH_OF_DISPLAY_TEXT(text: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6110974342664948907)), text);
}
/// Used to be known as _GET_TEXT_SCREEN_WIDTH
/// Used to be known as _END_TEXT_COMMAND_GET_WIDTH
pub fn END_TEXT_COMMAND_GET_SCREEN_WIDTH_OF_DISPLAY_TEXT(p0: windows.BOOL) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(9651321592079003495)), p0);
}
/// int GetLineCount(char *text, float x, float y)
/// {
/// BEGIN_TEXT_COMMAND_GET_NUMBER_OF_LINES_FOR_STRING("STRING");
/// ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(text);
/// return BEGIN_TEXT_COMMAND_GET_NUMBER_OF_LINES_FOR_STRING(x, y);
/// }
/// Used to be known as _SET_TEXT_GXT_ENTRY
/// Used to be known as _BEGIN_TEXT_COMMAND_LINE_COUNT
pub fn BEGIN_TEXT_COMMAND_GET_NUMBER_OF_LINES_FOR_STRING(entry: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5917642232252190948)), entry);
}
/// Determines how many lines the text string will use when drawn on screen.
/// Must use 0x521FB041D93DD0E4 for setting up
/// Used to be known as _GET_TEXT_SCREEN_LINE_COUNT
/// Used to be known as _END_TEXT_COMMAND_GET_LINE_COUNT
/// Used to be known as _END_TEXT_COMMAND_LINE_COUNT
pub fn END_TEXT_COMMAND_GET_NUMBER_OF_LINES_FOR_STRING(x: f32, y: f32) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(10394553889593972486)), x, y);
}
/// Used to be known as _SET_TEXT_COMPONENT_FORMAT
/// Used to be known as _SET_TEXT_COMPONENT_FORMAT
pub fn BEGIN_TEXT_COMMAND_DISPLAY_HELP(inputType: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9586393620515641873)), inputType);
}
/// shape goes from -1 to 50 (may be more).
/// p0 is always 0.
/// Example:
/// void FloatingHelpText(const char* text)
/// {
/// BEGIN_TEXT_COMMAND_DISPLAY_HELP("STRING");
/// ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(text);
/// END_TEXT_COMMAND_DISPLAY_HELP (0, 0, 1, -1);
/// }
/// Image:
/// - imgbin.org/images/26209.jpg
/// more inputs/icons:
/// - https://pastebin.com/nqNYWMSB
/// Used to be known as _DISPLAY_HELP_TEXT_FROM_STRING_LABEL
/// Used to be known as _DISPLAY_HELP_TEXT_FROM_STRING_LABEL
pub fn END_TEXT_COMMAND_DISPLAY_HELP(p0: c_int, loop: windows.BOOL, beep: windows.BOOL, shape: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(2562546386151446694)), p0, loop, beep, shape);
}
/// BOOL IsContextActive(char *ctx)
/// {
/// BEGIN_TEXT_COMMAND_IS_THIS_HELP_MESSAGE_BEING_DISPLAYED(ctx);
/// return END_TEXT_COMMAND_IS_THIS_HELP_MESSAGE_BEING_DISPLAYED(0);
/// }
pub fn BEGIN_TEXT_COMMAND_IS_THIS_HELP_MESSAGE_BEING_DISPLAYED(labelName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(730948983286339829)), labelName);
}
pub fn END_TEXT_COMMAND_IS_THIS_HELP_MESSAGE_BEING_DISPLAYED(p0: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1206362151968843997)), p0);
}
/// Starts a text command to change the name of a blip displayed in the pause menu.
/// This should be paired with `END_TEXT_COMMAND_SET_BLIP_NAME`, once adding all required text components.
/// Example:
/// HUD::BEGIN_TEXT_COMMAND_SET_BLIP_NAME("STRING");
/// HUD::ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME("Name");
/// HUD::END_TEXT_COMMAND_SET_BLIP_NAME(blip);
pub fn BEGIN_TEXT_COMMAND_SET_BLIP_NAME(textLabel: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17947189971611575920)), textLabel);
}
/// Finalizes a text command started with BEGIN_TEXT_COMMAND_SET_BLIP_NAME, setting the name of the specified blip.
pub fn END_TEXT_COMMAND_SET_BLIP_NAME(blip: types.Blip) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13562788859053587611)), blip);
}
/// Used to be known as _BEGIN_TEXT_COMMAND_OBJECTIVE
pub fn BEGIN_TEXT_COMMAND_ADD_DIRECTLY_TO_PREVIOUS_BRIEFS(p0: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2582425178060816424)), p0);
}
/// Used to be known as _END_TEXT_COMMAND_OBJECTIVE
pub fn END_TEXT_COMMAND_ADD_DIRECTLY_TO_PREVIOUS_BRIEFS(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14977810567242948852)), p0);
}
/// clears a print text command with this text
pub fn BEGIN_TEXT_COMMAND_CLEAR_PRINT(text: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16223367188165755292)), text);
}
pub fn END_TEXT_COMMAND_CLEAR_PRINT() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(18214619992096412536)));
}
/// Used to be known as _BEGIN_TEXT_COMMAND_TIMER
pub fn BEGIN_TEXT_COMMAND_OVERRIDE_BUTTON_TEXT(gxtEntry: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10348961230723411149)), gxtEntry);
}
/// Used to be known as _END_TEXT_COMMAND_TIMER
pub fn END_TEXT_COMMAND_OVERRIDE_BUTTON_TEXT(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12135250013684502639)), p0);
}
pub fn ADD_TEXT_COMPONENT_INTEGER(value: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(267125040633950652)), value);
}
pub fn ADD_TEXT_COMPONENT_FLOAT(value: f32, decimalPlaces: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16707428521474840942)), value, decimalPlaces);
}
/// Used to be known as _ADD_TEXT_COMPONENT_ITEM_STRING
pub fn ADD_TEXT_COMPONENT_SUBSTRING_TEXT_LABEL(labelName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14284527218482400231)), labelName);
}
/// It adds the localized text of the specified GXT entry name. Eg. if the argument is GET_HASH_KEY("ES_HELP"), adds "Continue". Just uses a text labels hash key
pub fn ADD_TEXT_COMPONENT_SUBSTRING_TEXT_LABEL_HASH_KEY(gxtEntryHash: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1669035989767043627)), gxtEntryHash);
}
pub fn ADD_TEXT_COMPONENT_SUBSTRING_BLIP_NAME(blip: types.Blip) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9289475650368165166)), blip);
}
/// Used to be known as _ADD_TEXT_COMPONENT_STRING
pub fn ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(text: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7789129354908300458)), text);
}
/// Adds a timer (e.g. "00:00:00:000"). The appearance of the timer depends on the flags, which needs more research.
pub fn ADD_TEXT_COMPONENT_SUBSTRING_TIME(timestamp: c_int, flags: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1231155517346932927)), timestamp, flags);
}
pub fn ADD_TEXT_COMPONENT_FORMATTED_INTEGER(value: c_int, commaSeparated: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1030326645201738948)), value, commaSeparated);
}
/// p1 was always -1
/// Used to be known as _ADD_TEXT_COMPONENT_APP_TITLE
pub fn ADD_TEXT_COMPONENT_SUBSTRING_PHONE_NUMBER(p0: [*c]const u8, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8510527060190799389)), p0, p1);
}
/// This native (along with ADD_TEXT_COMPONENT_SUBSTRING_KEYBOARD_DISPLAY and ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME) do not actually filter anything. They simply add the provided text (as of 944)
/// Used to be known as _ADD_TEXT_COMPONENT_STRING2
pub fn ADD_TEXT_COMPONENT_SUBSTRING_WEBSITE(website: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10722871427172256134)), website);
}
/// Used to be known as _ADD_TEXT_COMPONENT_STRING3
/// Used to be known as _ADD_TEXT_COMPONENT_SCALEFORM
pub fn ADD_TEXT_COMPONENT_SUBSTRING_KEYBOARD_DISPLAY(string: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6874835027791089684)), string);
}
/// Used to be known as _SET_NOTIFICATION_COLOR_NEXT
pub fn SET_COLOUR_OF_NEXT_TEXT_COMPONENT(hudColor: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4160189315227336364)), hudColor);
}
/// Returns a substring of a specified length starting at a specified position.
/// Example:
/// // Get "STRING" text from "MY_STRING"
/// subStr = HUD::GET_CHARACTER_FROM_AUDIO_CONVERSATION_FILENAME("MY_STRING", 3, 6);
/// Used to be known as _GET_TEXT_SUBSTRING
pub fn GET_CHARACTER_FROM_AUDIO_CONVERSATION_FILENAME(text: [*c]const u8, position: c_int, length: c_int) [*c]const u8 {
return nativeCaller.invoke3(@as(u64, @intCast(1629134525311535296)), text, position, length);
}
/// Returns a substring of a specified length starting at a specified position. The result is guaranteed not to exceed the specified max length.
/// NOTE: The 'maxLength' parameter might actually be the size of the buffer that is returned. More research is needed. -CL69
/// Example:
/// // Condensed example of how Rockstar uses this function
/// strLen = HUD::GET_LENGTH_OF_LITERAL_STRING(MISC::GET_ONSCREEN_KEYBOARD_RESULT());
/// subStr = HUD::GET_CHARACTER_FROM_AUDIO_CONVERSATION_FILENAME_WITH_BYTE_LIMIT(MISC::GET_ONSCREEN_KEYBOARD_RESULT(), 0, strLen, 63);
/// --
/// "fm_race_creator.ysc", line 85115:
/// // parameters modified for clarity
/// BOOL sub_8e5aa(char *text, int length) {
/// for (i = 0; i <= (length - 2); i += 1) {
/// if (!MISC::ARE_STRINGS_EQUAL(HUD::GET_CHARACTER_FROM_AUDIO_CONVERSATION_FILENAME_WITH_BYTE_LIMIT(text, i, i + 1, 1), " ")) {
/// return FALSE;
/// }
/// }
/// return TRUE;
/// }
/// Used to be known as _GET_TEXT_SUBSTRING_SAFE
pub fn GET_CHARACTER_FROM_AUDIO_CONVERSATION_FILENAME_WITH_BYTE_LIMIT(text: [*c]const u8, position: c_int, length: c_int, maxLength: c_int) [*c]const u8 {
return nativeCaller.invoke4(@as(u64, @intCast(12860457834078406085)), text, position, length, maxLength);
}
/// Returns a substring that is between two specified positions. The length of the string will be calculated using (endPosition - startPosition).
/// Example:
/// // Get "STRING" text from "MY_STRING"
/// subStr = HUD::GET_CHARACTER_FROM_AUDIO_CONVERSATION_FILENAME_BYTES("MY_STRING", 3, 9);
/// // Overflows are possibly replaced with underscores (needs verification)
/// subStr = HUD::GET_CHARACTER_FROM_AUDIO_CONVERSATION_FILENAME_BYTES("MY_STRING", 3, 10); // "STRING_"?
/// Used to be known as _GET_TEXT_SUBSTRING_SLICE
pub fn GET_CHARACTER_FROM_AUDIO_CONVERSATION_FILENAME_BYTES(text: [*c]const u8, startPosition: c_int, endPosition: c_int) [*c]const u8 {
return nativeCaller.invoke3(@as(u64, @intCast(14885714783822319754)), text, startPosition, endPosition);
}
/// Gets a localized string literal from a label name. Can be used for output of e.g. VEHICLE::GET_LIVERY_NAME. To check if a GXT label can be localized with this, HUD::DOES_TEXT_LABEL_EXIST can be used.
/// Used to be known as _GET_LABEL_TEXT
pub fn GET_FILENAME_FOR_AUDIO_CONVERSATION(labelName: [*c]const u8) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(8886306764405083250)), labelName);
}
pub fn CLEAR_PRINTS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(14714379805468572121)));
}
pub fn CLEAR_BRIEF() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(11324634911882449683)));
}
pub fn CLEAR_ALL_HELP_MESSAGES() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(7023634693725934496)));
}
/// p0: found arguments in the b617d scripts: https://pastebin.com/X5akCN7z
pub fn CLEAR_THIS_PRINT(p0: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14947587908815894237)), p0);
}
pub fn CLEAR_SMALL_PRINTS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(3236443508323387820)));
}
pub fn DOES_TEXT_BLOCK_EXIST(gxt: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2049985447167629193)), gxt);
}
/// Request a gxt into the passed slot.
pub fn REQUEST_ADDITIONAL_TEXT(gxt: [*c]const u8, slot: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8189655201140380708)), gxt, slot);
}
/// Used to be known as _REQUEST_ADDITIONAL_TEXT_2
pub fn REQUEST_ADDITIONAL_TEXT_FOR_DLC(gxt: [*c]const u8, slot: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6920337118842640550)), gxt, slot);
}
pub fn HAS_ADDITIONAL_TEXT_LOADED(slot: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(154353723296127160)), slot);
}
pub fn CLEAR_ADDITIONAL_TEXT(p0: c_int, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3033066534563939533)), p0, p1);
}
pub fn IS_STREAMING_ADDITIONAL_TEXT(p0: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10045305044058106864)), p0);
}
/// Checks if the specified gxt has loaded into the passed slot.
pub fn HAS_THIS_ADDITIONAL_TEXT_LOADED(gxt: [*c]const u8, slot: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(12519732147037193660)), gxt, slot);
}
pub fn IS_MESSAGE_BEING_DISPLAYED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8756334933637345089)));
}
/// Checks if the passed gxt name exists in the game files.
pub fn DOES_TEXT_LABEL_EXIST(gxt: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12396662200215159378)), gxt);
}
pub fn GET_FIRST_N_CHARACTERS_OF_LITERAL_STRING(string: [*c]const u8, length: c_int) [*c]const u8 {
return nativeCaller.invoke2(@as(u64, @intCast(11007870136933241105)), string, length);
}
/// Returns the string length of the string from the gxt string .
pub fn GET_LENGTH_OF_STRING_WITH_THIS_TEXT_LABEL(gxt: [*c]const u8) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(9231203256139661172)), gxt);
}
/// Returns the length of the string passed (much like strlen).
pub fn GET_LENGTH_OF_LITERAL_STRING(string: [*c]const u8) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(17307492233653037565)), string);
}
/// Used to be known as _GET_LENGTH_OF_STRING
pub fn GET_LENGTH_OF_LITERAL_STRING_IN_BYTES(string: [*c]const u8) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(4892053862256824078)), string);
}
/// This functions converts the hash of a street name into a readable string.
/// For how to get the hashes, see PATHFIND::GET_STREET_NAME_AT_COORD.
pub fn GET_STREET_NAME_FROM_HASH_KEY(hash: types.Hash) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(15055404454487149753)), hash);
}
pub fn IS_HUD_PREFERENCE_SWITCHED_ON() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(1815196559013396164)));
}
pub fn IS_RADAR_PREFERENCE_SWITCHED_ON() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(11436418664070324990)));
}
pub fn IS_SUBTITLE_PREFERENCE_SWITCHED_ON() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(12496834364523667620)));
}
/// If Hud should be displayed
pub fn DISPLAY_HUD(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11973181459913502762)), toggle);
}
/// Enables drawing some hud components, such as help labels, this frame, when the player is dead.
/// Used to be known as _DISPLAY_HUD_WHEN_DEAD_THIS_FRAME
pub fn DISPLAY_HUD_WHEN_NOT_IN_STATE_OF_PLAY_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(8532625725029707875)));
}
pub fn DISPLAY_HUD_WHEN_PAUSED_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(4625089984838756504)));
}
/// If Minimap / Radar should be displayed.
pub fn DISPLAY_RADAR(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11595565366281037459)), toggle);
}
/// Setter for GET_FAKE_SPECTATOR_MODE
pub fn SET_FAKE_SPECTATOR_MODE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14804496589921774187)), toggle);
}
/// Getter for SET_FAKE_SPECTATOR_MODE
pub fn GET_FAKE_SPECTATOR_MODE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14038473885450659256)));
}
pub fn IS_HUD_HIDDEN() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(12133956090350482885)));
}
pub fn IS_RADAR_HIDDEN() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(1549119181875577954)));
}
/// Used to be known as _IS_RADAR_ENABLED
pub fn IS_MINIMAP_RENDERING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(12643098531718812954)));
}
pub fn USE_VEHICLE_TARGETING_RETICULE(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(894401646490121415)), p0);
}
pub fn _USE_VEHICLE_TARGETING_RETICULE_ON_VEHICLES(enable: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1999855696676423205)), enable);
}
pub fn ADD_VALID_VEHICLE_HIT_HASH(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16484214127907910615)), p0);
}
pub fn CLEAR_VALID_VEHICLE_HIT_HASHES() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(16970025031319957895)));
}
/// Enable / disable showing route for the Blip-object.
pub fn SET_BLIP_ROUTE(blip: types.Blip, enabled: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5727886703621522409)), blip, enabled);
}
/// Used to be known as _CLEAR_ALL_BLIP_ROUTES
pub fn CLEAR_ALL_BLIP_ROUTES() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(15071440000031833873)));
}
pub fn SET_BLIP_ROUTE_COLOUR(blip: types.Blip, colour: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9471445831088593417)), blip, colour);
}
/// Used to be known as _SET_FORCE_BLIP_ROUTES_ON_FOOT
pub fn SET_FORCE_SHOW_GPS(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2851047607269690918)), toggle);
}
/// Used to be known as _SET_USE_WAYPOINT_AS_DESTINATION
pub fn SET_USE_SET_DESTINATION_IN_PAUSE_MAP(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7844522970654662787)), toggle);
}
pub fn SET_BLOCK_WANTED_FLASH(disabled: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15101734431743575145)), disabled);
}
pub fn ADD_NEXT_MESSAGE_TO_PREVIOUS_BRIEFS(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6929187101012700101)), p0);
}
pub fn FORCE_NEXT_MESSAGE_TO_PREVIOUS_BRIEFS_LIST(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6329634270836220017)), p0);
}
/// zoom ranges from 0 to 90f in R* Scripts
/// Used to be known as RESPONDING_AS_TEMP
pub fn SET_RADAR_ZOOM_PRECISE(zoom: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13624169452525634359)), zoom);
}
/// zoomLevel ranges from 0 to 1400 in R* Scripts
pub fn SET_RADAR_ZOOM(zoomLevel: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(679750498325732282)), zoomLevel);
}
pub fn SET_RADAR_ZOOM_TO_BLIP(blip: types.Blip, zoom: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17982393093251385265)), blip, zoom);
}
/// Used to be known as _SET_RADAR_ZOOM_LEVEL_THIS_FRAME
pub fn SET_RADAR_ZOOM_TO_DISTANCE(zoom: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14662806510087023937)), zoom);
}
/// Does nothing (it's a nullsub).
pub fn UPDATE_RADAR_ZOOM_TO_BLIP() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(15133385805985858421)));
}
pub fn GET_HUD_COLOUR(hudColorIndex: c_int, r: [*c]c_int, g: [*c]c_int, b: [*c]c_int, a: [*c]c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(8979211922652018191)), hudColorIndex, r, g, b, a);
}
/// Sets the color of HUD_COLOUR_SCRIPT_VARIABLE
pub fn SET_SCRIPT_VARIABLE_HUD_COLOUR(r: c_int, g: c_int, b: c_int, a: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(15459274192404912244)), r, g, b, a);
}
/// Sets the color of HUD_COLOUR_SCRIPT_VARIABLE_2
/// Used to be known as _SET_SCRIPT_VARIABLE_2_HUD_COLOUR
pub fn SET_SECOND_SCRIPT_VARIABLE_HUD_COLOUR(r: c_int, g: c_int, b: c_int, a: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(1631152879335897785)), r, g, b, a);
}
/// makes hudColorIndex2 color into hudColorIndex color
/// Used to be known as _SET_HUD_COLOURS_SWITCH
pub fn REPLACE_HUD_COLOUR(hudColorIndex: c_int, hudColorIndex2: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2075157288053966355)), hudColorIndex, hudColorIndex2);
}
/// Used to be known as _SET_HUD_COLOUR
pub fn REPLACE_HUD_COLOUR_WITH_RGBA(hudColorIndex: c_int, r: c_int, g: c_int, b: c_int, a: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(17515852788994771278)), hudColorIndex, r, g, b, a);
}
/// Used to be known as _SET_ABILITY_BAR_VISIBILITY_IN_MULTIPLAYER
pub fn SET_ABILITY_BAR_VISIBILITY(visible: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2161407953474885033)), visible);
}
/// Used to be known as _SET_ALLOW_ABILITY_BAR_IN_MULTIPLAYER
pub fn SET_ALLOW_ABILITY_BAR(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9841255549971568188)), toggle);
}
pub fn FLASH_ABILITY_BAR(millisecondsToFlash: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(202585071617734094)), millisecondsToFlash);
}
pub fn SET_ABILITY_BAR_VALUE(p0: f32, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11054465290396358750)), p0, p1);
}
pub fn FLASH_WANTED_DISPLAY(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11640392409260190239)), p0);
}
pub fn FORCE_OFF_WANTED_STAR_FLASH(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13442512345701483237)), toggle);
}
/// Used to be known as _SET_CURRENT_CHARACTER_HUD_COLOR
pub fn SET_CUSTOM_MP_HUD_COLOR(hudColorId: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3084035102440479198)), hudColorId);
}
/// This gets the height of the FONT and not the total text. You need to get the number of lines your text uses, and get the height of a newline (I'm using a smaller value) to get the total text height.
/// Used to be known as _GET_TEXT_SCALE_HEIGHT
pub fn GET_RENDERED_CHARACTER_HEIGHT(size: f32, font: c_int) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(15819073411951650688)), size, font);
}
/// Size range : 0F to 1.0F
/// p0 is unknown and doesn't seem to have an effect, yet in the game scripts it changes to 1.0F sometimes.
pub fn SET_TEXT_SCALE(scale: f32, size: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(560759698880214217)), scale, size);
}
/// colors you input not same as you think?
/// A: for some reason its R B G A
pub fn SET_TEXT_COLOUR(red: c_int, green: c_int, blue: c_int, alpha: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(13721100270610396226)), red, green, blue, alpha);
}
pub fn SET_TEXT_CENTRE(@"align": windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13848372864960272523)), @"align");
}
pub fn SET_TEXT_RIGHT_JUSTIFY(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7727128373235543623)), toggle);
}
/// Types -
/// 0: Center-Justify
/// 1: Left-Justify
/// 2: Right-Justify
/// Right-Justify requires SET_TEXT_WRAP, otherwise it will draw to the far right of the screen
pub fn SET_TEXT_JUSTIFICATION(justifyType: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5623137247512493770)), justifyType);
}
pub fn SET_TEXT_LINE_HEIGHT_MULT(lineHeightMult: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11476901345528206289)), lineHeightMult);
}
/// It sets the text in a specified box and wraps the text if it exceeds the boundries. Both values are for X axis. Useful when positioning text set to center or aligned to the right.
/// start - left boundry on screen position (0.0 - 1.0)
/// end - right boundry on screen position (0.0 - 1.0)
pub fn SET_TEXT_WRAP(start: f32, end: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7139434236170869360)), start, end);
}
pub fn SET_TEXT_LEADING(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11892524688486562559)), p0);
}
/// This native does absolutely nothing, just a nullsub
pub fn SET_TEXT_PROPORTIONAL(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(255613713711619320)), p0);
}
/// fonts that mess up your text where made for number values/misc stuff
pub fn SET_TEXT_FONT(fontType: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7412968334783068634)), fontType);
}
pub fn SET_TEXT_DROP_SHADOW() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(2063750248883895902)));
}
/// distance - shadow distance in pixels, both horizontal and vertical
/// r, g, b, a - color
pub fn SET_TEXT_DROPSHADOW(distance: c_int, r: c_int, g: c_int, b: c_int, a: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(5070073224473199441)), distance, r, g, b, a);
}
pub fn SET_TEXT_OUTLINE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(2671724955187806462)));
}
/// This native does absolutely nothing, just a nullsub
pub fn SET_TEXT_EDGE(p0: c_int, r: c_int, g: c_int, b: c_int, a: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(4906112297440653222)), p0, r, g, b, a);
}
pub fn SET_TEXT_RENDER_ID(renderId: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6851435361686548753)), renderId);
}
/// This function is hard-coded to always return 1.
pub fn GET_DEFAULT_SCRIPT_RENDERTARGET_RENDER_ID() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(5976444026706024118)));
}
pub fn REGISTER_NAMED_RENDERTARGET(name: [*c]const u8, p1: windows.BOOL) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(6330303121102888163)), name, p1);
}
pub fn IS_NAMED_RENDERTARGET_REGISTERED(name: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8709077765568140980)), name);
}
pub fn RELEASE_NAMED_RENDERTARGET(name: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16858943627931766228)), name);
}
pub fn LINK_NAMED_RENDERTARGET(modelHash: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17780385220993433389)), modelHash);
}
pub fn GET_NAMED_RENDERTARGET_RENDER_ID(name: [*c]const u8) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(1901777666213403707)), name);
}
pub fn IS_NAMED_RENDERTARGET_LINKED(modelHash: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1240548542186197656)), modelHash);
}
pub fn CLEAR_HELP(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10231313563422525442)), toggle);
}
pub fn IS_HELP_MESSAGE_ON_SCREEN() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(15768086655799919022)));
}
pub fn HAS_SCRIPT_HIDDEN_HELP_THIS_FRAME() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(2399527321204237418)));
}
pub fn IS_HELP_MESSAGE_BEING_DISPLAYED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(5582567543607241831)));
}
pub fn IS_HELP_MESSAGE_FADING_OUT() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(3638590665636823913)));
}
/// Used to be known as _SET_HELP_MESSAGE_TEXT_STYLE
pub fn SET_HELP_MESSAGE_STYLE(style: c_int, hudColor: c_int, alpha: c_int, p3: c_int, p4: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(13385651071679847546)), style, hudColor, alpha, p3, p4);
}
/// Used to be known as _GET_LEVEL_BLIP_SPRITE
pub fn GET_STANDARD_BLIP_ENUM_ID() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(5375366355209657773)));
}
/// Used to be known as _GET_BLIP_INFO_ID_ITERATOR
pub fn GET_WAYPOINT_BLIP_ENUM_ID() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(1760446918642962045)));
}
pub fn GET_NUMBER_OF_ACTIVE_BLIPS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(11114870540554220776)));
}
pub fn GET_NEXT_BLIP_INFO_ID(blipSprite: c_int) types.Blip {
return nativeCaller.invoke1(@as(u64, @intCast(1511356407087087271)), blipSprite);
}
pub fn GET_FIRST_BLIP_INFO_ID(blipSprite: c_int) types.Blip {
return nativeCaller.invoke1(@as(u64, @intCast(2012513321047894559)), blipSprite);
}
/// Used to be known as _GET_CLOSEST_BLIP_OF_TYPE
pub fn GET_CLOSEST_BLIP_INFO_ID(blipSprite: c_int) types.Blip {
return nativeCaller.invoke1(@as(u64, @intCast(15313575125103452654)), blipSprite);
}
pub fn GET_BLIP_INFO_ID_COORD(blip: types.Blip) types.Vector3 {
return nativeCaller.invoke1(@as(u64, @intCast(18049441090438847753)), blip);
}
pub fn GET_BLIP_INFO_ID_DISPLAY(blip: types.Blip) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(2175592009778191419)), blip);
}
/// Returns a value based on what the blip is attached to
/// 1 - Vehicle
/// 2 - Ped
/// 3 - Object
/// 4 - Coord
/// 5 - unk
/// 6 - Pickup
/// 7 - Radius
pub fn GET_BLIP_INFO_ID_TYPE(blip: types.Blip) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(13734581770745051035)), blip);
}
pub fn GET_BLIP_INFO_ID_ENTITY_INDEX(blip: types.Blip) types.Entity {
return nativeCaller.invoke1(@as(u64, @intCast(5450730304715021356)), blip);
}
/// This function is hard-coded to always return 0.
pub fn GET_BLIP_INFO_ID_PICKUP_INDEX(blip: types.Blip) types.Pickup {
return nativeCaller.invoke1(@as(u64, @intCast(11198067315515970434)), blip);
}
/// Returns the Blip handle of given Entity.
pub fn GET_BLIP_FROM_ENTITY(entity: types.Entity) types.Blip {
return nativeCaller.invoke1(@as(u64, @intCast(13586724326735280104)), entity);
}
pub fn ADD_BLIP_FOR_RADIUS(posX: f32, posY: f32, posZ: f32, radius: f32) types.Blip {
return nativeCaller.invoke4(@as(u64, @intCast(5080497408466962842)), posX, posY, posZ, radius);
}
/// Adds a rectangular blip for the specified coordinates/area.
/// It is recommended to use SET_BLIP_ROTATION and SET_BLIP_COLOUR to make the blip not rotate along with the camera.
/// By default, the blip will show as a _regular_ blip with the specified color/sprite if it is outside of the minimap view.
/// Example image:
/// minimap https://w.wew.wtf/pdcjig.png
/// big map https://w.wew.wtf/zgcjcm.png
/// (Native name is _likely_ to actually be ADD_BLIP_FOR_AREA, but due to the usual reasons this can't be confirmed)
/// Used to be known as _ADD_BLIP_FOR_AREA
pub fn ADD_BLIP_FOR_AREA(x: f32, y: f32, z: f32, width: f32, height: f32) types.Blip {
return nativeCaller.invoke5(@as(u64, @intCast(14870057342365184568)), x, y, z, width, height);
}
/// Returns red ( default ) blip attached to entity.
/// Example:
/// Blip blip; //Put this outside your case or option
/// blip = HUD::ADD_BLIP_FOR_ENTITY(YourPedOrBodyguardName);
/// HUD::SET_BLIP_AS_FRIENDLY(blip, true);
pub fn ADD_BLIP_FOR_ENTITY(entity: types.Entity) types.Blip {
return nativeCaller.invoke1(@as(u64, @intCast(6691947479759912167)), entity);
}
pub fn ADD_BLIP_FOR_PICKUP(pickup: types.Pickup) types.Blip {
return nativeCaller.invoke1(@as(u64, @intCast(13705460156381510966)), pickup);
}
/// Creates an orange ( default ) Blip-object. Returns a Blip-object which can then be modified.
pub fn ADD_BLIP_FOR_COORD(x: f32, y: f32, z: f32) types.Blip {
return nativeCaller.invoke3(@as(u64, @intCast(6486199071725192374)), x, y, z);
}
pub fn TRIGGER_SONAR_BLIP(posX: f32, posY: f32, posZ: f32, radius: f32, p4: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(8276845560340660462)), posX, posY, posZ, radius, p4);
}
pub fn ALLOW_SONAR_BLIPS(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6949983046200820540)), toggle);
}
pub fn SET_BLIP_COORDS(blip: types.Blip, posX: f32, posY: f32, posZ: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(12550114335291799133)), blip, posX, posY, posZ);
}
pub fn GET_BLIP_COORDS(blip: types.Blip) types.Vector3 {
return nativeCaller.invoke1(@as(u64, @intCast(6371184173552343406)), blip);
}
/// Sets the displayed sprite for a specific blip..
/// You may have your own list, but since dev-c didn't show it I was bored and started looking through scripts and functions to get a presumable almost positive list of a majority of blip IDs
/// https://pastebin.com/Bpj9Sfft
/// Blips Images + IDs:
/// https://gtaxscripting.blogspot.com/2016/05/gta-v-blips-id-and-image.html
pub fn SET_BLIP_SPRITE(blip: types.Blip, spriteId: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16101307653538016687)), blip, spriteId);
}
/// Blips Images + IDs:
/// gtaxscripting.blogspot.com/2016/05/gta-v-blips-id-and-image.html
pub fn GET_BLIP_SPRITE(blip: types.Blip) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(2290211554291153999)), blip);
}
pub fn SET_COP_BLIP_SPRITE(p0: c_int, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11514363666357737114)), p0, p1);
}
pub fn SET_COP_BLIP_SPRITE_AS_STANDARD() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(13238457900890112280)));
}
/// Doesn't work if the label text of gxtEntry is >= 80.
pub fn SET_BLIP_NAME_FROM_TEXT_FILE(blip: types.Blip, gxtEntry: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16906794343532668804)), blip, gxtEntry);
}
pub fn SET_BLIP_NAME_TO_PLAYER_NAME(blip: types.Blip, player: types.Player) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1332475816669390499)), blip, player);
}
/// Sets alpha-channel for blip color.
/// Example:
/// Blip blip = HUD::ADD_BLIP_FOR_ENTITY(entity);
/// HUD::SET_BLIP_COLOUR(blip , 3);
/// HUD::SET_BLIP_ALPHA(blip , 64);
pub fn SET_BLIP_ALPHA(blip: types.Blip, alpha: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5043916472936335156)), blip, alpha);
}
pub fn GET_BLIP_ALPHA(blip: types.Blip) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(10885024991924373637)), blip);
}
pub fn SET_BLIP_FADE(blip: types.Blip, opacity: c_int, duration: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(3093567789283289484)), blip, opacity, duration);
}
/// Returns -1, 0, +1, depending on if the blip is fading out, doing nothing, or fading in respectively.
/// Used to be known as _GET_BLIP_FADE_STATUS
pub fn GET_BLIP_FADE_DIRECTION(blip: types.Blip) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(3177072807653226590)), blip);
}
/// After some testing, looks like you need to use CEIL() on the rotation (vehicle/ped heading) before using it there.
pub fn SET_BLIP_ROTATION(blip: types.Blip, rotation: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17903642289297440622)), blip, rotation);
}
/// Does not require whole number/integer rotations.
/// Used to be known as _SET_BLIP_SQUARED_ROTATION
pub fn SET_BLIP_ROTATION_WITH_FLOAT(blip: types.Blip, heading: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12157097598244662407)), blip, heading);
}
/// Used to be known as _GET_BLIP_ROTATION
pub fn GET_BLIP_ROTATION(blip: types.Blip) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(17612777317178751)), blip);
}
/// Adds up after viewing multiple R* scripts. I believe that the duration is in miliseconds.
pub fn SET_BLIP_FLASH_TIMER(blip: types.Blip, duration: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15261977662507091916)), blip, duration);
}
pub fn SET_BLIP_FLASH_INTERVAL(blip: types.Blip, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12272831464067893886)), blip, p1);
}
/// https://gtaforums.com/topic/864881-all-blip-color-ids-pictured/
pub fn SET_BLIP_COLOUR(blip: types.Blip, color: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(276965922061511550)), blip, color);
}
/// Can be used to give blips any RGB colour with SET_BLIP_COLOUR(blip, 84).
pub fn SET_BLIP_SECONDARY_COLOUR(blip: types.Blip, r: c_int, g: c_int, b: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(1479754035503172075)), blip, r, g, b);
}
pub fn GET_BLIP_COLOUR(blip: types.Blip) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(16101105946780988199)), blip);
}
pub fn GET_BLIP_HUD_COLOUR(blip: types.Blip) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(8258298928391301870)), blip);
}
pub fn IS_BLIP_SHORT_RANGE(blip: types.Blip) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15735444228579637542)), blip);
}
pub fn IS_BLIP_ON_MINIMAP(blip: types.Blip) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16437194366933105191)), blip);
}
pub fn DOES_BLIP_HAVE_GPS_ROUTE(blip: types.Blip) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15934361058581903185)), blip);
}
pub fn SET_BLIP_HIDDEN_ON_LEGEND(blip: types.Blip, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6066784729005810894)), blip, toggle);
}
pub fn SET_BLIP_HIGH_DETAIL(blip: types.Blip, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16310080455802146491)), blip, toggle);
}
pub fn SET_BLIP_AS_MISSION_CREATOR_BLIP(blip: types.Blip, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2642488418240536533)), blip, toggle);
}
pub fn IS_MISSION_CREATOR_BLIP(blip: types.Blip) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2807039936679482173)), blip);
}
/// Used to be known as DISABLE_BLIP_NAME_FOR_VAR
pub fn GET_NEW_SELECTED_MISSION_CREATOR_BLIP() types.Blip {
return nativeCaller.invoke0(@as(u64, @intCast(6669998785878170356)));
}
pub fn IS_HOVERING_OVER_MISSION_CREATOR_BLIP() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(4712999281802178670)));
}
pub fn SHOW_START_MISSION_INSTRUCTIONAL_BUTTON(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17412817812920774118)), toggle);
}
/// Used to be known as _SHOW_CONTACT_INSTRUCTIONAL_BUTTON
pub fn SHOW_CONTACT_INSTRUCTIONAL_BUTTON(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14371735198991718511)), toggle);
}
pub fn RELOAD_MAP_MENU() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(2960739795670439975)));
}
pub fn SET_BLIP_MARKER_LONG_DISTANCE(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13065666665620711404)), p0, p1);
}
pub fn SET_BLIP_FLASHES(blip: types.Blip, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12773706319605124670)), blip, toggle);
}
pub fn SET_BLIP_FLASHES_ALTERNATE(blip: types.Blip, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3354500681329135825)), blip, toggle);
}
pub fn IS_BLIP_FLASHING(blip: types.Blip) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11953714324508692208)), blip);
}
/// Sets whether or not the specified blip should only be displayed when nearby, or on the minimap.
pub fn SET_BLIP_AS_SHORT_RANGE(blip: types.Blip, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13730319670167370610)), blip, toggle);
}
pub fn SET_BLIP_SCALE(blip: types.Blip, scale: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15242226327205421655)), blip, scale);
}
/// See https://imgur.com/a/lLkEsMN
/// Used to be known as _SET_BLIP_SCALE_TRANSFORMATION
pub fn SET_BLIP_SCALE_2D(blip: types.Blip, xScale: f32, yScale: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(14800275623171967353)), blip, xScale, yScale);
}
/// See this topic for more details : gtaforums.com/topic/717612-v-scriptnative-documentation-and-research/page-35?p=1069477935
pub fn SET_BLIP_PRIORITY(blip: types.Blip, priority: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12582997914019671161)), blip, priority);
}
/// Display Id behaviours:
/// 0 = Doesn't show up, ever, anywhere.
/// 1 = Doesn't show up, ever, anywhere.
/// 2 = Shows on both main map and minimap. (Selectable on map)
/// 3 = Shows on main map only. (Selectable on map)
/// 4 = Shows on main map only. (Selectable on map)
/// 5 = Shows on minimap only.
/// 6 = Shows on both main map and minimap. (Selectable on map)
/// 7 = Doesn't show up, ever, anywhere.
/// 8 = Shows on both main map and minimap. (Not selectable on map)
/// 9 = Shows on minimap only.
/// 10 = Shows on both main map and minimap. (Not selectable on map)
/// Anything higher than 10 seems to be exactly the same as 10.
pub fn SET_BLIP_DISPLAY(blip: types.Blip, displayId: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10388030775920576808)), blip, displayId);
}
/// Example: https://i.imgur.com/skY6vAJ.png
/// Index:
/// 1 = No distance shown in legend
/// 2 = Distance shown in legend
/// 7 = "Other Players" category, also shows distance in legend
/// 10 = "Property" category
/// 11 = "Owned Property" category
/// Any other value behaves like index = 1, index wraps around after 255
/// Blips with categories 7, 10 or 11 will all show under the specific categories listing in the map legend, regardless of sprite or name.
/// Legend entries:
/// 7 = Other Players (BLIP_OTHPLYR)
/// 10 = Property (BLIP_PROPCAT)
/// 11 = Owned Property (BLIP_APARTCAT)
/// Category needs to be `7` in order for blip names to show on the expanded minimap when using DISPLAY_PLAYER_NAME_TAGS_ON_BLIPS.
pub fn SET_BLIP_CATEGORY(blip: types.Blip, index: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2543651177335553434)), blip, index);
}
/// In the C++ SDK, this seems not to work-- the blip isn't removed immediately. I use it for saving cars.
/// E.g.:
/// Ped pped = PLAYER::PLAYER_PED_ID();
/// Vehicle v = PED::GET_VEHICLE_PED_IS_USING(pped);
/// Blip b = HUD::ADD_BLIP_FOR_ENTITY(v);
/// works fine.
/// But later attempting to delete it with:
/// Blip b = HUD::GET_BLIP_FROM_ENTITY(v);
/// if (HUD::DOES_BLIP_EXIST(b)) HUD::REMOVE_BLIP(&b);
/// doesn't work. And yes, doesn't work without the DOES_BLIP_EXIST check either. Also, if you attach multiple blips to the same thing (say, a vehicle), and that thing disappears, the blips randomly attach to other things (in my case, a vehicle).
/// Thus for me, HUD::REMOVE_BLIP(&b) only works if there's one blip, (in my case) the vehicle is marked as no longer needed, you drive away from it and it eventually despawns, AND there is only one blip attached to it. I never intentionally attach multiple blips but if the user saves the car, this adds a blip. Then if they delete it, it is supposed to remove the blip, but it doesn't. Then they can immediately save it again, causing another blip to re-appear.
/// -------------
/// Passing the address of the variable instead of the value works for me.
/// e.g.
/// int blip = HUD::ADD_BLIP_FOR_ENTITY(ped);
/// HUD::REMOVE_BLIP(&blip);
/// Remove blip will currently crash your game, just artificially remove the blip by setting the sprite to a id that is 'invisible'.
pub fn REMOVE_BLIP(blip: [*c]types.Blip) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9702532981073061341)), blip);
}
/// false for enemy
/// true for friendly
pub fn SET_BLIP_AS_FRIENDLY(blip: types.Blip, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8029681744942738100)), blip, toggle);
}
pub fn PULSE_BLIP(blip: types.Blip) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8371470239498874739)), blip);
}
pub fn SHOW_NUMBER_ON_BLIP(blip: types.Blip, number: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11799628222247225526)), blip, number);
}
pub fn HIDE_NUMBER_ON_BLIP(blip: types.Blip) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5993446006920315208)), blip);
}
pub fn SHOW_HEIGHT_ON_BLIP(blip: types.Blip, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8476174985676657221)), blip, toggle);
}
/// Adds a green checkmark on top of a blip.
/// Used to be known as _SET_BLIP_CHECKED
pub fn SHOW_TICK_ON_BLIP(blip: types.Blip, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8381549255156111390)), blip, toggle);
}
/// Adds a orange checkmark on top of a given blip handle: https://imgur.com/a/aw5OTMF
/// _SHOW_FRIEND_INDICATOR_ON_BLIP* - _SHOW_HEADING_INDICATOR_ON_BLIP*
/// Used to be known as _SHOW_TICK_ON_BLIP_2
/// Used to be known as _SHOW_HAS_COMPLETED_INDICATOR_ON_BLIP
pub fn SHOW_GOLD_TICK_ON_BLIP(blip: types.Blip, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14610243571739636136)), blip, toggle);
}
pub fn SHOW_FOR_SALE_ICON_ON_BLIP(blip: types.Blip, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1854759825759971578)), blip, toggle);
}
/// Adds the GTA: Online player heading indicator to a blip.
pub fn SHOW_HEADING_INDICATOR_ON_BLIP(blip: types.Blip, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6898569612438869215)), blip, toggle);
}
/// Highlights a blip by a cyan color circle.
/// Color can be changed with SET_BLIP_SECONDARY_COLOUR
/// Used to be known as SET_BLIP_FRIENDLY
pub fn SHOW_OUTLINE_INDICATOR_ON_BLIP(blip: types.Blip, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13264885120101131473)), blip, toggle);
}
/// Highlights a blip by a half cyan circle on the right side of the blip. https://i.imgur.com/FrV9M4e.png
/// .Indicating that that player is a friend (in GTA:O). This color can not be changed.
/// To toggle the left side (crew member indicator) of the half circle around the blip, use: `SHOW_CREW_INDICATOR_ON_BLIP`
/// Used to be known as SET_BLIP_FRIEND
pub fn SHOW_FRIEND_INDICATOR_ON_BLIP(blip: types.Blip, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2577162348705017882)), blip, toggle);
}
/// Enables or disables the blue half circle https://i.imgur.com/iZes9Ec.png around the specified blip on the left side of the blip. This is used to indicate that the player is in your crew in GTA:O. Color is changeable by using `SET_BLIP_SECONDARY_COLOUR`.
/// Used to be known as SET_BLIP_CREW
pub fn SHOW_CREW_INDICATOR_ON_BLIP(blip: types.Blip, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15923423495891924606)), blip, toggle);
}
/// Must be toggled before being queued for animation
/// Used to be known as _SET_BLIP_DISPLAY_INDICATOR_ON_BLIP
pub fn SET_BLIP_EXTENDED_HEIGHT_THRESHOLD(blip: types.Blip, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14134423667045280365)), blip, toggle);
}
pub fn SET_BLIP_SHORT_HEIGHT_THRESHOLD(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5430041582010756404)), p0, p1);
}
pub fn SET_BLIP_USE_HEIGHT_INDICATOR_ON_EDGE(blip: types.Blip, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3215341588412707137)), blip, p1);
}
/// Makes a blip go small when off the minimap.
/// Used to be known as _SET_BLIP_SHRINK
pub fn SET_BLIP_AS_MINIMAL_ON_EDGE(blip: types.Blip, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3129234821653548685)), blip, toggle);
}
/// Enabling this on a radius blip will make it outline only. See https://cdn.discordapp.com/attachments/553235301632573459/575132227935928330/unknown.png
pub fn SET_RADIUS_BLIP_EDGE(blip: types.Blip, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2693527789144160276)), blip, toggle);
}
pub fn DOES_BLIP_EXIST(blip: types.Blip) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12023247411461470170)), blip);
}
/// This native removes the current waypoint from the map.
/// Example:
/// C#:
/// Function.Call(Hash.SET_WAYPOINT_OFF);
/// C++:
/// HUD::SET_WAYPOINT_OFF();
pub fn SET_WAYPOINT_OFF() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(12098043896530100863)));
}
/// Used to be known as _DELETE_WAYPOINT
pub fn DELETE_WAYPOINTS_FROM_THIS_PLAYER() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(15629342789145110761)));
}
pub fn REFRESH_WAYPOINT() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(9365823934806974673)));
}
pub fn IS_WAYPOINT_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(2148768492990438821)));
}
pub fn SET_NEW_WAYPOINT(x: f32, y: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18321547689007051516)), x, y);
}
pub fn SET_BLIP_BRIGHT(blip: types.Blip, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12827255829962061956)), blip, toggle);
}
/// As of b2189, the third parameter sets the color of the cone (before b2189 it was ignored). Note that it uses HUD colors, not blip colors.
pub fn SET_BLIP_SHOW_CONE(blip: types.Blip, toggle: windows.BOOL, hudColorIndex: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(1374300214002618081)), blip, toggle, hudColorIndex);
}
/// Interesting fact: A hash collision for this is RESET_JETPACK_MODEL_SETTINGS
pub fn REMOVE_COP_BLIP_FROM_PED(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14237201228792779951)), ped);
}
pub fn SETUP_FAKE_CONE_DATA(blip: types.Blip, p1: f32, p2: f32, p3: f32, p4: f32, p5: f32, p6: f32, p7: types.Any, p8: c_int) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(17887470800858931913)), blip, p1, p2, p3, p4, p5, p6, p7, p8);
}
pub fn REMOVE_FAKE_CONE_DATA(blip: types.Blip) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3865158956636743378)), blip);
}
pub fn CLEAR_FAKE_CONE_ARRAY() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(9516323581945215901)));
}
/// Applies to new eBlipParams _BLIP_CHANGE_46* and _BLIP_CHANGE_47*
pub fn _SET_BLIP_GPS_ROUTE_DISPLAY_DISTANCE(blip: types.Blip, blipChangeParam46: c_int, blipChangeParam47: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2727357077001262814)), blip, blipChangeParam46, blipChangeParam47);
}
/// This native is used to colorize certain map components like the army base at the top of the map.
/// p2 appears to be always -1. If p2 is -1 then native wouldn't change the color. See https://gfycat.com/SkinnyPinkChupacabra
pub fn SET_MINIMAP_COMPONENT(componentId: c_int, toggle: windows.BOOL, overrideColor: c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(8478484834750160550)), componentId, toggle, overrideColor);
}
/// Used to be known as _SET_MINIMAP_SONAR_ENABLED
pub fn SET_MINIMAP_SONAR_SWEEP(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7732958218177162945)), toggle);
}
/// Used to be known as _SHOW_SIGNIN_UI
pub fn SHOW_ACCOUNT_PICKER() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(6982992551130946724)));
}
pub fn GET_MAIN_PLAYER_BLIP_ID() types.Blip {
return nativeCaller.invoke0(@as(u64, @intCast(15912603139834708730)));
}
pub fn SET_PM_WARNINGSCREEN_ACTIVE(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4698674223425403201)), p0);
}
pub fn HIDE_LOADING_ON_FADE_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(5405183579162698895)));
}
/// List of interior hashes: https://pastebin.com/1FUyXNqY
/// Not for every interior zoom > 0 available.
pub fn SET_RADAR_AS_INTERIOR_THIS_FRAME(interior: types.Hash, x: f32, y: f32, z: c_int, zoom: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(6478190164825072410)), interior, x, y, z, zoom);
}
/// Used to be known as _SET_INTERIOR_ZOOM_LEVEL_INCREASED
pub fn SET_INSIDE_VERY_SMALL_INTERIOR(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5786560795809227414)), toggle);
}
/// Used to be known as _SET_INTERIOR_ZOOM_LEVEL_DECREASED
pub fn SET_INSIDE_VERY_LARGE_INTERIOR(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9135740573159472506)), toggle);
}
pub fn SET_RADAR_AS_EXTERIOR_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(16725099261547195777)));
}
/// Sets the position of the arrow icon representing the player on both the minimap and world map.
/// Too bad this wouldn't work over the network (obviously not). Could spoof where we would be.
/// Used to be known as _SET_PLAYER_BLIP_POSITION_THIS_FRAME
pub fn SET_FAKE_PAUSEMAP_PLAYER_POSITION_THIS_FRAME(x: f32, y: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8638710128135168463)), x, y);
}
/// p2 maybe z float?
pub fn SET_FAKE_GPS_PLAYER_POSITION_THIS_FRAME(x: f32, y: f32, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(11634914383042481429)), x, y, p2);
}
/// Used to be known as _IS_MINIMAP_IN_INTERIOR
pub fn IS_PAUSEMAP_IN_INTERIOR_MODE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(10397120712398565231)));
}
/// Used to be known as _DISABLE_RADAR_THIS_FRAME
pub fn HIDE_MINIMAP_EXTERIOR_MAP_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(6898077731183497417)));
}
pub fn HIDE_MINIMAP_INTERIOR_MAP_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(2377478253056964800)));
}
/// Toggles the Cayo Perico map.
/// Used to be known as _SET_TOGGLE_MINIMAP_HEIST_ISLAND
pub fn SET_USE_ISLAND_MAP(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6779149314416003640)), toggle);
}
pub fn _SET_PAUSE_EXTERIOR_RENDERING_WHILE_IN_INTERIOR() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(3876720969876458065)));
}
/// When calling this, the current frame will have the players "arrow icon" be focused on the dead center of the radar.
/// Used to be known as _CENTER_PLAYER_ON_RADAR_THIS_FRAME
pub fn DONT_TILT_MINIMAP_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(7860118202149457749)));
}
pub fn DONT_ZOOM_MINIMAP_WHEN_RUNNING_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(9933399096411707296)));
}
pub fn DONT_ZOOM_MINIMAP_WHEN_SNIPING_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(6194039314628009568)));
}
pub fn SET_WIDESCREEN_FORMAT(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14100906360598409457)), p0);
}
pub fn DISPLAY_AREA_NAME(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2840483713975006840)), toggle);
}
/// "DISPLAY_CASH(false);" makes the cash amount render on the screen when appropriate
/// "DISPLAY_CASH(true);" disables cash amount rendering
pub fn DISPLAY_CASH(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10871347368796752055)), toggle);
}
/// Related to displaying cash on the HUD
/// Always called before HUD::CHANGE_FAKE_MP_CASH in decompiled scripts
pub fn USE_FAKE_MP_CASH(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1661639275829907934)), toggle);
}
/// Displays cash change notifications on HUD.
/// Used to be known as _SET_SINGLEPLAYER_HUD_CASH
pub fn CHANGE_FAKE_MP_CASH(cash: c_int, bank: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(536737010038877744)), cash, bank);
}
pub fn DISPLAY_AMMO_THIS_FRAME(display: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11954677266752150613)), display);
}
/// Displays the crosshair for this frame.
pub fn DISPLAY_SNIPER_SCOPE_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(8291498716230143586)));
}
/// Hides HUD and radar this frame and prohibits switching to other weapons (or accessing the weapon wheel)
pub fn HIDE_HUD_AND_RADAR_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(8187532053442985248)));
}
/// Controls whether to display 'Cash'/'Bank' next to the money balance HUD in Multiplayer (https://i.imgur.com/MiYUtNl.png)
/// Used to be known as _ALLOW_ADDITIONAL_INFO_FOR_MULTIPLAYER_HUD_CASH
pub fn ALLOW_DISPLAY_OF_MULTIPLAYER_CASH_TEXT(allow: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16608270460176475623)), allow);
}
pub fn SET_MULTIPLAYER_WALLET_CASH() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(14038102595923224508)));
}
pub fn REMOVE_MULTIPLAYER_WALLET_CASH() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(10794989480695437447)));
}
pub fn SET_MULTIPLAYER_BANK_CASH() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(15934216371787123978)));
}
pub fn REMOVE_MULTIPLAYER_BANK_CASH() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(14395325864471424464)));
}
/// This native does absolutely nothing, just a nullsub
pub fn SET_MULTIPLAYER_HUD_CASH(p0: c_int, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18238771464696018980)), p0, p1);
}
/// Removes multiplayer cash hud each frame
pub fn REMOVE_MULTIPLAYER_HUD_CASH() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(10848932969399459530)));
}
pub fn HIDE_HELP_TEXT_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(15305804375043908229)));
}
pub fn IS_IME_IN_PROGRESS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9230261206088200955)));
}
/// The messages are localized strings.
/// Examples:
/// "No_bus_money"
/// "Enter_bus"
/// "Tour_help"
/// "LETTERS_HELP2"
/// "Dummy"
/// **The bool appears to always be false (if it even is a bool, as it's represented by a zero)**
/// --------
/// p1 doesn't seem to make a difference, regardless of the state it's in.
/// picture of where on the screen this is displayed?
pub fn DISPLAY_HELP_TEXT_THIS_FRAME(message: [*c]const u8, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10812192697039119388)), message, p1);
}
/// Forces the weapon wheel to show/hide.
/// Used to be known as _SHOW_WEAPON_WHEEL
pub fn HUD_FORCE_WEAPON_WHEEL(show: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16948538893060047271)), show);
}
/// Displays "blazer_wheels_up" and "blazer_wheels_down" "weapon" icons when switching between jetski and quadbike modes. Works only on vehicles using "VEHICLE_TYPE_AMPHIBIOUS_QUADBIKE" vehicle type. Needs to be called every time prior to switching modes, otherwise the icon will only appear when switching modes once.
/// Used to be known as _HUD_DISPLAY_LOADING_SCREEN_TIPS
pub fn HUD_FORCE_SPECIAL_VEHICLE_WEAPON_WHEEL() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(5224249802429961583)));
}
/// Calling this each frame, stops the player from receiving a weapon via the weapon wheel.
/// Used to be known as _BLOCK_WEAPON_WHEEL_THIS_FRAME
/// Used to be known as _HUD_WEAPON_WHEEL_IGNORE_SELECTION
pub fn HUD_SUPPRESS_WEAPON_WHEEL_RESULTS_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(791590050914061127)));
}
/// Returns the weapon hash to the selected/highlighted weapon in the wheel
/// Used to be known as _HUD_WEAPON_WHEEL_GET_SELECTED_HASH
pub fn HUD_GET_WEAPON_WHEEL_CURRENTLY_HIGHLIGHTED() types.Hash {
return nativeCaller.invoke0(@as(u64, @intCast(11856061474772694782)));
}
/// Set the active slotIndex in the wheel weapon to the slot associated with the provided Weapon hash
/// Used to be known as _HUD_WEAPON_WHEEL_SET_SLOT_HASH
pub fn HUD_SET_WEAPON_WHEEL_TOP_SLOT(weaponHash: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8268896358275725272)), weaponHash);
}
/// Returns the weapon hash active in a specific weapon wheel slotList
/// Used to be known as _HUD_WEAPON_WHEEL_GET_SLOT_HASH
pub fn HUD_GET_WEAPON_WHEEL_TOP_SLOT(weaponTypeIndex: c_int) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(11618885992809154578)), weaponTypeIndex);
}
/// Sets a global that disables many weapon input tasks (shooting, aiming, etc.). Does not work with vehicle weapons, only used in selector.ysc
/// Used to be known as _HUD_WEAPON_WHEEL_IGNORE_CONTROL_INPUT
pub fn HUD_SHOWING_CHARACTER_SWITCH_SELECTION(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1498007404799336291)), toggle);
}
/// Only the script that originally called SET_GPS_FLAGS can set them again. Another script cannot set the flags, until the first script that called it has called CLEAR_GPS_FLAGS.
/// Doesn't seem like the flags are actually read by the game at all.
pub fn SET_GPS_FLAGS(p0: c_int, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6576389480415547739)), p0, p1);
}
/// Clears the GPS flags. Only the script that originally called SET_GPS_FLAGS can clear them.
/// Doesn't seem like the flags are actually read by the game at all.
pub fn CLEAR_GPS_FLAGS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(2420798229104011312)));
}
pub fn SET_RACE_TRACK_RENDER(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2210246596673425523)), toggle);
}
/// Does the same as SET_RACE_TRACK_RENDER(false);
pub fn CLEAR_GPS_RACE_TRACK() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(8837668642037204363)));
}
/// Starts a new GPS custom-route, allowing you to plot lines on the map.
/// Lines are drawn directly between points.
/// The GPS custom route works like the GPS multi route, except it does not follow roads.
/// Example result: https://i.imgur.com/BDm5pzt.png
/// hudColor: The HUD color of the GPS path.
/// displayOnFoot: Draws the path regardless if the player is in a vehicle or not.
/// followPlayer: Draw the path partially between the previous and next point based on the players position between them. When false, the GPS appears to not disappear after the last leg is completed.
pub fn START_GPS_CUSTOM_ROUTE(hudColor: c_int, displayOnFoot: windows.BOOL, followPlayer: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(15795505796495784712)), hudColor, displayOnFoot, followPlayer);
}
pub fn ADD_POINT_TO_GPS_CUSTOM_ROUTE(x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(3536513869148953370)), x, y, z);
}
/// radarThickness: The width of the GPS route on the radar
/// mapThickness: The width of the GPS route on the map
pub fn SET_GPS_CUSTOM_ROUTE_RENDER(toggle: windows.BOOL, radarThickness: c_int, mapThickness: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(10376441921594854255)), toggle, radarThickness, mapThickness);
}
pub fn CLEAR_GPS_CUSTOM_ROUTE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(16635739991366117988)));
}
/// Starts a new GPS multi-route, allowing you to create custom GPS paths.
/// GPS functions like the waypoint, except it can contain multiple points it's forced to go through.
/// Once the player has passed a point, the GPS will no longer force its path through it.
/// Works independently from the player-placed waypoint and blip routes.
/// Example result: https://i.imgur.com/ZZHQatX.png
/// hudColor: The HUD color of the GPS path.
/// routeFromPlayer: Makes the GPS draw a path from the player to the next point, rather than the original path from the previous point.
/// displayOnFoot: Draws the GPS path regardless if the player is in a vehicle or not.
pub fn START_GPS_MULTI_ROUTE(hudColor: c_int, routeFromPlayer: windows.BOOL, displayOnFoot: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(4412707053333294979)), hudColor, routeFromPlayer, displayOnFoot);
}
pub fn ADD_POINT_TO_GPS_MULTI_ROUTE(x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(12179168437209252891)), x, y, z);
}
pub fn SET_GPS_MULTI_ROUTE_RENDER(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4456935334064794792)), toggle);
}
/// Does the same as SET_GPS_MULTI_ROUTE_RENDER(false);
pub fn CLEAR_GPS_MULTI_ROUTE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(7489168016550854036)));
}
pub fn CLEAR_GPS_PLAYER_WAYPOINT() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(18397125075908836775)));
}
pub fn SET_GPS_FLASHES(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3606554328064200347)), toggle);
}
/// Used to be known as _SET_MAIN_PLAYER_BLIP_COLOUR
pub fn SET_PLAYER_ICON_COLOUR(color: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8872619834692084298)), color);
}
/// adds a short flash to the Radar/Minimap
/// Usage: UI.FLASH_MINIMAP_DISPLAY
pub fn FLASH_MINIMAP_DISPLAY() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(17500275170792791002)));
}
pub fn FLASH_MINIMAP_DISPLAY_WITH_COLOR(hudColorIndex: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7718574371061525017)), hudColorIndex);
}
pub fn TOGGLE_STEALTH_RADAR(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7709594747874660551)), toggle);
}
/// Used to be known as KEY_HUD_COLOUR
pub fn SET_MINIMAP_IN_SPECTATOR_MODE(toggle: windows.BOOL, ped: types.Ped) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1899630041123425491)), toggle, ped);
}
pub fn SET_MISSION_NAME(p0: windows.BOOL, name: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6856990973919262511)), p0, name);
}
/// Used to be known as _SET_MISSION_NAME_2
pub fn SET_MISSION_NAME_FOR_UGC_MISSION(p0: windows.BOOL, name: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16451798802165566402)), p0, name);
}
pub fn SET_DESCRIPTION_FOR_UGC_MISSION_EIGHT_STRINGS(p0: windows.BOOL, p1: [*c]const u8, p2: [*c]const u8, p3: [*c]const u8, p4: [*c]const u8, p5: [*c]const u8, p6: [*c]const u8, p7: [*c]const u8, p8: [*c]const u8) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(9330198458700222033)), p0, p1, p2, p3, p4, p5, p6, p7, p8);
}
pub fn SET_MINIMAP_BLOCK_WAYPOINT(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6411681030037084124)), toggle);
}
/// Toggles the North Yankton map
/// Used to be known as _SET_DRAW_MAP_VISIBLE
/// Used to be known as _SET_NORTH_YANKTON_MAP
pub fn SET_MINIMAP_IN_PROLOGUE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10462870595005426007)), toggle);
}
/// If true, the entire map will be revealed.
/// FOW = Fog of War
/// Used to be known as _SET_MINIMAP_REVEALED
pub fn SET_MINIMAP_HIDE_FOW(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17933017767121566611)), toggle);
}
/// Used to be known as _GET_MINIMAP_REVEAL_PERCENTAGE
pub fn GET_MINIMAP_FOW_DISCOVERY_RATIO() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(16146261466407716212)));
}
/// Used to be known as _IS_MINIMAP_AREA_REVEALED
pub fn GET_MINIMAP_FOW_COORDINATE_IS_REVEALED(x: f32, y: f32, z: f32) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(7940331101862967586)), x, y, z);
}
pub fn SET_MINIMAP_FOW_DO_NOT_UPDATE(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7127027464586979184)), p0);
}
/// Up to eight coordinates may be revealed per frame
pub fn SET_MINIMAP_FOW_REVEAL_COORDINATE(x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(658611830838489950)), x, y, z);
}
/// Not much is known so far on what it does _exactly_.
/// All I know for sure is that it draws the specified hole ID on the pause menu map as well as on the mini-map/radar. This native also seems to change some other things related to the pause menu map's behaviour, for example: you can no longer set waypoints, the pause menu map starts up in a 'zoomed in' state. This native does not need to be executed every tick.
/// You need to center the minimap manually as well as change/lock it's zoom and angle in order for it to appear correctly on the minimap.
/// You'll also need to use the `GOLF` scaleform in order to get the correct minmap border to show up.
/// Use `0x35edd5b2e3ff01c0` to reset the map when you no longer want to display any golf holes (you still need to unlock zoom, position and angle of the radar manually after calling this).
pub fn SET_MINIMAP_GOLF_COURSE(hole: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8195907273130302041)), hole);
}
pub fn SET_MINIMAP_GOLF_COURSE_OFF() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(3885997017796641216)));
}
/// Locks the minimap to the specified angle in integer degrees.
/// angle: The angle in whole degrees. If less than 0 or greater than 360, unlocks the angle.
pub fn LOCK_MINIMAP_ANGLE(angle: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2999307995311693915)), angle);
}
pub fn UNLOCK_MINIMAP_ANGLE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(9332379123252997690)));
}
/// Locks the minimap to the specified world position.
pub fn LOCK_MINIMAP_POSITION(x: f32, y: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1331350670911596351)), x, y);
}
pub fn UNLOCK_MINIMAP_POSITION() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(4509194413786734384)));
}
/// Argument must be 0.0f or above 38.0f, or it will be ignored.
/// Used to be known as _SET_MINIMAP_ATTITUDE_INDICATOR_LEVEL
/// Used to be known as _SET_MINIMAP_ALTITUDE_INDICATOR_LEVEL
pub fn SET_FAKE_MINIMAP_MAX_ALTIMETER_HEIGHT(altitude: f32, p1: windows.BOOL, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(15132644501924499565)), altitude, p1, p2);
}
pub fn SET_HEALTH_HUD_DISPLAY_VALUES(health: c_int, capacity: c_int, wasAdded: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(4565739922285832434)), health, capacity, wasAdded);
}
pub fn SET_MAX_HEALTH_HUD_DISPLAY(maximumValue: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10906986713097635404)), maximumValue);
}
pub fn SET_MAX_ARMOUR_HUD_DISPLAY(maximumValue: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(478261527885840968)), maximumValue);
}
/// Toggles the big minimap state like in GTA:Online.
/// Used to be known as _SET_RADAR_BIGMAP_ENABLED
pub fn SET_BIGMAP_ACTIVE(toggleBigMap: windows.BOOL, showFullMap: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2530054912743808399)), toggleBigMap, showFullMap);
}
/// Full list of components below
/// HUD = 0;
/// HUD_WANTED_STARS = 1;
/// HUD_WEAPON_ICON = 2;
/// HUD_CASH = 3;
/// HUD_MP_CASH = 4;
/// HUD_MP_MESSAGE = 5;
/// HUD_VEHICLE_NAME = 6;
/// HUD_AREA_NAME = 7;
/// HUD_VEHICLE_CLASS = 8;
/// HUD_STREET_NAME = 9;
/// HUD_HELP_TEXT = 10;
/// HUD_FLOATING_HELP_TEXT_1 = 11;
/// HUD_FLOATING_HELP_TEXT_2 = 12;
/// HUD_CASH_CHANGE = 13;
/// HUD_RETICLE = 14;
/// HUD_SUBTITLE_TEXT = 15;
/// HUD_RADIO_STATIONS = 16;
/// HUD_SAVING_GAME = 17;
/// HUD_GAME_STREAM = 18;
/// HUD_WEAPON_WHEEL = 19;
/// HUD_WEAPON_WHEEL_STATS = 20;
/// MAX_HUD_COMPONENTS = 21;
/// MAX_HUD_WEAPONS = 22;
/// MAX_SCRIPTED_HUD_COMPONENTS = 141;
pub fn IS_HUD_COMPONENT_ACTIVE(id: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13568394209825573901)), id);
}
pub fn IS_SCRIPTED_HUD_COMPONENT_ACTIVE(id: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15929248037438029669)), id);
}
pub fn HIDE_SCRIPTED_HUD_COMPONENT_THIS_FRAME(id: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16389941104658275348)), id);
}
/// Used to be known as _SHOW_SCRIPTED_HUD_COMPONENT_THIS_FRAME
pub fn SHOW_SCRIPTED_HUD_COMPONENT_THIS_FRAME(id: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5708555112408592034)), id);
}
pub fn IS_SCRIPTED_HUD_COMPONENT_HIDDEN_THIS_FRAME(id: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(702632180553568706)), id);
}
/// This function hides various HUD (Heads-up Display) components.
/// Listed below are the integers and the corresponding HUD component.
/// - 1 : WANTED_STARS
/// - 2 : WEAPON_ICON
/// - 3 : CASH
/// - 4 : MP_CASH
/// - 5 : MP_MESSAGE
/// - 6 : VEHICLE_NAME
/// - 7 : AREA_NAME
/// - 8 : VEHICLE_CLASS
/// - 9 : STREET_NAME
/// - 10 : HELP_TEXT
/// - 11 : FLOATING_HELP_TEXT_1
/// - 12 : FLOATING_HELP_TEXT_2
/// - 13 : CASH_CHANGE
/// - 14 : RETICLE
/// - 15 : SUBTITLE_TEXT
/// - 16 : RADIO_STATIONS
/// - 17 : SAVING_GAME
/// - 18 : GAME_STREAM
/// - 19 : WEAPON_WHEEL
/// - 20 : WEAPON_WHEEL_STATS
/// - 21 : HUD_COMPONENTS
/// - 22 : HUD_WEAPONS
/// These integers also work for the `SHOW_HUD_COMPONENT_THIS_FRAME` native, but instead shows the HUD Component.
pub fn HIDE_HUD_COMPONENT_THIS_FRAME(id: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7495895348773880760)), id);
}
/// This function hides various HUD (Heads-up Display) components.
/// Listed below are the integers and the corresponding HUD component.
/// - 1 : WANTED_STARS
/// - 2 : WEAPON_ICON
/// - 3 : CASH
/// - 4 : MP_CASH
/// - 5 : MP_MESSAGE
/// - 6 : VEHICLE_NAME
/// - 7 : AREA_NAME
/// - 8 : VEHICLE_CLASS
/// - 9 : STREET_NAME
/// - 10 : HELP_TEXT
/// - 11 : FLOATING_HELP_TEXT_1
/// - 12 : FLOATING_HELP_TEXT_2
/// - 13 : CASH_CHANGE
/// - 14 : RETICLE
/// - 15 : SUBTITLE_TEXT
/// - 16 : RADIO_STATIONS
/// - 17 : SAVING_GAME
/// - 18 : GAME_STREAM
/// - 19 : WEAPON_WHEEL
/// - 20 : WEAPON_WHEEL_STATS
/// - 21 : HUD_COMPONENTS
/// - 22 : HUD_WEAPONS
/// These integers also work for the `HIDE_HUD_COMPONENT_THIS_FRAME` native, but instead hides the HUD Component.
pub fn SHOW_HUD_COMPONENT_THIS_FRAME(id: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(814573165291300452)), id);
}
/// Hides area and vehicle name HUD components for one frame.
/// Used to be known as _HIDE_AREA_AND_VEHICLE_NAME_THIS_FRAME
pub fn HIDE_STREET_AND_CAR_NAMES_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(11880177133408043657)));
}
pub fn RESET_RETICULE_VALUES() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(1330863033260894704)));
}
pub fn RESET_HUD_COMPONENT_VALUES(id: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4974561028181810445)), id);
}
pub fn SET_HUD_COMPONENT_POSITION(id: c_int, x: f32, y: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(12302461265122524397)), id, x, y);
}
pub fn GET_HUD_COMPONENT_POSITION(id: c_int) types.Vector3 {
return nativeCaller.invoke1(@as(u64, @intCast(2467029878600636413)), id);
}
/// This native does absolutely nothing, just a nullsub
pub fn CLEAR_REMINDER_MESSAGE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(13077764844387541711)));
}
/// World to relative screen coords, this world to screen will keep the text on screen. Was named _GET_SCREEN_COORD_FROM_WORLD_COORD, but this conflicts with 0x34E82F05DF2974F5. As that hash actually matches GET_SCREEN_COORD_FROM_WORLD_COORD that one supercedes and this one was renamed to _GET_2D_COORD_FROM_3D_COORD
/// Used to be known as _GET_2D_COORD_FROM_3D_COORD
pub fn GET_HUD_SCREEN_POSITION_FROM_WORLD_POSITION(worldX: f32, worldY: f32, worldZ: f32, screenX: [*c]f32, screenY: [*c]f32) c_int {
return nativeCaller.invoke5(@as(u64, @intCast(17982958051554803395)), worldX, worldY, worldZ, screenX, screenY);
}
/// Shows a menu for reporting UGC content.
/// Used to be known as _DISPLAY_JOB_REPORT
pub fn OPEN_REPORTUGC_MENU() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(5925146168273977555)));
}
pub fn FORCE_CLOSE_REPORTUGC_MENU() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(17171115343732485231)));
}
pub fn IS_REPORTUGC_MENU_OPEN() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(10463366397162636158)));
}
pub fn IS_FLOATING_HELP_TEXT_ON_SCREEN(hudIndex: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2608279396813442468)), hudIndex);
}
pub fn SET_FLOATING_HELP_TEXT_SCREEN_POSITION(hudIndex: c_int, x: f32, y: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(8537078988462243148)), hudIndex, x, y);
}
pub fn SET_FLOATING_HELP_TEXT_WORLD_POSITION(hudIndex: c_int, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(8668206492294005112)), hudIndex, x, y, z);
}
pub fn SET_FLOATING_HELP_TEXT_TO_ENTITY(hudIndex: c_int, entity: types.Entity, offsetX: f32, offsetY: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(12724001682988565056)), hudIndex, entity, offsetX, offsetY);
}
pub fn SET_FLOATING_HELP_TEXT_STYLE(hudIndex: c_int, p1: c_int, p2: c_int, p3: c_int, p4: c_int, p5: c_int) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(8687021280588556273)), hudIndex, p1, p2, p3, p4, p5);
}
pub fn CLEAR_FLOATING_HELP(hudIndex: c_int, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5766949786331905786)), hudIndex, p1);
}
/// clanFlag: takes a number 0-5
/// Used to be known as _CREATE_MP_GAMER_TAG_COLOR
/// Used to be known as _SET_MP_GAMER_TAG_COLOR
/// Used to be known as _CREATE_MP_GAMER_TAG_FOR_NET_PLAYER
pub fn CREATE_MP_GAMER_TAG_WITH_CREW_COLOR(player: types.Player, username: [*c]const u8, pointedClanTag: windows.BOOL, isRockstarClan: windows.BOOL, clanTag: [*c]const u8, clanFlag: c_int, r: c_int, g: c_int, b: c_int) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(7912928575906358473)), player, username, pointedClanTag, isRockstarClan, clanTag, clanFlag, r, g, b);
}
/// Used to be known as _HAS_MP_GAMER_TAG
pub fn IS_MP_GAMER_TAG_MOVIE_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(7930473816949053354)));
}
/// clanFlag: takes a number 0-5
/// Used to be known as _CREATE_MP_GAMER_TAG
pub fn CREATE_FAKE_MP_GAMER_TAG(ped: types.Ped, username: [*c]const u8, pointedClanTag: windows.BOOL, isRockstarClan: windows.BOOL, clanTag: [*c]const u8, clanFlag: c_int) c_int {
return nativeCaller.invoke6(@as(u64, @intCast(13830522785006309397)), ped, username, pointedClanTag, isRockstarClan, clanTag, clanFlag);
}
pub fn REMOVE_MP_GAMER_TAG(gamerTagId: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3560529434807247864)), gamerTagId);
}
pub fn IS_MP_GAMER_TAG_ACTIVE(gamerTagId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5661761929850846502)), gamerTagId);
}
/// Used to be known as ADD_TREVOR_RANDOM_MODIFIER
pub fn IS_MP_GAMER_TAG_FREE(gamerTagId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6438829671920624025)), gamerTagId);
}
/// enum eMpGamerTagComponent
/// {
/// MP_TAG_GAMER_NAME,
/// MP_TAG_CREW_TAG,
/// MP_TAG_HEALTH_ARMOUR,
/// MP_TAG_BIG_TEXT,
/// MP_TAG_AUDIO_ICON,
/// MP_TAG_USING_MENU,
/// MP_TAG_PASSIVE_MODE,
/// MP_TAG_WANTED_STARS,
/// MP_TAG_DRIVER,
/// MP_TAG_CO_DRIVER,
/// MP_TAG_TAGGED,
/// MP_TAG_GAMER_NAME_NEARBY,
/// MP_TAG_ARROW,
/// MP_TAG_PACKAGES,
/// MP_TAG_INV_IF_PED_FOLLOWING,
/// MP_TAG_RANK_TEXT,
/// MP_TAG_TYPING,
/// MP_TAG_BAG_LARGE,
/// MP_TAG_ARROW,
/// MP_TAG_GANG_CEO,
/// MP_TAG_GANG_BIKER,
/// MP_TAG_BIKER_ARROW,
/// MP_TAG_MC_ROLE_PRESIDENT,
/// MP_TAG_MC_ROLE_VICE_PRESIDENT,
/// MP_TAG_MC_ROLE_ROAD_CAPTAIN,
/// MP_TAG_MC_ROLE_SARGEANT,
/// MP_TAG_MC_ROLE_ENFORCER,
/// MP_TAG_MC_ROLE_PROSPECT,
/// MP_TAG_TRANSMITTER,
/// MP_TAG_BOMB
/// };
pub fn SET_MP_GAMER_TAG_VISIBILITY(gamerTagId: c_int, component: c_int, toggle: windows.BOOL, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(7186467011688527520)), gamerTagId, component, toggle, p3);
}
/// Used to be known as _SET_MP_GAMER_TAG_
/// Used to be known as _SET_MP_GAMER_TAG
/// Used to be known as _SET_MP_GAMER_TAG_ENABLED
pub fn SET_ALL_MP_GAMER_TAGS_VISIBILITY(gamerTagId: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17183202346688145072)), gamerTagId, toggle);
}
/// Displays a bunch of icons above the players name, and level, and their name twice
/// Used to be known as _SET_MP_GAMER_TAG_ICONS
pub fn SET_MP_GAMER_TAGS_SHOULD_USE_VEHICLE_HEALTH(gamerTagId: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11997479760391485169)), gamerTagId, toggle);
}
/// Used to be known as _SET_MP_GAMER_HEALTH_BAR_DISPLAY
pub fn SET_MP_GAMER_TAGS_SHOULD_USE_POINTS_HEALTH(gamerTagId: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15176785000166805524)), gamerTagId, toggle);
}
/// Used to be known as _SET_MP_GAMER_HEALTH_BAR_MAX
pub fn SET_MP_GAMER_TAGS_POINT_HEALTH(gamerTagId: c_int, value: c_int, maximumValue: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(1541355004996259431)), gamerTagId, value, maximumValue);
}
/// Sets a gamer tag's component colour
/// gamerTagId is obtained using for example CREATE_FAKE_MP_GAMER_TAG
/// Ranges from 0 to 255. 0 is grey health bar, ~50 yellow, 200 purple.
pub fn SET_MP_GAMER_TAG_COLOUR(gamerTagId: c_int, component: c_int, hudColorIndex: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(7007273660281398958)), gamerTagId, component, hudColorIndex);
}
/// Ranges from 0 to 255. 0 is grey health bar, ~50 yellow, 200 purple.
/// Should be enabled as flag (2). Has 0 opacity by default.
/// - This was _SET_MP_GAMER_TAG_HEALTH_BAR_COLOR,
/// -> Rockstar use the EU spelling of 'color' so I hashed the same name with COLOUR and it came back as the correct hash, so it has been corrected above.
/// Used to be known as _SET_MP_GAMER_TAG_HEALTH_BAR_COLOR
pub fn SET_MP_GAMER_TAG_HEALTH_BAR_COLOUR(gamerTagId: c_int, hudColorIndex: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3555811234731821748)), gamerTagId, hudColorIndex);
}
/// Sets flag's sprite transparency. 0-255.
pub fn SET_MP_GAMER_TAG_ALPHA(gamerTagId: c_int, component: c_int, alpha: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(15316712945669830743)), gamerTagId, component, alpha);
}
/// displays wanted star above head
pub fn SET_MP_GAMER_TAG_WANTED_LEVEL(gamerTagId: c_int, wantedlvl: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14925648428786555331)), gamerTagId, wantedlvl);
}
/// Used to be known as _SET_MP_GAMER_TAG_UNK
pub fn SET_MP_GAMER_TAG_NUM_PACKAGES(gamerTagId: c_int, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11247253652016247503)), gamerTagId, p1);
}
pub fn SET_MP_GAMER_TAG_NAME(gamerTagId: c_int, string: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16042587305586342212)), gamerTagId, string);
}
/// Used to be known as _HAS_MP_GAMER_TAG_2
/// Used to be known as _HAS_MP_GAMER_TAG_CREW_FLAGS_SET
/// Used to be known as _IS_VALID_MP_GAMER_TAG_MOVIE
pub fn IS_UPDATING_MP_GAMER_TAG_NAME_AND_CREW_DETAILS(gamerTagId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16965229355532467725)), gamerTagId);
}
/// Used to be known as _SET_MP_GAMER_TAG_CHATTING
pub fn SET_MP_GAMER_TAG_BIG_TEXT(gamerTagId: c_int, string: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8896618572110583222)), gamerTagId, string);
}
/// Used to be known as _GET_ACTIVE_WEBSITE_ID
pub fn GET_CURRENT_WEBPAGE_ID() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(118035704584043142)));
}
pub fn GET_CURRENT_WEBSITE_ID() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(10940503084174461869)));
}
/// Returns the ActionScript flagValue.
/// ActionScript flags are global flags that scaleforms use
/// Flags found during testing
/// 0: Returns 1 if the web_browser keyboard is open, otherwise 0
/// 1: Returns 1 if the player has clicked back twice on the opening page, otherwise 0 (web_browser)
/// 2: Returns how many links the player has clicked in the web_browser scaleform, returns 0 when the browser gets closed
/// 9: Returns the current selection on the mobile phone scaleform
/// There are 20 flags in total.
pub fn GET_GLOBAL_ACTIONSCRIPT_FLAG(flagIndex: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(16406708090115837972)), flagIndex);
}
pub fn RESET_GLOBAL_ACTIONSCRIPT_FLAG(flagIndex: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13374651088496090921)), flagIndex);
}
/// Used to be known as _IS_WARNING_MESSAGE_ACTIVE_2
pub fn IS_WARNING_MESSAGE_READY_FOR_CONTROL() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(12628684180558330810)));
}
/// You can only use text entries. No custom text.
/// Example: SET_WARNING_MESSAGE("t20", 3, "adder", false, -1, 0, 0, true);
/// errorCode: shows an error code at the bottom left if nonzero
pub fn SET_WARNING_MESSAGE(titleMsg: [*c]const u8, flags: c_int, promptMsg: [*c]const u8, p3: windows.BOOL, p4: c_int, p5: [*c]const u8, p6: [*c]const u8, showBackground: windows.BOOL, errorCode: c_int) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(8869688505341545844)), titleMsg, flags, promptMsg, p3, p4, p5, p6, showBackground, errorCode);
}
/// Shows a warning message on screen with a header.
/// Note: You can only use text entries. No custom text. You can recreate this easily with scaleforms.
/// Example: https://i.imgur.com/ITJt8bJ.png
/// Used to be known as _SET_WARNING_MESSAGE_2
pub fn SET_WARNING_MESSAGE_WITH_HEADER(entryHeader: [*c]const u8, entryLine1: [*c]const u8, instructionalKey: c_int, entryLine2: [*c]const u8, p4: windows.BOOL, p5: types.Any, showBackground: [*c]types.Any, p7: [*c]types.Any, p8: windows.BOOL, p9: types.Any) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(15868657717162190295)), entryHeader, entryLine1, instructionalKey, entryLine2, p4, p5, showBackground, p7, p8, p9);
}
/// You can use this native for custom input, without having to use any scaleform-related natives.
/// The native must be called on tick.
/// The entryHeader must be a valid label.
/// For Single lines use JL_INVITE_N as entryLine1, JL_INVITE_ND for multiple.
/// Notes:
/// - additionalIntInfo: replaces first occurrence of ~1~ in provided label with an integer
/// - additionalTextInfoLine1: replaces first occurrence of ~a~ in provided label, with your custom text
/// - additionalTextInfoLine2: replaces second occurrence of ~a~ in provided label, with your custom text
/// - showBackground: shows black background of the warning screen
/// - errorCode: shows an error code at the bottom left if nonzero
/// Example of usage:
/// SET_WARNING_MESSAGE_WITH_HEADER_AND_SUBSTRING_FLAGS("ALERT", "JL_INVITE_ND", 66, "", true, -1, -1, "Testing line 1", "Testing line 2", true, 0);
/// Screenshot:
/// https://imgur.com/a/IYA7vJ8
/// Used to be known as _SET_WARNING_MESSAGE_3
pub fn SET_WARNING_MESSAGE_WITH_HEADER_AND_SUBSTRING_FLAGS(entryHeader: [*c]const u8, entryLine1: [*c]const u8, instructionalKey: c_int, entryLine2: [*c]const u8, p4: windows.BOOL, p5: types.Any, additionalIntInfo: types.Any, additionalTextInfoLine1: [*c]const u8, additionalTextInfoLine2: [*c]const u8, showBackground: windows.BOOL, errorCode: c_int) void {
_ = nativeCaller.invoke11(@as(u64, @intCast(8077515204439881131)), entryHeader, entryLine1, instructionalKey, entryLine2, p4, p5, additionalIntInfo, additionalTextInfoLine1, additionalTextInfoLine2, showBackground, errorCode);
}
/// Used to be known as _SET_WARNING_MESSAGE_WITH_HEADER_UNK
pub fn SET_WARNING_MESSAGE_WITH_HEADER_EXTENDED(entryHeader: [*c]const u8, entryLine1: [*c]const u8, flags: c_int, entryLine2: [*c]const u8, p4: windows.BOOL, p5: types.Any, p6: [*c]types.Any, p7: [*c]types.Any, showBg: windows.BOOL, p9: types.Any, p10: types.Any) void {
_ = nativeCaller.invoke11(@as(u64, @intCast(4086262782383651053)), entryHeader, entryLine1, flags, entryLine2, p4, p5, p6, p7, showBg, p9, p10);
}
/// labelTitle: Label of the alert's title.
/// labelMsg: Label of the alert's message.
/// p2: This is an enum, check the description for a list.
/// p3: This is an enum, check the description for a list.
/// labelMsg2: Label of another message line
/// p5: usually 0
/// p6: usually -1
/// p7: usually 0
/// p8: unknown label
/// p9: unknown label
/// background: Set to anything other than 0 or false (even any string) and it will draw a background. Setting it to 0 or false will draw no background.
/// errorCode: Error code, shown at the bottom left if set to value other than 0.
/// instructionalKey enum list:
/// Buttons = {
/// Empty = 0,
/// Select = 1, -- (RETURN)
/// Ok = 2, -- (RETURN)
/// Yes = 4, -- (RETURN)
/// Back = 8, -- (ESC)
/// Cancel = 16, -- (ESC)
/// No = 32, -- (ESC)
/// RetrySpace = 64, -- (SPACE)
/// Restart = 128, -- (SPACE)
/// Skip = 256, -- (SPACE)
/// Quit = 512, -- (ESC)
/// Adjust = 1024, -- (ARROWS)
/// SpaceKey = 2048, -- (SPACE)
/// Share = 4096, -- (SPACE)
/// SignIn = 8192, -- (SPACE)
/// Continue = 16384, -- (RETURN)
/// AdjustLeftRight = 32768, -- (SCROLL L/R)
/// AdjustUpDown = 65536, -- (SCROLL U/D)
/// Overwrite = 131072, -- (SPACE)
/// SocialClubSignup = 262144, -- (RETURN)
/// Confirm = 524288, -- (RETURN)
/// Queue = 1048576, -- (RETURN)
/// RetryReturn = 2097152, -- (RETURN)
/// BackEsc = 4194304, -- (ESC)
/// SocialClub = 8388608, -- (RETURN)
/// Spectate = 16777216, -- (SPACE)
/// OkEsc = 33554432, -- (ESC)
/// CancelTransfer = 67108864, -- (ESC)
/// LoadingSpinner = 134217728,
/// NoReturnToGTA = 268435456, -- (ESC)
/// CancelEsc = 536870912, -- (ESC)
/// }
/// Alt = {
/// Empty = 0,
/// No = 1, -- (SPACE)
/// Host = 2, -- (ESC)
/// SearchForJob = 4, -- (RETURN)
/// ReturnKey = 8, -- (TURN)
/// Freemode = 16, -- (ESC)
/// }
/// Example: https://i.imgur.com/TvmNF4k.png
/// Used to be known as _DRAW_FRONTEND_ALERT
/// Used to be known as _SET_WARNING_MESSAGE_WITH_ALERT
pub fn SET_WARNING_MESSAGE_WITH_HEADER_AND_SUBSTRING_FLAGS_EXTENDED(labelTitle: [*c]const u8, labelMessage: [*c]const u8, p2: c_int, p3: c_int, labelMessage2: [*c]const u8, p5: windows.BOOL, p6: c_int, p7: c_int, p8: [*c]const u8, p9: [*c]const u8, background: windows.BOOL, errorCode: c_int) void {
_ = nativeCaller.invoke12(@as(u64, @intCast(1549308555660265259)), labelTitle, labelMessage, p2, p3, labelMessage2, p5, p6, p7, p8, p9, background, errorCode);
}
/// Has to do with the confirmation overlay (E.g. confirm exit)
/// Used to be known as _GET_WARNING_MESSAGE_TITLE_HASH
pub fn GET_WARNING_SCREEN_MESSAGE_HASH() types.Hash {
return nativeCaller.invoke0(@as(u64, @intCast(9358368676174356473)));
}
/// Some sort of list displayed in a warning message. Yet unknown how to prevent repeating.
/// Param names copied from the corresponding scaleform function "SET_LIST_ROW".
/// Example: https://i.imgur.com/arKvOYx.png
/// Used to be known as _SET_WARNING_MESSAGE_LIST_ROW
pub fn SET_WARNING_MESSAGE_OPTION_ITEMS(index: c_int, name: [*c]const u8, cash: c_int, rp: c_int, lvl: c_int, colour: c_int) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(890165343464903977)), index, name, cash, rp, lvl, colour);
}
pub fn SET_WARNING_MESSAGE_OPTION_HIGHLIGHT(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15778486040717972735)), p0);
}
/// Used to be known as _REMOVE_WARNING_MESSAGE_LIST_ITEMS
pub fn REMOVE_WARNING_MESSAGE_OPTION_ITEMS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(7995378863873745474)));
}
/// Used to be known as IS_MEDICAL_DISABLED
pub fn IS_WARNING_MESSAGE_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(16252105188079644931)));
}
pub fn CLEAR_DYNAMIC_PAUSE_MENU_ERROR_MESSAGE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(8616021925407933230)));
}
/// If toggle is true, the map is shown in full screen
/// If toggle is false, the map is shown in normal mode
/// Used to be known as _SET_MAP_FULL_SCREEN
/// Used to be known as _RACE_GALLERY_FULLSCREEN
pub fn CUSTOM_MINIMAP_SET_ACTIVE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6004641606629091492)), toggle);
}
/// Sets the sprite of the next BLIP_GALLERY blip, values used in the native scripts: 143 (ObjectiveBlue), 144 (ObjectiveGreen), 145 (ObjectiveRed), 146 (ObjectiveYellow).
/// Used to be known as _RACE_GALLERY_NEXT_BLIP_SPRITE
pub fn CUSTOM_MINIMAP_SET_BLIP_OBJECT(spriteId: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2210825213572701946)), spriteId);
}
/// Add a BLIP_GALLERY at the specific coordinate. Used in fm_maintain_transition_players to display race track points.
/// Used to be known as _RACE_GALLERY_ADD_BLIP
pub fn CUSTOM_MINIMAP_CREATE_BLIP(x: f32, y: f32, z: f32) c_int {
return nativeCaller.invoke3(@as(u64, @intCast(6133332691679669992)), x, y, z);
}
/// Used to be known as _CLEAR_RACE_GALLERY_BLIPS
pub fn CUSTOM_MINIMAP_CLEAR_BLIPS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(2812775079407254015)));
}
/// Doesn't actually return anything.
pub fn FORCE_SONAR_BLIPS_THIS_FRAME() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(1234478473798820520)));
}
/// Used to be known as _GET_NORTH_RADAR_BLIP
pub fn GET_NORTH_BLID_INDEX() types.Blip {
return nativeCaller.invoke0(@as(u64, @intCast(4543280776503401352)));
}
/// Toggles whether or not name labels are shown on the expanded minimap next to player blips, like in GTA:O.
/// Doesn't need to be called every frame.
/// Preview: https://i.imgur.com/DfqKWfJ.png
/// Make sure to call SET_BLIP_CATEGORY with index 7 for this to work on the desired blip.
pub fn DISPLAY_PLAYER_NAME_TAGS_ON_BLIPS(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9425713183487565648)), toggle);
}
/// This native does absolutely nothing, just a nullsub
pub fn DRAW_FRONTEND_BACKGROUND_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(2385868713821235287)));
}
pub fn DRAW_HUD_OVER_FADE_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(13785294882117687052)));
}
/// Does stuff like this:
/// gyazo.com/7fcb78ea3520e3dbc5b2c0c0f3712617
/// Example:
/// int GetHash = GET_HASH_KEY("fe_menu_version_corona_lobby");
/// ACTIVATE_FRONTEND_MENU(GetHash, 0, -1);
/// BOOL p1 is a toggle to define the game in pause.
/// int p2 is unknown but -1 always works, not sure why though.
/// [30/03/2017] ins1de :
/// the int p2 is actually a component variable. When the pause menu is visible, it opens the tab related to it.
/// Example : Function.Call(Hash.ACTIVATE_FRONTEND_MENU,-1171018317, 0, 42);
/// Result : Opens the "Online" tab without pausing the menu, with -1 it opens the map.Below is a list of all known Frontend Menu Hashes.
/// - FE_MENU_VERSION_SP_PAUSE
/// - FE_MENU_VERSION_MP_PAUSE
/// - FE_MENU_VERSION_CREATOR_PAUSE
/// - FE_MENU_VERSION_CUTSCENE_PAUSE
/// - FE_MENU_VERSION_SAVEGAME
/// - FE_MENU_VERSION_PRE_LOBBY
/// - FE_MENU_VERSION_LOBBY
/// - FE_MENU_VERSION_MP_CHARACTER_SELECT
/// - FE_MENU_VERSION_MP_CHARACTER_CREATION
/// - FE_MENU_VERSION_EMPTY
/// - FE_MENU_VERSION_EMPTY_NO_BACKGROUND
/// - FE_MENU_VERSION_TEXT_SELECTION
/// - FE_MENU_VERSION_CORONA
/// - FE_MENU_VERSION_CORONA_LOBBY
/// - FE_MENU_VERSION_CORONA_JOINED_PLAYERS
/// - FE_MENU_VERSION_CORONA_INVITE_PLAYERS
/// - FE_MENU_VERSION_CORONA_INVITE_FRIENDS
/// - FE_MENU_VERSION_CORONA_INVITE_CREWS
/// - FE_MENU_VERSION_CORONA_INVITE_MATCHED_PLAYERS
/// - FE_MENU_VERSION_CORONA_INVITE_LAST_JOB_PLAYERS
/// - FE_MENU_VERSION_CORONA_RACE
/// - FE_MENU_VERSION_CORONA_BETTING
/// - FE_MENU_VERSION_JOINING_SCREEN
/// - FE_MENU_VERSION_LANDING_MENU
/// - FE_MENU_VERSION_LANDING_KEYMAPPING_MENU
pub fn ACTIVATE_FRONTEND_MENU(menuhash: types.Hash, togglePause: windows.BOOL, component: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(17222278909183986811)), menuhash, togglePause, component);
}
/// Before using this native click the native above and look at the decription.
/// Example:
/// int GetHash = Function.Call<int>(Hash.GET_HASH_KEY, "fe_menu_version_corona_lobby");
/// Function.Call(Hash.ACTIVATE_FRONTEND_MENU, GetHash, 0, -1);
/// Function.Call(Hash.RESTART_FRONTEND_MENU(GetHash, -1);
/// This native refreshes the frontend menu.
/// p1 = Hash of Menu
/// p2 = Unknown but always works with -1.
pub fn RESTART_FRONTEND_MENU(menuHash: types.Hash, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1184567402074819008)), menuHash, p1);
}
/// if (HUD::GET_CURRENT_FRONTEND_MENU_VERSION() == joaat("fe_menu_version_empty_no_background"))
/// Used to be known as _GET_CURRENT_FRONTEND_MENU
pub fn GET_CURRENT_FRONTEND_MENU_VERSION() types.Hash {
return nativeCaller.invoke0(@as(u64, @intCast(2524647312791458405)));
}
pub fn SET_PAUSE_MENU_ACTIVE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16089105643441842639)), toggle);
}
pub fn DISABLE_FRONTEND_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(7869026217671979238)));
}
pub fn SUPPRESS_FRONTEND_RENDERING_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(13435670785628967510)));
}
/// Allows opening the pause menu this frame, when the player is dead.
/// Used to be known as _ALLOW_PAUSE_MENU_WHEN_DEAD_THIS_FRAME
pub fn ALLOW_PAUSE_WHEN_NOT_IN_STATE_OF_PLAY_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(14717726118987496547)));
}
pub fn SET_FRONTEND_ACTIVE(active: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8383188641852199543)), active);
}
pub fn IS_PAUSE_MENU_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(12683062486377168843)));
}
pub fn IS_STORE_PENDING_NETWORK_SHUTDOWN_TO_OPEN() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(3388243585844183137)));
}
/// Returns:
/// 0
/// 5
/// 10
/// 15
/// 20
/// 25
/// 30
/// 35
pub fn GET_PAUSE_MENU_STATE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(2822294085854325189)));
}
pub fn GET_PAUSE_MENU_POSITION() types.Vector3 {
return nativeCaller.invoke0(@as(u64, @intCast(6629077473248403630)));
}
pub fn IS_PAUSE_MENU_RESTARTING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(2038185694189597127)));
}
/// Not present in retail version of the game, actual definiton seems to be
/// _LOG_DEBUG_INFO(const char* category, const char* debugText);
/// Used to be known as _LOG_DEBUG_INFO
pub fn FORCE_SCRIPTED_GFX_WHEN_FRONTEND_ACTIVE(p0: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2405700959651969277)), p0);
}
pub fn PAUSE_MENUCEPTION_GO_DEEPER(page: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8642807101718321772)), page);
}
pub fn PAUSE_MENUCEPTION_THE_KICK() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(14828707501208161167)));
}
pub fn PAUSE_TOGGLE_FULLSCREEN_MAP(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3307548554722472312)), p0);
}
/// Activates the specified frontend menu context.
/// pausemenu.xml defines some specific menu options using 'context'. Context is basically a 'condition'.
/// The `*ALL*` part of the context means that whatever is being defined, will be active when any or all of those conditions after `*ALL*` are met.
/// The `*NONE*` part of the context section means that whatever is being defined, will NOT be active if any or all of the conditions after `*NONE*` are met.
/// This basically allows you to hide certain menu sections, or things like instructional buttons.
/// Used to be known as _ADD_FRONTEND_MENU_CONTEXT
pub fn PAUSE_MENU_ACTIVATE_CONTEXT(contextHash: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15949018543013677366)), contextHash);
}
/// Used to be known as OBJECT_DECAL_TOGGLE
pub fn PAUSE_MENU_DEACTIVATE_CONTEXT(contextHash: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4921744939901789637)), contextHash);
}
pub fn PAUSE_MENU_IS_CONTEXT_ACTIVE(contextHash: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9541309789331285558)), contextHash);
}
pub fn PAUSE_MENU_IS_CONTEXT_MENU_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(3037024583464485919)));
}
pub fn PAUSE_MENU_GET_HAIR_COLOUR_INDEX() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(15997738120179329503)));
}
pub fn PAUSE_MENU_GET_MOUSE_HOVER_INDEX() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(3862666924682049005)));
}
pub fn PAUSE_MENU_GET_MOUSE_HOVER_UNIQUE_ID() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(1424467214412173952)));
}
pub fn PAUSE_MENU_GET_MOUSE_CLICK_EVENT(p0: [*c]types.Any, p1: [*c]types.Any, p2: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(14474858448948444133)), p0, p1, p2);
}
/// Used to be known as ENABLE_DEATHBLOOD_SEETHROUGH
pub fn PAUSE_MENU_REDRAW_INSTRUCTIONAL_BUTTONS(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5230295355364982912)), p0);
}
pub fn PAUSE_MENU_SET_BUSY_SPINNER(p0: windows.BOOL, position: c_int, spinnerIndex: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(14379469807889341881)), p0, position, spinnerIndex);
}
pub fn PAUSE_MENU_SET_WARN_ON_TAB_CHANGE(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17324991050806069731)), p0);
}
pub fn IS_FRONTEND_READY_FOR_CONTROL() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(4299699930381940167)));
}
/// Disables frontend (works in custom frontends, not sure about regular pause menu) navigation keys on keyboard. Not sure about controller. Does not disable mouse controls. No need to call this every tick.
/// To enable the keys again, use `0x14621BB1DF14E2B2`.
pub fn TAKE_CONTROL_OF_FRONTEND() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(17046797982469197608)));
}
/// Enables frontend (works in custom frontends, not sure about regular pause menu) navigation keys on keyboard if they were disabled using the native below.
/// To disable the keys, use `0xEC9264727EEC0F28`
pub fn RELEASE_CONTROL_OF_FRONTEND() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(1468766879242052274)));
}
pub fn CODE_WANTS_SCRIPT_TO_TAKE_CONTROL() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(7415118940931325216)));
}
pub fn GET_SCREEN_CODE_WANTS_SCRIPT_TO_CONTROL() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(6431117049144251092)));
}
pub fn IS_NAVIGATING_MENU_CONTENT() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(5637610560796792129)));
}
pub fn HAS_MENU_TRIGGER_EVENT_OCCURRED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(17475282014969817106)));
}
pub fn HAS_MENU_LAYOUT_CHANGED_EVENT_OCCURRED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(3324499824664913758)));
}
pub fn SET_SAVEGAME_LIST_UNIQUE_ID(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(933739500335761308)), p0);
}
/// Used to be known as _GET_PAUSE_MENU_SELECTION
pub fn GET_MENU_TRIGGER_EVENT_DETAILS(lastItemMenuId: [*c]c_int, selectedItemUniqueId: [*c]c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3945510728816956976)), lastItemMenuId, selectedItemUniqueId);
}
/// lastItemMenuId: this is the menuID of the last selected item minus 1000 (lastItem.menuID - 1000)
/// selectedItemMenuId: same as lastItemMenuId except for the currently selected menu item
/// selectedItemUniqueId: this is uniqueID of the currently selected menu item
/// when the pausemenu is closed:
/// lastItemMenuId = -1
/// selectedItemMenuId = -1
/// selectedItemUniqueId = 0
/// when the header gains focus:
/// lastItemMenuId updates as normal or 0 if the pausemenu was just opened
/// selectedItemMenuId becomes a unique id for the pausemenu page that focus was taken from (?) or 0 if the pausemenu was just opened
/// selectedItemUniqueId = -1
/// when focus is moved from the header to a pausemenu page:
/// lastItemMenuId becomes a unique id for the pausemenu page that focus was moved to (?)
/// selectedItemMenuId = -1
/// selectedItemUniqueId updates as normal
/// Used to be known as _GET_PAUSE_MENU_SELECTION_DATA
pub fn GET_MENU_LAYOUT_CHANGED_EVENT_DETAILS(lastItemMenuId: [*c]c_int, selectedItemMenuId: [*c]c_int, selectedItemUniqueId: [*c]c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(9085940040720886703)), lastItemMenuId, selectedItemMenuId, selectedItemUniqueId);
}
pub fn GET_PM_PLAYER_CREW_COLOR(r: [*c]c_int, g: [*c]c_int, b: [*c]c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(11689120523351033365)), r, g, b);
}
/// Used to be known as SET_USERIDS_UIHIDDEN
pub fn GET_MENU_PED_INT_STAT(p0: types.Any, p1: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(17243418215069965421)), p0, p1);
}
pub fn GET_CHARACTER_MENU_PED_INT_STAT(p0: types.Any, p1: [*c]types.Any, p2: types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(14585804031603160659)), p0, p1, p2);
}
pub fn GET_MENU_PED_MASKED_INT_STAT(statHash: types.Hash, outValue: [*c]c_int, mask: c_int, p3: windows.BOOL) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(10423109015435743280)), statHash, outValue, mask, p3);
}
pub fn GET_CHARACTER_MENU_PED_MASKED_INT_STAT(statHash: types.Hash, outValue: [*c]types.Any, p2: c_int, mask: c_int, p4: windows.BOOL) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(2640406714971118736)), statHash, outValue, p2, mask, p4);
}
pub fn GET_MENU_PED_FLOAT_STAT(statHash: types.Hash, outValue: [*c]f32) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(6898793993723372927)), statHash, outValue);
}
pub fn GET_CHARACTER_MENU_PED_FLOAT_STAT(statHash: f32, outValue: [*c]f32, p2: windows.BOOL) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(10306489394852022205)), statHash, outValue, p2);
}
/// p0 was always 0xAE2602A3.
pub fn GET_MENU_PED_BOOL_STAT(statHash: types.Hash, outValue: [*c]windows.BOOL) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(371988859392025828)), statHash, outValue);
}
pub fn CLEAR_PED_IN_PAUSE_MENU() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(6801207697238564358)));
}
/// p1 is either 1 or 2 in the PC scripts.
pub fn GIVE_PED_TO_PAUSE_MENU(ped: types.Ped, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12397279322583338516)), ped, p1);
}
/// Toggles the light state for the pause menu ped in frontend menus.
/// This is used by R* in combination with `SET_PAUSE_MENU_PED_SLEEP_STATE` to toggle the "offline" or "online" state in the "friends" tab of the pause menu in GTA Online.
/// Example:
/// Lights On: https://vespura.com/hi/i/2019-04-01_16-09_540ee_1015.png
/// Lights Off: https://vespura.com/hi/i/2019-04-01_16-10_8b5e7_1016.png
pub fn SET_PAUSE_MENU_PED_LIGHTING(state: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4370186014199407024)), state);
}
/// Toggles the pause menu ped sleep state for frontend menus.
/// Example: https://vespura.com/hi/i/2019-04-01_15-51_8ed38_1014.gif
/// `state` 0 will make the ped slowly fall asleep, 1 will slowly wake the ped up.
pub fn SET_PAUSE_MENU_PED_SLEEP_STATE(state: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17073471867460778481)), state);
}
/// Used to be known as _SHOW_SOCIAL_CLUB_LEGAL_SCREEN
pub fn OPEN_ONLINE_POLICIES_MENU() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(9249686353212173388)));
}
pub fn ARE_ONLINE_POLICIES_UP_TO_DATE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(17383862298057491809)));
}
/// Returns the same as IS_SOCIAL_CLUB_ACTIVE
pub fn IS_ONLINE_POLICIES_MENU_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8030707125249750668)));
}
/// Uses the `SOCIAL_CLUB2` scaleform.
/// menu: GALLERY, MISSIONS, CREWS, MIGRATE, PLAYLISTS, JOBS
pub fn OPEN_SOCIAL_CLUB_MENU(menu: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8490245270360272986)), menu);
}
pub fn CLOSE_SOCIAL_CLUB_MENU() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(15182527026982954694)));
}
/// HUD::SET_SOCIAL_CLUB_TOUR("Gallery");
/// HUD::SET_SOCIAL_CLUB_TOUR("Missions");
/// HUD::SET_SOCIAL_CLUB_TOUR("General");
/// HUD::SET_SOCIAL_CLUB_TOUR("Playlists");
pub fn SET_SOCIAL_CLUB_TOUR(name: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11418738629567602656)), name);
}
pub fn IS_SOCIAL_CLUB_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14125186412911573423)));
}
pub fn SET_TEXT_INPUT_BOX_ENABLED(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1262600024832291372)), p0);
}
/// Used to be known as _FORCE_CLOSE_TEXT_INPUT_BOX
pub fn FORCE_CLOSE_TEXT_INPUT_BOX() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(9806412662608192000)));
}
pub fn SET_ALLOW_COMMA_ON_TEXT_INPUT(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6302112359009983650)), p0);
}
/// Used to be known as _OVERRIDE_MULTIPLAYER_CHAT_PREFIX
pub fn OVERRIDE_MP_TEXT_CHAT_TEAM_STRING(gxtEntryHash: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7644641239073022681)), gxtEntryHash);
}
/// Returns whether or not the text chat (MULTIPLAYER_CHAT Scaleform component) is active.
/// Used to be known as _IS_TEXT_CHAT_ACTIVE
/// Used to be known as _IS_MULTIPLAYER_CHAT_ACTIVE
pub fn IS_MP_TEXT_CHAT_TYPING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(12761142339698897569)));
}
/// Used to be known as _ABORT_TEXT_CHAT
/// Used to be known as _CLOSE_MULTIPLAYER_CHAT
pub fn CLOSE_MP_TEXT_CHAT() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(1930061465283338535)));
}
pub fn MP_TEXT_CHAT_IS_TEAM_JOB(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8944832014349291786)), p0);
}
/// Used to be known as _OVERRIDE_MULTIPLAYER_CHAT_COLOUR
pub fn OVERRIDE_MP_TEXT_CHAT_COLOR(p0: c_int, hudColor: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17617613879510097170)), p0, hudColor);
}
/// Hides the chat history, closes the input box and makes it unable to be opened unless called again with FALSE.
/// Used to be known as _SET_TEXT_CHAT_UNK
/// Used to be known as _MULTIPLAYER_CHAT_SET_DISABLED
pub fn MP_TEXT_CHAT_DISABLE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2139801655277685667)), toggle);
}
/// Used to be known as _SET_IS_IN_TOURNAMENT
pub fn FLAG_PLAYER_CONTEXT_IN_TOURNAMENT(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14912003518425952209)), toggle);
}
/// This native turns on the AI blip on the specified ped. It also disappears automatically when the ped is too far or if the ped is dead. You don't need to control it with other natives.
/// See gtaforums.com/topic/884370-native-research-ai-blips for further information.
/// Used to be known as _SET_PED_ENEMY_AI_BLIP
/// Used to be known as _SET_PED_AI_BLIP
pub fn SET_PED_HAS_AI_BLIP(ped: types.Ped, hasCone: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15207618962722216117)), ped, hasCone);
}
/// color: see SET_BLIP_COLOUR
/// Used to be known as _SET_PED_HAS_AI_BLIP_WITH_COLOR
pub fn SET_PED_HAS_AI_BLIP_WITH_COLOUR(ped: types.Ped, hasCone: windows.BOOL, color: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(12771587647444013624)), ped, hasCone, color);
}
pub fn DOES_PED_HAVE_AI_BLIP(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1565261421563766765)), ped);
}
/// Used to be known as _SET_AI_BLIP_TYPE
pub fn SET_PED_AI_BLIP_GANG_ID(ped: types.Ped, gangId: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16513449137041283592)), ped, gangId);
}
/// Used to be known as HIDE_SPECIAL_ABILITY_LOCKON_OPERATION
pub fn SET_PED_AI_BLIP_HAS_CONE(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4534422099245292714)), ped, toggle);
}
/// Used to be known as _IS_AI_BLIP_ALWAYS_SHOWN
pub fn SET_PED_AI_BLIP_FORCED_ON(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(886012180890750030)), ped, toggle);
}
/// Used to be known as _SET_AI_BLIP_MAX_DISTANCE
pub fn SET_PED_AI_BLIP_NOTICE_RANGE(ped: types.Ped, range: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10936526085528190889)), ped, range);
}
/// Used to be known as _SET_PED_AI_BLIP_SPRITE
pub fn SET_PED_AI_BLIP_SPRITE(ped: types.Ped, spriteId: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18229107900571690365)), ped, spriteId);
}
/// Used to be known as _GET_AI_BLIP_2
pub fn GET_AI_PED_PED_BLIP_INDEX(ped: types.Ped) types.Blip {
return nativeCaller.invoke1(@as(u64, @intCast(8996278909784906796)), ped);
}
/// Returns the current AI BLIP for the specified ped
/// Used to be known as _GET_AI_BLIP
pub fn GET_AI_PED_VEHICLE_BLIP_INDEX(ped: types.Ped) types.Blip {
return nativeCaller.invoke1(@as(u64, @intCast(6203541990188666856)), ped);
}
/// Used to be known as _HAS_DIRECTOR_MODE_BEEN_TRIGGERED
pub fn HAS_DIRECTOR_MODE_BEEN_LAUNCHED_BY_CODE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(11706966539473138702)));
}
/// Used to be known as _SET_DIRECTOR_MODE_CLEAR_TRIGGERED_FLAG
pub fn SET_DIRECTOR_MODE_LAUNCHED_BY_SCRIPT() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(2752341692579949447)));
}
/// If toggle is true, hides special ability bar / character name in the pause menu
/// If toggle is false, shows special ability bar / character name in the pause menu
/// Used to be known as _SET_DIRECTOR_MODE
/// Used to be known as _SET_PLAYER_IS_IN_DIRECTOR_MODE
pub fn SET_PLAYER_IS_IN_DIRECTOR_MODE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9260835933841995427)), toggle);
}
pub fn SET_DIRECTOR_MODE_AVAILABLE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(316764476837530341)), toggle);
}
pub fn HIDE_HUDMARKERS_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(2608312769895031478)));
}
};
pub const INTERIOR = struct {
/// Used to be known as _GET_INTERIOR_HEADING
pub fn GET_INTERIOR_HEADING(interior: types.Interior) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(17625778749366477529)), interior);
}
/// Used to be known as _GET_INTERIOR_INFO
pub fn GET_INTERIOR_LOCATION_AND_NAMEHASH(interior: types.Interior, position: [*c]types.Vector3, nameHash: [*c]types.Hash) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2678476324804208362)), interior, position, nameHash);
}
/// Returns the group ID of the specified interior.
/// 0 = default
/// 1 = subway station, subway tracks, sewers
/// 3 = train tunnel under mirror park
/// 5 = tunnel near del perro
/// 6 = train tunnel near chilliad
/// 7 = train tunnel near josiah
/// 8 = train tunnel in sandy shores
/// 9 = braddock tunnel (near chilliad)
/// 12 = tunnel under fort zancudo
/// 14 = train tunnel under cypress flats
/// 18 = rockford plaza parking garage
/// 19 = arcadius parking garage
/// 20 = union depository parking garage
/// 21 = fib parking garage
pub fn GET_INTERIOR_GROUP_ID(interior: types.Interior) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(16476501421259159834)), interior);
}
pub fn GET_OFFSET_FROM_INTERIOR_IN_WORLD_COORDS(interior: types.Interior, x: f32, y: f32, z: f32) types.Vector3 {
return nativeCaller.invoke4(@as(u64, @intCast(11401775521218355759)), interior, x, y, z);
}
pub fn IS_INTERIOR_SCENE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(13579115764212553037)));
}
pub fn IS_VALID_INTERIOR(interior: types.Interior) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2787982420646491347)), interior);
}
pub fn CLEAR_ROOM_FOR_ENTITY(entity: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12927015435217928103)), entity);
}
pub fn FORCE_ROOM_FOR_ENTITY(entity: types.Entity, interior: types.Interior, roomHashKey: types.Hash) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(5949884333633149191)), entity, interior, roomHashKey);
}
/// Gets the room hash key from the room that the specified entity is in. Each room in every interior has a unique key. Returns 0 if the entity is outside.
pub fn GET_ROOM_KEY_FROM_ENTITY(entity: types.Entity) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(5170871713518273099)), entity);
}
/// Seems to do the exact same as INTERIOR::GET_ROOM_KEY_FROM_ENTITY
pub fn GET_KEY_FOR_ENTITY_IN_ROOM(entity: types.Entity) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(4149651284798158524)), entity);
}
/// Returns the handle of the interior that the entity is in. Returns 0 if outside.
pub fn GET_INTERIOR_FROM_ENTITY(entity: types.Entity) types.Interior {
return nativeCaller.invoke1(@as(u64, @intCast(2380075781929936571)), entity);
}
pub fn RETAIN_ENTITY_IN_INTERIOR(entity: types.Entity, interior: types.Interior) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9433835734320521911)), entity, interior);
}
/// Immediately removes entity from an interior. Like sets entity to `limbo` room.
/// Used to be known as _CLEAR_INTERIOR_FOR_ENTITY
pub fn CLEAR_INTERIOR_STATE_OF_ENTITY(entity: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9643686930075461389)), entity);
}
pub fn FORCE_ACTIVATING_TRACKING_ON_ENTITY(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4089773260719890454)), p0, p1);
}
pub fn FORCE_ROOM_FOR_GAME_VIEWPORT(interiorID: c_int, roomHashKey: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10524214410905907674)), interiorID, roomHashKey);
}
/// Example of use (carmod_shop)
/// INTERIOR::SET_ROOM_FOR_GAME_VIEWPORT_BY_NAME("V_CarModRoom");
pub fn SET_ROOM_FOR_GAME_VIEWPORT_BY_NAME(roomName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12624868473407120449)), roomName);
}
/// Usage: INTERIOR::SET_ROOM_FOR_GAME_VIEWPORT_BY_KEY(INTERIOR::GET_KEY_FOR_ENTITY_IN_ROOM(PLAYER::PLAYER_PED_ID()));
pub fn SET_ROOM_FOR_GAME_VIEWPORT_BY_KEY(roomHashKey: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4638077247980279225)), roomHashKey);
}
/// Used to be known as _GET_ROOM_KEY_FROM_GAMEPLAY_CAM
pub fn GET_ROOM_KEY_FOR_GAME_VIEWPORT() types.Hash {
return nativeCaller.invoke0(@as(u64, @intCast(11986146879237829712)));
}
pub fn CLEAR_ROOM_FOR_GAME_VIEWPORT() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(2573135974166512198)));
}
/// Returns the current interior id from gameplay camera
/// Used to be known as _GET_INTERIOR_FROM_GAMEPLAY_CAM
pub fn GET_INTERIOR_FROM_PRIMARY_VIEW() types.Interior {
return nativeCaller.invoke0(@as(u64, @intCast(16704528233003574979)));
}
/// Returns interior ID from specified coordinates. If coordinates are outside, then it returns 0.
/// Example for VB.NET
/// Dim interiorID As Integer = Native.Function.Call(Of Integer)(Hash.GET_INTERIOR_AT_COORDS, X, Y, Z)
pub fn GET_INTERIOR_AT_COORDS(x: f32, y: f32, z: f32) types.Interior {
return nativeCaller.invoke3(@as(u64, @intCast(12751933987834943939)), x, y, z);
}
pub fn ADD_PICKUP_TO_INTERIOR_ROOM_BY_NAME(pickup: types.Pickup, roomName: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4567045791865538352)), pickup, roomName);
}
/// Used to be known as _LOAD_INTERIOR
pub fn PIN_INTERIOR_IN_MEMORY(interior: types.Interior) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3216741939161133639)), interior);
}
/// Does something similar to INTERIOR::DISABLE_INTERIOR.
/// You don't fall through the floor but everything is invisible inside and looks the same as when INTERIOR::DISABLE_INTERIOR is used. Peds behaves normally inside.
pub fn UNPIN_INTERIOR(interior: types.Interior) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2746296917326628417)), interior);
}
pub fn IS_INTERIOR_READY(interior: types.Interior) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7432836922140208910)), interior);
}
/// Only used once in the entire game scripts.
/// Does not actually return anything.
pub fn SET_INTERIOR_IN_USE(interior: types.Interior) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5486282535958604630)), interior);
}
/// Returns the interior ID representing the requested interior at that location (if found?). The supplied interior string is not the same as the one used to load the interior.
/// Use: INTERIOR::UNPIN_INTERIOR(INTERIOR::GET_INTERIOR_AT_COORDS_WITH_TYPE(x, y, z, interior))
/// Interior types include: "V_Michael", "V_Franklins", "V_Franklinshouse", etc.. you can find them in the scripts.
/// Not a very useful native as you could just use GET_INTERIOR_AT_COORDS instead and get the same result, without even having to specify the interior type.
pub fn GET_INTERIOR_AT_COORDS_WITH_TYPE(x: f32, y: f32, z: f32, interiorType: [*c]const u8) types.Interior {
return nativeCaller.invoke4(@as(u64, @intCast(411983278217074684)), x, y, z, interiorType);
}
/// Hashed version of GET_INTERIOR_AT_COORDS_WITH_TYPE
/// Used to be known as _UNK_GET_INTERIOR_AT_COORDS
pub fn GET_INTERIOR_AT_COORDS_WITH_TYPEHASH(x: f32, y: f32, z: f32, typeHash: types.Hash) types.Interior {
return nativeCaller.invoke4(@as(u64, @intCast(17363481972041050013)), x, y, z, typeHash);
}
pub fn ACTIVATE_INTERIOR_GROUPS_USING_CAMERA() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(5204694495736271857)));
}
/// Returns true if the collision at the specified coords is marked as being outside (false if there's an interior)
/// Used to be known as _ARE_COORDS_COLLIDING_WITH_EXTERIOR
pub fn IS_COLLISION_MARKED_OUTSIDE(x: f32, y: f32, z: f32) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(17196340069418152936)), x, y, z);
}
pub fn GET_INTERIOR_FROM_COLLISION(x: f32, y: f32, z: f32) types.Interior {
return nativeCaller.invoke3(@as(u64, @intCast(17027259154904532004)), x, y, z);
}
pub fn ENABLE_STADIUM_PROBES_THIS_FRAME(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9137233570910776812)), toggle);
}
/// More info: http://gtaforums.com/topic/836367-adding-props-to-interiors/
/// Full list of IPLs and interior entity sets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ipls.json
/// Used to be known as _ENABLE_INTERIOR_PROP
pub fn ACTIVATE_INTERIOR_ENTITY_SET(interior: types.Interior, entitySetName: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6190315277334034081)), interior, entitySetName);
}
/// Full list of IPLs and interior entity sets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ipls.json
/// Used to be known as _DISABLE_INTERIOR_PROP
pub fn DEACTIVATE_INTERIOR_ENTITY_SET(interior: types.Interior, entitySetName: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4759129920140927330)), interior, entitySetName);
}
/// Full list of IPLs and interior entity sets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ipls.json
/// Used to be known as _IS_INTERIOR_PROP_ENABLED
pub fn IS_INTERIOR_ENTITY_SET_ACTIVE(interior: types.Interior, entitySetName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(3888820095585132909)), interior, entitySetName);
}
/// Full list of IPLs and interior entity sets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ipls.json
/// Used to be known as _SET_INTERIOR_PROP_COLOR
/// Used to be known as _SET_INTERIOR_ENTITY_SET_COLOR
pub fn SET_INTERIOR_ENTITY_SET_TINT_INDEX(interior: types.Interior, entitySetName: [*c]const u8, color: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(13975111697588294423)), interior, entitySetName, color);
}
pub fn REFRESH_INTERIOR(interior: types.Interior) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4752278595253525216)), interior);
}
/// This is the native that is used to hide the exterior of GTA Online apartment buildings when you are inside an apartment.
/// More info: http://gtaforums.com/topic/836301-hiding-gta-online-apartment-exteriors/
/// Used to be known as _HIDE_MAP_OBJECT_THIS_FRAME
pub fn ENABLE_EXTERIOR_CULL_MODEL_THIS_FRAME(mapObjectHash: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12213521933275342507)), mapObjectHash);
}
/// Used to be known as _ENABLE_SCRIPT_CULL_MODEL_THIS_FRAME
pub fn ENABLE_SHADOW_CULL_MODEL_THIS_FRAME(mapObjectHash: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5819624144786551657)), mapObjectHash);
}
/// Example:
/// This removes the interior from the strip club and when trying to walk inside the player just falls:
/// INTERIOR::DISABLE_INTERIOR(118018, true);
pub fn DISABLE_INTERIOR(interior: types.Interior, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7021274633124436204)), interior, toggle);
}
pub fn IS_INTERIOR_DISABLED(interior: types.Interior) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13569650953496943893)), interior);
}
/// Does something similar to INTERIOR::DISABLE_INTERIOR
pub fn CAP_INTERIOR(interior: types.Interior, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15643076920324709204)), interior, toggle);
}
pub fn IS_INTERIOR_CAPPED(interior: types.Interior) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10572983720435575846)), interior);
}
pub fn DISABLE_METRO_SYSTEM(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11413602432665415843)), toggle);
}
/// Jenkins hash _might_ be 0xFC227584.
pub fn SET_IS_EXTERIOR_ONLY(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8233086683652873065)), entity, toggle);
}
};
pub const ITEMSET = struct {
pub fn CREATE_ITEMSET(p0: windows.BOOL) types.ScrHandle {
return nativeCaller.invoke1(@as(u64, @intCast(3867793419214068516)), p0);
}
pub fn DESTROY_ITEMSET(itemset: types.ScrHandle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16003578706972393178)), itemset);
}
pub fn IS_ITEMSET_VALID(itemset: types.ScrHandle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12804272885229477803)), itemset);
}
pub fn ADD_TO_ITEMSET(item: types.ScrHandle, itemset: types.ScrHandle) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(16398822311459174365)), item, itemset);
}
pub fn REMOVE_FROM_ITEMSET(item: types.ScrHandle, itemset: types.ScrHandle) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2731013455570499206)), item, itemset);
}
pub fn GET_ITEMSET_SIZE(itemset: types.ScrHandle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(15641703559802111537)), itemset);
}
pub fn GET_INDEXED_ITEM_IN_ITEMSET(index: c_int, itemset: types.ScrHandle) types.ScrHandle {
return nativeCaller.invoke2(@as(u64, @intCast(8798202044993121195)), index, itemset);
}
pub fn IS_IN_ITEMSET(item: types.ScrHandle, itemset: types.ScrHandle) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(3247031099325006087)), item, itemset);
}
pub fn CLEAN_ITEMSET(itemset: types.ScrHandle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4736675692165480993)), itemset);
}
};
pub const LOADINGSCREEN = struct {
/// This function is hard-coded to always return 0.
/// Used to be known as _RETURN_ZERO
pub fn LOBBY_AUTO_MULTIPLAYER_MENU() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(17494795973434417618)));
}
/// Used to be known as _LOADINGSCREEN_GET_LOAD_FREEMODE
pub fn LOBBY_AUTO_MULTIPLAYER_FREEMODE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(17256975445195564620)));
}
/// Used to be known as _GET_BROADCAST_FINSHED_LOS_SOUND
/// Used to be known as _LOADINGSCREEN_SET_LOAD_FREEMODE
pub fn LOBBY_SET_AUTO_MULTIPLAYER(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12737705678694045795)), toggle);
}
/// Used to be known as _LOADINGSCREEN_GET_LOAD_FREEMODE_WITH_EVENT_NAME
pub fn LOBBY_AUTO_MULTIPLAYER_EVENT() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9990220738884709581)));
}
/// Used to be known as _IS_IN_LOADING_SCREEN
/// Used to be known as _LOADINGSCREEN_SET_LOAD_FREEMODE_WITH_EVENT_NAME
pub fn LOBBY_SET_AUTO_MULTIPLAYER_EVENT(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18172198856348913077)), toggle);
}
/// Used to be known as _IS_UI_LOADING_MULTIPLAYER
/// Used to be known as _LOADINGSCREEN_IS_LOADING_FREEMODE
pub fn LOBBY_AUTO_MULTIPLAYER_RANDOM_JOB() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14329471267055055718)));
}
/// Used to be known as _LOADINGSCREEN_SET_IS_LOADING_FREEMODE
pub fn LOBBY_SET_AUTO_MP_RANDOM_JOB(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14404508441872907113)), toggle);
}
pub fn SHUTDOWN_SESSION_CLEARS_AUTO_MULTIPLAYER(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18022858741389546005)), toggle);
}
};
pub const LOCALIZATION = struct {
/// Same return values as GET_CURRENT_LANGUAGE
/// Used to be known as _LOCALIZATION_GET_SYSTEM_LANGUAGE
pub fn LOCALIZATION_GET_SYSTEM_LANGUAGE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(5292891609090321215)));
}
/// 0 = american (en-US)
/// 1 = french (fr-FR)
/// 2 = german (de-DE)
/// 3 = italian (it-IT)
/// 4 = spanish (es-ES)
/// 5 = brazilian (pt-BR)
/// 6 = polish (pl-PL)
/// 7 = russian (ru-RU)
/// 8 = korean (ko-KR)
/// 9 = chinesetrad (zh-TW)
/// 10 = japanese (ja-JP)
/// 11 = mexican (es-MX)
/// 12 = chinesesimp (zh-CN)
/// Used to be known as _GET_UI_LANGUAGE_ID
/// Used to be known as _GET_CURRENT_LANGUAGE_ID
pub fn GET_CURRENT_LANGUAGE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(3160758157564346030)));
}
/// Possible return values: 0, 1, 2
/// Used to be known as _GET_USER_LANGUAGE_ID
/// Used to be known as _LOCALIZATION_GET_SYSTEM_DATE_FORMAT
pub fn LOCALIZATION_GET_SYSTEM_DATE_TYPE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(12154726862171804436)));
}
};
pub const MISC = struct {
pub fn GET_ALLOCATED_STACK_SIZE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(10033076774007577442)));
}
/// Used to be known as _GET_FREE_STACK_SLOTS_COUNT
pub fn GET_NUMBER_OF_FREE_STACKS_OF_THIS_SIZE(stackSize: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(18351349330601704463)), stackSize);
}
pub fn SET_RANDOM_SEED(seed: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4921758165350085612)), seed);
}
/// Maximum value is 1.
/// At a value of 0 the game will still run at a minimum time scale.
/// Slow Motion 1: 0.6
/// Slow Motion 2: 0.4
/// Slow Motion 3: 0.2
pub fn SET_TIME_SCALE(timeScale: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2107831375318018078)), timeScale);
}
/// If true, the player can't save the game.
/// If the parameter is true, sets the mission flag to true, if the parameter is false, the function does nothing at all.
/// ^ also, if the mission flag is already set, the function does nothing at all
pub fn SET_MISSION_FLAG(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14136832564121365875)), toggle);
}
pub fn GET_MISSION_FLAG() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(11762519102602810782)));
}
/// If the parameter is true, sets the random event flag to true, if the parameter is false, the function does nothing at all.
/// Does nothing if the mission flag is set.
pub fn SET_RANDOM_EVENT_FLAG(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10887776491286634840)), toggle);
}
pub fn GET_RANDOM_EVENT_FLAG() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(15192188682518992817)));
}
/// Returns pointer to an empty string.
/// Used to be known as _GET_GLOBAL_CHAR_BUFFER
pub fn GET_CONTENT_TO_LOAD() [*c]const u8 {
return nativeCaller.invoke0(@as(u64, @intCast(2655572877792606985)));
}
/// Does nothing (it's a nullsub). Seems to be PS4 specific.
pub fn ACTIVITY_FEED_CREATE(p0: [*c]const u8, p1: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5606411078356580045)), p0, p1);
}
/// Does nothing (it's a nullsub). Seems to be PS4 specific.
pub fn ACTIVITY_FEED_ADD_SUBSTRING_TO_CAPTION(p0: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3535994026037150783)), p0);
}
/// Does nothing (it's a nullsub). Seems to be PS4 specific.
pub fn ACTIVITY_FEED_ADD_LITERAL_SUBSTRING_TO_CAPTION(p0: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16992961390462974445)), p0);
}
/// Does nothing (it's a nullsub). Seems to be PS4 specific.
pub fn ACTIVITY_FEED_ADD_INT_TO_CAPTION(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10945966734720700763)), p0);
}
/// Does nothing (it's a nullsub). Seems to be PS4 specific.
pub fn ACTIVITY_FEED_LARGE_IMAGE_URL(p0: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10478933489439546935)), p0);
}
/// Does nothing (it's a nullsub). Seems to be PS4 specific.
pub fn ACTIVITY_FEED_ACTION_START_WITH_COMMAND_LINE(p0: [*c]const u8, p1: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16935659554214521565)), p0, p1);
}
/// Does nothing (it's a nullsub). Seems to be PS4 specific.
pub fn ACTIVITY_FEED_ACTION_START_WITH_COMMAND_LINE_ADD(p0: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8087558890440043351)), p0);
}
/// Does nothing (it's a nullsub). Seems to be PS4 specific.
pub fn ACTIVITY_FEED_POST() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(9894948913319171016)));
}
/// Does nothing (it's a nullsub). Seems to be PS4 specific.
/// Used only once in the scripts (ingamehud) with p0 = "AF_GAMEMODE"
pub fn ACTIVITY_FEED_ONLINE_PLAYED_WITH_POST(p0: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13423978711272084817)), p0);
}
/// Hardcoded to return false.
/// Used to be known as _HAS_RESUMED_FROM_SUSPEND
pub fn HAS_RESUMED_FROM_SUSPEND() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(16769646809987956533)));
}
/// Sets GtaThread+0x14A
pub fn SET_SCRIPT_HIGH_PRIO(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7337185903382424609)), toggle);
}
/// Sets bit 3 in GtaThread+0x150
pub fn SET_THIS_IS_A_TRIGGER_SCRIPT(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8007740668553601217)), toggle);
}
pub fn INFORM_CODE_OF_CONTENT_ID_OF_CURRENT_UGC_MISSION(p0: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10193020824436663747)), p0);
}
/// Used to be known as _GET_BASE_ELEMENT_METADATA
pub fn GET_BASE_ELEMENT_LOCATION_FROM_METADATA_BLOCK(p0: [*c]types.Any, p1: [*c]types.Any, p2: types.Any, p3: windows.BOOL) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(12913499504156456060)), p0, p1, p2, p3);
}
/// Returns current weather name hash
/// Used to be known as _GET_PREV_WEATHER_TYPE
pub fn GET_PREV_WEATHER_TYPE_HASH_NAME() types.Hash {
return nativeCaller.invoke0(@as(u64, @intCast(6218213562023429539)));
}
/// Returns weather name hash
/// Used to be known as _GET_NEXT_WEATHER_TYPE
pub fn GET_NEXT_WEATHER_TYPE_HASH_NAME() types.Hash {
return nativeCaller.invoke0(@as(u64, @intCast(8147899912429302114)));
}
pub fn IS_PREV_WEATHER_TYPE(weatherType: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4968191145759412393)), weatherType);
}
pub fn IS_NEXT_WEATHER_TYPE(weatherType: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3434621646856581725)), weatherType);
}
/// The following weatherTypes are used in the scripts:
/// "CLEAR"
/// "EXTRASUNNY"
/// "CLOUDS"
/// "OVERCAST"
/// "RAIN"
/// "CLEARING"
/// "THUNDER"
/// "SMOG"
/// "FOGGY"
/// "XMAS"
/// "SNOW"
/// "SNOWLIGHT"
/// "BLIZZARD"
/// "HALLOWEEN"
/// "NEUTRAL"
pub fn SET_WEATHER_TYPE_PERSIST(weatherType: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8091143200275372431)), weatherType);
}
/// The following weatherTypes are used in the scripts:
/// "CLEAR"
/// "EXTRASUNNY"
/// "CLOUDS"
/// "OVERCAST"
/// "RAIN"
/// "CLEARING"
/// "THUNDER"
/// "SMOG"
/// "FOGGY"
/// "XMAS"
/// "SNOW"
/// "SNOWLIGHT"
/// "BLIZZARD"
/// "HALLOWEEN"
/// "NEUTRAL"
pub fn SET_WEATHER_TYPE_NOW_PERSIST(weatherType: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17109505538612268170)), weatherType);
}
/// The following weatherTypes are used in the scripts:
/// "CLEAR"
/// "EXTRASUNNY"
/// "CLOUDS"
/// "OVERCAST"
/// "RAIN"
/// "CLEARING"
/// "THUNDER"
/// "SMOG"
/// "FOGGY"
/// "XMAS"
/// "SNOW"
/// "SNOWLIGHT"
/// "BLIZZARD"
/// "HALLOWEEN"
/// "NEUTRAL"
pub fn SET_WEATHER_TYPE_NOW(weatherType: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3005176124459292809)), weatherType);
}
/// Used to be known as _SET_WEATHER_TYPE_OVER_TIME
pub fn SET_WEATHER_TYPE_OVERTIME_PERSIST(weatherType: [*c]const u8, time: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18109050757229278655)), weatherType, time);
}
pub fn SET_RANDOM_WEATHER_TYPE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(10017686195456081952)));
}
pub fn CLEAR_WEATHER_TYPE_PERSIST() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(14754798680422182133)));
}
/// Used to be known as _CLEAR_WEATHER_TYPE_OVERTIME_PERSIST
pub fn CLEAR_WEATHER_TYPE_NOW_PERSIST_NETWORK(milliseconds: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(934918351311327304)), milliseconds);
}
/// Used to be known as _GET_WEATHER_TYPE_TRANSITION
pub fn GET_CURR_WEATHER_STATE(weatherType1: [*c]types.Hash, weatherType2: [*c]types.Hash, percentWeather2: [*c]f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(17562886828200801299)), weatherType1, weatherType2, percentWeather2);
}
/// Mixes two weather types. If percentWeather2 is set to 0.0f, then the weather will be entirely of weatherType1, if it is set to 1.0f it will be entirely of weatherType2. If it's set somewhere in between, there will be a mixture of weather behaviors. To test, try this in the RPH console, and change the float to different values between 0 and 1:
/// execute "NativeFunction.Natives.x578C752848ECFA0C(Game.GetHashKey(""RAIN""), Game.GetHashKey(""SMOG""), 0.50f);
/// Note that unlike most of the other weather natives, this native takes the hash of the weather name, not the plain string. These are the weather names and their hashes:
/// CLEAR 0x36A83D84
/// EXTRASUNNY 0x97AA0A79
/// CLOUDS 0x30FDAF5C
/// OVERCAST 0xBB898D2D
/// RAIN 0x54A69840
/// CLEARING 0x6DB1A50D
/// THUNDER 0xB677829F
/// SMOG 0x10DCF4B5
/// FOGGY 0xAE737644
/// XMAS 0xAAC9C895
/// SNOWLIGHT 0x23FB812B
/// BLIZZARD 0x27EA2814
/// /* OLD INVALID INFO BELOW */
/// Not tested. Based purely on disassembly. Instantly sets the weather to sourceWeather, then transitions to targetWeather over the specified transitionTime in seconds.
/// If an invalid hash is specified for sourceWeather, the current weather type will be used.
/// If an invalid hash is specified for targetWeather, the next weather type will be used.
/// If an invalid hash is specified for both sourceWeather and targetWeather, the function just changes the transition time of the current transition.
/// Used to be known as _SET_WEATHER_TYPE_TRANSITION
pub fn SET_CURR_WEATHER_STATE(weatherType1: types.Hash, weatherType2: types.Hash, percentWeather2: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(6308545993921853964)), weatherType1, weatherType2, percentWeather2);
}
/// Appears to have an optional bool parameter that is unused in the scripts.
/// If you pass true, something will be set to zero.
pub fn SET_OVERRIDE_WEATHER(weatherType: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11834717031454399471)), weatherType);
}
/// Identical to SET_OVERRIDE_WEATHER but has an additional BOOL param that sets some weather var to 0 if true
pub fn SET_OVERRIDE_WEATHEREX(weatherType: [*c]const u8, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1259003504230393228)), weatherType, p1);
}
pub fn CLEAR_OVERRIDE_WEATHER() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(3714676070527602768)));
}
pub fn WATER_OVERRIDE_SET_SHOREWAVEAMPLITUDE(amplitude: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13328542380663746934)), amplitude);
}
pub fn WATER_OVERRIDE_SET_SHOREWAVEMINAMPLITUDE(minAmplitude: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14117327543806979304)), minAmplitude);
}
pub fn WATER_OVERRIDE_SET_SHOREWAVEMAXAMPLITUDE(maxAmplitude: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12078955967429028918)), maxAmplitude);
}
pub fn WATER_OVERRIDE_SET_OCEANNOISEMINAMPLITUDE(minAmplitude: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3563043329174420565)), minAmplitude);
}
pub fn WATER_OVERRIDE_SET_OCEANWAVEAMPLITUDE(amplitude: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4635771836659468653)), amplitude);
}
pub fn WATER_OVERRIDE_SET_OCEANWAVEMINAMPLITUDE(minAmplitude: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17821220293787171869)), minAmplitude);
}
pub fn WATER_OVERRIDE_SET_OCEANWAVEMAXAMPLITUDE(maxAmplitude: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12963108010627120770)), maxAmplitude);
}
pub fn WATER_OVERRIDE_SET_RIPPLEBUMPINESS(bumpiness: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8979063984491565170)), bumpiness);
}
pub fn WATER_OVERRIDE_SET_RIPPLEMINBUMPINESS(minBumpiness: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7068031373390019764)), minBumpiness);
}
pub fn WATER_OVERRIDE_SET_RIPPLEMAXBUMPINESS(maxBumpiness: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11483734532277223642)), maxBumpiness);
}
pub fn WATER_OVERRIDE_SET_RIPPLEDISTURB(disturb: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13368176821713515478)), disturb);
}
/// This seems to edit the water wave, intensity around your current location.
/// 0.0f = Normal
/// 1.0f = So Calm and Smooth, a boat will stay still.
/// 3.0f = Really Intense.
pub fn WATER_OVERRIDE_SET_STRENGTH(strength: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14216184830359819280)), strength);
}
pub fn WATER_OVERRIDE_FADE_IN(p0: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12124621612066658023)), p0);
}
pub fn WATER_OVERRIDE_FADE_OUT(p0: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14105874013513521681)), p0);
}
/// Sets the the normalized wind speed value. The wind speed clamps always at 12.0, SET_WIND sets the wind in a percentage, 0.0 is 0 and 1.0 is 12.0. Setting this value to a negative number resumes the random wind speed changes provided by the game.
pub fn SET_WIND(speed: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12410360263898470681)), speed);
}
/// Using this native will set the absolute wind speed value. The wind speed clamps to a range of 0.0- 12.0. Setting this value to a negative number resumes the random wind speed changes provided by the game.
pub fn SET_WIND_SPEED(speed: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17152501161601681404)), speed);
}
pub fn GET_WIND_SPEED() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(12163972732459761426)));
}
/// The wind direction in radians
/// 180 degrees (PI), wind will blow from the south. Setting this value to a negative number resumes the random wind direction changes provided by the game.
pub fn SET_WIND_DIRECTION(direction: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16937831938213496104)), direction);
}
pub fn GET_WIND_DIRECTION() types.Vector3 {
return nativeCaller.invoke0(@as(u64, @intCast(2251817334770594010)));
}
/// With an `intensity` higher than `0.5f`, only the creation of puddles gets faster, rain and rain sound won't increase after that.
/// With an `intensity` of `0.0f` rain and rain sounds are disabled and there won't be any new puddles.
/// To use the rain intensity of the current weather, call this native with `-1f` as `intensity`.
/// Used to be known as _SET_RAIN_FX_INTENSITY
/// Used to be known as _SET_RAIN_LEVEL
pub fn SET_RAIN(intensity: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7223253640658701714)), intensity);
}
pub fn GET_RAIN_LEVEL() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(10838297566594487795)));
}
/// Used to be known as _SET_SNOW_LEVEL
pub fn SET_SNOW(level: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9153165449383164954)), level);
}
pub fn GET_SNOW_LEVEL() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(14233216051052274606)));
}
/// creates single lightning+thunder at random position
/// Used to be known as _CREATE_LIGHTNING_THUNDER
pub fn FORCE_LIGHTNING_FLASH() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(17727907597539985560)));
}
pub fn SET_CLOUD_SETTINGS_OVERRIDE(p0: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(206790413051920359)), p0);
}
pub fn PRELOAD_CLOUD_HAT(name: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1276048922525190248)), name);
}
/// The following cloudhats are useable:
/// altostratus
/// Cirrus
/// cirrocumulus
/// Clear 01
/// Cloudy 01
/// Contrails
/// Horizon
/// horizonband1
/// horizonband2
/// horizonband3
/// horsey
/// Nimbus
/// Puffs
/// RAIN
/// Snowy 01
/// Stormy 01
/// stratoscumulus
/// Stripey
/// shower
/// Wispy
/// Used to be known as _SET_CLOUD_HAT_TRANSITION
pub fn LOAD_CLOUD_HAT(name: [*c]const u8, transitionTime: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18178853164908265419)), name, transitionTime);
}
pub fn UNLOAD_CLOUD_HAT(name: [*c]const u8, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12053887682083518484)), name, p1);
}
/// Used to be known as _CLEAR_CLOUD_HAT
pub fn UNLOAD_ALL_CLOUD_HATS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(10772180462461942628)));
}
/// Used to be known as _SET_CLOUD_HAT_OPACITY
pub fn SET_CLOUDS_ALPHA(opacity: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17537466796832820358)), opacity);
}
/// Used to be known as _GET_CLOUD_HAT_OPACITY
pub fn GET_CLOUDS_ALPHA() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(2354298381451283076)));
}
pub fn GET_GAME_TIMER() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(11300229656120296547)));
}
pub fn GET_FRAME_TIME() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(1568387602608814839)));
}
/// Used to be known as _GET_BENCHMARK_TIME
pub fn GET_SYSTEM_TIME_STEP() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(16544436141437451803)));
}
pub fn GET_FRAME_COUNT() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(18195108673376937714)));
}
pub fn GET_RANDOM_FLOAT_IN_RANGE(startRange: f32, endRange: f32) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(3547962977077129165)), startRange, endRange);
}
pub fn GET_RANDOM_INT_IN_RANGE(startRange: c_int, endRange: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(15362697152651844904)), startRange, endRange);
}
/// Used to be known as _GET_RANDOM_INT_IN_RANGE_2
pub fn GET_RANDOM_MWC_INT_IN_RANGE(startRange: c_int, endRange: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(17497777675316810036)), startRange, endRange);
}
/// Gets the ground elevation at the specified position. Note that if the specified position is below ground level, the function will output zero!
/// x: Position on the X-axis to get ground elevation at.
/// y: Position on the Y-axis to get ground elevation at.
/// z: Position on the Z-axis to get ground elevation at.
/// groundZ: The ground elevation at the specified position.
/// ignoreWater: Nearly always 0, very rarely 1 in the scripts: https://gfycat.com/NiftyTatteredCricket
/// Bear in mind this native can only calculate the elevation when the coordinates are within the client's render distance.
pub fn GET_GROUND_Z_FOR_3D_COORD(x: f32, y: f32, z: f32, groundZ: [*c]f32, ignoreWater: windows.BOOL, p5: windows.BOOL) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(14485449809187343659)), x, y, z, groundZ, ignoreWater, p5);
}
/// Used to be known as _GET_GROUND_Z_COORD_WITH_OFFSETS
pub fn GET_GROUND_Z_AND_NORMAL_FOR_3D_COORD(x: f32, y: f32, z: f32, groundZ: [*c]f32, normal: [*c]types.Vector3) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(10078066389880938102)), x, y, z, groundZ, normal);
}
/// Used to be known as _GET_GROUND_Z_FOR_3D_COORD_2
pub fn GET_GROUND_Z_EXCLUDING_OBJECTS_FOR_3D_COORD(x: f32, y: f32, z: f32, groundZ: [*c]f32, p4: windows.BOOL, p5: windows.BOOL) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(11421956533085805353)), x, y, z, groundZ, p4, p5);
}
pub fn ASIN(p0: f32) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(14430384276805901543)), p0);
}
pub fn ACOS(p0: f32) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(2092125917621793974)), p0);
}
pub fn TAN(p0: f32) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(7142997959761211025)), p0);
}
pub fn ATAN(p0: f32) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(12236695102160123491)), p0);
}
pub fn ATAN2(p0: f32, p1: f32) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(9883092181120606628)), p0, p1);
}
/// Returns the distance between two three-dimensional points, optionally ignoring the Z values.
/// If useZ is false, only the 2D plane (X-Y) will be considered for calculating the distance.
/// Consider using this faster native instead: SYSTEM::VDIST - DVIST always takes in consideration the 3D coordinates.
pub fn GET_DISTANCE_BETWEEN_COORDS(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, useZ: windows.BOOL) f32 {
return nativeCaller.invoke7(@as(u64, @intCast(17417496221515303250)), x1, y1, z1, x2, y2, z2, useZ);
}
pub fn GET_ANGLE_BETWEEN_2D_VECTORS(x1: f32, y1: f32, x2: f32, y2: f32) f32 {
return nativeCaller.invoke4(@as(u64, @intCast(1760842301871889554)), x1, y1, x2, y2);
}
/// dx = x1 - x2
/// dy = y1 - y2
pub fn GET_HEADING_FROM_VECTOR_2D(dx: f32, dy: f32) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(3457474934040373542)), dx, dy);
}
/// returns a float between 0.0 and 1.0, clamp: sets whether the product should be clamped between the given coordinates
/// Used to be known as _GET_PROGRESS_ALONG_LINE_BETWEEN_COORDS
pub fn GET_RATIO_OF_CLOSEST_POINT_ON_LINE(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, x3: f32, y3: f32, z3: f32, clamp: windows.BOOL) f32 {
return nativeCaller.invoke10(@as(u64, @intCast(9191675341225556726)), x1, y1, z1, x2, y2, z2, x3, y3, z3, clamp);
}
/// clamp: sets whether the product should be clamped between the given coordinates
pub fn GET_CLOSEST_POINT_ON_LINE(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, x3: f32, y3: f32, z3: f32, clamp: windows.BOOL) types.Vector3 {
return nativeCaller.invoke10(@as(u64, @intCast(2432565831989927514)), x1, y1, z1, x2, y2, z2, x3, y3, z3, clamp);
}
pub fn GET_LINE_PLANE_INTERSECTION(p0: f32, p1: f32, p2: f32, p3: f32, p4: f32, p5: f32, p6: f32, p7: f32, p8: f32, p9: f32, p10: f32, p11: f32, p12: [*c]f32) windows.BOOL {
return nativeCaller.invoke13(@as(u64, @intCast(17685067819093226102)), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12);
}
pub fn GET_POINT_AREA_OVERLAP(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any, p6: types.Any, p7: types.Any, p8: types.Any, p9: types.Any, p10: types.Any, p11: types.Any, p12: types.Any, p13: types.Any) windows.BOOL {
return nativeCaller.invoke14(@as(u64, @intCast(11577934948723186082)), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13);
}
/// This sets bit [offset] of [address] to on.
/// The offsets used are different bits to be toggled on and off, typically there is only one address used in a script.
/// Example:
/// MISC::SET_BIT(&bitAddress, 1);
/// To check if this bit has been enabled:
/// MISC::IS_BIT_SET(bitAddress, 1); // will return 1 afterwards
/// Please note, this method may assign a value to [address] when used.
pub fn SET_BIT(address: [*c]c_int, offset: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10609753527953370320)), address, offset);
}
/// This sets bit [offset] of [address] to off.
/// Example:
/// MISC::CLEAR_BIT(&bitAddress, 1);
/// To check if this bit has been enabled:
/// MISC::IS_BIT_SET(bitAddress, 1); // will return 0 afterwards
pub fn CLEAR_BIT(address: [*c]c_int, offset: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16718648974139562643)), address, offset);
}
/// This native converts its past string to hash. It is hashed using jenkins one at a time method.
pub fn GET_HASH_KEY(string: [*c]const u8) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(15153829671144605900)), string);
}
/// This native always come right before SET_ENTITY_QUATERNION where its final 4 parameters are SLERP_NEAR_QUATERNION p9 to p12
pub fn SLERP_NEAR_QUATERNION(t: f32, x: f32, y: f32, z: f32, w: f32, x1: f32, y1: f32, z1: f32, w1: f32, outX: [*c]f32, outY: [*c]f32, outZ: [*c]f32, outW: [*c]f32) void {
_ = nativeCaller.invoke13(@as(u64, @intCast(17507359797302232613)), t, x, y, z, w, x1, y1, z1, w1, outX, outY, outZ, outW);
}
pub fn IS_AREA_OCCUPIED(p0: f32, p1: f32, p2: f32, p3: f32, p4: f32, p5: f32, p6: windows.BOOL, p7: windows.BOOL, p8: windows.BOOL, p9: windows.BOOL, p10: windows.BOOL, p11: types.Any, p12: windows.BOOL) windows.BOOL {
return nativeCaller.invoke13(@as(u64, @intCast(11969246150199653742)), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12);
}
pub fn IS_AREA_OCCUPIED_SLOW(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any, p6: types.Any, p7: types.Any, p8: types.Any, p9: types.Any, p10: types.Any, p11: types.Any, p12: types.Any) windows.BOOL {
return nativeCaller.invoke13(@as(u64, @intCast(4126805741194793350)), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12);
}
/// `range`: The range, seems to not be very accurate during testing.
/// `p4`: Unknown, when set to true it seems to always return true no matter what I try.
/// `checkVehicle`: Check for any vehicles in that area.
/// `checkPeds`: Check for any peds in that area.
/// `ignoreEntity`: This entity will be ignored if it's in the area. Set to 0 if you don't want to exclude any entities.
/// The BOOL parameters that are documented have not been confirmed. They are just documented from what I've found during testing. They may not work as expected in all cases.
/// Returns true if there is anything in that location matching the provided parameters.
pub fn IS_POSITION_OCCUPIED(x: f32, y: f32, z: f32, range: f32, p4: windows.BOOL, checkVehicles: windows.BOOL, checkPeds: windows.BOOL, p7: windows.BOOL, p8: windows.BOOL, ignoreEntity: types.Entity, p10: windows.BOOL) windows.BOOL {
return nativeCaller.invoke11(@as(u64, @intCast(12523920530176275245)), x, y, z, range, p4, checkVehicles, checkPeds, p7, p8, ignoreEntity, p10);
}
pub fn IS_POINT_OBSCURED_BY_A_MISSION_ENTITY(p0: f32, p1: f32, p2: f32, p3: f32, p4: f32, p5: f32, p6: types.Any) windows.BOOL {
return nativeCaller.invoke7(@as(u64, @intCast(16523179938161861005)), p0, p1, p2, p3, p4, p5, p6);
}
/// Example: CLEAR_AREA(0, 0, 0, 30, true, false, false, false);
pub fn CLEAR_AREA(X: f32, Y: f32, Z: f32, radius: f32, p4: windows.BOOL, ignoreCopCars: windows.BOOL, ignoreObjects: windows.BOOL, p7: windows.BOOL) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(11920748883847386016)), X, Y, Z, radius, p4, ignoreCopCars, ignoreObjects, p7);
}
/// MISC::CLEAR_AREA_LEAVE_VEHICLE_HEALTH(x, y, z, radius, false, false, false, false); seem to make all objects go away, peds, vehicles etc. All booleans set to true doesn't seem to change anything.
/// Used to be known as _CLEAR_AREA_OF_EVERYTHING
pub fn CLEAR_AREA_LEAVE_VEHICLE_HEALTH(x: f32, y: f32, z: f32, radius: f32, p4: windows.BOOL, p5: windows.BOOL, p6: windows.BOOL, p7: windows.BOOL) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(10770420815831486765)), x, y, z, radius, p4, p5, p6, p7);
}
/// Example:
/// CLEAR_AREA_OF_VEHICLES(0.0f, 0.0f, 0.0f, 10000.0f, false, false, false, false, false, false);
pub fn CLEAR_AREA_OF_VEHICLES(x: f32, y: f32, z: f32, radius: f32, p4: windows.BOOL, p5: windows.BOOL, p6: windows.BOOL, p7: windows.BOOL, p8: windows.BOOL, p9: windows.BOOL, p10: types.Any) void {
_ = nativeCaller.invoke11(@as(u64, @intCast(128275295070891702)), x, y, z, radius, p4, p5, p6, p7, p8, p9, p10);
}
pub fn CLEAR_ANGLED_AREA_OF_VEHICLES(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, width: f32, p7: windows.BOOL, p8: windows.BOOL, p9: windows.BOOL, p10: windows.BOOL, p11: windows.BOOL, p12: types.Any, p13: types.Any) void {
_ = nativeCaller.invoke14(@as(u64, @intCast(1286680396691581098)), x1, y1, z1, x2, y2, z2, width, p7, p8, p9, p10, p11, p12, p13);
}
/// I looked through the PC scripts that this site provides you with a link to find. It shows the last param mainly uses, (0, 2, 6, 16, and 17) so I am going to assume it is a type of flag.
pub fn CLEAR_AREA_OF_OBJECTS(x: f32, y: f32, z: f32, radius: f32, flags: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(15968527570113953627)), x, y, z, radius, flags);
}
/// Example: CLEAR_AREA_OF_PEDS(0, 0, 0, 10000, 1);
pub fn CLEAR_AREA_OF_PEDS(x: f32, y: f32, z: f32, radius: f32, flags: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(13705013785195228249)), x, y, z, radius, flags);
}
/// flags appears to always be 0
pub fn CLEAR_AREA_OF_COPS(x: f32, y: f32, z: f32, radius: f32, flags: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(358313864965191821)), x, y, z, radius, flags);
}
/// flags is usually 0 in the scripts.
pub fn CLEAR_AREA_OF_PROJECTILES(x: f32, y: f32, z: f32, radius: f32, flags: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(728660689210954150)), x, y, z, radius, flags);
}
/// Possibly used to clear scenario points.
pub fn CLEAR_SCENARIO_SPAWN_HISTORY() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(9135263378961769746)));
}
/// ignoreVehicle - bypasses vehicle check of the local player (it will not open if you are in a vehicle and this is set to false)
pub fn SET_SAVE_MENU_ACTIVE(ignoreVehicle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14537467669149777783)), ignoreVehicle);
}
pub fn GET_STATUS_OF_MANUAL_SAVE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(4142091203678808726)));
}
pub fn SET_CREDITS_ACTIVE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13346619697735426572)), toggle);
}
pub fn SET_CREDITS_FADE_OUT_WITH_SCREEN(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13050194468614014604)), toggle);
}
pub fn HAVE_CREDITS_REACHED_END() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(531175541629031354)));
}
pub fn ARE_CREDITS_RUNNING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(15103956213288718108)));
}
pub fn TERMINATE_ALL_SCRIPTS_WITH_THIS_NAME(scriptName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11369075285246167263)), scriptName);
}
pub fn NETWORK_SET_SCRIPT_IS_SAFE_FOR_NETWORK_GAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(10539472927263604816)));
}
/// Returns the index of the newly created hospital spawn point.
/// p3 might be radius?
pub fn ADD_HOSPITAL_RESTART(x: f32, y: f32, z: f32, p3: f32, p4: types.Any) c_int {
return nativeCaller.invoke5(@as(u64, @intCast(2253575497185647233)), x, y, z, p3, p4);
}
/// The game by default has 5 hospital respawn points. Disabling them all will cause the player to respawn at the last position they were.
pub fn DISABLE_HOSPITAL_RESTART(hospitalIndex: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14434978098343635880)), hospitalIndex, toggle);
}
pub fn ADD_POLICE_RESTART(p0: f32, p1: f32, p2: f32, p3: f32, p4: types.Any) c_int {
return nativeCaller.invoke5(@as(u64, @intCast(4983011394672786507)), p0, p1, p2, p3, p4);
}
/// Disables the spawn point at the police house on the specified index.
/// policeIndex: The police house index.
/// toggle: true to enable the spawn point, false to disable.
/// - Nacorpio
pub fn DISABLE_POLICE_RESTART(policeIndex: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2533378064742448803)), policeIndex, toggle);
}
/// Used to be known as _SET_CUSTOM_RESPAWN_POSITION
/// Used to be known as _SET_RESTART_CUSTOM_POSITION
pub fn SET_RESTART_COORD_OVERRIDE(x: f32, y: f32, z: f32, heading: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(8100672656602277475)), x, y, z, heading);
}
/// Used to be known as _SET_NEXT_RESPAWN_TO_CUSTOM
/// Used to be known as _CLEAR_RESTART_CUSTOM_POSITION
pub fn CLEAR_RESTART_COORD_OVERRIDE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(11705257030375616377)));
}
/// Used to be known as _DISABLE_AUTOMATIC_RESPAWN
pub fn PAUSE_DEATH_ARREST_RESTART(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3182695371859369073)), toggle);
}
pub fn IGNORE_NEXT_RESTART(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2449877097777288033)), toggle);
}
/// Sets whether the game should fade out after the player dies.
pub fn SET_FADE_OUT_AFTER_DEATH(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5339263777479621510)), toggle);
}
/// Sets whether the game should fade out after the player is arrested.
pub fn SET_FADE_OUT_AFTER_ARREST(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2164909536560850151)), toggle);
}
/// Sets whether the game should fade in after the player dies or is arrested.
pub fn SET_FADE_IN_AFTER_DEATH_ARREST(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15737497366831513362)), toggle);
}
pub fn SET_FADE_IN_AFTER_LOAD(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17570670087380241785)), toggle);
}
/// returns savehouseHandle
pub fn REGISTER_SAVE_HOUSE(x: f32, y: f32, z: f32, p3: f32, p4: [*c]const u8, p5: types.Any, p6: types.Any) c_int {
return nativeCaller.invoke7(@as(u64, @intCast(13866949435125058132)), x, y, z, p3, p4, p5, p6);
}
pub fn SET_SAVE_HOUSE(savehouseHandle: c_int, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(5716348497048196028)), savehouseHandle, p1, p2);
}
pub fn OVERRIDE_SAVE_HOUSE(p0: windows.BOOL, p1: f32, p2: f32, p3: f32, p4: f32, p5: windows.BOOL, p6: f32, p7: f32) windows.BOOL {
return nativeCaller.invoke8(@as(u64, @intCast(1252821528711679722)), p0, p1, p2, p3, p4, p5, p6, p7);
}
pub fn GET_SAVE_HOUSE_DETAILS_AFTER_SUCCESSFUL_LOAD(p0: [*c]types.Vector3, p1: [*c]f32, fadeInAfterLoad: [*c]windows.BOOL, p3: [*c]windows.BOOL) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(11862488420260115036)), p0, p1, fadeInAfterLoad, p3);
}
pub fn DO_AUTO_SAVE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(5831786413828533845)));
}
/// Returns true if profile setting 208 is equal to 0.
pub fn GET_IS_AUTO_SAVE_OFF() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(7927725541682606151)));
}
pub fn IS_AUTO_SAVE_IN_PROGRESS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(7576188390707304864)));
}
pub fn HAS_CODE_REQUESTED_AUTOSAVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(2380050660515190893)));
}
pub fn CLEAR_CODE_REQUESTED_AUTOSAVE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(452095636843837052)));
}
pub fn BEGIN_REPLAY_STATS(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16205358990659894630)), p0, p1);
}
pub fn ADD_REPLAY_STAT_VALUE(value: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7637662725905229289)), value);
}
pub fn END_REPLAY_STATS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(11690924755543172594)));
}
pub fn HAVE_REPLAY_STATS_BEEN_STORED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(15438957020084625078)));
}
pub fn GET_REPLAY_STAT_MISSION_ID() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(6566017576083353569)));
}
pub fn GET_REPLAY_STAT_MISSION_TYPE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(3126177645233230921)));
}
pub fn GET_REPLAY_STAT_COUNT() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(15893894299569039463)));
}
pub fn GET_REPLAY_STAT_AT_INDEX(index: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(9266377056264564248)), index);
}
pub fn CLEAR_REPLAY_STATS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(1953068219433474645)));
}
pub fn QUEUE_MISSION_REPEAT_LOAD() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8277143426242780341)));
}
/// Shows the screen which is visible before you redo a mission? The game will make a restoration point where you will cameback when the mission is over.
/// Returns 1 if the message isn't currently on screen
pub fn QUEUE_MISSION_REPEAT_SAVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(4945161046163939182)));
}
pub fn QUEUE_MISSION_REPEAT_SAVE_FOR_BENCHMARK_TEST() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(16942828672015332073)));
}
pub fn GET_STATUS_OF_MISSION_REPEAT_SAVE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(3124952982442144447)));
}
pub fn IS_MEMORY_CARD_IN_USE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9977107226443598557)));
}
pub fn SHOOT_SINGLE_BULLET_BETWEEN_COORDS(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, damage: c_int, p7: windows.BOOL, weaponHash: types.Hash, ownerPed: types.Ped, isAudible: windows.BOOL, isInvisible: windows.BOOL, speed: f32) void {
_ = nativeCaller.invoke13(@as(u64, @intCast(9689024882534281004)), x1, y1, z1, x2, y2, z2, damage, p7, weaponHash, ownerPed, isAudible, isInvisible, speed);
}
/// entity - entity to ignore
/// Used to be known as _SHOOT_SINGLE_BULLET_BETWEEN_COORDS_PRESET_PARAMS
pub fn SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, damage: c_int, p7: windows.BOOL, weaponHash: types.Hash, ownerPed: types.Ped, isAudible: windows.BOOL, isInvisible: windows.BOOL, speed: f32, entity: types.Entity, p14: types.Any) void {
_ = nativeCaller.invoke15(@as(u64, @intCast(16404207908830195595)), x1, y1, z1, x2, y2, z2, damage, p7, weaponHash, ownerPed, isAudible, isInvisible, speed, entity, p14);
}
/// entity - entity to ignore
/// targetEntity - entity to home in on, if the weapon hash provided supports homing
/// Used to be known as _SHOOT_SINGLE_BULLET_BETWEEN_COORDS_WITH_EXTRA_PARAMS
pub fn SHOOT_SINGLE_BULLET_BETWEEN_COORDS_IGNORE_ENTITY_NEW(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, damage: c_int, p7: windows.BOOL, weaponHash: types.Hash, ownerPed: types.Ped, isAudible: windows.BOOL, isInvisible: windows.BOOL, speed: f32, entity: types.Entity, p14: windows.BOOL, p15: windows.BOOL, targetEntity: types.Entity, p17: windows.BOOL, p18: types.Any, p19: types.Any, p20: types.Any) void {
_ = nativeCaller.invoke21(@as(u64, @intCast(13827587348164445770)), x1, y1, z1, x2, y2, z2, damage, p7, weaponHash, ownerPed, isAudible, isInvisible, speed, entity, p14, p15, targetEntity, p17, p18, p19, p20);
}
/// Gets the dimensions of a model.
/// Calculate (maximum - minimum) to get the size, in which case, Y will be how long the model is.
/// Example from the scripts: MISC::GET_MODEL_DIMENSIONS(ENTITY::GET_ENTITY_MODEL(PLAYER::PLAYER_PED_ID()), &v_1A, &v_17);
pub fn GET_MODEL_DIMENSIONS(modelHash: types.Hash, minimum: [*c]types.Vector3, maximum: [*c]types.Vector3) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(281707892607355002)), modelHash, minimum, maximum);
}
/// Sets a visually fake wanted level on the user interface. Used by Rockstar's scripts to "override" regular wanted levels and make custom ones while the real wanted level and multipliers are still in effect.
/// Max is 6, anything above this makes it just 6. Also the mini-map gets the red & blue flashing effect.
pub fn SET_FAKE_WANTED_LEVEL(fakeWantedLevel: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1465062155054416227)), fakeWantedLevel);
}
pub fn GET_FAKE_WANTED_LEVEL() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(5517638295545943838)));
}
pub fn USING_MISSION_CREATOR(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17386279386545571566)), toggle);
}
pub fn ALLOW_MISSION_CREATOR_WARP(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16042774062584529631)), toggle);
}
pub fn SET_MINIGAME_IN_PROGRESS(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1864505033887250523)), toggle);
}
pub fn IS_MINIGAME_IN_PROGRESS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(3119329762210804856)));
}
pub fn IS_THIS_A_MINIGAME_SCRIPT() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8876865746910642328)));
}
/// This function is hard-coded to always return 0.
pub fn IS_SNIPER_INVERTED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(7035250983925701156)));
}
/// Returns true if the game is using the metric measurement system (profile setting 227), false if imperial is used.
/// Used to be known as _IS_GAME_USING_METRIC_MEASUREMENT_SYSTEM
pub fn SHOULD_USE_METRIC_MEASUREMENTS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(15263074436821727123)));
}
pub fn GET_PROFILE_SETTING(profileSetting: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(14161849555513669521)), profileSetting);
}
pub fn ARE_STRINGS_EQUAL(string1: [*c]const u8, string2: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(887595790686087826)), string1, string2);
}
/// Compares two strings up to a specified number of characters.
/// Parameters:
/// str1 - String to be compared.
/// str2 - String to be compared.
/// matchCase - Comparison will be case-sensitive.
/// maxLength - Maximum number of characters to compare. A value of -1 indicates an infinite length.
/// Returns:
/// A value indicating the relationship between the strings:
/// <0 - The first non-matching character in 'str1' is less than the one in 'str2'. (e.g. 'A' < 'B', so result = -1)
/// 0 - The contents of both strings are equal.
/// >0 - The first non-matching character in 'str1' is less than the one in 'str2'. (e.g. 'B' > 'A', so result = 1)
/// Examples:
/// MISC::COMPARE_STRINGS("STRING", "string", false, -1); // 0; equal
/// MISC::COMPARE_STRINGS("TESTING", "test", false, 4); // 0; equal
/// MISC::COMPARE_STRINGS("R2D2", "R2xx", false, 2); // 0; equal
/// MISC::COMPARE_STRINGS("foo", "bar", false, -1); // 4; 'f' > 'b'
/// MISC::COMPARE_STRINGS("A", "A", true, 1); // 0; equal
/// When comparing case-sensitive strings, lower-case characters are greater than upper-case characters:
/// MISC::COMPARE_STRINGS("A", "a", true, 1); // -1; 'A' < 'a'
/// MISC::COMPARE_STRINGS("a", "A", true, 1); // 1; 'a' > 'A'
pub fn COMPARE_STRINGS(str1: [*c]const u8, str2: [*c]const u8, matchCase: windows.BOOL, maxLength: c_int) c_int {
return nativeCaller.invoke4(@as(u64, @intCast(2176488828314497259)), str1, str2, matchCase, maxLength);
}
pub fn ABSI(value: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(17353243276582801287)), value);
}
pub fn ABSF(value: f32) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(8346714922768581461)), value);
}
/// Determines whether there is a sniper bullet within the specified coordinates. The coordinates form an axis-aligned bounding box.
pub fn IS_SNIPER_BULLET_IN_AREA(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(18373825678050619685)), x1, y1, z1, x2, y2, z2);
}
/// Determines whether there is a projectile within the specified coordinates. The coordinates form a rectangle.
/// - Nacorpio
/// ownedByPlayer = only projectiles fired by the player will be detected.
pub fn IS_PROJECTILE_IN_AREA(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, ownedByPlayer: windows.BOOL) windows.BOOL {
return nativeCaller.invoke7(@as(u64, @intCast(5940433707723179000)), x1, y1, z1, x2, y2, z2, ownedByPlayer);
}
/// Determines whether there is a projectile of a specific type within the specified coordinates. The coordinates form a axis-aligned bounding box.
pub fn IS_PROJECTILE_TYPE_IN_AREA(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, @"type": c_int, ownedByPlayer: windows.BOOL) windows.BOOL {
return nativeCaller.invoke8(@as(u64, @intCast(3318523262566943341)), x1, y1, z1, x2, y2, z2, @"type", ownedByPlayer);
}
/// See IS_POINT_IN_ANGLED_AREA for the definition of an angled area.
pub fn IS_PROJECTILE_TYPE_IN_ANGLED_AREA(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, width: f32, p7: types.Any, ownedByPlayer: windows.BOOL) windows.BOOL {
return nativeCaller.invoke9(@as(u64, @intCast(17346759931086364320)), x1, y1, z1, x2, y2, z2, width, p7, ownedByPlayer);
}
/// Used to be known as _IS_PROJECTILE_TYPE_IN_RADIUS
pub fn IS_PROJECTILE_TYPE_WITHIN_DISTANCE(x: f32, y: f32, z: f32, projectileHash: types.Hash, radius: f32, ownedByPlayer: windows.BOOL) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(3760934030850953138)), x, y, z, projectileHash, radius, ownedByPlayer);
}
/// Used to be known as _GET_IS_PROJECTILE_TYPE_IN_AREA
pub fn GET_COORDS_OF_PROJECTILE_TYPE_IN_AREA(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, projectileHash: types.Hash, projectilePos: [*c]types.Vector3, ownedByPlayer: windows.BOOL) windows.BOOL {
return nativeCaller.invoke9(@as(u64, @intCast(10194535389182552645)), x1, y1, z1, x2, y2, z2, projectileHash, projectilePos, ownedByPlayer);
}
pub fn GET_COORDS_OF_PROJECTILE_TYPE_IN_ANGLED_AREA(vecAngledAreaPoint1X: f32, vecAngledAreaPoint1Y: f32, vecAngledAreaPoint1Z: f32, vecAngledAreaPoint2X: f32, vecAngledAreaPoint2Y: f32, vecAngledAreaPoint2Z: f32, distanceOfOppositeFace: f32, weaponType: types.Hash, positionOut: [*c]types.Vector3, bIsPlayer: windows.BOOL) windows.BOOL {
return nativeCaller.invoke10(@as(u64, @intCast(4443014901483842797)), vecAngledAreaPoint1X, vecAngledAreaPoint1Y, vecAngledAreaPoint1Z, vecAngledAreaPoint2X, vecAngledAreaPoint2Y, vecAngledAreaPoint2Z, distanceOfOppositeFace, weaponType, positionOut, bIsPlayer);
}
/// Used to be known as _GET_PROJECTILE_NEAR_PED_COORDS
pub fn GET_COORDS_OF_PROJECTILE_TYPE_WITHIN_DISTANCE(ped: types.Ped, weaponHash: types.Hash, distance: f32, outCoords: [*c]types.Vector3, p4: windows.BOOL) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(16119530470897449857)), ped, weaponHash, distance, outCoords, p4);
}
/// Used to be known as _GET_PROJECTILE_NEAR_PED
pub fn GET_PROJECTILE_OF_PROJECTILE_TYPE_WITHIN_DISTANCE(ped: types.Ped, weaponHash: types.Hash, distance: f32, outCoords: [*c]types.Vector3, outProjectile: [*c]types.Object, p5: windows.BOOL) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(9438953992511352388)), ped, weaponHash, distance, outCoords, outProjectile, p5);
}
/// For projectiles, see: IS_PROJECTILE_TYPE_IN_ANGLED_AREA
/// See IS_POINT_IN_ANGLED_AREA for the definition of an angled area.
/// Returns True if a bullet, as maintained by a pool within CWeaponManager, has been fired into the defined angled area.
pub fn IS_BULLET_IN_ANGLED_AREA(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, width: f32, ownedByPlayer: windows.BOOL) windows.BOOL {
return nativeCaller.invoke8(@as(u64, @intCast(1912727178083218551)), x1, y1, z1, x2, y2, z2, width, ownedByPlayer);
}
pub fn IS_BULLET_IN_AREA(x: f32, y: f32, z: f32, radius: f32, ownedByPlayer: windows.BOOL) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(4548674766278827039)), x, y, z, radius, ownedByPlayer);
}
pub fn IS_BULLET_IN_BOX(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, ownedByPlayer: windows.BOOL) windows.BOOL {
return nativeCaller.invoke7(@as(u64, @intCast(16001128347410330449)), x1, y1, z1, x2, y2, z2, ownedByPlayer);
}
/// p3 - possibly radius?
pub fn HAS_BULLET_IMPACTED_IN_AREA(x: f32, y: f32, z: f32, p3: f32, p4: windows.BOOL, p5: windows.BOOL) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(10984469687502965141)), x, y, z, p3, p4, p5);
}
pub fn HAS_BULLET_IMPACTED_IN_BOX(p0: f32, p1: f32, p2: f32, p3: f32, p4: f32, p5: f32, p6: windows.BOOL, p7: windows.BOOL) windows.BOOL {
return nativeCaller.invoke8(@as(u64, @intCast(15892179976513618836)), p0, p1, p2, p3, p4, p5, p6, p7);
}
/// PS4
pub fn IS_ORBIS_VERSION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(12045933518223659422)));
}
/// XBOX ONE
pub fn IS_DURANGO_VERSION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(5591266057893987373)));
}
pub fn IS_XBOX360_VERSION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(17735205353054153373)));
}
pub fn IS_PS3_VERSION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14745074541249205954)));
}
pub fn IS_PC_VERSION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(5237464558608994872)));
}
pub fn IS_STEAM_VERSION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(731749959898984809)));
}
/// Used to block some of the prostitute stuff due to laws in Australia.
pub fn IS_AUSSIE_VERSION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(11464253468675555336)));
}
/// Used to be known as _IS_JAPANESE_VERSION
pub fn IS_JAPANESE_VERSION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(13312846613327609267)));
}
pub fn IS_XBOX_PLATFORM() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(1406945842121809747)));
}
/// Xbox Series (Scarlett) version...
pub fn IS_SCARLETT_VERSION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14214955939797842740)));
}
pub fn IS_SCE_PLATFORM() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(17947379520926090520)));
}
/// PS5 (Prospero) version...
pub fn IS_PROSPERO_VERSION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9257921005951395026)));
}
pub fn IS_STRING_NULL(string: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(17450160236712865894)), string);
}
pub fn IS_STRING_NULL_OR_EMPTY(string: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14556807627007080597)), string);
}
/// Returns false if it's a null or empty string or if the string is too long. outInteger will be set to -999 in that case.
/// If all checks have passed successfully, the return value will be set to whatever strtol(string, 0i64, 10); returns.
pub fn STRING_TO_INT(string: [*c]const u8, outInteger: [*c]c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(6511995047536145796)), string, outInteger);
}
pub fn SET_BITS_IN_RANGE(@"var": [*c]c_int, rangeStart: c_int, rangeEnd: c_int, p3: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(10299870978336711149)), @"var", rangeStart, rangeEnd, p3);
}
pub fn GET_BITS_IN_RANGE(@"var": c_int, rangeStart: c_int, rangeEnd: c_int) c_int {
return nativeCaller.invoke3(@as(u64, @intCast(5986841242682558778)), @"var", rangeStart, rangeEnd);
}
/// See description of `ADD_STUNT_JUMP_ANGLED` for detailed info. The only difference really is this one does not have the radius (or angle, not sure) floats parameters for entry and landing zones.
pub fn ADD_STUNT_JUMP(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, x3: f32, y3: f32, z3: f32, x4: f32, y4: f32, z4: f32, camX: f32, camY: f32, camZ: f32, p15: c_int, p16: c_int, p17: c_int) c_int {
return nativeCaller.invoke18(@as(u64, @intCast(1916613292774941452)), x1, y1, z1, x2, y2, z2, x3, y3, z3, x4, y4, z4, camX, camY, camZ, p15, p16, p17);
}
/// Creates a new stunt jump.
/// The radius1 and radius2 might actually not be a radius at all, but that's what it seems to me testing them in-game. But they may be 'angle' floats instead, considering this native is named ADD_STUNT_JUMP_**ANGLED**.
/// Info about the specific 'parameter sections':
/// **x1, y1, z1, x2, y2, z2 and radius1:**
/// First coordinates are for the jump entry area, and the radius that will be checked around that area. So if you're not exactly within the coordinates, but you are within the outter radius limit then it will still register as entering the stunt jump. Note as mentioned above, the radius is just a guess, I'm not really sure about it's exact purpose.
/// **x3, y3, z3, x4, y4, z4 and radius2:**
/// Next part is the landing area, again starting with the left bottom (nearest to the stunt jump entry zone) coordinate, and the second one being the top right furthest away part of the landing area. Followed by another (most likely) radius float, this is usually slightly larger than the entry zone 'radius' float value, just because you have quite a lot of places where you can land (I'm guessing).
/// **camX, camY and camZ:**
/// The final coordinate in this native is the Camera position. Rotation and zoom/FOV is managed by the game itself, you just need to provide the camera location.
/// **unk1, unk2 and unk3:**
/// Not sure what these are for, but they're always `150, 0, 0` in decompiled scripts.
/// Here is a list of almost all of the stunt jumps from GTA V (taken from decompiled scripts): https://pastebin.com/EW1jBPkY
pub fn ADD_STUNT_JUMP_ANGLED(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, radius1: f32, x3: f32, y3: f32, z3: f32, x4: f32, y4: f32, z4: f32, radius2: f32, camX: f32, camY: f32, camZ: f32, p17: c_int, p18: c_int, p19: c_int) c_int {
return nativeCaller.invoke20(@as(u64, @intCast(13539465364927548607)), x1, y1, z1, x2, y2, z2, radius1, x3, y3, z3, x4, y4, z4, radius2, camX, camY, camZ, p17, p18, p19);
}
/// Toggles some stunt jump stuff.
pub fn TOGGLE_SHOW_OPTIONAL_STUNT_JUMP_CAMERA(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18122673095757980093)), toggle);
}
pub fn DELETE_STUNT_JUMP(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15875610902764826143)), p0);
}
pub fn ENABLE_STUNT_JUMP_SET(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16386810654977581078)), p0);
}
pub fn DISABLE_STUNT_JUMP_SET(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11900531937640925174)), p0);
}
pub fn SET_STUNT_JUMPS_CAN_TRIGGER(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15533343274177648095)), toggle);
}
pub fn IS_STUNT_JUMP_IN_PROGRESS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8808787365159830821)));
}
pub fn IS_STUNT_JUMP_MESSAGE_SHOWING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(2482240551046425076)));
}
pub fn GET_NUM_SUCCESSFUL_STUNT_JUMPS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(11055723428323463176)));
}
pub fn GET_TOTAL_SUCCESSFUL_STUNT_JUMPS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(7518456375581089444)));
}
pub fn CANCEL_STUNT_JUMP() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(16624950805814097758)));
}
/// Make sure to call this from the correct thread if you're using multiple threads because all other threads except the one which is calling SET_GAME_PAUSED will be paused which means you will lose control and the game remains in paused mode until you exit GTA5.exe
pub fn SET_GAME_PAUSED(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6304215415132731153)), toggle);
}
pub fn SET_THIS_SCRIPT_CAN_BE_PAUSED(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12265866338236823471)), toggle);
}
pub fn SET_THIS_SCRIPT_CAN_REMOVE_BLIPS_CREATED_BY_ANY_SCRIPT(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13367306888133146775)), toggle);
}
/// This native appears on the cheat_controller script and tracks a combination of buttons, which may be used to toggle cheats in-game. Credits to ThreeSocks for the info. The hash contains the combination, while the "amount" represents the amount of buttons used in a combination. The following page can be used to make a button combination: gta5offset.com/ts/hash/
/// INT_SCORES_SCORTED was a hash collision
/// Used to be known as _HAS_BUTTON_COMBINATION_JUST_BEEN_ENTERED
pub fn HAS_CHEAT_WITH_HASH_BEEN_ACTIVATED(hash: types.Hash, amount: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(512894152345136528)), hash, amount);
}
/// Get inputted "Cheat code", for example:
/// while (TRUE)
/// {
/// if (MISC::HAS_PC_CHEAT_WITH_HASH_BEEN_ACTIVATED(${fugitive}))
/// {
/// // Do something.
/// }
/// SYSTEM::WAIT(0);
/// }
/// Calling this will also set the last saved string hash to zero.
/// Used to be known as _HAS_CHEAT_STRING_JUST_BEEN_ENTERED
pub fn HAS_PC_CHEAT_WITH_HASH_BEEN_ACTIVATED(hash: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6160435850588389544)), hash);
}
pub fn OVERRIDE_FREEZE_FLAGS(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18032407474518263971)), p0);
}
/// Formerly known as _LOWER_MAP_PROP_DENSITY and wrongly due to idiots as _ENABLE_MP_DLC_MAPS.
/// Sets the maximum prop density and changes a loading screen flag from 'loading story mode' to 'loading GTA Online'. Does not touch DLC map data at all.
/// In fact, I doubt this changes the flag whatsoever, that's the OTHER native idiots use together with this that does so, this one only causes a loading screen to show as it reloads map data.
/// Used to be known as _ENABLE_MP_DLC_MAPS
/// Used to be known as _USE_FREEMODE_MAP_BEHAVIOR
/// Used to be known as _LOWER_MAP_PROP_DENSITY
pub fn SET_INSTANCE_PRIORITY_MODE(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11218003581167595640)), p0);
}
/// Sets an unknown flag used by CScene in determining which entities from CMapData scene nodes to draw, similar to SET_INSTANCE_PRIORITY_MODE.
/// Used to be known as _SET_UNK_MAP_FLAG
pub fn SET_INSTANCE_PRIORITY_HINT(flag: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14263085750709084622)), flag);
}
/// This function is hard-coded to always return 0.
pub fn IS_FRONTEND_FADING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9125056660290447085)));
}
/// spawns a few distant/out-of-sight peds, vehicles, animals etc each time it is called
pub fn POPULATE_NOW() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(8390974832148959038)));
}
pub fn GET_INDEX_OF_CURRENT_LEVEL() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(14676500190617269500)));
}
/// level can be from 0 to 3
/// 0: 9.8 - normal
/// 1: 2.4 - low
/// 2: 0.1 - very low
/// 3: 0.0 - off
pub fn SET_GRAVITY_LEVEL(level: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8362644625630176081)), level);
}
pub fn START_SAVE_DATA(p0: [*c]types.Any, p1: types.Any, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(12202326723784243607)), p0, p1, p2);
}
pub fn STOP_SAVE_DATA() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(8422308071220143869)));
}
pub fn GET_SIZE_OF_SAVE_DATA(p0: windows.BOOL) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(11574120668225226783)), p0);
}
pub fn REGISTER_INT_TO_SAVE(p0: [*c]types.Any, name: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3803833428561200149)), p0, name);
}
/// Used to be known as _REGISTER_INT64_TO_SAVE
pub fn REGISTER_INT64_TO_SAVE(p0: [*c]types.Any, name: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12048594911913791136)), p0, name);
}
pub fn REGISTER_ENUM_TO_SAVE(p0: [*c]types.Any, name: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1207803046896150689)), p0, name);
}
pub fn REGISTER_FLOAT_TO_SAVE(p0: [*c]types.Any, name: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8984332293923274427)), p0, name);
}
pub fn REGISTER_BOOL_TO_SAVE(p0: [*c]types.Any, name: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14480219678871926177)), p0, name);
}
pub fn REGISTER_TEXT_LABEL_TO_SAVE(p0: [*c]types.Any, name: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17127509531294361135)), p0, name);
}
/// MISC::REGISTER_TEXT_LABEL_15_TO_SAVE(&a_0._f1, "tlPlateText");
/// MISC::REGISTER_TEXT_LABEL_15_TO_SAVE(&a_0._f1C, "tlPlateText_pending");
/// MISC::REGISTER_TEXT_LABEL_15_TO_SAVE(&a_0._f10B, "tlCarAppPlateText");
/// Used to be known as _REGISTER_TEXT_LABEL_TO_SAVE_2
pub fn REGISTER_TEXT_LABEL_15_TO_SAVE(p0: [*c]types.Any, name: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8032052229897397557)), p0, name);
}
/// Only found 3 times in decompiled scripts.
/// MISC::REGISTER_TEXT_LABEL_23_TO_SAVE(a_0, "Movie_Name_For_This_Player");
/// MISC::REGISTER_TEXT_LABEL_23_TO_SAVE(&a_0._fB, "Ringtone_For_This_Player");
/// MISC::REGISTER_TEXT_LABEL_23_TO_SAVE(&a_0._f1EC4._f12[v_A/*6*/], &v_13); // where v_13 is "MPATMLOGSCRS0" thru "MPATMLOGSCRS15"
pub fn REGISTER_TEXT_LABEL_23_TO_SAVE(p0: [*c]types.Any, name: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5255816378581928940)), p0, name);
}
/// Only found 2 times in decompiled scripts.
/// MISC::REGISTER_TEXT_LABEL_31_TO_SAVE(&a_0._f1F5A._f6[0/*8*/], "TEMPSTAT_LABEL"); // gets saved in a struct called "g_SaveData_STRING_ScriptSaves"
/// MISC::REGISTER_TEXT_LABEL_31_TO_SAVE(&a_0._f4B4[v_1A/*8*/], &v_5); // where v_5 is "Name0" thru "Name9", gets saved in a struct called "OUTFIT_Name"
pub fn REGISTER_TEXT_LABEL_31_TO_SAVE(p0: [*c]types.Any, name: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9397184413055140088)), p0, name);
}
/// MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(a_0, "Thumb_label");
/// MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(&a_0._f10, "Photo_label");
/// MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(a_0, "GXTlabel");
/// MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(&a_0._f21, "StringComp");
/// MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(&a_0._f43, "SecondStringComp");
/// MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(&a_0._f53, "ThirdStringComp");
/// MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(&a_0._f32, "SenderStringComp");
/// MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(&a_0._f726[v_1A/*16*/], &v_20); // where v_20 is "LastJobTL_0_1" thru "LastJobTL_2_1", gets saved in a struct called "LAST_JobGamer_TL"
/// MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(&a_0._f4B, "PAID_PLAYER");
/// MISC::REGISTER_TEXT_LABEL_63_TO_SAVE(&a_0._f5B, "RADIO_STATION");
pub fn REGISTER_TEXT_LABEL_63_TO_SAVE(p0: [*c]types.Any, name: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18060657090312963939)), p0, name);
}
/// Used to be known as _START_SAVE_STRUCT
pub fn START_SAVE_STRUCT_WITH_SIZE(p0: [*c]types.Any, size: c_int, structName: [*c]const u8) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(13795499829391780573)), p0, size, structName);
}
pub fn STOP_SAVE_STRUCT() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(16940137024818224914)));
}
/// Used to be known as _START_SAVE_ARRAY
pub fn START_SAVE_ARRAY_WITH_SIZE(p0: [*c]types.Any, size: c_int, arrayName: [*c]const u8) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(6989118770651443101)), p0, size, arrayName);
}
pub fn STOP_SAVE_ARRAY() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(307774835641838564)));
}
/// Used to be known as _COPY_MEMORY
pub fn COPY_SCRIPT_STRUCT(dst: [*c]types.Any, src: [*c]types.Any, size: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2394484724246226860)), dst, src, size);
}
/// https://alloc8or.re/gta5/doc/enums/DispatchType.txt
pub fn ENABLE_DISPATCH_SERVICE(dispatchService: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15857035167618947158)), dispatchService, toggle);
}
pub fn BLOCK_DISPATCH_SERVICE_RESOURCE_CREATION(dispatchService: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11181263008756394543)), dispatchService, toggle);
}
/// Used to be known as _GET_NUMBER_OF_DISPATCHED_UNITS_FOR_PLAYER
/// Used to be known as _GET_NUM_DISPATCHED_UNITS_FOR_PLAYER
pub fn GET_NUMBER_RESOURCES_ALLOCATED_TO_WANTED_LEVEL(dispatchService: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(16954377136050018071)), dispatchService);
}
/// As for the 'police' incident, it will call police cars to you, but unlike PedsInCavalcades & Merryweather they won't start shooting at you unless you shoot first or shoot at them. The top 2 however seem to cancel theirselves if there is noone dead around you or a fire. I only figured them out as I found out the 3rd param is definately the amountOfPeople and they called incident 3 in scripts with 4 people (which the firetruck has) and incident 5 with 2 people (which the ambulence has). The 4 param I cant say is radius, but for the pedsInCavalcades and Merryweather R* uses 0.0f and for the top 3 (Emergency Services) they use 3.0f.
/// Side Note: It seems calling the pedsInCavalcades or Merryweather then removing it seems to break you from calling the EmergencyEvents and I also believe pedsInCavalcades. (The V cavalcades of course not IV).
/// Side Note 2: I say it breaks as if you call this proper,
/// if(CREATE_INCIDENT) etc it will return false if you do as I said above.
/// =====================================================
pub fn CREATE_INCIDENT(dispatchService: c_int, x: f32, y: f32, z: f32, numUnits: c_int, radius: f32, outIncidentID: [*c]c_int, p7: types.Any, p8: types.Any) windows.BOOL {
return nativeCaller.invoke9(@as(u64, @intCast(4578239628062247655)), dispatchService, x, y, z, numUnits, radius, outIncidentID, p7, p8);
}
/// As for the 'police' incident, it will call police cars to you, but unlike PedsInCavalcades & Merryweather they won't start shooting at you unless you shoot first or shoot at them. The top 2 however seem to cancel theirselves if there is noone dead around you or a fire. I only figured them out as I found out the 3rd param is definately the amountOfPeople and they called incident 3 in scripts with 4 people (which the firetruck has) and incident 5 with 2 people (which the ambulence has). The 4 param I cant say is radius, but for the pedsInCavalcades and Merryweather R* uses 0.0f and for the top 3 (Emergency Services) they use 3.0f.
/// Side Note: It seems calling the pedsInCavalcades or Merryweather then removing it seems to break you from calling the EmergencyEvents and I also believe pedsInCavalcades. (The V cavalcades of course not IV).
/// Side Note 2: I say it breaks as if you call this proper,
/// if(CREATE_INCIDENT) etc it will return false if you do as I said above.
/// =====================================================
pub fn CREATE_INCIDENT_WITH_ENTITY(dispatchService: c_int, ped: types.Ped, numUnits: c_int, radius: f32, outIncidentID: [*c]c_int, p5: types.Any, p6: types.Any) windows.BOOL {
return nativeCaller.invoke7(@as(u64, @intCast(403129834911911520)), dispatchService, ped, numUnits, radius, outIncidentID, p5, p6);
}
/// Delete an incident with a given id.
/// =======================================================
/// Correction, I have change this to int, instead of int*
/// as it doesn't use a pointer to the createdIncident.
/// If you try it you will crash (or) freeze.
/// =======================================================
pub fn DELETE_INCIDENT(incidentId: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6155324075688698375)), incidentId);
}
/// =======================================================
/// Correction, I have change this to int, instead of int*
/// as it doesn't use a pointer to the createdIncident.
/// If you try it you will crash (or) freeze.
/// =======================================================
pub fn IS_INCIDENT_VALID(incidentId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14464546474843291306)), incidentId);
}
pub fn SET_INCIDENT_REQUESTED_UNITS(incidentId: c_int, dispatchService: c_int, numUnits: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(12721408736823327292)), incidentId, dispatchService, numUnits);
}
/// Used to be known as _SET_INCIDENT_UNK
pub fn SET_IDEAL_SPAWN_DISTANCE_FOR_INCIDENT(incidentId: c_int, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15159602598280527986)), incidentId, p1);
}
/// Finds a position ahead of the player by predicting the players next actions.
/// The positions match path finding node positions.
/// When roads diverge, the position may rapidly change between two or more positions. This is due to the engine not being certain of which path the player will take.
pub fn FIND_SPAWN_POINT_IN_DIRECTION(posX: f32, posY: f32, posZ: f32, fwdVecX: f32, fwdVecY: f32, fwdVecZ: f32, distance: f32, spawnPoint: [*c]types.Vector3) windows.BOOL {
return nativeCaller.invoke8(@as(u64, @intCast(7526889474430343538)), posX, posY, posZ, fwdVecX, fwdVecY, fwdVecZ, distance, spawnPoint);
}
pub fn ADD_POP_MULTIPLIER_AREA(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, p6: f32, p7: f32, p8: windows.BOOL, p9: windows.BOOL) c_int {
return nativeCaller.invoke10(@as(u64, @intCast(7491246761267224973)), x1, y1, z1, x2, y2, z2, p6, p7, p8, p9);
}
pub fn DOES_POP_MULTIPLIER_AREA_EXIST(id: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1380321393899911918)), id);
}
pub fn REMOVE_POP_MULTIPLIER_AREA(id: c_int, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12765985615085675711)), id, p1);
}
/// Used to be known as _IS_POP_MULTIPLIER_AREA_UNK
pub fn IS_POP_MULTIPLIER_AREA_NETWORKED(id: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1374429882756406499)), id);
}
/// This native is adding a zone, where you can change density settings. For example, you can add a zone on 0.0, 0.0, 0.0 with radius 900.0 and vehicleMultiplier 0.0, and you will not see any new population vehicle spawned in a radius of 900.0 from 0.0, 0.0, 0.0. Returns the id. You can have only 15 zones at the same time. You can remove zone using REMOVE_POP_MULTIPLIER_SPHERE
pub fn ADD_POP_MULTIPLIER_SPHERE(x: f32, y: f32, z: f32, radius: f32, pedMultiplier: f32, vehicleMultiplier: f32, p6: windows.BOOL, p7: windows.BOOL) c_int {
return nativeCaller.invoke8(@as(u64, @intCast(3659077840428212096)), x, y, z, radius, pedMultiplier, vehicleMultiplier, p6, p7);
}
pub fn DOES_POP_MULTIPLIER_SPHERE_EXIST(id: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1665117673899657716)), id);
}
/// Removes population multiplier sphere
pub fn REMOVE_POP_MULTIPLIER_SPHERE(id: c_int, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16611135717234385923)), id, p1);
}
/// Makes the ped jump around like they're in a tennis match
pub fn ENABLE_TENNIS_MODE(ped: types.Ped, toggle: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2927422500758616230)), ped, toggle, p2);
}
pub fn IS_TENNIS_MODE(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6725134082481130559)), ped);
}
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
pub fn PLAY_TENNIS_SWING_ANIM(ped: types.Ped, animDict: [*c]const u8, animName: [*c]const u8, p3: f32, p4: f32, p5: windows.BOOL) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(16313987435599963348)), ped, animDict, animName, p3, p4, p5);
}
pub fn GET_TENNIS_SWING_ANIM_COMPLETE(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1720208855854118904)), ped);
}
pub fn GET_TENNIS_SWING_ANIM_CAN_BE_INTERRUPTED(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1855462174485675081)), ped);
}
pub fn GET_TENNIS_SWING_ANIM_SWUNG(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16815047366265780587)), ped);
}
pub fn PLAY_TENNIS_DIVE_ANIM(ped: types.Ped, p1: c_int, p2: f32, p3: f32, p4: f32, p5: windows.BOOL) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(10352020927949555275)), ped, p1, p2, p3, p4, p5);
}
/// From the scripts:
/// MISC::SET_TENNIS_MOVE_NETWORK_SIGNAL_FLOAT(sub_aa49(a_0), "ForcedStopDirection", v_E);
/// Related to tennis mode.
pub fn SET_TENNIS_MOVE_NETWORK_SIGNAL_FLOAT(ped: types.Ped, p1: [*c]const u8, p2: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(6120769989020104738)), ped, p1, p2);
}
/// Used to be known as _RESET_DISPATCH_SPAWN_LOCATION
pub fn RESET_DISPATCH_SPAWN_LOCATION() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(6383556416858465505)));
}
pub fn SET_DISPATCH_SPAWN_LOCATION(x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(15064334183716367696)), x, y, z);
}
pub fn RESET_DISPATCH_IDEAL_SPAWN_DISTANCE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(8622216433203350037)));
}
pub fn SET_DISPATCH_IDEAL_SPAWN_DISTANCE(distance: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8063133996428612643)), distance);
}
pub fn RESET_DISPATCH_TIME_BETWEEN_SPAWN_ATTEMPTS(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16946395358004597939)), p0);
}
pub fn SET_DISPATCH_TIME_BETWEEN_SPAWN_ATTEMPTS(p0: types.Any, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4969664746815173245)), p0, p1);
}
pub fn SET_DISPATCH_TIME_BETWEEN_SPAWN_ATTEMPTS_MULTIPLIER(p0: types.Any, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5225177057813206481)), p0, p1);
}
/// To remove, see: REMOVE_DISPATCH_SPAWN_BLOCKING_AREA
/// See IS_POINT_IN_ANGLED_AREA for the definition of an angled area.
/// Used to be known as _ADD_DISPATCH_SPAWN_BLOCKING_ANGLED_AREA
pub fn ADD_DISPATCH_SPAWN_ANGLED_BLOCKING_AREA(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, width: f32) c_int {
return nativeCaller.invoke7(@as(u64, @intCast(10487893066247279243)), x1, y1, z1, x2, y2, z2, width);
}
/// Used to be known as _ADD_DISPATCH_SPAWN_BLOCKING_AREA
pub fn ADD_DISPATCH_SPAWN_SPHERE_BLOCKING_AREA(x1: f32, y1: f32, x2: f32, y2: f32) c_int {
return nativeCaller.invoke4(@as(u64, @intCast(3261267976065129897)), x1, y1, x2, y2);
}
pub fn REMOVE_DISPATCH_SPAWN_BLOCKING_AREA(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2759231624002622373)), p0);
}
pub fn RESET_DISPATCH_SPAWN_BLOCKING_AREAS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(12428806168733018741)));
}
pub fn RESET_WANTED_RESPONSE_NUM_PEDS_TO_SPAWN() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(15705902186664072488)));
}
pub fn SET_WANTED_RESPONSE_NUM_PEDS_TO_SPAWN(p0: c_int, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16515522381597580111)), p0, p1);
}
/// Used to be known as _ADD_TACTICAL_ANALYSIS_POINT
pub fn ADD_TACTICAL_NAV_MESH_POINT(x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(13290707474624298998)), x, y, z);
}
/// Used to be known as _CLEAR_TACTICAL_ANALYSIS_POINTS
pub fn CLEAR_TACTICAL_NAV_MESH_POINTS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(12956109339009853522)));
}
/// Activates (usused?) riot mode. All NPCs are being hostile to each other (including player). Also the game will give weapons (pistols, smgs) to random NPCs.
pub fn SET_RIOT_MODE_ENABLED(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2704311021531429599)), toggle);
}
/// Used to be known as _DISPLAY_ONSCREEN_KEYBOARD_2
pub fn DISPLAY_ONSCREEN_KEYBOARD_WITH_LONGER_INITIAL_STRING(p0: c_int, windowTitle: [*c]const u8, p2: [*c]types.Any, defaultText: [*c]const u8, defaultConcat1: [*c]const u8, defaultConcat2: [*c]const u8, defaultConcat3: [*c]const u8, defaultConcat4: [*c]const u8, defaultConcat5: [*c]const u8, defaultConcat6: [*c]const u8, defaultConcat7: [*c]const u8, maxInputLength: c_int) void {
_ = nativeCaller.invoke12(@as(u64, @intCast(14589639279881065214)), p0, windowTitle, p2, defaultText, defaultConcat1, defaultConcat2, defaultConcat3, defaultConcat4, defaultConcat5, defaultConcat6, defaultConcat7, maxInputLength);
}
/// sfink: note, p0 is set to 6 for PC platform in at least 1 script, or to `unk::_get_ui_language_id() == 0` otherwise.
/// NOTE: windowTitle uses text labels, and an invalid value will display nothing.
/// www.gtaforums.com/topic/788343-vrel-script-hook-v/?p=1067380474
/// windowTitle's
/// -----------------
/// CELL_EMAIL_BOD = "Enter your Eyefind message"
/// CELL_EMAIL_BODE = "Message too long. Try again"
/// CELL_EMAIL_BODF = "Forbidden message. Try again"
/// CELL_EMAIL_SOD = "Enter your Eyefind subject"
/// CELL_EMAIL_SODE = "Subject too long. Try again"
/// CELL_EMAIL_SODF = "Forbidden text. Try again"
/// CELL_EMASH_BOD = "Enter your Eyefind message"
/// CELL_EMASH_BODE = "Message too long. Try again"
/// CELL_EMASH_BODF = "Forbidden message. Try again"
/// CELL_EMASH_SOD = "Enter your Eyefind subject"
/// CELL_EMASH_SODE = "Subject too long. Try again"
/// CELL_EMASH_SODF = "Forbidden Text. Try again"
/// FMMC_KEY_TIP10 = "Enter Synopsis"
/// FMMC_KEY_TIP12 = "Enter Custom Team Name"
/// FMMC_KEY_TIP12F = "Forbidden Text. Try again"
/// FMMC_KEY_TIP12N = "Custom Team Name"
/// FMMC_KEY_TIP8 = "Enter Message"
/// FMMC_KEY_TIP8F = "Forbidden Text. Try again"
/// FMMC_KEY_TIP8FS = "Invalid Message. Try again"
/// FMMC_KEY_TIP8S = "Enter Message"
/// FMMC_KEY_TIP9 = "Enter Outfit Name"
/// FMMC_KEY_TIP9F = "Invalid Outfit Name. Try again"
/// FMMC_KEY_TIP9N = "Outfit Name"
/// PM_NAME_CHALL = "Enter Challenge Name"
pub fn DISPLAY_ONSCREEN_KEYBOARD(p0: c_int, windowTitle: [*c]const u8, p2: [*c]const u8, defaultText: [*c]const u8, defaultConcat1: [*c]const u8, defaultConcat2: [*c]const u8, defaultConcat3: [*c]const u8, maxInputLength: c_int) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(62068802110151670)), p0, windowTitle, p2, defaultText, defaultConcat1, defaultConcat2, defaultConcat3, maxInputLength);
}
/// Returns the current status of the onscreen keyboard, and updates the output.
/// Status Codes:
/// -1: Keyboard isn't active
/// 0: User still editing
/// 1: User has finished editing
/// 2: User has canceled editing
pub fn UPDATE_ONSCREEN_KEYBOARD() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(933008831334139310)));
}
/// Returns NULL unless UPDATE_ONSCREEN_KEYBOARD() returns 1 in the same tick.
pub fn GET_ONSCREEN_KEYBOARD_RESULT() [*c]const u8 {
return nativeCaller.invoke0(@as(u64, @intCast(9467323548894312007)));
}
/// DO NOT use this as it doesn't clean up the text input box properly and your script will get stuck in the UPDATE_ONSCREEN_KEYBOARD() loop.
/// Use FORCE_CLOSE_TEXT_INPUT_BOX instead.
/// Used to be known as _CANCEL_ONSCREEN_KEYBOARD
pub fn CANCEL_ONSCREEN_KEYBOARD() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(6387120106938210765)));
}
/// p0 was always 2 in R* scripts.
/// Called before calling DISPLAY_ONSCREEN_KEYBOARD if the input needs to be saved.
pub fn NEXT_ONSCREEN_KEYBOARD_RESULT_WILL_DISPLAY_USING_THESE_FONTS(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4526473369584690706)), p0);
}
/// Appears to remove stealth kill action from memory
/// Used to be known as _REMOVE_STEALTH_KILL
pub fn ACTION_MANAGER_ENABLE_ACTION(hash: types.Hash, enable: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12006923410386814398)), hash, enable);
}
/// GET_GAME_TIMER() / 1000
pub fn GET_REAL_WORLD_TIME() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(4566721762568853320)));
}
pub fn SUPRESS_RANDOM_EVENT_THIS_FRAME(eventType: c_int, suppress: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2210715937190483106)), eventType, suppress);
}
pub fn SET_EXPLOSIVE_AMMO_THIS_FRAME(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11992085018254978299)), player);
}
pub fn SET_FIRE_AMMO_THIS_FRAME(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1263150695653912820)), player);
}
pub fn SET_EXPLOSIVE_MELEE_THIS_FRAME(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18382547445568245728)), player);
}
pub fn SET_SUPER_JUMP_THIS_FRAME(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6341050950550703115)), player);
}
/// Used to be known as _SET_BEAST_MODE_ACTIVE
pub fn SET_BEAST_JUMP_THIS_FRAME(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4866177616034872211)), player);
}
/// Used to be known as _SET_FORCE_PLAYER_TO_JUMP
pub fn SET_FORCED_JUMP_THIS_FRAME(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11608093803785720785)), player);
}
pub fn HAS_GAME_INSTALLED_THIS_SESSION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8060867548616808172)));
}
pub fn SET_TICKER_JOHNMARSTON_IS_DONE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(18086678693861155368)));
}
pub fn ARE_PROFILE_SETTINGS_VALID() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6531273866272062164)));
}
pub fn PREVENT_ARREST_STATE_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(16418270269239458654)));
}
/// Sets the localplayer playerinfo state back to playing (State 0)
/// States are:
/// -1: "Invalid"
/// 0: "Playing"
/// 1: "Died"
/// 2: "Arrested"
/// 3: "Failed Mission"
/// 4: "Left Game"
/// 5: "Respawn"
/// 6: "In MP Cutscene"
/// Used to be known as _RESET_LOCALPLAYER_STATE
pub fn FORCE_GAME_STATE_PLAYING() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(13883001127662981965)));
}
pub fn SCRIPT_RACE_INIT(p0: c_int, p1: c_int, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(747599185332294898)), p0, p1, p2, p3);
}
pub fn SCRIPT_RACE_SHUTDOWN() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(2303238929268438399)));
}
pub fn SCRIPT_RACE_PLAYER_HIT_CHECKPOINT(player: types.Player, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(1995826017863633939)), player, p1, p2, p3);
}
pub fn SCRIPT_RACE_GET_PLAYER_SPLIT_TIME(player: types.Player, p1: [*c]c_int, p2: [*c]c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(10301235629828086364)), player, p1, p2);
}
/// Used to be known as _START_BENCHMARK_RECORDING
pub fn START_END_USER_BENCHMARK() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(10554476422534802138)));
}
/// Used to be known as _STOP_BENCHMARK_RECORDING
pub fn STOP_END_USER_BENCHMARK() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(14401164441476724011)));
}
/// Used to be known as _RESET_BENCHMARK_RECORDING
pub fn RESET_END_USER_BENCHMARK() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(4859727830066402922)));
}
/// Saves the benchmark recording to %USERPROFILE%\Documents\Rockstar Games\GTA V\Benchmarks and submits some metrics.
/// Used to be known as _SAVE_BENCHMARK_RECORDING
pub fn SAVE_END_USER_BENCHMARK() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(4025849361513559768)));
}
/// Returns true if the current frontend menu is FE_MENU_VERSION_SP_PAUSE
/// Used to be known as _UI_IS_SINGLEPLAYER_PAUSE_MENU_ACTIVE
pub fn UI_STARTED_END_USER_BENCHMARK() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(16874741932035599760)));
}
/// Returns true if the current frontend menu is FE_MENU_VERSION_LANDING_MENU
/// Used to be known as _LANDING_MENU_IS_ACTIVE
pub fn LANDING_SCREEN_STARTED_END_USER_BENCHMARK() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(4304263934447298462)));
}
/// Returns true if command line option '-benchmark' is set.
/// Used to be known as _IS_COMMAND_LINE_BENCHMARK_VALUE_SET
pub fn IS_COMMANDLINE_END_USER_BENCHMARK() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(11549944955082699512)));
}
/// Returns value of the '-benchmarkIterations' command line option.
/// Used to be known as _GET_BENCHMARK_ITERATIONS_FROM_COMMAND_LINE
pub fn GET_BENCHMARK_ITERATIONS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(5138884420723479020)));
}
/// Returns value of the '-benchmarkPass' command line option.
/// Used to be known as _GET_BENCHMARK_PASS_FROM_COMMAND_LINE
pub fn GET_BENCHMARK_PASS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(1955519654984534239)));
}
/// In singleplayer it does exactly what the name implies. In FiveM / GTA:Online it shows `Disconnecting from GTA Online` HUD and then quits the game.
/// Used to be known as _RESTART_GAME
pub fn RESTART_GAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(16534023074718088113)));
}
/// Exits the game and downloads a fresh social club update on next restart.
/// Used to be known as _FORCE_SOCIAL_CLUB_UPDATE
pub fn QUIT_GAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(16962968457331276562)));
}
/// Hardcoded to always return true.
/// Used to be known as _HAS_ASYNC_INSTALL_FINISHED
pub fn HAS_ASYNC_INSTALL_FINISHED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(1478073423969468357)));
}
/// Used to be known as _CLEANUP_ASYNC_INSTALL
pub fn CLEANUP_ASYNC_INSTALL() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(14383056958920859570)));
}
/// aka "constrained"
/// Used to be known as _IS_IN_POWER_SAVING_MODE
pub fn PLM_IS_IN_CONSTRAINED_MODE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(7514891046611284578)));
}
/// Returns duration of how long the game has been in power-saving mode (aka "constrained") in milliseconds.
/// Used to be known as _GET_POWER_SAVING_MODE_DURATION
pub fn PLM_GET_CONSTRAINED_DURATION_MS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(12372226492937673586)));
}
/// If toggle is true, the ped's head is shown in the pause menu
/// If toggle is false, the ped's head is not shown in the pause menu
/// Used to be known as _SHOW_PED_IN_PAUSE_MENU
/// Used to be known as _SET_PLAYER_IS_IN_ANIMAL_FORM
pub fn SET_PLAYER_IS_IN_ANIMAL_FORM(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5673267276741983956)), toggle);
}
/// Although we don't have a jenkins hash for this one, the name is 100% confirmed.
pub fn GET_IS_PLAYER_IN_ANIMAL_FORM() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(10847221236054964901)));
}
/// Used to be known as _SET_PLAYER_ROCKSTAR_EDITOR_DISABLED
pub fn SET_PLAYER_IS_REPEATING_A_MISSION(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11352805748639145714)), toggle);
}
/// Does nothing (it's a nullsub).
pub fn DISABLE_SCREEN_DIMMING_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(2531724413268743273)));
}
pub fn GET_CITY_DENSITY() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(15060743825892121504)));
}
pub fn USE_ACTIVE_CAMERA_FOR_TIMESLICING_CENTRE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(7580816756080318695)));
}
/// Used to be known as _SET_CONTENT_MAP_INDEX
pub fn SET_CONTENT_ID_INDEX(contentId: types.Hash, index: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5441186655226709556)), contentId, index);
}
/// Used to be known as _GET_CONTENT_MAP_INDEX
pub fn GET_CONTENT_ID_INDEX(contentId: types.Hash) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(17073217760514446556)), contentId);
}
pub fn _SET_CONTENT_PROP_TYPE(model: types.Hash, @"type": c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13422279053372000923)), model, @"type");
}
/// Returns prop type for given model hash
pub fn _GET_CONTENT_PROP_TYPE(model: types.Hash) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(10065416342301289212)), model);
}
};
pub const MOBILE = struct {
/// Creates a mobile phone of the specified type.
/// Possible phone types:
/// 0 - Default phone / Michael's phone
/// 1 - Trevor's phone
/// 2 - Franklin's phone
/// 3 - Unused police phone
/// 4 - Prologue phone
/// Higher values may crash your game.
pub fn CREATE_MOBILE_PHONE(phoneType: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11883001152044989383)), phoneType);
}
/// Destroys the currently active mobile phone.
pub fn DESTROY_MOBILE_PHONE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(4307800655868612759)));
}
/// The minimum/default is 500.0f. If you plan to make it bigger set it's position as well. Also this seems to need to be called in a loop as when you close the phone the scale is reset. If not in a loop you'd need to call it everytime before you re-open the phone.
pub fn SET_MOBILE_PHONE_SCALE(scale: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14689952717465901362)), scale);
}
/// Last parameter is unknown and always zero.
pub fn SET_MOBILE_PHONE_ROTATION(rotX: f32, rotY: f32, rotZ: f32, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(13508437185511549029)), rotX, rotY, rotZ, p3);
}
pub fn GET_MOBILE_PHONE_ROTATION(rotation: [*c]types.Vector3, p1: types.Vehicle) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2085085397178675374)), rotation, p1);
}
pub fn SET_MOBILE_PHONE_POSITION(posX: f32, posY: f32, posZ: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(7582474547584305243)), posX, posY, posZ);
}
pub fn GET_MOBILE_PHONE_POSITION(position: [*c]types.Vector3) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6363550927110036358)), position);
}
/// If bool Toggle = true so the mobile is hide to screen.
/// If bool Toggle = false so the mobile is show to screen.
pub fn SCRIPT_IS_MOVING_MOBILE_PHONE_OFFSCREEN(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17659167576116842786)), toggle);
}
/// This one is weird and seems to return a TRUE state regardless of whether the phone is visible on screen or tucked away.
/// I can confirm the above. This function is hard-coded to always return 1.
pub fn CAN_PHONE_BE_SEEN_ON_SCREEN() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14187043856251976267)));
}
/// Used to be known as _SET_MOBILE_PHONE_UNK
pub fn SET_MOBILE_PHONE_DOF_STATE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3988624022105477252)), toggle);
}
/// For move the finger of player, the value of int goes 1 at 5.
/// Used to be known as _MOVE_FINGER
/// Used to be known as _CELL_CAM_MOVE_FINGER
pub fn CELL_SET_INPUT(direction: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10793412172051246235)), direction);
}
/// if the bool "Toggle" is "true" so the phone is lean.
/// if the bool "Toggle" is "false" so the phone is not lean.
/// Used to be known as _SET_PHONE_LEAN
/// Used to be known as _CELL_CAM_SET_LEAN
pub fn CELL_HORIZONTAL_MODE_TOGGLE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4964164612513600398)), toggle);
}
pub fn CELL_CAM_ACTIVATE(p0: windows.BOOL, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18296137823264362790)), p0, p1);
}
/// Used to be known as _DISABLE_PHONE_THIS_FRAME
/// Used to be known as _CELL_CAM_DISABLE_THIS_FRAME
pub fn CELL_CAM_ACTIVATE_SELFIE_MODE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(98034283137861742)), toggle);
}
pub fn CELL_CAM_ACTIVATE_SHALLOW_DOF_MODE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11730960460953719204)), toggle);
}
pub fn CELL_CAM_SET_SELFIE_MODE_SIDE_OFFSET_SCALING(p0: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1948733653416260636)), p0);
}
pub fn CELL_CAM_SET_SELFIE_MODE_HORZ_PAN_OFFSET(horizontalPan: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6049611026250109092)), horizontalPan);
}
pub fn CELL_CAM_SET_SELFIE_MODE_VERT_PAN_OFFSET(vertPan: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3537533866042521467)), vertPan);
}
pub fn CELL_CAM_SET_SELFIE_MODE_ROLL_OFFSET(roll: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1578122614122105741)), roll);
}
pub fn CELL_CAM_SET_SELFIE_MODE_DISTANCE_SCALING(distanceScaling: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12405323808628639260)), distanceScaling);
}
pub fn CELL_CAM_SET_SELFIE_MODE_HEAD_YAW_OFFSET(yaw: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15469277037362924041)), yaw);
}
pub fn CELL_CAM_SET_SELFIE_MODE_HEAD_ROLL_OFFSET(roll: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17429543815892364205)), roll);
}
pub fn CELL_CAM_SET_SELFIE_MODE_HEAD_PITCH_OFFSET(pitch: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5074892866309215571)), pitch);
}
pub fn CELL_CAM_IS_CHAR_VISIBLE_NO_FACE_CHECK(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4872503135987204030)), entity);
}
pub fn GET_MOBILE_PHONE_RENDER_ID(renderId: [*c]c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13016878493316378529)), renderId);
}
};
pub const MONEY = struct {
pub fn NETWORK_INITIALIZE_CASH(wallet: c_int, bank: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4442216992638548589)), wallet, bank);
}
/// Note the 2nd parameters are always 1, 0. I have a feeling it deals with your money, wallet, bank. So when you delete the character it of course wipes the wallet cash at that time. So if that was the case, it would be eg, NETWORK_DELETE_CHARACTER(characterIndex, deleteWalletCash, deleteBankCash);
pub fn NETWORK_DELETE_CHARACTER(characterSlot: c_int, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(406743382443420557)), characterSlot, p1, p2);
}
/// Used to be known as _NETWORK_MANUAL_DELETE_CHARACTER
pub fn NETWORK_MANUAL_DELETE_CHARACTER(characterSlot: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9373143968113274071)), characterSlot);
}
/// Used to be known as _NETWORK_GET_IS_HIGH_EARNER
pub fn NETWORK_GET_PLAYER_IS_HIGH_EARNER() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(18096684525253454439)));
}
pub fn NETWORK_CLEAR_CHARACTER_WALLET(characterSlot: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12187267057479264501)), characterSlot);
}
pub fn NETWORK_GIVE_PLAYER_JOBSHARE_CASH(amount: c_int, gamerHandle: [*c]types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18093457367178805509)), amount, gamerHandle);
}
pub fn NETWORK_RECEIVE_PLAYER_JOBSHARE_CASH(value: c_int, gamerHandle: [*c]types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6243032628598211992)), value, gamerHandle);
}
pub fn NETWORK_CAN_SHARE_JOB_CASH() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(2027872382674036410)));
}
/// index
/// -------
/// See function sub_1005 in am_boat_taxi.ysc
/// context
/// ----------
/// "BACKUP_VAGOS"
/// "BACKUP_LOST"
/// "BACKUP_FAMILIES"
/// "HIRE_MUGGER"
/// "HIRE_MERCENARY"
/// "BUY_CARDROPOFF"
/// "HELI_PICKUP"
/// "BOAT_PICKUP"
/// "CLEAR_WANTED"
/// "HEAD_2_HEAD"
/// "CHALLENGE"
/// "SHARE_LAST_JOB"
/// "DEFAULT"
/// reason
/// ---------
/// "NOTREACHTARGET"
/// "TARGET_ESCAPE"
/// "DELIVERY_FAIL"
/// "NOT_USED"
/// "TEAM_QUIT"
/// "SERVER_ERROR"
/// "RECEIVE_LJ_L"
/// "CHALLENGE_PLAYER_LEFT"
/// "DEFAULT"
/// unk
/// -----
/// Unknown bool value
pub fn NETWORK_REFUND_CASH(index: c_int, context: [*c]const u8, reason: [*c]const u8, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(17998656584548804631)), index, context, reason, p3);
}
/// Used to be known as _NETWORK_DEDUCT_CASH
pub fn NETWORK_DEDUCT_CASH(amount: c_int, p1: [*c]const u8, p2: [*c]const u8, p3: windows.BOOL, p4: windows.BOOL, p5: windows.BOOL) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(1781083639959289382)), amount, p1, p2, p3, p4, p5);
}
pub fn NETWORK_MONEY_CAN_BET(amount: c_int, p1: windows.BOOL, p2: windows.BOOL) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(9313531156054212187)), amount, p1, p2);
}
pub fn NETWORK_CAN_BET(amount: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4203234174936471167)), amount);
}
/// GTAO_CASINO_HOUSE
/// GTAO_CASINO_INSIDETRACK
/// GTAO_CASINO_LUCKYWHEEL
/// GTAO_CASINO_BLACKJACK
/// GTAO_CASINO_ROULETTE
/// GTAO_CASINO_SLOTS
/// GTAO_CASINO_PURCHASE_CHIPS
/// NETWORK_C*
/// Used to be known as _NETWORK_CASINO_CAN_USE_GAMBLING_TYPE
pub fn NETWORK_CASINO_CAN_BET(hash: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1552641216897565176)), hash);
}
/// Used to be known as _NETWORK_CASINO_CAN_PURCHASE_CHIPS_WITH_PVC
pub fn NETWORK_CASINO_CAN_BET_PVC() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(4129182631717156777)));
}
/// Used to be known as _NETWORK_CASINO_CAN_GAMBLE
pub fn NETWORK_CASINO_CAN_BET_AMOUNT(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(17739517944627826660)), p0);
}
/// Used to be known as _NETWORK_CASINO_CAN_PURCHASE_CHIPS_WITH_PVC_2
pub fn NETWORK_CASINO_CAN_BUY_CHIPS_PVC() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9901397808286796817)));
}
/// Used to be known as _NETWORK_CASINO_PURCHASE_CHIPS
pub fn NETWORK_CASINO_BUY_CHIPS(p0: c_int, p1: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(4310227723302706924)), p0, p1);
}
/// Used to be known as _NETWORK_CASINO_SELL_CHIPS
pub fn NETWORK_CASINO_SELL_CHIPS(p0: c_int, p1: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(17096941254080918656)), p0, p1);
}
/// Does nothing (it's a nullsub).
pub fn NETWORK_DEFER_CASH_TRANSACTIONS_UNTIL_SHOP_SAVE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(14776129359885034611)));
}
/// Used to be known as _CAN_PAY_GOON
pub fn CAN_PAY_AMOUNT_TO_BOSS(p0: c_int, p1: c_int, amount: c_int, p3: [*c]c_int) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(10914318999409301807)), p0, p1, amount, p3);
}
pub fn NETWORK_EARN_FROM_PICKUP(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17083586959442953880)), amount);
}
/// Used to be known as _NETWORK_EARN_FROM_CASHING_OUT
pub fn NETWORK_EARN_FROM_CASHING_OUT(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8182965715139361334)), amount);
}
pub fn NETWORK_EARN_FROM_GANGATTACK_PICKUP(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11546467268442621134)), amount);
}
/// Used to be known as _NETWORK_EARN_FROM_ASSASSINATE_TARGET_KILLED
pub fn NETWORK_EARN_ASSASSINATE_TARGET_KILLED(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18045938595797530506)), amount);
}
/// For the money bags that drop a max of $40,000. Often called 40k bags.
/// Most likely NETWORK_EARN_FROM_ROB***
/// Used to be known as _NETWORK_EARN_FROM_ARMOUR_TRUCK
pub fn NETWORK_EARN_FROM_ROB_ARMORED_CARS(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17659847922208236496)), amount);
}
pub fn NETWORK_EARN_FROM_CRATE_DROP(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12811645408652589610)), amount);
}
pub fn NETWORK_EARN_FROM_BETTING(amount: c_int, p1: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9401927921893558893)), amount, p1);
}
pub fn NETWORK_EARN_FROM_JOB(amount: c_int, p1: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12883752032968542872)), amount, p1);
}
/// Used to be known as _NETWORK_EARN_FROM_JOB_X2
pub fn NETWORK_EARN_FROM_JOBX2(amount: c_int, p1: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16049691646066168272)), amount, p1);
}
/// Used to be known as _NETWORK_EARN_FROM_PREMIUM_JOB
pub fn NETWORK_EARN_FROM_PREMIUM_JOB(amount: c_int, p1: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14429663106557949259)), amount, p1);
}
/// Used to be known as NETWORK_EARN_FROM_MISSION_H
pub fn NETWORK_EARN_FROM_BEND_JOB(amount: c_int, heistHash: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7003782308378816714)), amount, heistHash);
}
pub fn NETWORK_EARN_FROM_CHALLENGE_WIN(p0: types.Any, p1: [*c]types.Any, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(3104983913800718559)), p0, p1, p2);
}
pub fn NETWORK_EARN_FROM_BOUNTY(amount: c_int, gamerHandle: [*c]types.Any, p2: [*c]types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(1376894059356175055)), amount, gamerHandle, p2, p3);
}
pub fn NETWORK_EARN_FROM_IMPORT_EXPORT(amount: c_int, modelHash: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17954164283470529238)), amount, modelHash);
}
pub fn NETWORK_EARN_FROM_HOLDUPS(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5023788809209093709)), amount);
}
pub fn NETWORK_EARN_FROM_PROPERTY(amount: c_int, propertyName: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9553903050330469829)), amount, propertyName);
}
/// DSPORT
pub fn NETWORK_EARN_FROM_AI_TARGET_KILL(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5862360853681260247)), p0, p1);
}
pub fn NETWORK_EARN_FROM_NOT_BADSPORT(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4843429120666901814)), amount);
}
pub fn NETWORK_EARN_FROM_VEHICLE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any, p6: types.Any, p7: types.Any) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(13058676996217695480)), p0, p1, p2, p3, p4, p5, p6, p7);
}
pub fn NETWORK_EARN_FROM_PERSONAL_VEHICLE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any, p6: types.Any, p7: types.Any, p8: types.Any) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(4561302094203707565)), p0, p1, p2, p3, p4, p5, p6, p7, p8);
}
/// type either Monthly,Weekly,Daily
/// Used to be known as _NETWORK_EARN_FROM_DAILY_OBJECTIVE
pub fn NETWORK_EARN_FROM_DAILY_OBJECTIVES(amount: c_int, @"type": [*c]const u8, characterSlot: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(7972243017414903686)), amount, @"type", characterSlot);
}
/// Example for p1: "AM_DISTRACT_COPS"
/// Used to be known as _NETWORK_EARN_FROM_AMBIENT_JOB
pub fn NETWORK_EARN_FROM_AMBIENT_JOB(p0: c_int, p1: [*c]const u8, p2: [*c]types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(18117331021315582438)), p0, p1, p2);
}
/// Used to be known as _NETWORK_EARN_FROM_JOB_BONUS
pub fn NETWORK_EARN_FROM_JOB_BONUS(p0: types.Any, p1: [*c]types.Any, p2: [*c]types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(7500458499285321589)), p0, p1, p2);
}
pub fn NETWORK_EARN_FROM_CRIMINAL_MASTERMIND(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(18014568257746792916)), p0, p1, p2);
}
/// Used to be known as _NETWORK_EARN_JOB_BONUS_HEIST_AWARD
pub fn NETWORK_EARN_HEIST_AWARD(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(11335520336967013993)), p0, p1, p2);
}
/// Used to be known as _NETWORK_EARN_JOB_BONUS_FIRST_TIME_BONUS
pub fn NETWORK_EARN_FIRST_TIME_BONUS(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(1274696868198055478)), p0, p1, p2);
}
/// Used to be known as _NETWORK_EARN_GOON
pub fn NETWORK_EARN_GOON(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(14817342140811016194)), p0, p1, p2);
}
/// Used to be known as _NETWORK_EARN_BOSS
pub fn NETWORK_EARN_BOSS(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(626222975329479730)), p0, p1, p2);
}
/// Used to be known as _NETWORK_EARN_BOSS_AGENCY
pub fn NETWORK_EARN_AGENCY(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(914721133180232872)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_EARN_FROM_WAREHOUSE
pub fn NETWORK_EARN_FROM_WAREHOUSE(amount: c_int, id: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4488640767785496902)), amount, id);
}
/// Used to be known as _NETWORK_EARN_FROM_CONTRABAND
pub fn NETWORK_EARN_FROM_CONTRABAND(amount: c_int, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17052414681581247090)), amount, p1);
}
/// Used to be known as _NETWORK_EARN_FROM_DESTROYING_CONTRABAND
pub fn NETWORK_EARN_FROM_DESTROYING_CONTRABAND(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(9565664768403869634)), p0, p1, p2);
}
/// Used to be known as _NETWORK_EARN_FROM_SMUGGLER_WORK
pub fn NETWORK_EARN_FROM_SMUGGLER_WORK(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(7745716048155852133)), p0, p1, p2, p3, p4, p5);
}
/// Used to be known as _NETWORK_EARN_FROM_HANGAR_TRADE
pub fn NETWORK_EARN_FROM_HANGAR_TRADE(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3583197960089172895)), p0, p1);
}
/// Used to be known as _NETWORK_EARN_FROM_PURCHASE_CLUBHOUSE
pub fn NETWORK_EARN_PURCHASE_CLUB_HOUSE(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6170459898703589285)), p0, p1);
}
/// Used to be known as _NETWORK_EARN_FROM_BUSINESS_PRODUCT
pub fn NETWORK_EARN_FROM_BUSINESS_PRODUCT(amount: c_int, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(9621510244675947695)), amount, p1, p2, p3);
}
/// Used to be known as _NETWORK_EARN_FROM_VEHICLE_EXPORT
pub fn NETWORK_EARN_FROM_VEHICLE_EXPORT(amount: c_int, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(17143754251928299699)), amount, p1, p2);
}
/// Used to be known as _NETWORK_EARN_FROM_SMUGGLING
pub fn NETWORK_EARN_SMUGGLER_AGENCY(amount: c_int, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(16061545955263709960)), amount, p1, p2, p3);
}
/// Used to be known as _NETWORK_EARN_BOUNTY_HUNTER_REWARD
pub fn NETWORK_EARN_BOUNTY_HUNTER_REWARD(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17776113421644635783)), p0);
}
/// Used to be known as _NETWORK_EARN_FROM_BUSINESS_BATTLE
pub fn NETWORK_EARN_FROM_BUSINESS_BATTLE(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4826980631411061393)), p0);
}
/// Used to be known as _NETWORK_EARN_FROM_CLUB_MANAGEMENT_PARTICIPATION
pub fn NETWORK_EARN_FROM_CLUB_MANAGEMENT_PARTICIPATION(p0: types.Any, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12060266423237121767)), p0, p1);
}
/// Used to be known as _NETWORK_EARN_FROM_FMBB_PHONECALL_MISSION
pub fn NETWORK_EARN_FROM_FMBB_PHONECALL_MISSION(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14201366272313008658)), p0);
}
/// Used to be known as _NETWORK_EARN_FROM_BUSINESS_HUB_SELL
pub fn NETWORK_EARN_FROM_BUSINESS_HUB_SELL(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(808905264239593603)), p0, p1, p2);
}
/// Used to be known as _NETWORK_EARN_FROM_FMBB_BOSS_WORK
pub fn NETWORK_EARN_FROM_FMBB_BOSS_WORK(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2295158670222791067)), p0);
}
/// Used to be known as _NETWORK_EARN_FMBB_WAGE_BONUS
pub fn NETWORK_EARN_FMBB_WAGE_BONUS(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18445514484563883764)), p0);
}
pub fn NETWORK_CAN_SPEND_MONEY(p0: types.Any, p1: windows.BOOL, p2: windows.BOOL, p3: windows.BOOL, p4: types.Any, p5: types.Any) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(12338924456736023770)), p0, p1, p2, p3, p4, p5);
}
/// Used to be known as _NETWORK_CAN_SPEND_MONEY_2
pub fn NETWORK_CAN_SPEND_MONEY2(p0: types.Any, p1: windows.BOOL, p2: windows.BOOL, p3: windows.BOOL, p4: [*c]types.Any, p5: types.Any, p6: types.Any) windows.BOOL {
return nativeCaller.invoke7(@as(u64, @intCast(8287716764823003264)), p0, p1, p2, p3, p4, p5, p6);
}
pub fn NETWORK_BUY_ITEM(amount: c_int, item: types.Hash, p2: types.Any, p3: types.Any, p4: windows.BOOL, item_name: [*c]const u8, p6: types.Any, p7: types.Any, p8: types.Any, p9: windows.BOOL) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(17295929755209999189)), amount, item, p2, p3, p4, item_name, p6, p7, p8, p9);
}
pub fn NETWORK_SPENT_TAXI(amount: c_int, p1: windows.BOOL, p2: windows.BOOL, p3: types.Any, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(1712396808525593081)), amount, p1, p2, p3, p4);
}
pub fn NETWORK_PAY_EMPLOYEE_WAGE(p0: types.Any, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(6905686749662321033)), p0, p1, p2);
}
pub fn NETWORK_PAY_MATCH_ENTRY_FEE(amount: c_int, matchId: [*c]const u8, p2: windows.BOOL, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(10612417302084668742)), amount, matchId, p2, p3);
}
pub fn NETWORK_SPENT_BETTING(amount: c_int, p1: c_int, matchId: [*c]const u8, p3: windows.BOOL, p4: windows.BOOL) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(2036594400476948783)), amount, p1, matchId, p3, p4);
}
/// Used to be known as _NETWORK_SPENT_WAGER
pub fn NETWORK_SPENT_WAGER(p0: types.Any, p1: types.Any, amount: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(15680885259507210238)), p0, p1, amount);
}
pub fn NETWORK_SPENT_IN_STRIPCLUB(p0: types.Any, p1: windows.BOOL, p2: types.Any, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(17192905330013989020)), p0, p1, p2, p3);
}
pub fn NETWORK_BUY_HEALTHCARE(cost: c_int, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(15686151736757838813)), cost, p1, p2);
}
/// p1 = 0 (always)
/// p2 = 1 (always)
pub fn NETWORK_BUY_AIRSTRIKE(cost: c_int, p1: windows.BOOL, p2: windows.BOOL, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(8519486489798872857)), cost, p1, p2, p3);
}
pub fn NETWORK_BUY_BACKUP_GANG(p0: c_int, p1: c_int, p2: windows.BOOL, p3: windows.BOOL, npcProvider: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(11812337796177318841)), p0, p1, p2, p3, npcProvider);
}
/// p1 = 0 (always)
/// p2 = 1 (always)
pub fn NETWORK_BUY_HELI_STRIKE(cost: c_int, p1: windows.BOOL, p2: windows.BOOL, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(9343357415291959913)), cost, p1, p2, p3);
}
pub fn NETWORK_SPENT_AMMO_DROP(p0: types.Any, p1: windows.BOOL, p2: windows.BOOL, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(12782021228171047291)), p0, p1, p2, p3);
}
/// p1 is just an assumption. p2 was false and p3 was true.
pub fn NETWORK_BUY_BOUNTY(amount: c_int, victim: types.Player, p2: windows.BOOL, p3: windows.BOOL, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(8895046979010425561)), amount, victim, p2, p3, p4);
}
pub fn NETWORK_BUY_PROPERTY(cost: c_int, propertyName: types.Hash, p2: windows.BOOL, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(7280641241631886070)), cost, propertyName, p2, p3);
}
pub fn NETWORK_BUY_SMOKES(p0: c_int, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(8480138348999536317)), p0, p1, p2);
}
pub fn NETWORK_SPENT_HELI_PICKUP(p0: types.Any, p1: windows.BOOL, p2: windows.BOOL, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(8931156196047234194)), p0, p1, p2, p3);
}
pub fn NETWORK_SPENT_BOAT_PICKUP(p0: types.Any, p1: windows.BOOL, p2: windows.BOOL, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(5930928697977809920)), p0, p1, p2, p3);
}
pub fn NETWORK_SPENT_BULL_SHARK(p0: types.Any, p1: windows.BOOL, p2: windows.BOOL, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(12023912097099546924)), p0, p1, p2, p3);
}
pub fn NETWORK_SPENT_CASH_DROP(amount: c_int, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2922861363037298912)), amount, p1, p2);
}
/// Only used once in a script (am_contact_requests)
/// p1 = 0
/// p2 = 1
pub fn NETWORK_SPENT_HIRE_MUGGER(p0: types.Any, p1: windows.BOOL, p2: windows.BOOL, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(16430468144015236080)), p0, p1, p2, p3);
}
pub fn NETWORK_SPENT_ROBBED_BY_MUGGER(amount: c_int, p1: windows.BOOL, p2: windows.BOOL, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(11050256723068064601)), amount, p1, p2, p3);
}
pub fn NETWORK_SPENT_HIRE_MERCENARY(p0: types.Any, p1: windows.BOOL, p2: windows.BOOL, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(16697111200514182102)), p0, p1, p2, p3);
}
pub fn NETWORK_SPENT_BUY_WANTEDLEVEL(p0: types.Any, p1: [*c]types.Any, p2: windows.BOOL, p3: windows.BOOL, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(16262840690705417462)), p0, p1, p2, p3, p4);
}
pub fn NETWORK_SPENT_BUY_OFFTHERADAR(p0: types.Any, p1: windows.BOOL, p2: windows.BOOL, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(11973003527953275997)), p0, p1, p2, p3);
}
pub fn NETWORK_SPENT_BUY_REVEAL_PLAYERS(p0: types.Any, p1: windows.BOOL, p2: windows.BOOL, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(7932931430806193719)), p0, p1, p2, p3);
}
pub fn NETWORK_SPENT_CARWASH(p0: types.Any, p1: types.Any, p2: types.Any, p3: windows.BOOL, p4: windows.BOOL) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(17006655531746542342)), p0, p1, p2, p3, p4);
}
pub fn NETWORK_SPENT_CINEMA(p0: types.Any, p1: types.Any, p2: windows.BOOL, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(7726185402928965253)), p0, p1, p2, p3);
}
pub fn NETWORK_SPENT_TELESCOPE(p0: types.Any, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(9216079537485696009)), p0, p1, p2);
}
pub fn NETWORK_SPENT_HOLDUPS(p0: types.Any, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(15688407604437161827)), p0, p1, p2);
}
pub fn NETWORK_SPENT_BUY_PASSIVE_MODE(p0: types.Any, p1: windows.BOOL, p2: windows.BOOL, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(7870677022341632377)), p0, p1, p2, p3);
}
pub fn NETWORK_SPENT_BANK_INTEREST(p0: c_int, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(14565499460417580273)), p0, p1, p2);
}
pub fn NETWORK_SPENT_PROSTITUTES(p0: types.Any, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(12834002540298946462)), p0, p1, p2);
}
pub fn NETWORK_SPENT_ARREST_BAIL(p0: types.Any, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(9308751900871664281)), p0, p1, p2);
}
/// According to how I understood this in the freemode script alone,
/// The first parameter is determined by a function named, func_5749 within the freemode script which has a list of all the vehicles and a set price to return which some vehicles deals with globals as well. So the first parameter is basically the set in stone insurance cost it's gonna charge you for that specific vehicle model.
/// The second parameter whoever put it was right, they call GET_ENTITY_MODEL with the vehicle as the paremeter.
/// The third parameter is the network handle as they call their little struct<13> func or atleast how the script decompiled it to look which in lamens terms just returns the network handle of the previous owner based on DECOR_GET_INT(vehicle, "Previous_Owner").
/// The fourth parameter is a bool that returns true/false depending on if your bank balance is greater then 0.
/// The fifth and last parameter is a bool that returns true/false depending on if you have the money for the car based on the cost returned by func_5749. In the freemode script eg,
/// bool hasTheMoney = MONEY::_GET_BANK_BALANCE() < carCost.
pub fn NETWORK_SPENT_PAY_VEHICLE_INSURANCE_PREMIUM(amount: c_int, vehicleModel: types.Hash, gamerHandle: [*c]types.Any, notBankrupt: windows.BOOL, hasTheMoney: windows.BOOL) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(11525430014994998248)), amount, vehicleModel, gamerHandle, notBankrupt, hasTheMoney);
}
pub fn NETWORK_SPENT_CALL_PLAYER(p0: types.Any, p1: [*c]types.Any, p2: windows.BOOL, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(12456518438408689532)), p0, p1, p2, p3);
}
pub fn NETWORK_SPENT_BOUNTY(p0: types.Any, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(3004570246029238220)), p0, p1, p2);
}
pub fn NETWORK_SPENT_FROM_ROCKSTAR(p0: c_int, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(7657345755475787445)), p0, p1, p2);
}
/// Hardcoded to return 0.
pub fn NETWORK_SPEND_EARNED_FROM_BANK_AND_WALLETS(amount: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(11191469977363966149)), amount);
}
/// This isn't a hash collision.
pub fn PROCESS_CASH_GIFT(p0: [*c]c_int, p1: [*c]c_int, p2: [*c]const u8) [*c]const u8 {
return nativeCaller.invoke3(@as(u64, @intCast(2312964859205818945)), p0, p1, p2);
}
/// Used to be known as _NETWORK_SPENT_ON_MOVE_SUBMARINE
pub fn NETWORK_SPENT_MOVE_SUBMARINE(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(14793593275253904013)), p0, p1, p2);
}
pub fn NETWORK_SPENT_PLAYER_HEALTHCARE(p0: c_int, p1: c_int, p2: windows.BOOL, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(8978225059614043877)), p0, p1, p2, p3);
}
pub fn NETWORK_SPENT_NO_COPS(p0: types.Any, p1: windows.BOOL, p2: windows.BOOL, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(15400974197517975967)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_CARGO_SOURCING
pub fn NETWORK_SPENT_CARGO_SOURCING(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(10702529597779806244)), p0, p1, p2, p3, p4, p5);
}
pub fn NETWORK_SPENT_REQUEST_JOB(p0: types.Any, p1: windows.BOOL, p2: windows.BOOL, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(9368853338950414677)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_REQUEST_HEIST
pub fn NETWORK_SPENT_REQUEST_HEIST(p0: types.Any, p1: windows.BOOL, p2: windows.BOOL, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(11323826461795417698)), p0, p1, p2, p3);
}
/// The first parameter is the amount spent which is store in a global when this native is called. The global returns 10. Which is the price for both rides.
/// The last 3 parameters are,
/// 2,0,1 in the am_ferriswheel.c
/// 1,0,1 in the am_rollercoaster.c
pub fn NETWORK_BUY_FAIRGROUND_RIDE(amount: c_int, p1: types.Any, p2: windows.BOOL, p3: windows.BOOL, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(9978632427433939637)), amount, p1, p2, p3, p4);
}
pub fn NETWORK_ECONOMY_HAS_FIXED_CRAZY_NUMBERS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8957603390018204564)));
}
/// Used to be known as _NETWORK_SPENT_JOB_SKIP
pub fn NETWORK_SPENT_JOB_SKIP(amount: c_int, matchId: [*c]const u8, p2: windows.BOOL, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(2950267489290619951)), amount, matchId, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_BOSS
pub fn NETWORK_SPENT_BOSS_GOON(amount: c_int, p1: windows.BOOL, p2: windows.BOOL) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(18428169805683185341)), amount, p1, p2);
}
/// Used to be known as _NETWORK_SPENT_PAY_GOON
/// Used to be known as _NETWORK_SPENT_GOON_PAY
pub fn NETWORK_SPEND_GOON(p0: c_int, p1: c_int, amount: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(621980720819078786)), p0, p1, amount);
}
/// Used to be known as _NETWORK_SPENT_PAY_BOSS
/// Used to be known as _NETWORK_SPENT_BOSS_PAY
pub fn NETWORK_SPEND_BOSS(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(15837302402475801767)), p0, p1, p2);
}
/// Used to be known as _NETWORK_SPENT_MOVE_YACHT
pub fn NETWORK_SPENT_MOVE_YACHT(amount: c_int, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(16708158927121921390)), amount, p1, p2);
}
/// Used to be known as _NETWORK_SPENT_RENAME_ORGANIZATION
pub fn NETWORK_SPENT_RENAME_ORGANIZATION(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(18180715081363094390)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_BUY_CONTRABAND
pub fn NETWORK_BUY_CONTRABAND_MISSION(p0: c_int, p1: c_int, p2: types.Hash, p3: windows.BOOL, p4: windows.BOOL) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(3530126386747468278)), p0, p1, p2, p3, p4);
}
/// Used to be known as _NETWORK_SPENT_PA_SERVICE_HELI
pub fn NETWORK_SPENT_PA_SERVICE_HELI(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(1234560028263891002)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_PA_SERVICE_VEHICLE
pub fn NETWORK_SPENT_PA_SERVICE_VEHICLE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(17104627056680231522)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_PA_SERVICE_SNACK
pub fn NETWORK_SPENT_PA_SERVICE_SNACK(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(950518470969025477)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_PA_SERVICE_DANCER
pub fn NETWORK_SPENT_PA_SERVICE_DANCER(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(13015062152416317535)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_PA_SERVICE_IMPOUND
pub fn NETWORK_SPENT_PA_SERVICE_IMPOUND(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(16301584173928229294)), p0, p1, p2);
}
/// Used to be known as _NETWORK_SPENT_PA_SERVICE_HELI_PICKUP
pub fn NETWORK_SPENT_PA_HELI_PICKUP(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(1146414581149100851)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_PURCHASE_OFFICE
pub fn NETWORK_SPENT_PURCHASE_OFFICE_PROPERTY(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(7633450920405505217)), p0, p1, p2, p3, p4);
}
/// Used to be known as _NETWORK_SPENT_UPGRADE_OFFICE
pub fn NETWORK_SPENT_UPGRADE_OFFICE_PROPERTY(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(10242373263103464835)), p0, p1, p2, p3, p4);
}
/// Used to be known as _NETWORK_SPENT_PURCHASE_WAREHOUSE
pub fn NETWORK_SPENT_PURCHASE_WAREHOUSE_PROPERTY(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(13623102062608316794)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_UPGRADE_WAREHOUSE
pub fn NETWORK_SPENT_UPGRADE_WAREHOUSE_PROPERTY(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(12204586191338022362)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_PURCHASE_IMPORTEXPORT_WAREHOUSE
pub fn NETWORK_SPENT_PURCHASE_IMPEXP_WAREHOUSE_PROPERTY(amount: c_int, data: [*c]types.Any, p2: windows.BOOL, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(3717753824990342985)), amount, data, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_UPGRADE_IMPORTEXPORT_WAREHOUSE
pub fn NETWORK_SPENT_UPGRADE_IMPEXP_WAREHOUSE_PROPERTY(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(4695079861652539915)), p0, p1, p2, p3);
}
pub fn NETWORK_SPENT_TRADE_IMPEXP_WAREHOUSE_PROPERTY(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(3434951380343906710)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_ORDER_WAREHOUSE_VEHICLE
pub fn NETWORK_SPENT_ORDER_WAREHOUSE_VEHICLE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(427913800648686527)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_ORDER_BODYGUARD_VEHICLE
pub fn NETWORK_SPENT_ORDER_BODYGUARD_VEHICLE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(16767097609875081070)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_JUKEBOX
pub fn NETWORK_SPENT_JUKEBOX(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(6615190775930516434)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_PURCHASE_CLUBHOUSE
pub fn NETWORK_SPENT_PURCHASE_CLUB_HOUSE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(11064808610562607100)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_UPGRADE_CLUBHOUSE
pub fn NETWORK_SPENT_UPGRADE_CLUB_HOUSE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(18016498157661050831)), p0, p1, p2, p3);
}
pub fn NETWORK_SPENT_PURCHASE_BUSINESS_PROPERTY(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(8059597639487624986)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_UPGRADE_BUSINESS_PROPERTY
pub fn NETWORK_SPENT_UPGRADE_BUSINESS_PROPERTY(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(7448137697043721736)), p0, p1, p2, p3);
}
pub fn NETWORK_SPENT_TRADE_BUSINESS_PROPERTY(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(11897112096471256954)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_BA_SERVICE
pub fn NETWORK_SPENT_MC_ABILITY(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(15550027512402594544)), p0, p1, p2, p3, p4);
}
/// Used to be known as _NETWORK_SPENT_BUSINESS
pub fn NETWORK_SPENT_PAY_BUSINESS_SUPPLIES(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(15124406335893987)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_CHANGE_APPEARANCE
pub fn NETWORK_SPENT_CHANGE_APPEARANCE(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(6865007043768463020)), p0, p1, p2);
}
/// Used to be known as _NETWORK_SPENT_VEHICLE_EXPORT_MODS
pub fn NETWORK_SPENT_VEHICLE_EXPORT_MODS(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any, p6: types.Any, p7: types.Any, p8: types.Any, p9: types.Any) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(12059741881841115089)), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9);
}
/// Used to be known as _NETWORK_SPENT_PURCHASE_OFFICE_GARAGE
pub fn NETWORK_SPENT_PURCHASE_OFFICE_GARAGE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(13025232858614220622)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_UPGRADE_OFFICE_GARAGE
pub fn NETWORK_SPENT_UPGRADE_OFFICE_GARAGE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(3097400232158664690)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_IMPORT_EXPORT_REPAIR
pub fn NETWORK_SPENT_IMPORT_EXPORT_REPAIR(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(13949107336061262078)), p0, p1, p2);
}
/// Used to be known as _NETWORK_SPENT_PURCHASE_HANGAR
pub fn NETWORK_SPENT_PURCHASE_HANGAR(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(14750196755438260954)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_UPGRADE_HANGAR
pub fn NETWORK_SPENT_UPGRADE_HANGAR(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(7016244301234998703)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_HANGAR_UTILITY_CHARGES
pub fn NETWORK_SPENT_HANGAR_UTILITY_CHARGES(amount: c_int, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(12793252013506153322)), amount, p1, p2);
}
/// Used to be known as _NETWORK_SPENT_HANGAR_STAFF_CHARGES
pub fn NETWORK_SPENT_HANGAR_STAFF_CHARGES(amount: c_int, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(12822087269027841495)), amount, p1, p2);
}
/// Used to be known as _NETWORK_SPENT_BUY_TRUCK
pub fn NETWORK_SPENT_BUY_TRUCK(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(12404932123836500952)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_UPGRADE_TRUCK
pub fn NETWORK_SPENT_UPGRADE_TRUCK(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(3917717694146058379)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_BUY_BUNKER
pub fn NETWORK_SPENT_BUY_BUNKER(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(1355945031293784313)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_UPGRADE_BUNKER
pub fn NETWORK_SPENT_UPRADE_BUNKER(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(901513886547717449)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_EARN_FROM_SELL_BUNKER
pub fn NETWORK_EARN_FROM_SELL_BUNKER(amount: c_int, bunkerHash: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10543409052280464820)), amount, bunkerHash);
}
/// Used to be known as _NETWORK_SPENT_BALLISTIC_EQUIPMENT
pub fn NETWORK_SPENT_BALLISTIC_EQUIPMENT(amount: c_int, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(6743967863927664931)), amount, p1, p2);
}
/// Used to be known as _NETWORK_EARN_FROM_RDR_BONUS
pub fn NETWORK_EARN_RDR_BONUS(amount: c_int, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8814469947957200501)), amount, p1);
}
/// Used to be known as _NETWORK_EARN_FROM_WAGE_PAYMENT
pub fn NETWORK_EARN_WAGE_PAYMENT(amount: c_int, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3889098034217348891)), amount, p1);
}
/// Used to be known as _NETWORK_EARN_FROM_WAGE_PAYMENT_BONUS
pub fn NETWORK_EARN_WAGE_PAYMENT_BONUS(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(25555334596464669)), amount);
}
/// Used to be known as _NETWORK_SPENT_BUY_BASE
pub fn NETWORK_SPENT_BUY_BASE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(5666641199259471137)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_UPGRADE_BASE
pub fn NETWORK_SPENT_UPGRADE_BASE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(4455171888399116911)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_BUY_TILTROTOR
pub fn NETWORK_SPENT_BUY_TILTROTOR(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(922802226996570245)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_UPGRADE_TILTROTOR
pub fn NETWORK_SPENT_UPGRADE_TILTROTOR(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(1611747008643213575)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_EMPLOY_ASSASSINS
pub fn NETWORK_SPENT_EMPLOY_ASSASSINS(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(6610115616116437445)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_GANGOPS_CANNON
pub fn NETWORK_SPEND_GANGOPS_CANNON(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(8582412895067158463)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_GANGOPS_START_MISSION
pub fn NETWORK_SPEND_GANGOPS_SKIP_MISSION(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(15750348935955045400)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_CASINO_HEIST_SKIP_MISSION
pub fn NETWORK_SPEND_CASINO_HEIST_SKIP_MISSION(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(5219682815361758249)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_EARN_FROM_SELL_BASE
pub fn NETWORK_EARN_SELL_BASE(amount: c_int, baseNameHash: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1017303290664980906)), amount, baseNameHash);
}
/// Used to be known as _NETWORK_EARN_FROM_TARGET_REFUND
pub fn NETWORK_EARN_TARGET_REFUND(amount: c_int, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6586124068969916191)), amount, p1);
}
/// Used to be known as _NETWORK_EARN_FROM_GANGOPS_WAGES
pub fn NETWORK_EARN_GANGOPS_WAGES(amount: c_int, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3299759377078255784)), amount, p1);
}
/// Used to be known as _NETWORK_EARN_FROM_GANGOPS_WAGES_BONUS
pub fn NETWORK_EARN_GANGOPS_WAGES_BONUS(amount: c_int, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1565891872037976351)), amount, p1);
}
/// Used to be known as _NETWORK_EARN_FROM_DAR_CHALLENGE
pub fn NETWORK_EARN_DAR_CHALLENGE(amount: c_int, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14611491421803914411)), amount, p1);
}
/// Used to be known as _NETWORK_EARN_FROM_DOOMSDAY_FINALE_BONUS
pub fn NETWORK_EARN_DOOMSDAY_FINALE_BONUS(amount: c_int, vehicleHash: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1336008329522252114)), amount, vehicleHash);
}
/// Used to be known as _NETWORK_EARN_FROM_GANGOPS_AWARDS
pub fn NETWORK_EARN_GANGOPS_AWARD(amount: c_int, p1: [*c]const u8, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(12223636310471008218)), amount, p1, p2);
}
/// Used to be known as _NETWORK_EARN_FROM_GANGOPS_ELITE
pub fn NETWORK_EARN_GANGOPS_ELITE(amount: c_int, p1: [*c]const u8, actIndex: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2708810536048143479)), amount, p1, actIndex);
}
/// Used to be known as _NETWORK_RIVAL_DELIVERY_COMPLETED
pub fn NETWORK_SERVICE_EARN_GANGOPS_RIVAL_DELIVERY(earnedMoney: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1983871953063809058)), earnedMoney);
}
/// Used to be known as _NETWORK_SPENT_GANGOPS_START_STRAND
pub fn NETWORK_SPEND_GANGOPS_START_STRAND(@"type": c_int, amount: c_int, p2: windows.BOOL, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(11645957309904088582)), @"type", amount, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_GANGOPS_TRIP_SKIP
pub fn NETWORK_SPEND_GANGOPS_TRIP_SKIP(amount: c_int, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(6831520657011674474)), amount, p1, p2);
}
/// Used to be known as _NETWORK_EARN_FROM_GANGOPS_JOBS_PREP_PARTICIPATION
pub fn NETWORK_EARN_GANGOPS_PREP_PARTICIPATION(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17088442934239214589)), amount);
}
/// Used to be known as _NETWORK_EARN_FROM_GANGOPS_JOBS_SETUP
pub fn NETWORK_EARN_GANGOPS_SETUP(amount: c_int, p1: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12183934186288721144)), amount, p1);
}
/// Used to be known as _NETWORK_EARN_FROM_GANGOPS_JOBS_FINALE
pub fn NETWORK_EARN_GANGOPS_FINALE(amount: c_int, p1: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2022714132207111506)), amount, p1);
}
/// Used to be known as _NETWORK_SPENT_GANGOPS_REPAIR_COST
pub fn NETWORK_SPEND_GANGOPS_REPAIR_COST(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(3061581824351550412)), p0, p1, p2);
}
/// Used to be known as _NETWORK_EARN_FROM_NIGHTCLUB_INCOME
pub fn NETWORK_EARN_NIGHTCLUB(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16210756786758848856)), p0);
}
/// Used to be known as _NETWORK_EARN_FROM_NIGHTCLUB_DANCING
pub fn NETWORK_EARN_NIGHTCLUB_DANCING(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13033046133144693453)), p0);
}
/// Used to be known as _NETWORK_EARN_FROM_BB_EVENT_BONUS
pub fn NETWORK_EARN_BB_EVENT_BONUS(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18291601076294456720)), amount);
}
/// Used to be known as _NETWORK_SPENT_PURCHASE_HACKER
pub fn NETWORK_SPENT_PURCHASE_HACKER_TRUCK(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(3068011733585931465)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_UPGRADE_HACKER
pub fn NETWORK_SPENT_UPGRADE_HACKER_TRUCK(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(2480401803855596712)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_EARN_FROM_HACKER_TRUCK_MISSION
pub fn NETWORK_EARN_HACKER_TRUCK(p0: types.Any, amount: c_int, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(16753777545602230995)), p0, amount, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_PURCHASE_NIGHTCLUB
pub fn NETWORK_SPENT_PURCHASE_NIGHTCLUB_AND_WAREHOUSE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(17111094275994795903)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_UPGRADE_NIGHTCLUB
pub fn NETWORK_SPENT_UPGRADE_NIGHTCLUB_AND_WAREHOUSE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(2146448225466198059)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_EARN_FROM_NIGHTCLUB_LOCATION
pub fn NETWORK_EARN_NIGHTCLUB_AND_WAREHOUSE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any, p6: types.Any) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(14332508970529638528)), p0, p1, p2, p3, p4, p5, p6);
}
/// Used to be known as _NETWORK_SPENT_NIGHTCLUB_BATHROOM_ATTENDANT
pub fn NETWORK_SPEND_NIGHTCLUB_AND_WAREHOUSE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(7298131561933949089)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_RDRHATCHET_BONUS
pub fn NETWORK_SPENT_RDR_HATCHET_BONUS(amount: c_int, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(16322404526960684598)), amount, p1, p2);
}
/// Used to be known as _NETWORK_SPENT_NIGHTCLUB_ENTRY_FEE
pub fn NETWORK_SPENT_NIGHTCLUB_ENTRY_FEE(player: types.Player, amount: c_int, p1: types.Any, p2: windows.BOOL, p3: windows.BOOL) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(9754891798676858205)), player, amount, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_NIGHTCLUB_BAR_DRINK
pub fn NETWORK_SPEND_NIGHTCLUB_BAR_DRINK(amount: c_int, p1: types.Any, p2: windows.BOOL, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(15934210568977159269)), amount, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_BOUNTY_HUNTER_MISSION
pub fn NETWORK_SPEND_BOUNTY_HUNTER_MISSION(amount: c_int, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2011434310601587487)), amount, p1, p2);
}
/// Used to be known as _NETWORK_SPENT_REHIRE_DJ
pub fn NETWORK_SPENT_REHIRE_DJ(amount: c_int, p1: types.Any, p2: windows.BOOL, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(17782644843987539196)), amount, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_ARENA_JOIN_SPECTATOR
pub fn NETWORK_SPENT_ARENA_JOIN_SPECTATOR(amount: c_int, p1: types.Any, p2: windows.BOOL, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(1507274693168289199)), amount, p1, p2, p3);
}
/// Used to be known as _NETWORK_EARN_FROM_ARENA_SKILL_LEVEL_PROGRESSION
pub fn NETWORK_EARN_ARENA_SKILL_LEVEL_PROGRESSION(amount: c_int, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16177588440840780588)), amount, p1);
}
/// Used to be known as _NETWORK_EARN_FROM_ARENA_CAREER_PROGRESSION
pub fn NETWORK_EARN_ARENA_CAREER_PROGRESSION(amount: c_int, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1124201214560519705)), amount, p1);
}
/// Used to be known as _NETWORK_SPENT_MAKE_IT_RAIN
pub fn NETWORK_SPEND_MAKE_IT_RAIN(amount: c_int, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(16570326739291221853)), amount, p1, p2);
}
/// Used to be known as _NETWORK_SPENT_BUY_ARENA
pub fn NETWORK_SPEND_BUY_ARENA(amount: c_int, p1: windows.BOOL, p2: windows.BOOL, p3: [*c]const u8) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(4671880523305962310)), amount, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_UPGRADE_ARENA
pub fn NETWORK_SPEND_UPGRADE_ARENA(amount: c_int, p1: windows.BOOL, p2: windows.BOOL, p3: [*c]const u8) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(250718365903846065)), amount, p1, p2, p3);
}
/// type either, 1 for cam spectate, 2 for drone
/// Used to be known as _NETWORK_SPENT_ARENA_SPECTATOR_BOX
pub fn NETWORK_SPEND_ARENA_SPECTATOR_BOX(amount: c_int, @"type": c_int, p2: windows.BOOL, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(8091208785747631119)), amount, @"type", p2, p3);
}
/// Used to be known as _NETWORK_SPENT_SPIN_THE_WHEEL_PAYMENT
pub fn NETWORK_SPEND_SPIN_THE_WHEEL_PAYMENT(amount: c_int, p1: types.Any, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(11122714396005708700)), amount, p1, p2);
}
/// Used to be known as _NETWORK_EARN_FROM_SPIN_THE_WHEEL_CASH
pub fn NETWORK_EARN_SPIN_THE_WHEEL_CASH(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7452411161152895834)), amount);
}
/// Used to be known as _NETWORK_SPENT_ARENA_PREMIUM
pub fn NETWORK_SPEND_ARENA_PREMIUM(amount: c_int, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(7031410773627754784)), amount, p1, p2);
}
/// Used to be known as _NETWORK_EARN_FROM_ARENA_WAR
pub fn NETWORK_EARN_ARENA_WAR(amount: c_int, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(7142459114847809706)), amount, p1, p2, p3);
}
/// Used to be known as _NETWORK_EARN_FROM_ASSASSINATE_TARGET_KILLED_2
pub fn NETWORK_EARN_ARENA_WAR_ASSASSINATE_TARGET(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6808009606762822669)), amount);
}
/// Used to be known as _NETWORK_EARN_FROM_BB_EVENT_CARGO
pub fn NETWORK_EARN_ARENA_WAR_EVENT_CARGO(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12117314155315311193)), amount);
}
/// Used to be known as _NETWORK_EARN_FROM_RC_TIME_TRIAL
pub fn NETWORK_EARN_RC_TIME_TRIAL(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16137698090569673448)), amount);
}
/// Used to be known as _NETWORK_EARN_FROM_DAILY_OBJECTIVE_EVENT
pub fn NETWORK_EARN_DAILY_OBJECTIVE_EVENT(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5848169395913459452)), amount);
}
/// Used to be known as _NETWORK_SPENT_CASINO_MEMBERSHIP
pub fn NETWORK_SPEND_CASINO_MEMBERSHIP(amount: c_int, p1: windows.BOOL, p2: windows.BOOL, p3: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(18139942331681578310)), amount, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_BUY_CASINO
pub fn NETWORK_SPEND_BUY_CASINO(amount: c_int, p1: windows.BOOL, p2: windows.BOOL, data: [*c]types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(3793997143862467087)), amount, p1, p2, data);
}
/// Used to be known as _NETWORK_SPENT_UPGRADE_CASINO
pub fn NETWORK_SPEND_UPGRADE_CASINO(amount: c_int, p1: windows.BOOL, p2: windows.BOOL, data: [*c]types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(5134339058624162794)), amount, p1, p2, data);
}
/// Used to be known as _NETWORK_SPENT_CASINO_GENERIC
pub fn NETWORK_SPEND_CASINO_GENERIC(amount: c_int, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(9853765351354192835)), amount, p1, p2, p3, p4);
}
/// Used to be known as _NETWORK_EARN_FROM_TIME_TRIAL_WIN
pub fn NETWORK_EARN_CASINO_TIME_TRIAL_WIN(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(583739081145433048)), amount);
}
/// Used to be known as _NETWORK_EARN_FROM_COLLECTABLES_ACTION_FIGURES
pub fn NETWORK_EARN_COLLECTABLES_ACTION_FIGURES(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6131643197212221513)), amount);
}
/// Used to be known as _NETWORK_EARN_FROM_COMPLETE_COLLECTION
pub fn NETWORK_EARN_CASINO_COLLECTABLE_COMPLETED_COLLECTION(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9488350994431382659)), amount);
}
/// Used to be known as _NETWORK_EARN_FROM_SELLING_VEHICLE
pub fn NETWORK_EARN_SELL_PRIZE_VEHICLE(amount: c_int, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(10073188561166760831)), amount, p1, p2);
}
/// Used to be known as _NETWORK_EARN_FROM_CASINO_MISSION_REWARD
pub fn NETWORK_EARN_CASINO_MISSION_REWARD(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6228429917723789278)), amount);
}
/// Used to be known as _NETWORK_EARN_FROM_CASINO_STORY_MISSION_REWARD
pub fn NETWORK_EARN_CASINO_STORY_MISSION_REWARD(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12436106895940903058)), amount);
}
/// Used to be known as _NETWORK_EARN_FROM_CASINO_MISSION_PARTICIPATION
pub fn NETWORK_EARN_CASINO_MISSION_PARTICIPATION(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(714086099869115765)), amount);
}
/// Used to be known as _NETWORK_EARN_FROM_CASINO_AWARD
pub fn NETWORK_EARN_CASINO_AWARD(amount: c_int, hash: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10897188831422811627)), amount, hash);
}
/// Used to be known as _NETWORK_SPENT_BUY_ARCADE
pub fn NETWORK_SPEND_BUY_ARCADE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(9728489488316138360)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_UPGRADE_ARCADE
pub fn NETWORK_SPEND_UPGRADE_ARCADE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(6157655951153373146)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_CASINO_HEIST
pub fn NETWORK_SPEND_CASINO_HEIST(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any, p6: types.Any, p7: types.Any, p8: types.Any, p9: types.Any, p10: types.Any) void {
_ = nativeCaller.invoke11(@as(u64, @intCast(15208237658859356968)), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);
}
/// Used to be known as _NETWORK_SPENT_ARCADE_MGMT_CABINET
pub fn NETWORK_SPEND_ARCADE_MGMT(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(13093527779176919198)), p0, p1, p2, p3, p4);
}
/// Used to be known as _NETWORK_SPENT_ARCADE_GAME
/// Used to be known as _NETWORK_SPENT_PLAY_ARCADE_CABINET
pub fn NETWORK_SPEND_PLAY_ARCADE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(16921105853358675032)), p0, p1, p2, p3, p4);
}
/// Used to be known as _NETWORK_SPENT_ARCADE_GENERIC
pub fn NETWORK_SPEND_ARCADE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(4875849924608878215)), p0, p1, p2, p3, p4);
}
/// Used to be known as _NETWORK_EARN_CASINO_HEIST
pub fn NETWORK_EARN_CASINO_HEIST(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any, p6: types.Any) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(8279806038960481219)), p0, p1, p2, p3, p4, p5, p6);
}
/// Used to be known as _NETWORK_EARN_FROM_UPGRADE_ARCADE_LOCATION
pub fn NETWORK_EARN_UPGRADE_ARCADE(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(5493113265674128796)), p0, p1, p2);
}
/// Used to be known as _NETWORK_EARN_FROM_ARCADE
/// Used to be known as _NETWORK_EARN_FROM_ARCADE_AWARD
pub fn NETWORK_EARN_ARCADE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(15173529762491887039)), p0, p1, p2, p3, p4);
}
/// Used to be known as _NETWORK_EARN_FROM_ARCADE_COLLECTABLES
pub fn NETWORK_EARN_COLLECTABLES(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(12203905402730514498)), p0, p1, p2);
}
/// Used to be known as _NETWORK_EARN_FROM_ARCADE_KILLS_CHALLENGE
pub fn NETWORK_EARN_CHALLENGE(amount: c_int, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(996248731132662826)), amount, p1, p2);
}
/// Used to be known as _NETWORK_EARN_CASINO_HEIST_BONUS
pub fn NETWORK_EARN_CASINO_HEIST_AWARDS(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(4523662546653772170)), p0, p1, p2, p3, p4);
}
/// Used to be known as _NETWORK_EARN_FROM_COLLECTION_ITEM
pub fn NETWORK_EARN_COLLECTABLE_ITEM(amount: c_int, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9583488196699157309)), amount, p1);
}
/// Used to be known as _NETWORK_EARN_COLLECTABLE_COMPLETED_COLLECTION
pub fn NETWORK_EARN_COLLECTABLE_COMPLETED_COLLECTION(amount: c_int, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6672955357496954790)), amount, p1);
}
/// Used to be known as _NETWORK_EARN_FROM_YACHT_MISSION
pub fn NETWORK_EARN_YATCH_MISSION(amount: c_int, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16026308921286816050)), amount, p1);
}
/// Used to be known as _NETWORK_EARN_FROM_YACHT_MISSION_2
pub fn NETWORK_EARN_DISPATCH_CALL(amount: c_int, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16348705100723340419)), amount, p1);
}
/// Used to be known as _NETWORK_SPENT_BEACH_PARTY_GENERIC
pub fn NETWORK_SPEND_BEACH_PARTY(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6101148445739258441)), p0);
}
/// Used to be known as _NETWORK_SPENT_SUBMARINE
pub fn NETWORK_SPEND_SUBMARINE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(7821557695074773675)), p0, p1, p2, p3, p4, p5);
}
/// Used to be known as _NETWORK_SPENT_CASINO_CLUB_GENERIC
pub fn NETWORK_SPEND_CASINO_CLUB(amount1: c_int, p1: types.Any, p2: windows.BOOL, p3: types.Any, p4: c_int, p5: c_int, p6: c_int, amount2: c_int, p8: types.Any) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(14524603946433876146)), amount1, p1, p2, p3, p4, p5, p6, amount2, p8);
}
/// Used to be known as _NETWORK_SPENT_BUY_SUB
pub fn NETWORK_SPEND_BUY_SUB(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(10434132699718087092)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_UPGRADE_SUB
pub fn NETWORK_SPEND_UPGRADE_SUB(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(9873186174936082062)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_ISLAND_HEIST
pub fn NETWORK_SPEND_ISLAND_HEIST(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(16746223885228041257)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_EARN_ISLAND_HEIST
pub fn NETWORK_EARN_ISLAND_HEIST(amount1: c_int, p1: types.Any, p2: types.Any, p3: types.Any, amount2: c_int, p5: c_int) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(15140276335432867605)), amount1, p1, p2, p3, amount2, p5);
}
/// Used to be known as _NETWORK_EARN_FROM_BEACH_PARTY_LOST_FOUND
pub fn NETWORK_EARN_BEACH_PARTY_LOST_FOUND(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(11894913579243880549)), p0, p1, p2);
}
/// Used to be known as _NETWORK_EARN_FROM_ISLAND_HEIST_DJMISSION
pub fn NETWORK_EARN_FROM_ISLAND_HEIST_DJ_MISSION(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16337715422114881681)), p0, p1);
}
/// Used to be known as _NETWORK_SPENT_CARCLUB_MEMBERSHIP
pub fn NETWORK_SPEND_CAR_CLUB_MEMBERSHIP(amount1: c_int, p1: types.Any, p2: types.Any, amount2: c_int, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(1469547258303035106)), amount1, p1, p2, amount2, p4);
}
/// Used to be known as _NETWORK_SPENT_CARCLUB
pub fn NETWORK_SPEND_CAR_CLUB_BAR(p0: types.Any, p1: windows.BOOL, p2: windows.BOOL, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(10543533109311089179)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_AUTOSHOP_MODIFICATIONS
pub fn NETWORK_SPEND_AUTOSHOP_MODIFY(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(11234850552465065499)), p0, p1, p2, p3, p4);
}
/// Used to be known as _NETWORK_SPENT_CARCLUB_TAKEOVER
pub fn NETWORK_SPEND_CAR_CLUB_TAKEOVER(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(15124327956320326325)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_BUY_AUTOSHOP
pub fn NETWORK_SPEND_BUY_AUTOSHOP(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(17201469991848904809)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_UPGRADE_AUTOSHOP
pub fn NETWORK_SPEND_UPGRADE_AUTOSHOP(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(15961490048201639020)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_EARN_FROM_AUTOSHOP_BUSINESS
pub fn NETWORK_EARN_AUTOSHOP_BUSINESS(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(3938394964053241918)), p0, p1, p2);
}
/// Used to be known as _NETWORK_EARN_FROM_AUTOSHOP_INCOME
pub fn NETWORK_EARN_AUTOSHOP_INCOME(p0: types.Any, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14298116250408582693)), p0, p1);
}
/// Used to be known as _NETWORK_EARN_FROM_CARCLUB_MEMBERSHIP
pub fn NETWORK_EARN_CARCLUB_MEMBERSHIP(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13574455628198874670)), p0);
}
/// Used to be known as _NETWORK_EARN_FROM_VEHICLE_AUTOSHOP
pub fn NETWORK_EARN_DAILY_VEHICLE(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5994418547077808268)), p0, p1);
}
/// Used to be known as _NETWORK_EARN_FROM_VEHICLE_AUTOSHOP_BONUS
pub fn NETWORK_EARN_DAILY_VEHICLE_BONUS(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18331251265768403634)), p0);
}
/// Used to be known as _NETWORK_EARN_FROM_TUNER_AWARD
pub fn NETWORK_EARN_TUNER_AWARD(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(13278570240187903478)), p0, p1, p2);
}
/// Used to be known as _NETWORK_EARN_FROM_TUNER_FINALE
pub fn NETWORK_EARN_TUNER_ROBBERY(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(13597042531695307873)), p0, p1, p2, p3, p4);
}
/// Used to be known as _NETWORK_EARN_FROM_UPGRADE_AUTOSHOP_LOCATION
pub fn NETWORK_EARN_UPGRADE_AUTOSHOP(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13907998182754771438)), p0, p1);
}
/// Used to be known as _NETWORK_SPENT_INTERACTION_MENU_ABILITY
pub fn NETWORK_SPEND_INTERACTION_MENU_ABILITY(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(10640388975076305189)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_FROM_BANK
pub fn NETWORK_SPEND_SET_COMMON_FIELDS(p0: types.Any, p1: types.Any, p2: types.Any, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(13400359988318075466)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_SALES_DISPLAY
pub fn NETWORK_SPEND_SET_DISCOUNT(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9092572549925762272)), p0);
}
/// Used to be known as _NETWORK_SPENT_BUY_AGENCY
pub fn NETWORK_SPEND_BUY_AGENCY(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(16901116364872439940)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_UPGRADE_AGENCY
pub fn NETWORK_SPEND_UPGRADE_AGENCY(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(7839188619583136694)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_AGENCY_CONCIERGE
pub fn NETWORK_SPEND_AGENCY(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(1954879173856072284)), p0, p1, p2, p3, p4);
}
/// Used to be known as _NETWORK_SPENT_HIDDEN_CONTACT_SERVICE
pub fn NETWORK_SPEND_HIDDEN(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(13801162006392247463)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_SOURCE_BIKE_CONTACT_SERVICE
pub fn NETWORK_SPEND_SOURCE_BIKE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(15699344327618828488)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_COMPANY_SUV_CONTACT_SERVICE
pub fn NETWORK_SPEND_COMP_SUV(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(15593012195176063875)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_SUV_FAST_TRAVEL
pub fn NETWORK_SPEND_SUV_FST_TRVL(p0: c_int, p1: windows.BOOL, p2: windows.BOOL, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(7035431192475023726)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_SUPPLY_CONTACT_SERVICE
pub fn NETWORK_SPEND_SUPPLY(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(16993351021479300013)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_BIKE_SHOP_MODIFY
pub fn NETWORK_SPEND_BIKE_SHOP(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(10536992175822528267)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_SPENT_VEHICLE_REQUESTED
pub fn NETWORK_SPEND_VEHICLE_REQUESTED(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(203306527527548163)), p0, p1, p2, p3, p4);
}
/// Used to be known as _NETWORK_SPENT_GUNRUNNING_CONTACT_SERVICE
pub fn NETWORK_SPEND_GUNRUNNING(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(3236696200869018629)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_EARN_FROM_AGENCY_INCOME
pub fn NETWORK_EARN_AGENCY_SAFE(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7366564753469352466)), p0);
}
/// Used to be known as _NETWORK_EARN_FROM_AWARD_SECURITY_CONTRACT
pub fn NETWORK_EARN_AWARD_CONTRACT(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1471919200337018943)), p0, p1);
}
/// Used to be known as _NETWORK_EARN_FROM_AGENCY_SECURITY_CONTRACT
pub fn NETWORK_EARN_AGENCY_CONTRACT(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4055538557097936327)), p0, p1);
}
/// Used to be known as _NETWORK_EARN_FROM_AWARD_PHONE_HIT
pub fn NETWORK_EARN_AWARD_PHONE(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8329303147462728675)), p0, p1);
}
/// Used to be known as _NETWORK_EARN_FROM_AGENCY_PHONE_HIT
pub fn NETWORK_EARN_AGENCY_PHONE(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(16329838254888786818)), p0, p1, p2);
}
/// Used to be known as _NETWORK_EARN_FROM_AWARD_AGENCY_STORY
pub fn NETWORK_EARN_AWARD_FIXER_MISSION(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9860283010048687173)), p0, p1);
}
/// Used to be known as _NETWORK_EARN_FROM_AGENCY_STORY_PREP
pub fn NETWORK_EARN_FIXER_PREP(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7098770180591083718)), p0, p1);
}
/// Used to be known as _NETWORK_EARN_FROM_AGENCY_STORY_FINALE
pub fn NETWORK_EARN_FIXER_FINALE(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13408697630087598568)), p0, p1);
}
/// Used to be known as _NETWORK_EARN_FROM_AGENCY_SHORT_TRIP
pub fn NETWORK_EARN_FIXER_AGENCY_SHORT_TRIP(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17629593029343911991)), p0, p1);
}
/// Used to be known as _NETWORK_EARN_FROM_AWARD_SHORT_TRIP
pub fn NETWORK_EARN_AWARD_SHORT_TRIP(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6579123458491720736)), p0, p1);
}
/// Used to be known as _NETWORK_EARN_RIVAL_DELIVERY_SECURITY_CONTRACT
pub fn NETWORK_EARN_FIXER_RIVAL_DELIVERY(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2548264574339652190)), p0, p1);
}
/// Used to be known as _NETWORK_EARN_FROM_UPGRADE_AGENCY_LOCATION
pub fn NETWORK_EARN_UPGRADE_AGENCY(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15023019067455115404)), p0, p1);
}
/// Used to be known as _NETWORK_SPENT_AGGREGATED_UTILITY_BILLS
pub fn NETWORK_SPEND_APARTMENT_UTILITIES(amount: c_int, p1: windows.BOOL, p2: windows.BOOL, data: [*c]types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(1320880373585870141)), amount, p1, p2, data);
}
/// Used to be known as _NETWORK_SPENT_BUSINESS_EXPENSES
pub fn NETWORK_SPEND_BUSINESS_PROPERTY_FEES(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(10579465535184437020)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_EARN_FROM_SIGHTSEEING
pub fn NETWORK_EARN_SIGHTSEEING_REWARD(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(4974360910261007276)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_EARN_FROM_BIKE_SHOP_BUSINESS
pub fn NETWORK_EARN_BIKER_SHOP(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3195314843191439959)), p0, p1);
}
/// Used to be known as _NETWORK_EARN_FROM_BIKER_INCOME
pub fn NETWORK_EARN_BIKER(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8196202981249966341)), p0);
}
/// Used to be known as _NETWORK_EARN_FROM_BUSINESS_HUB_SOURCE
pub fn NETWORK_YOHAN_SOURCE_GOODS(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(6433827236767904092)), p0, p1, p2, p3);
}
pub fn _NETWORK_SPEND_BUY_MFGARAGE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(11740100126188545043)), p0, p1, p2, p3);
}
pub fn _NETWORK_SPEND_UPGRADE_MFGARAGE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(14956230533997553219)), p0, p1, p2, p3);
}
pub fn _NETWORK_SPEND_BUY_SUPPLIES(p0: c_int, p1: windows.BOOL, p2: windows.BOOL, p3: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(13006824261898711403)), p0, p1, p2, p3);
}
pub fn _NETWORK_SPEND_BUY_ACID_LAB(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(17429610576408113490)), p0, p1, p2, p3);
}
pub fn _NETWORK_SPEND_UPGRADE_ACID_LAB_EQUIPMENT(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(1229176847321936166)), p0, p1, p2, p3);
}
pub fn _NETWORK_SPEND_UPGRADE_ACID_LAB_ARMOR(p0: c_int, p1: windows.BOOL, p2: windows.BOOL, p3: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(12093644708817285427)), p0, p1, p2, p3);
}
pub fn _NETWORK_SPEND_UPGRADE_ACID_LAB_SCOOP(p0: c_int, p1: windows.BOOL, p2: windows.BOOL, p3: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(2972469822534501100)), p0, p1, p2, p3);
}
pub fn _NETWORK_SPEND_UPGRADE_ACID_LAB_MINES(p0: c_int, p1: windows.BOOL, p2: windows.BOOL, p3: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(5447573278504539364)), p0, p1, p2, p3);
}
pub fn _NETWORK_SPEND_RENAME_ACID_LAB(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(9523737014006631913)), p0, p1, p2, p3);
}
pub fn _NETWORK_SPEND_RENAME_ACID_PRODUCT(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(4929076505035528152)), p0, p1, p2, p3);
}
pub fn _NETWORK_EARN_AWARD_JUGGALO_MISSION(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15992360717912769191)), p0, p1);
}
pub fn _NETWORK_EARN_AWARD_ACID_LAB(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15107349514671697187)), p0, p1);
}
pub fn _NETWORK_EARN_AWARD_DAILY_STASH(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14053008723885006082)), p0, p1);
}
pub fn _NETWORK_EARN_AWARD_DEAD_DROP(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14996629323904999158)), p0, p1);
}
pub fn _NETWORK_EARN_AWARD_RANDOM_EVENT(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13740406715331374933)), p0, p1);
}
pub fn _NETWORK_EARN_AWARD_TAXI(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12183493230567674789)), p0, p1);
}
pub fn _NETWORK_EARN_STREET_DEALER(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12110205709290110462)), p0, p1);
}
pub fn _NETWORK_EARN_SELL_ACID(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8770292515824131933)), p0, p1);
}
pub fn _NETWORK_EARN_SETUP_PARTICIPATION_ACID_LAB(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16398782007341479693)), p0, p1);
}
pub fn _NETWORK_EARN_SOURCE_PARTICIPATION_ACID_LAB(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1400357481965367373)), p0, p1);
}
pub fn _NETWORK_EARN_SELL_PARTICIPATION_ACID_LAB(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14573359981120026292)), p0, p1);
}
pub fn _NETWORK_EARN_JUGGALO_STORY_MISSION(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16149082232233211425)), p0, p1);
}
pub fn _NETWORK_EARN_JUGGALO_STORY_MISSION_PARTICIPATION(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4683581764213807196)), p0, p1);
}
/// JUGGALO_PHONE_MISSION...
pub fn _NETWORK_EARN_FOOLIGAN_JOB(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14863095579754750546)), p0, p1);
}
/// JUGGALO_PHONE_MISSION_PARTICIPATION...
pub fn _NETWORK_EARN_FOOLIGAN_JOB_PARTICIPATION(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14084648487807748464)), p0, p1);
}
pub fn _NETWORK_EARN_TAXI_JOB(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11033279815172555165)), p0, p1);
}
pub fn _NETWORK_EARN_DAILY_STASH_HOUSE_COMPLETED(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14608718918213635437)), p0, p1);
}
pub fn _NETWORK_EARN_DAILY_STASH_HOUSE_PARTICIPATION(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11244480914917221265)), p0, p1);
}
/// Used for SERVICE_EARN_AVENGER_OPERATIONS & SERVICE_EARN_AVENGER_OPS_BONUS
pub fn _NETWORK_EARN_AVENGER(amount: c_int, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6192456882840693789)), amount, p1);
}
pub fn _NETWORK_EARN_SMUGGLER_OPS(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(16042512185484207642)), p0, p1, p2);
}
pub fn _NETWORK_EARN_BONUS_OBJECTIVE(amount: c_int, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(15920110591849077143)), amount, p1, p2);
}
pub fn _NETWORK_EARN_PROGRESS_HUB(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17884685854030351516)), p0, p1);
}
pub fn _NETWORK_SPENT_AIR_FREIGHT(hangarCargoSourcingPrice: c_int, fromBank: windows.BOOL, fromBankAndWallet: windows.BOOL, cost: c_int, warehouseId: c_int, warehouseSlot: c_int) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(10123684522786154824)), hangarCargoSourcingPrice, fromBank, fromBankAndWallet, cost, warehouseId, warehouseSlot);
}
pub fn _NETWORK_SPENT_SKIP_CARGO_SOURCE_SETUP(amount: c_int, fromBank: windows.BOOL, fromBankAndWallet: windows.BOOL, cost: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(17085320511298481388)), amount, fromBank, fromBankAndWallet, cost);
}
/// Hash p3 = STEALTH_MODULE
pub fn _NETWORK_SPENT_STEALTH_MODULE(amount: c_int, fromBank: windows.BOOL, fromBankAndWallet: windows.BOOL, p3: types.Hash) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(10794699113201685370)), amount, fromBank, fromBankAndWallet, p3);
}
/// Hash p3 = MISSILE_JAMMER
pub fn _NETWORK_SPENT_MISSILE_JAMMER(amount: c_int, fromBank: windows.BOOL, fromBankAndWallet: windows.BOOL, p3: types.Hash) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(15458341904216843252)), amount, fromBank, fromBankAndWallet, p3);
}
pub fn _NETWORK_SPENT_GENERIC(price: c_int, p1: windows.BOOL, p2: windows.BOOL, stat: types.Hash, spent: types.Hash, p5: [*c]const u8, p6: [*c]const u8, data: [*c]types.Any) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(2883341869199111744)), price, p1, p2, stat, spent, p5, p6, data);
}
/// _NETWORK_EARN_G*
pub fn _NETWORK_EARN_GENERIC(amount: c_int, earn: types.Hash, p2: [*c]const u8, p3: [*c]const u8, data: [*c]types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(13797722728901968768)), amount, earn, p2, p3, data);
}
pub fn _NETWORK_CLEAR_TRANSACTION_TELEMETRY_NONCE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(16157683551854020841)));
}
pub fn NETWORK_GET_VC_BANK_BALANCE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(8570113532776560986)));
}
pub fn NETWORK_GET_VC_WALLET_BALANCE(characterSlot: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(11821839234496899253)), characterSlot);
}
pub fn NETWORK_GET_VC_BALANCE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(6681892132440906644)));
}
pub fn NETWORK_GET_EVC_BALANCE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(6709930207606202085)));
}
pub fn NETWORK_GET_PVC_BALANCE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(5716461793304574798)));
}
pub fn NETWORK_GET_STRING_WALLET_BALANCE(characterSlot: c_int) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(17992174435784700731)), characterSlot);
}
/// Used to be known as _NETWORK_GET_BANK_BALANCE_STRING
pub fn NETWORK_GET_STRING_BANK_BALANCE() [*c]const u8 {
return nativeCaller.invoke0(@as(u64, @intCast(12031992549528836993)));
}
pub fn NETWORK_GET_STRING_BANK_WALLET_BALANCE(character: c_int) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(8073536976916440797)), character);
}
/// Returns true if wallet balance >= amount.
/// Used to be known as _NETWORK_GET_VC_WALLET_BALANCE_IS_NOT_LESS_THAN
pub fn NETWORK_GET_CAN_SPEND_FROM_WALLET(amount: c_int, characterSlot: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(17103185420626541242)), amount, characterSlot);
}
/// Returns true if bank balance >= amount.
/// Used to be known as _NETWORK_GET_VC_BANK_BALANCE_IS_NOT_LESS_THAN
pub fn NETWORK_GET_CAN_SPEND_FROM_BANK(amount: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11754349537397533972)), amount);
}
/// Returns true if bank balance + wallet balance >= amount.
/// Used to be known as _NETWORK_GET_VC_BANK_WALLET_BALANCE_IS_NOT_LESS_THAN
pub fn NETWORK_GET_CAN_SPEND_FROM_BANK_AND_WALLET(amount: c_int, characterSlot: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(15859517473685087541)), amount, characterSlot);
}
/// Retturns the same value as NETWORK_GET_REMAINING_TRANSFER_BALANCE.
/// Used to be known as _NETWORK_GET_REMAINING_VC_DAILY_TRANSFERS
pub fn NETWORK_GET_PVC_TRANSFER_BALANCE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(1416626379868144883)));
}
/// Returns false if amount > wallet balance or daily transfer limit has been hit.
pub fn NETWORK_GET_CAN_TRANSFER_CASH(amount: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(642025377942586528)), amount);
}
pub fn NETWORK_CAN_RECEIVE_PLAYER_CASH(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(6708039462977417860)), p0, p1, p2, p3);
}
/// Returns the same value as NETWORK_GET_PVC_TRANSFER_BALANCE.
/// Used to be known as _NETWORK_GET_REMAINING_VC_DAILY_TRANSFERS_2
pub fn NETWORK_GET_REMAINING_TRANSFER_BALANCE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(16885695715281592731)));
}
/// Does nothing and always returns 0.
pub fn WITHDRAW_VC(amount: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(17802441345110447145)), amount);
}
/// Does nothing and always returns false.
pub fn DEPOSIT_VC(amount: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16312284946730948012)), amount);
}
/// This function is hard-coded to always return 1.
pub fn HAS_VC_WITHDRAWAL_COMPLETED(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16236801067431457468)), p0);
}
/// This function is hard-coded to always return 1.
pub fn WAS_VC_WITHDRAWAL_SUCCESSFUL(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8056814245717132379)), p0);
}
};
pub const NETSHOPPING = struct {
/// Used to be known as _NET_GAMESERVER_USE_SERVER_TRANSACTIONS
pub fn NET_GAMESERVER_USE_SERVER_TRANSACTIONS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9018186096283333131)));
}
/// Used to be known as _NETWORK_SHOP_IS_ITEM_UNLOCKED
/// Used to be known as _NETWORK_SHOP_DOES_ITEM_EXIST
/// Used to be known as _NET_GAMESERVER_CATALOG_ITEM_EXISTS
pub fn NET_GAMESERVER_CATALOG_ITEM_IS_VALID(name: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13640698138777941559)), name);
}
/// Used to be known as _NETWORK_SHOP_IS_ITEM_UNLOCKED_HASH
/// Used to be known as _NETWORK_SHOP_DOES_ITEM_EXIST_HASH
/// Used to be known as _NET_GAMESERVER_CATALOG_ITEM_EXISTS_HASH
pub fn NET_GAMESERVER_CATALOG_ITEM_KEY_IS_VALID(hash: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2629837696713026059)), hash);
}
/// bool is always true in game scripts
/// Used to be known as _NETWORK_SHOP_GET_PRICE
pub fn NET_GAMESERVER_GET_PRICE(itemHash: types.Hash, categoryHash: types.Hash, p2: windows.BOOL) c_int {
return nativeCaller.invoke3(@as(u64, @intCast(14010708620624046221)), itemHash, categoryHash, p2);
}
/// Used to be known as _NET_GAMESERVER_CATALOG_IS_READY
pub fn NET_GAMESERVER_CATALOG_IS_VALID() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(4342744675922939339)));
}
/// Used to be known as _NET_GAMESERVER_IS_CATALOG_VALID
pub fn NET_GAMESERVER_IS_CATALOG_CURRENT() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(3140304295617662826)));
}
/// Used to be known as _NET_GAMESERVER_GET_CATALOG_CRC
pub fn NET_GAMESERVER_GET_CATALOG_CLOUD_CRC() types.Hash {
return nativeCaller.invoke0(@as(u64, @intCast(9653124590307519439)));
}
pub fn NET_GAMESERVER_REFRESH_SERVER_CATALOG() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(3853697197642887350)));
}
/// Used to be known as _NET_GAMESERVER_GET_CATALOG_STATE
pub fn NET_GAMESERVER_RETRIEVE_CATALOG_REFRESH_STATUS(state: [*c]c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14931925339148836446)), state);
}
pub fn NET_GAMESERVER_INIT_SESSION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(16421716086407481069)));
}
pub fn NET_GAMESERVER_RETRIEVE_INIT_SESSION_STATUS(p0: [*c]c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(258336062401865260)), p0);
}
/// Used to be known as _NETWORK_SHOP_START_SESSION
pub fn NET_GAMESERVER_START_SESSION(charSlot: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11616380518993034247)), charSlot);
}
pub fn NET_GAMESERVER_START_SESSION_PENDING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8280848308694152875)));
}
pub fn NET_GAMESERVER_RETRIEVE_START_SESSION_STATUS(p0: [*c]c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1659875569343973561)), p0);
}
pub fn NET_GAMESERVER_RETRIEVE_SESSION_ERROR_CODE(p0: [*c]c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13924066701951229745)), p0);
}
/// Used to be known as _NETWORK_SHOP_GET_TRANSACTIONS_ENABLED_FOR_CHARACTER
pub fn NET_GAMESERVER_IS_SESSION_VALID(charSlot: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12848498453233286558)), charSlot);
}
pub fn NET_GAMESERVER_CLEAR_SESSION(p0: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8403995109182533189)), p0);
}
/// Used to be known as _NETWORK_SHOP_SESSION_APPLY_RECEIVED_DATA
pub fn NET_GAMESERVER_SESSION_APPLY_RECEIVED_DATA(charSlot: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3405237107956699633)), charSlot);
}
/// Used to be known as _NETWORK_SHOP_GET_TRANSACTIONS_DISABLED
pub fn NET_GAMESERVER_IS_SESSION_REFRESH_PENDING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9299515629782518777)));
}
/// Note: only one of the arguments can be set to true at a time
/// Used to be known as _NET_GAMESERVER_UPDATE_BALANCE
pub fn NET_GAMESERVER_START_SESSION_RESTART(inventory: windows.BOOL, playerbalance: windows.BOOL) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(3864567737719282938)), inventory, playerbalance);
}
pub fn NET_GAMESERVER_TRANSACTION_IN_PROGRESS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(7007339730010189497)));
}
/// Used to be known as _NET_GAMESERVER_GET_TRANSACTION_MANAGER_DATA
pub fn NET_GAMESERVER_GET_SESSION_STATE_AND_STATUS(p0: [*c]c_int, p1: [*c]windows.BOOL) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(9904598459991998768)), p0, p1);
}
/// Used to be known as _NETWORK_SHOP_BASKET_START
pub fn NET_GAMESERVER_BASKET_START(transactionId: [*c]c_int, categoryHash: types.Hash, actionHash: types.Hash, flags: c_int) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(2855010247841586046)), transactionId, categoryHash, actionHash, flags);
}
/// Used to be known as _NET_GAMESERVER_BASKET_DELETE
pub fn NET_GAMESERVER_BASKET_END() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(18028875226120495312)));
}
/// Used to be known as _NETWORK_SHOP_BASKET_END
/// Used to be known as NET_GAMESERVER_BASKET_END
pub fn NET_GAMESERVER_BASKET_IS_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(11985600410337602086)));
}
/// Used to be known as _NETWORK_SHOP_BASKET_ADD_ITEM
pub fn NET_GAMESERVER_BASKET_ADD_ITEM(itemData: [*c]types.Any, quantity: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(17512669851184715894)), itemData, quantity);
}
/// Used to be known as _NETWORK_SHOP_BASKET_IS_FULL
pub fn NET_GAMESERVER_BASKET_IS_FULL() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(2879890087697109774)));
}
/// Used to be known as _NETWORK_SHOP_BASKET_APPLY_SERVER_DATA
pub fn NET_GAMESERVER_BASKET_APPLY_SERVER_DATA(p0: types.Any, p1: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(16258070584803096594)), p0, p1);
}
/// Used to be known as _NETWORK_SHOP_CHECKOUT_START
pub fn NET_GAMESERVER_CHECKOUT_START(transactionId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4160900452576970982)), transactionId);
}
/// Used to be known as _NETWORK_SHOP_BEGIN_SERVICE
pub fn NET_GAMESERVER_BEGIN_SERVICE(transactionId: [*c]c_int, categoryHash: types.Hash, itemHash: types.Hash, actionTypeHash: types.Hash, value: c_int, flags: c_int) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(4350428291716962350)), transactionId, categoryHash, itemHash, actionTypeHash, value, flags);
}
/// Used to be known as _NETWORK_SHOP_END_SERVICE
/// Used to be known as _NETWORK_SHOP_TERMINATE_SERVICE
pub fn NET_GAMESERVER_END_SERVICE(transactionId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16332755515527131135)), transactionId);
}
/// Used to be known as _NET_GAMESERVER_DELETE_CHARACTER_SLOT
pub fn NET_GAMESERVER_DELETE_CHARACTER(slot: c_int, transfer: windows.BOOL, reason: types.Hash) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(5904686286018260845)), slot, transfer, reason);
}
/// Used to be known as _NET_GAMESERVER_DELETE_CHARACTER_SLOT_GET_STATUS
pub fn NET_GAMESERVER_DELETE_CHARACTER_GET_STATUS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(751417507822812553)));
}
/// Used to be known as _NETWORK_SHOP_DELETE_SET_TELEMETRY_NONCE_SEED
pub fn NET_GAMESERVER_DELETE_SET_TELEMETRY_NONCE_SEED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(1237626875751240607)));
}
/// Used to be known as _NETWORK_TRANSFER_BANK_TO_WALLET
/// Used to be known as _NET_GAMESERVER_TRANSFER_BANK_TO_WALLET
pub fn NET_GAMESERVER_TRANSFER_BANK_TO_WALLET(charSlot: c_int, amount: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(15310598380377818909)), charSlot, amount);
}
/// Used to be known as _NETWORK_TRANSFER_WALLET_TO_BANK
/// Used to be known as _NET_GAMESERVER_TRANSFER_WALLET_TO_BANK
pub fn NET_GAMESERVER_TRANSFER_WALLET_TO_BANK(charSlot: c_int, amount: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(14048977195193867389)), charSlot, amount);
}
/// Same as 0x350AA5EBC03D3BD2
/// Used to be known as _NET_GAMESERVER_TRANSFER_CASH_GET_STATUS
pub fn NET_GAMESERVER_TRANSFER_BANK_TO_WALLET_GET_STATUS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(2555967024569568836)));
}
/// Same as 0x23789E777D14CE44
/// Used to be known as _NET_GAMESERVER_TRANSFER_CASH_GET_STATUS_2
pub fn NET_GAMESERVER_TRANSFER_WALLET_TO_BANK_GET_STATUS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(3822049665738423250)));
}
/// Used to be NETWORK_SHOP_CASH_TRANSFER_SET_TELEMETRY_NONCE_SEED
/// Used to be known as _NETWORK_SHOP_CASH_TRANSFER_SET_TELEMETRY_NONCE_SEED
/// Used to be known as _NET_GAMESERVER_TRANSFER_CASH_SET_TELEMETRY_NONCE_SEED
pub fn NET_GAMESERVER_TRANSFER_CASH_SET_TELEMETRY_NONCE_SEED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(5299643871794264183)));
}
/// Used to be known as _NETWORK_SHOP_SET_TELEMETRY_NONCE_SEED
pub fn NET_GAMESERVER_SET_TELEMETRY_NONCE_SEED(p0: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10738785100885451182)), p0);
}
};
pub const NETWORK = struct {
/// Online version is defined here: update\update.rpf\common\data\version.txt
/// Example:
/// [ONLINE_VERSION_NUMBER]
/// 1.33
/// _GET_ONLINE_VERSION() will return "1.33"
/// Used to be known as _GET_GAME_VERSION
/// Used to be known as _GET_ONLINE_VERSION
pub fn GET_ONLINE_VERSION() [*c]const u8 {
return nativeCaller.invoke0(@as(u64, @intCast(18206143712130542602)));
}
/// Returns whether the player is signed into Social Club.
pub fn NETWORK_IS_SIGNED_IN() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(379239880906107798)));
}
/// Returns whether the game is not in offline mode.
/// seemed not to work for some ppl
pub fn NETWORK_IS_SIGNED_ONLINE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(1186549578762377154)));
}
/// This function is hard-coded to always return 1.
pub fn NETWORK_IS_NP_AVAILABLE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(13642631721288926615)));
}
/// This function is hard-coded to always return 1.
pub fn NETWORK_IS_NP_PENDING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(16990596937483039988)));
}
/// Hardcoded to return zero.
/// ==== PS4 specific info ====
/// Returns some sort of unavailable reason:
/// -1 = REASON_INVALID
/// 0 = REASON_OTHER
/// 1 = REASON_SYSTEM_UPDATE
/// 2 = REASON_GAME_UPDATE
/// 3 = REASON_SIGNED_OUT
/// 4 = REASON_AGE
/// 5 = REASON_CONNECTION
/// =================================
pub fn NETWORK_GET_NP_UNAVAILABLE_REASON() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(8429399477241057193)));
}
/// This function is hard-coded to always return 1.
pub fn NETWORK_IS_CONNETED_TO_NP_PRESENCE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8649270420731536091)));
}
/// This function is hard-coded to always return 0.
pub fn NETWORK_IS_LOGGED_IN_TO_PSN() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(11599670405247116366)));
}
/// Returns whether the signed-in user has valid Rockstar Online Services (ROS) credentials.
/// Used to be known as _NETWORK_ARE_ROS_AVAILABLE
/// Used to be known as NETWORK_HAVE_JUST_UPLOAD_LATER
pub fn NETWORK_HAS_VALID_ROS_CREDENTIALS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9602870625939551547)));
}
pub fn NETWORK_IS_REFRESHING_ROS_CREDENTIALS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(10165158834549508556)));
}
pub fn NETWORK_IS_CLOUD_AVAILABLE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(11118530911209485058)));
}
pub fn NETWORK_HAS_SOCIAL_CLUB_ACCOUNT() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(7468472959017996278)));
}
pub fn NETWORK_ARE_SOCIAL_CLUB_POLICIES_CURRENT() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(13445344229290641615)));
}
/// If you are host, returns true else returns false.
pub fn NETWORK_IS_HOST() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(10210389022571616775)));
}
/// Used to be known as _NETWORK_GET_HOST
pub fn NETWORK_GET_HOST_PLAYER_INDEX() types.Player {
return nativeCaller.invoke0(@as(u64, @intCast(9390563314814148552)));
}
pub fn NETWORK_WAS_GAME_SUSPENDED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(4771537563777076137)));
}
pub fn NETWORK_HAVE_ONLINE_PRIVILEGES() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(2723370039557214307)));
}
/// Used to be known as _NETWORK_HAS_AGE_RESTRICTED_PROFILE
pub fn NETWORK_HAS_AGE_RESTRICTIONS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(1392729932145385991)));
}
pub fn NETWORK_HAVE_USER_CONTENT_PRIVILEGES(p0: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8275673044451249236)), p0);
}
pub fn NETWORK_HAVE_COMMUNICATION_PRIVILEGES(p0: c_int, player: types.Player) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(12605373931461201532)), p0, player);
}
/// Appears to be PlayStation-specific. Always returns true on other platforms if signed in with the primary user profile
pub fn _NETWORK_HAVE_PLATFORM_COMMUNICATION_PRIVILEGES() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(16276049774281232974)));
}
pub fn NETWORK_CHECK_ONLINE_PRIVILEGES(p0: types.Any, p1: windows.BOOL) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(8661015725816666317)), p0, p1);
}
pub fn NETWORK_CHECK_USER_CONTENT_PRIVILEGES(p0: c_int, p1: c_int, p2: windows.BOOL) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(6439868769262579161)), p0, p1, p2);
}
pub fn NETWORK_CHECK_COMMUNICATION_PRIVILEGES(p0: c_int, p1: c_int, p2: windows.BOOL) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(9507816676892868538)), p0, p1, p2);
}
pub fn NETWORK_CHECK_TEXT_COMMUNICATION_PRIVILEGES(p0: types.Any, p1: types.Any, p2: types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(570465608387534233)), p0, p1, p2);
}
pub fn NETWORK_IS_USING_ONLINE_PROMOTION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(10406873271788432548)));
}
pub fn NETWORK_SHOULD_SHOW_PROMOTION_ALERT_SCREEN() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(160663606279390372)));
}
pub fn NETWORK_HAS_SOCIAL_NETWORKING_SHARING_PRIV() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8556562192993965301)));
}
pub fn NETWORK_GET_AGE_GROUP() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(10814469951324919851)));
}
pub fn NETWORK_CHECK_PRIVILEGES(p0: types.Any, p1: types.Any, p2: types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(934158623844135160)), p0, p1, p2);
}
/// Hardcoded to return false.
pub fn NETWORK_IS_PRIVILEGE_CHECK_IN_PROGRESS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(7270433556101626739)));
}
pub fn NETWORK_SET_PRIVILEGE_CHECK_RESULT_NOT_NEEDED() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(2268621601238811172)));
}
/// Hardcoded to return true.
pub fn NETWORK_RESOLVE_PRIVILEGE_USER_CONTENT() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(16037922477509689202)));
}
/// Used to be known as _NETWORK_HAVE_ONLINE_PRIVILEGE_2
pub fn NETWORK_HAVE_PLATFORM_SUBSCRIPTION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6820566196397892871)));
}
pub fn NETWORK_IS_PLATFORM_SUBSCRIPTION_CHECK_PENDING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(12154289904339298504)));
}
pub fn NETWORK_SHOW_ACCOUNT_UPGRADE_UI() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(9511194984512565271)));
}
pub fn NETWORK_IS_SHOWING_SYSTEM_UI_OR_RECENTLY_REQUESTED_UPSELL() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8613380446150369666)));
}
pub fn NETWORK_NEED_TO_START_NEW_GAME_BUT_BLOCKED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6035118770407928521)));
}
pub fn NETWORK_CAN_BAIL() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6344696953694702689)));
}
pub fn NETWORK_BAIL(p0: c_int, p1: c_int, p2: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(10777470535143963176)), p0, p1, p2);
}
pub fn NETWORK_ON_RETURN_TO_SINGLE_PLAYER() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(2899016761896607387)));
}
pub fn NETWORK_TRANSITION_START(p0: c_int, p1: types.Any, p2: types.Any, p3: types.Any) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(10038519691265257967)), p0, p1, p2, p3);
}
/// Used to be known as _NETWORK_TRANSITION_TRACK
pub fn NETWORK_TRANSITION_ADD_STAGE(hash: types.Hash, p1: c_int, p2: c_int, state: c_int, p4: c_int) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(14105253769309203117)), hash, p1, p2, state, p4);
}
pub fn NETWORK_TRANSITION_FINISH(p0: types.Any, p1: types.Any, p2: types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(329196262716571991)), p0, p1, p2);
}
/// 11 - Need to download tunables.
/// 12 - Need to download background script.
/// Returns 1 if the multiplayer is loaded, otherwhise 0.
pub fn NETWORK_CAN_ACCESS_MULTIPLAYER(loadingState: [*c]c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12632836761044327332)), loadingState);
}
pub fn NETWORK_IS_MULTIPLAYER_DISABLED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(10900726674967654106)));
}
pub fn NETWORK_CAN_ENTER_MULTIPLAYER() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9113080648447700005)));
}
pub fn NETWORK_SESSION_DO_FREEROAM_QUICKMATCH(p0: types.Any, p1: types.Any, p2: types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(3679111936845386575)), p0, p1, p2);
}
/// Used to be known as NETWORK_SESSION_FRIEND_MATCHMAKING
pub fn NETWORK_SESSION_DO_FRIEND_MATCHMAKING(p0: c_int, p1: c_int, p2: c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(3241596539743226260)), p0, p1, p2);
}
/// p4 seems to be unused in 1.60/build 2628
/// Used to be known as NETWORK_SESSION_CREW_MATCHMAKING
pub fn NETWORK_SESSION_DO_CREW_MATCHMAKING(crewId: c_int, p1: c_int, p2: c_int, maxPlayers: c_int) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(10717531275555344767)), crewId, p1, p2, maxPlayers);
}
/// Used to be known as NETWORK_SESSION_ACTIVITY_QUICKMATCH
pub fn NETWORK_SESSION_DO_ACTIVITY_QUICKMATCH(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(13708452016629279618)), p0, p1, p2, p3, p4);
}
/// Does nothing in online but in offline it will cause the screen to fade to black. Nothing happens past then, the screen will sit at black until you restart GTA. Other stuff must be needed to actually host a session.
pub fn NETWORK_SESSION_HOST(p0: c_int, maxPlayers: c_int, p2: windows.BOOL) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(8015649608906892829)), p0, maxPlayers, p2);
}
pub fn NETWORK_SESSION_HOST_CLOSED(p0: c_int, maxPlayers: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(17092498417382951863)), p0, maxPlayers);
}
/// Does nothing in online but in offline it will cause the screen to fade to black. Nothing happens past then, the screen will sit at black until you restart GTA. Other stuff must be needed to actually host a session.
pub fn NETWORK_SESSION_HOST_FRIENDS_ONLY(p0: c_int, maxPlayers: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(13389151640189635971)), p0, maxPlayers);
}
pub fn NETWORK_SESSION_IS_CLOSED_FRIENDS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(18144900550378940560)));
}
pub fn NETWORK_SESSION_IS_CLOSED_CREW() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8391099375925699252)));
}
pub fn NETWORK_SESSION_IS_SOLO() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(17551262373996006606)));
}
pub fn NETWORK_SESSION_IS_PRIVATE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14913400397865982881)));
}
pub fn _NETWORK_SESSION_LEAVE_INCLUDING_REASON(leaveFlags: c_int, leaveReason: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(16146111825373551092)), leaveFlags, leaveReason);
}
/// p0 is always false and p1 varies.
/// NETWORK_SESSION_END(0, 1)
/// NETWORK_SESSION_END(0, 0)
/// Results in: "Connection to session lost due to an unknown network error. Please return to Grand Theft Auto V and try again later."
pub fn NETWORK_SESSION_END(p0: windows.BOOL, p1: windows.BOOL) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(11542261121661603846)), p0, p1);
}
pub fn NETWORK_SESSION_LEAVE(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13345601690847697073)), p0);
}
/// Only works as host.
pub fn NETWORK_SESSION_KICK_PLAYER(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18052965925827658272)), player);
}
/// Used to be known as _NETWORK_SESSION_ARE_PLAYERS_VOTING_TO_KICK
/// Used to be known as _NETWORK_SESSION_IS_PLAYER_VOTED_TO_KICK
pub fn NETWORK_SESSION_GET_KICK_VOTE(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15479041721659334385)), player);
}
pub fn NETWORK_SESSION_RESERVE_SLOTS_TRANSITION(p0: types.Any, p1: types.Any, p2: types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(296251495686903014)), p0, p1, p2);
}
pub fn NETWORK_JOIN_PREVIOUSLY_FAILED_SESSION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6476028042681886688)));
}
pub fn NETWORK_JOIN_PREVIOUSLY_FAILED_TRANSITION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(18438270926037003060)));
}
/// Used to be known as _NETWORK_SCTV_SLOTS
pub fn NETWORK_SESSION_SET_MATCHMAKING_GROUP(matchmakingGroup: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5326773407029747595)), matchmakingGroup);
}
/// playerType is an unsigned int from 0 to 4
/// 0 = regular joiner
/// 4 = spectator
/// Used to be known as _NETWORK_SESSION_SET_MAX_PLAYERS
pub fn NETWORK_SESSION_SET_MATCHMAKING_GROUP_MAX(playerType: c_int, playerCount: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10045927477498143253)), playerType, playerCount);
}
/// Used to be known as _NETWORK_SESSION_GET_UNK
pub fn NETWORK_SESSION_GET_MATCHMAKING_GROUP_FREE(p0: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(6255079904156517387)), p0);
}
/// groupId range: [0, 4]
pub fn NETWORK_SESSION_ADD_ACTIVE_MATCHMAKING_GROUP(groupId: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14620196531724584796)), groupId);
}
pub fn NETWORK_SESSION_SET_UNIQUE_CREW_LIMIT(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17625606940922290775)), p0);
}
pub fn NETWORK_SESSION_GET_UNIQUE_CREW_LIMIT() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(14828443442965498739)));
}
pub fn NETWORK_SESSION_SET_UNIQUE_CREW_LIMIT_TRANSITION(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5193138193310285013)), p0);
}
pub fn NETWORK_SESSION_SET_UNIQUE_CREW_ONLY_CREWS_TRANSITION(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6141154985024726330)), p0);
}
pub fn NETWORK_SESSION_SET_CREW_LIMIT_MAX_MEMBERS_TRANSITION(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8082770379737802041)), p0);
}
pub fn NETWORK_SESSION_SET_MATCHMAKING_PROPERTY_ID(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4562965011801491658)), p0);
}
/// p0 in the decompiled scripts is always the stat mesh_texblend * 0.07 to int
pub fn NETWORK_SESSION_SET_MATCHMAKING_MENTAL_STATE(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17433050280521344669)), p0);
}
pub fn NETWORK_SESSION_SET_NUM_BOSSES(num: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6472835296025215834)), num);
}
pub fn NETWORK_SESSION_SET_SCRIPT_VALIDATE_JOIN() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(1248616410999489820)));
}
/// Used to be known as _NETWORK_SESSION_HOSTED
pub fn NETWORK_SESSION_VALIDATE_JOIN(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13951989529778169599)), p0);
}
/// ..
pub fn NETWORK_ADD_FOLLOWERS(p0: [*c]c_int, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2550170942847456982)), p0, p1);
}
pub fn NETWORK_CLEAR_FOLLOWERS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(400613574254813978)));
}
/// Used to be known as _NETWORK_GET_SERVER_TIME
pub fn NETWORK_GET_GLOBAL_MULTIPLAYER_CLOCK(hours: [*c]c_int, minutes: [*c]c_int, seconds: [*c]c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(7855332995215600130)), hours, minutes, seconds);
}
pub fn NETWORK_SESSION_SET_GAMEMODE(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6921905853196577646)), p0);
}
/// Used to be known as _NETWORK_GET_TARGETING_MODE
pub fn NETWORK_SESSION_GET_HOST_AIM_PREFERENCE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(16139313267567506196)));
}
/// Used to be known as NETWORK_X_AFFECTS_GAMERS
pub fn NETWORK_FIND_GAMERS_IN_CREW(crewId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16515498633516961066)), crewId);
}
/// Uses attributes to find players with similar stats. Upper/Lower limit must be above zero or the fallback limit +/-0.1 is used.
/// There can be up to 15 attributes, they are as follows:
/// 0 = Races
/// 1 = Parachuting
/// 2 = Horde
/// 3 = Darts
/// 4 = Arm Wrestling
/// 5 = Tennis
/// 6 = Golf
/// 7 = Shooting Range
/// 8 = Deathmatch
/// 9 = MPPLY_MCMWIN/MPPLY_CRMISSION
pub fn NETWORK_FIND_MATCHED_GAMERS(attribute: c_int, fallbackLimit: f32, lowerLimit: f32, upperLimit: f32) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(17848556827166339085)), attribute, fallbackLimit, lowerLimit, upperLimit);
}
pub fn NETWORK_IS_FINDING_GAMERS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(15987608017109315754)));
}
pub fn NETWORK_DID_FIND_GAMERS_SUCCEED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(17994197695905761379)));
}
pub fn NETWORK_GET_NUM_FOUND_GAMERS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(11650886927529875195)));
}
pub fn NETWORK_GET_FOUND_GAMER(p0: [*c]types.Any, p1: types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(11371574420629566582)), p0, p1);
}
pub fn NETWORK_CLEAR_FOUND_GAMERS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(7860132572699834394)));
}
/// Used to be known as _NETWORK_GET_GAMER_STATUS
pub fn NETWORK_QUEUE_GAMER_FOR_STATUS(p0: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9628959150142687276)), p0);
}
pub fn NETWORK_GET_GAMER_STATUS_FROM_QUEUE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(3226909021043692691)));
}
pub fn NETWORK_IS_GETTING_GAMER_STATUS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(10711874716929032506)));
}
pub fn NETWORK_DID_GET_GAMER_STATUS_SUCCEED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6548652132196988913)));
}
pub fn NETWORK_GET_GAMER_STATUS_RESULT(p0: [*c]types.Any, p1: types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(191612746030839392)), p0, p1);
}
pub fn NETWORK_CLEAR_GET_GAMER_STATUS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(9718880207512573293)));
}
/// Used to be known as NETWORK_IS_PLAYER_ANIMATION_DRAWING_SYNCHRONIZED
pub fn NETWORK_SESSION_JOIN_INVITE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(14337398024027361082)));
}
pub fn NETWORK_SESSION_CANCEL_INVITE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(3440547468879410937)));
}
pub fn NETWORK_SESSION_FORCE_CANCEL_INVITE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(11714276010390935108)));
}
pub fn NETWORK_HAS_PENDING_INVITE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(12433448579207833192)));
}
pub fn NETWORK_HAS_CONFIRMED_INVITE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14136191625950344289)));
}
/// Triggers a CEventNetworkInviteConfirmed event
/// Used to be known as _NETWORK_ACCEPT_INVITE
pub fn NETWORK_REQUEST_INVITE_CONFIRMED_EVENT() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(7106725756288487091)));
}
pub fn NETWORK_SESSION_WAS_INVITED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(2584983741619047652)));
}
pub fn NETWORK_SESSION_GET_INVITER(gamerHandle: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16533725459096182224)), gamerHandle);
}
/// Seems to be true while "Getting GTA Online session details" shows up.
pub fn NETWORK_SESSION_IS_AWAITING_INVITE_RESPONSE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(15209745021743591732)));
}
pub fn NETWORK_SESSION_IS_DISPLAYING_INVITE_CONFIRMATION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(13670387069751194504)));
}
pub fn NETWORK_SUPPRESS_INVITE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11558538368063093309)), toggle);
}
pub fn NETWORK_BLOCK_INVITES(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3817338365050922912)), toggle);
}
/// Used to be known as _NETWORK_BLOCK_INVITES_2
pub fn NETWORK_BLOCK_JOIN_QUEUE_INVITES(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14982221358702907579)), toggle);
}
pub fn NETWORK_SET_CAN_RECEIVE_RS_INVITES(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7536778462104616861)), p0);
}
pub fn NETWORK_STORE_INVITE_THROUGH_RESTART() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(17876192950008927968)));
}
/// Used to be known as _NETWORK_BLOCK_KICKED_PLAYERS
pub fn NETWORK_ALLOW_INVITE_PROCESS_IN_PLAYER_SWITCH(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7712337182605247349)), p0);
}
pub fn NETWORK_SET_SCRIPT_READY_FOR_EVENTS(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8847130222610807584)), toggle);
}
pub fn NETWORK_IS_OFFLINE_INVITE_PENDING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8388380318487740882)));
}
pub fn NETWORK_CLEAR_OFFLINE_INVITE_PENDING() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(1445209372988412366)));
}
/// Retrieves the failed invite join alert reason
pub fn _NETWORK_INVITE_GET_JOIN_FAIL_REASON() [*c]const u8 {
return nativeCaller.invoke0(@as(u64, @intCast(8877544312361010619)));
}
/// Clears the failed invite join alert reason
pub fn _NETWORK_INVITE_CLEAR_JOIN_FAIL_REASON() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(10301409657525374850)));
}
/// Loads up the map that is loaded when beeing in mission creator
/// Player gets placed in a mix between online/offline mode
/// p0 is always 2 in R* scripts.
/// Appears to be patched in gtav b757 (game gets terminated) alonside with most other network natives to prevent online modding ~ghost30812
pub fn NETWORK_SESSION_HOST_SINGLE_PLAYER(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14360910471973328597)), p0);
}
pub fn NETWORK_SESSION_LEAVE_SINGLE_PLAYER() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(3765703441783795114)));
}
pub fn NETWORK_IS_GAME_IN_PROGRESS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(1223487422827645399)));
}
pub fn NETWORK_IS_SESSION_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(15581376729331042688)));
}
pub fn NETWORK_IS_IN_SESSION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14598176716237453591)));
}
/// Hardcoded to return 0.
pub fn _NETWORK_IS_AMERICAS_VERSION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(185418888763592380)));
}
/// This checks if player is playing on gta online or not.
/// Please add an if and block your mod if this is "true".
pub fn NETWORK_IS_SESSION_STARTED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(11377821997192667199)));
}
pub fn NETWORK_IS_SESSION_BUSY() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(17601014464195498078)));
}
pub fn NETWORK_CAN_SESSION_END() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(5686853811537823090)));
}
pub fn NETWORK_GET_GAME_MODE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(5516966813216858630)));
}
pub fn NETWORK_SESSION_MARK_VISIBLE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2818345906077432229)), toggle);
}
pub fn NETWORK_SESSION_IS_VISIBLE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(13421128661309933930)));
}
pub fn NETWORK_SESSION_BLOCK_JOIN_REQUESTS(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12048931413310846915)), toggle);
}
/// num player slots allowed in session, seems to work? 32 max
pub fn NETWORK_SESSION_CHANGE_SLOTS(slots: c_int, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13018571294932118702)), slots, p1);
}
pub fn NETWORK_SESSION_GET_PRIVATE_SLOTS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(6030274049712124665)));
}
pub fn NETWORK_SESSION_VOICE_HOST() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(11246990685066641968)));
}
pub fn NETWORK_SESSION_VOICE_LEAVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(7463559884578707293)));
}
/// Used to be known as _NETWORK_VOICE_CONNECT_TO_PLAYER
pub fn NETWORK_SESSION_VOICE_CONNECT_TO_PLAYER(gamerHandle: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12382058436541365682)), gamerHandle);
}
/// Used to be known as NETWORK_SET_KEEP_FOCUSPOINT
pub fn NETWORK_SESSION_VOICE_RESPOND_TO_REQUEST(p0: windows.BOOL, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9188490820673251001)), p0, p1);
}
pub fn NETWORK_SESSION_VOICE_SET_TIMEOUT(timeout: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6597443441721419697)), timeout);
}
pub fn NETWORK_SESSION_IS_IN_VOICE_SESSION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9609489219226891908)));
}
pub fn NETWORK_SESSION_IS_VOICE_SESSION_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(13101891867505943848)));
}
pub fn NETWORK_SESSION_IS_VOICE_SESSION_BUSY() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(17224318994409114443)));
}
/// Message is limited to 64 characters.
pub fn NETWORK_SEND_TEXT_MESSAGE(message: [*c]const u8, gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(4188716190782828800)), message, gamerHandle);
}
pub fn NETWORK_SET_ACTIVITY_SPECTATOR(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8436235582563523188)), toggle);
}
pub fn NETWORK_IS_ACTIVITY_SPECTATOR() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(1301605842312729339)));
}
pub fn NETWORK_SET_ACTIVITY_PLAYER_MAX(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1031174745549655428)), p0);
}
pub fn NETWORK_SET_ACTIVITY_SPECTATOR_MAX(maxSpectators: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11324155538302902818)), maxSpectators);
}
pub fn NETWORK_GET_ACTIVITY_PLAYER_NUM(p0: windows.BOOL) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(8350435671794361762)), p0);
}
pub fn NETWORK_IS_ACTIVITY_SPECTATOR_FROM_HANDLE(gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2838318530915974329)), gamerHandle);
}
/// p0: Unknown int
/// p1: Unknown int
/// p2: Unknown int
/// p3: Unknown int
/// p4: Unknown always 0 in decompiled scripts
/// p5: BOOL purpose unknown, both 0 and 1 are used in decompiled scripts.
/// p6: BOOL purpose unknown, both 0 and 1 are used in decompiled scripts.
/// p7: Unknown int, it's an int according to decompiled scripts, however the value is always 0 or 1.
/// p8: Unknown int, it's an int according to decompiled scripts, however the value is always 0 or 1.
/// p9: Unknown int, sometimes 0, but also 32768 or 16384 appear in decompiled scripst, maybe a flag of some sort?
/// From what I can tell it looks like it does the following:
/// Creates/hosts a new transition to another online session, using this in FiveM will result in other players being disconencted from the server/preventing them from joining. This is most likely because I entered the wrong session parameters since they're pretty much all unknown right now.
/// You also need to use `NetworkJoinTransition(Player player)` and `NetworkLaunchTransition()`.
pub fn NETWORK_HOST_TRANSITION(p0: c_int, p1: c_int, p2: c_int, p3: c_int, p4: types.Any, p5: windows.BOOL, p6: windows.BOOL, p7: c_int, p8: types.Any, p9: c_int) windows.BOOL {
return nativeCaller.invoke10(@as(u64, @intCast(11964856732014588500)), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9);
}
pub fn NETWORK_DO_TRANSITION_QUICKMATCH(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(8213174549623168342)), p0, p1, p2, p3, p4, p5);
}
pub fn NETWORK_DO_TRANSITION_QUICKMATCH_ASYNC(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(11570211317688070885)), p0, p1, p2, p3, p4, p5);
}
pub fn NETWORK_DO_TRANSITION_QUICKMATCH_WITH_GROUP(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: [*c]types.Any, p5: types.Any, p6: types.Any, p7: types.Any) windows.BOOL {
return nativeCaller.invoke8(@as(u64, @intCast(11262013399182985610)), p0, p1, p2, p3, p4, p5, p6, p7);
}
pub fn NETWORK_JOIN_GROUP_ACTIVITY() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(11557654629731871716)));
}
pub fn NETWORK_CLEAR_GROUP_ACTIVITY() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(1767778616599332241)));
}
pub fn NETWORK_RETAIN_ACTIVITY_GROUP() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(12771796116134273980)));
}
pub fn NETWORK_IS_TRANSITION_CLOSED_FRIENDS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(7283013694515547216)));
}
pub fn NETWORK_IS_TRANSITION_CLOSED_CREW() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(990050289851296827)));
}
pub fn NETWORK_IS_TRANSITION_SOLO() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6756937795650164234)));
}
pub fn NETWORK_IS_TRANSITION_PRIVATE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6515200474330247654)));
}
pub fn NETWORK_GET_NUM_TRANSITION_NON_ASYNC_GAMERS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(7025415043014353237)));
}
pub fn NETWORK_MARK_AS_PREFERRED_ACTIVITY(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2746799594104896832)), p0);
}
pub fn NETWORK_MARK_AS_WAITING_ASYNC(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4148235387500820753)), p0);
}
pub fn NETWORK_SET_IN_PROGRESS_FINISH_TIME(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3236356806071660237)), p0);
}
pub fn NETWORK_SET_TRANSITION_CREATOR_HANDLE(p0: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17232588137186265045)), p0);
}
pub fn NETWORK_CLEAR_TRANSITION_CREATOR_HANDLE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(18100655345302161241)));
}
pub fn NETWORK_INVITE_GAMERS_TO_TRANSITION(p0: [*c]types.Any, p1: types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5357414605704265590)), p0, p1);
}
pub fn NETWORK_SET_GAMER_INVITED_TO_TRANSITION(gamerHandle: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14568160127138844086)), gamerHandle);
}
pub fn NETWORK_LEAVE_TRANSITION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(15148449439529687833)));
}
pub fn NETWORK_LAUNCH_TRANSITION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(3300934890019555460)));
}
/// Appears to set whether a transition should be started when the session is migrating.
pub fn NETWORK_SET_DO_NOT_LAUNCH_FROM_JOIN_AS_MIGRATED_HOST(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11739126846226360525)), toggle);
}
/// Used to be known as _NETWORK_BAIL_TRANSITION_QUICKMATCH
pub fn NETWORK_CANCEL_TRANSITION_MATCHMAKING() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(159740278142764526)));
}
pub fn NETWORK_BAIL_TRANSITION(p0: c_int, p1: c_int, p2: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(16908045735013960987)), p0, p1, p2);
}
pub fn NETWORK_DO_TRANSITION_TO_GAME(p0: windows.BOOL, maxPlayers: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(4511396818418239920)), p0, maxPlayers);
}
pub fn NETWORK_DO_TRANSITION_TO_NEW_GAME(p0: windows.BOOL, maxPlayers: c_int, p2: windows.BOOL) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(5072730068775600180)), p0, maxPlayers, p2);
}
/// p2 is true 3/4 of the occurrences I found.
/// 'players' is the number of players for a session. On PS3/360 it's always 18. On PC it's 32.
pub fn NETWORK_DO_TRANSITION_TO_FREEMODE(p0: [*c]types.Any, p1: types.Any, p2: windows.BOOL, players: c_int, p4: windows.BOOL) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(4228188662541461663)), p0, p1, p2, players, p4);
}
pub fn NETWORK_DO_TRANSITION_TO_NEW_FREEMODE(p0: [*c]types.Any, p1: types.Any, players: c_int, p3: windows.BOOL, p4: windows.BOOL, p5: windows.BOOL) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(11421310875458992500)), p0, p1, players, p3, p4, p5);
}
pub fn NETWORK_IS_TRANSITION_TO_GAME() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(11346422169773698231)));
}
/// Returns count.
pub fn NETWORK_GET_TRANSITION_MEMBERS(data: [*c]types.Any, dataCount: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(8336163975343724585)), data, dataCount);
}
pub fn NETWORK_APPLY_TRANSITION_PARAMETER(p0: c_int, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5914977478991547672)), p0, p1);
}
pub fn NETWORK_APPLY_TRANSITION_PARAMETER_STRING(p0: c_int, string: [*c]const u8, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(17001021417627907481)), p0, string, p2);
}
pub fn NETWORK_SEND_TRANSITION_GAMER_INSTRUCTION(gamerHandle: [*c]types.Any, p1: [*c]const u8, p2: c_int, p3: c_int, p4: windows.BOOL) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(3589882067196993131)), gamerHandle, p1, p2, p3, p4);
}
pub fn NETWORK_MARK_TRANSITION_GAMER_AS_FULLY_JOINED(p0: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6280475758869872413)), p0);
}
pub fn NETWORK_IS_TRANSITION_HOST() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(829303998639972697)));
}
pub fn NETWORK_IS_TRANSITION_HOST_FROM_HANDLE(gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7736203095859685904)), gamerHandle);
}
pub fn NETWORK_GET_TRANSITION_HOST(gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7278990827236639582)), gamerHandle);
}
pub fn NETWORK_IS_IN_TRANSITION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(7495286035303993098)));
}
pub fn NETWORK_IS_TRANSITION_STARTED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6051293360723593214)));
}
pub fn NETWORK_IS_TRANSITION_BUSY() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(5913000372460136119)));
}
pub fn NETWORK_IS_TRANSITION_MATCHMAKING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(2964886736447430367)));
}
pub fn NETWORK_IS_TRANSITION_LEAVE_POSTPONED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14227382390502439977)));
}
pub fn NETWORK_TRANSITION_SET_IN_PROGRESS(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1411975427025712109)), p0);
}
pub fn NETWORK_TRANSITION_SET_CONTENT_CREATOR(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2273755940310455808)), p0);
}
pub fn NETWORK_TRANSITION_SET_ACTIVITY_ISLAND(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17794909855791903002)), p0);
}
pub fn NETWORK_OPEN_TRANSITION_MATCHMAKING() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(3114959857764241374)));
}
pub fn NETWORK_CLOSE_TRANSITION_MATCHMAKING() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(4896780203404091422)));
}
pub fn NETWORK_IS_TRANSITION_OPEN_TO_MATCHMAKING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(4009410126883190217)));
}
pub fn NETWORK_SET_TRANSITION_VISIBILITY_LOCK(p0: windows.BOOL, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(907352016830409772)), p0, p1);
}
pub fn NETWORK_IS_TRANSITION_VISIBILITY_LOCKED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(15034287464279875518)));
}
pub fn NETWORK_SET_TRANSITION_ACTIVITY_ID(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3521414185226275538)), p0);
}
pub fn NETWORK_CHANGE_TRANSITION_SLOTS(p0: types.Any, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17216599361375963527)), p0, p1);
}
pub fn NETWORK_TRANSITION_BLOCK_JOIN_REQUESTS(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10897997147803380918)), p0);
}
pub fn NETWORK_HAS_PLAYER_STARTED_TRANSITION(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11153671075701888917)), player);
}
pub fn NETWORK_ARE_TRANSITION_DETAILS_VALID(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2744286647084986561)), p0);
}
/// int handle[76];
/// NETWORK_HANDLE_FROM_FRIEND(iSelectedPlayer, &handle[0], 13);
/// Player uVar2 = NETWORK_GET_PLAYER_FROM_GAMER_HANDLE(&handle[0]);
/// NETWORK_JOIN_TRANSITION(uVar2);
/// nothing doin.
pub fn NETWORK_JOIN_TRANSITION(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11314743246248423962)), player);
}
pub fn NETWORK_HAS_INVITED_GAMER_TO_TRANSITION(p0: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8251901266330969807)), p0);
}
pub fn NETWORK_HAS_TRANSITION_INVITE_BEEN_ACKED(p0: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4582853247435437468)), p0);
}
pub fn NETWORK_IS_ACTIVITY_SESSION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(362913841291696122)));
}
pub fn NETWORK_DISABLE_REALTIME_MULTIPLAYER() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(2551577016155354445)));
}
/// Does nothing. It's just a nullsub.
pub fn NETWORK_SET_PRESENCE_SESSION_INVITES_BLOCKED(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5377260822310224951)), toggle);
}
/// Used to be known as _NETWORK_SEND_PRESENCE_INVITE
pub fn NETWORK_SEND_INVITE_VIA_PRESENCE(gamerHandle: [*c]types.Any, p1: [*c]const u8, dataCount: c_int, p3: c_int) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(14107427631987443236)), gamerHandle, p1, dataCount, p3);
}
/// Used to be known as _NETWORK_SEND_PRESENCE_TRANSITION_INVITE
pub fn NETWORK_SEND_TRANSITION_INVITE_VIA_PRESENCE(gamerHandle: [*c]types.Any, p1: [*c]const u8, dataCount: c_int, p3: c_int) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(13913589141289337489)), gamerHandle, p1, dataCount, p3);
}
/// Contains the string "NETWORK_SEND_PRESENCE_TRANSITION_INVITE" but so does 0xC116FF9B4D488291; seems to fit alphabetically here, tho.
/// Used to be known as _NETWORK_SEND_PRESENCE_TRANSITION_INVITE
pub fn NETWORK_SEND_IMPORTANT_TRANSITION_INVITE_VIA_PRESENCE(gamerHandle: [*c]types.Any, p1: [*c]const u8, dataCount: c_int, p3: c_int) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(1256972113491362230)), gamerHandle, p1, dataCount, p3);
}
pub fn NETWORK_GET_PRESENCE_INVITE_INDEX_BY_ID(p0: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(8370882150867877593)), p0);
}
pub fn NETWORK_GET_NUM_PRESENCE_INVITES() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(14914398631461189517)));
}
pub fn NETWORK_ACCEPT_PRESENCE_INVITE(p0: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(18055305899608738594)), p0);
}
pub fn NETWORK_REMOVE_PRESENCE_INVITE(p0: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(17303113892708840625)), p0);
}
pub fn NETWORK_GET_PRESENCE_INVITE_ID(p0: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(16136562696038302598)), p0);
}
pub fn NETWORK_GET_PRESENCE_INVITE_INVITER(p0: c_int) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(5288013533419881911)), p0);
}
pub fn NETWORK_GET_PRESENCE_INVITE_HANDLE(p0: types.Any, p1: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(4095374044269408117)), p0, p1);
}
pub fn NETWORK_GET_PRESENCE_INVITE_SESSION_ID(p0: types.Any) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(2801746490292190560)), p0);
}
pub fn NETWORK_GET_PRESENCE_INVITE_CONTENT_ID(p0: c_int) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(2612263451348480557)), p0);
}
pub fn NETWORK_GET_PRESENCE_INVITE_PLAYLIST_LENGTH(p0: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(15247851330257933759)), p0);
}
pub fn NETWORK_GET_PRESENCE_INVITE_PLAYLIST_CURRENT(p0: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(8254056637095792898)), p0);
}
pub fn NETWORK_GET_PRESENCE_INVITE_FROM_ADMIN(p0: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4449325468612022921)), p0);
}
pub fn NETWORK_GET_PRESENCE_INVITE_IS_TOURNAMENT(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9801748961635323397)), p0);
}
pub fn NETWORK_HAS_FOLLOW_INVITE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8564080086179946462)));
}
pub fn NETWORK_ACTION_FOLLOW_INVITE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14447924649977641173)));
}
pub fn NETWORK_CLEAR_FOLLOW_INVITE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(4871766576770453750)));
}
pub fn NETWORK_REMOVE_AND_CANCEL_ALL_INVITES() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(17003384706675108691)));
}
pub fn NETWORK_REMOVE_TRANSITION_INVITE(p0: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8441069727147030510)), p0);
}
pub fn NETWORK_REMOVE_ALL_TRANSITION_INVITE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(8245531772157322088)));
}
pub fn NETWORK_REMOVE_AND_CANCEL_ALL_TRANSITION_INVITES() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(17330840219808340990)));
}
pub fn NETWORK_INVITE_GAMERS(p0: [*c]types.Any, p1: types.Any, p2: [*c]types.Any, p3: types.Any) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(11349296585652774878)), p0, p1, p2, p3);
}
pub fn NETWORK_HAS_INVITED_GAMER(p0: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5586378002039008974)), p0);
}
/// Used to be known as NETWORK_HAS_INVITE_BEEN_ACKED
pub fn NETWORK_HAS_MADE_INVITE_DECISION(gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8204508897043661489)), gamerHandle);
}
pub fn NETWORK_GET_INVITE_REPLY_STATUS(p0: types.Any) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(4059427023289182386)), p0);
}
pub fn NETWORK_GET_CURRENTLY_SELECTED_GAMER_HANDLE_FROM_INVITE_MENU(p0: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8396994953546445436)), p0);
}
pub fn NETWORK_SET_CURRENTLY_SELECTED_GAMER_HANDLE_FROM_INVITE_MENU(p0: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8216525552331502011)), p0);
}
pub fn NETWORK_SET_INVITE_ON_CALL_FOR_INVITE_MENU(p0: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7417446885795930929)), p0);
}
pub fn NETWORK_CHECK_DATA_MANAGER_SUCCEEDED_FOR_HANDLE(p0: c_int, gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(4950437702671948462)), p0, gamerHandle);
}
pub fn NETWORK_CHECK_DATA_MANAGER_FOR_HANDLE(p0: types.Any, gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5392093731223933755)), p0, gamerHandle);
}
pub fn NETWORK_SET_INVITE_FAILED_MESSAGE_FOR_INVITE_MENU(p0: [*c]types.Any, p1: [*c]types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(970429159217093209)), p0, p1);
}
pub fn FILLOUT_PM_PLAYER_LIST(gamerHandle: [*c]types.Any, p1: types.Any, p2: types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(14681027015716784137)), gamerHandle, p1, p2);
}
pub fn FILLOUT_PM_PLAYER_LIST_WITH_NAMES(p0: [*c]types.Any, p1: [*c]types.Any, p2: types.Any, p3: types.Any) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(8172746593645650182)), p0, p1, p2, p3);
}
/// Used to be known as USING_NETWORK_WEAPONTYPE
pub fn REFRESH_PLAYER_LIST_STATS(p0: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16315644214271380596)), p0);
}
/// Used to be known as _NETWORK_CHECK_DATA_MANAGER_FOR_HANDLE
pub fn NETWORK_SET_CURRENT_DATA_MANAGER_HANDLE(p0: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8748954432052207421)), p0);
}
/// Hardcoded to return false.
pub fn NETWORK_IS_IN_PLATFORM_PARTY() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(3442268588154669911)));
}
/// Used to be known as _NETWORK_GET_PLATFORM_PARTY_UNK
pub fn NETWORK_GET_PLATFORM_PARTY_MEMBER_COUNT() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(120416720270500246)));
}
pub fn NETWORK_GET_PLATFORM_PARTY_MEMBERS(data: [*c]types.Any, dataSize: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(1297992022934018808)), data, dataSize);
}
/// Hardcoded to return false.
pub fn NETWORK_IS_IN_PLATFORM_PARTY_CHAT() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(18269840669551906888)));
}
/// This would be nice to see if someone is in party chat, but 2 sad notes.
/// 1) It only becomes true if said person is speaking in that party at the time.
/// 2) It will never, become true unless you are in that party with said person.
pub fn NETWORK_IS_CHATTING_IN_PLATFORM_PARTY(gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10225867550917061714)), gamerHandle);
}
pub fn NETWORK_CAN_QUEUE_FOR_PREVIOUS_SESSION_JOIN() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(3167839434185176710)));
}
pub fn NETWORK_IS_QUEUING_FOR_SESSION_JOIN() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(1482298714948592112)));
}
pub fn NETWORK_CLEAR_QUEUED_JOIN_REQUEST() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(7846693627984362764)));
}
pub fn NETWORK_SEND_QUEUED_JOIN_REQUEST() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(18025808019291147926)));
}
pub fn NETWORK_REMOVE_ALL_QUEUED_JOIN_REQUESTS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(2727370447948869948)));
}
pub fn NETWORK_SEED_RANDOM_NUMBER_GENERATOR(seed: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17417743546674790805)), seed);
}
pub fn NETWORK_GET_RANDOM_INT() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(6457686472773252607)));
}
/// Same as GET_RANDOM_INT_IN_RANGE
/// Used to be known as _NETWORK_GET_RANDOM_INT_IN_RANGE
pub fn NETWORK_GET_RANDOM_INT_RANGED(rangeStart: c_int, rangeEnd: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(16360721403940069187)), rangeStart, rangeEnd);
}
pub fn _NETWORK_GET_RANDOM_FLOAT_RANGED(rangeStart: f32, rangeEnd: f32) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(341472807990227047)), rangeStart, rangeEnd);
}
pub fn NETWORK_PLAYER_IS_CHEATER() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(7303591686215209104)));
}
/// Used to be known as _NETWORK_PLAYER_IS_UNK
pub fn NETWORK_PLAYER_GET_CHEATER_REASON() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(1670683415317459898)));
}
pub fn NETWORK_PLAYER_IS_BADSPORT() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(1862478201098863706)));
}
/// Used to be known as _REMOTE_CHEAT_DETECTED
pub fn REMOTE_CHEATER_PLAYER_DETECTED(player: types.Player, a: c_int, b: c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(5127420331863207307)), player, a, b);
}
pub fn BAD_SPORT_PLAYER_LEFT_DETECTED(gamerHandle: [*c]types.Any, event: c_int, amountReceived: c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(17032115665384622721)), gamerHandle, event, amountReceived);
}
/// Used to be known as _NETWORK_ADD_INVALID_MODEL
pub fn NETWORK_ADD_INVALID_OBJECT_MODEL(modelHash: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9175571576847761913)), modelHash);
}
/// Used to be known as _NETWORK_REMOVE_INVALID_MODEL
pub fn NETWORK_REMOVE_INVALID_OBJECT_MODEL(modelHash: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8727654298956264552)), modelHash);
}
/// Used to be known as _NETWORK_CLEAR_INVALID_MODELS
pub fn NETWORK_CLEAR_INVALID_OBJECT_MODELS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(266539461273738817)));
}
pub fn NETWORK_APPLY_PED_SCAR_DATA(ped: types.Ped, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16603761384742785360)), ped, p1);
}
pub fn NETWORK_SET_THIS_SCRIPT_IS_NETWORK_SCRIPT(maxNumMissionParticipants: c_int, p1: windows.BOOL, instanceId: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2064229935073689765)), maxNumMissionParticipants, p1, instanceId);
}
/// Used to be known as _NETWORK_SET_THIS_SCRIPT_MARKED
/// Used to be known as _NETWORK_IS_THIS_SCRIPT_MARKED
pub fn NETWORK_TRY_TO_SET_THIS_SCRIPT_IS_NETWORK_SCRIPT(p0: types.Any, p1: windows.BOOL, p2: types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(15064830173929911698)), p0, p1, p2);
}
pub fn NETWORK_GET_THIS_SCRIPT_IS_NETWORK_SCRIPT() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(2958977764275344222)));
}
/// Used to be known as _NETWORK_GET_NUM_PARTICIPANTS_HOST
pub fn NETWORK_GET_MAX_NUM_PARTICIPANTS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(12018154381697586670)));
}
pub fn NETWORK_GET_NUM_PARTICIPANTS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(1788005393069262420)));
}
pub fn NETWORK_GET_SCRIPT_STATUS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(6327936140006128319)));
}
pub fn NETWORK_REGISTER_HOST_BROADCAST_VARIABLES(vars: [*c]c_int, numVars: c_int, debugName: [*c]const u8) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(4511251136389182869)), vars, numVars, debugName);
}
pub fn NETWORK_REGISTER_PLAYER_BROADCAST_VARIABLES(vars: [*c]c_int, numVars: c_int, debugName: [*c]const u8) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(3703272359995417109)), vars, numVars, debugName);
}
pub fn NETWORK_REGISTER_HIGH_FREQUENCY_HOST_BROADCAST_VARIABLES(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(16900898736146907690)), p0, p1, p2);
}
pub fn NETWORK_REGISTER_HIGH_FREQUENCY_PLAYER_BROADCAST_VARIABLES(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(15480920913518234945)), p0, p1, p2);
}
pub fn NETWORK_FINISH_BROADCASTING_DATA() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(7275049505724966413)));
}
pub fn NETWORK_HAS_RECEIVED_HOST_BROADCAST_DATA() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6706057179025098886)));
}
pub fn NETWORK_GET_PLAYER_INDEX(player: types.Player) types.Player {
return nativeCaller.invoke1(@as(u64, @intCast(2664865239777350247)), player);
}
pub fn NETWORK_GET_PARTICIPANT_INDEX(index: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(1982955386380249400)), index);
}
/// Returns the Player associated to a given Ped when in an online session.
pub fn NETWORK_GET_PLAYER_INDEX_FROM_PED(ped: types.Ped) types.Player {
return nativeCaller.invoke1(@as(u64, @intCast(7786211388227125880)), ped);
}
/// Returns the amount of players connected in the current session. Only works when connected to a session/server.
pub fn NETWORK_GET_NUM_CONNECTED_PLAYERS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(11864625272246502996)));
}
pub fn NETWORK_IS_PLAYER_CONNECTED(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10654421488304384465)), player);
}
pub fn NETWORK_GET_TOTAL_NUM_PLAYERS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(14943458910033340907)));
}
pub fn NETWORK_IS_PARTICIPANT_ACTIVE(p0: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8068479385834192197)), p0);
}
pub fn NETWORK_IS_PLAYER_ACTIVE(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13321598277342454069)), player);
}
pub fn NETWORK_IS_PLAYER_A_PARTICIPANT(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4370056710535763844)), player);
}
pub fn NETWORK_IS_HOST_OF_THIS_SCRIPT() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9497416109822188213)));
}
pub fn NETWORK_GET_HOST_OF_THIS_SCRIPT() types.Player {
return nativeCaller.invoke0(@as(u64, @intCast(14390363770108672604)));
}
/// scriptName examples:
/// "freemode", "AM_CR_SecurityVan", ...
/// Most of the time, these values are used:
/// instance_id = -1
/// position_hash = 0
pub fn NETWORK_GET_HOST_OF_SCRIPT(scriptName: [*c]const u8, instance_id: c_int, position_hash: c_int) types.Player {
return nativeCaller.invoke3(@as(u64, @intCast(2119529604139398908)), scriptName, instance_id, position_hash);
}
pub fn NETWORK_SET_MISSION_FINISHED() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(4268587596667215817)));
}
pub fn NETWORK_IS_SCRIPT_ACTIVE(scriptName: [*c]const u8, instance_id: c_int, p2: windows.BOOL, position_hash: c_int) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(11331302476240543896)), scriptName, instance_id, p2, position_hash);
}
pub fn NETWORK_IS_SCRIPT_ACTIVE_BY_HASH(scriptHash: types.Hash, p1: c_int, p2: windows.BOOL, p3: c_int) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(15743993307101261331)), scriptHash, p1, p2, p3);
}
/// Used to be known as _NETWORK_IS_THREAD_ACTIVE
pub fn NETWORK_IS_THREAD_A_NETWORK_SCRIPT(threadId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6200122143695527543)), threadId);
}
pub fn NETWORK_GET_NUM_SCRIPT_PARTICIPANTS(scriptName: [*c]const u8, instance_id: c_int, position_hash: c_int) c_int {
return nativeCaller.invoke3(@as(u64, @intCast(3916135845664133658)), scriptName, instance_id, position_hash);
}
pub fn NETWORK_GET_INSTANCE_ID_OF_THIS_SCRIPT() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(7172609684198688475)));
}
/// Used to be known as _NETWORK_GET_POSITION_HASH_OF_THIS_SCRIPT
pub fn NETWORK_GET_POSITION_HASH_OF_THIS_SCRIPT() types.Hash {
return nativeCaller.invoke0(@as(u64, @intCast(2701826602378267599)));
}
pub fn NETWORK_IS_PLAYER_A_PARTICIPANT_ON_SCRIPT(player: types.Player, script: [*c]const u8, instance_id: c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(1933652918107981856)), player, script, instance_id);
}
pub fn NETWORK_PREVENT_SCRIPT_HOST_MIGRATION() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(2522790012041661745)));
}
pub fn NETWORK_REQUEST_TO_BE_HOST_OF_THIS_SCRIPT() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(8366066892794862209)));
}
/// Return the local Participant ID
pub fn PARTICIPANT_ID() types.Player {
return nativeCaller.invoke0(@as(u64, @intCast(10419199270309464707)));
}
/// Return the local Participant ID.
/// This native is exactly the same as 'PARTICIPANT_ID' native.
pub fn PARTICIPANT_ID_TO_INT() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(6315099850143017482)));
}
/// Used to be known as _NETWORK_GET_PLAYER_KILLER_OF_PLAYER
pub fn NETWORK_GET_KILLER_OF_PLAYER(player: types.Player, weaponHash: [*c]types.Hash) types.Player {
return nativeCaller.invoke2(@as(u64, @intCast(3288787536150583205)), player, weaponHash);
}
pub fn NETWORK_GET_DESTROYER_OF_NETWORK_ID(netId: c_int, weaponHash: [*c]types.Hash) types.Player {
return nativeCaller.invoke2(@as(u64, @intCast(8798589940124617252)), netId, weaponHash);
}
/// Used to be known as _NETWORK_GET_DESTROYER_OF_ENTITY
pub fn NETWORK_GET_DESTROYER_OF_ENTITY(entity: types.Entity, weaponHash: [*c]types.Hash) types.Player {
return nativeCaller.invoke2(@as(u64, @intCast(14137946285548054391)), entity, weaponHash);
}
/// NETWORK_GET_ASSISTED_DAMAGE_OF_ENTITY that ensures the entity is dead (IS_ENTITY_DEAD)
/// Used to be known as _NETWORK_GET_ASSISTED_DAMAGE_OF_DEAD_ENTITY
pub fn NETWORK_GET_ASSISTED_KILL_OF_ENTITY(player: types.Player, entity: types.Entity, p2: [*c]c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(9468267856376631885)), player, entity, p2);
}
/// Used to be known as _NETWORK_GET_DESROYER_OF_ENTITY
/// Used to be known as _NETWORK_GET_DESTROYER_OF_ENTITY
pub fn NETWORK_GET_ASSISTED_DAMAGE_OF_ENTITY(player: types.Player, entity: types.Entity, p2: [*c]c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(5524975853978134262)), player, entity, p2);
}
pub fn NETWORK_GET_ENTITY_KILLER_OF_PLAYER(player: types.Player, weaponHash: [*c]types.Hash) types.Entity {
return nativeCaller.invoke2(@as(u64, @intCast(4806144161903736312)), player, weaponHash);
}
/// Used to be known as _NETWORK_SET_CURRENT_MISSION_ID
pub fn NETWORK_SET_CURRENT_PUBLIC_CONTENT_ID(missionId: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3208316440131318747)), missionId);
}
pub fn NETWORK_SET_CURRENT_CHAT_OPTION(newChatOption: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4444208572099671403)), newChatOption);
}
/// mpSettingSpawn:
/// enum eMpSettingSpawn
/// {
/// MP_SETTING_SPAWN_NULL,
/// MP_SETTING_SPAWN_PROPERTY,
/// MP_SETTING_SPAWN_LAST_POSITION,
/// MP_SETTING_SPAWN_GARAGE,
/// MP_SETTING_SPAWN_RANDOM,
/// MP_SETTING_SPAWN_PRIVATE_YACHT,
/// MP_SETTING_SPAWN_OFFICE,
/// MP_SETTING_SPAWN_CLUBHOUSE,
/// MP_SETTING_SPAWN_IE_WAREHOUSE,
/// MP_SETTING_SPAWN_BUNKER,
/// MP_SETTING_SPAWN_HANGAR,
/// MP_SETTING_SPAWN_DEFUNCT_BASE,
/// MP_SETTING_SPAWN_NIGHTCLUB,
/// MP_SETTING_SPAWN_ARENA_GARAGE,
/// MP_SETTING_SPAWN_CASINO_APARTMENT,
/// MP_SETTING_SPAWN_ARCADE,
/// MP_SETTING_SPAWN_SUBMARINE,
/// MP_SETTING_SPAWN_CAR_MEET,
/// MP_SETTING_SPAWN_AUTO_SHOP,
/// MP_SETTING_SPAWN_FIXER_HQ,
/// MP_SETTING_SPAWN_MAX,
/// };
/// Used to be known as _NETWORK_SET_CURRENT_SPAWN_SETTING
pub fn NETWORK_SET_CURRENT_SPAWN_LOCATION_OPTION(mpSettingSpawn: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12280564469472708790)), mpSettingSpawn);
}
/// Used by MetricVEHICLE_DIST_DRIVEN
/// Used to be known as _NETWORK_SET_VEHICLE_TEST_DRIVE
pub fn NETWORK_SET_VEHICLE_DRIVEN_IN_TEST_DRIVE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10119629249784525323)), toggle);
}
/// Sets 'loc' variable used in MetricVEHICLE_DIST_DRIVEN
pub fn NETWORK_SET_VEHICLE_DRIVEN_LOCATION(location: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11587359301675635643)), location);
}
pub fn NETWORK_RESURRECT_LOCAL_PLAYER(x: f32, y: f32, z: f32, heading: f32, p4: windows.BOOL, changetime: windows.BOOL, p6: windows.BOOL, p7: c_int, p8: c_int) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(16871544814804643067)), x, y, z, heading, p4, changetime, p6, p7, p8);
}
pub fn NETWORK_SET_LOCAL_PLAYER_INVINCIBLE_TIME(time: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3284751280334992135)), time);
}
pub fn NETWORK_IS_LOCAL_PLAYER_INVINCIBLE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9981829127194652672)));
}
pub fn NETWORK_DISABLE_INVINCIBLE_FLASHING(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11372548653699314209)), player, toggle);
}
/// Used to be known as _NETWORK_PED_FORCE_GAME_STATE_UPDATE
pub fn NETWORK_PATCH_POST_CUTSCENE_HS4F_TUN_ENT(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17346911170109706709)), ped);
}
pub fn NETWORK_SET_LOCAL_PLAYER_SYNC_LOOK_AT(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5931223868673636723)), toggle);
}
pub fn NETWORK_HAS_ENTITY_BEEN_REGISTERED_WITH_THIS_THREAD(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12717375373840897957)), entity);
}
pub fn NETWORK_GET_NETWORK_ID_FROM_ENTITY(entity: types.Entity) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(11607747012039726172)), entity);
}
pub fn NETWORK_GET_ENTITY_FROM_NETWORK_ID(netId: c_int) types.Entity {
return nativeCaller.invoke1(@as(u64, @intCast(14865922340470912352)), netId);
}
pub fn NETWORK_GET_ENTITY_IS_NETWORKED(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14376186384880618616)), entity);
}
pub fn NETWORK_GET_ENTITY_IS_LOCAL(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(689425255090243426)), entity);
}
pub fn NETWORK_REGISTER_ENTITY_AS_NETWORKED(entity: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(502904344163126442)), entity);
}
pub fn NETWORK_UNREGISTER_NETWORKED_ENTITY(entity: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8316150165401516246)), entity);
}
pub fn NETWORK_DOES_NETWORK_ID_EXIST(netId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4093234165679461188)), netId);
}
pub fn NETWORK_DOES_ENTITY_EXIST_WITH_NETWORK_ID(netId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1775681623300832616)), netId);
}
pub fn NETWORK_REQUEST_CONTROL_OF_NETWORK_ID(netId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11993283059155729360)), netId);
}
pub fn NETWORK_HAS_CONTROL_OF_NETWORK_ID(netId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5563642154429010310)), netId);
}
/// Returns true if the specified network id is controlled by someone else.
/// Used to be known as _NETWORK_IS_NETWORK_ID_A_CLONE
pub fn NETWORK_IS_NETWORK_ID_REMOTELY_CONTROLLED(netId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8233416534753415302)), netId);
}
pub fn NETWORK_REQUEST_CONTROL_OF_ENTITY(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13155885047170474823)), entity);
}
pub fn NETWORK_REQUEST_CONTROL_OF_DOOR(doorID: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9731680478500984548)), doorID);
}
pub fn NETWORK_HAS_CONTROL_OF_ENTITY(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(125925576390379655)), entity);
}
pub fn NETWORK_HAS_CONTROL_OF_PICKUP(pickup: types.Pickup) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6613898200329449382)), pickup);
}
pub fn NETWORK_HAS_CONTROL_OF_DOOR(doorHash: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14644695183499826655)), doorHash);
}
/// Used to be known as _NETWORK_HAS_CONTROL_OF_PAVEMENT_STATS
pub fn NETWORK_IS_DOOR_NETWORKED(doorHash: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13843665009790169926)), doorHash);
}
/// calls from vehicle to net.
pub fn VEH_TO_NET(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(13027019417800884636)), vehicle);
}
/// gets the network id of a ped
pub fn PED_TO_NET(ped: types.Ped) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(1071509001333212809)), ped);
}
/// Lets objects spawn online simply do it like this:
/// int createdObject = OBJ_TO_NET(CREATE_OBJECT_NO_OFFSET(oball, pCoords.x, pCoords.y, pCoords.z, 1, 0, 0));
pub fn OBJ_TO_NET(object: types.Object) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(11078816139353253185)), object);
}
pub fn NET_TO_VEH(netHandle: c_int) types.Vehicle {
return nativeCaller.invoke1(@as(u64, @intCast(3925893566760105484)), netHandle);
}
/// gets the ped id of a network id
pub fn NET_TO_PED(netHandle: c_int) types.Ped {
return nativeCaller.invoke1(@as(u64, @intCast(13676752553518992190)), netHandle);
}
/// gets the object id of a network id
pub fn NET_TO_OBJ(netHandle: c_int) types.Object {
return nativeCaller.invoke1(@as(u64, @intCast(15587344650859760447)), netHandle);
}
/// gets the entity id of a network id
pub fn NET_TO_ENT(netHandle: c_int) types.Entity {
return nativeCaller.invoke1(@as(u64, @intCast(13834683421016262986)), netHandle);
}
pub fn NETWORK_GET_LOCAL_HANDLE(gamerHandle: [*c]types.Any, gamerHandleSize: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16744472992203328910)), gamerHandle, gamerHandleSize);
}
pub fn NETWORK_HANDLE_FROM_USER_ID(userId: [*c]const u8, gamerHandle: [*c]types.Any, gamerHandleSize: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(15912657676102462556)), userId, gamerHandle, gamerHandleSize);
}
pub fn NETWORK_HANDLE_FROM_MEMBER_ID(memberId: [*c]const u8, gamerHandle: [*c]types.Any, gamerHandleSize: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(11600465318696082508)), memberId, gamerHandle, gamerHandleSize);
}
pub fn NETWORK_HANDLE_FROM_PLAYER(player: types.Player, gamerHandle: [*c]types.Any, gamerHandleSize: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(4075391217980126899)), player, gamerHandle, gamerHandleSize);
}
/// Used to be known as _NETWORK_HASH_FROM_PLAYER_HANDLE
pub fn NETWORK_HASH_FROM_PLAYER_HANDLE(player: types.Player) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(13555120810802113541)), player);
}
/// Used to be known as _NETWORK_HASH_FROM_GAMER_HANDLE
pub fn NETWORK_HASH_FROM_GAMER_HANDLE(gamerHandle: [*c]types.Any) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(6365656395352418540)), gamerHandle);
}
pub fn NETWORK_HANDLE_FROM_FRIEND(friendIndex: c_int, gamerHandle: [*c]types.Any, gamerHandleSize: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(15302308046443739090)), friendIndex, gamerHandle, gamerHandleSize);
}
pub fn NETWORK_GAMERTAG_FROM_HANDLE_START(gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11460546800196516438)), gamerHandle);
}
pub fn NETWORK_GAMERTAG_FROM_HANDLE_PENDING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(12714192233854618864)));
}
pub fn NETWORK_GAMERTAG_FROM_HANDLE_SUCCEEDED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(18230704941221356509)));
}
pub fn NETWORK_GET_GAMERTAG_FROM_HANDLE(gamerHandle: [*c]types.Any) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(4783175842773490907)), gamerHandle);
}
/// Hardcoded to return -1.
pub fn NETWORK_DISPLAYNAMES_FROM_HANDLES_START(p0: [*c]types.Any, p1: types.Any) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(15450898637081299330)), p0, p1);
}
/// This function is hard-coded to always return 0.
pub fn NETWORK_GET_DISPLAYNAMES_FROM_HANDLES(p0: types.Any, p1: types.Any, p2: types.Any) c_int {
return nativeCaller.invoke3(@as(u64, @intCast(6398515658071826839)), p0, p1, p2);
}
pub fn NETWORK_ARE_HANDLES_THE_SAME(gamerHandle1: [*c]types.Any, gamerHandle2: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(6330829940368405015)), gamerHandle1, gamerHandle2);
}
pub fn NETWORK_IS_HANDLE_VALID(gamerHandle: [*c]types.Any, gamerHandleSize: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(8032655073623294259)), gamerHandle, gamerHandleSize);
}
pub fn NETWORK_GET_PLAYER_FROM_GAMER_HANDLE(gamerHandle: [*c]types.Any) types.Player {
return nativeCaller.invoke1(@as(u64, @intCast(14870719517945799837)), gamerHandle);
}
pub fn NETWORK_MEMBER_ID_FROM_GAMER_HANDLE(gamerHandle: [*c]types.Any) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(14422267715408477039)), gamerHandle);
}
pub fn NETWORK_IS_GAMER_IN_MY_SESSION(gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1085561427425302249)), gamerHandle);
}
pub fn NETWORK_SHOW_PROFILE_UI(gamerHandle: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9628363738797309096)), gamerHandle);
}
/// Returns the name of a given player. Returns "**Invalid**" if rlGamerInfo of the given player cannot be retrieved or the player doesn't exist.
pub fn NETWORK_PLAYER_GET_NAME(player: types.Player) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(8581840958160123858)), player);
}
/// Returns a string of the player's Rockstar Id.
/// Takes a 24 char buffer. Returns the buffer or "**Invalid**" if rlGamerInfo of the given player cannot be retrieved or the player doesn't exist.
/// Used to be known as _NETWORK_PLAYER_GET_USER_ID
pub fn NETWORK_PLAYER_GET_USERID(player: types.Player, userID: [*c]c_int) [*c]const u8 {
return nativeCaller.invoke2(@as(u64, @intCast(5271459214043670944)), player, userID);
}
/// Checks if a specific value (BYTE) in CNetGamePlayer is nonzero.
/// Returns always false in Singleplayer.
/// No longer used for dev checks since first mods were released on PS3 & 360.
/// R* now checks with the IS_DLC_PRESENT native for the dlc hash 2532323046,
/// if that is present it will unlock dev stuff.
pub fn NETWORK_PLAYER_IS_ROCKSTAR_DEV(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6073875792457145197)), player);
}
/// Used to be known as _NETWORK_PLAYER_SOMETHING
pub fn NETWORK_PLAYER_INDEX_IS_CHEATER(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6223485461200919532)), player);
}
/// Used to be known as _NETWORK_GET_ENTITY_NET_SCRIPT_ID
pub fn NETWORK_ENTITY_GET_OBJECT_ID(entity: types.Entity) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(9322196887242999167)), entity);
}
/// I've had this return the player's ped handle sometimes, but also other random entities.
/// Whatever p0 is, it's at least not synced to other players.
/// At least not all the time, some p0 values actually output the same entity, (different handle of course, but same entity).
/// But another p0 value may return an entity for player x, but not for player y (it'll just return -1 even if the entity exists on both clients).
/// Returns an entity handle or -1, value changes based on p0's value.
pub fn NETWORK_GET_ENTITY_FROM_OBJECT_ID(p0: types.Any) types.Entity {
return nativeCaller.invoke1(@as(u64, @intCast(4023393670560040565)), p0);
}
pub fn NETWORK_IS_INACTIVE_PROFILE(p0: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9104154555220834862)), p0);
}
pub fn NETWORK_GET_MAX_FRIENDS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(12676420008678950866)));
}
pub fn NETWORK_GET_FRIEND_COUNT() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(2323607807883683748)));
}
pub fn NETWORK_GET_FRIEND_NAME(friendIndex: c_int) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(16221609283824123531)), friendIndex);
}
/// Used to be known as _NETWORK_GET_FRIEND_NAME
/// Used to be known as _NETWORK_GET_FRIEND_NAME_FROM_INDEX
pub fn NETWORK_GET_FRIEND_DISPLAY_NAME(friendIndex: c_int) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(4712157362949120659)), friendIndex);
}
pub fn NETWORK_IS_FRIEND_ONLINE(name: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4781209078556243533)), name);
}
/// Used to be known as _NETWORK_IS_FRIEND_ONLINE_2
pub fn NETWORK_IS_FRIEND_HANDLE_ONLINE(gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9794056229888398555)), gamerHandle);
}
/// In scripts R* calls 'NETWORK_GET_FRIEND_NAME' in this param.
pub fn NETWORK_IS_FRIEND_IN_SAME_TITLE(friendName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3362398636993353656)), friendName);
}
pub fn NETWORK_IS_FRIEND_IN_MULTIPLAYER(friendName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6269111941638076968)), friendName);
}
pub fn NETWORK_IS_FRIEND(gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1883808089400088148)), gamerHandle);
}
/// This function is hard-coded to always return 0.
pub fn NETWORK_IS_PENDING_FRIEND(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(857722039766249011)), p0);
}
pub fn NETWORK_IS_ADDING_FRIEND() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(7971654329120476545)));
}
pub fn NETWORK_ADD_FRIEND(gamerHandle: [*c]types.Any, message: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(10232977943488250403)), gamerHandle, message);
}
pub fn NETWORK_IS_FRIEND_INDEX_ONLINE(friendIndex: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13463777872942745633)), friendIndex);
}
pub fn NETWORK_SET_PLAYER_IS_PASSIVE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1983121393000847988)), toggle);
}
pub fn NETWORK_GET_PLAYER_OWNS_WAYPOINT(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9383104026285176621)), player);
}
pub fn NETWORK_CAN_SET_WAYPOINT() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14494813559058640736)));
}
pub fn NETWORK_IGNORE_REMOTE_WAYPOINTS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(5488374863720050805)));
}
/// communicationType: 0 = VOICE; 1 = TEXT_CHAT; 2 = TEXT_MESSAGE; 3 = EMAIL; 4 = USER_CONTENT; 5 = USER_TEXT
pub fn _NETWORK_DOES_COMMUNICATION_GROUP_EXIST(communicationType: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15843523194984742245)), communicationType);
}
/// Returns communicationGroupFlag
/// communicationType: see 0xDBDF80673BBA3D65
/// enum eCommunicationGroupFlag
/// {
/// COMMUNICATION_GROUP_LOCAL_PLAYER = 1 << 0,
/// COMMUNICATION_GROUP_FRIENDS = 1 << 1,
/// COMMUNICATION_GROUP_SMALL_CREW = 1 << 2,
/// COMMUNICATION_GROUP_LARGE_CREW = 1 << 3,
/// COMMUNICATION_GROUP_RECENT_PLAYER = 1 << 4,
/// COMMUNICATION_GROUP_SAME_SESSION = 1 << 5,
/// COMMUNICATION_GROUP_SAME_TEAM = 1 << 6,
/// COMMUNICATION_GROUP_INVALID = 1 << 7,
/// };
pub fn _NETWORK_GET_COMMUNICATION_GROUP_FLAGS(communicationType: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(4674458182845991043)), communicationType);
}
/// communicationType: see 0xDBDF80673BBA3D65
/// communicationGroupFlag: see 0x40DF02F371F40883
pub fn _NETWORK_SET_COMMUNICATION_GROUP_FLAGS(communicationType: c_int, communicationGroupFlag: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16522009691249521365)), communicationType, communicationGroupFlag);
}
pub fn NETWORK_IS_PLAYER_ON_BLOCKLIST(gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12484865458510324472)), gamerHandle);
}
pub fn NETWORK_SET_SCRIPT_AUTOMUTED(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12901101999872671775)), p0);
}
pub fn NETWORK_HAS_AUTOMUTE_OVERRIDE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(2805880935497564056)));
}
pub fn NETWORK_HAS_HEADSET() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(16749161831829139962)));
}
pub fn NETWORK_SET_LOOK_AT_TALKERS(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9023347395842466070)), p0);
}
/// Used to be known as NETWORK_IS_LOCAL_TALKING
pub fn NETWORK_IS_PUSH_TO_TALK_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(13894360218093106378)));
}
pub fn NETWORK_GAMER_HAS_HEADSET(gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(17509245258117663829)), gamerHandle);
}
pub fn NETWORK_IS_GAMER_TALKING(gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8197460765577107594)), gamerHandle);
}
pub fn NETWORK_PERMISSIONS_HAS_GAMER_RECORD(gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6169579165185763552)), gamerHandle);
}
/// Used to be known as _NETWORK_CAN_COMMUNICATE_WITH_GAMER_2
pub fn NETWORK_CAN_COMMUNICATE_WITH_GAMER(gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10330442636123353196)), gamerHandle);
}
/// Used to be known as NETWORK_CAN_COMMUNICATE_WITH_GAMER
pub fn NETWORK_CAN_TEXT_CHAT_WITH_GAMER(gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11623971990645271327)), gamerHandle);
}
pub fn NETWORK_IS_GAMER_MUTED_BY_ME(gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14871130065913805176)), gamerHandle);
}
pub fn NETWORK_AM_I_MUTED_BY_GAMER(gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16069585405642483418)), gamerHandle);
}
pub fn NETWORK_IS_GAMER_BLOCKED_BY_ME(gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16808776268737370243)), gamerHandle);
}
pub fn NETWORK_AM_I_BLOCKED_BY_GAMER(gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1527701571273107378)), gamerHandle);
}
pub fn NETWORK_CAN_VIEW_GAMER_USER_CONTENT(gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13076845094687292647)), gamerHandle);
}
pub fn NETWORK_HAS_VIEW_GAMER_USER_CONTENT_RESULT(gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14745965566320721695)), gamerHandle);
}
pub fn NETWORK_CAN_PLAY_MULTIPLAYER_WITH_GAMER(gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(566655126717555697)), gamerHandle);
}
pub fn NETWORK_CAN_GAMER_PLAY_MULTIPLAYER_WITH_ME(gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1396005364152738181)), gamerHandle);
}
pub fn NETWORK_CAN_SEND_LOCAL_INVITE(gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(151641059970794272)), gamerHandle);
}
pub fn NETWORK_CAN_RECEIVE_LOCAL_INVITE(gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4764303478112803172)), gamerHandle);
}
/// returns true if someone is screaming or talking in a microphone
pub fn NETWORK_IS_PLAYER_TALKING(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(224636770351277182)), player);
}
pub fn NETWORK_PLAYER_HAS_HEADSET(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4591871217020014550)), player);
}
pub fn NETWORK_IS_PLAYER_MUTED_BY_ME(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10119914414716935737)), player);
}
pub fn NETWORK_AM_I_MUTED_BY_PLAYER(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11342739934660953604)), player);
}
pub fn NETWORK_IS_PLAYER_BLOCKED_BY_ME(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6318303497628956449)), player);
}
pub fn NETWORK_AM_I_BLOCKED_BY_PLAYER(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9796338375174927677)), player);
}
pub fn NETWORK_GET_PLAYER_LOUDNESS(player: types.Player) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(2423332742172411519)), player);
}
pub fn NETWORK_SET_TALKER_PROXIMITY(value: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14695576975085065862)), value);
}
pub fn NETWORK_GET_TALKER_PROXIMITY() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(9579421600721461400)));
}
pub fn NETWORK_SET_VOICE_ACTIVE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13456414728902526331)), toggle);
}
pub fn NETWORK_REMAIN_IN_GAME_CHAT(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14982146499706148331)), p0);
}
pub fn NETWORK_OVERRIDE_TRANSITION_CHAT(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12638795563565490793)), p0);
}
pub fn NETWORK_SET_TEAM_ONLY_CHAT(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15399082811850695875)), toggle);
}
pub fn NETWORK_SET_SCRIPT_CONTROLLING_TEAMS(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2762212740384944935)), p0);
}
pub fn NETWORK_SET_SAME_TEAM_AS_LOCAL_PLAYER(p0: types.Any, p1: types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(4848335943331101231)), p0, p1);
}
pub fn NETWORK_OVERRIDE_TEAM_RESTRICTIONS(team: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8028082392733869902)), team, toggle);
}
pub fn NETWORK_SET_OVERRIDE_SPECTATOR_MODE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8131878017179660816)), toggle);
}
pub fn NETWORK_SET_OVERRIDE_TUTORIAL_SESSION_CHAT(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4349384515265238193)), toggle);
}
pub fn NETWORK_SET_PROXIMITY_AFFECTS_TEAM(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11347660108948903698)), toggle);
}
pub fn NETWORK_SET_NO_SPECTATOR_CHAT(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17611922294919485824)), toggle);
}
pub fn NETWORK_SET_IGNORE_SPECTATOR_CHAT_LIMITS_SAME_TEAM(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7664433699355246808)), toggle);
}
/// Could possibly bypass being muted or automatically muted
pub fn NETWORK_OVERRIDE_CHAT_RESTRICTIONS(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3475000292599775428)), player, toggle);
}
/// This is used alongside the native,
/// 'NETWORK_OVERRIDE_RECEIVE_RESTRICTIONS'. Read its description for more info.
/// Used to be known as _NETWORK_OVERRIDE_SEND_RESTRICTIONS
pub fn NETWORK_OVERRIDE_SEND_RESTRICTIONS(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10942986615870205546)), player, toggle);
}
/// Used to be known as _NETWORK_CHAT_MUTE
pub fn NETWORK_OVERRIDE_SEND_RESTRICTIONS_ALL(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6318993057537401813)), toggle);
}
/// R* uses this to hear all player when spectating.
/// It allows you to hear other online players when their chat is on none, crew and or friends
pub fn NETWORK_OVERRIDE_RECEIVE_RESTRICTIONS(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15994320956569705140)), player, toggle);
}
/// p0 is always false in scripts.
pub fn NETWORK_OVERRIDE_RECEIVE_RESTRICTIONS_ALL(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1149128375812852473)), toggle);
}
pub fn NETWORK_SET_VOICE_CHANNEL(channel: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17249370151240800803)), channel);
}
pub fn NETWORK_CLEAR_VOICE_CHANNEL() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(16156284357341470793)));
}
/// Used to be known as IS_NETWORK_VEHICLE_BEEN_DAMAGED_BY_ANY_OBJECT
pub fn NETWORK_APPLY_VOICE_PROXIMITY_OVERRIDE(x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(15839728776442845463)), x, y, z);
}
pub fn NETWORK_CLEAR_VOICE_PROXIMITY_OVERRIDE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(17309397603964700428)));
}
pub fn NETWORK_ENABLE_VOICE_BANDWIDTH_RESTRICTION(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6789920576433533166)), player);
}
pub fn NETWORK_DISABLE_VOICE_BANDWIDTH_RESTRICTION(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14580223719053600204)), player);
}
/// NETWORK_GET_M[A-U]
pub fn NETWORK_GET_MUTE_COUNT_FOR_PLAYER(p0: types.Player, p1: [*c]f32, p2: [*c]f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(12517049670368545419)), p0, p1, p2);
}
pub fn NETWORK_SET_SPECTATOR_TO_NON_SPECTATOR_TEXT_CHAT(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10301186773723979164)), toggle);
}
/// Same as _IS_TEXT_CHAT_ACTIVE, except it does not check if the text chat HUD component is initialized, and therefore may crash.
/// Used to be known as _NETWORK_IS_TEXT_CHAT_ACTIVE
pub fn NETWORK_TEXT_CHAT_IS_TYPING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6903821898987114534)));
}
/// Starts a new singleplayer game (at the prologue).
pub fn SHUTDOWN_AND_LAUNCH_SINGLE_PLAYER_GAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(6428977259712263826)));
}
/// In singleplayer this will re-load your game.
/// In FiveM / GTA:Online this disconnects you from the session, and starts loading single player, however you still remain connected to the server (only if you're the host, if you're not then you also (most likely) get disconnected from the server) and other players will not be able to join until you exit the game.
/// You might need to DoScreenFadeIn and ShutdownLoadingScreen otherwise you probably won't end up loading into SP at all.
/// Somewhat related note: opening the pause menu after loading into this 'singleplayer' mode crashes the game.
/// Used to be known as _SHUTDOWN_AND_LOAD_MOST_RECENT_SAVE
pub fn SHUTDOWN_AND_LOAD_MOST_RECENT_SAVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(11441981640324420657)));
}
pub fn NETWORK_SET_FRIENDLY_FIRE_OPTION(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17872613597342980131)), toggle);
}
/// This native does absolutely nothing, just a nullsub
pub fn NETWORK_SET_RICH_PRESENCE(p0: c_int, p1: c_int, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(2147281187475198818)), p0, p1, p2, p3);
}
/// This native does absolutely nothing, just a nullsub
/// Used to be known as _NETWORK_SET_RICH_PRESENCE_2
pub fn NETWORK_SET_RICH_PRESENCE_STRING(p0: c_int, textLabel: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4476591411906569451)), p0, textLabel);
}
pub fn NETWORK_GET_TIMEOUT_TIME() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(6832019364320093007)));
}
/// p4 and p5 are always 0 in scripts
/// Used to be known as _NETWORK_RESPAWN_COORDS
pub fn NETWORK_LEAVE_PED_BEHIND_BEFORE_WARP(player: types.Player, x: f32, y: f32, z: f32, p4: windows.BOOL, p5: windows.BOOL) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(10910524327694195459)), player, x, y, z, p4, p5);
}
pub fn NETWORK_LEAVE_PED_BEHIND_BEFORE_CUTSCENE(player: types.Player, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13772817945428814183)), player, p1);
}
/// entity must be a valid entity; ped can be NULL
pub fn REMOVE_ALL_STICKY_BOMBS_FROM_ENTITY(entity: types.Entity, ped: types.Ped) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8165366924577523981)), entity, ped);
}
pub fn NETWORK_KEEP_ENTITY_COLLISION_DISABLED_AFTER_ANIM_SCENE(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1714149902278879053)), p0, p1);
}
pub fn NETWORK_IS_ANY_PLAYER_NEAR(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any, p6: types.Any) windows.BOOL {
return nativeCaller.invoke7(@as(u64, @intCast(3336061477655834894)), p0, p1, p2, p3, p4, p5, p6);
}
/// Used to be known as _NETWORK_PLAYER_IS_IN_CLAN
pub fn NETWORK_CLAN_SERVICE_IS_VALID() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6313148171058759830)));
}
pub fn NETWORK_CLAN_PLAYER_IS_ACTIVE(gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12764526802401857304)), gamerHandle);
}
/// bufferSize is 35 in the scripts.
/// bufferSize is the elementCount of p0(desc), sizeof(p0) == 280 == p1*8 == 35 * 8, p2(netHandle) is obtained from NETWORK::NETWORK_HANDLE_FROM_PLAYER. And no, I can't explain why 35 * sizeof(int) == 280 and not 140, but I'll get back to you on that.
/// the answer is: because p0 an int64_t* / int64_t[35]. and FYI p2 is an int64_t[13]
/// https://pastebin.com/cSZniHak
pub fn NETWORK_CLAN_PLAYER_GET_DESC(clanDesc: [*c]types.Any, bufferSize: c_int, gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(17214704787170742202)), clanDesc, bufferSize, gamerHandle);
}
/// bufferSize is 35 in the scripts.
pub fn NETWORK_CLAN_IS_ROCKSTAR_CLAN(clanDesc: [*c]types.Any, bufferSize: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(8449803224988481835)), clanDesc, bufferSize);
}
/// bufferSize is 35 in the scripts.
pub fn NETWORK_CLAN_GET_UI_FORMATTED_TAG(clanDesc: [*c]types.Any, bufferSize: c_int, formattedTag: [*c]u8) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(17605505813620958448)), clanDesc, bufferSize, formattedTag);
}
/// Used to be known as _GET_NUM_MEMBERSHIP_DESC
/// Used to be known as _NETWORK_CLAN_GET_NUM_MEMBERSHIP_DESC
pub fn NETWORK_CLAN_GET_LOCAL_MEMBERSHIPS_COUNT() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(2253800347926072303)));
}
pub fn NETWORK_CLAN_GET_MEMBERSHIP_DESC(memberDesc: [*c]types.Any, p1: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5250766909322331576)), memberDesc, p1);
}
pub fn NETWORK_CLAN_DOWNLOAD_MEMBERSHIP(gamerHandle: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12216300199152257726)), gamerHandle);
}
pub fn NETWORK_CLAN_DOWNLOAD_MEMBERSHIP_PENDING(p0: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6601716568125337024)), p0);
}
/// Used to be known as _NETWORK_IS_CLAN_MEMBERSHIP_FINISHED_DOWNLOADING
pub fn NETWORK_CLAN_ANY_DOWNLOAD_MEMBERSHIP_PENDING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(12967633998624007287)));
}
pub fn NETWORK_CLAN_REMOTE_MEMBERSHIPS_ARE_IN_CACHE(p0: [*c]c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13505855403104691890)), p0);
}
pub fn NETWORK_CLAN_GET_MEMBERSHIP_COUNT(p0: [*c]c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(12299646607298380481)), p0);
}
pub fn NETWORK_CLAN_GET_MEMBERSHIP_VALID(p0: [*c]c_int, p1: types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5234762733223927566)), p0, p1);
}
pub fn NETWORK_CLAN_GET_MEMBERSHIP(p0: [*c]c_int, clanMembership: [*c]types.Any, p2: c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(14464471364728992785)), p0, clanMembership, p2);
}
pub fn NETWORK_CLAN_JOIN(clanDesc: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11505189570185656447)), clanDesc);
}
/// Only documented...
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
/// Used to be known as _NETWORK_CLAN_ANIMATION
pub fn NETWORK_CLAN_CREWINFO_GET_STRING_VALUE(animDict: [*c]const u8, animName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(8259095949574604422)), animDict, animName);
}
pub fn NETWORK_CLAN_CREWINFO_GET_CREWRANKTITLE(p0: c_int, p1: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(3121537421275042617)), p0, p1);
}
pub fn NETWORK_CLAN_HAS_CREWINFO_METADATA_BEEN_RECEIVED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14064363004691641687)));
}
/// Used to be known as _NETWORK_GET_PLAYER_CREW_EMBLEM_TXD_NAME
pub fn NETWORK_CLAN_GET_EMBLEM_TXD_NAME(netHandle: [*c]types.Any, txdName: [*c]u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(6356225926059536772)), netHandle, txdName);
}
pub fn NETWORK_CLAN_REQUEST_EMBLEM(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1392052028417673528)), p0);
}
pub fn NETWORK_CLAN_IS_EMBLEM_READY(p0: types.Any, p1: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(11616040730399814449)), p0, p1);
}
pub fn NETWORK_CLAN_RELEASE_EMBLEM(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1242551761124886192)), p0);
}
pub fn NETWORK_GET_PRIMARY_CLAN_DATA_CLEAR() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(11143149771698350061)));
}
pub fn NETWORK_GET_PRIMARY_CLAN_DATA_CANCEL() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(301261172596695124)));
}
pub fn NETWORK_GET_PRIMARY_CLAN_DATA_START(p0: [*c]types.Any, p1: types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(14881819621038891271)), p0, p1);
}
pub fn NETWORK_GET_PRIMARY_CLAN_DATA_PENDING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(13044480298453208295)));
}
pub fn NETWORK_GET_PRIMARY_CLAN_DATA_SUCCESS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6579483016219238586)));
}
pub fn NETWORK_GET_PRIMARY_CLAN_DATA_NEW(p0: [*c]types.Any, p1: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(13871367663892971994)), p0, p1);
}
/// Whether or not another player is allowed to take control of the entity
pub fn SET_NETWORK_ID_CAN_MIGRATE(netId: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2999092937823393276)), netId, toggle);
}
pub fn SET_NETWORK_ID_EXISTS_ON_ALL_MACHINES(netId: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16167502273159259080)), netId, toggle);
}
/// Used to be known as _SET_NETWORK_ID_SYNC_TO_PLAYER
pub fn SET_NETWORK_ID_ALWAYS_EXISTS_FOR_PLAYER(netId: c_int, player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(12150751756953449322)), netId, player, toggle);
}
/// "No Reassign" in CPhysicalScriptGameStateDataNode
/// Used to be known as _SET_NETWORK_ID_CAN_BE_REASSIGNED
pub fn SET_NETWORK_ID_CAN_BE_REASSIGNED(netId: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11345213149725757436)), netId, toggle);
}
pub fn NETWORK_SET_ENTITY_CAN_BLEND(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15578046208237758579)), entity, toggle);
}
/// Used to be known as _NETWORK_SET_OBJECT_FORCE_STATIC_BLEND
pub fn NETWORK_SET_OBJECT_CAN_BLEND_WHEN_FIXED(object: types.Object, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(250472015593511589)), object, toggle);
}
/// if set to true other network players can't see it
/// if set to false other network player can see it
/// =========================================
/// ^^ I attempted this by grabbing an object with GET_ENTITY_PLAYER_IS_FREE_AIMING_AT and setting this naive no matter the toggle he could still see it.
/// pc or last gen?
/// ^^ last-gen
/// Used to be known as _NETWORK_SET_ENTITY_VISIBLE_TO_NETWORK
/// Used to be known as _NETWORK_SET_ENTITY_INVISIBLE_TO_NETWORK
pub fn NETWORK_SET_ENTITY_ONLY_EXISTS_FOR_PARTICIPANTS(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17422758662185636504)), entity, toggle);
}
pub fn SET_NETWORK_ID_VISIBLE_IN_CUTSCENE(netId: c_int, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(12002801652188848820)), netId, p1, p2);
}
/// Used to be known as _SET_NETWORK_ID_VISIBLE_IN_CUTSCENE_NO_COLLISION
pub fn SET_NETWORK_ID_VISIBLE_IN_CUTSCENE_HACK(netId: c_int, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(3669256483543681945)), netId, p1, p2);
}
pub fn SET_NETWORK_ID_VISIBLE_IN_CUTSCENE_REMAIN_HACK(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(8553446874497316498)), p0, p1, p2);
}
pub fn SET_NETWORK_CUTSCENE_ENTITIES(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12296326612917986391)), toggle);
}
/// Getter for SET_NETWORK_CUTSCENE_ENTITIES.
/// Used to be known as _NETWORK_ARE_CUTSCENE_ENTITIES
pub fn ARE_CUTSCENE_ENTITIES_NETWORKED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(7410292660336927050)));
}
pub fn SET_NETWORK_ID_PASS_CONTROL_IN_TUTORIAL(netId: c_int, state: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4585624849189151999)), netId, state);
}
/// Used to be known as _NETWORK_CAN_NETWORK_ID_BE_SEEN
pub fn IS_NETWORK_ID_OWNED_BY_PARTICIPANT(netId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11628427924148007647)), netId);
}
pub fn SET_REMOTE_PLAYER_VISIBLE_IN_CUTSCENE(player: types.Player, locallyVisible: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10822728682718291892)), player, locallyVisible);
}
pub fn SET_LOCAL_PLAYER_VISIBLE_IN_CUTSCENE(p0: windows.BOOL, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15061828707536501614)), p0, p1);
}
pub fn SET_LOCAL_PLAYER_INVISIBLE_LOCALLY(bIncludePlayersVehicle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16570840629414318440)), bIncludePlayersVehicle);
}
pub fn SET_LOCAL_PLAYER_VISIBLE_LOCALLY(bIncludePlayersVehicle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8509892673133592340)), bIncludePlayersVehicle);
}
pub fn SET_PLAYER_INVISIBLE_LOCALLY(player: types.Player, bIncludePlayersVehicle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1347558514964148408)), player, bIncludePlayersVehicle);
}
pub fn SET_PLAYER_VISIBLE_LOCALLY(player: types.Player, bIncludePlayersVehicle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18059732609498422002)), player, bIncludePlayersVehicle);
}
/// Hardcoded to not work in SP.
pub fn FADE_OUT_LOCAL_PLAYER(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4714632522647834066)), p0);
}
/// normal - transition like when your coming out of LSC
/// slow - transition like when you walk into a mission
///
pub fn NETWORK_FADE_OUT_ENTITY(entity: types.Entity, normal: windows.BOOL, slow: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(16021073340841986541)), entity, normal, slow);
}
/// state - 0 does 5 fades
/// state - 1 does 6 fades
/// p3: setting to 1 made vehicle fade in slower, probably "slow" as per NETWORK_FADE_OUT_ENTITY
pub fn NETWORK_FADE_IN_ENTITY(entity: types.Entity, state: windows.BOOL, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2255972746681902637)), entity, state, p2);
}
pub fn NETWORK_IS_PLAYER_FADING(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7142082149753098467)), player);
}
pub fn NETWORK_IS_ENTITY_FADING(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4769086384282971053)), entity);
}
pub fn IS_PLAYER_IN_CUTSCENE(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16658976598673641766)), player);
}
pub fn SET_ENTITY_VISIBLE_IN_CUTSCENE(p0: types.Any, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(16141777635363957634)), p0, p1, p2);
}
/// Makes the provided entity visible for yourself for the current frame.
pub fn SET_ENTITY_LOCALLY_INVISIBLE(entity: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16228063746044265944)), entity);
}
pub fn SET_ENTITY_LOCALLY_VISIBLE(entity: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2602562282395639516)), entity);
}
pub fn IS_DAMAGE_TRACKER_ACTIVE_ON_NETWORK_ID(netID: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7933423018074923878)), netID);
}
pub fn ACTIVATE_DAMAGE_TRACKER_ON_NETWORK_ID(netID: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15301859329558380313)), netID, toggle);
}
/// Used to be known as _IS_DAMAGE_TRACKER_ACTIVE_ON_PLAYER
pub fn IS_DAMAGE_TRACKER_ACTIVE_ON_PLAYER(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12828831324739458143)), player);
}
/// Used to be known as _ACTIVATE_DAMAGE_TRACKER_ON_PLAYER
pub fn ACTIVATE_DAMAGE_TRACKER_ON_PLAYER(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13745128380597845210)), player, toggle);
}
pub fn IS_SPHERE_VISIBLE_TO_ANOTHER_MACHINE(p0: f32, p1: f32, p2: f32, p3: f32) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(15577098879177796056)), p0, p1, p2, p3);
}
pub fn IS_SPHERE_VISIBLE_TO_PLAYER(p0: types.Any, p1: f32, p2: f32, p3: f32, p4: f32) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(15869050122087553634)), p0, p1, p2, p3, p4);
}
pub fn RESERVE_NETWORK_MISSION_OBJECTS(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5646550472978529272)), amount);
}
pub fn RESERVE_NETWORK_MISSION_PEDS(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13118963330556613487)), amount);
}
pub fn RESERVE_NETWORK_MISSION_VEHICLES(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8552386415624168553)), amount);
}
/// Used to be known as _RESERVE_NETWORK_LOCAL_OBJECTS
pub fn RESERVE_LOCAL_NETWORK_MISSION_OBJECTS(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8754888129885606414)), amount);
}
/// Used to be known as _RESERVE_NETWORK_LOCAL_PEDS
pub fn RESERVE_LOCAL_NETWORK_MISSION_PEDS(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3210492388075721345)), amount);
}
/// Used to be known as _RESERVE_NETWORK_LOCAL_VEHICLES
pub fn RESERVE_LOCAL_NETWORK_MISSION_VEHICLES(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4783157283796173320)), amount);
}
pub fn CAN_REGISTER_MISSION_OBJECTS(amount: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9227264798088691851)), amount);
}
pub fn CAN_REGISTER_MISSION_PEDS(amount: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13600677290276411265)), amount);
}
pub fn CAN_REGISTER_MISSION_VEHICLES(amount: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8248327268003606132)), amount);
}
/// Used to be known as _CAN_REGISTER_MISSION_PICKUPS
pub fn CAN_REGISTER_MISSION_PICKUPS(amount: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(741354285336670066)), amount);
}
pub fn CAN_REGISTER_MISSION_DOORS(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16242978679968165315)), p0);
}
pub fn CAN_REGISTER_MISSION_ENTITIES(ped_amt: c_int, vehicle_amt: c_int, object_amt: c_int, pickup_amt: c_int) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(7599699531063287405)), ped_amt, vehicle_amt, object_amt, pickup_amt);
}
/// p0 appears to be for MP
pub fn GET_NUM_RESERVED_MISSION_OBJECTS(p0: windows.BOOL, p1: types.Any) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(12286301305332579010)), p0, p1);
}
/// p0 appears to be for MP
pub fn GET_NUM_RESERVED_MISSION_PEDS(p0: windows.BOOL, p1: types.Any) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(2239368384589430295)), p0, p1);
}
/// p0 appears to be for MP
pub fn GET_NUM_RESERVED_MISSION_VEHICLES(p0: windows.BOOL, p1: types.Any) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(14932412823601750065)), p0, p1);
}
pub fn GET_NUM_CREATED_MISSION_OBJECTS(p0: windows.BOOL) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(1348309236691961536)), p0);
}
pub fn GET_NUM_CREATED_MISSION_PEDS(p0: windows.BOOL) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(14637081742576974567)), p0);
}
pub fn GET_NUM_CREATED_MISSION_VEHICLES(p0: windows.BOOL) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(925959778748084458)), p0);
}
/// Used to be known as _GET_RESERVATIONS_FOR_SLOT_WORLD_POSITION
pub fn GET_RESERVED_MISSION_ENTITIES_IN_AREA(x: f32, y: f32, z: f32, p3: types.Any, out1: [*c]types.Any, out2: [*c]types.Any, out3: [*c]types.Any) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(16441906043154654681)), x, y, z, p3, out1, out2, out3);
}
pub fn GET_MAX_NUM_NETWORK_OBJECTS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(14392997886784040060)));
}
pub fn GET_MAX_NUM_NETWORK_PEDS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(873554608501105289)));
}
pub fn GET_MAX_NUM_NETWORK_VEHICLES() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(791759602904146431)));
}
pub fn GET_MAX_NUM_NETWORK_PICKUPS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(12044935504594353740)));
}
/// Used to be known as _NETWORK_SET_OBJECT_INTEREST_RANGE
pub fn NETWORK_SET_OBJECT_SCOPE_DISTANCE(object: types.Object, range: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13438472422450417335)), object, range);
}
pub fn NETWORK_ALLOW_CLONING_WHILE_IN_TUTORIAL(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1088265022765349781)), p0, p1);
}
/// A value between 1.0 and 5.0
/// _NETWORK_SET_TASK_CUTSCENE_PROXIMITY_SCALE?
pub fn NETWORK_SET_TASK_CUTSCENE_INSCOPE_MULTIPLER(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14338597142480612897)), p0);
}
pub fn GET_NETWORK_TIME() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(8814819898341092168)));
}
/// Returns the same value as GET_NETWORK_TIME in freemode, but as opposed to `GET_NETWORK_TIME` it always gets the most recent time, instead of once per tick.
/// Could be used for benchmarking since it can return times in ticks.
pub fn GET_NETWORK_TIME_ACCURATE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(9872523409720610463)));
}
pub fn HAS_NETWORK_TIME_STARTED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(5075990876382755972)));
}
/// Adds the first argument to the second.
pub fn GET_TIME_OFFSET(timeA: c_int, timeB: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(103592467367232771)), timeA, timeB);
}
/// Subtracts the second argument from the first, then returns whether the result is negative.
/// Used to be known as _SUBTRACT_B_FROM_A_AND_CHECK_IF_NEGATIVE
pub fn IS_TIME_LESS_THAN(timeA: c_int, timeB: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(14640345957071505616)), timeA, timeB);
}
/// Subtracts the first argument from the second, then returns whether the result is negative.
/// Used to be known as _SUBTRACT_A_FROM_B_AND_CHECK_IF_NEGATIVE
pub fn IS_TIME_MORE_THAN(timeA: c_int, timeB: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(16011721119759610988)), timeA, timeB);
}
/// Returns true if the two times are equal; otherwise returns false.
/// Used to be known as _ARE_INTEGERS_EQUAL
pub fn IS_TIME_EQUAL_TO(timeA: c_int, timeB: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(17707192235454813458)), timeA, timeB);
}
/// Subtracts the second argument from the first.
pub fn GET_TIME_DIFFERENCE(timeA: c_int, timeB: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(11729339369839329264)), timeA, timeB);
}
/// Used to be known as _FORMAT_TIME
pub fn GET_TIME_AS_STRING(time: c_int) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(11395146608893132205)), time);
}
/// Same as GET_CLOUD_TIME_AS_INT but returns the value as a hex string (%I64X).
/// Used to be known as _GET_CLOUD_TIME_AS_STRING
pub fn GET_CLOUD_TIME_AS_STRING() [*c]const u8 {
return nativeCaller.invoke0(@as(u64, @intCast(17378947654497851038)));
}
/// Returns POSIX timestamp, an int representing the cloud time.
pub fn GET_CLOUD_TIME_AS_INT() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(11129278735060327542)));
}
/// Takes the specified time and writes it to the structure specified in the second argument.
/// struct date_time
/// {
/// int year;
/// int PADDING1;
/// int month;
/// int PADDING2;
/// int day;
/// int PADDING3;
/// int hour;
/// int PADDING4;
/// int minute;
/// int PADDING5;
/// int second;
/// int PADDING6;
/// };
/// Used to be known as _GET_DATE_AND_TIME_FROM_UNIX_EPOCH
pub fn CONVERT_POSIX_TIME(posixTime: c_int, timeStructure: [*c]types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12436601963283015125)), posixTime, timeStructure);
}
pub fn NETWORK_SET_IN_SPECTATOR_MODE(toggle: windows.BOOL, playerPed: types.Ped) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4773221341722904724)), toggle, playerPed);
}
pub fn NETWORK_SET_IN_SPECTATOR_MODE_EXTENDED(toggle: windows.BOOL, playerPed: types.Ped, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(4725847079013019936)), toggle, playerPed, p2);
}
pub fn NETWORK_SET_IN_FREE_CAM_MODE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18165510258038530118)), toggle);
}
/// Used to be known as NETWORK_SET_CHOICE_MIGRATE_OPTIONS
pub fn NETWORK_SET_ANTAGONISTIC_TO_PLAYER(toggle: windows.BOOL, player: types.Player) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6660958429499668986)), toggle, player);
}
pub fn NETWORK_IS_IN_SPECTATOR_MODE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(326307441068617233)));
}
pub fn NETWORK_SET_IN_MP_CUTSCENE(p0: windows.BOOL, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11287672567829757636)), p0, p1);
}
pub fn NETWORK_IS_IN_MP_CUTSCENE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(7836963326637900320)));
}
pub fn NETWORK_IS_PLAYER_IN_MP_CUTSCENE(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7204050901172361714)), player);
}
pub fn NETWORK_HIDE_PROJECTILE_IN_CUTSCENE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(18068879806014763536)));
}
pub fn SET_NETWORK_VEHICLE_RESPOT_TIMER(netId: c_int, time: c_int, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(17028516163055531752)), netId, time, p2, p3);
}
pub fn IS_NETWORK_VEHICLE_RUNNING_RESPOT_TIMER(networkID: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15959894354593425574)), networkID);
}
/// Used to be known as _SET_NETWORK_OBJECT_NON_CONTACT
pub fn SET_NETWORK_VEHICLE_AS_GHOST(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7094511303302087710)), vehicle, toggle);
}
/// rage::netBlenderLinInterp::GetPositionMaxForUpdateLevel
/// Used to be known as _SET_NETWORK_VEHICLE_POSITION_UPDATE_MULTIPLIER
pub fn SET_NETWORK_VEHICLE_MAX_POSITION_DELTA_MULTIPLIER(vehicle: types.Vehicle, multiplier: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11720344903059199196)), vehicle, multiplier);
}
/// Enables a periodic ShapeTest within the NetBlender and invokes rage::netBlenderLinInterp::GoStraightToTarget (or some functional wrapper).
/// Used to be known as _SET_NETWORK_ENABLE_VEHICLE_POSITION_CORRECTION
pub fn SET_NETWORK_ENABLE_HIGH_SPEED_EDGE_FALL_DETECTION(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9479409345686203725)), vehicle, toggle);
}
/// Used to be known as _SET_LOCAL_PLAYER_AS_GHOST
pub fn SET_LOCAL_PLAYER_AS_GHOST(toggle: windows.BOOL, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6917136782320038191)), toggle, p1);
}
/// Used to be known as _IS_ENTITY_A_GHOST
/// Used to be known as _IS_ENTITY_GHOSTED_TO_LOCAL_PLAYER
pub fn IS_ENTITY_A_GHOST(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2436532592392585542)), entity);
}
pub fn SET_NON_PARTICIPANTS_OF_THIS_SCRIPT_AS_GHOSTS(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1437207593544589488)), p0);
}
/// Enables ghosting between specific players
/// Used to be known as _SET_RELATIONSHIP_TO_PLAYER
pub fn SET_REMOTE_PLAYER_AS_GHOST(player: types.Player, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12089088540661242424)), player, p1);
}
/// Must be a value between 1 and 254
/// Used to be known as _SET_GHOSTED_ENTITY_ALPHA
pub fn SET_GHOST_ALPHA(alpha: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7315253918893750910)), alpha);
}
/// Resets the entity ghost alpha to the default value (128)
/// Used to be known as _RESET_GHOSTED_ENTITY_ALPHA
pub fn RESET_GHOST_ALPHA() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(1671696100976829608)));
}
/// Used to be known as _NETWORK_SET_ENTITY_GHOSTED_WITH_OWNER
pub fn SET_ENTITY_GHOSTED_FOR_GHOST_PLAYERS(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5449749206986493652)), entity, toggle);
}
pub fn SET_INVERT_GHOSTING(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15543830227334568911)), p0);
}
pub fn IS_ENTITY_IN_GHOST_COLLISION(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9148891786601037584)), entity);
}
pub fn USE_PLAYER_COLOUR_INSTEAD_OF_TEAM_COLOUR(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8607928348571297479)), toggle);
}
pub fn NETWORK_CREATE_SYNCHRONISED_SCENE(x: f32, y: f32, z: f32, xRot: f32, yRot: f32, zRot: f32, rotationOrder: c_int, useOcclusionPortal: windows.BOOL, looped: windows.BOOL, p9: f32, animTime: f32, p11: f32) c_int {
return nativeCaller.invoke12(@as(u64, @intCast(8995584341056541990)), x, y, z, xRot, yRot, zRot, rotationOrder, useOcclusionPortal, looped, p9, animTime, p11);
}
pub fn NETWORK_ADD_PED_TO_SYNCHRONISED_SCENE(ped: types.Ped, netScene: c_int, animDict: [*c]const u8, animnName: [*c]const u8, speed: f32, speedMultiplier: f32, duration: c_int, flag: c_int, playbackRate: f32, p9: types.Any) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(8370612209197051097)), ped, netScene, animDict, animnName, speed, speedMultiplier, duration, flag, playbackRate, p9);
}
pub fn NETWORK_ADD_PED_TO_SYNCHRONISED_SCENE_WITH_IK(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any, p6: types.Any, p7: types.Any, p8: types.Any, p9: types.Any) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(11955647742749295682)), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9);
}
pub fn NETWORK_ADD_ENTITY_TO_SYNCHRONISED_SCENE(entity: types.Entity, netScene: c_int, animDict: [*c]const u8, animName: [*c]const u8, speed: f32, speedMulitiplier: f32, flag: c_int) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(17456037268178884090)), entity, netScene, animDict, animName, speed, speedMulitiplier, flag);
}
/// Similar structure as NETWORK_ADD_ENTITY_TO_SYNCHRONISED_SCENE but it includes this time a hash.
/// In casino_slots it is used one time in a synced scene involving a ped and the slot machine?
pub fn NETWORK_ADD_MAP_ENTITY_TO_SYNCHRONISED_SCENE(netScene: c_int, modelHash: types.Hash, x: f32, y: f32, z: f32, p5: f32, p6: [*c]const u8, p7: f32, p8: f32, flags: c_int) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(5040473626851389499)), netScene, modelHash, x, y, z, p5, p6, p7, p8, flags);
}
pub fn NETWORK_ADD_SYNCHRONISED_SCENE_CAMERA(netScene: c_int, animDict: [*c]const u8, animName: [*c]const u8) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(14955279743659623127)), netScene, animDict, animName);
}
pub fn NETWORK_ATTACH_SYNCHRONISED_SCENE_TO_ENTITY(netScene: c_int, entity: types.Entity, bone: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(5156001254057144410)), netScene, entity, bone);
}
pub fn NETWORK_START_SYNCHRONISED_SCENE(netScene: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11104539458923169431)), netScene);
}
pub fn NETWORK_STOP_SYNCHRONISED_SCENE(netScene: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14002896419073346351)), netScene);
}
/// Used to be known as _NETWORK_UNLINK_NETWORKED_SYNCHRONISED_SCENE
/// Used to be known as _NETWORK_CONVERT_SYNCHRONISED_SCENE_TO_SYNCHRONIZED_SCENE
pub fn NETWORK_GET_LOCAL_SCENE_FROM_NETWORK_ID(netId: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(199297445535246262)), netId);
}
/// Used to be known as _NETWORK_FORCE_LOCAL_USE_OF_SYNCED_SCENE_CAMERA
pub fn NETWORK_FORCE_LOCAL_USE_OF_SYNCED_SCENE_CAMERA(netScene: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14534305891649105319)), netScene);
}
pub fn NETWORK_ALLOW_REMOTE_SYNCED_SCENE_LOCAL_PLAYER_REQUESTS(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1463001728641853400)), p0);
}
/// p0 is always 0. p1 is pointing to a global.
pub fn NETWORK_FIND_LARGEST_BUNCH_OF_PLAYERS(p0: c_int, p1: types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(18095344013951344959)), p0, p1);
}
/// One of the first things it does is get the players ped.
/// Then it calls a function that is used in some tasks and ped based functions.
/// p5, p6, p7 is another coordinate (or zero), often related to `GET_BLIP_COORDS, in the decompiled scripts.
pub fn NETWORK_START_RESPAWN_SEARCH_FOR_PLAYER(player: types.Player, x: f32, y: f32, z: f32, radius: f32, p5: f32, p6: f32, p7: f32, flags: c_int) windows.BOOL {
return nativeCaller.invoke9(@as(u64, @intCast(6516702219224674636)), player, x, y, z, radius, p5, p6, p7, flags);
}
/// p8, p9, p10 is another coordinate, or zero, often related to `GET_BLIP_COORDS in the decompiled scripts.
pub fn NETWORK_START_RESPAWN_SEARCH_IN_ANGLED_AREA_FOR_PLAYER(player: types.Player, x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, width: f32, p8: f32, p9: f32, p10: f32, flags: c_int) windows.BOOL {
return nativeCaller.invoke12(@as(u64, @intCast(5451935107821324897)), player, x1, y1, z1, x2, y2, z2, width, p8, p9, p10, flags);
}
pub fn NETWORK_QUERY_RESPAWN_RESULTS(p0: [*c]types.Any) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(4362046460660277198)), p0);
}
pub fn NETWORK_CANCEL_RESPAWN_SEARCH() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(18126753682458447038)));
}
/// Based on scripts such as in freemode.c how they call their vars vVar and fVar the 2nd and 3rd param it a Vector3 and Float, but the first is based on get_random_int_in_range..
pub fn NETWORK_GET_RESPAWN_RESULT(randomInt: c_int, coordinates: [*c]types.Vector3, heading: [*c]f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(3971792475680808177)), randomInt, coordinates, heading);
}
pub fn NETWORK_GET_RESPAWN_RESULT_FLAGS(p0: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(7797121976967439357)), p0);
}
pub fn NETWORK_START_SOLO_TUTORIAL_SESSION() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(1720403143394771659)));
}
/// teamId must be < 3, instanceId must be < 64
pub fn NETWORK_ALLOW_GANG_TO_JOIN_TUTORIAL_SESSION(teamId: c_int, instanceId: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18115744070583835760)), teamId, instanceId);
}
pub fn NETWORK_END_TUTORIAL_SESSION() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(15037431150385394423)));
}
pub fn NETWORK_IS_IN_TUTORIAL_SESSION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(12511636424984419023)));
}
pub fn NETWORK_WAITING_POP_CLEAR_TUTORIAL_SESSION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(12933861397624310395)));
}
pub fn NETWORK_IS_TUTORIAL_SESSION_CHANGE_PENDING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(3886810482984036173)));
}
pub fn NETWORK_GET_PLAYER_TUTORIAL_SESSION_INSTANCE(player: types.Player) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(4267481048380686644)), player);
}
/// Used to be known as _NETWORK_IS_PLAYER_EQUAL_TO_INDEX
pub fn NETWORK_ARE_PLAYERS_IN_SAME_TUTORIAL_SESSION(player: types.Player, index: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(11378774353010738292)), player, index);
}
pub fn NETWORK_BLOCK_PROXY_MIGRATION_BETWEEN_TUTORIAL_SESSIONS(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18349814783046536530)), p0);
}
pub fn NETWORK_CONCEAL_PLAYER(player: types.Player, toggle: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(13537546024259851782)), player, toggle, p2);
}
pub fn NETWORK_IS_PLAYER_CONCEALED(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10492046384407155449)), player);
}
/// Used to be known as _NETWORK_CONCEAL_ENTITY
pub fn NETWORK_CONCEAL_ENTITY(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1599549771081984118)), entity, toggle);
}
/// Note: This only works for vehicles, which appears to be a bug (since the setter _does_ work for every entity type and the name is 99% correct).
/// Used to be known as _NETWORK_IS_ENTITY_CONCEALED
pub fn NETWORK_IS_ENTITY_CONCEALED(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8156070357510980906)), entity);
}
/// Works in Singleplayer too.
/// Passing wrong data (e.g. hours above 23) will cause the game to crash.
pub fn NETWORK_OVERRIDE_CLOCK_TIME(hours: c_int, minutes: c_int, seconds: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(16607555653966641298)), hours, minutes, seconds);
}
/// Used to be known as _NETWORK_OVERRIDE_CLOCK_MILLISECONDS_PER_GAME_MINUTE
pub fn NETWORK_OVERRIDE_CLOCK_RATE(ms: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4809595012377177470)), ms);
}
pub fn NETWORK_CLEAR_CLOCK_TIME_OVERRIDE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(15668831687896176238)));
}
pub fn NETWORK_IS_CLOCK_TIME_OVERRIDDEN() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(15549061658607711522)));
}
pub fn NETWORK_ADD_ENTITY_AREA(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32) c_int {
return nativeCaller.invoke6(@as(u64, @intCast(5281754460235301481)), x1, y1, z1, x2, y2, z2);
}
/// To remove, see: NETWORK_REMOVE_ENTITY_AREA
/// See IS_POINT_IN_ANGLED_AREA for the definition of an angled area.
/// Used to be known as _NETWORK_ADD_ENTITY_ANGLED_AREA
pub fn NETWORK_ADD_ENTITY_ANGLED_AREA(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, width: f32) c_int {
return nativeCaller.invoke7(@as(u64, @intCast(3993676326859974970)), x1, y1, z1, x2, y2, z2, width);
}
/// Used to be known as NETWORK_ADD_ENTITY_DISPLAYED_BOUNDARIES
pub fn NETWORK_ADD_CLIENT_ENTITY_AREA(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32) c_int {
return nativeCaller.invoke6(@as(u64, @intCast(2718371469070999809)), x1, y1, z1, x2, y2, z2);
}
pub fn NETWORK_ADD_CLIENT_ENTITY_ANGLED_AREA(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, radius: f32) c_int {
return nativeCaller.invoke7(@as(u64, @intCast(3106465836238048669)), x1, y1, z1, x2, y2, z2, radius);
}
pub fn NETWORK_REMOVE_ENTITY_AREA(areaHandle: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10650879646885496948)), areaHandle);
}
pub fn NETWORK_ENTITY_AREA_DOES_EXIST(areaHandle: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16594142437274433449)), areaHandle);
}
pub fn NETWORK_ENTITY_AREA_HAVE_ALL_REPLIED(areaHandle: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5618187755484512177)), areaHandle);
}
pub fn NETWORK_ENTITY_AREA_IS_OCCUPIED(areaHandle: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5345014695762221839)), areaHandle);
}
/// Used to be known as _NETWORK_SET_NETWORK_ID_DYNAMIC
pub fn NETWORK_USE_HIGH_PRECISION_BLENDING(netID: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3105253570959644357)), netID, toggle);
}
pub fn NETWORK_SET_CUSTOM_ARENA_BALL_PARAMS(netId: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12032752679422908025)), netId);
}
pub fn NETWORK_ENTITY_USE_HIGH_PRECISION_ROTATION(netId: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10789210170476348969)), netId, toggle);
}
/// Used to be known as _NETWORK_REQUEST_CLOUD_BACKGROUND_SCRIPTS
pub fn NETWORK_REQUEST_CLOUD_BACKGROUND_SCRIPTS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(10539591633987627285)));
}
/// Used to be known as _HAS_BG_SCRIPT_BEEN_DOWNLOADED
/// Used to be known as _NETWORK_IS_CLOUD_BACKGROUND_SCRIPTS_REQUEST_PENDING
pub fn NETWORK_IS_CLOUD_BACKGROUND_SCRIPT_REQUEST_PENDING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9309715497612948115)));
}
pub fn NETWORK_REQUEST_CLOUD_TUNABLES() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(4826516654086319724)));
}
/// Used to be known as _HAS_TUNABLES_BEEN_DOWNLOADED
pub fn NETWORK_IS_TUNABLE_CLOUD_REQUEST_PENDING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(317434636979109160)));
}
/// Actually returns the version (TUNABLE_VERSION)
/// Used to be known as _NETWORK_GET_TUNABLES_VERSION
pub fn NETWORK_GET_TUNABLE_CLOUD_CRC() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(1206158184553319812)));
}
pub fn NETWORK_DOES_TUNABLE_EXIST(tunableContext: [*c]const u8, tunableName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(9648391253260808714)), tunableContext, tunableName);
}
pub fn NETWORK_ACCESS_TUNABLE_INT(tunableContext: [*c]const u8, tunableName: [*c]const u8, value: [*c]c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(10079359903666619496)), tunableContext, tunableName, value);
}
pub fn NETWORK_ACCESS_TUNABLE_FLOAT(tunableContext: [*c]const u8, tunableName: [*c]const u8, value: [*c]f32) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(16528365284492720735)), tunableContext, tunableName, value);
}
pub fn NETWORK_ACCESS_TUNABLE_BOOL(tunableContext: [*c]const u8, tunableName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(12279706109914888026)), tunableContext, tunableName);
}
/// Used to be known as _NETWORK_DOES_TUNABLE_EXIST_HASH
pub fn NETWORK_DOES_TUNABLE_EXIST_HASH(tunableContext: types.Hash, tunableName: types.Hash) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(16493657466368168231)), tunableContext, tunableName);
}
pub fn NETWORK_ACCESS_TUNABLE_MODIFICATION_DETECTION_CLEAR() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(18085369437639698651)));
}
/// Used to be known as _NETWORK_ACCESS_TUNABLE_INT_HASH
pub fn NETWORK_ACCESS_TUNABLE_INT_HASH(tunableContext: types.Hash, tunableName: types.Hash, value: [*c]c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(4682864270808505320)), tunableContext, tunableName, value);
}
/// Used to be known as _NETWORK_REGISTER_TUNABLE_INT_HASH
pub fn NETWORK_ACCESS_TUNABLE_INT_MODIFICATION_DETECTION_REGISTRATION_HASH(contextHash: types.Hash, nameHash: types.Hash, value: [*c]c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(4218560023842315759)), contextHash, nameHash, value);
}
/// Used to be known as _NETWORK_ACCESS_TUNABLE_FLOAT_HASH
pub fn NETWORK_ACCESS_TUNABLE_FLOAT_HASH(tunableContext: types.Hash, tunableName: types.Hash, value: [*c]f32) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(10893013445016601813)), tunableContext, tunableName, value);
}
/// Used to be known as _NETWORK_REGISTER_TUNABLE_FLOAT_HASH
pub fn NETWORK_ACCESS_TUNABLE_FLOAT_MODIFICATION_DETECTION_REGISTRATION_HASH(contextHash: types.Hash, nameHash: types.Hash, value: [*c]f32) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(1824198545570940729)), contextHash, nameHash, value);
}
/// Used to be known as _NETWORK_ACCESS_TUNABLE_BOOL_HASH
pub fn NETWORK_ACCESS_TUNABLE_BOOL_HASH(tunableContext: types.Hash, tunableName: types.Hash) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(16867870242269239877)), tunableContext, tunableName);
}
/// Used to be known as _NETWORK_REGISTER_TUNABLE_BOOL_HASH
pub fn NETWORK_ACCESS_TUNABLE_BOOL_MODIFICATION_DETECTION_REGISTRATION_HASH(contextHash: types.Hash, nameHash: types.Hash, value: [*c]windows.BOOL) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(7601883242706721602)), contextHash, nameHash, value);
}
/// Returns defaultValue if the tunable doesn't exist.
/// Used to be known as _NETWORK_ACCESS_TUNABLE_BOOL_HASH_FAIL_VAL
pub fn NETWORK_TRY_ACCESS_TUNABLE_BOOL_HASH(tunableContext: types.Hash, tunableName: types.Hash, defaultValue: windows.BOOL) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(14358039221613945478)), tunableContext, tunableName, defaultValue);
}
/// Return the content modifier id (the tunables context if you want) of a specific content.
/// It takes the content hash (which is the mission id hash), and return the content modifier id, used as the tunables context.
/// The mission id can be found on the Social club, for example, 'socialclub.rockstargames.com/games/gtav/jobs/job/A8M6Bz8MLEC5xngvDCzGwA'
/// 'A8M6Bz8MLEC5xngvDCzGwA' is the mission id, so the game hash this and use it as the parameter for this native.
/// Used to be known as _GET_TUNABLES_CONTENT_MODIFIER_ID
pub fn NETWORK_GET_CONTENT_MODIFIER_LIST_ID(contentHash: types.Hash) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(1761895883644905155)), contentHash);
}
pub fn NETWORK_GET_BONE_ID_OF_FATAL_HIT() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(9058211335668634016)));
}
pub fn NETWORK_RESET_BODY_TRACKER() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(8233484577556323684)));
}
/// Used to be known as _NETWORK_GET_NUM_BODY_TRACKERS
pub fn NETWORK_GET_NUMBER_BODY_TRACKER_HITS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(15243640670829412765)));
}
pub fn NETWORK_HAS_BONE_BEEN_HIT_BY_KILLER(boneIndex: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3318016592125070665)), boneIndex);
}
pub fn NETWORK_SET_ATTRIBUTE_DAMAGE_TO_PLAYER(ped: types.Ped, player: types.Player) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(1071349206298201918)), ped, player);
}
/// Allows vehicle wheels to be destructible even when the vehicle entity is invincible.
/// Used to be known as _NETWORK_SET_VEHICLE_WHEELS_DESTRUCTIBLE
pub fn NETWORK_TRIGGER_DAMAGE_EVENT_FOR_ZERO_DAMAGE(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9875879801130525549)), entity, toggle);
}
pub fn NETWORK_TRIGGER_DAMAGE_EVENT_FOR_ZERO_WEAPON_HASH(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4086951905306986456)), entity, toggle);
}
pub fn NETWORK_SET_NO_LONGER_NEEDED(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4595806223365064733)), entity, toggle);
}
/// In the console script dumps, this is only referenced once.
/// NETWORK::NETWORK_EXPLODE_VEHICLE(vehicle, 1, 0, 0);
/// ^^^^^ That must be PC script dumps? In X360 Script Dumps it is reference a few times with 2 differences in the parameters.
/// Which as you see below is 1, 0, 0 + 1, 1, 0 + 1, 0, and a *param?
/// am_plane_takedown.c
/// network_explode_vehicle(net_to_veh(Local_40.imm_2), 1, 1, 0);
/// armenian2.c
/// network_explode_vehicle(Local_80[6 <2>], 1, 0, 0);
/// fm_horde_controler.c
/// network_explode_vehicle(net_to_veh(*uParam0), 1, 0, *uParam0);
/// fm_mission_controller.c, has 6 hits so not going to list them.
/// Side note, setting the first parameter to 0 seems to mute sound or so?
/// Seems it's like ADD_EXPLOSION, etc. the first 2 params. The 3rd atm no need to worry since it always seems to be 0.
pub fn NETWORK_EXPLODE_VEHICLE(vehicle: types.Vehicle, isAudible: windows.BOOL, isInvisible: windows.BOOL, netId: c_int) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(3466155522193544967)), vehicle, isAudible, isInvisible, netId);
}
pub fn NETWORK_EXPLODE_HELI(vehicle: types.Vehicle, isAudible: windows.BOOL, isInvisible: windows.BOOL, netId: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(3052884339923704474)), vehicle, isAudible, isInvisible, netId);
}
pub fn NETWORK_USE_LOGARITHMIC_BLENDING_THIS_FRAME(entity: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14803794786533929118)), entity);
}
pub fn NETWORK_OVERRIDE_COORDS_AND_HEADING(entity: types.Entity, x: f32, y: f32, z: f32, heading: f32) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(12097528319082982729)), entity, x, y, z, heading);
}
pub fn NETWORK_ENABLE_EXTRA_VEHICLE_ORIENTATION_BLEND_CHECKS(netId: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16605192274079157642)), netId, toggle);
}
pub fn NETWORK_DISABLE_PROXIMITY_MIGRATION(netID: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4643371535677460878)), netID);
}
/// value must be < 255
pub fn NETWORK_SET_PROPERTY_ID(id: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1690422282951576412)), id);
}
pub fn NETWORK_CLEAR_PROPERTY_ID() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(14031005491903530302)));
}
/// p0 in the decompiled scripts is always the stat mesh_texblend * 0.07 to int
pub fn NETWORK_SET_PLAYER_MENTAL_STATE(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3926846280222487750)), p0);
}
pub fn NETWORK_SET_MINIMUM_RANK_FOR_MISSION(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10688027318389372367)), p0);
}
pub fn NETWORK_CACHE_LOCAL_PLAYER_HEAD_BLEND_DATA() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(13622228612230408897)));
}
pub fn NETWORK_HAS_CACHED_PLAYER_HEAD_BLEND_DATA(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2557291657655828744)), player);
}
/// Used to be known as _NETWORK_COPY_PED_BLEND_DATA
pub fn NETWORK_APPLY_CACHED_PLAYER_HEAD_BLEND_DATA(ped: types.Ped, player: types.Player) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(11076370714224609552)), ped, player);
}
pub fn GET_NUM_COMMERCE_ITEMS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(17504016292177905187)));
}
pub fn IS_COMMERCE_DATA_VALID() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(16867369243527425072)));
}
/// Does nothing (it's a nullsub).
pub fn TRIGGER_COMMERCE_DATA_FETCH(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13116424730110740850)), p0);
}
pub fn IS_COMMERCE_DATA_FETCH_IN_PROGRESS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(2111556539582951408)));
}
pub fn GET_COMMERCE_ITEM_ID(index: c_int) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(7360629487829500945)), index);
}
pub fn GET_COMMERCE_ITEM_NAME(index: c_int) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(12981362673567326024)), index);
}
pub fn GET_COMMERCE_PRODUCT_PRICE(index: c_int) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(14597385868021109548)), index);
}
pub fn GET_COMMERCE_ITEM_NUM_CATS(index: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(3060045069052562096)), index);
}
/// index2 is unused
pub fn GET_COMMERCE_ITEM_CAT(index: c_int, index2: c_int) [*c]const u8 {
return nativeCaller.invoke2(@as(u64, @intCast(8017757491590462144)), index, index2);
}
pub fn OPEN_COMMERCE_STORE(p0: [*c]const u8, p1: [*c]const u8, p2: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(6395693550441617554)), p0, p1, p2);
}
pub fn IS_COMMERCE_STORE_OPEN() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(3363153954813650818)));
}
/// Access to the store for shark cards etc...
pub fn SET_STORE_ENABLED(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10827121893762309214)), toggle);
}
pub fn REQUEST_COMMERCE_ITEM_IMAGE(index: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11743507733356666187)), index);
}
pub fn RELEASE_ALL_COMMERCE_ITEM_IMAGES() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(8273236128242129752)));
}
pub fn GET_COMMERCE_ITEM_TEXTURENAME(index: c_int) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(8227897473664573096)), index);
}
pub fn IS_STORE_AVAILABLE_TO_USER() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9817136645577513139)));
}
pub fn DELAY_MP_STORE_OPEN() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(2762453786012211246)));
}
pub fn RESET_STORE_NETWORK_GAME_TRACKING() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(4921384521999361209)));
}
pub fn IS_USER_OLD_ENOUGH_TO_ACCESS_STORE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6427356507131407147)));
}
pub fn SET_LAST_VIEWED_SHOP_ITEM(p0: types.Hash, p1: c_int, p2: types.Hash) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(18079182773598138937)), p0, p1, p2);
}
/// Checks some commerce stuff
pub fn GET_USER_PREMIUM_ACCESS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(8450465154252051720)));
}
/// Checks some commerce stuff
pub fn GET_USER_STARTER_ACCESS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(1536967363972650757)));
}
pub fn CLOUD_DELETE_MEMBER_FILE(p0: [*c]const u8) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(14289338322178473527)), p0);
}
pub fn CLOUD_HAS_REQUEST_COMPLETED(requestId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5503877690153780698)), requestId);
}
pub fn CLOUD_DID_REQUEST_SUCCEED(requestId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4196604335882861781)), requestId);
}
/// Downloads prod.cloud.rockstargames.com/titles/gta5/[platform]/check.json
/// Used to be known as _DOWNLOAD_CHECK
pub fn CLOUD_CHECK_AVAILABILITY() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(5699333282453812877)));
}
pub fn CLOUD_IS_CHECKING_AVAILABILITY() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14387782953863605819)));
}
/// Used to be known as NETWORK_ENABLE_MOTION_DRUGGED
pub fn CLOUD_GET_AVAILABILITY_CHECK_RESULT() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(796223470490173243)));
}
/// This function is hard-coded to always return 0.
pub fn GET_CONTENT_TO_LOAD_TYPE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(10019428783591201121)));
}
/// This function is hard-coded to always return 0.
pub fn GET_IS_LAUNCH_FROM_LIVE_AREA() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9850930067154634382)));
}
/// This function is hard-coded to always return 0.
pub fn GET_IS_LIVE_AREA_LAUNCH_WITH_CONTENT() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(7492874584527107557)));
}
/// This native does absolutely nothing, just a nullsub
/// Used to be known as _CLEAR_LAUNCH_PARAMS
pub fn CLEAR_SERVICE_EVENT_ARGUMENTS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(10839557715028893719)));
}
pub fn UGC_COPY_CONTENT(p0: [*c]types.Any, p1: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(1526035160925238154)), p0, p1);
}
pub fn UGC_IS_CREATING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(11524140149637185769)));
}
pub fn UGC_HAS_CREATE_FINISHED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6783604227140921163)));
}
pub fn UGC_DID_CREATE_SUCCEED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(2658501604606674425)));
}
pub fn UGC_GET_CREATE_RESULT() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(18142161111144168042)));
}
pub fn UGC_GET_CREATE_CONTENT_ID() [*c]const u8 {
return nativeCaller.invoke0(@as(u64, @intCast(14220691147171425571)));
}
pub fn UGC_CLEAR_CREATE_RESULT() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(1676476649456875321)));
}
pub fn UGC_QUERY_MY_CONTENT(p0: types.Any, p1: types.Any, p2: [*c]types.Any, p3: types.Any, p4: types.Any, p5: types.Any) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(11237669098498135786)), p0, p1, p2, p3, p4, p5);
}
pub fn UGC_QUERY_BY_CATEGORY(p0: types.Any, p1: types.Any, p2: types.Any, p3: [*c]const u8, p4: types.Any, p5: windows.BOOL) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(7578811463815757452)), p0, p1, p2, p3, p4, p5);
}
pub fn UGC_QUERY_BY_CONTENT_ID(contentId: [*c]const u8, latestVersion: windows.BOOL, contentTypeName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(1553394584470340713)), contentId, latestVersion, contentTypeName);
}
pub fn UGC_QUERY_BY_CONTENT_IDS(data: [*c]types.Any, count: c_int, latestVersion: windows.BOOL, contentTypeName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(14355639994434102370)), data, count, latestVersion, contentTypeName);
}
/// Used to be known as _UGC_QUERY_RECENTLY_CREATED_CONTENT
pub fn UGC_QUERY_MOST_RECENTLY_CREATED_CONTENT(offset: c_int, count: c_int, contentTypeName: [*c]const u8, p3: c_int) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(7875868318715360744)), offset, count, contentTypeName, p3);
}
pub fn UGC_GET_BOOKMARKED_CONTENT(p0: types.Any, p1: types.Any, p2: [*c]const u8, p3: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(15394629097145505160)), p0, p1, p2, p3);
}
pub fn UGC_GET_MY_CONTENT(p0: types.Any, p1: types.Any, p2: [*c]const u8, p3: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(3573035507683364946)), p0, p1, p2, p3);
}
pub fn UGC_GET_FRIEND_CONTENT(p0: types.Any, p1: types.Any, p2: [*c]const u8, p3: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(18005897835243160193)), p0, p1, p2, p3);
}
pub fn UGC_GET_CREW_CONTENT(p0: types.Any, p1: types.Any, p2: types.Any, p3: [*c]const u8, p4: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(11488163823955521250)), p0, p1, p2, p3, p4);
}
pub fn UGC_GET_GET_BY_CATEGORY(p0: types.Any, p1: types.Any, p2: types.Any, p3: [*c]const u8, p4: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(7461250979854013726)), p0, p1, p2, p3, p4);
}
/// Used to be known as SET_BALANCE_ADD_MACHINE
pub fn UGC_GET_GET_BY_CONTENT_ID(contentId: [*c]const u8, contentTypeName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(9321991840898620775)), contentId, contentTypeName);
}
/// Used to be known as SET_BALANCE_ADD_MACHINES
pub fn UGC_GET_GET_BY_CONTENT_IDS(data: [*c]types.Any, dataCount: c_int, contentTypeName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(13272722639618472998)), data, dataCount, contentTypeName);
}
pub fn UGC_GET_MOST_RECENTLY_CREATED_CONTENT(p0: types.Any, p1: types.Any, p2: [*c]types.Any, p3: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(12071383980299910526)), p0, p1, p2, p3);
}
pub fn UGC_GET_MOST_RECENTLY_PLAYED_CONTENT(p0: types.Any, p1: types.Any, p2: [*c]types.Any, p3: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(10927826986195910187)), p0, p1, p2, p3);
}
pub fn UGC_GET_TOP_RATED_CONTENT(p0: types.Any, p1: types.Any, p2: [*c]types.Any, p3: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(5991090304966342000)), p0, p1, p2, p3);
}
pub fn UGC_CANCEL_QUERY() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(16841663153901671433)));
}
pub fn UGC_IS_GETTING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(15364819298720302824)));
}
pub fn UGC_HAS_GET_FINISHED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(192988611513586063)));
}
pub fn UGC_DID_GET_SUCCEED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(10673059455317820103)));
}
pub fn UGC_WAS_QUERY_FORCE_CANCELLED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14447112256505803468)));
}
pub fn UGC_GET_QUERY_RESULT() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(17147448052461347403)));
}
pub fn UGC_GET_CONTENT_NUM() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(16187647368315582519)));
}
pub fn UGC_GET_CONTENT_TOTAL() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(8545951800180485813)));
}
pub fn UGC_GET_CONTENT_HASH() types.Hash {
return nativeCaller.invoke0(@as(u64, @intCast(4185993038394771591)));
}
pub fn UGC_CLEAR_QUERY_RESULTS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(13444996727801969253)));
}
/// Used to be known as _GET_CONTENT_USER_ID
/// Used to be known as GET_PLAYER_ADVANCED_MODIFIER_PRIVILEGES
pub fn UGC_GET_CONTENT_USER_ID(p0: c_int) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(14800988933507861660)), p0);
}
pub fn UGC_GET_CONTENT_CREATOR_GAMER_HANDLE(p0: c_int, p1: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(6361176664977017880)), p0, p1);
}
pub fn UGC_GET_CONTENT_CREATED_BY_LOCAL_PLAYER(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10127794265917796111)), p0);
}
pub fn UGC_GET_CONTENT_USER_NAME(p0: types.Any) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(8088203532048174069)), p0);
}
pub fn UGC_GET_CONTENT_IS_USING_SC_NICKNAME(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12586321221152778404)), p0);
}
/// Used to be known as _GET_CONTENT_CATEGORY
pub fn UGC_GET_CONTENT_CATEGORY(p0: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(12086167294499908698)), p0);
}
/// Return the mission id of a job.
/// Used to be known as _GET_CONTENT_ID
pub fn UGC_GET_CONTENT_ID(p0: c_int) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(6172911116647568594)), p0);
}
/// Return the root content id of a job.
/// Used to be known as _GET_ROOT_CONTENT_ID
pub fn UGC_GET_ROOT_CONTENT_ID(p0: c_int) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(13841599513800606536)), p0);
}
pub fn UGC_GET_CONTENT_NAME(p0: types.Any) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(13765666134840489346)), p0);
}
/// Used to be known as _GET_CONTENT_DESCRIPTION_HASH
pub fn UGC_GET_CONTENT_DESCRIPTION_HASH(p0: types.Any) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(9002771004001498968)), p0);
}
/// Used to be known as _UGC_GET_CLOUD_PATH
pub fn UGC_GET_CONTENT_PATH(p0: c_int, p1: c_int) [*c]const u8 {
return nativeCaller.invoke2(@as(u64, @intCast(13472160667485916179)), p0, p1);
}
pub fn UGC_GET_CONTENT_UPDATED_DATE(p0: types.Any, p1: [*c]types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14974774096468959075)), p0, p1);
}
/// Used to be known as _GET_CONTENT_FILE_VERSION
pub fn UGC_GET_CONTENT_FILE_VERSION(p0: types.Any, p1: types.Any) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(3963830848753916081)), p0, p1);
}
pub fn UGC_GET_CONTENT_HAS_LO_RES_PHOTO(p0: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2116989453190239961)), p0);
}
pub fn UGC_GET_CONTENT_HAS_HI_RES_PHOTO(p0: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9208798853858067389)), p0);
}
pub fn UGC_GET_CONTENT_LANGUAGE(p0: types.Any) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(3665245578741978738)), p0);
}
pub fn UGC_GET_CONTENT_IS_PUBLISHED(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3482673480369709546)), p0);
}
pub fn UGC_GET_CONTENT_IS_VERIFIED(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12187878134276475411)), p0);
}
pub fn UGC_GET_CONTENT_RATING(p0: types.Any, p1: types.Any) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(1931195021371552494)), p0, p1);
}
pub fn UGC_GET_CONTENT_RATING_COUNT(p0: types.Any, p1: types.Any) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(8472002923565535913)), p0, p1);
}
pub fn UGC_GET_CONTENT_RATING_POSITIVE_COUNT(p0: types.Any, p1: types.Any) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(9792448933333557422)), p0, p1);
}
pub fn UGC_GET_CONTENT_RATING_NEGATIVE_COUNT(p0: types.Any, p1: types.Any) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(5644290222526275577)), p0, p1);
}
pub fn UGC_GET_CONTENT_HAS_PLAYER_RECORD(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8136471418624866750)), p0);
}
pub fn UGC_GET_CONTENT_HAS_PLAYER_BOOKMARKED(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11041909679412269605)), p0);
}
pub fn UGC_REQUEST_CONTENT_DATA_FROM_INDEX(p0: c_int, p1: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(1665758607481746396)), p0, p1);
}
pub fn UGC_REQUEST_CONTENT_DATA_FROM_PARAMS(contentTypeName: [*c]const u8, contentId: [*c]const u8, p2: c_int, p3: c_int, p4: c_int) c_int {
return nativeCaller.invoke5(@as(u64, @intCast(9210592460182813022)), contentTypeName, contentId, p2, p3, p4);
}
pub fn UGC_REQUEST_CACHED_DESCRIPTION(p0: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(6773806535125711342)), p0);
}
pub fn UGC_IS_DESCRIPTION_REQUEST_IN_PROGRESS(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3268989017712820500)), p0);
}
pub fn UGC_HAS_DESCRIPTION_REQUEST_FINISHED(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(17004058720744527044)), p0);
}
pub fn UGC_DID_DESCRIPTION_REQUEST_SUCCEED(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1597691320513399394)), p0);
}
pub fn UGC_GET_CACHED_DESCRIPTION(p0: types.Any, p1: types.Any) [*c]const u8 {
return nativeCaller.invoke2(@as(u64, @intCast(4681463656773271132)), p0, p1);
}
pub fn UGC_RELEASE_CACHED_DESCRIPTION(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6500046233113717828)), p0);
}
pub fn UGC_RELEASE_ALL_CACHED_DESCRIPTIONS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(7498561696521810498)));
}
pub fn UGC_HAS_PERMISSION_TO_WRITE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14068819432963840653)));
}
pub fn UGC_PUBLISH(contentId: [*c]const u8, baseContentId: [*c]const u8, contentTypeName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(2152991054724480170)), contentId, baseContentId, contentTypeName);
}
pub fn UGC_SET_BOOKMARKED(contentId: [*c]const u8, bookmarked: windows.BOOL, contentTypeName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(2831098516628113743)), contentId, bookmarked, contentTypeName);
}
pub fn UGC_SET_DELETED(p0: [*c]types.Any, p1: windows.BOOL, p2: [*c]const u8) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(15014185785842349208)), p0, p1, p2);
}
pub fn UGC_IS_MODIFYING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(5037300884352248283)));
}
pub fn UGC_HAS_MODIFY_FINISHED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(2999102431296959750)));
}
pub fn UGC_DID_MODIFY_SUCCEED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8736968377147549172)));
}
pub fn UGC_GET_MODIFY_RESULT() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(6488065395468686600)));
}
pub fn UGC_CLEAR_MODIFY_RESULT() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(11665976839065554032)));
}
pub fn UGC_GET_CREATORS_BY_USER_ID(p0: [*c]types.Any, p1: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(13206473902398808617)), p0, p1);
}
pub fn UGC_HAS_QUERY_CREATORS_FINISHED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(7184374828337199765)));
}
pub fn UGC_DID_QUERY_CREATORS_SUCCEED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(5549041244052548094)));
}
pub fn UGC_GET_CREATOR_NUM() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(6449029024023867335)));
}
/// Used to be known as UGC_POLICIES_MAKE_PRIVATE
pub fn UGC_LOAD_OFFLINE_QUERY(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6678419587112944896)), p0);
}
pub fn UGC_CLEAR_OFFLINE_QUERY() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(7037021563208593050)));
}
pub fn UGC_SET_QUERY_DATA_FROM_OFFLINE(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17982273024087331619)), p0);
}
pub fn UGC_SET_USING_OFFLINE_CONTENT(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18263744365016366899)), p0);
}
pub fn UGC_IS_LANGUAGE_SUPPORTED(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(17671641453793767115)), p0);
}
/// Used to be known as _FACEBOOK_SET_HEIST_COMPLETE
pub fn FACEBOOK_POST_COMPLETED_HEIST(heistName: [*c]const u8, cashEarned: c_int, xpEarned: c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(687562397750766060)), heistName, cashEarned, xpEarned);
}
/// Used to be known as _FACEBOOK_SET_CREATE_CHARACTER_COMPLETE
pub fn FACEBOOK_POST_CREATE_CHARACTER() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(15873015163559105585)));
}
/// Used to be known as _FACEBOOK_SET_MILESTONE_COMPLETE
pub fn FACEBOOK_POST_COMPLETED_MILESTONE(milestoneId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(784173227228613305)), milestoneId);
}
/// Used to be known as _FACEBOOK_IS_SENDING_DATA
pub fn FACEBOOK_HAS_POST_COMPLETED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(7113997228353458415)));
}
/// Used to be known as _FACEBOOK_DO_UNK_CHECK
pub fn FACEBOOK_DID_POST_SUCCEED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(12060124574396338498)));
}
/// Used to be known as _FACEBOOK_IS_AVAILABLE
pub fn FACEBOOK_CAN_POST_TO_FACEBOOK() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(4865671592456286423)));
}
pub fn TEXTURE_DOWNLOAD_REQUEST(gamerHandle: [*c]types.Any, filePath: [*c]const u8, name: [*c]const u8, p3: windows.BOOL) c_int {
return nativeCaller.invoke4(@as(u64, @intCast(1591474530483598498)), gamerHandle, filePath, name, p3);
}
pub fn TITLE_TEXTURE_DOWNLOAD_REQUEST(filePath: [*c]const u8, name: [*c]const u8, p2: windows.BOOL) c_int {
return nativeCaller.invoke3(@as(u64, @intCast(801705926945225295)), filePath, name, p2);
}
pub fn UGC_TEXTURE_DOWNLOAD_REQUEST(p0: [*c]const u8, p1: c_int, p2: c_int, p3: c_int, p4: [*c]const u8, p5: windows.BOOL) c_int {
return nativeCaller.invoke6(@as(u64, @intCast(3499180660926482380)), p0, p1, p2, p3, p4, p5);
}
pub fn TEXTURE_DOWNLOAD_RELEASE(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5223816077257603865)), p0);
}
pub fn TEXTURE_DOWNLOAD_HAS_FAILED(p0: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6302485682914018951)), p0);
}
pub fn TEXTURE_DOWNLOAD_GET_NAME(p0: c_int) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(3767349441916642861)), p0);
}
/// 0 = succeeded
/// 1 = pending
/// 2 = failed
/// Used to be known as _GET_STATUS_OF_TEXTURE_DOWNLOAD
pub fn GET_STATUS_OF_TEXTURE_DOWNLOAD(p0: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(10076459875791962822)), p0);
}
/// Returns true if profile setting 901 is set to true and sets it to false.
pub fn NETWORK_CHECK_ROS_LINK_WENTDOWN_NOT_NET() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6984468664354086899)));
}
/// Returns true if the NAT type is Strict (3) and a certain number of connections have failed.
/// Used to be known as _NETWORK_SHOULD_SHOW_CONNECTIVITY_TROUBLESHOOTING
pub fn NETWORK_SHOULD_SHOW_STRICT_NAT_WARNING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9413283561167259889)));
}
pub fn NETWORK_IS_CABLE_CONNECTED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(17292456173534314745)));
}
/// Used to be known as _NETWORK_GET_ROS_PRIVILEGE_9
pub fn NETWORK_HAVE_SCS_PRIVATE_MSG_PRIV() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(7400994185299650479)));
}
/// Used to be known as _NETWORK_GET_ROS_PRIVILEGE_10
pub fn NETWORK_HAVE_ROS_SOCIAL_CLUB_PRIV() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6948576204782629867)));
}
/// Used to be known as _IS_ROCKSTAR_BANNED
/// Used to be known as _NETWORK_HAS_PLAYER_BEEN_BANNED
pub fn NETWORK_HAVE_ROS_BANNED_PRIV() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9232563096275438205)));
}
/// Used to be known as _IS_SOCIALCLUB_BANNED
/// Used to be known as _NETWORK_HAVE_SOCIAL_CLUB_PRIVILEGE
pub fn NETWORK_HAVE_ROS_CREATE_TICKET_PRIV() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(11578048940007006049)));
}
/// Used to be known as _IS_PLAYER_BANNED
/// Used to be known as _CAN_PLAY_ONLINE
/// Used to be known as _NETWORK_GET_ROS_PRIVILEGE_3
pub fn NETWORK_HAVE_ROS_MULTIPLAYER_PRIV() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6886520397566223120)));
}
/// Used to be known as _NETWORK_GET_ROS_PRIVILEGE_4
pub fn NETWORK_HAVE_ROS_LEADERBOARD_WRITE_PRIV() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(4768530731517961543)));
}
/// index is always 18 in scripts
pub fn NETWORK_HAS_ROS_PRIVILEGE(index: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12004790651755954708)), index);
}
/// Used to be known as _NETWORK_GET_BAN_DATA
pub fn NETWORK_HAS_ROS_PRIVILEGE_END_DATE(privilege: c_int, banType: [*c]c_int, timeData: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(13990734272451782321)), privilege, banType, timeData);
}
/// Used to be known as _NETWORK_GET_ROS_PRIVILEGE_24
pub fn NETWORK_HAS_ROS_PRIVILEGE_PLAYED_LAST_GEN() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6428168023976670856)));
}
/// Used to be known as _NETWORK_GET_ROS_PRIVILEGE_25
pub fn NETWORK_HAS_ROS_PRIVILEGE_SPECIAL_EDITION_CONTENT() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(10500279235883426641)));
}
/// Checks for privilege 29
pub fn _NETWORK_HAS_ROS_PRIVILEGE_MP_TEXT_COMMUNICATION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(15668466487696046175)));
}
/// Checks for privilege 30
pub fn _NETWORK_HAS_ROS_PRIVILEGE_MP_VOICE_COMMUNICATION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9896276493440386428)));
}
pub fn NETWORK_START_COMMUNICATION_PERMISSIONS_CHECK(p0: types.Any) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(3907188483393935709)), p0);
}
/// Always returns -1. Seems to be XB1 specific.
pub fn NETWORK_START_USER_CONTENT_PERMISSIONS_CHECK(netHandle: [*c]types.Any) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(16047092493802644134)), netHandle);
}
pub fn NETWORK_SKIP_RADIO_RESET_NEXT_CLOSE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(10693206343548747627)));
}
pub fn NETWORK_SKIP_RADIO_RESET_NEXT_OPEN() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(14580910317845472462)));
}
/// Returns true if dinput8.dll is present in the game directory.
/// You will get following error message if that is true: "You are attempting to access GTA Online servers with an altered version of the game."
/// Used to be known as _NETWORK_HAS_GAME_BEEN_ALTERED
pub fn NETWORK_SKIP_RADIO_WARNING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(7321994204644969551)));
}
/// NETWORK_F[I-O]
/// Used to be known as _NETWORK_UPDATE_PLAYER_SCARS
pub fn NETWORK_FORCE_LOCAL_PLAYER_SCAR_SYNC() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(13242824453876101195)));
}
pub fn NETWORK_DISABLE_LEAVE_REMOTE_PED_BEHIND(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14196757155057487899)), toggle);
}
/// Used to be known as _NETWORK_ALLOW_LOCAL_ENTITY_ATTACHMENT
pub fn NETWORK_ALLOW_REMOTE_ATTACHMENT_MODIFICATION(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2773224262595537818)), entity, toggle);
}
/// Does nothing (it's a nullsub).
pub fn NETWORK_SHOW_CHAT_RESTRICTION_MSC(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7782043701931276298)), player);
}
/// This native does absolutely nothing, just a nullsub
pub fn NETWORK_SHOW_PSN_UGC_RESTRICTION() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(6649975130724452459)));
}
/// This function is hard-coded to always return 0.
pub fn NETWORK_IS_TITLE_UPDATE_REQUIRED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8050108699681914786)));
}
pub fn NETWORK_QUIT_MP_TO_DESKTOP() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(5019317137924348348)));
}
/// Used to be known as _NETWORK_IS_CONNECTION_ENDPOINT_RELAY_SERVER
pub fn NETWORK_IS_CONNECTED_VIA_RELAY(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1644892042565162939)), player);
}
/// Used to be known as _NETWORK_GET_AVERAGE_LATENCY_FOR_PLAYER
pub fn NETWORK_GET_AVERAGE_LATENCY(player: types.Player) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(15282048422706158386)), player);
}
/// Same as NETWORK_GET_AVERAGE_LATENCY
/// Used to be known as _NETWORK_GET_AVERAGE_LATENCY_FOR_PLAYER_2
pub fn NETWORK_GET_AVERAGE_PING(player: types.Player) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(1025136395677346629)), player);
}
/// Used to be known as _NETWORK_GET_AVERAGE_PACKET_LOSS_FOR_PLAYER
pub fn NETWORK_GET_AVERAGE_PACKET_LOSS(player: types.Player) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(3822469304948058220)), player);
}
/// Used to be known as _NETWORK_GET_NUM_UNACKED_FOR_PLAYER
pub fn NETWORK_GET_NUM_UNACKED_RELIABLES(player: types.Player) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(18415165687380412956)), player);
}
/// Used to be known as _NETWORK_GET_UNRELIABLE_RESEND_COUNT_FOR_PLAYER
pub fn NETWORK_GET_UNRELIABLE_RESEND_COUNT(player: types.Player) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(3991811753474862608)), player);
}
/// Used to be known as _NETWORK_GET_OLDEST_RESEND_COUNT_FOR_PLAYER
pub fn NETWORK_GET_HIGHEST_RELIABLE_RESEND_COUNT(player: types.Player) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(5963305607794590466)), player);
}
/// Used to be known as _NETWORK_REPORT_MYSELF
pub fn NETWORK_REPORT_CODE_TAMPER() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(6207888651687768277)));
}
pub fn NETWORK_GET_LAST_ENTITY_POS_RECEIVED_OVER_NETWORK(entity: types.Entity) types.Vector3 {
return nativeCaller.invoke1(@as(u64, @intCast(7266410001097521945)), entity);
}
/// Returns the coordinates of another player.
/// Does not work if you enter your own player id as p0 (will return `(0.0, 0.0, 0.0)` in that case).
/// Used to be known as _NETWORK_GET_PLAYER_COORDS
pub fn NETWORK_GET_LAST_PLAYER_POS_RECEIVED_OVER_NETWORK(player: types.Player) types.Vector3 {
return nativeCaller.invoke1(@as(u64, @intCast(1323615614803510740)), player);
}
/// Used by NetBlender
/// Used to be known as _NETWORK_GET_LAST_VELOCITY_RECEIVED
pub fn NETWORK_GET_LAST_VEL_RECEIVED_OVER_NETWORK(entity: types.Entity) types.Vector3 {
return nativeCaller.invoke1(@as(u64, @intCast(3737506027128350586)), entity);
}
pub fn NETWORK_GET_PREDICTED_VELOCITY(entity: types.Entity, maxSpeedToPredict: f32) types.Vector3 {
return nativeCaller.invoke2(@as(u64, @intCast(12276724404982865479)), entity, maxSpeedToPredict);
}
/// Does nothing (it's a nullsub).
pub fn NETWORK_DUMP_NET_IF_CONFIG() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(12600820801389975267)));
}
/// Does nothing (it's a nullsub).
pub fn NETWORK_GET_SIGNALLING_INFO(p0: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2690284490974508948)), p0);
}
/// Does nothing (it's a nullsub).
pub fn NETWORK_GET_NET_STATISTICS_INFO(p0: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8059634381381286278)), p0);
}
pub fn NETWORK_GET_PLAYER_ACCOUNT_ID(player: types.Player) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(15809390380198397865)), player);
}
/// Used to be known as _NETWORK_UGC_NAV
pub fn NETWORK_UGC_NAV(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13926383842697220848)), p0, p1);
}
};
pub const OBJECT = struct {
/// List of object models that can be created without any additional effort like making sure ytyp is loaded etc: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ObjectList.ini
pub fn CREATE_OBJECT(modelHash: types.Hash, x: f32, y: f32, z: f32, isNetwork: windows.BOOL, bScriptHostObj: windows.BOOL, dynamic: windows.BOOL) types.Object {
return nativeCaller.invoke7(@as(u64, @intCast(5808896370743568450)), modelHash, x, y, z, isNetwork, bScriptHostObj, dynamic);
}
/// List of object models that can be created without any additional effort like making sure ytyp is loaded etc: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ObjectList.ini
pub fn CREATE_OBJECT_NO_OFFSET(modelHash: types.Hash, x: f32, y: f32, z: f32, isNetwork: windows.BOOL, bScriptHostObj: windows.BOOL, dynamic: windows.BOOL) types.Object {
return nativeCaller.invoke7(@as(u64, @intCast(11108492561942820996)), modelHash, x, y, z, isNetwork, bScriptHostObj, dynamic);
}
/// Deletes the specified object, then sets the handle pointed to by the pointer to NULL.
pub fn DELETE_OBJECT(object: [*c]types.Object) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6025265325407423391)), object);
}
pub fn PLACE_OBJECT_ON_GROUND_PROPERLY(object: types.Object) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6388445041372756643)), object);
}
/// Used to be known as _PLACE_OBJECT_ON_GROUND_PROPERLY_2
pub fn PLACE_OBJECT_ON_GROUND_OR_OBJECT_PROPERLY(object: types.Object) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15523607711391776726)), object);
}
pub fn ROTATE_OBJECT(object: types.Object, p1: f32, p2: f32, p3: windows.BOOL) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(12673778394683711050)), object, p1, p2, p3);
}
/// Returns true if the object has finished moving.
/// If false, moves the object towards the specified X, Y and Z coordinates with the specified X, Y and Z speed.
/// See also: https://gtagmodding.com/opcode-database/opcode/034E/
/// Has to be looped until it returns true.
pub fn SLIDE_OBJECT(object: types.Object, toX: f32, toY: f32, toZ: f32, speedX: f32, speedY: f32, speedZ: f32, collision: windows.BOOL) windows.BOOL {
return nativeCaller.invoke8(@as(u64, @intCast(3449744191218520391)), object, toX, toY, toZ, speedX, speedY, speedZ, collision);
}
pub fn SET_OBJECT_TARGETTABLE(object: types.Object, targettable: windows.BOOL, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(9976477479970995585)), object, targettable, p2);
}
/// Overrides a flag on the object which determines if the object should be avoided by a vehicle in task CTaskVehicleGoToPointWithAvoidanceAutomobile.
/// Used to be known as _SET_OBJECT_SOMETHING
pub fn SET_OBJECT_FORCE_VEHICLES_TO_AVOID(object: types.Object, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8643321571544708010)), object, toggle);
}
/// Has 8 params in the latest patches.
/// isMission - if true doesn't return mission objects
pub fn GET_CLOSEST_OBJECT_OF_TYPE(x: f32, y: f32, z: f32, radius: f32, modelHash: types.Hash, isMission: windows.BOOL, p6: windows.BOOL, p7: windows.BOOL) types.Object {
return nativeCaller.invoke8(@as(u64, @intCast(16232092507137524585)), x, y, z, radius, modelHash, isMission, p6, p7);
}
pub fn HAS_OBJECT_BEEN_BROKEN(object: types.Object, p1: types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(9997910961191404514)), object, p1);
}
pub fn HAS_CLOSEST_OBJECT_OF_TYPE_BEEN_BROKEN(p0: f32, p1: f32, p2: f32, p3: f32, modelHash: types.Hash, p5: types.Any) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(8510411767871766654)), p0, p1, p2, p3, modelHash, p5);
}
pub fn HAS_CLOSEST_OBJECT_OF_TYPE_BEEN_COMPLETELY_DESTROYED(x: f32, y: f32, z: f32, radius: f32, modelHash: types.Hash, p5: windows.BOOL) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(5064660776404390723)), x, y, z, radius, modelHash, p5);
}
pub fn GET_HAS_OBJECT_BEEN_COMPLETELY_DESTROYED(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2684750738819034244)), p0);
}
/// Used to be known as _GET_OBJECT_OFFSET_FROM_COORDS
pub fn GET_OFFSET_FROM_COORD_AND_HEADING_IN_WORLD_COORDS(xPos: f32, yPos: f32, zPos: f32, heading: f32, xOffset: f32, yOffset: f32, zOffset: f32) types.Vector3 {
return nativeCaller.invoke7(@as(u64, @intCast(1602759396355842355)), xPos, yPos, zPos, heading, xOffset, yOffset, zOffset);
}
pub fn GET_COORDS_AND_ROTATION_OF_CLOSEST_OBJECT_OF_TYPE(x: f32, y: f32, z: f32, radius: f32, modelHash: types.Hash, outPosition: [*c]types.Vector3, outRotation: [*c]types.Vector3, rotationOrder: c_int) windows.BOOL {
return nativeCaller.invoke8(@as(u64, @intCast(1603153204248928042)), x, y, z, radius, modelHash, outPosition, outRotation, rotationOrder);
}
/// Hardcoded to not work in multiplayer.
/// Used to lock/unlock doors to interior areas of the game.
/// (Possible) Door Types:
/// https://pastebin.com/9S2m3qA4
/// Heading is either 1, 0 or -1 in the scripts. Means default closed(0) or opened either into(1) or out(-1) of the interior.
/// Locked means that the heading is locked.
/// p6 is always 0.
/// 225 door types, model names and coords found in stripclub.c4:
/// https://pastebin.com/gywnbzsH
/// get door info: https://pastebin.com/i14rbekD
pub fn SET_STATE_OF_CLOSEST_DOOR_OF_TYPE(@"type": types.Hash, x: f32, y: f32, z: f32, locked: windows.BOOL, heading: f32, p6: windows.BOOL) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(17883107033543093309)), @"type", x, y, z, locked, heading, p6);
}
/// locked is 0 if no door is found
/// locked is 0 if door is unlocked
/// locked is 1 if door is found and unlocked.
/// -------------
/// the locked bool is either 0(unlocked)(false) or 1(locked)(true)
pub fn GET_STATE_OF_CLOSEST_DOOR_OF_TYPE(@"type": types.Hash, x: f32, y: f32, z: f32, locked: [*c]windows.BOOL, heading: [*c]f32) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(17132156668443833343)), @"type", x, y, z, locked, heading);
}
/// Hardcoded not to work in multiplayer environments.
/// When you set locked to 0 the door open and to 1 the door close
/// OBJECT::SET_LOCKED_UNSTREAMED_IN_DOOR_OF_TYPE(${prop_gate_prison_01}, 1845.0, 2605.0, 45.0, 0, 0.0, 50.0, 0); //door open
/// OBJECT::SET_LOCKED_UNSTREAMED_IN_DOOR_OF_TYPE(${prop_gate_prison_01}, 1845.0, 2605.0, 45.0, 1, 0.0, 50.0, 0); //door close
/// Used to be known as _DOOR_CONTROL
pub fn SET_LOCKED_UNSTREAMED_IN_DOOR_OF_TYPE(modelHash: types.Hash, x: f32, y: f32, z: f32, locked: windows.BOOL, xRotMult: f32, yRotMult: f32, zRotMult: f32) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(11174268100976307632)), modelHash, x, y, z, locked, xRotMult, yRotMult, zRotMult);
}
pub fn PLAY_OBJECT_AUTO_START_ANIM(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(31044728238866115)), p0);
}
/// doorHash has to be unique. scriptDoor false; relies upon getNetworkGameScriptHandler. isLocal On true disables the creation CRequestDoorEvent's in DOOR_SYSTEM_SET_DOOR_STATE.
/// p5 only set to true in single player native scripts.
/// If scriptDoor is true, register the door on the script handler host (note: there's a hardcap on the number of script IDs that can be added to the system at a given time). If scriptDoor and isLocal are both false, the door is considered to be in a "Persists w/o netobj" state.
/// door hashes normally look like PROP_[int]_DOOR_[int] for interior doors and PROP_BUILDING_[int]_DOOR_[int] exterior doors but you can just make up your own hash if you want
/// All doors need to be registered with ADD_DOOR_TO_SYSTEM before they can be manipulated with the door natives and the easiest way to get door models is just find the door in codewalker.
/// Example: AddDoorToSystem("PROP_43_DOOR_0", "hei_v_ilev_fh_heistdoor2", -1456.818, -520.5037, 69.67043, 0, 0, 0)
pub fn ADD_DOOR_TO_SYSTEM(doorHash: types.Hash, modelHash: types.Hash, x: f32, y: f32, z: f32, p5: windows.BOOL, scriptDoor: windows.BOOL, isLocal: windows.BOOL) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(8036736002072363558)), doorHash, modelHash, x, y, z, p5, scriptDoor, isLocal);
}
/// CDoor and CDoorSystemData still internally allocated (and their associations between doorHash, modelHash, and coordinates).
/// Only its NetObj removed and flag ``*(v2 + 192) |= 8u`` (1604 retail) toggled.
pub fn REMOVE_DOOR_FROM_SYSTEM(doorHash: types.Hash, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5065861373067882468)), doorHash, p1);
}
/// Lockstates not applied and CNetObjDoor's not created until DOOR_SYSTEM_GET_IS_PHYSICS_LOADED returns true.
/// `requestDoor` on true, and when door system is configured to, i.e., "persists w/o netobj", generate a CRequestDoorEvent.
/// `forceUpdate` on true, forces an update on the door system (same path as netObjDoor_applyDoorStuff)
/// Door lock states:
/// 0: UNLOCKED
/// 1: LOCKED
/// 2: DOORSTATE_FORCE_LOCKED_UNTIL_OUT_OF_AREA
/// 3: DOORSTATE_FORCE_UNLOCKED_THIS_FRAME
/// 4: DOORSTATE_FORCE_LOCKED_THIS_FRAME
/// 5: DOORSTATE_FORCE_OPEN_THIS_FRAME
/// 6: DOORSTATE_FORCE_CLOSED_THIS_FRAME
/// Used to be known as _SET_DOOR_ACCELERATION_LIMIT
pub fn DOOR_SYSTEM_SET_DOOR_STATE(doorHash: types.Hash, state: c_int, requestDoor: windows.BOOL, forceUpdate: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(7758457796463198035)), doorHash, state, requestDoor, forceUpdate);
}
pub fn DOOR_SYSTEM_GET_DOOR_STATE(doorHash: types.Hash) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(1588259609567639992)), doorHash);
}
pub fn DOOR_SYSTEM_GET_DOOR_PENDING_STATE(doorHash: types.Hash) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(5459072227459966793)), doorHash);
}
/// Includes networking check: ownership vs. or the door itself **isn't** networked.
/// `forceUpdate` on true invokes DOOR_SYSTEM_SET_DOOR_STATE otherwise requestDoor is unused.
pub fn DOOR_SYSTEM_SET_AUTOMATIC_RATE(doorHash: types.Hash, rate: f32, requestDoor: windows.BOOL, forceUpdate: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(270917550687784578)), doorHash, rate, requestDoor, forceUpdate);
}
/// `forceUpdate` on true invokes DOOR_SYSTEM_SET_DOOR_STATE otherwise requestDoor is unused.
pub fn DOOR_SYSTEM_SET_AUTOMATIC_DISTANCE(doorHash: types.Hash, distance: f32, requestDoor: windows.BOOL, forceUpdate: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(11213965044713518631)), doorHash, distance, requestDoor, forceUpdate);
}
/// Sets the ajar angle of a door.
/// Ranges from -1.0 to 1.0, and 0.0 is closed / default.
/// `forceUpdate` on true invokes DOOR_SYSTEM_SET_DOOR_STATE otherwise requestDoor is unused.
/// Used to be known as _SET_DOOR_AJAR_ANGLE
pub fn DOOR_SYSTEM_SET_OPEN_RATIO(doorHash: types.Hash, ajar: f32, requestDoor: windows.BOOL, forceUpdate: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(13179498064365429932)), doorHash, ajar, requestDoor, forceUpdate);
}
/// Used to be known as _DOOR_SYSTEM_GET_AUTOMATIC_DISTANCE
pub fn DOOR_SYSTEM_GET_AUTOMATIC_DISTANCE(doorHash: types.Hash) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(16740239470930114383)), doorHash);
}
pub fn DOOR_SYSTEM_GET_OPEN_RATIO(doorHash: types.Hash) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(7298532234928514540)), doorHash);
}
/// Includes networking check: ownership vs. or the door itself **isn't** networked.
/// `forceUpdate` on true invokes DOOR_SYSTEM_SET_DOOR_STATE otherwise requestDoor is unused.
pub fn DOOR_SYSTEM_SET_SPRING_REMOVED(doorHash: types.Hash, removed: windows.BOOL, requestDoor: windows.BOOL, forceUpdate: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(14160971436433045848)), doorHash, removed, requestDoor, forceUpdate);
}
/// Includes networking check: ownership vs. or the door itself **isn't** networked.
pub fn DOOR_SYSTEM_SET_HOLD_OPEN(doorHash: types.Hash, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15688035671099450944)), doorHash, toggle);
}
/// Some property related to gates. Native name between ``DOOR_SYSTEM_SET_AUTOMATIC_RATE`` and ``DOOR_SYSTEM_SET_DOOR_STATE``.
pub fn DOOR_SYSTEM_SET_DOOR_OPEN_FOR_RACES(doorHash: types.Hash, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12131045208726038865)), doorHash, p1);
}
/// if (OBJECT::IS_DOOR_REGISTERED_WITH_SYSTEM(doorHash))
/// {
/// OBJECT::REMOVE_DOOR_FROM_SYSTEM(doorHash);
/// }
/// Used to be known as _DOES_DOOR_EXIST
pub fn IS_DOOR_REGISTERED_WITH_SYSTEM(doorHash: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13930693845672184001)), doorHash);
}
pub fn IS_DOOR_CLOSED(doorHash: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14209400576093299017)), doorHash);
}
pub fn OPEN_ALL_BARRIERS_FOR_RACE(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14407750369176597774)), p0);
}
/// Clears the fields sets by 0xC7F29CA00F46350E (1604 retail: 0x1424A7A10, 0x1424A7A11) and iterates over the global CDoor's bucket-list.
/// Related to its "Pre-networked state"?
pub fn CLOSE_ALL_BARRIERS_FOR_RACE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(8079416081091357604)));
}
pub fn DOOR_SYSTEM_GET_IS_PHYSICS_LOADED(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16111572506586447156)), p0);
}
/// Search radius: 0.5
pub fn DOOR_SYSTEM_FIND_EXISTING_DOOR(x: f32, y: f32, z: f32, modelHash: types.Hash, outDoorHash: [*c]types.Hash) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(6385964303556313797)), x, y, z, modelHash, outDoorHash);
}
pub fn IS_GARAGE_EMPTY(garageHash: types.Hash, p1: windows.BOOL, p2: c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(10440595429217894584)), garageHash, p1, p2);
}
pub fn IS_PLAYER_ENTIRELY_INSIDE_GARAGE(garageHash: types.Hash, player: types.Player, p2: f32, p3: c_int) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(165050845919603184)), garageHash, player, p2, p3);
}
pub fn IS_PLAYER_PARTIALLY_INSIDE_GARAGE(garageHash: types.Hash, player: types.Player, p2: c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(1684870029825395626)), garageHash, player, p2);
}
pub fn ARE_ENTITIES_ENTIRELY_INSIDE_GARAGE(garageHash: types.Hash, p1: windows.BOOL, p2: windows.BOOL, p3: windows.BOOL, p4: types.Any) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(9635108700145311202)), garageHash, p1, p2, p3, p4);
}
pub fn IS_ANY_ENTITY_ENTIRELY_INSIDE_GARAGE(garageHash: types.Hash, p1: windows.BOOL, p2: windows.BOOL, p3: windows.BOOL, p4: types.Any) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(7439621222773760951)), garageHash, p1, p2, p3, p4);
}
/// Despite the name, it does work for any entity type.
pub fn IS_OBJECT_ENTIRELY_INSIDE_GARAGE(garageHash: types.Hash, entity: types.Entity, p2: f32, p3: c_int) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(3976386454284050916)), garageHash, entity, p2, p3);
}
/// Despite the name, it does work for any entity type.
pub fn IS_OBJECT_PARTIALLY_INSIDE_GARAGE(garageHash: types.Hash, entity: types.Entity, p2: c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(17361048525663314810)), garageHash, entity, p2);
}
/// Used to be known as _CLEAR_GARAGE_AREA
pub fn CLEAR_GARAGE(garageHash: types.Hash, isNetwork: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15709990648034479609)), garageHash, isNetwork);
}
pub fn CLEAR_OBJECTS_INSIDE_GARAGE(garageHash: types.Hash, vehicles: windows.BOOL, peds: windows.BOOL, objects: windows.BOOL, isNetwork: windows.BOOL) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(1802610079936284306)), garageHash, vehicles, peds, objects, isNetwork);
}
/// Sets a flag. A valid id is 0x157DC10D
pub fn DISABLE_TIDYING_UP_IN_GARAGE(id: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7322744631897637880)), id, toggle);
}
pub fn ENABLE_SAVING_IN_GARAGE(garageHash: types.Hash, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17501453328021935782)), garageHash, toggle);
}
pub fn CLOSE_SAFEHOUSE_GARAGES() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(7396209120374750856)));
}
/// p5 is usually 0.
pub fn DOES_OBJECT_OF_TYPE_EXIST_AT_COORDS(x: f32, y: f32, z: f32, radius: f32, hash: types.Hash, p5: windows.BOOL) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(13809318694034547007)), x, y, z, radius, hash, p5);
}
/// An angled area is an X-Z oriented rectangle with three parameters:
/// 1. origin: the mid-point along a base edge of the rectangle;
/// 2. extent: the mid-point of opposite base edge on the other Z;
/// 3. width: the length of the base edge; (named derived from logging strings ``CNetworkRoadNodeWorldStateData``).
/// The oriented rectangle can then be derived from the direction of the two points (``norm(origin - extent)``), its orthonormal, and the width, e.g:
/// 1. golf_mp https://i.imgur.com/JhsQAK9.png
/// 2. am_taxi https://i.imgur.com/TJWCZaT.jpg
pub fn IS_POINT_IN_ANGLED_AREA(xPos: f32, yPos: f32, zPos: f32, x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, width: f32, debug: windows.BOOL, includeZ: windows.BOOL) windows.BOOL {
return nativeCaller.invoke12(@as(u64, @intCast(3058149654865529985)), xPos, yPos, zPos, x1, y1, z1, x2, y2, z2, width, debug, includeZ);
}
/// Overrides the climbing/blocking flags of the object, used in the native scripts mostly for "prop_dock_bouy_*"
/// Used to be known as _SET_OBJECT_CAN_CLIMB_ON
pub fn SET_OBJECT_ALLOW_LOW_LOD_BUOYANCY(object: types.Object, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5587232141692752338)), object, toggle);
}
/// Adjust the physics parameters of a prop, or otherwise known as "object". This is useful for simulated gravity.
/// Other parameters seem to be unknown.
/// p2: seems to be weight and gravity related. Higher value makes the obj fall faster. Very sensitive?
/// p3: seems similar to p2
/// p4: makes obj fall slower the higher the value
/// p5: similar to p4
pub fn SET_OBJECT_PHYSICS_PARAMS(object: types.Object, weight: f32, p2: f32, p3: f32, p4: f32, p5: f32, gravity: f32, p7: f32, p8: f32, p9: f32, p10: f32, buoyancy: f32) void {
_ = nativeCaller.invoke12(@as(u64, @intCast(17789058621623892239)), object, weight, p2, p3, p4, p5, gravity, p7, p8, p9, p10, buoyancy);
}
pub fn GET_OBJECT_FRAGMENT_DAMAGE_HEALTH(p0: types.Any, p1: windows.BOOL) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(13185410543173567894)), p0, p1);
}
pub fn SET_ACTIVATE_OBJECT_PHYSICS_AS_SOON_AS_IT_IS_UNFROZEN(object: types.Object, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4639050633478990581)), object, toggle);
}
pub fn IS_ANY_OBJECT_NEAR_POINT(x: f32, y: f32, z: f32, range: f32, p4: windows.BOOL) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(4142684454248421585)), x, y, z, range, p4);
}
pub fn IS_OBJECT_NEAR_POINT(objectHash: types.Hash, x: f32, y: f32, z: f32, range: f32) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(10128875160973583882)), objectHash, x, y, z, range);
}
pub fn REMOVE_OBJECT_HIGH_DETAIL_MODEL(object: types.Object) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5348547117121860522)), object);
}
pub fn BREAK_OBJECT_FRAGMENT_CHILD(p0: types.Object, p1: types.Any, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(16709693378984958208)), p0, p1, p2);
}
pub fn DAMAGE_OBJECT_FRAGMENT_CHILD(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(16167758761991125762)), p0, p1, p2);
}
pub fn FIX_OBJECT_FRAGMENT(object: types.Object) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17996780017967217941)), object);
}
pub fn TRACK_OBJECT_VISIBILITY(object: types.Object) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12849539409712928291)), object);
}
pub fn IS_OBJECT_VISIBLE(object: types.Object) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10030269424795809094)), object);
}
pub fn SET_OBJECT_IS_SPECIAL_GOLFBALL(object: types.Object, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14268315330003562421)), object, toggle);
}
pub fn SET_OBJECT_TAKES_DAMAGE_FROM_COLLIDING_WITH_BUILDINGS(p0: types.Any, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16964807575777355218)), p0, p1);
}
/// Used to be known as _SET_UNK_GLOBAL_BOOL_RELATED_TO_DAMAGE
pub fn ALLOW_DAMAGE_EVENTS_FOR_NON_NETWORKED_OBJECTS(value: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12383420467654872058)), value);
}
/// Requires a component_at_*_flsh to be attached to the weapon object
/// Used to be known as _SET_CREATE_WEAPON_OBJECT_LIGHT_SOURCE
pub fn SET_CUTSCENES_WEAPON_FLASHLIGHT_ON_THIS_FRAME(object: types.Object, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13611449512695413423)), object, toggle);
}
/// Example:
/// OBJECT::GET_RAYFIRE_MAP_OBJECT(-809.9619750976562, 170.919, 75.7406997680664, 3.0, "des_tvsmash");
/// Used to be known as _GET_DES_OBJECT
pub fn GET_RAYFIRE_MAP_OBJECT(x: f32, y: f32, z: f32, radius: f32, name: [*c]const u8) types.Object {
return nativeCaller.invoke5(@as(u64, @intCast(13010845278157745746)), x, y, z, radius, name);
}
/// Defines the state of a destructible object.
/// Use the GET_RAYFIRE_MAP_OBJECT native to find an object's handle with its name / coords.
/// State 2 == object just spawned
/// State 4 == Beginning of the animation
/// State 6 == Start animation
/// State 9 == End of the animation
/// Used to be known as _SET_DES_OBJECT_STATE
pub fn SET_STATE_OF_RAYFIRE_MAP_OBJECT(object: types.Object, state: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6641110261787051489)), object, state);
}
/// Get a destructible object's state.
/// Substract 1 to get the real state.
/// See SET_STATE_OF_RAYFIRE_MAP_OBJECT to see the different states
/// For example, if the object just spawned (state 2), the native will return 3.
/// Used to be known as _GET_DES_OBJECT_STATE
pub fn GET_STATE_OF_RAYFIRE_MAP_OBJECT(object: types.Object) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(9915705055645413934)), object);
}
/// Returns true if a destructible object with this handle exists, false otherwise.
/// Used to be known as _DOES_DES_OBJECT_EXIST
pub fn DOES_RAYFIRE_MAP_OBJECT_EXIST(object: types.Object) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5958072615692896941)), object);
}
/// `object`: The des-object handle to get the animation progress from.
/// Return value is a float between 0.0 and 1.0, 0.0 is the beginning of the animation, 1.0 is the end. Value resets to 0.0 instantly after reaching 1.0.
/// Used to be known as _GET_DES_OBJECT_ANIM_PROGRESS
pub fn GET_RAYFIRE_MAP_OBJECT_ANIM_PHASE(object: types.Object) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(2742381001580010241)), object);
}
/// Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json
pub fn CREATE_PICKUP(pickupHash: types.Hash, posX: f32, posY: f32, posZ: f32, p4: c_int, value: c_int, p6: windows.BOOL, modelHash: types.Hash) types.Pickup {
return nativeCaller.invoke8(@as(u64, @intCast(18131646376056322648)), pickupHash, posX, posY, posZ, p4, value, p6, modelHash);
}
/// flags:
/// 8 (1 << 3): place on ground
/// 512 (1 << 9): spin around
/// Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json
pub fn CREATE_PICKUP_ROTATE(pickupHash: types.Hash, posX: f32, posY: f32, posZ: f32, rotX: f32, rotY: f32, rotZ: f32, flag: c_int, amount: c_int, p9: types.Any, p10: windows.BOOL, modelHash: types.Hash) types.Pickup {
return nativeCaller.invoke12(@as(u64, @intCast(9878650672424589495)), pickupHash, posX, posY, posZ, rotX, rotY, rotZ, flag, amount, p9, p10, modelHash);
}
pub fn FORCE_PICKUP_ROTATE_FACE_UP() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(4128904267521145896)));
}
pub fn SET_CUSTOM_PICKUP_WEAPON_HASH(pickupHash: types.Hash, pickup: types.Pickup) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9398201965513211000)), pickupHash, pickup);
}
/// Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json
pub fn CREATE_AMBIENT_PICKUP(pickupHash: types.Hash, posX: f32, posY: f32, posZ: f32, flags: c_int, value: c_int, modelHash: types.Hash, p7: windows.BOOL, p8: windows.BOOL) types.Object {
return nativeCaller.invoke9(@as(u64, @intCast(7438089100197720433)), pickupHash, posX, posY, posZ, flags, value, modelHash, p7, p8);
}
/// Used to be known as _CREATE_NON_NETWORKED_AMBIENT_PICKUP
pub fn CREATE_NON_NETWORKED_AMBIENT_PICKUP(pickupHash: types.Hash, posX: f32, posY: f32, posZ: f32, flags: c_int, value: c_int, modelHash: types.Hash, p7: windows.BOOL, p8: windows.BOOL) types.Object {
return nativeCaller.invoke9(@as(u64, @intCast(11282491517935197264)), pickupHash, posX, posY, posZ, flags, value, modelHash, p7, p8);
}
pub fn BLOCK_PLAYERS_FOR_AMBIENT_PICKUP(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2179490549748869802)), p0, p1);
}
/// Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json
pub fn CREATE_PORTABLE_PICKUP(pickupHash: types.Hash, x: f32, y: f32, z: f32, placeOnGround: windows.BOOL, modelHash: types.Hash) types.Object {
return nativeCaller.invoke6(@as(u64, @intCast(3363942472927762072)), pickupHash, x, y, z, placeOnGround, modelHash);
}
/// Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json
/// Used to be known as _CREATE_PORTABLE_PICKUP_2
pub fn CREATE_NON_NETWORKED_PORTABLE_PICKUP(pickupHash: types.Hash, x: f32, y: f32, z: f32, placeOnGround: windows.BOOL, modelHash: types.Hash) types.Object {
return nativeCaller.invoke6(@as(u64, @intCast(1320844115333720823)), pickupHash, x, y, z, placeOnGround, modelHash);
}
pub fn ATTACH_PORTABLE_PICKUP_TO_PED(pickupObject: types.Object, ped: types.Ped) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10215170457877182293)), pickupObject, ped);
}
pub fn DETACH_PORTABLE_PICKUP_FROM_PED(pickupObject: types.Object) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14935692415863549105)), pickupObject);
}
pub fn FORCE_PORTABLE_PICKUP_LAST_ACCESSIBLE_POSITION_SETTING(object: types.Object) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6693163072982541402)), object);
}
/// Used to be known as _HIDE_PICKUP
pub fn HIDE_PORTABLE_PICKUP_WHEN_DETACHED(pickupObject: types.Object, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9688465614809058482)), pickupObject, toggle);
}
pub fn SET_MAX_NUM_PORTABLE_PICKUPS_CARRIED_BY_PLAYER(modelHash: types.Hash, number: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(861229579293400072)), modelHash, number);
}
pub fn SET_LOCAL_PLAYER_CAN_COLLECT_PORTABLE_PICKUPS(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8684487946389010697)), toggle);
}
pub fn GET_SAFE_PICKUP_COORDS(x: f32, y: f32, z: f32, p3: f32, p4: f32) types.Vector3 {
return nativeCaller.invoke5(@as(u64, @intCast(7932734660826570736)), x, y, z, p3, p4);
}
/// Adds an area that seems to be related to pickup physics behavior.
/// Max amount of areas is 10. Only works in multiplayer.
pub fn ADD_EXTENDED_PICKUP_PROBE_AREA(x: f32, y: f32, z: f32, radius: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(15323396807702154501)), x, y, z, radius);
}
/// Clears all areas created by ADD_EXTENDED_PICKUP_PROBE_AREA
pub fn CLEAR_EXTENDED_PICKUP_PROBE_AREAS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(13242509316276184474)));
}
pub fn GET_PICKUP_COORDS(pickup: types.Pickup) types.Vector3 {
return nativeCaller.invoke1(@as(u64, @intCast(2475725483283589555)), pickup);
}
pub fn SUPPRESS_PICKUP_SOUND_FOR_PICKUP(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10217067053665840901)), p0, p1);
}
/// Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json
pub fn REMOVE_ALL_PICKUPS_OF_TYPE(pickupHash: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2880568813926046159)), pickupHash);
}
pub fn HAS_PICKUP_BEEN_COLLECTED(pickup: types.Pickup) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9289880285775860729)), pickup);
}
pub fn REMOVE_PICKUP(pickup: types.Pickup) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3641398534907701938)), pickup);
}
/// Spawns one or more money pickups.
/// x: The X-component of the world position to spawn the money pickups at.
/// y: The Y-component of the world position to spawn the money pickups at.
/// z: The Z-component of the world position to spawn the money pickups at.
/// value: The combined value of the pickups (in dollars).
/// amount: The number of pickups to spawn.
/// model: The model to use, or 0 for default money model.
/// Example:
/// CREATE_MONEY_PICKUPS(x, y, z, 1000, 3, 0x684a97ae);
/// Spawns 3 spray cans that'll collectively give $1000 when picked up. (Three spray cans, each giving $334, $334, $332 = $1000).
/// ==============================================
/// Max is 2000 in MP. So if you put the amount to 20, but the value to $400,000 eg. They will only be able to pickup 20 - $2,000 bags. So, $40,000
pub fn CREATE_MONEY_PICKUPS(x: f32, y: f32, z: f32, value: c_int, amount: c_int, model: types.Hash) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(399050048187308843)), x, y, z, value, amount, model);
}
pub fn DOES_PICKUP_EXIST(pickup: types.Pickup) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12664626233909212369)), pickup);
}
pub fn DOES_PICKUP_OBJECT_EXIST(pickupObject: types.Object) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15703971481536605859)), pickupObject);
}
pub fn GET_PICKUP_OBJECT(pickup: types.Pickup) types.Object {
return nativeCaller.invoke1(@as(u64, @intCast(5807880269390882222)), pickup);
}
pub fn IS_OBJECT_A_PICKUP(object: types.Object) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(18178811112218940029)), object);
}
pub fn IS_OBJECT_A_PORTABLE_PICKUP(object: types.Object) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(250161456850799885)), object);
}
/// Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json
/// Used to be known as _IS_PICKUP_WITHIN_RADIUS
pub fn DOES_PICKUP_OF_TYPE_EXIST_IN_AREA(pickupHash: types.Hash, x: f32, y: f32, z: f32, radius: f32) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(17997336640076680755)), pickupHash, x, y, z, radius);
}
pub fn SET_PICKUP_REGENERATION_TIME(pickup: types.Pickup, duration: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8647294581580156061)), pickup, duration);
}
pub fn FORCE_PICKUP_REGENERATE(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8469683321249339792)), p0);
}
/// Disabling/enabling a player from getting pickups. From the scripts:
/// OBJECT::SET_PLAYER_PERMITTED_TO_COLLECT_PICKUPS_OF_TYPE(PLAYER::PLAYER_ID(), ${pickup_portable_package}, 0);
/// OBJECT::SET_PLAYER_PERMITTED_TO_COLLECT_PICKUPS_OF_TYPE(PLAYER::PLAYER_ID(), ${pickup_portable_package}, 0);
/// OBJECT::SET_PLAYER_PERMITTED_TO_COLLECT_PICKUPS_OF_TYPE(PLAYER::PLAYER_ID(), ${pickup_portable_package}, 1);
/// OBJECT::SET_PLAYER_PERMITTED_TO_COLLECT_PICKUPS_OF_TYPE(PLAYER::PLAYER_ID(), ${pickup_portable_package}, 0);
/// OBJECT::SET_PLAYER_PERMITTED_TO_COLLECT_PICKUPS_OF_TYPE(PLAYER::PLAYER_ID(), ${pickup_armour_standard}, 0);
/// OBJECT::SET_PLAYER_PERMITTED_TO_COLLECT_PICKUPS_OF_TYPE(PLAYER::PLAYER_ID(), ${pickup_armour_standard}, 1);
/// Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json
/// Used to be known as _TOGGLE_USE_PICKUPS_FOR_PLAYER
pub fn SET_PLAYER_PERMITTED_TO_COLLECT_PICKUPS_OF_TYPE(player: types.Player, pickupHash: types.Hash, toggle: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(7016770863061245401)), player, pickupHash, toggle);
}
/// Maximum amount of pickup models that can be disallowed is 30.
/// Used to be known as _SET_LOCAL_PLAYER_CAN_USE_PICKUPS_WITH_THIS_MODEL
pub fn SET_LOCAL_PLAYER_PERMITTED_TO_COLLECT_PICKUPS_WITH_MODEL(modelHash: types.Hash, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9865957837158639910)), modelHash, toggle);
}
/// Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json
pub fn ALLOW_ALL_PLAYERS_TO_COLLECT_PICKUPS_OF_TYPE(pickupHash: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18284751208426682133)), pickupHash);
}
pub fn SET_TEAM_PICKUP_OBJECT(object: types.Object, p1: types.Any, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(6044076003401986250)), object, p1, p2);
}
pub fn PREVENT_COLLECTION_OF_PORTABLE_PICKUP(object: types.Object, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(10569661762773794851)), object, p1, p2);
}
pub fn SET_PICKUP_OBJECT_GLOW_WHEN_UNCOLLECTABLE(pickup: types.Pickup, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2878443118472964819)), pickup, toggle);
}
/// p1 is always 0.51. This native is called before SET_PICKUP_REGENERATION_TIME in all occurances.
pub fn SET_PICKUP_GLOW_OFFSET(pickup: types.Pickup, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(402654606518738149)), pickup, p1);
}
/// p1 is always -0.2 in scripts and p2 is always true in scripts.
pub fn SET_PICKUP_OBJECT_GLOW_OFFSET(pickup: types.Pickup, p1: f32, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(11569718737768298973)), pickup, p1, p2);
}
pub fn SET_OBJECT_GLOW_IN_SAME_TEAM(pickup: types.Pickup) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7081147782924465093)), pickup);
}
pub fn SET_PICKUP_OBJECT_ARROW_MARKER(pickup: types.Pickup, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4154002752840992832)), pickup, toggle);
}
pub fn ALLOW_PICKUP_ARROW_MARKER_WHEN_UNCOLLECTABLE(pickup: types.Pickup, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9458479113922136157)), pickup, toggle);
}
pub fn GET_DEFAULT_AMMO_FOR_WEAPON_PICKUP(pickupHash: types.Hash) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(15799138191365559479)), pickupHash);
}
pub fn SET_PICKUP_GENERATION_RANGE_MULTIPLIER(multiplier: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3568283431859383522)), multiplier);
}
/// Used to be known as _GET_PICKUP_GENERATION_RANGE_MULTIPLIER
pub fn GET_PICKUP_GENERATION_RANGE_MULTIPLIER() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(12964920343290966388)));
}
pub fn SET_ONLY_ALLOW_AMMO_COLLECTION_WHEN_LOW(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3600949737918685029)), p0);
}
pub fn SET_PICKUP_UNCOLLECTABLE(pickup: types.Pickup, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2025328983738530455)), pickup, toggle);
}
pub fn SET_PICKUP_TRANSPARENT_WHEN_UNCOLLECTABLE(pickup: types.Pickup, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9623851542836544682)), pickup, toggle);
}
pub fn SET_PICKUP_HIDDEN_WHEN_UNCOLLECTABLE(pickup: types.Pickup, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4526883137709942681)), pickup, toggle);
}
pub fn SET_PICKUP_OBJECT_TRANSPARENT_WHEN_UNCOLLECTABLE(pickup: types.Pickup, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9836364656519772568)), pickup, toggle);
}
/// p0 is either 0 or 50 in scripts.
pub fn SET_PICKUP_OBJECT_ALPHA_WHEN_TRANSPARENT(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10159949852892672241)), p0);
}
pub fn SET_PORTABLE_PICKUP_PERSIST(pickup: types.Pickup, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5112621118961072882)), pickup, toggle);
}
pub fn ALLOW_PORTABLE_PICKUP_TO_MIGRATE_TO_NON_PARTICIPANTS(pickup: types.Pickup, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7214528195098505464)), pickup, toggle);
}
pub fn FORCE_ACTIVATE_PHYSICS_ON_UNFIXED_PICKUP(pickup: types.Pickup, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5481807969674864080)), pickup, toggle);
}
pub fn ALLOW_PICKUP_BY_NONE_PARTICIPANT(pickup: types.Pickup, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12251370303332670723)), pickup, toggle);
}
/// enum ePickupRewardType
/// {
/// PICKUP_REWARD_TYPE_AMMO = (1 << 0),
/// PICKUP_REWARD_TYPE_BULLET_MP = (1 << 1),
/// PICKUP_REWARD_TYPE_MISSILE_MP = (1 << 2),
/// PICKUP_REWARD_TYPE_GRENADE_LAUNCHER_MP = (1 << 3),
/// PICKUP_REWARD_TYPE_ARMOUR = (1 << 4),
/// PICKUP_REWARD_TYPE_HEALTH = (1 << 5),
/// PICKUP_REWARD_TYPE_HEALTH_VARIABLE = PICKUP_REWARD_TYPE_HEALTH,
/// PICKUP_REWARD_TYPE_MONEY_FIXED = (1 << 6),
/// PICKUP_REWARD_TYPE_MONEY_VARIABLE = PICKUP_REWARD_TYPE_MONEY_FIXED,
/// PICKUP_REWARD_TYPE_WEAPON = (1 << 7),
/// PICKUP_REWARD_TYPE_STAT = (1 << 8),
/// PICKUP_REWARD_TYPE_STAT_VARIABLE = PICKUP_REWARD_TYPE_STAT,
/// PICKUP_REWARD_TYPE_VEHICLE_FIX = (1 << 9),
/// PICKUP_REWARD_TYPE_FIREWORK_MP = (1 << 10),
/// };
pub fn SUPPRESS_PICKUP_REWARD_TYPE(rewardType: c_int, suppress: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17951516694274433703)), rewardType, suppress);
}
pub fn CLEAR_ALL_PICKUP_REWARD_TYPE_SUPPRESSION() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(11727925286446975469)));
}
pub fn CLEAR_PICKUP_REWARD_TYPE_SUPPRESSION(rewardType: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8515659091894635780)), rewardType);
}
/// draws circular marker at pos
/// -1 = none
/// 0 = red
/// 1 = green
/// 2 = blue
/// 3 = green larger
/// 4 = nothing
/// 5 = green small
/// Used to be known as _HIGHLIGHT_PLACEMENT_COORDS
pub fn RENDER_FAKE_PICKUP_GLOW(x: f32, y: f32, z: f32, colorIndex: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(3760619398412235293)), x, y, z, colorIndex);
}
pub fn SET_PICKUP_OBJECT_COLLECTABLE_IN_VEHICLE(pickup: types.Pickup) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8652515189380237209)), pickup);
}
pub fn SET_PICKUP_TRACK_DAMAGE_EVENTS(pickup: types.Pickup, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13834587114238901468)), pickup, toggle);
}
/// Sets entity+38 to C (when false) or 0xFF3f (when true)
pub fn SET_ENTITY_FLAG_SUPPRESS_SHADOW(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15013367565662056217)), entity, toggle);
}
pub fn SET_ENTITY_FLAG_RENDER_SMALL_SHADOW(object: types.Object, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12885007326478503514)), object, toggle);
}
/// Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json
/// Used to be known as _GET_WEAPON_HASH_FROM_PICKUP
pub fn GET_WEAPON_TYPE_FROM_PICKUP_TYPE(pickupHash: types.Hash) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(646667485035212113)), pickupHash);
}
/// Returns the pickup hash for the given weapon hash
/// Used to be known as _GET_PICKUP_HASH_FROM_WEAPON
pub fn GET_PICKUP_TYPE_FROM_WEAPON_HASH(weaponHash: types.Hash) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(15439071803284451749)), weaponHash);
}
pub fn IS_PICKUP_WEAPON_OBJECT_VALID(object: types.Object) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1284059407967621630)), object);
}
/// Used to be known as _GET_OBJECT_TEXTURE_VARIATION
pub fn GET_OBJECT_TINT_INDEX(object: types.Object) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(16739520511557890922)), object);
}
/// enum ObjectPaintVariants
/// {
/// Pacific = 0,
/// Azure = 1,
/// Nautical = 2,
/// Continental = 3,
/// Battleship = 4,
/// Intrepid = 5,
/// Uniform = 6,
/// Classico = 7,
/// Mediterranean = 8,
/// Command = 9,
/// Mariner = 10,
/// Ruby = 11,
/// Vintage = 12,
/// Pristine = 13,
/// Merchant = 14,
/// Voyager = 15
/// };
/// Used to be known as _SET_OBJECT_TEXTURE_VARIANT
/// Used to be known as _SET_OBJECT_TEXTURE_VARIATION
pub fn SET_OBJECT_TINT_INDEX(object: types.Object, textureVariation: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10889035418781929523)), object, textureVariation);
}
/// Used to be known as _SET_TEXTURE_VARIATION_OF_CLOSEST_OBJECT_OF_TYPE
pub fn SET_TINT_INDEX_CLOSEST_BUILDING_OF_TYPE(x: f32, y: f32, z: f32, radius: f32, modelHash: types.Hash, textureVariation: c_int) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(17378884101348032358)), x, y, z, radius, modelHash, textureVariation);
}
pub fn SET_PROP_TINT_INDEX(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3555393011261539955)), p0, p1);
}
/// Used to be known as _SET_OBJECT_LIGHT_COLOR
pub fn SET_PROP_LIGHT_COLOR(object: types.Object, p1: windows.BOOL, r: c_int, g: c_int, b: c_int) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(6846741595902240628)), object, p1, r, g, b);
}
pub fn IS_PROP_LIGHT_OVERRIDEN(object: types.Object) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12533663978943372550)), object);
}
/// Used to be known as _SET_OBJECT_COLOUR
pub fn SET_OBJECT_IS_VISIBLE_IN_MIRRORS(object: types.Object, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4264863276274823964)), object, toggle);
}
/// Used to be known as _SET_OBJECT_STUNT_PROP_SPEEDUP
pub fn SET_OBJECT_SPEED_BOOST_AMOUNT(object: types.Object, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10875646342196354944)), object, p1);
}
/// Used to be known as _SET_OBJECT_STUNT_PROP_DURATION
pub fn SET_OBJECT_SPEED_BOOST_DURATION(object: types.Object, duration: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16099418909101159291)), object, duration);
}
/// returns pickup hash.
/// Full list of pickup types by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pickupTypes.json
/// Used to be known as _GET_PICKUP_HASH
pub fn CONVERT_OLD_PICKUP_TYPE_TO_NEW(pickupHash: types.Hash) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(6821502353065854325)), pickupHash);
}
pub fn SET_FORCE_OBJECT_THIS_FRAME(x: f32, y: f32, z: f32, p3: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(17669882043718475421)), x, y, z, p3);
}
/// is this like setting is as no longer needed?
/// Used to be known as _MARK_OBJECT_FOR_DELETION
pub fn ONLY_CLEAN_UP_OBJECT_WHEN_OUT_OF_RANGE(object: types.Object) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12519523221682229882)), object);
}
pub fn SET_DISABLE_COLLISIONS_BETWEEN_CARS_AND_CAR_PARACHUTE(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10136110437220322260)), p0);
}
pub fn SET_PROJECTILES_SHOULD_EXPLODE_ON_CONTACT(entity: types.Entity, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7200399841819681635)), entity, p1);
}
/// Activate the physics to: "xs_prop_arena_{flipper,wall,bollard,turntable,pit}"
/// Used to be known as _SET_ENABLE_ARENA_PROP_PHYSICS
pub fn SET_DRIVE_ARTICULATED_JOINT(object: types.Object, toggle: windows.BOOL, p2: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(10452894610396584176)), object, toggle, p2);
}
/// Used to be known as _SET_ENABLE_ARENA_PROP_PHYSICS_ON_PED
pub fn SET_DRIVE_ARTICULATED_JOINT_WITH_INFLICTOR(object: types.Object, toggle: windows.BOOL, p2: c_int, ped: types.Ped) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(12828561434140838038)), object, toggle, p2, ped);
}
pub fn SET_OBJECT_IS_A_PRESSURE_PLATE(object: types.Object, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8308603740709444250)), object, toggle);
}
pub fn SET_WEAPON_IMPACTS_APPLY_GREATER_FORCE(object: types.Object, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1904102380720412573)), object, p1);
}
/// Used to be known as _GET_IS_ARENA_PROP_PHYSICS_DISABLED
pub fn GET_IS_ARTICULATED_JOINT_AT_MIN_ANGLE(object: types.Object, p1: types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(4883722726676987909)), object, p1);
}
pub fn GET_IS_ARTICULATED_JOINT_AT_MAX_ANGLE(p0: types.Any, p1: types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(4312039217650216373)), p0, p1);
}
pub fn SET_IS_OBJECT_ARTICULATED(object: types.Object, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2042322277382900010)), object, toggle);
}
pub fn SET_IS_OBJECT_BALL(object: types.Object, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13094062140187034693)), object, toggle);
}
};
pub const PAD = struct {
/// control: 0: PLAYER_CONTROL, 1: CAMERA_CONTROL, 2: FRONTEND_CONTROL
/// For more info, see https://docs.fivem.net/docs/game-references/controls/
pub fn IS_CONTROL_ENABLED(control: c_int, action: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(2083596516048037337)), control, action);
}
/// Returns whether a control is currently pressed.
/// control: see IS_CONTROL_ENABLED
pub fn IS_CONTROL_PRESSED(control: c_int, action: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(17555624867233159754)), control, action);
}
/// Returns whether a control is currently _not_ pressed.
/// control: see IS_CONTROL_ENABLED
pub fn IS_CONTROL_RELEASED(control: c_int, action: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(7245979435848464349)), control, action);
}
/// Returns whether a control was newly pressed since the last check.
/// control: see IS_CONTROL_ENABLED
pub fn IS_CONTROL_JUST_PRESSED(control: c_int, action: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(6342219533232326959)), control, action);
}
/// Returns whether a control was newly released since the last check.
/// control: see IS_CONTROL_ENABLED
pub fn IS_CONTROL_JUST_RELEASED(control: c_int, action: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5834765322530865638)), control, action);
}
/// control: see IS_CONTROL_ENABLED
pub fn GET_CONTROL_VALUE(control: c_int, action: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(15663090593132522535)), control, action);
}
/// Returns the value of GET_CONTROL_VALUE normalized (i.e. a real number value between -1 and 1)
/// control: see IS_CONTROL_ENABLED
pub fn GET_CONTROL_NORMAL(control: c_int, action: c_int) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(17022651722841437539)), control, action);
}
pub fn SET_USE_ADJUSTED_MOUSE_COORDS(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6589830022120762916)), toggle);
}
/// Seems to return values between -1 and 1 for controls like gas and steering.
/// control: see IS_CONTROL_ENABLED
pub fn GET_CONTROL_UNBOUND_NORMAL(control: c_int, action: c_int) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(6594625126775523781)), control, action);
}
/// This is for simulating player input.
/// value is a float value from 0 - 1
/// control: see IS_CONTROL_ENABLED
/// Used to be known as _SET_CONTROL_NORMAL
pub fn SET_CONTROL_VALUE_NEXT_FRAME(control: c_int, action: c_int, value: f32) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(16763057966653091934)), control, action, value);
}
/// control: see IS_CONTROL_ENABLED
pub fn IS_DISABLED_CONTROL_PRESSED(control: c_int, action: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(16309926292945926941)), control, action);
}
/// control: see IS_CONTROL_ENABLED
pub fn IS_DISABLED_CONTROL_RELEASED(control: c_int, action: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(18116926263294897810)), control, action);
}
/// control: see IS_CONTROL_ENABLED
pub fn IS_DISABLED_CONTROL_JUST_PRESSED(control: c_int, action: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(10497601588777486455)), control, action);
}
/// control: see IS_CONTROL_ENABLED
pub fn IS_DISABLED_CONTROL_JUST_RELEASED(control: c_int, action: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(3484816125330098959)), control, action);
}
/// control: see IS_CONTROL_ENABLED
pub fn GET_DISABLED_CONTROL_NORMAL(control: c_int, action: c_int) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(1289816700883198844)), control, action);
}
/// The "disabled" variant of GET_CONTROL_UNBOUND_NORMAL.
/// control: see IS_CONTROL_ENABLED
pub fn GET_DISABLED_CONTROL_UNBOUND_NORMAL(control: c_int, action: c_int) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(5731435981211263739)), control, action);
}
/// Returns time in ms since last input.
/// control: see IS_CONTROL_ENABLED
/// Used to be known as _GET_MS_SINCE_LAST_INPUT
pub fn GET_CONTROL_HOW_LONG_AGO(control: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(15551544507843401914)), control);
}
/// control: unused parameter
/// Used to be known as _GET_LAST_INPUT_METHOD
/// Used to be known as _IS_INPUT_DISABLED
/// Used to be known as _IS_USING_KEYBOARD
pub fn IS_USING_KEYBOARD_AND_MOUSE(control: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11921543228142303000)), control);
}
/// control: see IS_CONTROL_ENABLED
/// Used to be known as _IS_INPUT_JUST_DISABLED
/// Used to be known as _IS_USING_KEYBOARD_2
pub fn IS_USING_CURSOR(control: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1383584994661180681)), control);
}
/// Used to be known as _SET_CURSOR_LOCATION
pub fn SET_CURSOR_POSITION(x: f32, y: f32) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(18188161314911740441)), x, y);
}
/// control: see IS_CONTROL_ENABLED
/// Hardcoded to return false.
pub fn IS_USING_REMOTE_PLAY(control: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2589744254827121110)), control);
}
/// control: unused parameter
pub fn HAVE_CONTROLS_CHANGED(control: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7842900453202695622)), control);
}
/// allowXOSwap appears to always be true.
/// EG:
/// GET_CONTROL_INSTRUCTIONAL_BUTTON (2, 201, 1) /*INPUT_FRONTEND_ACCEPT (e.g. Enter button)*/
/// GET_CONTROL_INSTRUCTIONAL_BUTTON (2, 202, 1) /*INPUT_FRONTEND_CANCEL (e.g. ESC button)*/
/// GET_CONTROL_INSTRUCTIONAL_BUTTON (2, 51, 1) /*INPUT_CONTEXT (e.g. E button)*/
/// gtaforums.com/topic/819070-c-draw-instructional-buttons-scaleform-movie/#entry1068197378
/// control: unused parameter
/// Used to be known as GET_CONTROL_INSTRUCTIONAL_BUTTON
pub fn GET_CONTROL_INSTRUCTIONAL_BUTTONS_STRING(control: c_int, action: c_int, allowXOSwap: windows.BOOL) [*c]const u8 {
return nativeCaller.invoke3(@as(u64, @intCast(331533201183454215)), control, action, allowXOSwap);
}
/// control: unused parameter
/// Used to be known as GET_CONTROL_GROUP_INSTRUCTIONAL_BUTTON
pub fn GET_CONTROL_GROUP_INSTRUCTIONAL_BUTTONS_STRING(control: c_int, controlGroup: c_int, allowXOSwap: windows.BOOL) [*c]const u8 {
return nativeCaller.invoke3(@as(u64, @intCast(9278256740344842241)), control, controlGroup, allowXOSwap);
}
/// control: see IS_CONTROL_ENABLED
/// Used to be known as _SET_CONTROL_GROUP_COLOR
pub fn SET_CONTROL_LIGHT_EFFECT_COLOR(control: c_int, red: c_int, green: c_int, blue: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(9408060509652430005)), control, red, green, blue);
}
/// control: see IS_CONTROL_ENABLED
pub fn CLEAR_CONTROL_LIGHT_EFFECT(control: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14628642598264395789)), control);
}
/// control: see IS_CONTROL_ENABLED
/// duration in milliseconds
/// frequency should range from about 10 (slow vibration) to 255 (very fast)
/// example:
/// SET_CONTROL_SHAKE(PLAYER_CONTROL, 100, 200);
/// Used to be known as SET_PAD_SHAKE
pub fn SET_CONTROL_SHAKE(control: c_int, duration: c_int, frequency: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(5238680789324452053)), control, duration, frequency);
}
/// Does nothing (it's a nullsub).
pub fn SET_CONTROL_TRIGGER_SHAKE(control: c_int, leftDuration: c_int, leftFrequency: c_int, rightDuration: c_int, rightFrequency: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(1500432811139004044)), control, leftDuration, leftFrequency, rightDuration, rightFrequency);
}
/// control: see IS_CONTROL_ENABLED
/// Used to be known as STOP_PAD_SHAKE
pub fn STOP_CONTROL_SHAKE(control: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4089666692606385293)), control);
}
/// control: see IS_CONTROL_ENABLED
/// Used to be known as SET_PAD_SHAKE_SUPPRESSED_ID
pub fn SET_CONTROL_SHAKE_SUPPRESSED_ID(control: c_int, uniqueId: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17454052260106616328)), control, uniqueId);
}
/// control: see IS_CONTROL_ENABLED
/// Used to be known as _CLEAR_SUPPRESSED_PAD_RUMBLE
pub fn CLEAR_CONTROL_SHAKE_SUPPRESSED_ID(control: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11587476974180412315)), control);
}
pub fn IS_LOOK_INVERTED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8626102284276728077)));
}
/// Used with IS_LOOK_INVERTED() and negates its affect.
/// --
/// Not sure how the person above got that description, but here's an actual example:
/// if (PAD::IS_USING_KEYBOARD_AND_MOUSE(2)) {
/// if (a_5) {
/// if (PAD::IS_LOOK_INVERTED()) {
/// a_3 *= -1;
/// }
/// if (PAD::IS_MOUSE_LOOK_INVERTED()) {
/// a_3 *= -1;
/// }
/// }
/// }
pub fn IS_MOUSE_LOOK_INVERTED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(16240365910995219709)));
}
/// Hard-coded to return 3 if using KBM, otherwise same behavior as GET_LOCAL_PLAYER_GAMEPAD_AIM_STATE.
pub fn GET_LOCAL_PLAYER_AIM_STATE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(13493259179427234439)));
}
/// Returns the local player's targeting mode. See PLAYER::SET_PLAYER_TARGETING_MODE.
/// Used to be known as _GET_LOCAL_PLAYER_AIM_STATE_2
pub fn GET_LOCAL_PLAYER_GAMEPAD_AIM_STATE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(6465383111413011260)));
}
/// Used to be known as _GET_IS_USING_ALTERNATE_HANDBRAKE
pub fn GET_IS_USING_ALTERNATE_HANDBRAKE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(2714161134224077475)));
}
/// Returns profile setting 225.
pub fn GET_IS_USING_ALTERNATE_DRIVEBY() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(1112515670661118870)));
}
/// Returns profile setting 17.
pub fn GET_ALLOW_MOVEMENT_WHILE_ZOOMED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(18196123744571782486)));
}
pub fn SET_PLAYERPAD_SHAKES_WHEN_CONTROLLER_DISABLED(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8759464672204640392)), toggle);
}
/// control: see IS_CONTROL_ENABLED
pub fn SET_INPUT_EXCLUSIVE(control: c_int, action: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17141956811594263985)), control, action);
}
/// control: see IS_CONTROL_ENABLED
pub fn DISABLE_CONTROL_ACTION(control: c_int, action: c_int, disableRelatedActions: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(18345895136465843900)), control, action, disableRelatedActions);
}
/// control: see IS_CONTROL_ENABLED
pub fn ENABLE_CONTROL_ACTION(control: c_int, action: c_int, enableRelatedActions: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(3824154378443735381)), control, action, enableRelatedActions);
}
/// control: see IS_CONTROL_ENABLED
pub fn DISABLE_ALL_CONTROL_ACTIONS(control: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6866697718202259867)), control);
}
/// control: see IS_CONTROL_ENABLED
pub fn ENABLE_ALL_CONTROL_ACTIONS(control: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11961536079038356967)), control);
}
/// Used in carsteal3 script with schemeName = "Carsteal4_spycar".
/// Used to be known as _SWITCH_TO_INPUT_MAPPING_SCHEME
pub fn INIT_PC_SCRIPTED_CONTROLS(schemeName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4414294155012051829)), schemeName);
}
/// Same as INIT_PC_SCRIPTED_CONTROLS
/// Used to be known as _SWITCH_TO_INPUT_MAPPING_SCHEME_2
pub fn SWITCH_PC_SCRIPTED_CONTROLS(schemeName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5080927476962420641)), schemeName);
}
/// Used to be known as _RESET_INPUT_MAPPING_SCHEME
pub fn SHUTDOWN_PC_SCRIPTED_CONTROLS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(7223446342698516157)));
}
/// control: see IS_CONTROL_ENABLED
pub fn ALLOW_ALTERNATIVE_SCRIPT_CONTROLS_LAYOUT(control: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9171338763075101149)), control);
}
};
pub const PATHFIND = struct {
/// When nodeEnabled is set to false, all nodes in the area get disabled.
/// `GET_VEHICLE_NODE_IS_SWITCHED_OFF` returns true afterwards.
/// If it's true, `GET_VEHICLE_NODE_IS_SWITCHED_OFF` returns false.
pub fn SET_ROADS_IN_AREA(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, nodeEnabled: windows.BOOL, unknown2: windows.BOOL) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(13770424549976125422)), x1, y1, z1, x2, y2, z2, nodeEnabled, unknown2);
}
/// unknown3 is related to `SEND_SCRIPT_WORLD_STATE_EVENT > CNetworkRoadNodeWorldStateData` in networked environments.
/// See IS_POINT_IN_ANGLED_AREA for the definition of an angled area.
pub fn SET_ROADS_IN_ANGLED_AREA(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, width: f32, unknown1: windows.BOOL, unknown2: windows.BOOL, unknown3: windows.BOOL) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(1899007354032479065)), x1, y1, z1, x2, y2, z2, width, unknown1, unknown2, unknown3);
}
pub fn SET_PED_PATHS_IN_AREA(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, p6: windows.BOOL, p7: types.Any) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(3814655488685170712)), x1, y1, z1, x2, y2, z2, p6, p7);
}
/// Flags are:
/// 1 = 1 = B02_IsFootpath
/// 2 = 4 = !B15_InteractionUnk
/// 4 = 0x20 = !B14_IsInterior
/// 8 = 0x40 = !B07_IsWater
/// 16 = 0x200 = B17_IsFlatGround
/// When onGround == true outPosition is a position located on the nearest pavement.
/// When a safe coord could not be found the result of a function is false and outPosition == Vector3.Zero.
/// In the scripts these flags are used: 0, 14, 12, 16, 20, 21, 28. 0 is most commonly used, then 16.
/// 16 works for me, 0 crashed the script.
pub fn GET_SAFE_COORD_FOR_PED(x: f32, y: f32, z: f32, onGround: windows.BOOL, outPosition: [*c]types.Vector3, flags: c_int) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(13122520127042066890)), x, y, z, onGround, outPosition, flags);
}
/// https://gtaforums.com/topic/843561-pathfind-node-types
pub fn GET_CLOSEST_VEHICLE_NODE(x: f32, y: f32, z: f32, outPosition: [*c]types.Vector3, nodeFlags: c_int, p5: f32, p6: f32) windows.BOOL {
return nativeCaller.invoke7(@as(u64, @intCast(2596914974566212883)), x, y, z, outPosition, nodeFlags, p5, p6);
}
/// Get the closest vehicle node to a given position.
pub fn GET_CLOSEST_MAJOR_VEHICLE_NODE(x: f32, y: f32, z: f32, outPosition: [*c]types.Vector3, unknown1: f32, unknown2: f32) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(3363031893684044222)), x, y, z, outPosition, unknown1, unknown2);
}
/// p5, p6 and p7 seems to be about the same as p4, p5 and p6 for GET_CLOSEST_VEHICLE_NODE. p6 and/or p7 has something to do with finding a node on the same path/road and same direction(at least for this native, something to do with the heading maybe). Edit this when you find out more.
/// nodeType: 0 = main roads, 1 = any dry path, 3 = water
/// p6 is always 3.0
/// p7 is always 0
/// gtaforums.com/topic/843561-pathfind-node-types
/// Example of usage, moving vehicle to closest path/road:
/// Vector3 coords = ENTITY::GET_ENTITY_COORDS(playerVeh, true);
/// Vector3 closestVehicleNodeCoords;
/// float roadHeading;
/// PATHFIND::GET_CLOSEST_VEHICLE_NODE_WITH_HEADING(coords.x, coords.y, coords.z, &closestVehicleNodeCoords, &roadHeading, 1, 3, 0);
/// ENTITY::SET_ENTITY_HEADING(playerVeh, roadHeading);
/// ENTITY::SET_ENTITY_COORDS(playerVeh, closestVehicleNodeCoords.x, closestVehicleNodeCoords.y, closestVehicleNodeCoords.z, 1, 0, 0, 1);
/// VEHICLE::SET_VEHICLE_ON_GROUND_PROPERLY(playerVeh);
/// ------------------------------------------------------------------
/// C# Example (ins1de) : https://pastebin.com/fxtMWAHD
pub fn GET_CLOSEST_VEHICLE_NODE_WITH_HEADING(x: f32, y: f32, z: f32, outPosition: [*c]types.Vector3, outHeading: [*c]f32, nodeType: c_int, p6: f32, p7: f32) windows.BOOL {
return nativeCaller.invoke8(@as(u64, @intCast(18376691677910270896)), x, y, z, outPosition, outHeading, nodeType, p6, p7);
}
pub fn GET_NTH_CLOSEST_VEHICLE_NODE(x: f32, y: f32, z: f32, nthClosest: c_int, outPosition: [*c]types.Vector3, nodeFlags: c_int, unknown1: f32, unknown2: f32) windows.BOOL {
return nativeCaller.invoke8(@as(u64, @intCast(16505220125311341707)), x, y, z, nthClosest, outPosition, nodeFlags, unknown1, unknown2);
}
/// Returns the id.
pub fn GET_NTH_CLOSEST_VEHICLE_NODE_ID(x: f32, y: f32, z: f32, nth: c_int, nodeFlags: c_int, p5: f32, p6: f32) c_int {
return nativeCaller.invoke7(@as(u64, @intCast(2510518586829603349)), x, y, z, nth, nodeFlags, p5, p6);
}
/// Get the nth closest vehicle node and its heading.
pub fn GET_NTH_CLOSEST_VEHICLE_NODE_WITH_HEADING(x: f32, y: f32, z: f32, nthClosest: c_int, outPosition: [*c]types.Vector3, outHeading: [*c]f32, outNumLanes: [*c]c_int, nodeFlags: c_int, unknown3: f32, unknown4: f32) windows.BOOL {
return nativeCaller.invoke10(@as(u64, @intCast(9280347129195875524)), x, y, z, nthClosest, outPosition, outHeading, outNumLanes, nodeFlags, unknown3, unknown4);
}
pub fn GET_NTH_CLOSEST_VEHICLE_NODE_ID_WITH_HEADING(x: f32, y: f32, z: f32, nthClosest: c_int, outPosition: [*c]types.Vector3, outHeading: [*c]f32, nodeFlags: c_int, p7: f32, p8: f32) c_int {
return nativeCaller.invoke9(@as(u64, @intCast(7226031162423669255)), x, y, z, nthClosest, outPosition, outHeading, nodeFlags, p7, p8);
}
/// See gtaforums.com/topic/843561-pathfind-node-types for node type info. 0 = paved road only, 1 = any road, 3 = water
/// p10 always equals 3.0
/// p11 always equals 0
pub fn GET_NTH_CLOSEST_VEHICLE_NODE_FAVOUR_DIRECTION(x: f32, y: f32, z: f32, desiredX: f32, desiredY: f32, desiredZ: f32, nthClosest: c_int, outPosition: [*c]types.Vector3, outHeading: [*c]f32, nodeFlags: c_int, p10: f32, p11: f32) windows.BOOL {
return nativeCaller.invoke12(@as(u64, @intCast(5012607438953308263)), x, y, z, desiredX, desiredY, desiredZ, nthClosest, outPosition, outHeading, nodeFlags, p10, p11);
}
/// Gets the density and flags of the closest node to the specified position.
/// Density is a value between 0 and 15, indicating how busy the road is.
/// Flags is a bit field.
pub fn GET_VEHICLE_NODE_PROPERTIES(x: f32, y: f32, z: f32, density: [*c]c_int, flags: [*c]c_int) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(389656384451763932)), x, y, z, density, flags);
}
/// Returns true if the id is non zero.
pub fn IS_VEHICLE_NODE_ID_VALID(vehicleNodeId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2211039805179277172)), vehicleNodeId);
}
/// Calling this with an invalid node id, will crash the game.
/// Note that IS_VEHICLE_NODE_ID_VALID simply checks if nodeId is not zero. It does not actually ensure that the id is valid.
/// Eg. IS_VEHICLE_NODE_ID_VALID(1) will return true, but will crash when calling GET_VEHICLE_NODE_POSITION().
pub fn GET_VEHICLE_NODE_POSITION(nodeId: c_int, outPosition: [*c]types.Vector3) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8084282276450675138)), nodeId, outPosition);
}
/// Returns false for nodes that aren't used for GPS routes.
/// Example:
/// Nodes in Fort Zancudo and LSIA are false
/// Used to be known as _GET_SUPPORTS_GPS_ROUTE_FLAG
pub fn GET_VEHICLE_NODE_IS_GPS_ALLOWED(nodeID: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11722408342446334902)), nodeID);
}
/// Returns true when the node is Offroad. Alleys, some dirt roads, and carparks return true.
/// Normal roads where plenty of Peds spawn will return false
/// Used to be known as _GET_IS_SLOW_ROAD_FLAG
pub fn GET_VEHICLE_NODE_IS_SWITCHED_OFF(nodeID: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5715191804072465017)), nodeID);
}
/// p1 seems to be always 1.0f in the scripts
pub fn GET_CLOSEST_ROAD(x: f32, y: f32, z: f32, p3: f32, p4: c_int, p5: [*c]types.Vector3, p6: [*c]types.Vector3, p7: [*c]types.Any, p8: [*c]types.Any, p9: [*c]f32, p10: windows.BOOL) windows.BOOL {
return nativeCaller.invoke11(@as(u64, @intCast(1382414576514039442)), x, y, z, p3, p4, p5, p6, p7, p8, p9, p10);
}
pub fn LOAD_ALL_PATH_NODES(set: windows.BOOL) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14027424203929104267)), set);
}
/// Used to be known as SET_ALL_PATHS_CACHE_BOUNDINGSTRUCT
pub fn SET_ALLOW_STREAM_PROLOGUE_NODES(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2490029257889631229)), toggle);
}
/// Activates Cayo Perico path nodes if passed `1`. GPS navigation will start working, maybe more stuff will change, not sure. It seems if you try to unload (pass `0`) when close to the island, your game might crash.
/// Used to be known as _SET_AI_GLOBAL_PATH_NODES_TYPE
pub fn SET_ALLOW_STREAM_HEIST_ISLAND_NODES(@"type": c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17819371510466739178)), @"type");
}
/// Used to be known as _ARE_PATH_NODES_LOADED_IN_AREA
pub fn ARE_NODES_LOADED_FOR_AREA(x1: f32, y1: f32, x2: f32, y2: f32) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(17849905319598465805)), x1, y1, x2, y2);
}
/// Used internally for long range tasks
/// Used to be known as REQUEST_PATHS_PREFER_ACCURATE_BOUNDINGSTRUCT
pub fn REQUEST_PATH_NODES_IN_AREA_THIS_FRAME(x1: f32, y1: f32, x2: f32, y2: f32) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(575074935357023879)), x1, y1, x2, y2);
}
pub fn SET_ROADS_BACK_TO_ORIGINAL(p0: f32, p1: f32, p2: f32, p3: f32, p4: f32, p5: f32, p6: types.Any) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(2226755393395083132)), p0, p1, p2, p3, p4, p5, p6);
}
/// See IS_POINT_IN_ANGLED_AREA for the definition of an angled area.
/// bool p7 - always 1
pub fn SET_ROADS_BACK_TO_ORIGINAL_IN_ANGLED_AREA(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, width: f32, p7: types.Any) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(11065603657515134)), x1, y1, z1, x2, y2, z2, width, p7);
}
pub fn SET_AMBIENT_PED_RANGE_MULTIPLIER_THIS_FRAME(multiplier: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(833621265049502944)), multiplier);
}
pub fn ADJUST_AMBIENT_PED_SPAWN_DENSITIES_THIS_FRAME(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any, p6: types.Any) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(12283010728198929470)), p0, p1, p2, p3, p4, p5, p6);
}
/// p6 is always 0
pub fn SET_PED_PATHS_BACK_TO_ORIGINAL(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, p6: types.Any) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(16162091895400587859)), x1, y1, z1, x2, y2, z2, p6);
}
pub fn GET_RANDOM_VEHICLE_NODE(x: f32, y: f32, z: f32, radius: f32, p4: windows.BOOL, p5: windows.BOOL, p6: windows.BOOL, outPosition: [*c]types.Vector3, nodeId: [*c]c_int) windows.BOOL {
return nativeCaller.invoke9(@as(u64, @intCast(10655758079426509437)), x, y, z, radius, p4, p5, p6, outPosition, nodeId);
}
pub fn GET_SPAWN_COORDS_FOR_VEHICLE_NODE(nodeAddress: c_int, towardsCoorsX: f32, towardsCoorsY: f32, towardsCoorsZ: f32, centrePoint: [*c]types.Vector3, heading: [*c]f32) types.Vector3 {
return nativeCaller.invoke6(@as(u64, @intCast(9265392827702887831)), nodeAddress, towardsCoorsX, towardsCoorsY, towardsCoorsZ, centrePoint, heading);
}
/// Determines the name of the street which is the closest to the given coordinates.
/// x,y,z - the coordinates of the street
/// streetName - returns a hash to the name of the street the coords are on
/// crossingRoad - if the coordinates are on an intersection, a hash to the name of the crossing road
/// Note: the names are returned as hashes, the strings can be returned using the function HUD::GET_STREET_NAME_FROM_HASH_KEY.
pub fn GET_STREET_NAME_AT_COORD(x: f32, y: f32, z: f32, streetName: [*c]types.Hash, crossingRoad: [*c]types.Hash) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(3365332906397525184)), x, y, z, streetName, crossingRoad);
}
/// p3 is 0 in the only game script occurrence (trevor3) but 1 doesn't seem to make a difference
/// distToNxJunction seems to be the distance in metres * 10.0f
/// direction:
/// 0 = This happens randomly during the drive for seemingly no reason but if you consider that this native is only used in trevor3, it seems to mean "Next frame, stop whatever's being said and tell the player the direction."
/// 1 = Route is being calculated or the player is going in the wrong direction
/// 2 = Please Proceed the Highlighted Route
/// 3 = In (distToNxJunction) Turn Left
/// 4 = In (distToNxJunction) Turn Right
/// 5 = In (distToNxJunction) Keep Straight
/// 6 = In (distToNxJunction) Turn Sharply To The Left
/// 7 = In (distToNxJunction) Turn Sharply To The Right
/// 8 = Route is being recalculated or the navmesh is confusing. This happens randomly during the drive but consistently at {2044.0358, 2996.6116, 44.9717} if you face towards the bar and the route needs you to turn right. In that particular case, it could be a bug with how the turn appears to be 270 deg. CCW instead of "right." Either way, this seems to be the engine saying "I don't know the route right now."
/// return value set to 0 always
pub fn GENERATE_DIRECTIONS_TO_COORD(x: f32, y: f32, z: f32, p3: windows.BOOL, direction: [*c]c_int, p5: [*c]f32, distToNxJunction: [*c]f32) c_int {
return nativeCaller.invoke7(@as(u64, @intCast(17942664111592492536)), x, y, z, p3, direction, p5, distToNxJunction);
}
pub fn SET_IGNORE_NO_GPS_FLAG(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8247517357546113075)), toggle);
}
/// See: SET_BLIP_ROUTE
/// Used to be known as _SET_IGNORE_SECONDARY_ROUTE_NODES
pub fn SET_IGNORE_NO_GPS_FLAG_UNTIL_FIRST_NORMAL_NODE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2288542884233692943)), toggle);
}
pub fn SET_GPS_DISABLED_ZONE(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z3: f32) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(15861757313688621569)), x1, y1, z1, x2, y2, z3);
}
pub fn GET_GPS_BLIP_ROUTE_LENGTH() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(13525536997791804037)));
}
/// p3 can be 0, 1 or 2.
/// Used to be known as GET_GPS_WAYPOINT_ROUTE_END
pub fn GET_POS_ALONG_GPS_TYPE_ROUTE(result: [*c]types.Vector3, p1: windows.BOOL, p2: f32, p3: c_int) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(17516232016361659813)), result, p1, p2, p3);
}
pub fn GET_GPS_BLIP_ROUTE_FOUND() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9700096964479131654)));
}
/// Used to be known as _GET_ROAD_SIDE_POINT_WITH_HEADING
pub fn GET_ROAD_BOUNDARY_USING_HEADING(x: f32, y: f32, z: f32, heading: f32, outPosition: [*c]types.Vector3) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(11599204808676293637)), x, y, z, heading, outPosition);
}
/// Used to be known as _GET_POINT_ON_ROAD_SIDE
pub fn GET_POSITION_BY_SIDE_OF_ROAD(x: f32, y: f32, z: f32, p3: c_int, outPosition: [*c]types.Vector3) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(1654069771508910564)), x, y, z, p3, outPosition);
}
/// Gets a value indicating whether the specified position is on a road.
/// The vehicle parameter is not implemented (ignored).
pub fn IS_POINT_ON_ROAD(x: f32, y: f32, z: f32, vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(1322919935073282825)), x, y, z, vehicle);
}
/// Gets the next zone that has been disabled using SET_GPS_DISABLED_ZONE_AT_INDEX.
pub fn GET_NEXT_GPS_DISABLED_ZONE_INDEX() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(15251054137710885516)));
}
/// Disables the GPS route displayed on the minimap while within a certain zone (area). When in a disabled zone and creating a waypoint, the GPS route is not shown on the minimap until you are outside of the zone. When disabled, the direct distance is shown on minimap opposed to distance to travel. Seems to only work before setting a waypoint.
/// You can clear the disabled zone with CLEAR_GPS_DISABLED_ZONE_AT_INDEX.
/// **Setting a waypoint at the same coordinate:**
/// Disabled Zone: https://i.imgur.com/P9VUuxM.png
/// Enabled Zone (normal): https://i.imgur.com/BPi24aw.png
pub fn SET_GPS_DISABLED_ZONE_AT_INDEX(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, index: c_int) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(15040928121556492628)), x1, y1, z1, x2, y2, z2, index);
}
/// Clears a disabled GPS route area from a certain index previously set using `SET_GPS_DISABLED_ZONE_AT_INDEX`.
/// Used to be known as _CLEAR_GPS_DISABLED_ZONE_AT_INDEX
pub fn CLEAR_GPS_DISABLED_ZONE_AT_INDEX(index: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2882813939784539911)), index);
}
pub fn ADD_NAVMESH_REQUIRED_REGION(x: f32, y: f32, radius: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(4070881873695303301)), x, y, radius);
}
pub fn REMOVE_NAVMESH_REQUIRED_REGIONS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(10479606114466088030)));
}
/// Used to be known as _IS_NAVMESH_REQUIRED_REGION_OWNED_BY_ANY_THREAD
pub fn IS_NAVMESH_REQUIRED_REGION_IN_USE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8095928690609987008)));
}
/// Set toggle true to disable navmesh.
/// Set toggle false to enable navmesh.
pub fn DISABLE_NAVMESH_IN_AREA(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, toggle: windows.BOOL) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(5514784019205462923)), x1, y1, z1, x2, y2, z2, toggle);
}
pub fn ARE_ALL_NAVMESH_REGIONS_LOADED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9517752372806957802)));
}
/// Returns whether navmesh for the region is loaded. The region is a rectangular prism defined by it's top left deepest corner to it's bottom right shallowest corner.
/// If you can re-word this so it makes more sense, please do. I'm horrible with words sometimes...
pub fn IS_NAVMESH_LOADED_IN_AREA(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(17875851137686463141)), x1, y1, z1, x2, y2, z2);
}
pub fn GET_NUM_NAVMESHES_EXISTING_IN_AREA(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32) c_int {
return nativeCaller.invoke6(@as(u64, @intCast(103739531227794533)), x1, y1, z1, x2, y2, z2);
}
pub fn ADD_NAVMESH_BLOCKING_OBJECT(p0: f32, p1: f32, p2: f32, p3: f32, p4: f32, p5: f32, p6: f32, p7: windows.BOOL, p8: types.Any) c_int {
return nativeCaller.invoke9(@as(u64, @intCast(18218688733846187866)), p0, p1, p2, p3, p4, p5, p6, p7, p8);
}
pub fn UPDATE_NAVMESH_BLOCKING_OBJECT(p0: types.Any, p1: f32, p2: f32, p3: f32, p4: f32, p5: f32, p6: f32, p7: f32, p8: types.Any) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(1197563013489034887)), p0, p1, p2, p3, p4, p5, p6, p7, p8);
}
pub fn REMOVE_NAVMESH_BLOCKING_OBJECT(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5060245499023817742)), p0);
}
pub fn DOES_NAVMESH_BLOCKING_OBJECT_EXIST(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1057977418382517145)), p0);
}
/// Returns CGameWorldHeightMap's maximum Z value at specified point (grid node).
/// Used to be known as _GET_HEIGHTMAP_TOP_Z_FOR_POSITION
pub fn GET_APPROX_HEIGHT_FOR_POINT(x: f32, y: f32) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(3009051046431078651)), x, y);
}
/// Returns CGameWorldHeightMap's maximum Z among all grid nodes that intersect with the specified rectangle.
/// Used to be known as _GET_HEIGHTMAP_TOP_Z_FOR_AREA
pub fn GET_APPROX_HEIGHT_FOR_AREA(x1: f32, y1: f32, x2: f32, y2: f32) f32 {
return nativeCaller.invoke4(@as(u64, @intCast(9997575593193741539)), x1, y1, x2, y2);
}
/// Returns CGameWorldHeightMap's minimum Z value at specified point (grid node).
/// Used to be known as _GET_HEIGHTMAP_BOTTOM_Z_FOR_POSITION
pub fn GET_APPROX_FLOOR_FOR_POINT(x: f32, y: f32) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(3703385661687878021)), x, y);
}
/// Returns CGameWorldHeightMap's minimum Z among all grid nodes that intersect with the specified rectangle.
/// Used to be known as _GET_HEIGHTMAP_BOTTOM_Z_FOR_AREA
pub fn GET_APPROX_FLOOR_FOR_AREA(x1: f32, y1: f32, x2: f32, y2: f32) f32 {
return nativeCaller.invoke4(@as(u64, @intCast(3862354833003275024)), x1, y1, x2, y2);
}
/// Calculates the travel distance between a set of points.
/// Doesn't seem to correlate with distance on gps sometimes.
/// This function returns the value 100000.0 over long distances, seems to be a failure mode result, potentially occurring when not all path nodes are loaded into pathfind.
pub fn CALCULATE_TRAVEL_DISTANCE_BETWEEN_POINTS(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32) f32 {
return nativeCaller.invoke6(@as(u64, @intCast(12527145474710610327)), x1, y1, z1, x2, y2, z2);
}
};
pub const PED = struct {
/// https://alloc8or.re/gta5/doc/enums/ePedType.txt
/// Full list of peds by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/peds.json
pub fn CREATE_PED(pedType: c_int, modelHash: types.Hash, x: f32, y: f32, z: f32, heading: f32, isNetwork: windows.BOOL, bScriptHostPed: windows.BOOL) types.Ped {
return nativeCaller.invoke8(@as(u64, @intCast(15321134921733597150)), pedType, modelHash, x, y, z, heading, isNetwork, bScriptHostPed);
}
/// Deletes the specified ped, then sets the handle pointed to by the pointer to NULL.
pub fn DELETE_PED(ped: [*c]types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10814314362921280843)), ped);
}
pub fn CLONE_PED(ped: types.Ped, isNetwork: windows.BOOL, bScriptHostPed: windows.BOOL, copyHeadBlendFlag: windows.BOOL) types.Ped {
return nativeCaller.invoke4(@as(u64, @intCast(17233482896622930651)), ped, isNetwork, bScriptHostPed, copyHeadBlendFlag);
}
/// Used to be known as _CLONE_PED_2
/// Used to be known as _CLONE_PED_EX
pub fn CLONE_PED_ALT(ped: types.Ped, isNetwork: windows.BOOL, bScriptHostPed: windows.BOOL, copyHeadBlendFlag: windows.BOOL, p4: windows.BOOL) types.Ped {
return nativeCaller.invoke5(@as(u64, @intCast(7390358660664647240)), ped, isNetwork, bScriptHostPed, copyHeadBlendFlag, p4);
}
/// Copies ped's components and props to targetPed.
/// Used to be known as _ASSIGN_PLAYER_TO_PED
pub fn CLONE_PED_TO_TARGET(ped: types.Ped, targetPed: types.Ped) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16812735942556757402)), ped, targetPed);
}
/// Used to be known as _CLONE_PED_TO_TARGET_EX
pub fn CLONE_PED_TO_TARGET_ALT(ped: types.Ped, targetPed: types.Ped, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(1480286535372552324)), ped, targetPed, p2);
}
/// Gets a value indicating whether the specified ped is in the specified vehicle.
/// If 'atGetIn' is false, the function will not return true until the ped is sitting in the vehicle and is about to close the door. If it's true, the function returns true the moment the ped starts to get onto the seat (after opening the door). Eg. if false, and the ped is getting into a submersible, the function will not return true until the ped has descended down into the submersible and gotten into the seat, while if it's true, it'll return true the moment the hatch has been opened and the ped is about to descend into the submersible.
pub fn IS_PED_IN_VEHICLE(ped: types.Ped, vehicle: types.Vehicle, atGetIn: windows.BOOL) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(11812460267229133275)), ped, vehicle, atGetIn);
}
pub fn IS_PED_IN_MODEL(ped: types.Ped, modelHash: types.Hash) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(8749809010202026802)), ped, modelHash);
}
/// Gets a value indicating whether the specified ped is in any vehicle.
/// If 'atGetIn' is false, the function will not return true until the ped is sitting in the vehicle and is about to close the door. If it's true, the function returns true the moment the ped starts to get onto the seat (after opening the door). Eg. if false, and the ped is getting into a submersible, the function will not return true until the ped has descended down into the submersible and gotten into the seat, while if it's true, it'll return true the moment the hatch has been opened and the ped is about to descend into the submersible.
pub fn IS_PED_IN_ANY_VEHICLE(ped: types.Ped, atGetIn: windows.BOOL) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(11059360085529971211)), ped, atGetIn);
}
/// xyz - relative to the world origin.
pub fn IS_COP_PED_IN_AREA_3D(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(1651774575515508574)), x1, y1, z1, x2, y2, z2);
}
/// Gets a value indicating whether this ped's health is below its injured threshold.
/// The default threshold is 100.
pub fn IS_PED_INJURED(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9557445016008013249)), ped);
}
/// Returns whether the specified ped is hurt.
pub fn IS_PED_HURT(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6450204994699254546)), ped);
}
/// Gets a value indicating whether this ped's health is below its fatally injured threshold. The default threshold is 100.
/// If the handle is invalid, the function returns true.
pub fn IS_PED_FATALLY_INJURED(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15580560283690424960)), ped);
}
/// Seems to consistently return true if the ped is dead.
/// p1 is always passed 1 in the scripts.
/// I suggest to remove "OR_DYING" part, because it does not detect dying phase.
/// That's what the devs call it, cry about it.
/// lol
pub fn IS_PED_DEAD_OR_DYING(ped: types.Ped, p1: windows.BOOL) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(3681656254872768568)), ped, p1);
}
pub fn IS_CONVERSATION_PED_DEAD(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16186129209363659450)), ped);
}
pub fn IS_PED_AIMING_FROM_COVER(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4150261839465480421)), ped);
}
/// Returns whether the specified ped is reloading.
pub fn IS_PED_RELOADING(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2643895309002103121)), ped);
}
/// Returns true if the given ped has a valid pointer to CPlayerInfo in its CPed class. That's all.
pub fn IS_PED_A_PLAYER(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1320482904327632523)), ped);
}
/// pedType: see CREATE_PED
/// Full list of peds by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/peds.json
pub fn CREATE_PED_INSIDE_VEHICLE(vehicle: types.Vehicle, pedType: c_int, modelHash: types.Hash, seat: c_int, isNetwork: windows.BOOL, bScriptHostPed: windows.BOOL) types.Ped {
return nativeCaller.invoke6(@as(u64, @intCast(9068377762319815988)), vehicle, pedType, modelHash, seat, isNetwork, bScriptHostPed);
}
pub fn SET_PED_DESIRED_HEADING(ped: types.Ped, heading: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12275263158295789168)), ped, heading);
}
/// Used to be known as _FREEZE_PED_CAMERA_ROTATION
pub fn FORCE_ALL_HEADING_VALUES_TO_ALIGN(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18386072075868751514)), ped);
}
/// angle is ped's view cone
pub fn IS_PED_FACING_PED(ped: types.Ped, otherPed: types.Ped, angle: f32) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(15498656372762106531)), ped, otherPed, angle);
}
/// Notes: The function only returns true while the ped is:
/// A.) Swinging a random melee attack (including pistol-whipping)
/// B.) Reacting to being hit by a melee attack (including pistol-whipping)
/// C.) Is locked-on to an enemy (arms up, strafing/skipping in the default fighting-stance, ready to dodge+counter).
/// You don't have to be holding the melee-targetting button to be in this stance; you stay in it by default for a few seconds after swinging at someone. If you do a sprinting punch, it returns true for the duration of the punch animation and then returns false again, even if you've punched and made-angry many peds
pub fn IS_PED_IN_MELEE_COMBAT(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5629670148008661337)), ped);
}
/// Returns true if the ped doesn't do any movement. If the ped is being pushed forwards by using APPLY_FORCE_TO_ENTITY for example, the function returns false.
pub fn IS_PED_STOPPED(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5983389407396798996)), ped);
}
pub fn IS_PED_SHOOTING_IN_AREA(ped: types.Ped, x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, p7: windows.BOOL, p8: windows.BOOL) windows.BOOL {
return nativeCaller.invoke9(@as(u64, @intCast(9123727853582440687)), ped, x1, y1, z1, x2, y2, z2, p7, p8);
}
pub fn IS_ANY_PED_SHOOTING_IN_AREA(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, p6: windows.BOOL, p7: windows.BOOL) windows.BOOL {
return nativeCaller.invoke8(@as(u64, @intCast(11588842792705092693)), x1, y1, z1, x2, y2, z2, p6, p7);
}
/// Returns whether the specified ped is shooting.
pub fn IS_PED_SHOOTING(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3774412487161016737)), ped);
}
/// accuracy = 0-100, 100 being perfectly accurate
pub fn SET_PED_ACCURACY(ped: types.Ped, accuracy: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8858501697828937398)), ped, accuracy);
}
pub fn GET_PED_ACCURACY(ped: types.Ped) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(4032038155253976278)), ped);
}
pub fn SET_AMBIENT_LAW_PED_ACCURACY_MODIFIER(multiplier: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9790239967273982620)), multiplier);
}
pub fn IS_PED_MODEL(ped: types.Ped, modelHash: types.Hash) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(14543630739788422135)), ped, modelHash);
}
/// Forces the ped to fall back and kills it.
/// It doesn't really explode the ped's head but it kills the ped
pub fn EXPLODE_PED_HEAD(ped: types.Ped, weaponHash: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3244226514967662394)), ped, weaponHash);
}
/// Judging purely from a quick disassembly, if the ped is in a vehicle, the ped will be deleted immediately. If not, it'll be marked as no longer needed. - very elegant..
pub fn REMOVE_PED_ELEGANTLY(ped: [*c]types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12424662107189803358)), ped);
}
/// Same as SET_PED_ARMOUR, but ADDS 'amount' to the armor the Ped already has.
pub fn ADD_ARMOUR_TO_PED(ped: types.Ped, amount: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6604056754174353199)), ped, amount);
}
/// Sets the armor of the specified ped.
/// ped: The Ped to set the armor of.
/// amount: A value between 0 and 100 indicating the value to set the Ped's armor to.
pub fn SET_PED_ARMOUR(ped: types.Ped, amount: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14888985593447081164)), ped, amount);
}
/// Ped: The ped to warp.
/// vehicle: The vehicle to warp the ped into.
/// Seat_Index: [-1 is driver seat, -2 first free passenger seat]
/// Moreinfo of Seat Index
/// DriverSeat = -1
/// Passenger = 0
/// Left Rear = 1
/// RightRear = 2
pub fn SET_PED_INTO_VEHICLE(ped: types.Ped, vehicle: types.Vehicle, seatIndex: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(17823854667459462717)), ped, vehicle, seatIndex);
}
pub fn SET_PED_ALLOW_VEHICLES_OVERRIDE(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4324172950841413337)), ped, toggle);
}
pub fn CAN_CREATE_RANDOM_PED(p0: windows.BOOL) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4504525143670489828)), p0);
}
/// vb.net
/// Dim ped_handle As Integer
/// With Game.Player.Character
/// Dim pos As Vector3 = .Position + .ForwardVector * 3
/// ped_handle = Native.Function.Call(Of Integer)(Hash.CREATE_RANDOM_PED, pos.X, pos.Y, pos.Z)
/// End With
/// Creates a Ped at the specified location, returns the Ped Handle.
/// Ped will not act until SET_PED_AS_NO_LONGER_NEEDED is called.
pub fn CREATE_RANDOM_PED(posX: f32, posY: f32, posZ: f32) types.Ped {
return nativeCaller.invoke3(@as(u64, @intCast(13018918117347950223)), posX, posY, posZ);
}
pub fn CREATE_RANDOM_PED_AS_DRIVER(vehicle: types.Vehicle, returnHandle: windows.BOOL) types.Ped {
return nativeCaller.invoke2(@as(u64, @intCast(11196574481639228576)), vehicle, returnHandle);
}
pub fn CAN_CREATE_RANDOM_DRIVER() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(13324908736320727416)));
}
pub fn CAN_CREATE_RANDOM_BIKE_RIDER() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(16919722156279042396)));
}
pub fn SET_PED_MOVE_ANIMS_BLEND_OUT(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11424665299683135181)), ped);
}
pub fn SET_PED_CAN_BE_DRAGGED_OUT(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13936123607432176869)), ped, toggle);
}
/// ntoggle was always false except in one instance (b678).
/// The one time this is set to true seems to do with when you fail the mission.
pub fn SET_PED_ALLOW_HURT_COMBAT_FOR_ALL_MISSION_PEDS(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17491625671667655070)), toggle);
}
/// Returns true/false if the ped is/isn't male.
pub fn IS_PED_MALE(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7899137457135336006)), ped);
}
/// Returns true/false if the ped is/isn't humanoid.
pub fn IS_PED_HUMAN(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13366690418504398749)), ped);
}
/// Gets the vehicle the specified Ped is in. Returns 0 if the ped is/was not in a vehicle.
pub fn GET_VEHICLE_PED_IS_IN(ped: types.Ped, includeEntering: windows.BOOL) types.Vehicle {
return nativeCaller.invoke2(@as(u64, @intCast(11137703836139538195)), ped, includeEntering);
}
/// Resets the value for the last vehicle driven by the Ped.
pub fn RESET_PED_LAST_VEHICLE(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13514714034352281787)), ped);
}
pub fn SET_PED_DENSITY_MULTIPLIER_THIS_FRAME(multiplier: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10800711787831782642)), multiplier);
}
pub fn SET_SCENARIO_PED_DENSITY_MULTIPLIER_THIS_FRAME(p0: f32, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8815058788752046232)), p0, p1);
}
pub fn SUPPRESS_AMBIENT_PED_AGGRESSIVE_CLEANUP_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(6521039627000175037)));
}
pub fn SET_SCRIPTED_CONVERSION_COORD_THIS_FRAME(x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(5802544540557692805)), x, y, z);
}
/// The distance between these points, is the diagonal of a box (remember it's 3D).
pub fn SET_PED_NON_CREATION_AREA(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(17149993380040246250)), x1, y1, z1, x2, y2, z2);
}
pub fn CLEAR_PED_NON_CREATION_AREA() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(3316092437016479313)));
}
pub fn INSTANTLY_FILL_PED_POPULATION() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(5141365244174826625)));
}
/// Same function call as PED::GET_MOUNT, aka just returns 0
pub fn IS_PED_ON_MOUNT(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5047347065715189086)), ped);
}
/// Function just returns 0
/// void __fastcall ped__get_mount(NativeContext *a1)
/// {
/// NativeContext *v1; // rbx@1
/// v1 = a1;
/// GetAddressOfPedFromScriptHandle(a1->Args->Arg1);
/// v1->Returns->Item1= 0;
/// }
pub fn GET_MOUNT(ped: types.Ped) types.Ped {
return nativeCaller.invoke1(@as(u64, @intCast(16708666388346900568)), ped);
}
/// Gets a value indicating whether the specified ped is on top of any vehicle.
/// Return 1 when ped is on vehicle.
/// Return 0 when ped is not on a vehicle.
pub fn IS_PED_ON_VEHICLE(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7454067524096647083)), ped);
}
pub fn IS_PED_ON_SPECIFIC_VEHICLE(ped: types.Ped, vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(17032445446681738162)), ped, vehicle);
}
/// Maximum possible amount of money on MP is 2000. ~JX
/// -----------------------------------------------------------------------------
/// Maximum amount that a ped can theoretically have is 65535 (0xFFFF) since the amount is stored as an unsigned short (uint16_t) value.
pub fn SET_PED_MONEY(ped: types.Ped, amount: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12234193376882508213)), ped, amount);
}
pub fn GET_PED_MONEY(ped: types.Ped) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(4569205681148115687)), ped);
}
/// Related to Peds dropping pickup_health_snack; p0 is a value between [0.0, 1.0] that corresponds to drop rate
pub fn SET_HEALTH_SNACKS_CARRIED_BY_ALL_NEW_PEDS(p0: f32, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18394956784010285785)), p0, p1);
}
pub fn SET_AMBIENT_PEDS_DROP_MONEY(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7714210357369428226)), p0);
}
pub fn SET_BLOCKING_OF_NON_TEMPORARY_EVENTS_FOR_AMBIENT_PEDS_THIS_FRAME(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11029865940178564691)), p0);
}
/// Ped no longer takes critical damage modifiers if set to FALSE.
/// Example: Headshotting a player no longer one shots them. Instead they will take the same damage as a torso shot.
pub fn SET_PED_SUFFERS_CRITICAL_HITS(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16994173916529397932)), ped, toggle);
}
pub fn SET_PED_UPPER_BODY_DAMAGE_ONLY(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12666786256047359923)), ped, toggle);
}
/// Detect if ped is sitting in the specified vehicle
/// [True/False]
pub fn IS_PED_SITTING_IN_VEHICLE(ped: types.Ped, vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(12108114641748692930)), ped, vehicle);
}
/// Detect if ped is in any vehicle
/// [True/False]
pub fn IS_PED_SITTING_IN_ANY_VEHICLE(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9397505571394551544)), ped);
}
pub fn IS_PED_ON_FOOT(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(143805665679202738)), ped);
}
pub fn IS_PED_ON_ANY_BIKE(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10685168940141536377)), ped);
}
pub fn IS_PED_PLANTING_BOMB(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14342662639574418136)), ped);
}
pub fn GET_DEAD_PED_PICKUP_COORDS(ped: types.Ped, p1: f32, p2: f32) types.Vector3 {
return nativeCaller.invoke3(@as(u64, @intCast(14794328832896667446)), ped, p1, p2);
}
pub fn IS_PED_IN_ANY_BOAT(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3318620947760329529)), ped);
}
pub fn IS_PED_IN_ANY_SUB(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(18157389777550563742)), ped);
}
pub fn IS_PED_IN_ANY_HELI(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2993646556015384325)), ped);
}
pub fn IS_PED_IN_ANY_PLANE(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6917332199840217984)), ped);
}
pub fn IS_PED_IN_FLYING_VEHICLE(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10463136496930668956)), ped);
}
pub fn SET_PED_DIES_IN_WATER(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6255201556019755998)), ped, toggle);
}
/// Used to be known as _GET_PED_DIES_IN_WATER
pub fn GET_PED_DIES_IN_WATER(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7306837850125863216)), ped);
}
pub fn SET_PED_DIES_IN_SINKING_VEHICLE(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15499316417087583420)), ped, toggle);
}
pub fn GET_PED_ARMOUR(ped: types.Ped) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(10701590112812511704)), ped);
}
pub fn SET_PED_STAY_IN_VEHICLE_WHEN_JACKED(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17146338063427094945)), ped, toggle);
}
pub fn SET_PED_CAN_BE_SHOT_IN_VEHICLE(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14406764142192015879)), ped, toggle);
}
pub fn GET_PED_LAST_DAMAGE_BONE(ped: types.Ped, outBone: [*c]c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(15517540603941266588)), ped, outBone);
}
pub fn CLEAR_PED_LAST_DAMAGE_BONE(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10301623148778549275)), ped);
}
pub fn SET_AI_WEAPON_DAMAGE_MODIFIER(value: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1954045745482663201)), value);
}
pub fn RESET_AI_WEAPON_DAMAGE_MODIFIER() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(16867782766264349756)));
}
pub fn SET_AI_MELEE_WEAPON_DAMAGE_MODIFIER(modifier: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7369593155508859476)), modifier);
}
pub fn RESET_AI_MELEE_WEAPON_DAMAGE_MODIFIER() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(5108606436650662975)));
}
pub fn SET_TREAT_AS_AMBIENT_PED_FOR_DRIVER_LOCKON(ped: types.Ped, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3403663172843347428)), ped, p1);
}
pub fn SET_PED_CAN_BE_TARGETTED(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7202820943940500141)), ped, toggle);
}
pub fn SET_PED_CAN_BE_TARGETTED_BY_TEAM(ped: types.Ped, team: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(13771065895300730668)), ped, team, toggle);
}
pub fn SET_PED_CAN_BE_TARGETTED_BY_PLAYER(ped: types.Ped, player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(7400957295976475254)), ped, player, toggle);
}
pub fn SET_ALLOW_LOCKON_TO_PED_IF_FRIENDLY(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(440428521789940772)), ped, toggle);
}
/// Used to be known as SET_TIME_EXCLUSIVE_DISPLAY_TEXTURE
pub fn SET_USE_CAMERA_HEADING_FOR_DESIRED_DIRECTION_LOCK_ON_TEST(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18244738037095531223)), ped, toggle);
}
pub fn IS_PED_IN_ANY_POLICE_VEHICLE(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(851266269252197394)), ped);
}
pub fn FORCE_PED_TO_OPEN_PARACHUTE(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1649494491004346913)), ped);
}
pub fn IS_PED_IN_PARACHUTE_FREE_FALL(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9065336868616016384)), ped);
}
pub fn IS_PED_FALLING(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(18127728484137885603)), ped);
}
pub fn IS_PED_JUMPING(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14905433007184723863)), ped);
}
pub fn IS_PED_LANDING(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4696994260783099131)), p0);
}
pub fn IS_PED_DOING_A_BEAST_JUMP(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4980142265546490420)), p0);
}
pub fn IS_PED_CLIMBING(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6046306041128281635)), ped);
}
pub fn IS_PED_VAULTING(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1260006042825329502)), ped);
}
pub fn IS_PED_DIVING(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6136075483951897361)), ped);
}
pub fn IS_PED_JUMPING_OUT_OF_VEHICLE(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4845275056676582966)), ped);
}
/// Returns true if the ped is currently opening a door (CTaskOpenDoor).
/// Used to be known as _IS_PED_OPENING_A_DOOR
pub fn IS_PED_OPENING_DOOR(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2787462698231474732)), ped);
}
/// Returns:
/// -1: Normal
/// 0: Wearing parachute on back
/// 1: Parachute opening
/// 2: Parachute open
/// 3: Falling to doom (e.g. after exiting parachute)
/// Normal means no parachute?
pub fn GET_PED_PARACHUTE_STATE(ped: types.Ped) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(8777473353230940598)), ped);
}
/// -1: no landing
/// 0: landing on both feet
/// 1: stumbling
/// 2: rolling
/// 3: ragdoll
pub fn GET_PED_PARACHUTE_LANDING_TYPE(ped: types.Ped) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(10060795030760679104)), ped);
}
pub fn SET_PED_PARACHUTE_TINT_INDEX(ped: types.Ped, tintIndex: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3692891062518116742)), ped, tintIndex);
}
pub fn GET_PED_PARACHUTE_TINT_INDEX(ped: types.Ped, outTintIndex: [*c]c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16930710940016209053)), ped, outTintIndex);
}
pub fn SET_PED_RESERVE_PARACHUTE_TINT_INDEX(ped: types.Ped, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16757226213359133357)), ped, p1);
}
/// Used to be known as _CREATE_PARACHUTE_OBJECT
pub fn CREATE_PARACHUTE_BAG_OBJECT(ped: types.Ped, p1: windows.BOOL, p2: windows.BOOL) types.Object {
return nativeCaller.invoke3(@as(u64, @intCast(10110365600034469851)), ped, p1, p2);
}
/// This is the SET_CHAR_DUCKING from GTA IV, that makes Peds duck. This function does nothing in GTA V. It cannot set the ped as ducking in vehicles, and IS_PED_DUCKING will always return false.
pub fn SET_PED_DUCKING(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(218850962977810733)), ped, toggle);
}
pub fn IS_PED_DUCKING(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15070643543572072124)), ped);
}
pub fn IS_PED_IN_ANY_TAXI(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7950926379301386322)), ped);
}
pub fn SET_PED_ID_RANGE(ped: types.Ped, value: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17368105809406184965)), ped, value);
}
pub fn SET_PED_HIGHLY_PERCEPTIVE(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5968846988125144541)), ped, toggle);
}
/// Used to be known as _SET_PED_PERCEPTION_OVERRIDE_THIS_FRAME
pub fn SET_COP_PERCEPTION_OVERRIDES(seeingRange: f32, seeingRangePeripheral: f32, hearingRange: f32, visualFieldMinAzimuthAngle: f32, visualFieldMaxAzimuthAngle: f32, fieldOfGazeMaxAngle: f32, p6: f32) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(3388761427279155870)), seeingRange, seeingRangePeripheral, hearingRange, visualFieldMinAzimuthAngle, visualFieldMaxAzimuthAngle, fieldOfGazeMaxAngle, p6);
}
pub fn SET_PED_INJURED_ON_GROUND_BEHAVIOUR(ped: types.Ped, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17026785535546885418)), ped, p1);
}
pub fn DISABLE_PED_INJURED_ON_GROUND_BEHAVIOUR(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8303661161025552034)), ped);
}
pub fn SET_PED_SEEING_RANGE(ped: types.Ped, value: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17482117859965365486)), ped, value);
}
pub fn SET_PED_HEARING_RANGE(ped: types.Ped, value: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3722497735840494396)), ped, value);
}
pub fn SET_PED_VISUAL_FIELD_MIN_ANGLE(ped: types.Ped, value: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3293417903041420838)), ped, value);
}
pub fn SET_PED_VISUAL_FIELD_MAX_ANGLE(ped: types.Ped, value: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8104574823225119956)), ped, value);
}
/// This native refers to the field of vision the ped has below them, starting at 0 degrees. The angle value should be negative.
/// -90f should let the ped see 90 degrees below them, for example.
pub fn SET_PED_VISUAL_FIELD_MIN_ELEVATION_ANGLE(ped: types.Ped, angle: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8802125710759352079)), ped, angle);
}
/// This native refers to the field of vision the ped has above them, starting at 0 degrees. 90f would let the ped see enemies directly above of them.
pub fn SET_PED_VISUAL_FIELD_MAX_ELEVATION_ANGLE(ped: types.Ped, angle: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8705658698331543638)), ped, angle);
}
pub fn SET_PED_VISUAL_FIELD_PERIPHERAL_RANGE(ped: types.Ped, range: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11273830090915149114)), ped, range);
}
pub fn SET_PED_VISUAL_FIELD_CENTER_ANGLE(ped: types.Ped, angle: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4279552042771720455)), ped, angle);
}
/// Used to be known as _GET_PED_VISUAL_FIELD_CENTER_ANGLE
pub fn GET_PED_VISUAL_FIELD_CENTER_ANGLE(ped: types.Ped) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(17234274819683213245)), ped);
}
/// p1 is usually 0 in the scripts. action is either 0 or a pointer to "DEFAULT_ACTION".
pub fn SET_PED_STEALTH_MOVEMENT(ped: types.Ped, p1: windows.BOOL, action: [*c]const u8) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(9857172108909181906)), ped, p1, action);
}
/// Returns whether the entity is in stealth mode
pub fn GET_PED_STEALTH_MOVEMENT(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8947185480862490559)), ped);
}
/// Creates a new ped group.
/// Groups can contain up to 8 peds.
/// The parameter is unused.
/// Returns a handle to the created group, or 0 if a group couldn't be created.
pub fn CREATE_GROUP(unused: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(10391790874654546493)), unused);
}
pub fn SET_PED_AS_GROUP_LEADER(ped: types.Ped, groupId: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3060223848321776590)), ped, groupId);
}
pub fn SET_PED_AS_GROUP_MEMBER(ped: types.Ped, groupId: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11471935980938408373)), ped, groupId);
}
/// This only will teleport the ped to the group leader if the group leader teleports (sets coords).
/// Only works in singleplayer
pub fn SET_PED_CAN_TELEPORT_TO_GROUP_LEADER(pedHandle: types.Ped, groupHandle: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(3327951495314425415)), pedHandle, groupHandle, toggle);
}
pub fn REMOVE_GROUP(groupId: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10282551999567196243)), groupId);
}
pub fn REMOVE_PED_FROM_GROUP(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17110301433960623042)), ped);
}
pub fn IS_PED_GROUP_MEMBER(ped: types.Ped, groupId: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(11218499898526077329)), ped, groupId);
}
pub fn IS_PED_HANGING_ON_TO_VEHICLE(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2055568525940312952)), ped);
}
/// Sets the range at which members will automatically leave the group.
pub fn SET_GROUP_SEPARATION_RANGE(groupHandle: c_int, separationRange: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4684525938828829924)), groupHandle, separationRange);
}
/// Ped will stay on the ground after being stunned for at lest ms time. (in milliseconds)
pub fn SET_PED_MIN_GROUND_TIME_FOR_STUNGUN(ped: types.Ped, ms: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18016216736995505146)), ped, ms);
}
pub fn IS_PED_PRONE(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15467721985080403897)), ped);
}
/// Checks to see if ped and target are in combat with eachother. Only goes one-way: if target is engaged in combat with ped but ped has not yet reacted, the function will return false until ped starts fighting back.
/// p1 is usually 0 in the scripts because it gets the ped id during the task sequence. For instance: PED::IS_PED_IN_COMBAT(l_42E[4/*14*/], PLAYER::PLAYER_PED_ID()) // armenian2.ct4: 43794
pub fn IS_PED_IN_COMBAT(ped: types.Ped, target: types.Ped) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5213464110014277518)), ped, target);
}
/// Used to be known as _GET_PED_TASK_COMBAT_TARGET
pub fn GET_PED_TARGET_FROM_COMBAT_PED(ped: types.Ped, p1: types.Any) types.Entity {
return nativeCaller.invoke2(@as(u64, @intCast(3657620061624664524)), ped, p1);
}
pub fn CAN_PED_IN_COMBAT_SEE_TARGET(ped: types.Ped, target: types.Ped) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(16921200154546865953)), ped, target);
}
pub fn IS_PED_DOING_DRIVEBY(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12880443145480368831)), ped);
}
pub fn IS_PED_JACKING(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5396719252235051482)), ped);
}
pub fn IS_PED_BEING_JACKED(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11117557767523109139)), ped);
}
/// p1 is always 0
pub fn IS_PED_BEING_STUNNED(ped: types.Ped, p1: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5745129553015312104)), ped, p1);
}
pub fn GET_PEDS_JACKER(ped: types.Ped) types.Ped {
return nativeCaller.invoke1(@as(u64, @intCast(11174149495931667663)), ped);
}
pub fn GET_JACK_TARGET(ped: types.Ped) types.Ped {
return nativeCaller.invoke1(@as(u64, @intCast(6090739841496855597)), ped);
}
pub fn IS_PED_FLEEING(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13532437319132349570)), ped);
}
/// p1 is nearly always 0 in the scripts.
pub fn IS_PED_IN_COVER(ped: types.Ped, exceptUseWeapon: windows.BOOL) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(6980527097275419528)), ped, exceptUseWeapon);
}
pub fn IS_PED_IN_COVER_FACING_LEFT(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9535021680318317483)), ped);
}
/// Used to be known as _IS_PED_STANDING_IN_COVER
pub fn IS_PED_IN_HIGH_COVER(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7639160036357733523)), ped);
}
pub fn IS_PED_GOING_INTO_COVER(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11485828064771152597)), ped);
}
/// i could be time. Only example in the decompiled scripts uses it as -1.
pub fn SET_PED_PINNED_DOWN(ped: types.Ped, pinned: windows.BOOL, i: c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(12310257172164331026)), ped, pinned, i);
}
pub fn _HAS_PED_CLEAR_LOS_TO_ENTITY(ped: types.Ped, entity: types.Entity, x: f32, y: f32, z: f32, p5: c_int, p6: windows.BOOL, p7: windows.BOOL) windows.BOOL {
return nativeCaller.invoke8(@as(u64, @intCast(11757420793947206406)), ped, entity, x, y, z, p5, p6, p7);
}
pub fn GET_SEAT_PED_IS_TRYING_TO_ENTER(ped: types.Ped) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(8019932013815512274)), ped);
}
pub fn GET_VEHICLE_PED_IS_TRYING_TO_ENTER(ped: types.Ped) types.Vehicle {
return nativeCaller.invoke1(@as(u64, @intCast(9317851689464185949)), ped);
}
/// Returns the Entity (Ped, Vehicle, or ?Object?) that killed the 'ped'
/// Is best to check if the Ped is dead before asking for its killer.
/// Used to be known as _GET_PED_KILLER
pub fn GET_PED_SOURCE_OF_DEATH(ped: types.Ped) types.Entity {
return nativeCaller.invoke1(@as(u64, @intCast(10648961764697600652)), ped);
}
/// Returns the hash of the weapon/model/object that killed the ped.
pub fn GET_PED_CAUSE_OF_DEATH(ped: types.Ped) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(1657294059935554649)), ped);
}
/// Used to be known as _GET_PED_TIME_OF_DEATH
pub fn GET_PED_TIME_OF_DEATH(ped: types.Ped) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(2204654383702665610)), ped);
}
pub fn COUNT_PEDS_IN_COMBAT_WITH_TARGET(ped: types.Ped) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(6055009608815376567)), ped);
}
pub fn COUNT_PEDS_IN_COMBAT_WITH_TARGET_WITHIN_RADIUS(ped: types.Ped, x: f32, y: f32, z: f32, radius: f32) c_int {
return nativeCaller.invoke5(@as(u64, @intCast(3705122326269921227)), ped, x, y, z, radius);
}
pub fn SET_PED_RELATIONSHIP_GROUP_DEFAULT_HASH(ped: types.Ped, hash: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12516613898344307176)), ped, hash);
}
pub fn SET_PED_RELATIONSHIP_GROUP_HASH(ped: types.Ped, hash: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14414461841627274642)), ped, hash);
}
/// Sets the relationship between two groups. This should be called twice (once for each group).
/// Relationship types:
/// 0 = Companion
/// 1 = Respect
/// 2 = Like
/// 3 = Neutral
/// 4 = Dislike
/// 5 = Hate
/// 255 = Pedestrians
/// Example:
/// PED::SET_RELATIONSHIP_BETWEEN_GROUPS(2, l_1017, 0xA49E591C);
/// PED::SET_RELATIONSHIP_BETWEEN_GROUPS(2, 0xA49E591C, l_1017);
pub fn SET_RELATIONSHIP_BETWEEN_GROUPS(relationship: c_int, group1: types.Hash, group2: types.Hash) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(13773674009954236333)), relationship, group1, group2);
}
/// Clears the relationship between two groups. This should be called twice (once for each group).
/// Relationship types:
/// 0 = Companion
/// 1 = Respect
/// 2 = Like
/// 3 = Neutral
/// 4 = Dislike
/// 5 = Hate
/// 255 = Pedestrians
/// (Credits: Inco)
/// Example:
/// PED::CLEAR_RELATIONSHIP_BETWEEN_GROUPS(2, l_1017, 0xA49E591C);
/// PED::CLEAR_RELATIONSHIP_BETWEEN_GROUPS(2, 0xA49E591C, l_1017);
pub fn CLEAR_RELATIONSHIP_BETWEEN_GROUPS(relationship: c_int, group1: types.Hash, group2: types.Hash) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(6784994169655903956)), relationship, group1, group2);
}
/// Can't select void. This function returns nothing. The hash of the created relationship group is output in the second parameter.
pub fn ADD_RELATIONSHIP_GROUP(name: [*c]const u8, groupHash: [*c]types.Hash) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(17542290357016364550)), name, groupHash);
}
pub fn REMOVE_RELATIONSHIP_GROUP(groupHash: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13166876337920097698)), groupHash);
}
/// Used to be known as _DOES_RELATIONSHIP_GROUP_EXIST
pub fn DOES_RELATIONSHIP_GROUP_EXIST(groupHash: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14730776764986229233)), groupHash);
}
/// Gets the relationship between two peds. This should be called twice (once for each ped).
/// Relationship types:
/// 0 = Companion
/// 1 = Respect
/// 2 = Like
/// 3 = Neutral
/// 4 = Dislike
/// 5 = Hate
/// 255 = Pedestrians
/// (Credits: Inco)
/// Example:
/// PED::GET_RELATIONSHIP_BETWEEN_PEDS(2, l_1017, 0xA49E591C);
/// PED::GET_RELATIONSHIP_BETWEEN_PEDS(2, 0xA49E591C, l_1017);
pub fn GET_RELATIONSHIP_BETWEEN_PEDS(ped1: types.Ped, ped2: types.Ped) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(16980168434936410401)), ped1, ped2);
}
pub fn GET_PED_RELATIONSHIP_GROUP_DEFAULT_HASH(ped: types.Ped) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(4827244105219302286)), ped);
}
pub fn GET_PED_RELATIONSHIP_GROUP_HASH(ped: types.Ped) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(9060627034653941508)), ped);
}
/// Gets the relationship between two groups. This should be called twice (once for each group).
/// Relationship types:
/// 0 = Companion
/// 1 = Respect
/// 2 = Like
/// 3 = Neutral
/// 4 = Dislike
/// 5 = Hate
/// 255 = Pedestrians
/// Example:
/// PED::GET_RELATIONSHIP_BETWEEN_GROUPS(l_1017, 0xA49E591C);
/// PED::GET_RELATIONSHIP_BETWEEN_GROUPS(0xA49E591C, l_1017);
pub fn GET_RELATIONSHIP_BETWEEN_GROUPS(group1: types.Hash, group2: types.Hash) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(11415340851948334684)), group1, group2);
}
/// Used to be known as _SET_RELATIONSHIP_GROUP_DONT_AFFECT_WANTED_LEVEL
pub fn SET_RELATIONSHIP_GROUP_AFFECTS_WANTED_LEVEL(group: types.Hash, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6203111202431420130)), group, p1);
}
pub fn TELL_GROUP_PEDS_IN_AREA_TO_ATTACK(ped: types.Ped, p1: types.Any, p2: f32, hash: types.Hash, p4: types.Any, p5: types.Any) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(12477180261841127913)), ped, p1, p2, hash, p4, p5);
}
pub fn SET_PED_CAN_BE_TARGETED_WITHOUT_LOS(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4839229034522385521)), ped, toggle);
}
pub fn SET_PED_TO_INFORM_RESPECTED_FRIENDS(ped: types.Ped, radius: f32, maxFriends: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(1236592994736994059)), ped, radius, maxFriends);
}
pub fn IS_PED_RESPONDING_TO_EVENT(ped: types.Ped, event: types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(7087389613169864808)), ped, event);
}
/// Used to be known as _GET_PED_EVENT_DATA
pub fn GET_POS_FROM_FIRED_EVENT(ped: types.Ped, eventType: c_int, outData: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(13431258268292603555)), ped, eventType, outData);
}
/// FIRING_PATTERN_BURST_FIRE = 0xD6FF6D61 ( 1073727030 )
/// FIRING_PATTERN_BURST_FIRE_IN_COVER = 0x026321F1 ( 40051185 )
/// FIRING_PATTERN_BURST_FIRE_DRIVEBY = 0xD31265F2 ( -753768974 )
/// FIRING_PATTERN_FROM_GROUND = 0x2264E5D6 ( 577037782 )
/// FIRING_PATTERN_DELAY_FIRE_BY_ONE_SEC = 0x7A845691 ( 2055493265 )
/// FIRING_PATTERN_FULL_AUTO = 0xC6EE6B4C ( -957453492 )
/// FIRING_PATTERN_SINGLE_SHOT = 0x5D60E4E0 ( 1566631136 )
/// FIRING_PATTERN_BURST_FIRE_PISTOL = 0xA018DB8A ( -1608983670 )
/// FIRING_PATTERN_BURST_FIRE_SMG = 0xD10DADEE ( 1863348768 )
/// FIRING_PATTERN_BURST_FIRE_RIFLE = 0x9C74B406 ( -1670073338 )
/// FIRING_PATTERN_BURST_FIRE_MG = 0xB573C5B4 ( -1250703948 )
/// FIRING_PATTERN_BURST_FIRE_PUMPSHOTGUN = 0x00BAC39B ( 12239771 )
/// FIRING_PATTERN_BURST_FIRE_HELI = 0x914E786F ( -1857128337 )
/// FIRING_PATTERN_BURST_FIRE_MICRO = 0x42EF03FD ( 1122960381 )
/// FIRING_PATTERN_SHORT_BURSTS = 0x1A92D7DF ( 445831135 )
/// FIRING_PATTERN_SLOW_FIRE_TANK = 0xE2CA3A71 ( -490063247 )
/// Firing pattern info: https://pastebin.com/Px036isB
pub fn SET_PED_FIRING_PATTERN(ped: types.Ped, patternHash: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11152451949107533993)), ped, patternHash);
}
/// shootRate 0-1000
pub fn SET_PED_SHOOT_RATE(ped: types.Ped, shootRate: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7011436265342456540)), ped, shootRate);
}
/// combatType can be between 0-14. See GET_COMBAT_FLOAT below for a list of possible parameters.
pub fn SET_COMBAT_FLOAT(ped: types.Ped, combatType: c_int, p2: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(18393181026566117404)), ped, combatType, p2);
}
/// p0: Ped Handle
/// p1: int i | 0 <= i <= 27
/// p1 probably refers to the attributes configured in combatbehavior.meta. There are 13. Example:
/// <BlindFireChance value="0.1"/>
/// <WeaponShootRateModifier value="1.0"/>
/// <TimeBetweenBurstsInCover value="1.25"/>
/// <BurstDurationInCover value="2.0"/>
/// <TimeBetweenPeeks value="10.0"/>
/// <WeaponAccuracy value="0.18"/>
/// <FightProficiency value="0.8"/>
/// <StrafeWhenMovingChance value="1.0"/>
/// <WalkWhenStrafingChance value="0.0"/>
/// <AttackWindowDistanceForCover value="55.0"/>
/// <TimeToInvalidateInjuredTarget value="9.0"/>
/// <TriggerChargeTime_Near value="4.0"/>
/// <TriggerChargeTime_Far value="10.0"/>
/// -------------Confirmed by editing combatbehavior.meta:
/// p1:
/// 0=BlindFireChance
/// 1=BurstDurationInCover
/// 3=TimeBetweenBurstsInCover
/// 4=TimeBetweenPeeks
/// 5=StrafeWhenMovingChance
/// 8=WalkWhenStrafingChance
/// 11=AttackWindowDistanceForCover
/// 12=TimeToInvalidateInjuredTarget
/// 16=OptimalCoverDistance
pub fn GET_COMBAT_FLOAT(ped: types.Ped, p1: c_int) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(5971765001374402826)), ped, p1);
}
/// p1 may be a BOOL representing whether or not the group even exists
pub fn GET_GROUP_SIZE(groupID: c_int, p1: [*c]types.Any, sizeInMembers: [*c]c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(10225035802851711557)), groupID, p1, sizeInMembers);
}
pub fn DOES_GROUP_EXIST(groupId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8965272827573046206)), groupId);
}
/// Returns the group id of which the specified ped is a member of.
pub fn GET_PED_GROUP_INDEX(ped: types.Ped) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(17393712323052938869)), ped);
}
pub fn IS_PED_IN_GROUP(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6382105097986178932)), ped);
}
pub fn GET_PLAYER_PED_IS_FOLLOWING(ped: types.Ped) types.Player {
return nativeCaller.invoke1(@as(u64, @intCast(7654278640865090071)), ped);
}
/// 0: Default
/// 1: Circle Around Leader
/// 2: Alternative Circle Around Leader
/// 3: Line, with Leader at center
pub fn SET_GROUP_FORMATION(groupId: c_int, formationType: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14857198989786123294)), groupId, formationType);
}
pub fn SET_GROUP_FORMATION_SPACING(groupId: c_int, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(2133937666023541014)), groupId, x, y, z);
}
pub fn RESET_GROUP_FORMATION_DEFAULT_SPACING(groupHandle: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7195262145949807109)), groupHandle);
}
/// Gets ID of vehicle player using. It means it can get ID at any interaction with vehicle. Enter\exit for example. And that means it is faster than GET_VEHICLE_PED_IS_IN but less safe.
pub fn GET_VEHICLE_PED_IS_USING(ped: types.Ped) types.Vehicle {
return nativeCaller.invoke1(@as(u64, @intCast(6959377544440096893)), ped);
}
/// Used to be known as SET_EXCLUSIVE_PHONE_RELATIONSHIPS
pub fn GET_VEHICLE_PED_IS_ENTERING(ped: types.Ped) types.Vehicle {
return nativeCaller.invoke1(@as(u64, @intCast(17953197144696923644)), ped);
}
/// enable or disable the gravity of a ped
/// Examples:
/// PED::SET_PED_GRAVITY(PLAYER::PLAYER_PED_ID(), 0x00000001);
/// PED::SET_PED_GRAVITY(Local_289[iVar0 /*20*/], 0x00000001);
pub fn SET_PED_GRAVITY(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11525916196422391306)), ped, toggle);
}
/// damages a ped with the given amount
pub fn APPLY_DAMAGE_TO_PED(ped: types.Ped, damageAmount: c_int, p2: windows.BOOL, p3: types.Any, weaponType: types.Hash) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(7597950592220076244)), ped, damageAmount, p2, p3, weaponType);
}
/// Used to be known as _GET_TIME_OF_LAST_PED_WEAPON_DAMAGE
pub fn GET_TIME_PED_DAMAGED_BY_WEAPON(ped: types.Ped, weaponHash: types.Hash) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(3942756030173659928)), ped, weaponHash);
}
pub fn SET_PED_ALLOWED_TO_DUCK(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15717311443427161711)), ped, toggle);
}
pub fn SET_PED_NEVER_LEAVES_GROUP(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4449491961641677895)), ped, toggle);
}
/// https://alloc8or.re/gta5/doc/enums/ePedType.txt
pub fn GET_PED_TYPE(ped: types.Ped) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(18376267707516577340)), ped);
}
/// Turns the desired ped into a cop. If you use this on the player ped, you will become almost invisible to cops dispatched for you. You will also report your own crimes, get a generic cop voice, get a cop-vision-cone on the radar, and you will be unable to shoot at other cops. SWAT and Army will still shoot at you. Toggling ped as "false" has no effect; you must change p0's ped model to disable the effect.
pub fn SET_PED_AS_COP(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13475829523936935933)), ped, toggle);
}
pub fn SET_PED_HEALTH_PENDING_LAST_DAMAGE_EVENT_OVERRIDE_FLAG(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12913278090757507551)), toggle);
}
/// Sets the maximum health of a ped.
pub fn SET_PED_MAX_HEALTH(ped: types.Ped, value: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17723414459326929363)), ped, value);
}
pub fn GET_PED_MAX_HEALTH(ped: types.Ped) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(5116269594984730355)), ped);
}
pub fn SET_PED_MAX_TIME_IN_WATER(ped: types.Ped, value: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4884243307403809085)), ped, value);
}
pub fn SET_PED_MAX_TIME_UNDERWATER(ped: types.Ped, value: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7756369285497873698)), ped, value);
}
pub fn SET_CORPSE_RAGDOLL_FRICTION(ped: types.Ped, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2825203075280215023)), ped, p1);
}
/// seatIndex must be <= 2
pub fn SET_PED_VEHICLE_FORCED_SEAT_USAGE(ped: types.Ped, vehicle: types.Vehicle, seatIndex: c_int, flags: c_int, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(10749818252643759564)), ped, vehicle, seatIndex, flags, p4);
}
pub fn CLEAR_ALL_PED_VEHICLE_FORCED_SEAT_USAGE(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16630251801833955691)), ped);
}
/// This native does absolutely nothing, just a nullsub
pub fn SET_PED_CAN_BE_KNOCKED_OFF_BIKE(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12862971704959467875)), p0, p1);
}
/// state: https://alloc8or.re/gta5/doc/enums/eKnockOffVehicle.txt
pub fn SET_PED_CAN_BE_KNOCKED_OFF_VEHICLE(ped: types.Ped, state: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8819514170820492360)), ped, state);
}
pub fn CAN_KNOCK_PED_OFF_VEHICLE(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5885087215319473034)), ped);
}
pub fn KNOCK_PED_OFF_VEHICLE(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5024833729465002049)), ped);
}
pub fn SET_PED_COORDS_NO_GANG(ped: types.Ped, posX: f32, posY: f32, posZ: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(9729235227491988039)), ped, posX, posY, posZ);
}
/// from fm_mission_controller.c4 (variable names changed for clarity):
/// int groupID = PLAYER::GET_PLAYER_GROUP(PLAYER::PLAYER_ID());
/// PED::GET_GROUP_SIZE(group, &unused, &groupSize);
/// if (groupSize >= 1) {
/// . . . . for (int memberNumber = 0; memberNumber < groupSize; memberNumber++) {
/// . . . . . . . . Ped ped1 = PED::GET_PED_AS_GROUP_MEMBER(groupID, memberNumber);
/// . . . . . . . . //and so on
pub fn GET_PED_AS_GROUP_MEMBER(groupID: c_int, memberNumber: c_int) types.Ped {
return nativeCaller.invoke2(@as(u64, @intCast(5856179815557885335)), groupID, memberNumber);
}
/// Used to be known as _GET_PED_AS_GROUP_LEADER
pub fn GET_PED_AS_GROUP_LEADER(groupID: c_int) types.Ped {
return nativeCaller.invoke1(@as(u64, @intCast(6687397790089122796)), groupID);
}
pub fn SET_PED_KEEP_TASK(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10888921553773003503)), ped, toggle);
}
pub fn SET_PED_ALLOW_MINOR_REACTIONS_AS_MISSION_PED(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5324675172004059826)), ped, toggle);
}
pub fn IS_PED_SWIMMING(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11376980390135051458)), ped);
}
pub fn IS_PED_SWIMMING_UNDER_WATER(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13845339151829380916)), ped);
}
/// teleports ped to coords along with the vehicle ped is in
pub fn SET_PED_COORDS_KEEP_VEHICLE(ped: types.Ped, posX: f32, posY: f32, posZ: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(11168644811073104686)), ped, posX, posY, posZ);
}
pub fn SET_PED_DIES_IN_VEHICLE(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3040090468580439084)), ped, toggle);
}
pub fn SET_CREATE_RANDOM_COPS(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1165984467287626605)), toggle);
}
pub fn SET_CREATE_RANDOM_COPS_NOT_ON_SCENARIOS(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9964643556797642471)), toggle);
}
pub fn SET_CREATE_RANDOM_COPS_ON_SCENARIOS(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4921510630544283453)), toggle);
}
pub fn CAN_CREATE_RANDOM_COPS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6837250382999549709)));
}
pub fn SET_PED_AS_ENEMY(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(189372676006300666)), ped, toggle);
}
pub fn SET_PED_CAN_SMASH_GLASS(ped: types.Ped, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2075618556141060770)), ped, p1, p2);
}
pub fn IS_PED_IN_ANY_TRAIN(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8040944152950218448)), ped);
}
pub fn IS_PED_GETTING_INTO_A_VEHICLE(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13476506400098240398)), ped);
}
pub fn IS_PED_TRYING_TO_ENTER_A_LOCKED_VEHICLE(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4959181574016202380)), ped);
}
/// ped can not pull out a weapon when true
pub fn SET_ENABLE_HANDCUFFS(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16076435279705359098)), ped, toggle);
}
/// Used with SET_ENABLE_HANDCUFFS in decompiled scripts. From my observations, I have noticed that while being ragdolled you are not able to get up but you can still run. Your legs can also bend.
pub fn SET_ENABLE_BOUND_ANKLES(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14208310939854896174)), ped, toggle);
}
/// Enables diving motion when underwater.
pub fn SET_ENABLE_SCUBA(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17987203189956728070)), ped, toggle);
}
/// Setting ped to true allows the ped to shoot "friendlies".
/// p2 set to true when toggle is also true seams to make peds permanently unable to aim at, even if you set p2 back to false.
/// p1 = false & p2 = false for unable to aim at.
/// p1 = true & p2 = false for able to aim at.
pub fn SET_CAN_ATTACK_FRIENDLY(ped: types.Ped, toggle: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(12948353830549571421)), ped, toggle, p2);
}
/// Returns the ped's alertness (0-3).
/// Values :
/// 0 : Neutral
/// 1 : Heard something (gun shot, hit, etc)
/// 2 : Knows (the origin of the event)
/// 3 : Fully alerted (is facing the event?)
/// If the Ped does not exist, returns -1.
pub fn GET_PED_ALERTNESS(ped: types.Ped) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(17774038143109185490)), ped);
}
/// value ranges from 0 to 3.
pub fn SET_PED_ALERTNESS(ped: types.Ped, value: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15827638201295126950)), ped, value);
}
pub fn SET_PED_GET_OUT_UPSIDE_DOWN_VEHICLE(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13551007203705785282)), ped, toggle);
}
/// transitionSpeed is the time in seconds it takes to transition from one movement clipset to another. ransitionSpeed is usually 1.0f
/// List of movement clipsets:
/// Thanks to elsewhat for list.
/// "ANIM_GROUP_MOVE_BALLISTIC"
/// "ANIM_GROUP_MOVE_LEMAR_ALLEY"
/// "clipset@move@trash_fast_turn"
/// "FEMALE_FAST_RUNNER"
/// "missfbi4prepp1_garbageman"
/// "move_characters@franklin@fire"
/// "move_characters@Jimmy@slow@"
/// "move_characters@michael@fire"
/// "move_f@flee@a"
/// "move_f@scared"
/// "move_f@sexy@a"
/// "move_heist_lester"
/// "move_injured_generic"
/// "move_lester_CaneUp"
/// "move_m@bag"
/// "MOVE_M@BAIL_BOND_NOT_TAZERED"
/// "MOVE_M@BAIL_BOND_TAZERED"
/// "move_m@brave"
/// "move_m@casual@d"
/// "move_m@drunk@moderatedrunk"
/// "MOVE_M@DRUNK@MODERATEDRUNK"
/// "MOVE_M@DRUNK@MODERATEDRUNK_HEAD_UP"
/// "MOVE_M@DRUNK@SLIGHTLYDRUNK"
/// "MOVE_M@DRUNK@VERYDRUNK"
/// "move_m@fire"
/// "move_m@gangster@var_e"
/// "move_m@gangster@var_f"
/// "move_m@gangster@var_i"
/// "move_m@JOG@"
/// "MOVE_M@PRISON_GAURD"
/// "MOVE_P_M_ONE"
/// "MOVE_P_M_ONE_BRIEFCASE"
/// "move_p_m_zero_janitor"
/// "move_p_m_zero_slow"
/// "move_ped_bucket"
/// "move_ped_crouched"
/// "move_ped_mop"
/// "MOVE_M@FEMME@"
/// "MOVE_F@FEMME@"
/// "MOVE_M@GANGSTER@NG"
/// "MOVE_F@GANGSTER@NG"
/// "MOVE_M@POSH@"
/// "MOVE_F@POSH@"
/// "MOVE_M@TOUGH_GUY@"
/// "MOVE_F@TOUGH_GUY@"
/// ~ NotCrunchyTaco
/// Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json
pub fn SET_PED_MOVEMENT_CLIPSET(ped: types.Ped, clipSet: [*c]const u8, transitionSpeed: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(12649086252934573039)), ped, clipSet, transitionSpeed);
}
/// If p1 is 0.0, I believe you are back to normal.
/// If p1 is 1.0, it looks like you can only rotate the ped, not walk.
/// Using the following code to reset back to normal
/// PED::RESET_PED_MOVEMENT_CLIPSET(PLAYER::PLAYER_PED_ID(), 0.0);
pub fn RESET_PED_MOVEMENT_CLIPSET(ped: types.Ped, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12282701622993938988)), ped, p1);
}
/// Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json
pub fn SET_PED_STRAFE_CLIPSET(ped: types.Ped, clipSet: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3000117804892870740)), ped, clipSet);
}
pub fn RESET_PED_STRAFE_CLIPSET(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2328651364711703671)), ped);
}
pub fn SET_PED_WEAPON_MOVEMENT_CLIPSET(ped: types.Ped, clipSet: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2748008704641313954)), ped, clipSet);
}
pub fn RESET_PED_WEAPON_MOVEMENT_CLIPSET(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10930477480769179255)), ped);
}
pub fn SET_PED_DRIVE_BY_CLIPSET_OVERRIDE(ped: types.Ped, clipset: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17092474967677953312)), ped, clipset);
}
pub fn CLEAR_PED_DRIVE_BY_CLIPSET_OVERRIDE(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5403816598616192428)), ped);
}
/// Found in the b617d scripts:
/// PED::SET_PED_MOTION_IN_COVER_CLIPSET_OVERRIDE(v_7, "trevor_heist_cover_2h");
/// Used to be known as _SET_PED_COVER_CLIPSET_OVERRIDE
pub fn SET_PED_MOTION_IN_COVER_CLIPSET_OVERRIDE(ped: types.Ped, p1: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11365414731318294537)), ped, p1);
}
/// Used to be known as _CLEAR_PED_COVER_CLIPSET_OVERRIDE
pub fn CLEAR_PED_MOTION_IN_COVER_CLIPSET_OVERRIDE(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14380440959818096929)), ped);
}
pub fn CLEAR_PED_FALL_UPPER_BODY_CLIPSET_OVERRIDE(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9224864623024467654)), ped);
}
/// PED::SET_PED_IN_VEHICLE_CONTEXT(l_128, MISC::GET_HASH_KEY("MINI_PROSTITUTE_LOW_PASSENGER"));
/// PED::SET_PED_IN_VEHICLE_CONTEXT(l_128, MISC::GET_HASH_KEY("MINI_PROSTITUTE_LOW_RESTRICTED_PASSENGER"));
/// PED::SET_PED_IN_VEHICLE_CONTEXT(l_3212, MISC::GET_HASH_KEY("MISS_FAMILY1_JIMMY_SIT"));
/// PED::SET_PED_IN_VEHICLE_CONTEXT(l_3212, MISC::GET_HASH_KEY("MISS_FAMILY1_JIMMY_SIT_REAR"));
/// PED::SET_PED_IN_VEHICLE_CONTEXT(l_95, MISC::GET_HASH_KEY("MISS_FAMILY2_JIMMY_BICYCLE"));
/// PED::SET_PED_IN_VEHICLE_CONTEXT(num3, MISC::GET_HASH_KEY("MISSFBI2_MICHAEL_DRIVEBY"));
/// PED::SET_PED_IN_VEHICLE_CONTEXT(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("MISS_ARMENIAN3_FRANKLIN_TENSE"));
/// PED::SET_PED_IN_VEHICLE_CONTEXT(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("MISSFBI5_TREVOR_DRIVING"));
pub fn SET_PED_IN_VEHICLE_CONTEXT(ped: types.Ped, context: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5980904727542081734)), ped, context);
}
pub fn RESET_PED_IN_VEHICLE_CONTEXT(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2517389014042947819)), ped);
}
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
pub fn IS_SCRIPTED_SCENARIO_PED_USING_CONDITIONAL_ANIM(ped: types.Ped, animDict: [*c]const u8, anim: [*c]const u8) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(7981638804591337965)), ped, animDict, anim);
}
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
/// Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json
pub fn SET_PED_ALTERNATE_WALK_ANIM(ped: types.Ped, animDict: [*c]const u8, animName: [*c]const u8, p3: f32, p4: windows.BOOL) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(7809304755476848282)), ped, animDict, animName, p3, p4);
}
pub fn CLEAR_PED_ALTERNATE_WALK_ANIM(ped: types.Ped, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9819179782389803497)), ped, p1);
}
/// stance:
/// 0 = idle
/// 1 = walk
/// 2 = running
/// p5 = usually set to true
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
/// Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json
pub fn SET_PED_ALTERNATE_MOVEMENT_ANIM(ped: types.Ped, stance: c_int, animDictionary: [*c]const u8, animationName: [*c]const u8, p4: f32, p5: windows.BOOL) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(10422522243744508742)), ped, stance, animDictionary, animationName, p4, p5);
}
pub fn CLEAR_PED_ALTERNATE_MOVEMENT_ANIM(ped: types.Ped, stance: c_int, p2: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(15623434015562776014)), ped, stance, p2);
}
/// From the scripts:
/// PED::SET_PED_GESTURE_GROUP(PLAYER::PLAYER_PED_ID(),
/// "ANIM_GROUP_GESTURE_MISS_FRA0");
/// PED::SET_PED_GESTURE_GROUP(PLAYER::PLAYER_PED_ID(),
/// "ANIM_GROUP_GESTURE_MISS_DocksSetup1");
pub fn SET_PED_GESTURE_GROUP(ped: types.Ped, animGroupGesture: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15994537613504850600)), ped, animGroupGesture);
}
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
pub fn GET_ANIM_INITIAL_OFFSET_POSITION(animDict: [*c]const u8, animName: [*c]const u8, x: f32, y: f32, z: f32, xRot: f32, yRot: f32, zRot: f32, p8: f32, p9: c_int) types.Vector3 {
return nativeCaller.invoke10(@as(u64, @intCast(13700709201249353792)), animDict, animName, x, y, z, xRot, yRot, zRot, p8, p9);
}
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
pub fn GET_ANIM_INITIAL_OFFSET_ROTATION(animDict: [*c]const u8, animName: [*c]const u8, x: f32, y: f32, z: f32, xRot: f32, yRot: f32, zRot: f32, p8: f32, p9: c_int) types.Vector3 {
return nativeCaller.invoke10(@as(u64, @intCast(5440452117463473735)), animDict, animName, x, y, z, xRot, yRot, zRot, p8, p9);
}
/// Ids
/// 0 - Head
/// 1 - Beard
/// 2 - Hair
/// 3 - Torso
/// 4 - Legs
/// 5 - Hands
/// 6 - Foot
/// 7 - ------
/// 8 - Accessories 1
/// 9 - Accessories 2
/// 10- Decals
/// 11 - Auxiliary parts for torso
pub fn GET_PED_DRAWABLE_VARIATION(ped: types.Ped, componentId: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(7490462606036423932)), ped, componentId);
}
/// List of component/props ID
/// gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html
pub fn GET_NUMBER_OF_PED_DRAWABLE_VARIATIONS(ped: types.Ped, componentId: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(2834476523764480066)), ped, componentId);
}
/// List of component/props ID
/// gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html
pub fn GET_PED_TEXTURE_VARIATION(ped: types.Ped, componentId: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(334205219021784294)), ped, componentId);
}
/// List of component/props ID
/// gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html
pub fn GET_NUMBER_OF_PED_TEXTURE_VARIATIONS(ped: types.Ped, componentId: c_int, drawableId: c_int) c_int {
return nativeCaller.invoke3(@as(u64, @intCast(10336137878209981357)), ped, componentId, drawableId);
}
/// List of component/props ID
/// gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html
pub fn GET_NUMBER_OF_PED_PROP_DRAWABLE_VARIATIONS(ped: types.Ped, propId: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(6894895945445145415)), ped, propId);
}
/// Need to check behavior when drawableId = -1
/// - Doofy.Ass
/// Why this function doesn't work and return nill value?
/// GET_NUMBER_OF_PED_PROP_TEXTURE_VARIATIONS(PLAYER.PLAYER_PED_ID(), 0, 5)
/// tick: scripts/addins/menu_execute.lua:51: attempt to call field 'GET_NUMBER_OF_PED_PROP_TEXTURE_VARIATIONS' (a nil value)
/// List of component/props ID
/// gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html
pub fn GET_NUMBER_OF_PED_PROP_TEXTURE_VARIATIONS(ped: types.Ped, propId: c_int, drawableId: c_int) c_int {
return nativeCaller.invoke3(@as(u64, @intCast(12026847200020783473)), ped, propId, drawableId);
}
/// List of component/props ID
/// gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html
pub fn GET_PED_PALETTE_VARIATION(ped: types.Ped, componentId: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(16419384452682359425)), ped, componentId);
}
pub fn GET_MP_OUTFIT_DATA_FROM_METADATA(p0: [*c]types.Any, p1: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(11398866979184585903)), p0, p1);
}
pub fn GET_FM_MALE_SHOP_PED_APPAREL_ITEM_INDEX(p0: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(2195498746919152716)), p0);
}
pub fn GET_FM_FEMALE_SHOP_PED_APPAREL_ITEM_INDEX(p0: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(17308249935942122216)), p0);
}
/// Checks if the component variation is valid, this works great for randomizing components using loops.
/// List of component/props ID
/// gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html
/// Full list of ped components by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pedComponentVariations.json
pub fn IS_PED_COMPONENT_VARIATION_VALID(ped: types.Ped, componentId: c_int, drawableId: c_int, textureId: c_int) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(16728047655949133597)), ped, componentId, drawableId, textureId);
}
/// paletteId: 0 to 3.
/// componentId:
/// enum ePedVarComp
/// {
/// PV_COMP_INVALID = -1,
/// PV_COMP_HEAD,
/// PV_COMP_BERD,
/// PV_COMP_HAIR,
/// PV_COMP_UPPR,
/// PV_COMP_LOWR,
/// PV_COMP_HAND,
/// PV_COMP_FEET,
/// PV_COMP_TEEF,
/// PV_COMP_ACCS,
/// PV_COMP_TASK,
/// PV_COMP_DECL,
/// PV_COMP_JBIB,
/// PV_COMP_MAX
/// };
/// Examples: https://gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html
/// Full list of ped components by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pedComponentVariations.json
pub fn SET_PED_COMPONENT_VARIATION(ped: types.Ped, componentId: c_int, drawableId: c_int, textureId: c_int, paletteId: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(2750315038012726912)), ped, componentId, drawableId, textureId, paletteId);
}
/// p1 is always 0 in R* scripts.
/// List of component/props ID
/// gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html
pub fn SET_PED_RANDOM_COMPONENT_VARIATION(ped: types.Ped, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14459167355187903528)), ped, p1);
}
/// List of component/props ID
/// gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html
pub fn SET_PED_RANDOM_PROPS(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14144293859224031942)), ped);
}
/// Sets Ped Default Clothes
pub fn SET_PED_DEFAULT_COMPONENT_VARIATION(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5039218013098765667)), ped);
}
pub fn SET_PED_BLEND_FROM_PARENTS(ped: types.Ped, p1: types.Any, p2: types.Any, p3: f32, p4: f32) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(1403923538616627757)), ped, p1, p2, p3, p4);
}
/// The "shape" parameters control the shape of the ped's face. The "skin" parameters control the skin tone. ShapeMix and skinMix control how much the first and second IDs contribute,(typically mother and father.) ThirdMix overrides the others in favor of the third IDs. IsParent is set for "children" of the player character's grandparents during old-gen character creation. It has unknown effect otherwise.
/// The IDs start at zero and go Male Non-DLC, Female Non-DLC, Male DLC, and Female DLC.
/// !!!Can someone add working example for this???
/// try this:
/// headBlendData headData;
/// GET_PED_HEAD_BLEND_DATA(PLAYER_PED_ID(), &headData);
/// SET_PED_HEAD_BLEND_DATA(PLAYER_PED_ID(), headData.shapeFirst, headData.shapeSecond, headData.shapeThird, headData.skinFirst, headData.skinSecond
/// , headData.skinThird, headData.shapeMix, headData.skinMix, headData.skinThird, 0);
/// For more info please refer to this topic.
/// gtaforums.com/topic/858970-all-gtao-face-ids-pedset-ped-head-blend-data-explained
pub fn SET_PED_HEAD_BLEND_DATA(ped: types.Ped, shapeFirstID: c_int, shapeSecondID: c_int, shapeThirdID: c_int, skinFirstID: c_int, skinSecondID: c_int, skinThirdID: c_int, shapeMix: f32, skinMix: f32, thirdMix: f32, isParent: windows.BOOL) void {
_ = nativeCaller.invoke11(@as(u64, @intCast(10670401406750737150)), ped, shapeFirstID, shapeSecondID, shapeThirdID, skinFirstID, skinSecondID, skinThirdID, shapeMix, skinMix, thirdMix, isParent);
}
/// The pointer is to a padded struct that matches the arguments to SET_PED_HEAD_BLEND_DATA(...). There are 4 bytes of padding after each field.
/// pass this struct in the second parameter
/// struct headBlendData
/// {
/// int shapeFirst;
/// int padding1;
/// int shapeSecond;
/// int padding2;
/// int shapeThird;
/// int padding3;
/// int skinFirst;
/// int padding4;
/// int skinSecond;
/// int padding5;
/// int skinThird;
/// int padding6;
/// float shapeMix;
/// int padding7;
/// float skinMix;
/// int padding8;
/// float thirdMix;
/// int padding9;
/// bool isParent;
/// };
/// Used to be known as _GET_PED_HEAD_BLEND_DATA
pub fn GET_PED_HEAD_BLEND_DATA(ped: types.Ped, headBlendData: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(2830157900151113168)), ped, headBlendData);
}
/// See SET_PED_HEAD_BLEND_DATA().
pub fn UPDATE_PED_HEAD_BLEND_DATA(ped: types.Ped, shapeMix: f32, skinMix: f32, thirdMix: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(8229546523778907226)), ped, shapeMix, skinMix, thirdMix);
}
/// Used for freemode (online) characters.
/// For some reason, the scripts use a rounded float for the index.
/// Indexes:
/// 1. black
/// 2. very light blue/green
/// 3. dark blue
/// 4. brown
/// 5. darker brown
/// 6. light brown
/// 7. blue
/// 8. light blue
/// 9. pink
/// 10. yellow
/// 11. purple
/// 12. black
/// 13. dark green
/// 14. light brown
/// 15. yellow/black pattern
/// 16. light colored spiral pattern
/// 17. shiny red
/// 18. shiny half blue/half red
/// 19. half black/half light blue
/// 20. white/red perimter
/// 21. green snake
/// 22. red snake
/// 23. dark blue snake
/// 24. dark yellow
/// 25. bright yellow
/// 26. all black
/// 28. red small pupil
/// 29. devil blue/black
/// 30. white small pupil
/// 31. glossed over
/// Used to be known as _SET_PED_EYE_COLOR
pub fn SET_HEAD_BLEND_EYE_COLOR(ped: types.Ped, index: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5815670529632284639)), ped, index);
}
/// A getter for _SET_PED_EYE_COLOR. Returns -1 if fails to get.
/// Used to be known as _GET_PED_EYE_COLOR
pub fn GET_HEAD_BLEND_EYE_COLOR(ped: types.Ped) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(8555610926633273321)), ped);
}
/// OverlayID ranges from 0 to 12, index from 0 to _GET_NUM_OVERLAY_VALUES(overlayID)-1, and opacity from 0.0 to 1.0.
/// overlayID Part Index, to disable
/// 0 Blemishes 0 - 23, 255
/// 1 Facial Hair 0 - 28, 255
/// 2 Eyebrows 0 - 33, 255
/// 3 Ageing 0 - 14, 255
/// 4 Makeup 0 - 74, 255
/// 5 Blush 0 - 6, 255
/// 6 Complexion 0 - 11, 255
/// 7 Sun Damage 0 - 10, 255
/// 8 Lipstick 0 - 9, 255
/// 9 Moles/Freckles 0 - 17, 255
/// 10 Chest Hair 0 - 16, 255
/// 11 Body Blemishes 0 - 11, 255
/// 12 Add Body Blemishes 0 - 1, 255
pub fn SET_PED_HEAD_OVERLAY(ped: types.Ped, overlayID: c_int, index: c_int, opacity: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(5256907375973354526)), ped, overlayID, index, opacity);
}
/// Likely a char, if that overlay is not set, e.i. "None" option, returns 255;
/// This might be the once removed native GET_PED_HEAD_OVERLAY.
/// Used to be known as _GET_PED_HEAD_OVERLAY_VALUE
pub fn GET_PED_HEAD_OVERLAY(ped: types.Ped, overlayID: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(11965769224155712835)), ped, overlayID);
}
/// Used to be known as _GET_NUM_HEAD_OVERLAY_VALUES
pub fn GET_PED_HEAD_OVERLAY_NUM(overlayID: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(14924057702203344910)), overlayID);
}
/// ColorType is 1 for eyebrows, beards, and chest hair; 2 for blush and lipstick; and 0 otherwise, though not called in those cases.
/// Called after SET_PED_HEAD_OVERLAY().
/// Used to be known as _SET_PED_HEAD_OVERLAY_COLOR
pub fn SET_PED_HEAD_OVERLAY_TINT(ped: types.Ped, overlayID: c_int, colorType: c_int, colorID: c_int, secondColorID: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(5295097686177659218)), ped, overlayID, colorType, colorID, secondColorID);
}
/// Used to be known as _SET_PED_HAIR_COLOR
pub fn SET_PED_HAIR_TINT(ped: types.Ped, colorID: c_int, highlightColorID: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(5548371331445766729)), ped, colorID, highlightColorID);
}
/// Used to be known as _GET_NUM_HAIR_COLORS
pub fn GET_NUM_PED_HAIR_TINTS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(16555460409682481488)));
}
/// Used to be known as _GET_NUM_MAKEUP_COLORS
pub fn GET_NUM_PED_MAKEUP_TINTS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(15129783665620559896)));
}
/// Input: Haircolor index, value between 0 and 63 (inclusive).
/// Output: RGB values for the haircolor specified in the input.
/// This is used with the hair color swatches scaleform.
/// Use `GET_PED_MAKEUP_TINT_COLOR` to get the makeup colors.
/// Used to be known as _GET_HAIR_RGB_COLOR
/// Used to be known as _GET_PED_HAIR_RGB_COLOR
pub fn GET_PED_HAIR_TINT_COLOR(hairColorIndex: c_int, outR: [*c]c_int, outG: [*c]c_int, outB: [*c]c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(5211505038117968821)), hairColorIndex, outR, outG, outB);
}
/// Input: Makeup color index, value between 0 and 63 (inclusive).
/// Output: RGB values for the makeup color specified in the input.
/// This is used with the makeup color swatches scaleform.
/// Use `GET_PED_HAIR_TINT_COLOR` to get the hair colors.
/// Used to be known as _GET_MAKEUP_RGB_COLOR
/// Used to be known as _GET_PED_MAKEUP_RGB_COLOR
pub fn GET_PED_MAKEUP_TINT_COLOR(makeupColorIndex: c_int, outR: [*c]c_int, outG: [*c]c_int, outB: [*c]c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(89611280948482951)), makeupColorIndex, outR, outG, outB);
}
/// Used to be known as _IS_PED_HAIR_COLOR_VALID_2
/// Used to be known as _IS_PED_HAIR_VALID_CREATOR_COLOR
pub fn IS_PED_HAIR_TINT_FOR_CREATOR(colorId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(17108486860360617182)), colorId);
}
/// Used to be known as _GET_DEFAULT_SECONDARY_HAIR_CREATOR_COLOR
pub fn GET_DEFAULT_SECONDARY_TINT_FOR_CREATOR(colorId: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(16904649124889874192)), colorId);
}
/// Used to be known as _IS_PED_LIPSTICK_COLOR_VALID_2
/// Used to be known as _IS_PED_LIPSTICK_VALID_CREATOR_COLOR
pub fn IS_PED_LIPSTICK_TINT_FOR_CREATOR(colorId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4503651381657368180)), colorId);
}
/// Used to be known as _IS_PED_BLUSH_COLOR_VALID_2
/// Used to be known as _IS_PED_BLUSH_VALID_CREATOR_COLOR
pub fn IS_PED_BLUSH_TINT_FOR_CREATOR(colorId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(17589755200512041942)), colorId);
}
/// Used to be known as _IS_PED_HAIR_COLOR_VALID
/// Used to be known as _IS_PED_HAIR_VALID_BARBER_COLOR
pub fn IS_PED_HAIR_TINT_FOR_BARBER(colorID: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16200413632953699361)), colorID);
}
/// Used to be known as _GET_DEFAULT_SECONDARY_HAIR_BARBER_COLOR
pub fn GET_DEFAULT_SECONDARY_TINT_FOR_BARBER(colorID: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(12296695506270806088)), colorID);
}
/// Used to be known as _IS_PED_LIPSTICK_COLOR_VALID
/// Used to be known as _IS_PED_LIPSTICK_VALID_BARBER_COLOR
pub fn IS_PED_LIPSTICK_TINT_FOR_BARBER(colorID: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(370881499881225428)), colorID);
}
/// Used to be known as _IS_PED_BLUSH_COLOR_VALID
/// Used to be known as _IS_PED_BLUSH_VALID_BARBER_COLOR
pub fn IS_PED_BLUSH_TINT_FOR_BARBER(colorID: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6939625919433554521)), colorID);
}
/// Used to be known as _IS_PED_BODY_BLEMISH_VALID
/// Used to be known as _IS_PED_BLUSH_FACEPAINT_VALID_BARBER_COLOR
pub fn IS_PED_BLUSH_FACEPAINT_TINT_FOR_BARBER(colorId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(713799278733668880)), colorId);
}
/// Used to be known as _GET_TINT_OF_HAIR_COMPONENT_VARIATION
pub fn GET_TINT_INDEX_FOR_LAST_GEN_HAIR_TEXTURE(modelHash: types.Hash, drawableId: c_int, textureId: c_int) c_int {
return nativeCaller.invoke3(@as(u64, @intCast(14226799957050793388)), modelHash, drawableId, textureId);
}
/// Sets the various freemode face features, e.g. nose length, chin shape. Scale ranges from -1.0 to 1.0.
/// 0 - Nose Width (Thin/Wide)
/// 1 - Nose Peak (Up/Down)
/// 2 - Nose Length (Long/Short)
/// 3 - Nose Bone Curveness (Crooked/Curved)
/// 4 - Nose Tip (Up/Down)
/// 5 - Nose Bone Twist (Left/Right)
/// 6 - Eyebrow (Up/Down)
/// 7 - Eyebrow (In/Out)
/// 8 - Cheek Bones (Up/Down)
/// 9 - Cheek Sideways Bone Size (In/Out)
/// 10 - Cheek Bones Width (Puffed/Gaunt)
/// 11 - Eye Opening (Both) (Wide/Squinted)
/// 12 - Lip Thickness (Both) (Fat/Thin)
/// 13 - Jaw Bone Width (Narrow/Wide)
/// 14 - Jaw Bone Shape (Round/Square)
/// 15 - Chin Bone (Up/Down)
/// 16 - Chin Bone Length (In/Out or Backward/Forward)
/// 17 - Chin Bone Shape (Pointed/Square)
/// 18 - Chin Hole (Chin Bum)
/// 19 - Neck Thickness (Thin/Thick)
/// Used to be known as _SET_PED_FACE_FEATURE
/// Used to be known as _SET_PED_MICRO_MORPH_VALUE
pub fn SET_PED_MICRO_MORPH(ped: types.Ped, index: c_int, scale: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(8189164646475760798)), ped, index, scale);
}
pub fn HAS_PED_HEAD_BLEND_FINISHED(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7299438516656017713)), ped);
}
pub fn FINALIZE_HEAD_BLEND(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5073542492743713433)), ped);
}
/// p4 seems to vary from 0 to 3.
/// Preview: https://gfycat.com/MaleRareAmazonparrot
pub fn SET_HEAD_BLEND_PALETTE_COLOR(ped: types.Ped, r: c_int, g: c_int, b: c_int, id: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(14742114159531151913)), ped, r, g, b, id);
}
pub fn DISABLE_HEAD_BLEND_PALETTE_COLOR(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11681230797825367810)), ped);
}
/// Type equals 0 for male non-dlc, 1 for female non-dlc, 2 for male dlc, and 3 for female dlc.
/// Used when calling SET_PED_HEAD_BLEND_DATA.
/// Used to be known as _GET_FIRST_PARENT_ID_FOR_PED_TYPE
pub fn GET_PED_HEAD_BLEND_FIRST_INDEX(@"type": c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(7553472996228824588)), @"type");
}
/// Type equals 0 for male non-dlc, 1 for female non-dlc, 2 for male dlc, and 3 for female dlc.
/// Used to be known as _GET_NUM_PARENT_PEDS_OF_TYPE
pub fn GET_PED_HEAD_BLEND_NUM_HEADS(@"type": c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(6841935488603102365)), @"type");
}
/// from extreme3.c4
/// PED::SET_PED_PRELOAD_VARIATION_DATA(PLAYER::PLAYER_PED_ID(), 8, PED::GET_PED_DRAWABLE_VARIATION(PLAYER::PLAYER_PED_ID(), 8), PED::GET_PED_TEXTURE_VARIATION(PLAYER::PLAYER_PED_ID(), 8));
/// p1 is probably componentId
pub fn SET_PED_PRELOAD_VARIATION_DATA(ped: types.Ped, slot: c_int, drawableId: c_int, textureId: c_int) c_int {
return nativeCaller.invoke4(@as(u64, @intCast(4167336407419546170)), ped, slot, drawableId, textureId);
}
pub fn HAS_PED_PRELOAD_VARIATION_DATA_FINISHED(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7379159613508109279)), ped);
}
pub fn RELEASE_PED_PRELOAD_VARIATION_DATA(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6533412922469711254)), ped);
}
/// List of component/props ID
/// gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html
/// Used to be known as _IS_PED_PROP_VALID
pub fn SET_PED_PRELOAD_PROP_DATA(ped: types.Ped, componentId: c_int, drawableId: c_int, TextureId: c_int) c_int {
return nativeCaller.invoke4(@as(u64, @intCast(3104849037912428105)), ped, componentId, drawableId, TextureId);
}
pub fn HAS_PED_PRELOAD_PROP_DATA_FINISHED(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8664928595896049817)), ped);
}
pub fn RELEASE_PED_PRELOAD_PROP_DATA(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17843153898667107866)), ped);
}
/// List of component/props ID
/// gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html
pub fn GET_PED_PROP_INDEX(ped: types.Ped, componentId: c_int, p2: types.Any) c_int {
return nativeCaller.invoke3(@as(u64, @intCast(9911510248128752856)), ped, componentId, p2);
}
/// ComponentId can be set to various things based on what category you're wanting to set
/// enum PedPropsData
/// {
/// PED_PROP_HATS = 0,
/// PED_PROP_GLASSES = 1,
/// PED_PROP_EARS = 2,
/// PED_PROP_WATCHES = 3,
/// };
/// Usage: SET_PED_PROP_INDEX(playerPed, PED_PROP_HATS, GET_NUMBER_OF_PED_PROP_DRAWABLE_VARIATIONS(playerPed, PED_PROP_HATS), GET_NUMBER_OF_PED_PROP_TEXTURE_VARIATIONS(playerPed, PED_PROP_HATS, 0), TRUE);
/// List of component/props ID
/// gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html
pub fn SET_PED_PROP_INDEX(ped: types.Ped, componentId: c_int, drawableId: c_int, TextureId: c_int, attach: windows.BOOL, p5: types.Any) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(10608065531555015519)), ped, componentId, drawableId, TextureId, attach, p5);
}
/// List of component/props ID
/// gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html
pub fn KNOCK_OFF_PED_PROP(ped: types.Ped, p1: windows.BOOL, p2: windows.BOOL, p3: windows.BOOL, p4: windows.BOOL) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(8059052351381659464)), ped, p1, p2, p3, p4);
}
/// List of component/props ID
/// gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html
pub fn CLEAR_PED_PROP(ped: types.Ped, propId: c_int, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(667629751983728494)), ped, propId, p2);
}
/// List of component/props ID
/// gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html
pub fn CLEAR_ALL_PED_PROPS(ped: types.Ped, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14810779206492172038)), ped, p1);
}
pub fn DROP_AMBIENT_PROP(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12678883156603595794)), ped);
}
/// List of component/props ID
/// gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html
pub fn GET_PED_PROP_TEXTURE_INDEX(ped: types.Ped, componentId: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(16226929629455719090)), ped, componentId);
}
pub fn CLEAR_PED_PARACHUTE_PACK_VARIATION(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1333206568589405548)), ped);
}
/// This native sets a scuba mask for freemode models and an oxygen bottle for player_* models. It works on freemode and player_* models.
/// Used to be known as _SET_PED_SCUBA_GEAR_VARIATION
pub fn SET_PED_SCUBA_GEAR_VARIATION(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3947009576675625233)), ped);
}
/// Removes the scubagear (for mp male: component id: 8, drawableId: 123, textureId: any) from peds. Does not play the 'remove scuba gear' animation, but instantly removes it.
/// Used to be known as _REMOVE_PED_SCUBA_GEAR_NOW
pub fn CLEAR_PED_SCUBA_GEAR_VARIATION(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13046563961801475244)), ped);
}
pub fn IS_USING_PED_SCUBA_GEAR_VARIATION(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(18359385338739110705)), p0);
}
/// works with TASK::TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS to make a ped completely oblivious to all events going on around him
pub fn SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11496187148832857076)), ped, toggle);
}
pub fn SET_PED_BOUNDS_ORIENTATION(ped: types.Ped, p1: f32, p2: f32, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(5719401217563149519)), ped, p1, p2, x, y, z);
}
/// PED::REGISTER_TARGET(l_216, PLAYER::PLAYER_PED_ID()); from re_prisonbreak.txt.
/// l_216 = RECSBRobber1
pub fn REGISTER_TARGET(ped: types.Ped, target: types.Ped) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3397360839466220450)), ped, target);
}
/// Based on TASK_COMBAT_HATED_TARGETS_AROUND_PED, the parameters are likely similar (PedHandle, and area to attack in).
pub fn REGISTER_HATED_TARGETS_AROUND_PED(ped: types.Ped, radius: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10530246063284245758)), ped, radius);
}
/// Gets a random ped in the x/y/zRadius near the x/y/z coordinates passed.
/// Ped Types:
/// Any = -1
/// Player = 1
/// Male = 4
/// Female = 5
/// Cop = 6
/// Human = 26
/// SWAT = 27
/// Animal = 28
/// Army = 29
pub fn GET_RANDOM_PED_AT_COORD(x: f32, y: f32, z: f32, xRadius: f32, yRadius: f32, zRadius: f32, pedType: c_int) types.Ped {
return nativeCaller.invoke7(@as(u64, @intCast(9754874484072167196)), x, y, z, xRadius, yRadius, zRadius, pedType);
}
/// Gets the closest ped in a radius.
/// Ped Types:
/// Any ped = -1
/// Player = 1
/// Male = 4
/// Female = 5
/// Cop = 6
/// Human = 26
/// SWAT = 27
/// Animal = 28
/// Army = 29
/// ------------------
/// P4 P5 P7 P8
/// 1 0 x x = return nearest walking Ped
/// 1 x 0 x = return nearest walking Ped
/// x 1 1 x = return Ped you are using
/// 0 0 x x = no effect
/// 0 x 0 x = no effect
/// x = can be 1 or 0. Does not have any obvious changes.
/// This function does not return ped who is:
/// 1. Standing still
/// 2. Driving
/// 3. Fleeing
/// 4. Attacking
/// This function only work if the ped is:
/// 1. walking normally.
/// 2. waiting to cross a road.
/// Note: PED::GET_PED_NEARBY_PEDS works for more peds.
pub fn GET_CLOSEST_PED(x: f32, y: f32, z: f32, radius: f32, p4: windows.BOOL, p5: windows.BOOL, outPed: [*c]types.Ped, p7: windows.BOOL, p8: windows.BOOL, pedType: c_int) windows.BOOL {
return nativeCaller.invoke10(@as(u64, @intCast(14067759205800968548)), x, y, z, radius, p4, p5, outPed, p7, p8, pedType);
}
/// Sets a value indicating whether scenario peds should be returned by the next call to a command that returns peds. Eg. GET_CLOSEST_PED.
pub fn SET_SCENARIO_PEDS_TO_BE_RETURNED_BY_NEXT_COMMAND(value: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1509157256951236382)), value);
}
pub fn GET_CAN_PED_BE_GRABBED_BY_SCRIPT(ped: types.Ped, p1: windows.BOOL, p2: windows.BOOL, p3: windows.BOOL, p4: windows.BOOL, p5: windows.BOOL, p6: windows.BOOL, p7: windows.BOOL, p8: types.Any) windows.BOOL {
return nativeCaller.invoke9(@as(u64, @intCast(282041979060640951)), ped, p1, p2, p3, p4, p5, p6, p7, p8);
}
/// Scripts use 0.2, 0.5 and 1.0. Value must be >= 0.0 && <= 1.0
pub fn SET_DRIVER_RACING_MODIFIER(driver: types.Ped, modifier: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16056932847786963607)), driver, modifier);
}
/// The function specifically verifies the value is equal to, or less than 1.0f. If it is greater than 1.0f, the function does nothing at all.
pub fn SET_DRIVER_ABILITY(driver: types.Ped, ability: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12796415013332960707)), driver, ability);
}
/// range 0.0f - 1.0f
pub fn SET_DRIVER_AGGRESSIVENESS(driver: types.Ped, aggressiveness: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12047680995803024956)), driver, aggressiveness);
}
/// Prevents the ped from going limp.
/// [Example: Can prevent peds from falling when standing on moving vehicles.]
pub fn CAN_PED_RAGDOLL(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1337421676636164053)), ped);
}
/// p4/p5: Unused in TU27
/// Ragdoll Types:
/// **0**: CTaskNMRelax
/// **1**: CTaskNMScriptControl: Hardcoded not to work in networked environments.
/// **Else**: CTaskNMBalance
/// time1- Time(ms) Ped is in ragdoll mode; only applies to ragdoll types 0 and not 1.
/// time2- Unknown time, in milliseconds
/// ragdollType-
/// 0 : Normal ragdoll
/// 1 : Falls with stiff legs/body
/// 2 : Narrow leg stumble(may not fall)
/// 3 : Wide leg stumble(may not fall)
/// p4, p5, p6- No idea. In R*'s scripts they are usually either "true, true, false" or "false, false, false".
/// EDIT 3/11/16: unclear what 'mircoseconds' mean-- a microsecond is 1000x a ms, so time2 must be 1000x time1? more testing needed. -sob
/// Edit Mar 21, 2017: removed part about time2 being the microseconds version of time1. this just isn't correct. time2 is in milliseconds, and time1 and time2 don't seem to be connected in any way.
pub fn SET_PED_TO_RAGDOLL(ped: types.Ped, time1: c_int, time2: c_int, ragdollType: c_int, p4: windows.BOOL, p5: windows.BOOL, p6: windows.BOOL) windows.BOOL {
return nativeCaller.invoke7(@as(u64, @intCast(12581363652839441482)), ped, time1, time2, ragdollType, p4, p5, p6);
}
/// Return variable is never used in R*'s scripts.
/// Not sure what p2 does. It seems like it would be a time judging by it's usage in R*'s scripts, but didn't seem to affect anything in my testings.
/// enum eRagdollType
/// {
/// RD_MALE=0,
/// RD_FEMALE = 1,
/// RD_MALE_LARGE = 2,
/// RD_CUSTOM = 3,
/// }
/// x, y, and z are coordinates, most likely to where the ped will fall.
/// p8 to p13 are always 0f in R*'s scripts.
/// (Simplified) Example of the usage of the function from R*'s scripts:
/// ped::set_ped_to_ragdoll_with_fall(ped, 1500, 2000, 1, -entity::get_entity_forward_vector(ped), 1f, 0f, 0f, 0f, 0f, 0f, 0f);
pub fn SET_PED_TO_RAGDOLL_WITH_FALL(ped: types.Ped, time: c_int, p2: c_int, ragdollType: c_int, x: f32, y: f32, z: f32, velocity: f32, p8: f32, p9: f32, p10: f32, p11: f32, p12: f32, p13: f32) windows.BOOL {
return nativeCaller.invoke14(@as(u64, @intCast(15521149076023895752)), ped, time, p2, ragdollType, x, y, z, velocity, p8, p9, p10, p11, p12, p13);
}
/// Causes Ped to ragdoll on collision with any object (e.g Running into trashcan). If applied to player you will sometimes trip on the sidewalk.
pub fn SET_PED_RAGDOLL_ON_COLLISION(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17340250254854485143)), ped, toggle);
}
/// If the ped handle passed through the parenthesis is in a ragdoll state this will return true.
pub fn IS_PED_RAGDOLL(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5180522170171546453)), ped);
}
pub fn IS_PED_RUNNING_RAGDOLL_TASK(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16408312723812296350)), ped);
}
pub fn SET_PED_RAGDOLL_FORCE_FALL(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(141398619419546193)), ped);
}
pub fn RESET_PED_RAGDOLL_TIMER(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11503431828944865256)), ped);
}
pub fn SET_PED_CAN_RAGDOLL(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12765514099411209770)), ped, toggle);
}
pub fn IS_PED_RUNNING_MELEE_TASK(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15098056418973297879)), ped);
}
pub fn IS_PED_RUNNING_MOBILE_PHONE_TASK(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3098004816684799861)), ped);
}
pub fn IS_MOBILE_PHONE_TO_PED_EAR(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11813881124880795328)), ped);
}
/// Works for both player and peds,
/// enum eRagdollBlockingFlags
/// {
/// RBF_BULLET_IMPACT = 0,
/// RBF_VEHICLE_IMPACT = 1,
/// RBF_FIRE = 2,
/// RBF_ELECTROCUTION = 3,
/// RBF_PLAYER_IMPACT = 4,
/// RBF_EXPLOSION = 5,0
/// RBF_IMPACT_OBJECT = 6,
/// RBF_MELEE = 7,
/// RBF_RUBBER_BULLET = 8,
/// RBF_FALLING = 9,
/// RBF_WATER_JET = 10,
/// RBF_DROWNING = 11,
/// _0x9F52E2C4 = 12,
/// RBF_PLAYER_BUMP = 13,
/// RBF_PLAYER_RAGDOLL_BUMP = 14,
/// RBF_PED_RAGDOLL_BUMP = 15,
/// RBF_VEHICLE_GRAB = 16,
/// RBF_SMOKE_GRENADE = 17,
/// };
/// Used to be known as _SET_PED_RAGDOLL_BLOCKING_FLAGS
pub fn SET_RAGDOLL_BLOCKING_FLAGS(ped: types.Ped, blockingFlag: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2767847656522943876)), ped, blockingFlag);
}
/// See SET_RAGDOLL_BLOCKING_FLAGS for flags
/// Used to be known as _RESET_PED_RAGDOLL_BLOCKING_FLAGS
pub fn CLEAR_RAGDOLL_BLOCKING_FLAGS(ped: types.Ped, blockingFlag: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15595138813470444107)), ped, blockingFlag);
}
pub fn SET_PED_ANGLED_DEFENSIVE_AREA(ped: types.Ped, p1: f32, p2: f32, p3: f32, p4: f32, p5: f32, p6: f32, p7: f32, p8: windows.BOOL, p9: windows.BOOL) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(14409106420996785569)), ped, p1, p2, p3, p4, p5, p6, p7, p8, p9);
}
pub fn SET_PED_SPHERE_DEFENSIVE_AREA(ped: types.Ped, x: f32, y: f32, z: f32, radius: f32, p5: windows.BOOL, p6: windows.BOOL) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(11326924300274321412)), ped, x, y, z, radius, p5, p6);
}
pub fn SET_PED_DEFENSIVE_SPHERE_ATTACHED_TO_PED(ped: types.Ped, target: types.Ped, xOffset: f32, yOffset: f32, zOffset: f32, radius: f32, p6: windows.BOOL) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(17994406204129645886)), ped, target, xOffset, yOffset, zOffset, radius, p6);
}
pub fn SET_PED_DEFENSIVE_SPHERE_ATTACHED_TO_VEHICLE(ped: types.Ped, target: types.Vehicle, xOffset: f32, yOffset: f32, zOffset: f32, radius: f32, p6: windows.BOOL) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(16461287443765054719)), ped, target, xOffset, yOffset, zOffset, radius, p6);
}
pub fn SET_PED_DEFENSIVE_AREA_ATTACHED_TO_PED(ped: types.Ped, attachPed: types.Ped, p2: f32, p3: f32, p4: f32, p5: f32, p6: f32, p7: f32, p8: f32, p9: windows.BOOL, p10: windows.BOOL) void {
_ = nativeCaller.invoke11(@as(u64, @intCast(5689312838294218934)), ped, attachPed, p2, p3, p4, p5, p6, p7, p8, p9, p10);
}
pub fn SET_PED_DEFENSIVE_AREA_DIRECTION(ped: types.Ped, p1: f32, p2: f32, p3: f32, p4: windows.BOOL) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(4700751366107889581)), ped, p1, p2, p3, p4);
}
/// Ped will no longer get angry when you stay near him.
pub fn REMOVE_PED_DEFENSIVE_AREA(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8418600066141671593)), ped, toggle);
}
pub fn GET_PED_DEFENSIVE_AREA_POSITION(ped: types.Ped, p1: windows.BOOL) types.Vector3 {
return nativeCaller.invoke2(@as(u64, @intCast(4325347319514483921)), ped, p1);
}
pub fn IS_PED_DEFENSIVE_AREA_ACTIVE(ped: types.Ped, p1: windows.BOOL) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(13430818199855768135)), ped, p1);
}
pub fn SET_PED_PREFERRED_COVER_SET(ped: types.Ped, itemSet: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9521149805999657401)), ped, itemSet);
}
pub fn REMOVE_PED_PREFERRED_COVER_SET(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18292253124968084441)), ped);
}
/// It will revive/cure the injured ped. The condition is ped must not be dead.
/// Upon setting and converting the health int, found, if health falls below 5, the ped will lay on the ground in pain(Maximum default health is 100).
/// This function is well suited there.
pub fn REVIVE_INJURED_PED(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10199190270953494990)), ped);
}
/// This function will simply bring the dead person back to life.
/// Try not to use it alone, since using this function alone, will make peds fall through ground in hell(well for the most of the times).
/// Instead, before calling this function, you may want to declare the position, where your Resurrected ped to be spawn at.(For instance, Around 2 floats of Player's current position.)
/// Also, disabling any assigned task immediately helped in the number of scenarios, where If you want peds to perform certain decided tasks.
pub fn RESURRECT_PED(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8195582117541601333)), ped);
}
/// NOTE: Debugging functions are not present in the retail version of the game.
/// *untested but char *name could also be a hash for a localized string
pub fn SET_PED_NAME_DEBUG(ped: types.Ped, name: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11020204052071939041)), ped, name);
}
/// Gets the offset the specified ped has moved since the previous tick.
/// If worldSpace is false, the returned offset is relative to the ped. That is, if the ped has moved 1 meter right and 5 meters forward, it'll return 1,5,0.
/// If worldSpace is true, the returned offset is relative to the world. That is, if the ped has moved 1 meter on the X axis and 5 meters on the Y axis, it'll return 1,5,0.
pub fn GET_PED_EXTRACTED_DISPLACEMENT(ped: types.Ped, worldSpace: windows.BOOL) types.Vector3 {
return nativeCaller.invoke2(@as(u64, @intCast(16190230929004791779)), ped, worldSpace);
}
pub fn SET_PED_DIES_WHEN_INJURED(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6604407477447426083)), ped, toggle);
}
pub fn SET_PED_ENABLE_WEAPON_BLOCKING(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10927861562529559037)), ped, toggle);
}
/// p1 was always 1 (true).
/// Kicks the ped from the current vehicle and keeps the rendering-focus on this ped (also disables its collision). If doing this for your player ped, you'll still be able to drive the vehicle.
pub fn SPECIAL_FUNCTION_DO_NOT_USE(ped: types.Ped, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17991023581627738661)), ped, p1);
}
pub fn RESET_PED_VISIBLE_DAMAGE(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4233937496917085189)), ped);
}
pub fn APPLY_PED_BLOOD_DAMAGE_BY_ZONE(ped: types.Ped, p1: types.Any, p2: f32, p3: f32, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(9326789359401956667)), ped, p1, p2, p3, p4);
}
/// woundTypes:
/// - soak_splat
/// - wound_sheet
/// - BulletSmall
/// - BulletLarge
/// - ShotgunSmall
/// - ShotgunSmallMonolithic
/// - ShotgunLarge
/// - ShotgunLargeMonolithic
/// - NonFatalHeadshot
/// - stab
/// - BasicSlash
/// - Scripted_Ped_Splash_Back
/// - BackSplash
pub fn APPLY_PED_BLOOD(ped: types.Ped, boneIndex: c_int, xRot: f32, yRot: f32, zRot: f32, woundType: [*c]const u8) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(9509315551151168038)), ped, boneIndex, xRot, yRot, zRot, woundType);
}
pub fn APPLY_PED_BLOOD_BY_ZONE(ped: types.Ped, p1: c_int, p2: f32, p3: f32, p4: [*c]const u8) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(3679973589918796732)), ped, p1, p2, p3, p4);
}
pub fn APPLY_PED_BLOOD_SPECIFIC(ped: types.Ped, p1: c_int, p2: f32, p3: f32, p4: f32, p5: f32, p6: c_int, p7: f32, p8: [*c]const u8) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(17225521098971257615)), ped, p1, p2, p3, p4, p5, p6, p7, p8);
}
/// enum eDamageZone
/// {
/// DZ_Torso = 0,
/// DZ_Head,
/// DZ_LeftArm,
/// DZ_RightArm,
/// DZ_LeftLeg,
/// DZ_RightLeg,
/// };
/// Decal Names:
/// scar
/// blushing
/// cs_flush_anger
/// cs_flush_anger_face
/// bruise
/// bruise_large
/// herpes
/// ArmorBullet
/// basic_dirt_cloth
/// basic_dirt_skin
/// cs_trev1_dirt
/// APPLY_PED_DAMAGE_DECAL(ped, 1, 0.5f, 0.513f, 0f, 1f, unk, 0, 0, "blushing");
pub fn APPLY_PED_DAMAGE_DECAL(ped: types.Ped, damageZone: c_int, xOffset: f32, yOffset: f32, heading: f32, scale: f32, alpha: f32, variation: c_int, fadeIn: windows.BOOL, decalName: [*c]const u8) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(4142248062138081155)), ped, damageZone, xOffset, yOffset, heading, scale, alpha, variation, fadeIn, decalName);
}
/// Damage Packs:
/// "SCR_TrevorTreeBang"
/// "HOSPITAL_0"
/// "HOSPITAL_1"
/// "HOSPITAL_2"
/// "HOSPITAL_3"
/// "HOSPITAL_4"
/// "HOSPITAL_5"
/// "HOSPITAL_6"
/// "HOSPITAL_7"
/// "HOSPITAL_8"
/// "HOSPITAL_9"
/// "SCR_Dumpster"
/// "BigHitByVehicle"
/// "SCR_Finale_Michael_Face"
/// "SCR_Franklin_finb"
/// "SCR_Finale_Michael"
/// "SCR_Franklin_finb2"
/// "Explosion_Med"
/// "SCR_Torture"
/// "SCR_TracySplash"
/// "Skin_Melee_0"
/// Additional damage packs:
/// gist.github.com/alexguirre/f3f47f75ddcf617f416f3c8a55ae2227
/// Full list of ped damage packs by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pedDamagePacks.json
pub fn APPLY_PED_DAMAGE_PACK(ped: types.Ped, damagePack: [*c]const u8, damage: f32, mult: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(5106960513763051839)), ped, damagePack, damage, mult);
}
pub fn CLEAR_PED_BLOOD_DAMAGE(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10367891578892343319)), ped);
}
/// Somehow related to changing ped's clothes.
pub fn CLEAR_PED_BLOOD_DAMAGE_BY_ZONE(ped: types.Ped, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6261049720308292084)), ped, p1);
}
pub fn HIDE_PED_BLOOD_DAMAGE_BY_ZONE(ped: types.Ped, p1: types.Any, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(7109909689250248156)), ped, p1, p2);
}
/// p1: from 0 to 5 in the b617d scripts.
/// p2: "blushing" and "ALL" found in the b617d scripts.
pub fn CLEAR_PED_DAMAGE_DECAL_BY_ZONE(ped: types.Ped, p1: c_int, p2: [*c]const u8) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(5925745001967143466)), ped, p1, p2);
}
pub fn GET_PED_DECORATIONS_STATE(ped: types.Ped) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(8208571530157315233)), ped);
}
pub fn MARK_PED_DECORATIONS_AS_CLONED_FROM_LOCAL_PLAYER(ped: types.Ped, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3128113866510068116)), ped, p1);
}
/// It clears the wetness of the selected Ped/Player. Clothes have to be wet to notice the difference.
pub fn CLEAR_PED_WETNESS(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11273081024317505150)), ped);
}
/// It adds the wetness level to the player clothing/outfit. As if player just got out from water surface.
pub fn SET_PED_WETNESS_HEIGHT(ped: types.Ped, height: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4957166074485742240)), ped, height);
}
/// combined with PED::SET_PED_WETNESS_HEIGHT(), this native makes the ped drenched in water up to the height specified in the other function
pub fn SET_PED_WETNESS_ENABLED_THIS_FRAME(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13062794386943062041)), ped);
}
pub fn SET_PED_WETNESS(ped: types.Ped, wetLevel: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12397201241077697250)), ped, wetLevel);
}
pub fn CLEAR_PED_ENV_DIRT(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7315492131622376101)), ped);
}
/// Sweat is set to 100.0 or 0.0 in the decompiled scripts.
pub fn SET_PED_SWEAT(ped: types.Ped, sweat: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2859856541646028063)), ped, sweat);
}
/// Applies an Item from a PedDecorationCollection to a ped. These include tattoos and shirt decals.
/// collection - PedDecorationCollection filename hash
/// overlay - Item name hash
/// Example:
/// Entry inside "mpbeach_overlays.xml" -
/// <Item>
/// <uvPos x="0.500000" y="0.500000" />
/// <scale x="0.600000" y="0.500000" />
/// <rotation value="0.000000" />
/// <nameHash>FM_Hair_Fuzz</nameHash>
/// <txdHash>mp_hair_fuzz</txdHash>
/// <txtHash>mp_hair_fuzz</txtHash>
/// <zone>ZONE_HEAD</zone>
/// <type>TYPE_TATTOO</type>
/// <faction>FM</faction>
/// <garment>All</garment>
/// <gender>GENDER_DONTCARE</gender>
/// <award />
/// <awardLevel />
/// </Item>
/// Code:
/// PED::ADD_PED_DECORATION_FROM_HASHES(PLAYER::PLAYER_PED_ID(), MISC::GET_HASH_KEY("mpbeach_overlays"), MISC::GET_HASH_KEY("fm_hair_fuzz"))
/// Full list of ped overlays / decorations by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pedOverlayCollections.json
/// Used to be known as _APPLY_PED_OVERLAY
/// Used to be known as _SET_PED_DECORATION
pub fn ADD_PED_DECORATION_FROM_HASHES(ped: types.Ped, collection: types.Hash, overlay: types.Hash) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(6871673233298597945)), ped, collection, overlay);
}
/// Full list of ped overlays / decorations by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pedOverlayCollections.json
/// Used to be known as _SET_PED_FACIAL_DECORATION
pub fn ADD_PED_DECORATION_FROM_HASHES_IN_CORONA(ped: types.Ped, collection: types.Hash, overlay: types.Hash) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(6204200657692227635)), ped, collection, overlay);
}
/// Returns the zoneID for the overlay if it is a member of collection.
/// enum ePedDecorationZone
/// {
/// ZONE_TORSO = 0,
/// ZONE_HEAD = 1,
/// ZONE_LEFT_ARM = 2,
/// ZONE_RIGHT_ARM = 3,
/// ZONE_LEFT_LEG = 4,
/// ZONE_RIGHT_LEG = 5,
/// ZONE_MEDALS = 6,
/// ZONE_INVALID = 7
/// };
/// Full list of ped overlays / decorations by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/pedOverlayCollections.json
/// Used to be known as _GET_TATTOO_ZONE
pub fn GET_PED_DECORATION_ZONE_FROM_HASHES(collection: types.Hash, overlay: types.Hash) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(11516921130581129867)), collection, overlay);
}
pub fn CLEAR_PED_DECORATIONS(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1031733064081305144)), ped);
}
/// Used to be known as _CLEAR_PED_FACIAL_DECORATIONS
pub fn CLEAR_PED_DECORATIONS_LEAVE_SCARS(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16407315415432929036)), ped);
}
/// Despite this function's name, it simply returns whether the specified handle is a Ped.
pub fn WAS_PED_SKELETON_UPDATED(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1275813652435273049)), ped);
}
/// Gets the position of the specified bone of the specified ped.
/// ped: The ped to get the position of a bone from.
/// boneId: The ID of the bone to get the position from. This is NOT the index.
/// offsetX: The X-component of the offset to add to the position relative to the bone's rotation.
/// offsetY: The Y-component of the offset to add to the position relative to the bone's rotation.
/// offsetZ: The Z-component of the offset to add to the position relative to the bone's rotation.
pub fn GET_PED_BONE_COORDS(ped: types.Ped, boneId: c_int, offsetX: f32, offsetY: f32, offsetZ: f32) types.Vector3 {
return nativeCaller.invoke5(@as(u64, @intCast(1711508347870014286)), ped, boneId, offsetX, offsetY, offsetZ);
}
/// Creates a new NaturalMotion message.
/// startImmediately: If set to true, the character will perform the message the moment it receives it by GIVE_PED_NM_MESSAGE. If false, the Ped will get the message but won't perform it yet. While it's a boolean value, if negative, the message will not be initialized.
/// messageId: The ID of the NaturalMotion message.
/// If a message already exists, this function does nothing. A message exists until the point it has been successfully dispatched by GIVE_PED_NM_MESSAGE.
pub fn CREATE_NM_MESSAGE(startImmediately: windows.BOOL, messageId: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4723979835631036037)), startImmediately, messageId);
}
/// Sends the message that was created by a call to CREATE_NM_MESSAGE to the specified Ped.
/// If a message hasn't been created already, this function does nothing.
/// If the Ped is not ragdolled with Euphoria enabled, this function does nothing.
/// The following call can be used to ragdoll the Ped with Euphoria enabled: SET_PED_TO_RAGDOLL(ped, 4000, 5000, 1, 1, 1, 0);
/// Call order:
/// SET_PED_TO_RAGDOLL
/// CREATE_NM_MESSAGE
/// GIVE_PED_NM_MESSAGE
/// Multiple messages can be chained. Eg. to make the ped stagger and swing his arms around, the following calls can be made:
/// SET_PED_TO_RAGDOLL(ped, 4000, 5000, 1, 1, 1, 0);
/// CREATE_NM_MESSAGE(true, 0); // stopAllBehaviours - Stop all other behaviours, in case the Ped is already doing some Euphoria stuff.
/// GIVE_PED_NM_MESSAGE(ped); // Dispatch message to Ped.
/// CREATE_NM_MESSAGE(true, 1151); // staggerFall - Attempt to walk while falling.
/// GIVE_PED_NM_MESSAGE(ped); // Dispatch message to Ped.
/// CREATE_NM_MESSAGE(true, 372); // armsWindmill - Swing arms around.
/// GIVE_PED_NM_MESSAGE(ped); // Dispatch message to Ped.
pub fn GIVE_PED_NM_MESSAGE(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12779210013242448987)), ped);
}
pub fn ADD_SCENARIO_BLOCKING_AREA(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, p6: windows.BOOL, p7: windows.BOOL, p8: windows.BOOL, p9: windows.BOOL, p10: types.Any) c_int {
return nativeCaller.invoke11(@as(u64, @intCast(1971597822648460654)), x1, y1, z1, x2, y2, z2, p6, p7, p8, p9, p10);
}
pub fn REMOVE_SCENARIO_BLOCKING_AREAS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(15236805464555690569)));
}
pub fn REMOVE_SCENARIO_BLOCKING_AREA(p0: types.Any, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3589768527288114534)), p0, p1);
}
pub fn SET_SCENARIO_PEDS_SPAWN_IN_SPHERE_AREA(x: f32, y: f32, z: f32, range: f32, p4: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(2888352466223499649)), x, y, z, range, p4);
}
/// Used to be known as _DOES_SCENARIO_BLOCKING_AREA_EXIST
pub fn DOES_SCENARIO_BLOCKING_AREA_EXISTS(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(9954275036337907645)), x1, y1, z1, x2, y2, z2);
}
/// Full list of ped scenarios by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenariosCompact.json
pub fn IS_PED_USING_SCENARIO(ped: types.Ped, scenario: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(2013272256919514158)), ped, scenario);
}
pub fn IS_PED_USING_ANY_SCENARIO(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6317224474499895619)), ped);
}
pub fn SET_PED_PANIC_EXIT_SCENARIO(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(18304880017946258986)), p0, p1, p2, p3);
}
/// Used to be known as _SET_PED_SCARED_WHEN_USING_SCENARIO
pub fn TOGGLE_SCENARIO_PED_COWER_IN_PLACE(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11130611099620252425)), ped, toggle);
}
pub fn TRIGGER_PED_SCENARIO_PANICEXITTOFLEE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(2681359863467467801)), p0, p1, p2, p3);
}
/// Used to be known as _SET_PED_SHOULD_PLAY_DIRECTED_SCENARIO_EXIT
pub fn SET_PED_SHOULD_PLAY_DIRECTED_NORMAL_SCENARIO_EXIT(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(17035206352705977232)), p0, p1, p2, p3);
}
pub fn SET_PED_SHOULD_PLAY_NORMAL_SCENARIO_EXIT(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11793002850566200216)), ped);
}
pub fn SET_PED_SHOULD_PLAY_IMMEDIATE_SCENARIO_EXIT(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17419987488203881008)), ped);
}
pub fn SET_PED_SHOULD_PLAY_FLEE_SCENARIO_EXIT(ped: types.Ped, p1: types.Any, p2: types.Any, p3: types.Any) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(17216574936252095088)), ped, p1, p2, p3);
}
pub fn SET_PED_SHOULD_IGNORE_SCENARIO_EXIT_COLLISION_CHECKS(ped: types.Ped, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4781394475973230408)), ped, p1);
}
pub fn SET_PED_SHOULD_IGNORE_SCENARIO_NAV_CHECKS(p0: types.Any, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6584281019619381397)), p0, p1);
}
pub fn SET_PED_SHOULD_PROBE_FOR_SCENARIO_EXITS_IN_ONE_FRAME(p0: types.Any, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14905332188220870756)), p0, p1);
}
pub fn IS_PED_GESTURING(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14054567779070471187)), p0);
}
pub fn RESET_FACIAL_IDLE_ANIM(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(35991802193896486)), ped);
}
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
pub fn PLAY_FACIAL_ANIM(ped: types.Ped, animName: [*c]const u8, animDict: [*c]const u8) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(16277799782697402605)), ped, animName, animDict);
}
/// Clipsets:
/// facials@gen_female@base
/// facials@gen_male@base
/// facials@p_m_zero@base
/// Typically followed with SET_FACIAL_IDLE_ANIM_OVERRIDE:
/// mood_drunk_1
/// mood_stressed_1
/// mood_happy_1
/// mood_talking_1
/// Used to be known as _SET_FACIAL_CLIPSET_OVERRIDE
pub fn SET_FACIAL_CLIPSET(ped: types.Ped, animDict: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6235172044254340097)), ped, animDict);
}
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
pub fn SET_FACIAL_IDLE_ANIM_OVERRIDE(ped: types.Ped, animName: [*c]const u8, animDict: [*c]const u8) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(18429375743702305592)), ped, animName, animDict);
}
pub fn CLEAR_FACIAL_IDLE_ANIM_OVERRIDE(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8242245702733469743)), ped);
}
pub fn SET_PED_CAN_PLAY_GESTURE_ANIMS(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13470842991174582308)), ped, toggle);
}
/// p2 usually 0
pub fn SET_PED_CAN_PLAY_VISEME_ANIMS(ped: types.Ped, toggle: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(17884882337142951235)), ped, toggle, p2);
}
/// Used to be known as _SET_PED_CAN_PLAY_INJURED_ANIMS
pub fn SET_PED_IS_IGNORED_BY_AUTO_OPEN_DOORS(ped: types.Ped, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3721677036434903180)), ped, p1);
}
pub fn SET_PED_CAN_PLAY_AMBIENT_ANIMS(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7166301455914477326)), ped, toggle);
}
pub fn SET_PED_CAN_PLAY_AMBIENT_BASE_ANIMS(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1058443069242033984)), ped, toggle);
}
pub fn TRIGGER_IDLE_ANIMATION_ON_PED(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14046166552868608851)), ped);
}
pub fn SET_PED_CAN_ARM_IK(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7798912310599534657)), ped, toggle);
}
pub fn SET_PED_CAN_HEAD_IK(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13915023376345542876)), ped, toggle);
}
pub fn SET_PED_CAN_LEG_IK(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8309579803502395691)), ped, toggle);
}
pub fn SET_PED_CAN_TORSO_IK(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17489465739186568416)), ped, toggle);
}
pub fn SET_PED_CAN_TORSO_REACT_IK(ped: types.Ped, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17691387123743689252)), ped, p1);
}
pub fn SET_PED_CAN_TORSO_VEHICLE_IK(ped: types.Ped, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7370076979686089878)), ped, p1);
}
pub fn SET_PED_CAN_USE_AUTO_CONVERSATION_LOOKAT(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17025443789596214904)), ped, toggle);
}
pub fn IS_PED_HEADTRACKING_PED(ped1: types.Ped, ped2: types.Ped) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(6688913659369391373)), ped1, ped2);
}
pub fn IS_PED_HEADTRACKING_ENTITY(ped: types.Ped, entity: types.Entity) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(9311766709871215391)), ped, entity);
}
/// This is only called once in the scripts.
/// sub_1CD9(&l_49, 0, getElem(3, &l_34, 4), "MICHAEL", 0, 1);
/// sub_1CA8("WORLD_HUMAN_SMOKING", 2);
/// PED::SET_PED_PRIMARY_LOOKAT(getElem(3, &l_34, 4), PLAYER::PLAYER_PED_ID());
pub fn SET_PED_PRIMARY_LOOKAT(ped: types.Ped, lookAt: types.Ped) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14778480077195349406)), ped, lookAt);
}
/// Used to be known as SET_PED_CLOTH_PACKAGE_INDEX
pub fn SET_PED_CLOTH_PIN_FRAMES(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8702337210939337563)), p0, p1);
}
/// Used to be known as SET_PED_CLOTH_PRONE
pub fn SET_PED_CLOTH_PACKAGE_INDEX(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9413603877056198883)), p0, p1);
}
pub fn SET_PED_CLOTH_PRONE(p0: types.Any, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11988858139591784421)), p0, p1);
}
/// enum ePedConfigFlags
/// {
/// _CPED_CONFIG_FLAG_0xC63DE95E = 1,
/// CPED_CONFIG_FLAG_NoCriticalHits = 2,
/// CPED_CONFIG_FLAG_DrownsInWater = 3,
/// CPED_CONFIG_FLAG_DisableReticuleFixedLockon = 4,
/// _CPED_CONFIG_FLAG_0x37D196F4 = 5,
/// _CPED_CONFIG_FLAG_0xE2462399 = 6,
/// CPED_CONFIG_FLAG_UpperBodyDamageAnimsOnly = 7,
/// _CPED_CONFIG_FLAG_0xEDDEB838 = 8,
/// _CPED_CONFIG_FLAG_0xB398B6FD = 9,
/// _CPED_CONFIG_FLAG_0xF6664E68 = 10,
/// _CPED_CONFIG_FLAG_0xA05E7CA3 = 11,
/// _CPED_CONFIG_FLAG_0xCE394045 = 12,
/// CPED_CONFIG_FLAG_NeverLeavesGroup = 13,
/// _CPED_CONFIG_FLAG_0xCD8D1411 = 14,
/// _CPED_CONFIG_FLAG_0xB031F1A9 = 15,
/// _CPED_CONFIG_FLAG_0xFE65BEE3 = 16,
/// CPED_CONFIG_FLAG_BlockNonTemporaryEvents = 17,
/// _CPED_CONFIG_FLAG_0x380165BD = 18,
/// _CPED_CONFIG_FLAG_0x07C045C7 = 19,
/// _CPED_CONFIG_FLAG_0x583B5E2D = 20,
/// _CPED_CONFIG_FLAG_0x475EDA58 = 21,
/// _CPED_CONFIG_FLAG_0x8629D05B = 22,
/// _CPED_CONFIG_FLAG_0x1522968B = 23,
/// CPED_CONFIG_FLAG_IgnoreSeenMelee = 24,
/// _CPED_CONFIG_FLAG_0x4CC09C4B = 25,
/// _CPED_CONFIG_FLAG_0x034F3053 = 26,
/// _CPED_CONFIG_FLAG_0xD91BA7CC = 27,
/// _CPED_CONFIG_FLAG_0x5C8DC66E = 28,
/// CPED_CONFIG_FLAG_GetOutUndriveableVehicle = 29,
/// _CPED_CONFIG_FLAG_0x6580B9D2 = 30,
/// _CPED_CONFIG_FLAG_0x0EF7A297 = 31,
/// CPED_CONFIG_FLAG_WillFlyThruWindscreen = 32,
/// CPED_CONFIG_FLAG_DieWhenRagdoll = 33,
/// CPED_CONFIG_FLAG_HasHelmet = 34,
/// CPED_CONFIG_FLAG_UseHelmet = 35,
/// CPED_CONFIG_FLAG_DontTakeOffHelmet = 36,
/// _CPED_CONFIG_FLAG_0xB130D17B = 37,
/// _CPED_CONFIG_FLAG_0x5F071200 = 38,
/// CPED_CONFIG_FLAG_DisableEvasiveDives = 39,
/// _CPED_CONFIG_FLAG_0xC287AAFF = 40,
/// _CPED_CONFIG_FLAG_0x203328CC = 41,
/// CPED_CONFIG_FLAG_DontInfluenceWantedLevel = 42,
/// CPED_CONFIG_FLAG_DisablePlayerLockon = 43,
/// CPED_CONFIG_FLAG_DisableLockonToRandomPeds = 44,
/// CPED_CONFIG_FLAG_AllowLockonToFriendlyPlayers = 45,
/// _CPED_CONFIG_FLAG_0xDB115BFA = 46,
/// CPED_CONFIG_FLAG_PedBeingDeleted = 47,
/// CPED_CONFIG_FLAG_BlockWeaponSwitching = 48,
/// _CPED_CONFIG_FLAG_0xF8E99565 = 49,
/// _CPED_CONFIG_FLAG_0xDD17FEE6 = 50,
/// _CPED_CONFIG_FLAG_0x7ED9B2C9 = 51,
/// _CPED_CONFIG_FLAG_NoCollison = 52,
/// _CPED_CONFIG_FLAG_0x5A6C1F6E = 53,
/// _CPED_CONFIG_FLAG_0xD749FC41 = 54,
/// _CPED_CONFIG_FLAG_0x357F63F3 = 55,
/// _CPED_CONFIG_FLAG_0xC5E60961 = 56,
/// _CPED_CONFIG_FLAG_0x29275C3E = 57,
/// CPED_CONFIG_FLAG_IsFiring = 58,
/// CPED_CONFIG_FLAG_WasFiring = 59,
/// CPED_CONFIG_FLAG_IsStanding = 60,
/// CPED_CONFIG_FLAG_WasStanding = 61,
/// CPED_CONFIG_FLAG_InVehicle = 62,
/// CPED_CONFIG_FLAG_OnMount = 63,
/// CPED_CONFIG_FLAG_AttachedToVehicle = 64,
/// CPED_CONFIG_FLAG_IsSwimming = 65,
/// CPED_CONFIG_FLAG_WasSwimming = 66,
/// CPED_CONFIG_FLAG_IsSkiing = 67,
/// CPED_CONFIG_FLAG_IsSitting = 68,
/// CPED_CONFIG_FLAG_KilledByStealth = 69,
/// CPED_CONFIG_FLAG_KilledByTakedown = 70,
/// CPED_CONFIG_FLAG_Knockedout = 71,
/// _CPED_CONFIG_FLAG_0x3E3C4560 = 72,
/// _CPED_CONFIG_FLAG_0x2994C7B7 = 73,
/// _CPED_CONFIG_FLAG_0x6D59D275 = 74,
/// CPED_CONFIG_FLAG_UsingCoverPoint = 75,
/// CPED_CONFIG_FLAG_IsInTheAir = 76,
/// _CPED_CONFIG_FLAG_0x2D493FB7 = 77,
/// CPED_CONFIG_FLAG_IsAimingGun = 78,
/// _CPED_CONFIG_FLAG_0x14D69875 = 79,
/// _CPED_CONFIG_FLAG_0x40B05311 = 80,
/// _CPED_CONFIG_FLAG_0x8B230BC5 = 81,
/// _CPED_CONFIG_FLAG_0xC74E5842 = 82,
/// _CPED_CONFIG_FLAG_0x9EA86147 = 83,
/// _CPED_CONFIG_FLAG_0x674C746C = 84,
/// _CPED_CONFIG_FLAG_0x3E56A8C2 = 85,
/// _CPED_CONFIG_FLAG_0xC144A1EF = 86,
/// _CPED_CONFIG_FLAG_0x0548512D = 87,
/// _CPED_CONFIG_FLAG_0x31C93909 = 88,
/// _CPED_CONFIG_FLAG_0xA0269315 = 89,
/// _CPED_CONFIG_FLAG_0xD4D59D4D = 90,
/// _CPED_CONFIG_FLAG_0x411D4420 = 91,
/// _CPED_CONFIG_FLAG_0xDF4AEF0D = 92,
/// CPED_CONFIG_FLAG_ForcePedLoadCover = 93,
/// _CPED_CONFIG_FLAG_0x300E4CD3 = 94,
/// _CPED_CONFIG_FLAG_0xF1C5BF04 = 95,
/// _CPED_CONFIG_FLAG_0x89C2EF13 = 96,
/// CPED_CONFIG_FLAG_VaultFromCover = 97,
/// _CPED_CONFIG_FLAG_0x02A852C8 = 98,
/// _CPED_CONFIG_FLAG_0x3D9407F1 = 99,
/// _CPED_CONFIG_FLAG_IsDrunk = 100, // 0x319B4558
/// CPED_CONFIG_FLAG_ForcedAim = 101,
/// _CPED_CONFIG_FLAG_0xB942D71A = 102,
/// _CPED_CONFIG_FLAG_0xD26C55A8 = 103,
/// CPED_CONFIG_FLAG_OpenDoorArmIK = 104,
/// CPED_CONFIG_FLAG_ForceReload = 105,
/// CPED_CONFIG_FLAG_DontActivateRagdollFromVehicleImpact = 106,
/// CPED_CONFIG_FLAG_DontActivateRagdollFromBulletImpact = 107,
/// CPED_CONFIG_FLAG_DontActivateRagdollFromExplosions = 108,
/// CPED_CONFIG_FLAG_DontActivateRagdollFromFire = 109,
/// CPED_CONFIG_FLAG_DontActivateRagdollFromElectrocution = 110,
/// _CPED_CONFIG_FLAG_0x83C0A4BF = 111,
/// _CPED_CONFIG_FLAG_0x0E0FAF8C = 112,
/// CPED_CONFIG_FLAG_KeepWeaponHolsteredUnlessFired = 113,
/// _CPED_CONFIG_FLAG_0x43B80B79 = 114,
/// _CPED_CONFIG_FLAG_0x0D2A9309 = 115,
/// CPED_CONFIG_FLAG_GetOutBurningVehicle = 116,
/// CPED_CONFIG_FLAG_BumpedByPlayer = 117,
/// CPED_CONFIG_FLAG_RunFromFiresAndExplosions = 118,
/// CPED_CONFIG_FLAG_TreatAsPlayerDuringTargeting = 119,
/// CPED_CONFIG_FLAG_IsHandCuffed = 120,
/// CPED_CONFIG_FLAG_IsAnkleCuffed = 121,
/// CPED_CONFIG_FLAG_DisableMelee = 122,
/// CPED_CONFIG_FLAG_DisableUnarmedDrivebys = 123,
/// CPED_CONFIG_FLAG_JustGetsPulledOutWhenElectrocuted = 124,
/// _CPED_CONFIG_FLAG_0x5FED6BFD = 125,
/// CPED_CONFIG_FLAG_WillNotHotwireLawEnforcementVehicle = 126,
/// CPED_CONFIG_FLAG_WillCommandeerRatherThanJack = 127,
/// CPED_CONFIG_FLAG_CanBeAgitated = 128,
/// CPED_CONFIG_FLAG_ForcePedToFaceLeftInCover = 129,
/// CPED_CONFIG_FLAG_ForcePedToFaceRightInCover = 130,
/// CPED_CONFIG_FLAG_BlockPedFromTurningInCover = 131,
/// CPED_CONFIG_FLAG_KeepRelationshipGroupAfterCleanUp = 132,
/// CPED_CONFIG_FLAG_ForcePedToBeDragged = 133,
/// CPED_CONFIG_FLAG_PreventPedFromReactingToBeingJacked = 134,
/// CPED_CONFIG_FLAG_IsScuba = 135,
/// CPED_CONFIG_FLAG_WillArrestRatherThanJack = 136,
/// CPED_CONFIG_FLAG_RemoveDeadExtraFarAway = 137,
/// CPED_CONFIG_FLAG_RidingTrain = 138,
/// CPED_CONFIG_FLAG_ArrestResult = 139,
/// CPED_CONFIG_FLAG_CanAttackFriendly = 140,
/// CPED_CONFIG_FLAG_WillJackAnyPlayer = 141,
/// _CPED_CONFIG_FLAG_0x6901E731 = 142,
/// _CPED_CONFIG_FLAG_0x9EC9BF6C = 143,
/// CPED_CONFIG_FLAG_WillJackWantedPlayersRatherThanStealCar = 144,
/// CPED_CONFIG_FLAG_ShootingAnimFlag = 145,
/// CPED_CONFIG_FLAG_DisableLadderClimbing = 146,
/// CPED_CONFIG_FLAG_StairsDetected = 147,
/// CPED_CONFIG_FLAG_SlopeDetected = 148,
/// _CPED_CONFIG_FLAG_0x1A15670B = 149,
/// CPED_CONFIG_FLAG_CowerInsteadOfFlee = 150,
/// CPED_CONFIG_FLAG_CanActivateRagdollWhenVehicleUpsideDown = 151,
/// CPED_CONFIG_FLAG_AlwaysRespondToCriesForHelp = 152,
/// CPED_CONFIG_FLAG_DisableBloodPoolCreation = 153,
/// CPED_CONFIG_FLAG_ShouldFixIfNoCollision = 154,
/// CPED_CONFIG_FLAG_CanPerformArrest = 155,
/// CPED_CONFIG_FLAG_CanPerformUncuff = 156,
/// CPED_CONFIG_FLAG_CanBeArrested = 157,
/// _CPED_CONFIG_FLAG_0xF7960FF5 = 158,
/// CPED_CONFIG_FLAG_PlayerPreferFrontSeatMP = 159,
/// _CPED_CONFIG_FLAG_0x0C6C3099 = 160,
/// _CPED_CONFIG_FLAG_0x645F927A = 161,
/// _CPED_CONFIG_FLAG_0xA86549B9 = 162,
/// _CPED_CONFIG_FLAG_0x8AAF337A = 163,
/// _CPED_CONFIG_FLAG_0x13BAA6E7 = 164,
/// _CPED_CONFIG_FLAG_0x5FB9D1F5 = 165,
/// CPED_CONFIG_FLAG_IsInjured = 166,
/// CPED_CONFIG_FLAG_DontEnterVehiclesInPlayersGroup = 167,
/// _CPED_CONFIG_FLAG_0xD8072639 = 168,
/// CPED_CONFIG_FLAG_PreventAllMeleeTaunts = 169,
/// CPED_CONFIG_FLAG_ForceDirectEntry = 170,
/// CPED_CONFIG_FLAG_AlwaysSeeApproachingVehicles = 171,
/// CPED_CONFIG_FLAG_CanDiveAwayFromApproachingVehicles = 172,
/// CPED_CONFIG_FLAG_AllowPlayerToInterruptVehicleEntryExit = 173,
/// CPED_CONFIG_FLAG_OnlyAttackLawIfPlayerIsWanted = 174,
/// _CPED_CONFIG_FLAG_0x90008BFA = 175,
/// _CPED_CONFIG_FLAG_0x07C7A910 = 176,
/// CPED_CONFIG_FLAG_PedsJackingMeDontGetIn = 177,
/// _CPED_CONFIG_FLAG_0xCE4E8BE2 = 178,
/// CPED_CONFIG_FLAG_PedIgnoresAnimInterruptEvents = 179,
/// CPED_CONFIG_FLAG_IsInCustody = 180,
/// CPED_CONFIG_FLAG_ForceStandardBumpReactionThresholds = 181,
/// CPED_CONFIG_FLAG_LawWillOnlyAttackIfPlayerIsWanted = 182,
/// CPED_CONFIG_FLAG_IsAgitated = 183,
/// CPED_CONFIG_FLAG_PreventAutoShuffleToDriversSeat = 184,
/// CPED_CONFIG_FLAG_UseKinematicModeWhenStationary = 185,
/// CPED_CONFIG_FLAG_EnableWeaponBlocking = 186,
/// CPED_CONFIG_FLAG_HasHurtStarted = 187,
/// CPED_CONFIG_FLAG_DisableHurt = 188,
/// CPED_CONFIG_FLAG_PlayerIsWeird = 189,
/// _CPED_CONFIG_FLAG_0x32FC208B = 190,
/// _CPED_CONFIG_FLAG_0x0C296E5A = 191,
/// _CPED_CONFIG_FLAG_0xE63B73EC = 192,
/// CPED_CONFIG_FLAG_DoNothingWhenOnFootByDefault = 193,
/// CPED_CONFIG_FLAG_UsingScenario = 194,
/// CPED_CONFIG_FLAG_VisibleOnScreen = 195,
/// _CPED_CONFIG_FLAG_0xD88C58A1 = 196,
/// _CPED_CONFIG_FLAG_0x5A3DCF43 = 197,
/// _CPED_CONFIG_FLAG_0xEA02B420 = 198,
/// CPED_CONFIG_FLAG_DontActivateRagdollOnVehicleCollisionWhenDead = 199,
/// CPED_CONFIG_FLAG_HasBeenInArmedCombat = 200,
/// _CPED_CONFIG_FLAG_0x5E6466F6 = 201,
/// CPED_CONFIG_FLAG_Avoidance_Ignore_All = 202,
/// CPED_CONFIG_FLAG_Avoidance_Ignored_by_All = 203,
/// CPED_CONFIG_FLAG_Avoidance_Ignore_Group1 = 204,
/// CPED_CONFIG_FLAG_Avoidance_Member_of_Group1 = 205,
/// CPED_CONFIG_FLAG_ForcedToUseSpecificGroupSeatIndex = 206,
/// _CPED_CONFIG_FLAG_0x415B26B9 = 207,
/// CPED_CONFIG_FLAG_DisableExplosionReactions = 208,
/// CPED_CONFIG_FLAG_DodgedPlayer = 209,
/// CPED_CONFIG_FLAG_WaitingForPlayerControlInterrupt = 210,
/// CPED_CONFIG_FLAG_ForcedToStayInCover = 211,
/// CPED_CONFIG_FLAG_GeneratesSoundEvents = 212,
/// CPED_CONFIG_FLAG_ListensToSoundEvents = 213,
/// CPED_CONFIG_FLAG_AllowToBeTargetedInAVehicle = 214,
/// CPED_CONFIG_FLAG_WaitForDirectEntryPointToBeFreeWhenExiting = 215,
/// CPED_CONFIG_FLAG_OnlyRequireOnePressToExitVehicle = 216,
/// CPED_CONFIG_FLAG_ForceExitToSkyDive = 217,
/// _CPED_CONFIG_FLAG_0x3C7DF9DF = 218,
/// _CPED_CONFIG_FLAG_0x848FFEF2 = 219,
/// CPED_CONFIG_FLAG_DontEnterLeadersVehicle = 220,
/// CPED_CONFIG_FLAG_DisableExitToSkyDive = 221,
/// _CPED_CONFIG_FLAG_0x84F722FA = 222,
/// _CPED_CONFIG_FLAG_Shrink = 223, // 0xD1B87B1F
/// _CPED_CONFIG_FLAG_0x728AA918 = 224,
/// CPED_CONFIG_FLAG_DisablePotentialToBeWalkedIntoResponse = 225,
/// CPED_CONFIG_FLAG_DisablePedAvoidance = 226,
/// CPED_CONFIG_FLAG_ForceRagdollUponDeath = 227,
/// _CPED_CONFIG_FLAG_0x1EA7225F = 228,
/// CPED_CONFIG_FLAG_DisablePanicInVehicle = 229,
/// CPED_CONFIG_FLAG_AllowedToDetachTrailer = 230,
/// _CPED_CONFIG_FLAG_0xFC3E572D = 231,
/// _CPED_CONFIG_FLAG_0x08E9F9CF = 232,
/// _CPED_CONFIG_FLAG_0x2D3BA52D = 233,
/// _CPED_CONFIG_FLAG_0xFD2F53EA = 234,
/// _CPED_CONFIG_FLAG_0x31A1B03B = 235,
/// CPED_CONFIG_FLAG_IsHoldingProp = 236,
/// CPED_CONFIG_FLAG_BlocksPathingWhenDead = 237,
/// _CPED_CONFIG_FLAG_0xCE57C9A3 = 238,
/// _CPED_CONFIG_FLAG_0x26149198 = 239,
/// CPED_CONFIG_FLAG_ForceSkinCharacterCloth = 240,
/// CPED_CONFIG_FLAG_LeaveEngineOnWhenExitingVehicles = 241,
/// CPED_CONFIG_FLAG_PhoneDisableTextingAnimations = 242,
/// CPED_CONFIG_FLAG_PhoneDisableTalkingAnimations = 243,
/// CPED_CONFIG_FLAG_PhoneDisableCameraAnimations = 244,
/// CPED_CONFIG_FLAG_DisableBlindFiringInShotReactions = 245,
/// CPED_CONFIG_FLAG_AllowNearbyCoverUsage = 246,
/// _CPED_CONFIG_FLAG_0x0C754ACA = 247,
/// CPED_CONFIG_FLAG_CanPlayInCarIdles = 248,
/// CPED_CONFIG_FLAG_CanAttackNonWantedPlayerAsLaw = 249,
/// CPED_CONFIG_FLAG_WillTakeDamageWhenVehicleCrashes = 250,
/// CPED_CONFIG_FLAG_AICanDrivePlayerAsRearPassenger = 251,
/// CPED_CONFIG_FLAG_PlayerCanJackFriendlyPlayers = 252,
/// CPED_CONFIG_FLAG_OnStairs = 253,
/// _CPED_CONFIG_FLAG_0xE1A2F73F = 254,
/// CPED_CONFIG_FLAG_AIDriverAllowFriendlyPassengerSeatEntry = 255,
/// _CPED_CONFIG_FLAG_0xF1EB20A9 = 256,
/// CPED_CONFIG_FLAG_AllowMissionPedToUseInjuredMovement = 257,
/// _CPED_CONFIG_FLAG_0x329DCF1A = 258,
/// _CPED_CONFIG_FLAG_0x8D90DD1B = 259,
/// _CPED_CONFIG_FLAG_0xB8A292B7 = 260,
/// CPED_CONFIG_FLAG_PreventUsingLowerPrioritySeats = 261,
/// _CPED_CONFIG_FLAG_0x2AF558F0 = 262,
/// _CPED_CONFIG_FLAG_0x82251455 = 263,
/// _CPED_CONFIG_FLAG_0x30CF498B = 264,
/// _CPED_CONFIG_FLAG_0xE1CD50AF = 265,
/// _CPED_CONFIG_FLAG_0x72E4AE48 = 266,
/// _CPED_CONFIG_FLAG_0xC2657EA1 = 267,
/// CPED_CONFIG_FLAG_TeleportToLeaderVehicle = 268,
/// CPED_CONFIG_FLAG_Avoidance_Ignore_WeirdPedBuffer = 269,
/// CPED_CONFIG_FLAG_OnStairSlope = 270,
/// _CPED_CONFIG_FLAG_0xA0897933 = 271,
/// CPED_CONFIG_FLAG_DontBlipCop = 272,
/// CPED_CONFIG_FLAG_ClimbedShiftedFence = 273,
/// _CPED_CONFIG_FLAG_0xF7823618 = 274,
/// CPED_CONFIG_FLAG_KillWhenTrapped = 275,
/// CPED_CONFIG_FLAG_EdgeDetected = 276,
/// _CPED_CONFIG_FLAG_0x92B67896 = 277,
/// _CPED_CONFIG_FLAG_0xCAD677C9 = 278,
/// CPED_CONFIG_FLAG_AvoidTearGas = 279,
/// _CPED_CONFIG_FLAG_0x5276AC7B = 280,
/// CPED_CONFIG_FLAG_DisableGoToWritheWhenInjured = 281,
/// CPED_CONFIG_FLAG_OnlyUseForcedSeatWhenEnteringHeliInGroup = 282,
/// _CPED_CONFIG_FLAG_0x9139724D = 283,
/// _CPED_CONFIG_FLAG_0xA1457461 = 284,
/// CPED_CONFIG_FLAG_DisableWeirdPedEvents = 285,
/// CPED_CONFIG_FLAG_ShouldChargeNow = 286,
/// CPED_CONFIG_FLAG_RagdollingOnBoat = 287,
/// CPED_CONFIG_FLAG_HasBrandishedWeapon = 288,
/// _CPED_CONFIG_FLAG_0x1B9EE8A1 = 289,
/// _CPED_CONFIG_FLAG_0xF3F5758C = 290,
/// _CPED_CONFIG_FLAG_0x2A9307F1 = 291,
/// _CPED_CONFIG_FLAG_FreezePosition = 292, // 0x7403D216
/// _CPED_CONFIG_FLAG_0xA06A3C6C = 293,
/// CPED_CONFIG_FLAG_DisableShockingEvents = 294,
/// _CPED_CONFIG_FLAG_0xF8DA25A5 = 295,
/// CPED_CONFIG_FLAG_NeverReactToPedOnRoof = 296,
/// _CPED_CONFIG_FLAG_0xB31F1187 = 297,
/// _CPED_CONFIG_FLAG_0x84315402 = 298,
/// CPED_CONFIG_FLAG_DisableShockingDrivingOnPavementEvents = 299,
/// _CPED_CONFIG_FLAG_0xC7829B67 = 300,
/// CPED_CONFIG_FLAG_DisablePedConstraints = 301,
/// CPED_CONFIG_FLAG_ForceInitialPeekInCover = 302,
/// _CPED_CONFIG_FLAG_0x2ADA871B = 303,
/// _CPED_CONFIG_FLAG_0x47BC8A58 = 304,
/// CPED_CONFIG_FLAG_DisableJumpingFromVehiclesAfterLeader = 305,
/// _CPED_CONFIG_FLAG_0x4A133C50 = 306,
/// _CPED_CONFIG_FLAG_0xC58099C3 = 307,
/// _CPED_CONFIG_FLAG_0xF3D76D41 = 308,
/// _CPED_CONFIG_FLAG_0xB0EEE9F2 = 309,
/// CPED_CONFIG_FLAG_IsInCluster = 310,
/// CPED_CONFIG_FLAG_ShoutToGroupOnPlayerMelee = 311,
/// CPED_CONFIG_FLAG_IgnoredByAutoOpenDoors = 312,
/// _CPED_CONFIG_FLAG_0xD4136C22 = 313,
/// CPED_CONFIG_FLAG_ForceIgnoreMeleeActiveCombatant = 314,
/// CPED_CONFIG_FLAG_CheckLoSForSoundEvents = 315,
/// _CPED_CONFIG_FLAG_0xD5C98277 = 316,
/// CPED_CONFIG_FLAG_CanSayFollowedByPlayerAudio = 317,
/// CPED_CONFIG_FLAG_ActivateRagdollFromMinorPlayerContact = 318,
/// _CPED_CONFIG_FLAG_0xD8BE1D54 = 319,
/// CPED_CONFIG_FLAG_ForcePoseCharacterCloth = 320,
/// CPED_CONFIG_FLAG_HasClothCollisionBounds = 321,
/// CPED_CONFIG_FLAG_HasHighHeels = 322,
/// _CPED_CONFIG_FLAG_0x86B01E54 = 323,
/// CPED_CONFIG_FLAG_DontBehaveLikeLaw = 324,
/// _CPED_CONFIG_FLAG_0xC03B736C = 325, // SpawnedAtScenario?
/// CPED_CONFIG_FLAG_DisablePoliceInvestigatingBody = 326,
/// CPED_CONFIG_FLAG_DisableWritheShootFromGround = 327,
/// CPED_CONFIG_FLAG_LowerPriorityOfWarpSeats = 328,
/// CPED_CONFIG_FLAG_DisableTalkTo = 329,
/// CPED_CONFIG_FLAG_DontBlip = 330,
/// CPED_CONFIG_FLAG_IsSwitchingWeapon = 331,
/// CPED_CONFIG_FLAG_IgnoreLegIkRestrictions = 332,
/// _CPED_CONFIG_FLAG_0x150468FD = 333,
/// _CPED_CONFIG_FLAG_0x914EBD6B = 334,
/// _CPED_CONFIG_FLAG_0x79AF3B6D = 335,
/// _CPED_CONFIG_FLAG_0x75C7A632 = 336,
/// _CPED_CONFIG_FLAG_0x52D530E2 = 337,
/// _CPED_CONFIG_FLAG_0xDB2A90E0 = 338,
/// CPED_CONFIG_FLAG_AllowTaskDoNothingTimeslicing = 339,
/// _CPED_CONFIG_FLAG_0x12ADB567 = 340,
/// _CPED_CONFIG_FLAG_0x105C8518 = 341,
/// CPED_CONFIG_FLAG_NotAllowedToJackAnyPlayers = 342,
/// _CPED_CONFIG_FLAG_0xED152C3E = 343,
/// _CPED_CONFIG_FLAG_0xA0EFE6A8 = 344,
/// CPED_CONFIG_FLAG_AlwaysLeaveTrainUponArrival = 345,
/// _CPED_CONFIG_FLAG_0xCDDFE830 = 346,
/// CPED_CONFIG_FLAG_OnlyWritheFromWeaponDamage = 347,
/// CPED_CONFIG_FLAG_UseSloMoBloodVfx = 348,
/// CPED_CONFIG_FLAG_EquipJetpack = 349,
/// CPED_CONFIG_FLAG_PreventDraggedOutOfCarThreatResponse = 350,
/// _CPED_CONFIG_FLAG_0xE13D1F7C = 351,
/// _CPED_CONFIG_FLAG_0x40E25FB9 = 352,
/// _CPED_CONFIG_FLAG_0x930629D9 = 353,
/// _CPED_CONFIG_FLAG_0xECCF0C7F = 354,
/// _CPED_CONFIG_FLAG_0xB6E9613B = 355,
/// CPED_CONFIG_FLAG_ForceDeepSurfaceCheck = 356,
/// CPED_CONFIG_FLAG_DisableDeepSurfaceAnims = 357,
/// CPED_CONFIG_FLAG_DontBlipNotSynced = 358,
/// CPED_CONFIG_FLAG_IsDuckingInVehicle = 359,
/// CPED_CONFIG_FLAG_PreventAutoShuffleToTurretSeat = 360,
/// CPED_CONFIG_FLAG_DisableEventInteriorStatusCheck = 361,
/// CPED_CONFIG_FLAG_HasReserveParachute = 362,
/// CPED_CONFIG_FLAG_UseReserveParachute = 363,
/// CPED_CONFIG_FLAG_TreatDislikeAsHateWhenInCombat = 364,
/// CPED_CONFIG_FLAG_OnlyUpdateTargetWantedIfSeen = 365,
/// CPED_CONFIG_FLAG_AllowAutoShuffleToDriversSeat = 366,
/// _CPED_CONFIG_FLAG_0xD7E07D37 = 367,
/// _CPED_CONFIG_FLAG_0x03C4FD24 = 368,
/// _CPED_CONFIG_FLAG_0x7675789A = 369,
/// _CPED_CONFIG_FLAG_0xB7288A88 = 370,
/// _CPED_CONFIG_FLAG_0xC06B6291 = 371,
/// CPED_CONFIG_FLAG_PreventReactingToSilencedCloneBullets = 372,
/// CPED_CONFIG_FLAG_DisableInjuredCryForHelpEvents = 373,
/// CPED_CONFIG_FLAG_NeverLeaveTrain = 374,
/// CPED_CONFIG_FLAG_DontDropJetpackOnDeath = 375,
/// _CPED_CONFIG_FLAG_0x147F1FFB = 376,
/// _CPED_CONFIG_FLAG_0x4376DD79 = 377,
/// _CPED_CONFIG_FLAG_0xCD3DB518 = 378,
/// _CPED_CONFIG_FLAG_0xFE4BA4B6 = 379,
/// CPED_CONFIG_FLAG_DisableAutoEquipHelmetsInBikes = 380,
/// _CPED_CONFIG_FLAG_0xBCD816CD = 381,
/// _CPED_CONFIG_FLAG_0xCF02DD69 = 382,
/// _CPED_CONFIG_FLAG_0xF73AFA2E = 383,
/// _CPED_CONFIG_FLAG_0x80B9A9D0 = 384,
/// _CPED_CONFIG_FLAG_0xF601F7EE = 385,
/// _CPED_CONFIG_FLAG_0xA91350FC = 386,
/// _CPED_CONFIG_FLAG_0x3AB23B96 = 387,
/// CPED_CONFIG_FLAG_IsClimbingLadder = 388,
/// CPED_CONFIG_FLAG_HasBareFeet = 389,
/// CPED_CONFIG_FLAG_UNUSED_REPLACE_ME_2 = 390,
/// CPED_CONFIG_FLAG_GoOnWithoutVehicleIfItIsUnableToGetBackToRoad = 391,
/// CPED_CONFIG_FLAG_BlockDroppingHealthSnacksOnDeath = 392,
/// _CPED_CONFIG_FLAG_0xC11D3E8F = 393,
/// CPED_CONFIG_FLAG_ForceThreatResponseToNonFriendToFriendMeleeActions = 394,
/// CPED_CONFIG_FLAG_DontRespondToRandomPedsDamage = 395,
/// CPED_CONFIG_FLAG_AllowContinuousThreatResponseWantedLevelUpdates = 396,
/// CPED_CONFIG_FLAG_KeepTargetLossResponseOnCleanup = 397,
/// CPED_CONFIG_FLAG_PlayersDontDragMeOutOfCar = 398,
/// CPED_CONFIG_FLAG_BroadcastRepondedToThreatWhenGoingToPointShooting = 399,
/// CPED_CONFIG_FLAG_IgnorePedTypeForIsFriendlyWith = 400,
/// CPED_CONFIG_FLAG_TreatNonFriendlyAsHateWhenInCombat = 401,
/// CPED_CONFIG_FLAG_DontLeaveVehicleIfLeaderNotInVehicle = 402,
/// _CPED_CONFIG_FLAG_0x5E5B9591 = 403,
/// CPED_CONFIG_FLAG_AllowMeleeReactionIfMeleeProofIsOn = 404,
/// _CPED_CONFIG_FLAG_0x77840177 = 405,
/// _CPED_CONFIG_FLAG_0x1C7ACAC4 = 406,
/// CPED_CONFIG_FLAG_UseNormalExplosionDamageWhenBlownUpInVehicle = 407,
/// CPED_CONFIG_FLAG_DisableHomingMissileLockForVehiclePedInside = 408,
/// CPED_CONFIG_FLAG_DisableTakeOffScubaGear = 409,
/// CPED_CONFIG_FLAG_IgnoreMeleeFistWeaponDamageMult = 410,
/// CPED_CONFIG_FLAG_LawPedsCanFleeFromNonWantedPlayer = 411,
/// CPED_CONFIG_FLAG_ForceBlipSecurityPedsIfPlayerIsWanted = 412,
/// CPED_CONFIG_FLAG_IsHolsteringWeapon = 413,
/// CPED_CONFIG_FLAG_UseGoToPointForScenarioNavigation = 414,
/// CPED_CONFIG_FLAG_DontClearLocalPassengersWantedLevel = 415,
/// CPED_CONFIG_FLAG_BlockAutoSwapOnWeaponPickups = 416,
/// CPED_CONFIG_FLAG_ThisPedIsATargetPriorityForAI = 417,
/// CPED_CONFIG_FLAG_IsSwitchingHelmetVisor = 418,
/// CPED_CONFIG_FLAG_ForceHelmetVisorSwitch = 419,
/// _CPED_CONFIG_FLAG_0xCFF5F6DE = 420,
/// CPED_CONFIG_FLAG_UseOverrideFootstepPtFx = 421,
/// CPED_CONFIG_FLAG_DisableVehicleCombat = 422,
/// _CPED_CONFIG_FLAG_0xFE401D26 = 423,
/// CPED_CONFIG_FLAG_FallsLikeAircraft = 424,
/// _CPED_CONFIG_FLAG_0x2B42AE82 = 425,
/// CPED_CONFIG_FLAG_UseLockpickVehicleEntryAnimations = 426,
/// CPED_CONFIG_FLAG_IgnoreInteriorCheckForSprinting = 427,
/// CPED_CONFIG_FLAG_SwatHeliSpawnWithinLastSpottedLocation = 428,
/// CPED_CONFIG_FLAG_DisableStartEngine = 429,
/// CPED_CONFIG_FLAG_IgnoreBeingOnFire = 430,
/// CPED_CONFIG_FLAG_DisableTurretOrRearSeatPreference = 431,
/// CPED_CONFIG_FLAG_DisableWantedHelicopterSpawning = 432,
/// CPED_CONFIG_FLAG_UseTargetPerceptionForCreatingAimedAtEvents = 433,
/// CPED_CONFIG_FLAG_DisableHomingMissileLockon = 434,
/// CPED_CONFIG_FLAG_ForceIgnoreMaxMeleeActiveSupportCombatants = 435,
/// CPED_CONFIG_FLAG_StayInDefensiveAreaWhenInVehicle = 436,
/// CPED_CONFIG_FLAG_DontShoutTargetPosition = 437,
/// CPED_CONFIG_FLAG_DisableHelmetArmor = 438,
/// _CPED_CONFIG_FLAG_0xCB7F3A1E = 439,
/// _CPED_CONFIG_FLAG_0x50178878 = 440,
/// CPED_CONFIG_FLAG_PreventVehExitDueToInvalidWeapon = 441,
/// CPED_CONFIG_FLAG_IgnoreNetSessionFriendlyFireCheckForAllowDamage = 442,
/// CPED_CONFIG_FLAG_DontLeaveCombatIfTargetPlayerIsAttackedByPolice = 443,
/// CPED_CONFIG_FLAG_CheckLockedBeforeWarp = 444,
/// CPED_CONFIG_FLAG_DontShuffleInVehicleToMakeRoom = 445,
/// CPED_CONFIG_FLAG_GiveWeaponOnGetup = 446,
/// CPED_CONFIG_FLAG_DontHitVehicleWithProjectiles = 447,
/// CPED_CONFIG_FLAG_DisableForcedEntryForOpenVehiclesFromTryLockedDoor = 448,
/// CPED_CONFIG_FLAG_FiresDummyRockets = 449,
/// CPED_CONFIG_FLAG_PedIsArresting = 450,
/// CPED_CONFIG_FLAG_IsDecoyPed = 451,
/// CPED_CONFIG_FLAG_HasEstablishedDecoy = 452,
/// CPED_CONFIG_FLAG_BlockDispatchedHelicoptersFromLanding = 453,
/// CPED_CONFIG_FLAG_DontCryForHelpOnStun = 454,
/// _CPED_CONFIG_FLAG_0xB68D3EAB = 455,
/// CPED_CONFIG_FLAG_CanBeIncapacitated = 456,
/// _CPED_CONFIG_FLAG_0x4BD5EBAD = 457,
/// CPED_CONFIG_FLAG_DontChangeTargetFromMelee = 458,
/// };
pub fn SET_PED_CONFIG_FLAG(ped: types.Ped, flagId: c_int, value: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(1807067481085428835)), ped, flagId, value);
}
/// PED::SET_PED_RESET_FLAG(PLAYER::PLAYER_PED_ID(), 240, 1);
/// Known values:
/// PRF_PreventGoingIntoStillInVehicleState = 236 *(fanatic2.c)*
pub fn SET_PED_RESET_FLAG(ped: types.Ped, flagId: c_int, doReset: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(13972597501312313842)), ped, flagId, doReset);
}
/// See SET_PED_CONFIG_FLAG
pub fn GET_PED_CONFIG_FLAG(ped: types.Ped, flagId: c_int, p2: windows.BOOL) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(9143768600959694099)), ped, flagId, p2);
}
pub fn GET_PED_RESET_FLAG(ped: types.Ped, flagId: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(12654650622687834784)), ped, flagId);
}
pub fn SET_PED_GROUP_MEMBER_PASSENGER_INDEX(ped: types.Ped, index: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(855042750384164668)), ped, index);
}
pub fn SET_PED_CAN_EVASIVE_DIVE(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7744612924842995801)), ped, toggle);
}
/// Presumably returns the Entity that the Ped is currently diving out of the way of.
/// var num3;
/// if (PED::IS_PED_EVASIVE_DIVING(A_0, &num3) != 0)
/// if (ENTITY::IS_ENTITY_A_VEHICLE(num3) != 0)
pub fn IS_PED_EVASIVE_DIVING(ped: types.Ped, evadingEntity: [*c]types.Entity) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(4703519164161087640)), ped, evadingEntity);
}
pub fn SET_PED_SHOOTS_AT_COORD(ped: types.Ped, x: f32, y: f32, z: f32, toggle: windows.BOOL) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(10853778798363652538)), ped, x, y, z, toggle);
}
/// Full list of peds by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/peds.json
pub fn SET_PED_MODEL_IS_SUPPRESSED(modelHash: types.Hash, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16241005812428730129)), modelHash, toggle);
}
pub fn STOP_ANY_PED_MODEL_BEING_SUPPRESSED() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(13005217458194956495)));
}
pub fn SET_PED_CAN_BE_TARGETED_WHEN_INJURED(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7173112365129895767)), ped, toggle);
}
pub fn SET_PED_GENERATES_DEAD_BODY_EVENTS(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9201271453299690075)), ped, toggle);
}
/// Used to be known as _BLOCK_PED_DEAD_BODY_SHOCKING_EVENTS
pub fn BLOCK_PED_FROM_GENERATING_DEAD_BODY_EVENTS_WHEN_DEAD(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16445478747144768463)), ped, toggle);
}
pub fn SET_PED_WILL_ONLY_ATTACK_WANTED_PLAYER(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4509925950448681516)), p0, p1);
}
pub fn SET_PED_CAN_RAGDOLL_FROM_PLAYER_IMPACT(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16111978299072887333)), ped, toggle);
}
/// PoliceMotorcycleHelmet 1024
/// RegularMotorcycleHelmet 4096
/// FiremanHelmet 16384
/// PilotHeadset 32768
/// PilotHelmet 65536
/// --
/// p2 is generally 4096 or 16384 in the scripts. p1 varies between 1 and 0.
pub fn GIVE_PED_HELMET(ped: types.Ped, cannotRemove: windows.BOOL, helmetFlag: c_int, textureIndex: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(6109067650810737022)), ped, cannotRemove, helmetFlag, textureIndex);
}
pub fn REMOVE_PED_HELMET(ped: types.Ped, instantly: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12083797222263021272)), ped, instantly);
}
pub fn IS_PED_TAKING_OFF_HELMET(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1466218391922666629)), ped);
}
pub fn SET_PED_HELMET(ped: types.Ped, canWearHelmet: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6199841587769737477)), ped, canWearHelmet);
}
pub fn SET_PED_HELMET_FLAG(ped: types.Ped, helmetFlag: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13900234201931967269)), ped, helmetFlag);
}
/// List of component/props ID
/// gtaxscripting.blogspot.com/2016/04/gta-v-peds-component-and-props.html
pub fn SET_PED_HELMET_PROP_INDEX(ped: types.Ped, propIndex: c_int, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2799047177385093404)), ped, propIndex, p2);
}
/// Used to be known as _SET_PED_HELMET_UNK
pub fn SET_PED_HELMET_VISOR_PROP_INDICES(ped: types.Ped, p1: windows.BOOL, p2: c_int, p3: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(4572039103616496717)), ped, p1, p2, p3);
}
/// Used to be known as _IS_PED_HELMET_UNK
pub fn IS_PED_HELMET_VISOR_UP(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13351322298792467244)), ped);
}
pub fn SET_PED_HELMET_TEXTURE_INDEX(ped: types.Ped, textureIndex: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17389819055948792546)), ped, textureIndex);
}
/// Returns true if the ped passed through the parenthesis is wearing a helmet.
pub fn IS_PED_WEARING_HELMET(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(17526848534906706713)), ped);
}
pub fn CLEAR_PED_STORED_HAT_PROP(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7528905155161871080)), ped);
}
pub fn GET_PED_HELMET_STORED_HAT_PROP_INDEX(ped: types.Ped) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(4977204263859830808)), ped);
}
pub fn GET_PED_HELMET_STORED_HAT_TEX_INDEX(ped: types.Ped) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(11345284472091137304)), ped);
}
pub fn IS_CURRENT_HEAD_PROP_A_HELMET(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(17453798443263544722)), p0);
}
pub fn SET_PED_TO_LOAD_COVER(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3687135479488455577)), ped, toggle);
}
/// It simply makes the said ped to cower behind cover object(wall, desk, car)
/// Peds flee attributes must be set to not to flee, first. Else, most of the peds, will just flee from gunshot sounds or any other panic situations.
pub fn SET_PED_CAN_COWER_IN_COVER(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14660716305380058933)), ped, toggle);
}
pub fn SET_PED_CAN_PEEK_IN_COVER(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14201118858005067574)), ped, toggle);
}
/// This native does absolutely nothing, just a nullsub
pub fn SET_PED_PLAYS_HEAD_ON_HORN_ANIM_WHEN_DIES_IN_VEHICLE(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10725687488826502461)), ped, toggle);
}
/// "IK" stands for "Inverse kinematics." I assume this has something to do with how the ped uses his legs to balance. In the scripts, the second parameter is always an int with a value of 2, 0, or sometimes 1
pub fn SET_PED_LEG_IK_MODE(ped: types.Ped, mode: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14093722256403988157)), ped, mode);
}
pub fn SET_PED_MOTION_BLUR(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(763475691609175112)), ped, toggle);
}
pub fn SET_PED_CAN_SWITCH_WEAPON(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17113536741096813376)), ped, toggle);
}
pub fn SET_PED_DIES_INSTANTLY_IN_WATER(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17201007542980421583)), ped, toggle);
}
/// Only appears in lamar1 script.
pub fn SET_LADDER_CLIMB_INPUT_STATE(ped: types.Ped, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1887867140601310145)), ped, p1);
}
pub fn STOP_PED_WEAPON_FIRING_WHEN_DROPPED(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13932116899881240072)), ped);
}
pub fn SET_SCRIPTED_ANIM_SEAT_OFFSET(ped: types.Ped, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6419806103349412400)), ped, p1);
}
/// enum eCombatMovement // 0x4F456B61
/// {
/// CM_Stationary,
/// CM_Defensive,
/// CM_WillAdvance,
/// CM_WillRetreat
/// };
pub fn SET_PED_COMBAT_MOVEMENT(ped: types.Ped, combatMovement: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5592521861259579479)), ped, combatMovement);
}
/// See SET_PED_COMBAT_MOVEMENT
pub fn GET_PED_COMBAT_MOVEMENT(ped: types.Ped) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(16044394811451421685)), ped);
}
/// enum eCombatAbility // 0xE793438C
/// {
/// CA_Poor,
/// CA_Average,
/// CA_Professional,
/// CA_NumTypes
/// };
pub fn SET_PED_COMBAT_ABILITY(ped: types.Ped, abilityLevel: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14367094196529200552)), ped, abilityLevel);
}
/// enum eCombatRange // 0xB69160F5
/// {
/// CR_Near,
/// CR_Medium,
/// CR_Far,
/// CR_VeryFar,
/// CR_NumRanges
/// };
pub fn SET_PED_COMBAT_RANGE(ped: types.Ped, combatRange: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4350590797670664571)), ped, combatRange);
}
/// See SET_PED_COMBAT_RANGE
pub fn GET_PED_COMBAT_RANGE(ped: types.Ped) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(18003693607827943328)), ped);
}
/// enum eCombatAttributes // 0x0E8E7201
/// {
/// BF_CanUseCover = 0,
/// BF_CanUseVehicles = 1,
/// BF_CanDoDrivebys = 2,
/// BF_CanLeaveVehicle = 3,
/// BF_CanUseDynamicStrafeDecisions = 4,
/// BF_AlwaysFight = 5,
/// BF_0x66BB9FCC = 6,
/// BF_0x6837DA41 = 7,
/// BF_0xB4A13A5A = 8,
/// BF_0xEE326AAD = 9,
/// BF_0x7DF2CCFA = 10,
/// BF_0x0036D422 = 11,
/// BF_BlindFireWhenInCover = 12,
/// BF_Aggressive = 13,
/// BF_CanInvestigate = 14,
/// BF_HasRadio = 15,
/// BF_0x6BDE28D1 = 16,
/// BF_AlwaysFlee = 17,
/// BF_0x7852797D = 18,
/// BF_0x33497B95 = 19,
/// BF_CanTauntInVehicle = 20,
/// BF_CanChaseTargetOnFoot = 21,
/// BF_WillDragInjuredPedsToSafety = 22,
/// BF_0xCD7168B8 = 23,
/// BF_UseProximityFiringRate = 24,
/// BF_0x48F914F8 = 25,
/// BF_0x2EA543D0 = 26,
/// BF_PerfectAccuracy = 27,
/// BF_CanUseFrustratedAdvance = 28,
/// BF_0x3D131AC1 = 29,
/// BF_0x3AD95F27 = 30,
/// BF_MaintainMinDistanceToTarget = 31,
/// BF_0xEAD68AD2 = 32,
/// BF_0xA206C2E0 = 33,
/// BF_CanUsePeekingVariations = 34,
/// BF_0xA5715184 = 35,
/// BF_0xD5265533 = 36,
/// BF_0x2B84C2BF = 37,
/// BF_DisableBulletReactions = 38,
/// BF_CanBust = 39,
/// BF_0xAA525726 = 40,
/// BF_CanCommandeerVehicles = 41,
/// BF_CanFlank = 42,
/// BF_SwitchToAdvanceIfCantFindCover = 43,
/// BF_SwitchToDefensiveIfInCover = 44,
/// BF_0xEB4786A0 = 45,
/// BF_CanFightArmedPedsWhenNotArmed = 46,
/// BF_0xA08E9402 = 47,
/// BF_0x952EAD7D = 48,
/// BF_UseEnemyAccuracyScaling = 49,
/// BF_CanCharge = 50,
/// BF_0xDA8C2BD3 = 51,
/// BF_0x6562F017 = 52,
/// BF_0xA2C3D53B = 53,
/// BF_AlwaysEquipBestWeapon = 54,
/// BF_CanSeeUnderwaterPeds = 55,
/// BF_0xF619486B = 56,
/// BF_0x61EB63A3 = 57,
/// BF_DisableFleeFromCombat = 58,
/// BF_0x8976D12B = 59,
/// BF_CanThrowSmokeGrenade = 60,
/// BF_NonMissionPedsFleeFromThisPedUnlessArmed = 61,
/// BF_0x5452A10C = 62,
/// BF_FleesFromInvincibleOpponents = 63,
/// BF_DisableBlockFromPursueDuringVehicleChase = 64,
/// BF_DisableSpinOutDuringVehicleChase = 65,
/// BF_DisableCruiseInFrontDuringBlockDuringVehicleChase = 66,
/// BF_0x0B404731 = 67,
/// BF_DisableReactToBuddyShot = 68,
/// BF_0x7FFD6AEB = 69,
/// BF_0x51F4AEF8 = 70,
/// BF_PermitChargeBeyondDefensiveArea = 71,
/// BF_0x63E0A8E2 = 72,
/// BF_0xDF974436 = 73,
/// BF_0x556C080B = 74,
/// BF_0xA4D50035 = 75,
/// BF_SetDisableShoutTargetPositionOnCombatStart = 76,
/// BF_DisableRespondedToThreatBroadcast = 77,
/// BF_0xCBB01765 = 78,
/// BF_0x4F862ED4 = 79,
/// BF_0xEF9C7C40 = 80,
/// BF_0xE51B494F = 81,
/// BF_0x054D0199 = 82,
/// BF_0xD36BCE94 = 83,
/// BF_0xFB11F690 = 84,
/// BF_0xD208A9AD = 85,
/// BF_AllowDogFighting = 86,
/// BF_0x07A6E531 = 87,
/// BF_0x34F9317B = 88,
/// BF_0x4240F5A9 = 89,
/// BF_0xEE129DBD = 90,
/// BF_0x053AEAD9 = 91
/// };
pub fn SET_PED_COMBAT_ATTRIBUTES(ped: types.Ped, attributeId: c_int, enabled: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(11490816196028522521)), ped, attributeId, enabled);
}
/// enum eTargetLossResponseType
/// {
/// TLR_ExitTask,
/// TLR_NeverLoseTarget,
/// TLR_SearchForTarget
/// };
pub fn SET_PED_TARGET_LOSS_RESPONSE(ped: types.Ped, responseType: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(505451025464023626)), ped, responseType);
}
pub fn IS_PED_PERFORMING_MELEE_ACTION(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15909556250171936727)), ped);
}
pub fn IS_PED_PERFORMING_STEALTH_KILL(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(18252189600478478775)), ped);
}
/// Used to be known as IS_PED_PERFORMING_DEPENDENT_COMBO_LIMIT
pub fn IS_PED_PERFORMING_A_COUNTER_ATTACK(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16992342778730600399)), ped);
}
pub fn IS_PED_BEING_STEALTH_KILLED(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9672364137847217650)), ped);
}
pub fn GET_MELEE_TARGET_FOR_PED(ped: types.Ped) types.Ped {
return nativeCaller.invoke1(@as(u64, @intCast(1775519886837546297)), ped);
}
pub fn WAS_PED_KILLED_BY_STEALTH(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(17978381401878278144)), ped);
}
pub fn WAS_PED_KILLED_BY_TAKEDOWN(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9153815145544627324)), ped);
}
pub fn WAS_PED_KNOCKED_OUT(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7022940804768263457)), ped);
}
/// bit 1 (0x2) = use vehicle
/// bit 15 (0x8000) = force cower
pub fn SET_PED_FLEE_ATTRIBUTES(ped: types.Ped, attributeFlags: c_int, enable: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(8116279360099375049)), ped, attributeFlags, enable);
}
/// p1: Only "CODE_HUMAN_STAND_COWER" found in the b617d scripts.
pub fn SET_PED_COWER_HASH(ped: types.Ped, p1: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11910071655013453523)), ped, p1);
}
pub fn SET_PED_STEERS_AROUND_DEAD_BODIES(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2312253178490951804)), ped, toggle);
}
pub fn SET_PED_STEERS_AROUND_PEDS(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5112176269199530129)), ped, toggle);
}
pub fn SET_PED_STEERS_AROUND_OBJECTS(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1515954447145109695)), ped, toggle);
}
pub fn SET_PED_STEERS_AROUND_VEHICLES(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16964982643892298732)), ped, toggle);
}
pub fn SET_PED_IS_AVOIDED_BY_OTHERS(p0: types.Any, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12228990642838948842)), p0, p1);
}
pub fn SET_PED_INCREASED_AVOIDANCE_RADIUS(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6270006640257154155)), ped);
}
pub fn SET_PED_BLOCKS_PATHING_WHEN_DEAD(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6297603381695575522)), ped, toggle);
}
pub fn SET_PED_NO_TIME_DELAY_BEFORE_SHOT(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11902259857859968532)), p0);
}
pub fn IS_ANY_PED_NEAR_POINT(x: f32, y: f32, z: f32, radius: f32) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(592611794392571039)), x, y, z, radius);
}
pub fn FORCE_PED_AI_AND_ANIMATION_UPDATE(ped: types.Ped, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2452284214444829210)), ped, p1, p2);
}
pub fn IS_PED_HEADING_TOWARDS_POSITION(ped: types.Ped, x: f32, y: f32, z: f32, p4: f32) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(18227046555762388416)), ped, x, y, z, p4);
}
pub fn REQUEST_PED_VISIBILITY_TRACKING(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9041590071078039224)), ped);
}
/// Used to be known as GET_PED_FLOOD_INVINCIBILITY
pub fn REQUEST_PED_VEHICLE_VISIBILITY_TRACKING(ped: types.Ped, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3153426456988567048)), ped, p1);
}
pub fn REQUEST_PED_RESTRICTED_VEHICLE_VISIBILITY_TRACKING(ped: types.Ped, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14772242567161760579)), ped, p1);
}
pub fn REQUEST_PED_USE_SMALL_BBOX_VISIBILITY_TRACKING(ped: types.Ped, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8483124406314601647)), ped, p1);
}
/// returns whether or not a ped is visible within your FOV, not this check auto's to false after a certain distance.
/// Target needs to be tracked.. won't work otherwise.
pub fn IS_TRACKED_PED_VISIBLE(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10504899121431808172)), ped);
}
/// Used to be known as _GET_TRACKED_PED_VISIBILITY
pub fn GET_TRACKED_PED_PIXELCOUNT(ped: types.Ped) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(5845419876193650658)), ped);
}
pub fn IS_PED_TRACKED(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5502869916007599031)), ped);
}
pub fn HAS_PED_RECEIVED_EVENT(ped: types.Ped, eventId: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(9585837826331274688)), ped, eventId);
}
/// Used to be known as _CAN_PED_SEE_PED
pub fn CAN_PED_SEE_HATED_PED(ped1: types.Ped, ped2: types.Ped) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(7842354866013687035)), ped1, ped2);
}
pub fn CAN_PED_SHUFFLE_TO_OR_FROM_TURRET_SEAT(ped: types.Ped, p1: [*c]c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(11270939875144156310)), ped, p1);
}
pub fn CAN_PED_SHUFFLE_TO_OR_FROM_EXTRA_SEAT(ped: types.Ped, p1: [*c]c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(3313666129236362569)), ped, p1);
}
/// no bone= -1
/// boneIds:
/// SKEL_ROOT = 0x0,
/// SKEL_Pelvis = 0x2e28,
/// SKEL_L_Thigh = 0xe39f,
/// SKEL_L_Calf = 0xf9bb,
/// SKEL_L_Foot = 0x3779,
/// SKEL_L_Toe0 = 0x83c,
/// IK_L_Foot = 0xfedd,
/// PH_L_Foot = 0xe175,
/// MH_L_Knee = 0xb3fe,
/// SKEL_R_Thigh = 0xca72,
/// SKEL_R_Calf = 0x9000,
/// SKEL_R_Foot = 0xcc4d,
/// SKEL_R_Toe0 = 0x512d,
/// IK_R_Foot = 0x8aae,
/// PH_R_Foot = 0x60e6,
/// MH_R_Knee = 0x3fcf,
/// RB_L_ThighRoll = 0x5c57,
/// RB_R_ThighRoll = 0x192a,
/// SKEL_Spine_Root = 0xe0fd,
/// SKEL_Spine0 = 0x5c01,
/// SKEL_Spine1 = 0x60f0,
/// SKEL_Spine2 = 0x60f1,
/// SKEL_Spine3 = 0x60f2,
/// SKEL_L_Clavicle = 0xfcd9,
/// SKEL_L_UpperArm = 0xb1c5,
/// SKEL_L_Forearm = 0xeeeb,
/// SKEL_L_Hand = 0x49d9,
/// SKEL_L_Finger00 = 0x67f2,
/// SKEL_L_Finger01 = 0xff9,
/// SKEL_L_Finger02 = 0xffa,
/// SKEL_L_Finger10 = 0x67f3,
/// SKEL_L_Finger11 = 0x1049,
/// SKEL_L_Finger12 = 0x104a,
/// SKEL_L_Finger20 = 0x67f4,
/// SKEL_L_Finger21 = 0x1059,
/// SKEL_L_Finger22 = 0x105a,
/// SKEL_L_Finger30 = 0x67f5,
/// SKEL_L_Finger31 = 0x1029,
/// SKEL_L_Finger32 = 0x102a,
/// SKEL_L_Finger40 = 0x67f6,
/// SKEL_L_Finger41 = 0x1039,
/// SKEL_L_Finger42 = 0x103a,
/// PH_L_Hand = 0xeb95,
/// IK_L_Hand = 0x8cbd,
/// RB_L_ForeArmRoll = 0xee4f,
/// RB_L_ArmRoll = 0x1470,
/// MH_L_Elbow = 0x58b7,
/// SKEL_R_Clavicle = 0x29d2,
/// SKEL_R_UpperArm = 0x9d4d,
/// SKEL_R_Forearm = 0x6e5c,
/// SKEL_R_Hand = 0xdead,
/// SKEL_R_Finger00 = 0xe5f2,
/// SKEL_R_Finger01 = 0xfa10,
/// SKEL_R_Finger02 = 0xfa11,
/// SKEL_R_Finger10 = 0xe5f3,
/// SKEL_R_Finger11 = 0xfa60,
/// SKEL_R_Finger12 = 0xfa61,
/// SKEL_R_Finger20 = 0xe5f4,
/// SKEL_R_Finger21 = 0xfa70,
/// SKEL_R_Finger22 = 0xfa71,
/// SKEL_R_Finger30 = 0xe5f5,
/// SKEL_R_Finger31 = 0xfa40,
/// SKEL_R_Finger32 = 0xfa41,
/// SKEL_R_Finger40 = 0xe5f6,
/// SKEL_R_Finger41 = 0xfa50,
/// SKEL_R_Finger42 = 0xfa51,
/// PH_R_Hand = 0x6f06,
/// IK_R_Hand = 0x188e,
/// RB_R_ForeArmRoll = 0xab22,
/// RB_R_ArmRoll = 0x90ff,
/// MH_R_Elbow = 0xbb0,
/// SKEL_Neck_1 = 0x9995,
/// SKEL_Head = 0x796e,
/// IK_Head = 0x322c,
/// FACIAL_facialRoot = 0xfe2c,
/// FB_L_Brow_Out_000 = 0xe3db,
/// FB_L_Lid_Upper_000 = 0xb2b6,
/// FB_L_Eye_000 = 0x62ac,
/// FB_L_CheekBone_000 = 0x542e,
/// FB_L_Lip_Corner_000 = 0x74ac,
/// FB_R_Lid_Upper_000 = 0xaa10,
/// FB_R_Eye_000 = 0x6b52,
/// FB_R_CheekBone_000 = 0x4b88,
/// FB_R_Brow_Out_000 = 0x54c,
/// FB_R_Lip_Corner_000 = 0x2ba6,
/// FB_Brow_Centre_000 = 0x9149,
/// FB_UpperLipRoot_000 = 0x4ed2,
/// FB_UpperLip_000 = 0xf18f,
/// FB_L_Lip_Top_000 = 0x4f37,
/// FB_R_Lip_Top_000 = 0x4537,
/// FB_Jaw_000 = 0xb4a0,
/// FB_LowerLipRoot_000 = 0x4324,
/// FB_LowerLip_000 = 0x508f,
/// FB_L_Lip_Bot_000 = 0xb93b,
/// FB_R_Lip_Bot_000 = 0xc33b,
/// FB_Tongue_000 = 0xb987,
/// RB_Neck_1 = 0x8b93,
/// IK_Root = 0xdd1c
pub fn GET_PED_BONE_INDEX(ped: types.Ped, boneId: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(4558360841545231921)), ped, boneId);
}
pub fn GET_PED_RAGDOLL_BONE_INDEX(ped: types.Ped, bone: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(2330594670382917490)), ped, bone);
}
/// Values look to be between 0.0 and 1.0
/// From decompiled scripts: 0.0, 0.6, 0.65, 0.8, 1.0
/// You are correct, just looked in IDA it breaks from the function if it's less than 0.0f or greater than 1.0f.
pub fn SET_PED_ENVEFF_SCALE(ped: types.Ped, value: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13774630443272451425)), ped, value);
}
pub fn GET_PED_ENVEFF_SCALE(ped: types.Ped) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(11246846181799959100)), ped);
}
pub fn SET_ENABLE_PED_ENVEFF_SCALE(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15187732287137320734)), ped, toggle);
}
/// In agency_heist3b.c4, its like this 90% of the time:
/// PED::SET_PED_ENVEFF_CPV_ADD(ped, 0.099);
/// PED::SET_PED_ENVEFF_SCALE(ped, 1.0);
/// PED::SET_PED_ENVEFF_CPV_ADD(ped, 87, 81, 68);
/// PED::SET_ENABLE_PED_ENVEFF_SCALE(ped, 1);
/// and its like this 10% of the time:
/// PED::SET_PED_ENVEFF_CPV_ADD(ped, 0.2);
/// PED::SET_PED_ENVEFF_SCALE(ped, 0.65);
/// PED::SET_PED_ENVEFF_COLOR_MODULATOR(ped, 74, 69, 60);
/// PED::SET_ENABLE_PED_ENVEFF_SCALE(ped, 1);
pub fn SET_PED_ENVEFF_CPV_ADD(ped: types.Ped, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1229291841594331423)), ped, p1);
}
/// Something related to the environmental effects natives.
/// In the "agency_heist3b" script, p1 - p3 are always under 100 - usually they are {87, 81, 68}. If SET_PED_ENVEFF_SCALE is set to 0.65 (instead of the usual 1.0), they use {74, 69, 60}
pub fn SET_PED_ENVEFF_COLOR_MODULATOR(ped: types.Ped, p1: c_int, p2: c_int, p3: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(15462002842728659433)), ped, p1, p2, p3);
}
/// intensity: 0.0f - 1.0f
/// This native sets the emissive intensity for the given ped. It is used for different 'glow' levels on illuminated clothing.
/// Used to be known as _SET_PED_REFLECTION_INTENSITY
/// Used to be known as _SET_PED_ILLUMINATED_CLOTHING_GLOW_INTENSITY
/// Used to be known as _SET_PED_EMISSIVE_INTENSITY
pub fn SET_PED_EMISSIVE_SCALE(ped: types.Ped, intensity: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5661261427343501117)), ped, intensity);
}
/// Use 0x4E90D746056E273D to set the illuminated clothing glow intensity for a specific ped.
/// Returns a float between 0.0 and 1.0 representing the current illuminated clothing glow intensity.
/// Used to be known as _GET_PED_REFLECTION_INTENSITY
/// Used to be known as _GET_PED_ILLUMINATED_CLOTHING_GLOW_INTENSITY
/// Used to be known as _GET_PED_EMISSIVE_INTENSITY
pub fn GET_PED_EMISSIVE_SCALE(ped: types.Ped) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(1468651259382824296)), ped);
}
/// Used to be known as _IS_PED_SHADER_EFFECT_VALID
pub fn IS_PED_SHADER_READY(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9343369985984060729)), ped);
}
pub fn SET_PED_ENABLE_CREW_EMBLEM(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16791368377059764168)), ped, toggle);
}
/// This native does absolutely nothing, just a nullsub
pub fn REQUEST_RAGDOLL_BOUNDS_UPDATE(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1303476255918442243)), p0, p1);
}
/// Enable/disable ped shadow (ambient occlusion). https://gfycat.com/thankfulesteemedgecko
pub fn SET_PED_AO_BLOB_RENDERING(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3123993011470596940)), ped, toggle);
}
pub fn IS_PED_SHELTERED(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13309595166979716528)), ped);
}
/// p6 always 2 (but it doesnt seem to matter...)
/// roll and pitch 0
/// yaw to Ped.rotation
pub fn CREATE_SYNCHRONIZED_SCENE(x: f32, y: f32, z: f32, roll: f32, pitch: f32, yaw: f32, p6: c_int) c_int {
return nativeCaller.invoke7(@as(u64, @intCast(10095065924937375091)), x, y, z, roll, pitch, yaw, p6);
}
/// Used to be known as _CREATE_SYNCHRONIZED_SCENE_2
pub fn CREATE_SYNCHRONIZED_SCENE_AT_MAP_OBJECT(x: f32, y: f32, z: f32, radius: f32, object: types.Hash) c_int {
return nativeCaller.invoke5(@as(u64, @intCast(7128115453168745930)), x, y, z, radius, object);
}
/// Returns true if a synchronized scene is running
pub fn IS_SYNCHRONIZED_SCENE_RUNNING(sceneId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2725693256661961254)), sceneId);
}
pub fn SET_SYNCHRONIZED_SCENE_ORIGIN(sceneID: c_int, x: f32, y: f32, z: f32, roll: f32, pitch: f32, yaw: f32, p7: windows.BOOL) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(7696488426199063767)), sceneID, x, y, z, roll, pitch, yaw, p7);
}
pub fn SET_SYNCHRONIZED_SCENE_PHASE(sceneID: c_int, phase: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8305362243532093136)), sceneID, phase);
}
pub fn GET_SYNCHRONIZED_SCENE_PHASE(sceneID: c_int) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(16475030217870177228)), sceneID);
}
pub fn SET_SYNCHRONIZED_SCENE_RATE(sceneID: c_int, rate: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13169826626972244573)), sceneID, rate);
}
pub fn GET_SYNCHRONIZED_SCENE_RATE(sceneID: c_int) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(15567029479391317312)), sceneID);
}
pub fn SET_SYNCHRONIZED_SCENE_LOOPED(sceneID: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15683952436282824527)), sceneID, toggle);
}
pub fn IS_SYNCHRONIZED_SCENE_LOOPED(sceneID: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7084760360540148154)), sceneID);
}
/// Used to be known as _SET_SYNCHRONIZED_SCENE_OCCLUSION_PORTAL
pub fn SET_SYNCHRONIZED_SCENE_HOLD_LAST_FRAME(sceneID: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4128565905484794241)), sceneID, toggle);
}
pub fn IS_SYNCHRONIZED_SCENE_HOLD_LAST_FRAME(sceneID: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9164630712636299247)), sceneID);
}
pub fn ATTACH_SYNCHRONIZED_SCENE_TO_ENTITY(sceneID: c_int, entity: types.Entity, boneIndex: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2823272235100945302)), sceneID, entity, boneIndex);
}
pub fn DETACH_SYNCHRONIZED_SCENE(sceneID: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7870306363211724778)), sceneID);
}
/// Used to be known as _DISPOSE_SYNCHRONIZED_SCENE
pub fn TAKE_OWNERSHIP_OF_SYNCHRONIZED_SCENE(scene: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14815936647629449839)), scene);
}
/// Regarding p2, p3 and p4: Most common is 0, 0, 0); followed by 0, 1, 0); and 1, 1, 0); in R* scripts. p4 is very rarely something other than 0.
/// enum eMotionState // 0x92A659FE
/// {
/// MotionState_None = 0xEE717723,
/// MotionState_Idle = 0x9072A713,
/// MotionState_Walk = 0xD827C3DB,
/// MotionState_Run = 0xFFF7E7A4,
/// MotionState_Sprint = 0xBD8817DB,
/// MotionState_Crouch_Idle = 0x43FB099E,
/// MotionState_Crouch_Walk = 0x08C31A98,
/// MotionState_Crouch_Run = 0x3593CF09,
/// MotionState_DoNothing = 0x0EC17E58,
/// MotionState_AnimatedVelocity = 0x551AAC43,
/// MotionState_InVehicle = 0x94D9D58D,
/// MotionState_Aiming = 0x3F67C6AF,
/// MotionState_Diving_Idle = 0x4848CDED,
/// MotionState_Diving_Swim = 0x916E828C,
/// MotionState_Swimming_TreadWater = 0xD1BF11C7,
/// MotionState_Dead = 0x0DBB071C,
/// MotionState_Stealth_Idle = 0x422D7A25,
/// MotionState_Stealth_Walk = 0x042AB6A2,
/// MotionState_Stealth_Run = 0xFB0B79E1,
/// MotionState_Parachuting = 0xBAC0F10B,
/// MotionState_ActionMode_Idle = 0xDA40A0DC,
/// MotionState_ActionMode_Walk = 0xD2905EA7,
/// MotionState_ActionMode_Run = 0x31BADE14,
/// MotionState_Jetpack = 0x535E6A5E
/// };
pub fn FORCE_PED_MOTION_STATE(ped: types.Ped, motionStateHash: types.Hash, p2: windows.BOOL, p3: c_int, p4: windows.BOOL) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(17476611774346628554)), ped, motionStateHash, p2, p3, p4);
}
/// Used to be known as _GET_PED_CURRENT_MOVEMENT_SPEED
pub fn GET_PED_CURRENT_MOVE_BLEND_RATIO(ped: types.Ped, speedX: [*c]f32, speedY: [*c]f32) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(17726561628885169931)), ped, speedX, speedY);
}
pub fn SET_PED_MAX_MOVE_BLEND_RATIO(ped: types.Ped, value: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4841514138165184074)), ped, value);
}
pub fn SET_PED_MIN_MOVE_BLEND_RATIO(ped: types.Ped, value: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(119513419683673053)), ped, value);
}
/// Min: 0.00
/// Max: 10.00
/// Can be used in combo with fast run cheat.
/// When value is set to 10.00:
/// Sprinting without fast run cheat: 66 m/s
/// Sprinting with fast run cheat: 77 m/s
/// Needs to be looped!
/// Note: According to IDA for the Xbox360 xex, when they check bgt they seem to have the min to 0.0f, but the max set to 1.15f not 10.0f.
pub fn SET_PED_MOVE_RATE_OVERRIDE(ped: types.Ped, value: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(602347721261201873)), ped, value);
}
pub fn SET_PED_MOVE_RATE_IN_WATER_OVERRIDE(ped: types.Ped, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(810143995894630361)), ped, p1);
}
/// Checks if the specified sexiness flag is set
/// enum eSexinessFlags
/// {
/// SF_JEER_AT_HOT_PED = 0,
/// SF_HURRIEDFEMALES_SEXY = 1,
/// SF_HOT_PERSON = 2,
/// };
pub fn PED_HAS_SEXINESS_FLAG_SET(ped: types.Ped, sexinessFlag: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5093672105526449840)), ped, sexinessFlag);
}
/// Returns size of array, passed into the second variable.
/// See below for usage information.
/// This function actually requires a struct, where the first value is the maximum number of elements to return. Here is a sample of how I was able to get it to work correctly, without yet knowing the struct format.
/// //Setup the array
/// const int numElements = 10;
/// const int arrSize = numElements * 2 + 2;
/// Any veh[arrSize];
/// //0 index is the size of the array
/// veh[0] = numElements;
/// int count = PED::GET_PED_NEARBY_VEHICLES(PLAYER::PLAYER_PED_ID(), veh);
/// if (veh != NULL)
/// {
/// //Simple loop to go through results
/// for (int i = 0; i < count; i++)
/// {
/// int offsettedID = i * 2 + 2;
/// //Make sure it exists
/// if (veh[offsettedID] != NULL && ENTITY::DOES_ENTITY_EXIST(veh[offsettedID]))
/// {
/// //Do something
/// }
/// }
/// }
pub fn GET_PED_NEARBY_VEHICLES(ped: types.Ped, sizeAndVehs: [*c]types.Any) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(14985844084871073154)), ped, sizeAndVehs);
}
/// sizeAndPeds - is a pointer to an array. The array is filled with peds found nearby the ped supplied to the first argument.
/// ignore - ped type to ignore
/// Return value is the number of peds found and added to the array passed.
/// -----------------------------------
/// To make this work in most menu bases at least in C++ do it like so,
/// Formatted Example: https://pastebin.com/D8an9wwp
/// -----------------------------------
/// Example: gtaforums.com/topic/789788-function-args-to-pedget-ped-nearby-peds/?p=1067386687
pub fn GET_PED_NEARBY_PEDS(ped: types.Ped, sizeAndPeds: [*c]types.Any, ignore: c_int) c_int {
return nativeCaller.invoke3(@as(u64, @intCast(2592092050355407467)), ped, sizeAndPeds, ignore);
}
/// Used to be known as _HAS_STREAMED_PED_ASSETS_LOADED
pub fn HAVE_ALL_STREAMING_REQUESTS_COMPLETED(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8309284474277936130)), ped);
}
pub fn IS_PED_USING_ACTION_MODE(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(65078344399845189)), ped);
}
/// p2 is usually -1 in the scripts. action is either 0 or "DEFAULT_ACTION".
pub fn SET_PED_USING_ACTION_MODE(ped: types.Ped, p1: windows.BOOL, p2: c_int, action: [*c]const u8) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(15517940822472086375)), ped, p1, p2, action);
}
/// name: "MP_FEMALE_ACTION" found multiple times in the b617d scripts.
pub fn SET_MOVEMENT_MODE_OVERRIDE(ped: types.Ped, name: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8655330219874224082)), ped, name);
}
/// Overrides the ped's collision capsule radius for the current tick.
/// Must be called every tick to be effective.
/// Setting this to 0.001 will allow warping through some objects.
pub fn SET_PED_CAPSULE(ped: types.Ped, value: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3913053473658322402)), ped, value);
}
/// gtaforums.com/topic/885580-ped-headshotmugshot-txd/
pub fn REGISTER_PEDHEADSHOT(ped: types.Ped) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(4927612575077781622)), ped);
}
/// Used to be known as _REGISTER_PEDHEADSHOT_3
pub fn REGISTER_PEDHEADSHOT_HIRES(ped: types.Ped) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(13440999277212607765)), ped);
}
/// Similar to REGISTER_PEDHEADSHOT but creates a transparent background instead of black. Example: https://i.imgur.com/iHz8ztn.png
pub fn REGISTER_PEDHEADSHOT_TRANSPARENT(ped: types.Ped) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(10751609423277409199)), ped);
}
/// gtaforums.com/topic/885580-ped-headshotmugshot-txd/
pub fn UNREGISTER_PEDHEADSHOT(id: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10858519677351805695)), id);
}
/// gtaforums.com/topic/885580-ped-headshotmugshot-txd/
pub fn IS_PEDHEADSHOT_VALID(id: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11576897081859713442)), id);
}
/// gtaforums.com/topic/885580-ped-headshotmugshot-txd/
pub fn IS_PEDHEADSHOT_READY(id: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8107924672780253799)), id);
}
/// gtaforums.com/topic/885580-ped-headshotmugshot-txd/
pub fn GET_PEDHEADSHOT_TXD_STRING(id: c_int) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(15802758171925831019)), id);
}
pub fn REQUEST_PEDHEADSHOT_IMG_UPLOAD(id: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(17355447100583439909)), id);
}
pub fn RELEASE_PEDHEADSHOT_IMG_UPLOAD(id: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6724291129554947332)), id);
}
pub fn IS_PEDHEADSHOT_IMG_UPLOAD_AVAILABLE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(16984048875808885416)));
}
pub fn HAS_PEDHEADSHOT_IMG_UPLOAD_FAILED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9757375001082513869)));
}
pub fn HAS_PEDHEADSHOT_IMG_UPLOAD_SUCCEEDED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(16762795726337721665)));
}
pub fn SET_PED_HEATSCALE_OVERRIDE(ped: types.Ped, heatScale: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13976617951018964280)), ped, heatScale);
}
pub fn DISABLE_PED_HEATSCALE_OVERRIDE(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6917609043105950801)), ped);
}
pub fn SPAWNPOINTS_START_SEARCH(p0: f32, p1: f32, p2: f32, p3: f32, p4: f32, interiorFlags: c_int, scale: f32, duration: c_int) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(3312682903165293156)), p0, p1, p2, p3, p4, interiorFlags, scale, duration);
}
pub fn SPAWNPOINTS_START_SEARCH_IN_ANGLED_AREA(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, width: f32, interiorFlags: c_int, scale: f32, duration: c_int) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(12875774850951477807)), x1, y1, z1, x2, y2, z2, width, interiorFlags, scale, duration);
}
pub fn SPAWNPOINTS_CANCEL_SEARCH() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(18366986898585594360)));
}
pub fn SPAWNPOINTS_IS_SEARCH_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(4352535979295252318)));
}
pub fn SPAWNPOINTS_IS_SEARCH_COMPLETE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(11927497650722913723)));
}
pub fn SPAWNPOINTS_IS_SEARCH_FAILED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(17601719418638440338)));
}
pub fn SPAWNPOINTS_GET_NUM_SEARCH_RESULTS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(11976691108123291586)));
}
pub fn SPAWNPOINTS_GET_SEARCH_RESULT(randomInt: c_int, x: [*c]f32, y: [*c]f32, z: [*c]f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(2885820252165598864)), randomInt, x, y, z);
}
pub fn SPAWNPOINTS_GET_SEARCH_RESULT_FLAGS(p0: c_int, p1: [*c]c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13223404287353338581)), p0, p1);
}
pub fn SET_IK_TARGET(ped: types.Ped, ikIndex: c_int, entityLookAt: types.Entity, boneLookAt: c_int, offsetX: f32, offsetY: f32, offsetZ: f32, p7: types.Any, blendInDuration: c_int, blendOutDuration: c_int) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(14062342233199144153)), ped, ikIndex, entityLookAt, boneLookAt, offsetX, offsetY, offsetZ, p7, blendInDuration, blendOutDuration);
}
pub fn FORCE_INSTANT_LEG_IK_SETUP(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17094668775194429380)), ped);
}
pub fn REQUEST_ACTION_MODE_ASSET(asset: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2958345439083668888)), asset);
}
pub fn HAS_ACTION_MODE_ASSET_LOADED(asset: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16480347513358012005)), asset);
}
pub fn REMOVE_ACTION_MODE_ASSET(asset: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1434749392412277329)), asset);
}
pub fn REQUEST_STEALTH_MODE_ASSET(asset: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3029342537570676047)), asset);
}
pub fn HAS_STEALTH_MODE_ASSET_LOADED(asset: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16823192400983700545)), asset);
}
pub fn REMOVE_STEALTH_MODE_ASSET(asset: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10527592376442087490)), asset);
}
pub fn SET_PED_LOD_MULTIPLIER(ped: types.Ped, multiplier: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15865156897723921451)), ped, multiplier);
}
pub fn SET_PED_CAN_LOSE_PROPS_ON_DAMAGE(ped: types.Ped, toggle: windows.BOOL, p2: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(16744894345424298680)), ped, toggle, p2);
}
pub fn SET_FORCE_FOOTSTEP_UPDATE(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1338808158756540301)), ped, toggle);
}
pub fn SET_FORCE_STEP_TYPE(ped: types.Ped, p1: windows.BOOL, @"type": c_int, p3: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(14670066029040734573)), ped, p1, @"type", p3);
}
pub fn IS_ANY_HOSTILE_PED_NEAR_POINT(ped: types.Ped, x: f32, y: f32, z: f32, radius: f32) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(7527535547692248991)), ped, x, y, z, radius);
}
/// Toggles config flag CPED_CONFIG_FLAG_CanPlayInCarIdles.
/// Used to be known as _SET_PED_CAN_PLAY_IN_CAR_IDLES
pub fn SET_PED_CAN_PLAY_IN_CAR_IDLES(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9371595630247319501)), ped, toggle);
}
pub fn IS_TARGET_PED_IN_PERCEPTION_AREA(ped: types.Ped, targetPed: types.Ped, p2: f32, p3: f32, p4: f32, p5: f32) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(434726530479457705)), ped, targetPed, p2, p3, p4, p5);
}
/// Min and max are usually 100.0 and 200.0
pub fn SET_POP_CONTROL_SPHERE_THIS_FRAME(x: f32, y: f32, z: f32, min: f32, max: f32) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(15619537110062378797)), x, y, z, min, max);
}
pub fn FORCE_ZERO_MASS_IN_COLLISIONS(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15221509465143605188)), ped);
}
/// Used to be known as _SET_DISABLE_PED_FALL_DAMAGE
pub fn SET_DISABLE_HIGH_FALL_DEATH(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8149145075847096619)), ped, toggle);
}
pub fn SET_PED_PHONE_PALETTE_IDX(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9484978747130712226)), p0, p1);
}
/// Used to be known as _SET_PED_STEER_BIAS
pub fn SET_PED_STEER_BIAS(ped: types.Ped, value: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2922261323115769199)), ped, value);
}
/// Used to be known as _IS_PED_SWAPPING_WEAPON
pub fn IS_PED_SWITCHING_WEAPON(Ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4005222386344271542)), Ped);
}
pub fn SET_PED_TREATED_AS_FRIENDLY(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(1108555744747593070)), p0, p1, p2);
}
pub fn SET_DISABLE_PED_MAP_COLLISION(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16133736970873347067)), ped);
}
/// Used to be known as _SET_ENABLE_SCUBA_GEAR_LIGHT
pub fn ENABLE_MP_LIGHT(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17159971021127289167)), ped, toggle);
}
/// Used to be known as _IS_SCUBA_GEAR_LIGHT_ENABLED
pub fn GET_MP_LIGHT_ENABLED(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9810893952621839981)), ped);
}
/// Used to be known as _CLEAR_FACIAL_CLIPSET_OVERRIDE
pub fn CLEAR_COVER_POINT_FOR_PED(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7167517135969643512)), ped);
}
pub fn SET_ALLOW_STUNT_JUMP_CAMERA(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18066547061062479051)), ped, toggle);
}
};
pub const PHYSICS = struct {
/// Creates a rope at the specific position, that extends in the specified direction when not attached to any entities.
/// __
/// Add_Rope(pos.x,pos.y,pos.z,0.0,0.0,0.0,20.0,4,20.0,1.0,0.0,false,false,false,5.0,false,NULL)
/// When attached, Position<vector> does not matter
/// When attached, Angle<vector> does not matter
/// Rope Type:
/// 4 and bellow is a thick rope
/// 5 and up are small metal wires
/// 0 crashes the game
/// Max_length - Rope is forced to this length, generally best to keep this the same as your rope length.
/// windingSpeed - Speed the Rope is being winded, using native START_ROPE_WINDING. Set positive for winding and negative for unwinding.
/// Rigid - If max length is zero, and this is set to false the rope will become rigid (it will force a specific distance, what ever length is, between the objects).
/// breakable - Whether or not shooting the rope will break it.
/// unkPtr - unknown ptr, always 0 in orig scripts
/// __
/// Lengths can be calculated like so:
/// float distance = abs(x1 - x2) + abs(y1 - y2) + abs(z1 - z2); // Rope length
/// NOTES:
/// Rope does NOT interact with anything you attach it to, in some cases it make interact with the world AFTER it breaks (seems to occur if you set the type to -1).
/// Rope will sometimes contract and fall to the ground like you'd expect it to, but since it doesn't interact with the world the effect is just jaring.
pub fn ADD_ROPE(x: f32, y: f32, z: f32, rotX: f32, rotY: f32, rotZ: f32, length: f32, ropeType: c_int, maxLength: f32, minLength: f32, windingSpeed: f32, p11: windows.BOOL, p12: windows.BOOL, rigid: windows.BOOL, p14: f32, breakWhenShot: windows.BOOL, unkPtr: [*c]types.Any) c_int {
return nativeCaller.invoke17(@as(u64, @intCast(16731672373918347808)), x, y, z, rotX, rotY, rotZ, length, ropeType, maxLength, minLength, windingSpeed, p11, p12, rigid, p14, breakWhenShot, unkPtr);
}
pub fn DELETE_ROPE(ropeId: [*c]c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5959531772662662729)), ropeId);
}
pub fn DELETE_CHILD_ROPE(ropeId: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12276085912401926944)), ropeId);
}
pub fn DOES_ROPE_EXIST(ropeId: [*c]c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(18254295171343707542)), ropeId);
}
pub fn ROPE_DRAW_ENABLED(ropeId: [*c]c_int, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11650376164785061027)), ropeId, p1);
}
pub fn ROPE_DRAW_SHADOW_ENABLED(ropeId: [*c]c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17391114195629202344)), ropeId, toggle);
}
/// Rope presets can be found in the gamefiles. One example is "ropeFamily3", it is NOT a hash but rather a string.
pub fn LOAD_ROPE_DATA(ropeId: c_int, rope_preset: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14677798260016069927)), ropeId, rope_preset);
}
pub fn PIN_ROPE_VERTEX(ropeId: c_int, vertex: c_int, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(3112564522788239002)), ropeId, vertex, x, y, z);
}
pub fn UNPIN_ROPE_VERTEX(ropeId: c_int, vertex: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5429901816414925184)), ropeId, vertex);
}
pub fn GET_ROPE_VERTEX_COUNT(ropeId: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(3915305126917632181)), ropeId);
}
/// Attaches entity 1 to entity 2.
pub fn ATTACH_ENTITIES_TO_ROPE(ropeId: c_int, ent1: types.Entity, ent2: types.Entity, ent1_x: f32, ent1_y: f32, ent1_z: f32, ent2_x: f32, ent2_y: f32, ent2_z: f32, length: f32, p10: windows.BOOL, p11: windows.BOOL, p12: [*c]types.Any, p13: [*c]types.Any) void {
_ = nativeCaller.invoke14(@as(u64, @intCast(4437713091426519747)), ropeId, ent1, ent2, ent1_x, ent1_y, ent1_z, ent2_x, ent2_y, ent2_z, length, p10, p11, p12, p13);
}
/// The position supplied can be anywhere, and the entity should anchor relative to that point from it's origin.
pub fn ATTACH_ROPE_TO_ENTITY(ropeId: c_int, entity: types.Entity, x: f32, y: f32, z: f32, p5: windows.BOOL) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(5424878668781820517)), ropeId, entity, x, y, z, p5);
}
pub fn DETACH_ROPE_FROM_ENTITY(ropeId: c_int, entity: types.Entity) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13615228748778988669)), ropeId, entity);
}
pub fn ROPE_SET_UPDATE_PINVERTS(ropeId: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14471868725878409914)), ropeId);
}
pub fn ROPE_SET_UPDATE_ORDER(ropeId: c_int, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15877341769189295853)), ropeId, p1);
}
pub fn ROPE_SET_SMOOTH_REELIN(ropeId: c_int, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3948735200732213501)), ropeId, p1);
}
pub fn IS_ROPE_ATTACHED_AT_BOTH_ENDS(ropeId: [*c]c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9574155140062406384)), ropeId);
}
pub fn GET_ROPE_LAST_VERTEX_COORD(ropeId: c_int) types.Vector3 {
return nativeCaller.invoke1(@as(u64, @intCast(2430553729362132013)), ropeId);
}
pub fn GET_ROPE_VERTEX_COORD(ropeId: c_int, vertex: c_int) types.Vector3 {
return nativeCaller.invoke2(@as(u64, @intCast(16889002791013490253)), ropeId, vertex);
}
pub fn START_ROPE_WINDING(ropeId: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1468673947584050238)), ropeId);
}
pub fn STOP_ROPE_WINDING(ropeId: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14640440119028984444)), ropeId);
}
pub fn START_ROPE_UNWINDING_FRONT(ropeId: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6020487492214106537)), ropeId);
}
pub fn STOP_ROPE_UNWINDING_FRONT(ropeId: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18443266350541421491)), ropeId);
}
pub fn ROPE_CONVERT_TO_SIMPLE(ropeId: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6019576087505209242)), ropeId);
}
/// Loads rope textures for all ropes in the current scene.
pub fn ROPE_LOAD_TEXTURES() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(11209523089359657153)));
}
pub fn ROPE_ARE_TEXTURES_LOADED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(17496738158824412567)));
}
/// Unloads rope textures for all ropes in the current scene.
pub fn ROPE_UNLOAD_TEXTURES() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(7846233953947910499)));
}
/// Used to be known as _DOES_ROPE_BELONG_TO_THIS_SCRIPT
pub fn DOES_SCRIPT_OWN_ROPE(ropeId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2818300342655869961)), ropeId);
}
pub fn ROPE_ATTACH_VIRTUAL_BOUND_GEOM(ropeId: c_int, p1: c_int, p2: f32, p3: f32, p4: f32, p5: f32, p6: f32, p7: f32, p8: f32, p9: f32, p10: f32, p11: f32, p12: f32, p13: f32) void {
_ = nativeCaller.invoke14(@as(u64, @intCast(13550458828441540176)), ropeId, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10, p11, p12, p13);
}
pub fn ROPE_CHANGE_SCRIPT_OWNER(p0: types.Any, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(12805459340947862878)), p0, p1, p2);
}
pub fn ROPE_SET_REFFRAMEVELOCITY_COLLIDERORDER(ropeId: c_int, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13205670342611007504)), ropeId, p1);
}
/// Used to be known as _GET_ROPE_LENGTH
pub fn ROPE_GET_DISTANCE_BETWEEN_ENDS(ropeId: c_int) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(8287753169396147366)), ropeId);
}
/// Forces a rope to a certain length.
pub fn ROPE_FORCE_LENGTH(ropeId: c_int, length: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14990784799107701531)), ropeId, length);
}
/// Reset a rope to a certain length.
pub fn ROPE_RESET_LENGTH(ropeId: c_int, length: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13938052941319115936)), ropeId, length);
}
pub fn APPLY_IMPULSE_TO_CLOTH(posX: f32, posY: f32, posZ: f32, vecX: f32, vecY: f32, vecZ: f32, impulse: f32) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(16392946616666363780)), posX, posY, posZ, vecX, vecY, vecZ, impulse);
}
pub fn SET_DAMPING(entity: types.Entity, vertex: c_int, value: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(17195783518102140507)), entity, vertex, value);
}
pub fn ACTIVATE_PHYSICS(entity: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8143371989984347952)), entity);
}
pub fn SET_CGOFFSET(entity: types.Entity, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(15634871766511806724)), entity, x, y, z);
}
pub fn GET_CGOFFSET(entity: types.Entity) types.Vector3 {
return nativeCaller.invoke1(@as(u64, @intCast(9373297824573371922)), entity);
}
pub fn SET_CG_AT_BOUNDCENTER(entity: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13714038759131939103)), entity);
}
pub fn BREAK_ENTITY_GLASS(entity: types.Entity, p1: f32, p2: f32, p3: f32, p4: f32, p5: f32, p6: f32, p7: f32, p8: f32, p9: types.Any, p10: windows.BOOL) void {
_ = nativeCaller.invoke11(@as(u64, @intCast(3342951953186621683)), entity, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);
}
/// Used to be known as _DOES_ENTITY_HAVE_FRAG_INST
/// Used to be known as _GET_HAS_OBJECT_FRAG_INST
pub fn GET_IS_ENTITY_A_FRAG(object: types.Object) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(869519518610521630)), object);
}
pub fn SET_DISABLE_BREAKING(object: types.Object, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6695755901876206939)), object, toggle);
}
pub fn RESET_DISABLE_BREAKING(object: types.Object) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14730876592034363522)), object);
}
pub fn SET_DISABLE_FRAG_DAMAGE(object: types.Object, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(124476729854094587)), object, toggle);
}
/// PED_RAGDOLL_BUMP Proof?
/// Used to be known as _SET_ENTITY_PROOF_UNK
pub fn SET_USE_KINEMATIC_PHYSICS(entity: types.Entity, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1583372004919288402)), entity, toggle);
}
pub fn SET_IN_STUNT_MODE(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11438427401768909554)), p0);
}
/// Related to the lower-end of a vehicles fTractionCurve, e.g., from standing starts and acceleration from low/zero speeds.
/// Used to be known as _SET_LAUNCH_CONTROL_ENABLED
pub fn SET_IN_ARENA_MODE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12279733542163593583)), toggle);
}
};
pub const PLAYER = struct {
/// Gets the ped for a specified player index.
pub fn GET_PLAYER_PED(player: types.Player) types.Ped {
return nativeCaller.invoke1(@as(u64, @intCast(4874702607714914752)), player);
}
/// Does the same like PLAYER::GET_PLAYER_PED
pub fn GET_PLAYER_PED_SCRIPT_INDEX(player: types.Player) types.Ped {
return nativeCaller.invoke1(@as(u64, @intCast(5835191375820269281)), player);
}
/// Set the model for a specific Player. Be aware that this will destroy the current Ped for the Player and create a new one, any reference to the old ped should be reset
/// Make sure to request the model first and wait until it has loaded.
pub fn SET_PLAYER_MODEL(player: types.Player, model: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(45540521788082230)), player, model);
}
pub fn CHANGE_PLAYER_PED(player: types.Player, ped: types.Ped, p2: windows.BOOL, resetDamage: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(324692358308552430)), player, ped, p2, resetDamage);
}
pub fn GET_PLAYER_RGB_COLOUR(player: types.Player, r: [*c]c_int, g: [*c]c_int, b: [*c]c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(16790245784519841679)), player, r, g, b);
}
/// Gets the number of players in the current session.
/// If not multiplayer, always returns 1.
pub fn GET_NUMBER_OF_PLAYERS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(4646729180006083606)));
}
/// Gets the player's team.
/// Does nothing in singleplayer.
pub fn GET_PLAYER_TEAM(player: types.Player) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(3964173737923747848)), player);
}
/// Set player team on deathmatch and last team standing..
pub fn SET_PLAYER_TEAM(player: types.Player, team: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(187455978900965696)), player, team);
}
/// Used to be known as _GET_NUMBER_OF_PLAYERS_IN_TEAM
pub fn GET_NUMBER_OF_PLAYERS_IN_TEAM(team: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(2288391838204225265)), team);
}
pub fn GET_PLAYER_NAME(player: types.Player) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(7858190532816302584)), player);
}
/// Remnant from GTA IV. Does nothing in GTA V.
pub fn GET_WANTED_LEVEL_RADIUS(player: types.Player) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(602896624907716626)), player);
}
pub fn GET_PLAYER_WANTED_CENTRE_POSITION(player: types.Player) types.Vector3 {
return nativeCaller.invoke1(@as(u64, @intCast(905991576682964728)), player);
}
/// # Predominant call signatures
/// PLAYER::SET_PLAYER_WANTED_CENTRE_POSITION(PLAYER::PLAYER_ID(), ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), 1));
/// # Parameter value ranges
/// P0: PLAYER::PLAYER_ID()
/// P1: ENTITY::GET_ENTITY_COORDS(PLAYER::PLAYER_PED_ID(), 1)
/// P2: Not set by any call
pub fn SET_PLAYER_WANTED_CENTRE_POSITION(player: types.Player, position: [*c]types.Vector3, p2: windows.BOOL, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(5912755833973846868)), player, position, p2, p3);
}
/// Drft
pub fn GET_WANTED_LEVEL_THRESHOLD(wantedLevel: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(18289533611757229420)), wantedLevel);
}
/// Call SET_PLAYER_WANTED_LEVEL_NOW for immediate effect
/// wantedLevel is an integer value representing 0 to 5 stars even though the game supports the 6th wanted level but no police will appear since no definitions are present for it in the game files
/// disableNoMission- Disables When Off Mission- appears to always be false
pub fn SET_PLAYER_WANTED_LEVEL(player: types.Player, wantedLevel: c_int, disableNoMission: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(4179087318742194779)), player, wantedLevel, disableNoMission);
}
/// p2 is always false in R* scripts
pub fn SET_PLAYER_WANTED_LEVEL_NO_DROP(player: types.Player, wantedLevel: c_int, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(3751043147892200805)), player, wantedLevel, p2);
}
/// Forces any pending wanted level to be applied to the specified player immediately.
/// Call SET_PLAYER_WANTED_LEVEL with the desired wanted level, followed by SET_PLAYER_WANTED_LEVEL_NOW.
/// Second parameter is unknown (always false).
pub fn SET_PLAYER_WANTED_LEVEL_NOW(player: types.Player, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16188138165339409775)), player, p1);
}
pub fn ARE_PLAYER_FLASHING_STARS_ABOUT_TO_DROP(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12659484430345729257)), player);
}
pub fn ARE_PLAYER_STARS_GREYED_OUT(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(751735369465373403)), player);
}
pub fn IS_WANTED_AND_HAS_BEEN_SEEN_BY_COPS(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9081446565475122582)), player);
}
pub fn SET_DISPATCH_COPS_FOR_PLAYER(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15787126758079550452)), player, toggle);
}
pub fn IS_PLAYER_WANTED_LEVEL_GREATER(player: types.Player, wantedLevel: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(2561900175157029359)), player, wantedLevel);
}
/// This executes at the same as speed as PLAYER::SET_PLAYER_WANTED_LEVEL(player, 0, false);
/// PLAYER::GET_PLAYER_WANTED_LEVEL(player); executes in less than half the time. Which means that it's worth first checking if the wanted level needs to be cleared before clearing. However, this is mostly about good code practice and can important in other situations. The difference in time in this example is negligible.
pub fn CLEAR_PLAYER_WANTED_LEVEL(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12898964665736385689)), player);
}
pub fn IS_PLAYER_DEAD(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4777552329540785746)), player);
}
pub fn IS_PLAYER_PRESSING_HORN(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(18022891105905121529)), player);
}
/// Flags:
/// SPC_AMBIENT_SCRIPT = (1 << 1),
/// SPC_CLEAR_TASKS = (1 << 2),
/// SPC_REMOVE_FIRES = (1 << 3),
/// SPC_REMOVE_EXPLOSIONS = (1 << 4),
/// SPC_REMOVE_PROJECTILES = (1 << 5),
/// SPC_DEACTIVATE_GADGETS = (1 << 6),
/// SPC_REENABLE_CONTROL_ON_DEATH = (1 << 7),
/// SPC_LEAVE_CAMERA_CONTROL_ON = (1 << 8),
/// SPC_ALLOW_PLAYER_DAMAGE = (1 << 9),
/// SPC_DONT_STOP_OTHER_CARS_AROUND_PLAYER = (1 << 10),
/// SPC_PREVENT_EVERYBODY_BACKOFF = (1 << 11),
/// SPC_ALLOW_PAD_SHAKE = (1 << 12)
/// See: https://alloc8or.re/gta5/doc/enums/eSetPlayerControlFlag.txt
pub fn SET_PLAYER_CONTROL(player: types.Player, bHasControl: windows.BOOL, flags: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(10174252221492641954)), player, bHasControl, flags);
}
pub fn GET_PLAYER_WANTED_LEVEL(player: types.Player) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(16325078576001511725)), player);
}
pub fn SET_MAX_WANTED_LEVEL(maxWantedLevel: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12276534250078405817)), maxWantedLevel);
}
/// If toggle is set to false:
/// The police won't be shown on the (mini)map
/// If toggle is set to true:
/// The police will be shown on the (mini)map
pub fn SET_POLICE_RADAR_BLIPS(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4839238016204716223)), toggle);
}
/// The player will be ignored by the police if toggle is set to true
pub fn SET_POLICE_IGNORE_PLAYER(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3658658653323582058)), player, toggle);
}
/// Checks whether the specified player has a Ped, the Ped is not dead, is not injured and is not arrested.
pub fn IS_PLAYER_PLAYING(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6815464490581856410)), player);
}
pub fn SET_EVERYONE_IGNORE_PLAYER(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10299065303624326052)), player, toggle);
}
pub fn SET_ALL_RANDOM_PEDS_FLEE(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(391267708132141385)), player, toggle);
}
pub fn SET_ALL_RANDOM_PEDS_FLEE_THIS_FRAME(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5124304676750406898)), player);
}
/// Used to be known as SET_HUD_ANIM_STOP_LEVEL
pub fn SET_ALL_NEUTRAL_RANDOM_PEDS_FLEE(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16016438143247314529)), player, toggle);
}
/// - This is called after SET_ALL_RANDOM_PEDS_FLEE_THIS_FRAME
/// Used to be known as SET_AREAS_GENERATOR_ORIENTATION
pub fn SET_ALL_NEUTRAL_RANDOM_PEDS_FLEE_THIS_FRAME(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14066834293359561926)), player);
}
pub fn SET_LAW_PEDS_CAN_ATTACK_NON_WANTED_PLAYER_THIS_FRAME(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18070510473313286355)), player);
}
pub fn SET_IGNORE_LOW_PRIORITY_SHOCKING_EVENTS(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6442811240944981760)), player, toggle);
}
pub fn SET_WANTED_LEVEL_MULTIPLIER(multiplier: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(148160294804391866)), multiplier);
}
/// Max value is 1.0
pub fn SET_WANTED_LEVEL_DIFFICULTY(player: types.Player, difficulty: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11172220366678417018)), player, difficulty);
}
pub fn RESET_WANTED_LEVEL_DIFFICULTY(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13389445341602988509)), player);
}
/// Used to be known as _GET_WANTED_LEVEL_PAROLE_DURATION
pub fn GET_WANTED_LEVEL_TIME_TO_ESCAPE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(12043189406219501220)));
}
/// Used to be known as _SET_WANTED_LEVEL_HIDDEN_EVASION_TIME
pub fn SET_WANTED_LEVEL_HIDDEN_ESCAPE_TIME(player: types.Player, wantedLevel: c_int, lossTime: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(5312091079599474631)), player, wantedLevel, lossTime);
}
/// Used to be known as _RESET_WANTED_LEVEL_HIDDEN_EVASION_TIME
pub fn RESET_WANTED_LEVEL_HIDDEN_ESCAPE_TIME(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9385159572976851334)), player);
}
pub fn START_FIRING_AMNESTY(duration: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13806865574565084744)), duration);
}
/// PLAYER::REPORT_CRIME(PLAYER::PLAYER_ID(), 37, PLAYER::GET_WANTED_LEVEL_THRESHOLD(1));
/// From am_armybase.ysc.c4:
/// PLAYER::REPORT_CRIME(PLAYER::PLAYER_ID(4), 36, PLAYER::GET_WANTED_LEVEL_THRESHOLD(4));
/// -----
/// This was taken from the GTAV.exe v1.334. The function is called sub_140592CE8. For a full decompilation of the function, see here: https://pastebin.com/09qSMsN7
/// -----
/// crimeType:
/// 1: Firearms possession
/// 2: Person running a red light ("5-0-5")
/// 3: Reckless driver
/// 4: Speeding vehicle (a "5-10")
/// 5: Traffic violation (a "5-0-5")
/// 6: Motorcycle rider without a helmet
/// 7: Vehicle theft (a "5-0-3")
/// 8: Grand Theft Auto
/// 9: ???
/// 10: ???
/// 11: Assault on a civilian (a "2-40")
/// 12: Assault on an officer
/// 13: Assault with a deadly weapon (a "2-45")
/// 14: Officer shot (a "2-45")
/// 15: Pedestrian struck by a vehicle
/// 16: Officer struck by a vehicle
/// 17: Helicopter down (an "AC"?)
/// 18: Civilian on fire (a "2-40")
/// 19: Officer set on fire (a "10-99")
/// 20: Car on fire
/// 21: Air unit down (an "AC"?)
/// 22: An explosion (a "9-96")
/// 23: A stabbing (a "2-45") (also something else I couldn't understand)
/// 24: Officer stabbed (also something else I couldn't understand)
/// 25: Attack on a vehicle ("MDV"?)
/// 26: Damage to property
/// 27: Suspect threatening officer with a firearm
/// 28: Shots fired
/// 29: ???
/// 30: ???
/// 31: ???
/// 32: ???
/// 33: ???
/// 34: A "2-45"
/// 35: ???
/// 36: A "9-25"
/// 37: ???
/// 38: ???
/// 39: ???
/// 40: ???
/// 41: ???
/// 42: ???
/// 43: Possible disturbance
/// 44: Civilian in need of assistance
/// 45: ???
/// 46: ???
pub fn REPORT_CRIME(player: types.Player, crimeType: c_int, wantedLvlThresh: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(16839123424570066407)), player, crimeType, wantedLvlThresh);
}
/// crimeType: see REPORT_CRIME
/// Used to be known as _SWITCH_CRIME_TYPE
pub fn SUPPRESS_CRIME_THIS_FRAME(player: types.Player, crimeType: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11139779675151915064)), player, crimeType);
}
/// This native is used in both singleplayer and multiplayer scripts.
/// Always used like this in scripts
/// PLAYER::UPDATE_WANTED_POSITION_THIS_FRAME(PLAYER::PLAYER_ID());
pub fn UPDATE_WANTED_POSITION_THIS_FRAME(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13588645173305190651)), player);
}
/// This has been found in use in the decompiled files.
pub fn SUPPRESS_LOSING_WANTED_LEVEL_IF_HIDDEN_THIS_FRAME(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5073784287861558094)), player);
}
pub fn ALLOW_EVASION_HUD_IF_DISABLING_HIDDEN_EVASION_THIS_FRAME(player: types.Player, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3405182816286533114)), player, p1);
}
/// This has been found in use in the decompiled files.
pub fn FORCE_START_HIDDEN_EVASION(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12498560276991585554)), player);
}
pub fn SUPPRESS_WITNESSES_CALLING_POLICE_THIS_FRAME(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3959142945574267103)), player);
}
pub fn REPORT_POLICE_SPOTTED_PLAYER(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15881049930447711506)), player);
}
/// PLAYER::SET_LAW_RESPONSE_DELAY_OVERRIDE(rPtr((&l_122) + 71)); // Found in decompilation
/// ***
/// In "am_hold_up.ysc" used once:
/// l_8d._f47 = MISC::GET_RANDOM_FLOAT_IN_RANGE(18.0, 28.0);
/// PLAYER::SET_LAW_RESPONSE_DELAY_OVERRIDE((l_8d._f47));
pub fn SET_LAW_RESPONSE_DELAY_OVERRIDE(p0: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12997106438076901286)), p0);
}
/// 2 matches in 1 script - am_hold_up
/// Used in multiplayer scripts?
pub fn RESET_LAW_RESPONSE_DELAY_OVERRIDE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(14257211138295064)));
}
pub fn CAN_PLAYER_START_MISSION(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16029548722278906886)), player);
}
pub fn IS_PLAYER_READY_FOR_CUTSCENE(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10415909822333073040)), player);
}
pub fn IS_PLAYER_TARGETTING_ENTITY(player: types.Player, entity: types.Entity) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(8724308091205739702)), player, entity);
}
/// Assigns the handle of locked-on melee target to *entity that you pass it.
/// Returns false if no entity found.
pub fn GET_PLAYER_TARGET_ENTITY(player: types.Player, entity: [*c]types.Entity) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(1436051958677346249)), player, entity);
}
/// Gets a value indicating whether the specified player is currently aiming freely.
pub fn IS_PLAYER_FREE_AIMING(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3330833943310335111)), player);
}
/// Gets a value indicating whether the specified player is currently aiming freely at the specified entity.
pub fn IS_PLAYER_FREE_AIMING_AT_ENTITY(player: types.Player, entity: types.Entity) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(4325344363702095739)), player, entity);
}
/// Returns TRUE if it found an entity in your crosshair within range of your weapon. Assigns the handle of the target to the *entity that you pass it.
/// Returns false if no entity found.
pub fn GET_ENTITY_PLAYER_IS_FREE_AIMING_AT(player: types.Player, entity: [*c]types.Entity) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(2987514272108589712)), player, entity);
}
/// Affects the range of auto aim target.
pub fn SET_PLAYER_LOCKON_RANGE_OVERRIDE(player: types.Player, range: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2996614801672115453)), player, range);
}
/// Set whether this player should be able to do drive-bys.
/// "A drive-by is when a ped is aiming/shooting from vehicle. This includes middle finger taunts. By setting this value to false I confirm the player is unable to do all that. Tested on tick."
pub fn SET_PLAYER_CAN_DO_DRIVE_BY(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7964673893782916215)), player, toggle);
}
/// Sets whether this player can be hassled by gangs.
pub fn SET_PLAYER_CAN_BE_HASSLED_BY_GANGS(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15412550122795475526)), player, toggle);
}
/// Sets whether this player can take cover.
pub fn SET_PLAYER_CAN_USE_COVER(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15304824011544815636)), player, toggle);
}
/// Gets the maximum wanted level the player can get.
/// Ranges from 0 to 5.
pub fn GET_MAX_WANTED_LEVEL() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(5056994522776984671)));
}
pub fn IS_PLAYER_TARGETTING_ANYTHING(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8705428498500991140)), player);
}
pub fn SET_PLAYER_SPRINT(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11536956114075201012)), player, toggle);
}
pub fn RESET_PLAYER_STAMINA(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12029979906644123134)), player);
}
pub fn RESTORE_PLAYER_STAMINA(player: types.Player, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11768681773981695283)), player, p1);
}
pub fn GET_PLAYER_SPRINT_STAMINA_REMAINING(player: types.Player) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(4584408203958845143)), player);
}
pub fn GET_PLAYER_SPRINT_TIME_REMAINING(player: types.Player) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(1767025802996305049)), player);
}
pub fn GET_PLAYER_UNDERWATER_TIME_REMAINING(player: types.Player) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(11672478003903903537)), player);
}
/// Used to be known as _SET_PLAYER_UNDERWATER_TIME_REMAINING
pub fn SET_PLAYER_UNDERWATER_BREATH_PERCENT_REMAINING(player: types.Player, time: f32) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(11588858018531081848)), player, time);
}
/// Returns the group ID the player is member of.
pub fn GET_PLAYER_GROUP(player: types.Player) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(941944490316279983)), player);
}
pub fn GET_PLAYER_MAX_ARMOUR(player: types.Player) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(10549008456688745651)), player);
}
/// Can the player control himself, used to disable controls for player for things like a cutscene.
/// ---
/// You can't disable controls with this, use SET_PLAYER_CONTROL(...) for this.
pub fn IS_PLAYER_CONTROL_ON(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5315141875575487047)), player);
}
/// Returns true when the player is not able to control the cam i.e. when running a benchmark test, switching the player or viewing a cutscene.
/// Note: I am not 100% sure if the native actually checks if the cam control is disabled but it seems promising.
/// Used to be known as _IS_PLAYER_CAM_CONTROL_DISABLED
pub fn GET_ARE_CAMERA_CONTROLS_DISABLED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8971536799987876032)));
}
pub fn IS_PLAYER_SCRIPT_CONTROL_ON(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9982064081789376471)), player);
}
/// Returns TRUE if the player ('s ped) is climbing at the moment.
pub fn IS_PLAYER_CLIMBING(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10802155550941313948)), player);
}
/// Return true while player is being arrested / busted.
/// If atArresting is set to 1, this function will return 1 when player is being arrested (while player is putting his hand up, but still have control)
/// If atArresting is set to 0, this function will return 1 only when the busted screen is shown.
pub fn IS_PLAYER_BEING_ARRESTED(player: types.Player, atArresting: windows.BOOL) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(4074147724792802446)), player, atArresting);
}
pub fn RESET_PLAYER_ARREST_STATE(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3243683805626065110)), player);
}
/// Alternative: GET_VEHICLE_PED_IS_IN(PLAYER_PED_ID(), 1);
pub fn GET_PLAYERS_LAST_VEHICLE() types.Vehicle {
return nativeCaller.invoke0(@as(u64, @intCast(13157682470943312064)));
}
/// Returns the same as PLAYER_ID and NETWORK_PLAYER_ID_TO_INT
pub fn GET_PLAYER_INDEX() types.Player {
return nativeCaller.invoke0(@as(u64, @intCast(11956428154230912141)));
}
/// Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).
pub fn INT_TO_PLAYERINDEX(value: c_int) types.Player {
return nativeCaller.invoke1(@as(u64, @intCast(4736989022120507222)), value);
}
/// Simply returns whatever is passed to it (Regardless of whether the handle is valid or not).
/// --------------------------------------------------------
/// if (NETWORK::NETWORK_IS_PARTICIPANT_ACTIVE(PLAYER::INT_TO_PARTICIPANTINDEX(i)))
pub fn INT_TO_PARTICIPANTINDEX(value: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(11440937697330480912)), value);
}
pub fn GET_TIME_SINCE_PLAYER_HIT_VEHICLE(player: types.Player) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(6716534950534450912)), player);
}
pub fn GET_TIME_SINCE_PLAYER_HIT_PED(player: types.Player) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(16386951091587342146)), player);
}
pub fn GET_TIME_SINCE_PLAYER_DROVE_ON_PAVEMENT(player: types.Player) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(15373550519145956667)), player);
}
pub fn GET_TIME_SINCE_PLAYER_DROVE_AGAINST_TRAFFIC(player: types.Player) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(15819273152188223874)), player);
}
pub fn IS_PLAYER_FREE_FOR_AMBIENT_TASK(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15911169040677300916)), player);
}
/// This returns YOUR 'identity' as a Player type.
/// Always returns 0 in story mode.
pub fn PLAYER_ID() types.Player {
return nativeCaller.invoke0(@as(u64, @intCast(5730343094349521110)));
}
/// Returns current player ped
pub fn PLAYER_PED_ID() types.Ped {
return nativeCaller.invoke0(@as(u64, @intCast(15567071428299294886)));
}
/// Does exactly the same thing as PLAYER_ID()
pub fn NETWORK_PLAYER_ID_TO_INT() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(17178991153621971998)));
}
pub fn HAS_FORCE_CLEANUP_OCCURRED(cleanupFlags: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14512963100351546073)), cleanupFlags);
}
/// used with 1,2,8,64,128 in the scripts
pub fn FORCE_CLEANUP(cleanupFlags: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13585534833047170385)), cleanupFlags);
}
/// PLAYER::FORCE_CLEANUP_FOR_ALL_THREADS_WITH_THIS_NAME("pb_prostitute", 1); // Found in decompilation
pub fn FORCE_CLEANUP_FOR_ALL_THREADS_WITH_THIS_NAME(name: [*c]const u8, cleanupFlags: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5505894489745093399)), name, cleanupFlags);
}
pub fn FORCE_CLEANUP_FOR_THREAD_WITH_THIS_ID(id: c_int, cleanupFlags: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17817844820968675179)), id, cleanupFlags);
}
pub fn GET_CAUSE_OF_MOST_RECENT_FORCE_CLEANUP() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(11115393256838472306)));
}
pub fn SET_PLAYER_MAY_ONLY_ENTER_THIS_VEHICLE(player: types.Player, vehicle: types.Vehicle) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9234348980891588490)), player, vehicle);
}
pub fn SET_PLAYER_MAY_NOT_ENTER_ANY_VEHICLE(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2153701109743272266)), player);
}
/// 1 - Welcome to Los Santos
/// 2 - A Friendship Resurrected
/// 3 - A Fair Day's Pay
/// 4 - The Moment of Truth
/// 5 - To Live or Die in Los Santos
/// 6 - Diamond Hard
/// 7 - Subversive
/// 8 - Blitzed
/// 9 - Small Town, Big Job
/// 10 - The Government Gimps
/// 11 - The Big One!
/// 12 - Solid Gold, Baby!
/// 13 - Career Criminal
/// 14 - San Andreas Sightseer
/// 15 - All's Fare in Love and War
/// 16 - TP Industries Arms Race
/// 17 - Multi-Disciplined
/// 18 - From Beyond the Stars
/// 19 - A Mystery, Solved
/// 20 - Waste Management
/// 21 - Red Mist
/// 22 - Show Off
/// 23 - Kifflom!
/// 24 - Three Man Army
/// 25 - Out of Your Depth
/// 26 - Altruist Acolyte
/// 27 - A Lot of Cheddar
/// 28 - Trading Pure Alpha
/// 29 - Pimp My Sidearm
/// 30 - Wanted: Alive Or Alive
/// 31 - Los Santos Customs
/// 32 - Close Shave
/// 33 - Off the Plane
/// 34 - Three-Bit Gangster
/// 35 - Making Moves
/// 36 - Above the Law
/// 37 - Numero Uno
/// 38 - The Midnight Club
/// 39 - Unnatural Selection
/// 40 - Backseat Driver
/// 41 - Run Like The Wind
/// 42 - Clean Sweep
/// 43 - Decorated
/// 44 - Stick Up Kid
/// 45 - Enjoy Your Stay
/// 46 - Crew Cut
/// 47 - Full Refund
/// 48 - Dialling Digits
/// 49 - American Dream
/// 50 - A New Perspective
/// 51 - Be Prepared
/// 52 - In the Name of Science
/// 53 - Dead Presidents
/// 54 - Parole Day
/// 55 - Shot Caller
/// 56 - Four Way
/// 57 - Live a Little
/// 58 - Can't Touch This
/// 59 - Mastermind
/// 60 - Vinewood Visionary
/// 61 - Majestic
/// 62 - Humans of Los Santos
/// 63 - First Time Director
/// 64 - Animal Lover
/// 65 - Ensemble Piece
/// 66 - Cult Movie
/// 67 - Location Scout
/// 68 - Method Actor
/// 69 - Cryptozoologist
/// 70 - Getting Started
/// 71 - The Data Breaches
/// 72 - The Bogdan Problem
/// 73 - The Doomsday Scenario
/// 74 - A World Worth Saving
/// 75 - Orbital Obliteration
/// 76 - Elitist
/// 77 - Masterminds
pub fn GIVE_ACHIEVEMENT_TO_PLAYER(achievementId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13746964553983525269)), achievementId);
}
/// For Steam.
/// Does nothing and always returns false in the retail version of the game.
/// Used to be known as _SET_ACHIEVEMENT_PROGRESSION
/// Used to be known as _SET_ACHIEVEMENT_PROGRESS
pub fn SET_ACHIEVEMENT_PROGRESS(achievementId: c_int, progress: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(14028712679202106460)), achievementId, progress);
}
/// For Steam.
/// Always returns 0 in retail version of the game.
/// Used to be known as _GET_ACHIEVEMENT_PROGRESSION
/// Used to be known as _GET_ACHIEVEMENT_PROGRESS
pub fn GET_ACHIEVEMENT_PROGRESS(achievementId: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(2024482621431583541)), achievementId);
}
/// See GIVE_ACHIEVEMENT_TO_PLAYER
pub fn HAS_ACHIEVEMENT_BEEN_PASSED(achievementId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9688199240742057707)), achievementId);
}
/// Returns TRUE if the game is in online mode and FALSE if in offline mode.
/// This is an alias for NETWORK_IS_SIGNED_ONLINE.
pub fn IS_PLAYER_ONLINE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(17464171132920953788)));
}
/// this function is hard-coded to always return 0.
pub fn IS_PLAYER_LOGGING_IN_NP() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8382727314144132810)));
}
/// Purpose of the BOOL currently unknown.
/// Both, true and false, work
pub fn DISPLAY_SYSTEM_SIGNIN_UI(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10726862416215971742)), p0);
}
pub fn IS_SYSTEM_UI_BEING_DISPLAYED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6724188946249052473)));
}
/// Simply sets you as invincible (Health will not deplete).
/// Use 0x733A643B5B0C53C1 instead if you want Ragdoll enabled, which is equal to:
/// *(DWORD *)(playerPedAddress + 0x188) |= (1 << 9);
pub fn SET_PLAYER_INVINCIBLE(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2564000551796991966)), player, toggle);
}
/// Returns the Player's Invincible status.
/// This function will always return false if 0x733A643B5B0C53C1 is used to set the invincibility status. To always get the correct result, use this:
/// bool IsPlayerInvincible(Player player)
/// {
/// auto addr = getScriptHandleBaseAddress(GET_PLAYER_PED(player));
/// if (addr)
/// {
/// DWORD flag = *(DWORD *)(addr + 0x188);
/// return ((flag & (1 << 8)) != 0) || ((flag & (1 << 9)) != 0);
/// }
/// return false;
/// }
pub fn GET_PLAYER_INVINCIBLE(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13195995625634897415)), player);
}
/// Always returns false.
pub fn GET_PLAYER_DEBUG_INVINCIBLE(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15906842693044290991)), player);
}
/// Used to be known as _SET_PLAYER_INVINCIBLE_KEEP_RAGDOLL_ENABLED
pub fn SET_PLAYER_INVINCIBLE_BUT_HAS_REACTIONS(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7766879010926346315)), player, toggle);
}
pub fn SET_PLAYER_CAN_COLLECT_DROPPED_MONEY(player: types.Player, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14611211652835644255)), player, p1);
}
pub fn REMOVE_PLAYER_HELMET(player: types.Player, p2: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17558451738318955816)), player, p2);
}
pub fn GIVE_PLAYER_RAGDOLL_CONTROL(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4344223702803483176)), player, toggle);
}
/// Example from fm_mission_controler.ysc.c4:
/// PLAYER::SET_PLAYER_LOCKON(PLAYER::PLAYER_ID(), 1);
/// All other decompiled scripts using this seem to be using the player id as the first parameter, so I feel the need to confirm it as so.
/// No need to confirm it says PLAYER_ID() so it uses PLAYER_ID() lol.
pub fn SET_PLAYER_LOCKON(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6668475646901236366)), player, toggle);
}
/// Sets your targeting mode.
/// 0 = Assisted Aim - Full
/// 1 = Assisted Aim - Partial
/// 2 = Free Aim - Assisted
/// 3 = Free Aim
pub fn SET_PLAYER_TARGETING_MODE(targetMode: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12794841531097256947)), targetMode);
}
/// Returns targeting mode. See SET_PLAYER_TARGETING_MODE
pub fn GET_PLAYER_TARGETING_MODE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(9753633000823310542)));
}
pub fn SET_PLAYER_TARGET_LEVEL(targetLevel: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6269777142802657741)), targetLevel);
}
/// Returns profile setting 237.
pub fn GET_IS_USING_FPS_THIRD_PERSON_COVER() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(13388954822730783729)));
}
/// Returns profile setting 243.
pub fn GET_IS_USING_HOOD_CAMERA() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14655943016611488907)));
}
pub fn CLEAR_PLAYER_HAS_DAMAGED_AT_LEAST_ONE_PED(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17345185489865105304)), player);
}
pub fn HAS_PLAYER_DAMAGED_AT_LEAST_ONE_PED(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2363968351086004940)), player);
}
pub fn CLEAR_PLAYER_HAS_DAMAGED_AT_LEAST_ONE_NON_ANIMAL_PED(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5380879485422869041)), player);
}
pub fn HAS_PLAYER_DAMAGED_AT_LEAST_ONE_NON_ANIMAL_PED(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16481221038019450706)), player);
}
/// This can be between 1.0f - 14.9f
/// You can change the max in IDA from 15.0. I say 15.0 as the function blrs if what you input is greater than or equal to 15.0 hence why it's 14.9 max default.
pub fn SET_AIR_DRAG_MULTIPLIER_FOR_PLAYERS_VEHICLE(player: types.Player, multiplier: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14591038487492435614)), player, multiplier);
}
/// Swim speed multiplier.
/// Multiplier goes up to 1.49
/// Just call it one time, it is not required to be called once every tick. - Note copied from below native.
/// Note: At least the IDA method if you change the max float multiplier from 1.5 it will change it for both this and RUN_SPRINT below. I say 1.5 as the function blrs if what you input is greater than or equal to 1.5 hence why it's 1.49 max default.
pub fn SET_SWIM_MULTIPLIER_FOR_PLAYER(player: types.Player, multiplier: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12185736806130608659)), player, multiplier);
}
/// Multiplier goes up to 1.49 any value above will be completely overruled by the game and the multiplier will not take effect, this can be edited in memory however.
/// Just call it one time, it is not required to be called once every tick.
/// Note: At least the IDA method if you change the max float multiplier from 1.5 it will change it for both this and SWIM above. I say 1.5 as the function blrs if what you input is greater than or equal to 1.5 hence why it's 1.49 max default.
pub fn SET_RUN_SPRINT_MULTIPLIER_FOR_PLAYER(player: types.Player, multiplier: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7905078105765137929)), player, multiplier);
}
/// Returns the time since the character was arrested in (ms) milliseconds.
/// example
/// var time = Function.call<int>(Hash.GET_TIME_SINCE_LAST_ARREST();
/// UI.DrawSubtitle(time.ToString());
/// if player has not been arrested, the int returned will be -1.
pub fn GET_TIME_SINCE_LAST_ARREST() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(5792747526117565206)));
}
/// Returns the time since the character died in (ms) milliseconds.
/// example
/// var time = Function.call<int>(Hash.GET_TIME_SINCE_LAST_DEATH();
/// UI.DrawSubtitle(time.ToString());
/// if player has not died, the int returned will be -1.
pub fn GET_TIME_SINCE_LAST_DEATH() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(14340384834815123402)));
}
pub fn ASSISTED_MOVEMENT_CLOSE_ROUTE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(12591792016616722014)));
}
pub fn ASSISTED_MOVEMENT_FLUSH_ROUTE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(9665069012116897311)));
}
pub fn SET_PLAYER_FORCED_AIM(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1147942369090643750)), player, toggle);
}
pub fn SET_PLAYER_FORCED_ZOOM(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8495993443580991746)), player, toggle);
}
pub fn SET_PLAYER_FORCE_SKIP_AIM_INTRO(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8525802710196937000)), player, toggle);
}
/// Inhibits the player from using any method of combat including melee and firearms.
/// NOTE: Only disables the firing for one frame
pub fn DISABLE_PLAYER_FIRING(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6804024751275371192)), player, toggle);
}
/// Used only once in R* scripts (freemode.ysc).
pub fn DISABLE_PLAYER_THROW_GRENADE_WHILE_USING_GUN() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(13296179899875993181)));
}
pub fn SET_DISABLE_AMBIENT_MELEE_MOVE(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3353681963845701516)), player, toggle);
}
/// Default is 100. Use player id and not ped id. For instance: PLAYER::SET_PLAYER_MAX_ARMOUR(PLAYER::PLAYER_ID(), 100); // main_persistent.ct4
pub fn SET_PLAYER_MAX_ARMOUR(player: types.Player, value: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8637847965451127921)), player, value);
}
/// p1 is always 0 in the scripts
/// Used to be known as _SPECIAL_ABILITY_ACTIVATE
pub fn SPECIAL_ABILITY_ACTIVATE(player: types.Player, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9376455402216964240)), player, p1);
}
/// Used to be known as _SET_SPECIAL_ABILITY
pub fn SET_SPECIAL_ABILITY_MP(player: types.Player, p1: c_int, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(12832115919238461466)), player, p1, p2);
}
/// p1 is always 0 in the scripts
/// Used to be known as _SPECIAL_ABILITY_DEPLETE
pub fn SPECIAL_ABILITY_DEACTIVATE_MP(player: types.Player, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1726927179191124624)), player, p1);
}
pub fn SPECIAL_ABILITY_DEACTIVATE(player: types.Player, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15467986508560539735)), player, p1);
}
pub fn SPECIAL_ABILITY_DEACTIVATE_FAST(player: types.Player, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11292158172906032474)), player, p1);
}
pub fn SPECIAL_ABILITY_RESET(player: types.Player, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3989923684365507220)), player, p1);
}
pub fn SPECIAL_ABILITY_CHARGE_ON_MISSION_FAILED(player: types.Player, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14530692506368557930)), player, p1);
}
/// Every occurrence of p1 & p2 were both true.
pub fn SPECIAL_ABILITY_CHARGE_SMALL(player: types.Player, p1: windows.BOOL, p2: windows.BOOL, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(3349441619739895933)), player, p1, p2, p3);
}
/// Only 1 match. Both p1 & p2 were true.
pub fn SPECIAL_ABILITY_CHARGE_MEDIUM(player: types.Player, p1: windows.BOOL, p2: windows.BOOL, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(17371478509595477523)), player, p1, p2, p3);
}
/// 2 matches. p1 was always true.
pub fn SPECIAL_ABILITY_CHARGE_LARGE(player: types.Player, p1: windows.BOOL, p2: windows.BOOL, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(17812849642795793811)), player, p1, p2, p3);
}
/// p1 appears to always be 1 (only comes up twice)
pub fn SPECIAL_ABILITY_CHARGE_CONTINUOUS(player: types.Player, p1: types.Ped, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(17097941492585458071)), player, p1, p2);
}
/// p1 appears as 5, 10, 15, 25, or 30. p2 is always true.
pub fn SPECIAL_ABILITY_CHARGE_ABSOLUTE(player: types.Player, p1: c_int, p2: windows.BOOL, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(13236227802081120397)), player, p1, p2, p3);
}
/// normalizedValue is from 0.0 - 1.0
/// p2 is always 1
/// Used to be known as RESET_SPECIAL_ABILITY_CONTROLS_CINEMATIC
pub fn SPECIAL_ABILITY_CHARGE_NORMALIZED(player: types.Player, normalizedValue: f32, p2: windows.BOOL, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(11558886904674512408)), player, normalizedValue, p2, p3);
}
/// Also known as _RECHARGE_SPECIAL_ABILITY
pub fn SPECIAL_ABILITY_FILL_METER(player: types.Player, p1: windows.BOOL, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(4444112602787563904)), player, p1, p2);
}
/// p1 was always true.
pub fn SPECIAL_ABILITY_DEPLETE_METER(player: types.Player, p1: windows.BOOL, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2112308878322558539)), player, p1, p2);
}
pub fn SPECIAL_ABILITY_LOCK(playerModel: types.Hash, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7640867858484067603)), playerModel, p1);
}
pub fn SPECIAL_ABILITY_UNLOCK(playerModel: types.Hash, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17385569934691179067)), playerModel, p1);
}
pub fn IS_SPECIAL_ABILITY_UNLOCKED(playerModel: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14267825189556299412)), playerModel);
}
pub fn IS_SPECIAL_ABILITY_ACTIVE(player: types.Player, p1: types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(4494451451678248469)), player, p1);
}
pub fn IS_SPECIAL_ABILITY_METER_FULL(player: types.Player, p1: types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(405885062257517959)), player, p1);
}
pub fn ENABLE_SPECIAL_ABILITY(player: types.Player, toggle: windows.BOOL, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(1738039364168966433)), player, toggle, p2);
}
pub fn IS_SPECIAL_ABILITY_ENABLED(player: types.Player, p1: types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(12813304981393175499)), player, p1);
}
pub fn SET_SPECIAL_ABILITY_MULTIPLIER(multiplier: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11861428562303797943)), multiplier);
}
pub fn UPDATE_SPECIAL_ABILITY_FROM_STAT(player: types.Player, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18441835452672090510)), player, p1);
}
/// Appears once in "re_dealgonewrong"
pub fn GET_IS_PLAYER_DRIVING_ON_HIGHWAY(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6900766719502757299)), player);
}
/// Only 1 occurrence. p1 was 2.
pub fn GET_IS_PLAYER_DRIVING_WRECKLESS(player: types.Player, p1: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(17369052242503363059)), player, p1);
}
/// 2 occurrences in agency_heist3a. p1 was 0.7f then 0.4f.
pub fn GET_IS_MOPPING_AREA_FREE_IN_FRONT_OF_PLAYER(player: types.Player, p1: f32) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(15935460304965693425)), player, p1);
}
/// `findCollisionLand`: This teleports the player to land when set to true and will not consider the Z coordinate parameter provided by you. It will automatically put the Z coordinate so that you don't fall from sky.
pub fn START_PLAYER_TELEPORT(player: types.Player, x: f32, y: f32, z: f32, heading: f32, p5: windows.BOOL, findCollisionLand: windows.BOOL, p7: windows.BOOL) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(12472139131140050910)), player, x, y, z, heading, p5, findCollisionLand, p7);
}
/// Used to be known as _HAS_PLAYER_TELEPORT_FINISHED
pub fn UPDATE_PLAYER_TELEPORT(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16302283480354081889)), player);
}
/// Disables the player's teleportation
pub fn STOP_PLAYER_TELEPORT() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(14144097709538345116)));
}
pub fn IS_PLAYER_TELEPORT_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(194031241483815023)));
}
pub fn GET_PLAYER_CURRENT_STEALTH_NOISE(player: types.Player) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(3402853668735809655)), player);
}
/// `regenRate`: The recharge multiplier, a value between 0.0 and 1.0.
/// Use 1.0 to reset it back to normal
pub fn SET_PLAYER_HEALTH_RECHARGE_MULTIPLIER(player: types.Player, regenRate: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6752691015583894065)), player, regenRate);
}
/// Used to be known as _GET_PLAYER_HEALTH_RECHARGE_LIMIT
pub fn GET_PLAYER_HEALTH_RECHARGE_MAX_PERCENT(player: types.Player) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(10071480034128492799)), player);
}
/// Used to be known as _SET_PLAYER_HEALTH_RECHARGE_LIMIT
pub fn SET_PLAYER_HEALTH_RECHARGE_MAX_PERCENT(player: types.Player, limit: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14089688388591795252)), player, limit);
}
/// Needs to be called every frame.
pub fn DISABLE_PLAYER_HEALTH_RECHARGE(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13596477513821136486)), player);
}
/// Used to be known as _SET_PLAYER_FALL_DISTANCE
pub fn SET_PLAYER_FALL_DISTANCE_TO_TRIGGER_RAGDOLL_OVERRIDE(player: types.Player, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17282457639463922123)), player, p1);
}
/// This modifies the damage value of your weapon. Whether it is a multiplier or base damage is unknown.
/// Based on tests, it is unlikely to be a multiplier.
/// modifier's min value is 0.1
pub fn SET_PLAYER_WEAPON_DAMAGE_MODIFIER(player: types.Player, modifier: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14846039169330490787)), player, modifier);
}
/// modifier's min value is 0.1
pub fn SET_PLAYER_WEAPON_DEFENSE_MODIFIER(player: types.Player, modifier: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3279671666617174588)), player, modifier);
}
/// modifier's min value is 0.1
/// Used to be known as _SET_PLAYER_WEAPON_DEFENSE_MODIFIER_2
pub fn SET_PLAYER_WEAPON_MINIGUN_DEFENSE_MODIFIER(player: types.Player, modifier: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13618298056193550300)), player, modifier);
}
/// modifier's min value is 0.1
pub fn SET_PLAYER_MELEE_WEAPON_DAMAGE_MODIFIER(player: types.Player, modifier: f32, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(5349651752238059570)), player, modifier, p2);
}
/// modifier's min value is 0.1
pub fn SET_PLAYER_MELEE_WEAPON_DEFENSE_MODIFIER(player: types.Player, modifier: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12561668789842461922)), player, modifier);
}
/// modifier's min value is 0.1
pub fn SET_PLAYER_VEHICLE_DAMAGE_MODIFIER(player: types.Player, modifier: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11893462893929705228)), player, modifier);
}
/// modifier's min value is 0.1
pub fn SET_PLAYER_VEHICLE_DEFENSE_MODIFIER(player: types.Player, modifier: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5503652662492472418)), player, modifier);
}
pub fn SET_PLAYER_MAX_EXPLOSIVE_DAMAGE(player: types.Player, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10193482152665883205)), player, p1);
}
pub fn SET_PLAYER_EXPLOSIVE_DAMAGE_MODIFIER(player: types.Player, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15573734946140815442)), player, p1);
}
pub fn SET_PLAYER_WEAPON_TAKEDOWN_DEFENSE_MODIFIER(player: types.Player, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3596418458115689787)), player, p1);
}
/// Tints:
/// None = -1,
/// Rainbow = 0,
/// Red = 1,
/// SeasideStripes = 2,
/// WidowMaker = 3,
/// Patriot = 4,
/// Blue = 5,
/// Black = 6,
/// Hornet = 7,
/// AirFocce = 8,
/// Desert = 9,
/// Shadow = 10,
/// HighAltitude = 11,
/// Airbone = 12,
/// Sunrise = 13,
pub fn SET_PLAYER_PARACHUTE_TINT_INDEX(player: types.Player, tintIndex: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11804186708958356965)), player, tintIndex);
}
/// Tints:
/// None = -1,
/// Rainbow = 0,
/// Red = 1,
/// SeasideStripes = 2,
/// WidowMaker = 3,
/// Patriot = 4,
/// Blue = 5,
/// Black = 6,
/// Hornet = 7,
/// AirFocce = 8,
/// Desert = 9,
/// Shadow = 10,
/// HighAltitude = 11,
/// Airbone = 12,
/// Sunrise = 13,
pub fn GET_PLAYER_PARACHUTE_TINT_INDEX(player: types.Player, tintIndex: [*c]c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8490401996352368965)), player, tintIndex);
}
/// Tints:
/// None = -1,
/// Rainbow = 0,
/// Red = 1,
/// SeasideStripes = 2,
/// WidowMaker = 3,
/// Patriot = 4,
/// Blue = 5,
/// Black = 6,
/// Hornet = 7,
/// AirFocce = 8,
/// Desert = 9,
/// Shadow = 10,
/// HighAltitude = 11,
/// Airbone = 12,
/// Sunrise = 13,
pub fn SET_PLAYER_RESERVE_PARACHUTE_TINT_INDEX(player: types.Player, index: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12611425305903619896)), player, index);
}
/// Tints:
/// None = -1,
/// Rainbow = 0,
/// Red = 1,
/// SeasideStripes = 2,
/// WidowMaker = 3,
/// Patriot = 4,
/// Blue = 5,
/// Black = 6,
/// Hornet = 7,
/// AirFocce = 8,
/// Desert = 9,
/// Shadow = 10,
/// HighAltitude = 11,
/// Airbone = 12,
/// Sunrise = 13,
pub fn GET_PLAYER_RESERVE_PARACHUTE_TINT_INDEX(player: types.Player, index: [*c]c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15393328524069293888)), player, index);
}
/// tints 0- 13
/// 0 - unkown
/// 1 - unkown
/// 2 - unkown
/// 3 - unkown
/// 4 - unkown
pub fn SET_PLAYER_PARACHUTE_PACK_TINT_INDEX(player: types.Player, tintIndex: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10642282067781501024)), player, tintIndex);
}
pub fn GET_PLAYER_PARACHUTE_PACK_TINT_INDEX(player: types.Player, tintIndex: [*c]c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7970373186624480674)), player, tintIndex);
}
pub fn SET_PLAYER_HAS_RESERVE_PARACHUTE(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9068757119162565475)), player);
}
pub fn GET_PLAYER_HAS_RESERVE_PARACHUTE(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6764374752099253411)), player);
}
pub fn SET_PLAYER_CAN_LEAVE_PARACHUTE_SMOKE_TRAIL(player: types.Player, enabled: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17582529595820257107)), player, enabled);
}
pub fn SET_PLAYER_PARACHUTE_SMOKE_TRAIL_COLOR(player: types.Player, r: c_int, g: c_int, b: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(9374239562500810191)), player, r, g, b);
}
pub fn GET_PLAYER_PARACHUTE_SMOKE_TRAIL_COLOR(player: types.Player, r: [*c]c_int, g: [*c]c_int, b: [*c]c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(17246213354101229703)), player, r, g, b);
}
/// example:
/// flags: 0-6
/// PLAYER::SET_PLAYER_RESET_FLAG_PREFER_REAR_SEATS(PLAYER::PLAYER_ID(), 6);
/// wouldnt the flag be the seatIndex?
/// Used to be known as SET_PLAYER_RESET_FLAG_PREFER_REAR_SEATS
pub fn SET_PLAYER_PHONE_PALETTE_IDX(player: types.Player, flags: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1285205011011698912)), player, flags);
}
pub fn SET_PLAYER_NOISE_MULTIPLIER(player: types.Player, multiplier: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15819438297272679657)), player, multiplier);
}
/// Values around 1.0f to 2.0f used in game scripts.
pub fn SET_PLAYER_SNEAKING_NOISE_MULTIPLIER(player: types.Player, multiplier: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12880755172382995580)), player, multiplier);
}
pub fn CAN_PED_HEAR_PLAYER(player: types.Player, ped: types.Ped) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(17480502303258429993)), player, ped);
}
/// This is to make the player walk without accepting input from INPUT.
/// gaitType is in increments of 100s. 2000, 500, 300, 200, etc.
/// p4 is always 1 and p5 is always 0.
/// C# Example :
/// Function.Call(Hash.SIMULATE_PLAYER_INPUT_GAIT, Game.Player, 1.0f, 100, 1.0f, 1, 0); //Player will go forward for 100ms
pub fn SIMULATE_PLAYER_INPUT_GAIT(player: types.Player, amount: f32, gaitType: c_int, speed: f32, p4: windows.BOOL, p5: windows.BOOL, p6: types.Any) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(5151376232427735645)), player, amount, gaitType, speed, p4, p5, p6);
}
pub fn RESET_PLAYER_INPUT_GAIT(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1824833368012609169)), player);
}
pub fn SET_AUTO_GIVE_PARACHUTE_WHEN_ENTER_PLANE(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11471849700316629942)), player, toggle);
}
pub fn SET_AUTO_GIVE_SCUBA_GEAR_WHEN_EXIT_VEHICLE(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15182502641979446141)), player, toggle);
}
pub fn SET_PLAYER_STEALTH_PERCEPTION_MODIFIER(player: types.Player, value: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5661061848659480698)), player, value);
}
pub fn IS_REMOTE_PLAYER_IN_NON_CLONED_VEHICLE(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7568969492851950582)), player);
}
pub fn INCREASE_PLAYER_JUMP_SUPPRESSION_RANGE(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11447436568753426874)), player);
}
pub fn SET_PLAYER_SIMULATE_AIMING(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14216902889763161525)), player, toggle);
}
pub fn SET_PLAYER_CLOTH_PIN_FRAMES(player: types.Player, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8403626605533980976)), player, p1);
}
/// Every occurrence was either 0 or 2.
pub fn SET_PLAYER_CLOTH_PACKAGE_INDEX(index: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11491983583685846272)), index);
}
/// 6 matches across 4 scripts. 5 occurrences were 240. The other was 255.
pub fn SET_PLAYER_CLOTH_LOCK_COUNTER(value: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1502253629415880154)), value);
}
/// Only 1 match. ob_sofa_michael.
/// PLAYER::PLAYER_ATTACH_VIRTUAL_BOUND(-804.5928f, 173.1801f, 71.68436f, 0f, 0f, 0.590625f, 1f, 0.7f);1.0.335.2, 1.0.350.1/2, 1.0.372.2, 1.0.393.2, 1.0.393.4, 1.0.463.1;
pub fn PLAYER_ATTACH_VIRTUAL_BOUND(p0: f32, p1: f32, p2: f32, p3: f32, p4: f32, p5: f32, p6: f32, p7: f32) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(17100575969275211089)), p0, p1, p2, p3, p4, p5, p6, p7);
}
/// 1.0.335.2, 1.0.350.1/2, 1.0.372.2, 1.0.393.2, 1.0.393.4, 1.0.463.1;
pub fn PLAYER_DETACH_VIRTUAL_BOUND() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(2149775572197631945)));
}
pub fn HAS_PLAYER_BEEN_SPOTTED_IN_STOLEN_VEHICLE(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15493917686594916172)), player);
}
/// Returns true if an unk value is greater than 0.0f
pub fn IS_PLAYER_BATTLE_AWARE(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4094490764435692537)), player);
}
pub fn GET_PLAYER_RECEIVED_BATTLE_EVENT_RECENTLY(player: types.Player, p1: c_int, p2: windows.BOOL) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(13548890130111313158)), player, p1, p2);
}
/// Appears only 3 times in the scripts, more specifically in michael1.ysc
/// -
/// This can be used to prevent dying if you are "out of the world"
/// Used to be known as _EXPAND_WORLD_LIMITS
pub fn EXTEND_WORLD_BOUNDARY_FOR_PLAYER(x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(5766535433347029031)), x, y, z);
}
pub fn RESET_WORLD_BOUNDARY_FOR_PLAYER() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(15716982420889755470)));
}
/// Returns true if the player is riding a train.
pub fn IS_PLAYER_RIDING_TRAIN(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5674859435992752534)), player);
}
pub fn HAS_PLAYER_LEFT_THE_WORLD(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15374690669139436180)), player);
}
pub fn SET_PLAYER_LEAVE_PED_BEHIND(player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18388210980731636235)), player, toggle);
}
/// p1 was always 5.
/// p4 was always false.
pub fn SET_PLAYER_PARACHUTE_VARIATION_OVERRIDE(player: types.Player, p1: c_int, p2: types.Any, p3: types.Any, p4: windows.BOOL) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(15647838870677501228)), player, p1, p2, p3, p4);
}
pub fn CLEAR_PLAYER_PARACHUTE_VARIATION_OVERRIDE(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1102477168737024801)), player);
}
pub fn SET_PLAYER_PARACHUTE_MODEL_OVERRIDE(player: types.Player, model: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10916079413933097947)), player, model);
}
/// Used to be known as _SET_PLAYER_RESERVE_PARACHUTE_MODEL_OVERRIDE
pub fn SET_PLAYER_RESERVE_PARACHUTE_MODEL_OVERRIDE(player: types.Player, model: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(532630280031652059)), player, model);
}
/// Used to be known as _GET_PLAYER_PARACHUTE_MODEL_OVERRIDE
pub fn GET_PLAYER_PARACHUTE_MODEL_OVERRIDE(player: types.Player) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(13986360186682891329)), player);
}
/// Used to be known as _GET_PLAYER_RESERVE_PARACHUTE_MODEL_OVERRIDE
pub fn GET_PLAYER_RESERVE_PARACHUTE_MODEL_OVERRIDE(player: types.Player) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(4033723783619137677)), player);
}
pub fn CLEAR_PLAYER_PARACHUTE_MODEL_OVERRIDE(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9751306387685043775)), player);
}
/// Used to be known as _CLEAR_PLAYER_RESERVE_PARACHUTE_MODEL_OVERRIDE
pub fn CLEAR_PLAYER_RESERVE_PARACHUTE_MODEL_OVERRIDE(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2958060723185474280)), player);
}
pub fn SET_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(player: types.Player, model: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15888880642546084708)), player, model);
}
pub fn CLEAR_PLAYER_PARACHUTE_PACK_MODEL_OVERRIDE(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1208458126999759682)), player);
}
pub fn DISABLE_PLAYER_VEHICLE_REWARDS(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13925902161512632927)), player);
}
pub fn SET_PLAYER_SPECTATED_VEHICLE_RADIO_OVERRIDE(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3421868636458483809)), p0);
}
pub fn SET_PLAYER_BLUETOOTH_STATE(player: types.Player, state: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6756536921968746817)), player, state);
}
pub fn IS_PLAYER_BLUETOOTH_ENABLE(player: types.Player) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7348447710819006384)), player);
}
pub fn DISABLE_CAMERA_VIEW_MODE_CYCLE(player: types.Player) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6125378890949434679)), player);
}
pub fn GET_PLAYER_FAKE_WANTED_LEVEL(player: types.Player) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(6201560425862729466)), player);
}
pub fn SET_PLAYER_CAN_DAMAGE_PLAYER(player1: types.Player, player2: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(6196039133528458004)), player1, player2, toggle);
}
pub fn SET_APPLY_WAYPOINT_OF_PLAYER(player: types.Player, hudColor: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2558795628960999354)), player, hudColor);
}
pub fn IS_PLAYER_VEHICLE_WEAPON_TOGGLED_TO_NON_HOMING(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7945301916505659338)), p0);
}
/// Unsets playerPed+330 if the current weapon has certain flags.
pub fn SET_PLAYER_VEHICLE_WEAPON_TO_NON_HOMING(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2554738238460888649)), p0);
}
/// Used to be known as _SET_PLAYER_HOMING_ROCKET_DISABLED
pub fn SET_PLAYER_HOMING_DISABLED_FOR_ALL_VEHICLE_WEAPONS(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17171871140348143684)), p0, p1);
}
pub fn ADD_PLAYER_TARGETABLE_ENTITY(player: types.Player, entity: types.Entity) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10419055117599351082)), player, entity);
}
pub fn REMOVE_PLAYER_TARGETABLE_ENTITY(player: types.Player, entity: types.Entity) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11467866675314801827)), player, entity);
}
pub fn SET_PLAYER_PREVIOUS_VARIATION_DATA(player: types.Player, p1: c_int, p2: c_int, p3: types.Any, p4: types.Any, p5: types.Any) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(8912175574354996747)), player, p1, p2, p3, p4, p5);
}
/// Resets values set by SET_SCRIPT_FIRE_POSITION
pub fn REMOVE_SCRIPT_FIRE_POSITION() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(8163021664210251993)));
}
pub fn SET_SCRIPT_FIRE_POSITION(coordX: f32, coordY: f32, coordZ: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(8116474636952575443)), coordX, coordY, coordZ);
}
};
pub const RECORDING = struct {
pub fn REPLAY_START_EVENT(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5215762791066942760)), p0);
}
pub fn REPLAY_STOP_EVENT() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(9352761002800684937)));
}
pub fn REPLAY_CANCEL_EVENT() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(1419567061659479568)));
}
pub fn REPLAY_RECORD_BACK_FOR_TIME(p0: f32, p1: f32, p2: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2968471225523162812)), p0, p1, p2);
}
/// -This function appears to be deprecated/ unused. Tracing the call internally leads to a _nullsub -
/// first one seems to be a string of a mission name, second one seems to be a bool/toggle
/// p1 was always 0.
pub fn REPLAY_CHECK_FOR_EVENT_THIS_FRAME(missionNameLabel: [*c]const u8, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2343987307675302960)), missionNameLabel, p1);
}
/// This disable the recording feature and has to be called every frame.
/// Used to be known as _STOP_RECORDING_THIS_FRAME
pub fn REPLAY_PREVENT_RECORDING_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(16946291525136165696)));
}
pub fn REPLAY_RESET_EVENT_INFO() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(17894001569556575619)));
}
/// This will disable the ability to make camera changes in R* Editor.
/// Used to be known as _DISABLE_ROCKSTAR_EDITOR_CAMERA_CHANGES
pub fn REPLAY_DISABLE_CAMERA_MOVEMENT_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(12639032320734114120)));
}
/// Does nothing (it's a nullsub).
pub fn RECORD_GREATEST_MOMENT(p0: c_int, p1: c_int, p2: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(7392416448564788858)), p0, p1, p2);
}
/// Starts recording a replay.
/// If mode is 0, turns on action replay.
/// If mode is 1, starts recording.
/// If already recording a replay, does nothing.
/// Used to be known as _START_RECORDING
pub fn START_REPLAY_RECORDING(mode: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14099697308171152513)), mode);
}
/// Stops recording and saves the recorded clip.
/// Used to be known as _STOP_RECORDING
/// Used to be known as _STOP_RECORDING_AND_SAVE_CLIP
pub fn STOP_REPLAY_RECORDING() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(511811220243728563)));
}
/// Stops recording and discards the recorded clip.
/// Used to be known as _STOP_RECORDING_AND_DISCARD_CLIP
pub fn CANCEL_REPLAY_RECORDING() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(9852526917964636736)));
}
/// Used to be known as _SAVE_RECORDING_CLIP
pub fn SAVE_REPLAY_RECORDING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(7225259157996652315)));
}
/// Checks if you're recording, returns TRUE when you start recording (F1) or turn on action replay (F2)
/// mov al, cs:g_bIsRecordingGameplay // byte_141DD0CD0 in b944
/// retn
/// Used to be known as _IS_RECORDING
pub fn IS_REPLAY_RECORDING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(1772107567646544052)));
}
pub fn IS_REPLAY_INITIALIZED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(16090118124908059541)));
}
pub fn IS_REPLAY_AVAILABLE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(4792639800086006755)));
}
pub fn IS_REPLAY_RECORD_SPACE_AVAILABLE(p0: windows.BOOL) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3734749103720410061)), p0);
}
};
pub const REPLAY = struct {
/// Does nothing (it's a nullsub).
pub fn REGISTER_EFFECT_FOR_REPLAY_EDITOR(p0: [*c]const u8, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9091593298042183433)), p0, p1);
}
/// Returns a bool if interior rendering is disabled, if yes, all "normal" rendered interiors are invisible
/// Used to be known as _IS_INTERIOR_RENDERING_DISABLED
pub fn REPLAY_SYSTEM_HAS_REQUESTED_A_SCRIPT_CLEANUP() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(10784866962491865944)));
}
/// Disables some other rendering (internal)
pub fn SET_SCRIPTS_HAVE_CLEANED_UP_FOR_REPLAY_SYSTEM() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(6544736507913168339)));
}
pub fn SET_REPLAY_SYSTEM_PAUSED_FOR_SAVE(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16165696561629620122)), p0);
}
/// Sets (almost, not sure) all Rockstar Editor values (bIsRecording etc) to 0.
/// Used to be known as _RESET_EDITOR_VALUES
pub fn REPLAY_CONTROL_SHUTDOWN() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(3698529787668625041)));
}
/// Please note that you will need to call DO_SCREEN_FADE_IN after exiting the Rockstar Editor when you call this.
/// Used to be known as _ACTIVATE_ROCKSTAR_EDITOR
pub fn ACTIVATE_ROCKSTAR_EDITOR(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5321708044775270181)), p0);
}
};
pub const SAVEMIGRATION = struct {
pub fn SAVEMIGRATION_IS_MP_ENABLED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9562295298770119708)));
}
pub fn SAVEMIGRATION_MP_REQUEST_ACCOUNTS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9652374613921926258)));
}
pub fn SAVEMIGRATION_MP_GET_ACCOUNTS_STATUS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(14468756743965811402)));
}
pub fn SAVEMIGRATION_MP_NUM_ACCOUNTS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(8620278917687544917)));
}
pub fn SAVEMIGRATION_MP_GET_ACCOUNT(p0: c_int, p1: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(18222255130820806140)), p0, p1);
}
pub fn SAVEMIGRATION_MP_REQUEST_STATUS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(16566900704589225885)));
}
pub fn SAVEMIGRATION_MP_GET_STATUS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(7569274153508003944)));
}
};
pub const SCRIPT = struct {
pub fn REQUEST_SCRIPT(scriptName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7977554008792313486)), scriptName);
}
pub fn SET_SCRIPT_AS_NO_LONGER_NEEDED(scriptName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14487285925372368972)), scriptName);
}
/// Returns if a script has been loaded into the game. Used to see if a script was loaded after requesting.
pub fn HAS_SCRIPT_LOADED(scriptName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16630842602425130737)), scriptName);
}
pub fn DOES_SCRIPT_EXIST(scriptName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(18159767552029868442)), scriptName);
}
/// formerly _REQUEST_STREAMED_SCRIPT
/// Used to be known as _REQUEST_STREAMED_SCRIPT
pub fn REQUEST_SCRIPT_WITH_NAME_HASH(scriptHash: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15432261226617787366)), scriptHash);
}
/// Used to be known as _SET_STREAMED_SCRIPT_AS_NO_LONGER_NEEDED
pub fn SET_SCRIPT_WITH_NAME_HASH_AS_NO_LONGER_NEEDED(scriptHash: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14248267209664748327)), scriptHash);
}
/// Used to be known as _HAS_STREAMED_SCRIPT_LOADED
pub fn HAS_SCRIPT_WITH_NAME_HASH_LOADED(scriptHash: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6849707268841237508)), scriptHash);
}
/// Used to be known as _DOES_SCRIPT_WITH_NAME_HASH_EXIST
pub fn DOES_SCRIPT_WITH_NAME_HASH_EXIST(scriptHash: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(17900299737247191937)), scriptHash);
}
pub fn TERMINATE_THREAD(threadId: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14461491531900042452)), threadId);
}
pub fn IS_THREAD_ACTIVE(threadId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5109806802820293655)), threadId);
}
/// Used to be known as _GET_THREAD_NAME
/// Used to be known as _GET_NAME_OF_THREAD
pub fn GET_NAME_OF_SCRIPT_WITH_THIS_ID(threadId: c_int) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(406497875456797035)), threadId);
}
/// Starts a new iteration of the current threads.
/// Call this first, then SCRIPT_THREAD_ITERATOR_GET_NEXT_THREAD_ID (0x30B4FA1C82DD4B9F)
/// Used to be known as _BEGIN_ENUMERATING_THREADS
pub fn SCRIPT_THREAD_ITERATOR_RESET() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(15771515346973967272)));
}
/// If the function returns 0, the end of the iteration has been reached.
/// Used to be known as _GET_ID_OF_NEXT_THREAD_IN_ENUMERATION
pub fn SCRIPT_THREAD_ITERATOR_GET_NEXT_THREAD_ID() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(3509705009990028191)));
}
pub fn GET_ID_OF_THIS_THREAD() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(14052137831553183265)));
}
pub fn TERMINATE_THIS_THREAD() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(1193458620648027898)));
}
/// Gets the number of instances of the specified script is currently running.
/// Actually returns numRefs - 1.
/// if (program)
/// v3 = rage::scrProgram::GetNumRefs(program) - 1;
/// return v3;
/// Used to be known as _GET_NUMBER_OF_INSTANCES_OF_STREAMED_SCRIPT
/// Used to be known as _GET_NUMBER_OF_INSTANCES_OF_SCRIPT_WITH_NAME_HASH
/// Used to be known as _GET_NUMBER_OF_REFERENCES_OF_SCRIPT_WITH_NAME_HASH
pub fn GET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH(scriptHash: types.Hash) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(3207594115197814009)), scriptHash);
}
pub fn GET_THIS_SCRIPT_NAME() [*c]const u8 {
return nativeCaller.invoke0(@as(u64, @intCast(4912875783519368074)));
}
/// Used to be known as _GET_THIS_SCRIPT_HASH
pub fn GET_HASH_OF_THIS_SCRIPT_NAME() types.Hash {
return nativeCaller.invoke0(@as(u64, @intCast(9951982208438757502)));
}
/// eventGroup: 0 = SCRIPT_EVENT_QUEUE_AI (CEventGroupScriptAI), 1 = SCRIPT_EVENT_QUEUE_NETWORK (CEventGroupScriptNetwork)
pub fn GET_NUMBER_OF_EVENTS(eventGroup: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(6886749890234687658)), eventGroup);
}
/// eventGroup: 0 = SCRIPT_EVENT_QUEUE_AI (CEventGroupScriptAI), 1 = SCRIPT_EVENT_QUEUE_NETWORK (CEventGroupScriptNetwork)
pub fn GET_EVENT_EXISTS(eventGroup: c_int, eventIndex: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(10623535673165802933)), eventGroup, eventIndex);
}
/// eventGroup: 0 = SCRIPT_EVENT_QUEUE_AI (CEventGroupScriptAI), 1 = SCRIPT_EVENT_QUEUE_NETWORK (CEventGroupScriptNetwork)
pub fn GET_EVENT_AT_INDEX(eventGroup: c_int, eventIndex: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(15633799955427500371)), eventGroup, eventIndex);
}
/// eventGroup: 0 = SCRIPT_EVENT_QUEUE_AI (CEventGroupScriptAI), 1 = SCRIPT_EVENT_QUEUE_NETWORK (CEventGroupScriptNetwork)
/// Note: eventDataSize is NOT the size in bytes, it is the size determined by the SIZE_OF operator (RAGE Script operator, not C/C++ sizeof). That is, the size in bytes divided by 8 (script variables are always 8-byte aligned!).
pub fn GET_EVENT_DATA(eventGroup: c_int, eventIndex: c_int, eventData: [*c]types.Any, eventDataSize: c_int) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(2955069715068431737)), eventGroup, eventIndex, eventData, eventDataSize);
}
/// eventGroup: 0 = SCRIPT_EVENT_QUEUE_AI (CEventGroupScriptAI), 1 = SCRIPT_EVENT_QUEUE_NETWORK (CEventGroupScriptNetwork)
/// Note: eventDataSize is NOT the size in bytes, it is the size determined by the SIZE_OF operator (RAGE Script operator, not C/C++ sizeof). That is, the size in bytes divided by 8 (script variables are always 8-byte aligned!).
/// playerBits (also known as playersToBroadcastTo) is a bitset that indicates which players this event should be sent to. In order to send the event to specific players only, use (1 << playerIndex). Set all bits if it should be broadcast to all players.
pub fn TRIGGER_SCRIPT_EVENT(eventGroup: c_int, eventData: [*c]types.Any, eventDataSize: c_int, playerBits: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(6550939030955736669)), eventGroup, eventData, eventDataSize, playerBits);
}
pub fn SHUTDOWN_LOADING_SCREEN() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(544582165167134263)));
}
pub fn SET_NO_LOADING_SCREEN(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5936531669087452681)), toggle);
}
/// Used to be known as _GET_NO_LOADING_SCREEN
pub fn GET_NO_LOADING_SCREEN() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(1783749871316081084)));
}
pub fn COMMIT_TO_LOADINGSCREEN_SELCTION() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(12778812655719714715)));
}
/// Returns true if bit 0 in GtaThread+0x154 is set.
/// Used to be known as _BG_EXITED_BECAUSE_BACKGROUND_THREAD_STOPPED
pub fn BG_IS_EXITFLAG_SET() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9469770879987954890)));
}
/// Sets bit 1 in GtaThread+0x154
pub fn BG_SET_EXITFLAG_RESPONSE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(8505347739182930154)));
}
/// Hashed version of BG_START_CONTEXT.
pub fn BG_START_CONTEXT_HASH(contextHash: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8480716019117618375)), contextHash);
}
/// Hashed version of BG_END_CONTEXT.
pub fn BG_END_CONTEXT_HASH(contextHash: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1188489364839345089)), contextHash);
}
/// Inserts the given context into the background scripts context map.
pub fn BG_START_CONTEXT(contextName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11338416496334613197)), contextName);
}
/// Deletes the given context from the background scripts context map.
pub fn BG_END_CONTEXT(contextName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15864964160901128413)), contextName);
}
pub fn BG_DOES_LAUNCH_PARAM_EXIST(scriptIndex: c_int, p1: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(1112141424794654182)), scriptIndex, p1);
}
pub fn BG_GET_LAUNCH_PARAM_VALUE(scriptIndex: c_int, p1: [*c]const u8) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(2513606438577291593)), scriptIndex, p1);
}
pub fn BG_GET_SCRIPT_ID_FROM_NAME_HASH(p0: types.Hash) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(9411628416378742135)), p0);
}
/// New variant of SEND_TU_SCRIPT_EVENT that automatically initializes the event data header.
/// See TRIGGER_SCRIPT_EVENT for more info.
pub fn _SEND_TU_SCRIPT_EVENT_NEW(eventGroup: c_int, eventData: [*c]types.Any, eventDataSize: c_int, playerBits: c_int, eventType: types.Hash) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(8189505884342181163)), eventGroup, eventData, eventDataSize, playerBits, eventType);
}
};
pub const SECURITY = struct {
/// Registers a protected variable that will be checked for modifications by the anticheat
/// Used to be known as _REGISTER_PROTECTED_VARIABLE
pub fn REGISTER_SCRIPT_VARIABLE(variable: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4677866712381006524)), variable);
}
/// Used to be known as _UNREGISTER_PROTECTED_VARIABLE
pub fn UNREGISTER_SCRIPT_VARIABLE(variable: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3749869730642106009)), variable);
}
/// Used to be known as _FORCE_CHECK_PROTECTED_VARIABLES_NOW
pub fn FORCE_CHECK_SCRIPT_VARIABLES() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(10256959941064618848)));
}
};
pub const SHAPETEST = struct {
/// Asynchronously starts a line-of-sight (raycast) world probe shape test.
/// Use the handle with 0x3D87450E15D98694 or 0x65287525D951F6BE until it returns 0 or 2.
/// p8 is a bit mask with bits 1, 2 and/or 4, relating to collider types; 4 should usually be used.
pub fn START_SHAPE_TEST_LOS_PROBE(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, flags: c_int, entity: types.Entity, p8: c_int) c_int {
return nativeCaller.invoke9(@as(u64, @intCast(9145110827451611406)), x1, y1, z1, x2, y2, z2, flags, entity, p8);
}
/// Does the same as 0x7EE9F5D83DD4F90E, except blocking until the shape test completes.
/// Used to be known as _CAST_RAY_POINT_TO_POINT
/// Used to be known as _START_SHAPE_TEST_RAY
pub fn START_EXPENSIVE_SYNCHRONOUS_SHAPE_TEST_LOS_PROBE(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, flags: c_int, entity: types.Entity, p8: c_int) c_int {
return nativeCaller.invoke9(@as(u64, @intCast(3997233671787402630)), x1, y1, z1, x2, y2, z2, flags, entity, p8);
}
pub fn START_SHAPE_TEST_BOUNDING_BOX(entity: types.Entity, flags1: c_int, flags2: c_int) c_int {
return nativeCaller.invoke3(@as(u64, @intCast(371607932468809415)), entity, flags1, flags2);
}
pub fn START_SHAPE_TEST_BOX(x: f32, y: f32, z: f32, dimX: f32, dimY: f32, dimZ: f32, rotX: f32, rotY: f32, rotZ: f32, p9: types.Any, flags: c_int, entity: types.Entity, p12: types.Any) c_int {
return nativeCaller.invoke13(@as(u64, @intCast(18322439210830667032)), x, y, z, dimX, dimY, dimZ, rotX, rotY, rotZ, p9, flags, entity, p12);
}
pub fn START_SHAPE_TEST_BOUND(entity: types.Entity, flags1: c_int, flags2: c_int) c_int {
return nativeCaller.invoke3(@as(u64, @intCast(3969945164008163584)), entity, flags1, flags2);
}
/// Raycast from point to point, where the ray has a radius.
/// flags:
/// vehicles=10
/// peds =12
/// Iterating through flags yields many ped / vehicle/ object combinations
/// p9 = 7, but no idea what it does
/// Entity is an entity to ignore
/// Used to be known as _CAST_3D_RAY_POINT_TO_POINT
pub fn START_SHAPE_TEST_CAPSULE(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, radius: f32, flags: c_int, entity: types.Entity, p9: c_int) c_int {
return nativeCaller.invoke10(@as(u64, @intCast(2906964826188852352)), x1, y1, z1, x2, y2, z2, radius, flags, entity, p9);
}
/// Used to be known as _START_SHAPE_TEST_CAPSULE_2
pub fn START_SHAPE_TEST_SWEPT_SPHERE(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, radius: f32, flags: c_int, entity: types.Entity, p9: types.Any) c_int {
return nativeCaller.invoke10(@as(u64, @intCast(16621779372552499204)), x1, y1, z1, x2, y2, z2, radius, flags, entity, p9);
}
/// Returns a ShapeTest handle that can be used with GET_SHAPE_TEST_RESULT.
/// In its only usage in game scripts its called with flag set to 511, entity to player_ped_id and flag2 set to 7
/// Used to be known as _START_SHAPE_TEST_SURROUNDING_COORDS
pub fn START_SHAPE_TEST_MOUSE_CURSOR_LOS_PROBE(pVec1: [*c]types.Vector3, pVec2: [*c]types.Vector3, flag: c_int, entity: types.Entity, flag2: c_int) c_int {
return nativeCaller.invoke5(@as(u64, @intCast(18405055629834616628)), pVec1, pVec2, flag, entity, flag2);
}
/// Returns the result of a shape test: 0 if the handle is invalid, 1 if the shape test is still pending, or 2 if the shape test has completed, and the handle should be invalidated.
/// When used with an asynchronous shape test, this native should be looped until returning 0 or 2, after which the handle is invalidated.
/// Used to be known as _GET_RAYCAST_RESULT
pub fn GET_SHAPE_TEST_RESULT(shapeTestHandle: c_int, hit: [*c]windows.BOOL, endCoords: [*c]types.Vector3, surfaceNormal: [*c]types.Vector3, entityHit: [*c]types.Entity) c_int {
return nativeCaller.invoke5(@as(u64, @intCast(4433588284967978644)), shapeTestHandle, hit, endCoords, surfaceNormal, entityHit);
}
/// Returns the result of a shape test, also returning the material of any touched surface.
/// When used with an asynchronous shape test, this native should be looped until returning 0 or 2, after which the handle is invalidated.
/// Unless the return value is 2, the other return values are undefined.
/// Used to be known as _GET_SHAPE_TEST_RESULT_EX
pub fn GET_SHAPE_TEST_RESULT_INCLUDING_MATERIAL(shapeTestHandle: c_int, hit: [*c]windows.BOOL, endCoords: [*c]types.Vector3, surfaceNormal: [*c]types.Vector3, materialHash: [*c]types.Hash, entityHit: [*c]types.Entity) c_int {
return nativeCaller.invoke6(@as(u64, @intCast(7289204802319414974)), shapeTestHandle, hit, endCoords, surfaceNormal, materialHash, entityHit);
}
/// Invalidates the entity handle passed by removing the fwScriptGuid from the entity. This should be used when receiving an ambient entity from shape testing natives, but can also be used for other natives returning an 'irrelevant' entity handle.
/// Used to be known as _SHAPE_TEST_RESULT_ENTITY
pub fn RELEASE_SCRIPT_GUID_FROM_ENTITY(entityHit: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3112889752278063001)), entityHit);
}
};
pub const SOCIALCLUB = struct {
/// Used to be known as _GET_TOTAL_SC_INBOX_IDS
pub fn SC_INBOX_GET_TOTAL_NUM_MESSAGES() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(263812360228702308)));
}
pub fn SC_INBOX_GET_MESSAGE_TYPE_AT_INDEX(msgIndex: c_int) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(13514917029022889668)), msgIndex);
}
pub fn SC_INBOX_GET_MESSAGE_IS_READ_AT_INDEX(msgIndex: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10593186631268433160)), msgIndex);
}
pub fn SC_INBOX_SET_MESSAGE_AS_READ_AT_INDEX(msgIndex: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3170907184822864413)), msgIndex);
}
pub fn SC_INBOX_MESSAGE_GET_DATA_INT(p0: c_int, context: [*c]const u8, out: [*c]c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(11533435248767665518)), p0, context, out);
}
/// Used to be known as _SC_INBOX_MESSAGE_GET_DATA_BOOL
pub fn SC_INBOX_MESSAGE_GET_DATA_BOOL(p0: c_int, p1: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(18439356932900619549)), p0, p1);
}
pub fn SC_INBOX_MESSAGE_GET_DATA_STRING(p0: c_int, context: [*c]const u8, out: [*c]u8) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(8463089720764308333)), p0, context, out);
}
/// Used to be known as _SC_INBOX_MESSAGE_PUSH
pub fn SC_INBOX_MESSAGE_DO_APPLY(p0: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11109395550867416090)), p0);
}
/// Used to be known as _SC_INBOX_MESSAGE_GET_STRING
pub fn SC_INBOX_MESSAGE_GET_RAW_TYPE_AT_INDEX(p0: c_int) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(17573922154676531972)), p0);
}
pub fn SC_INBOX_MESSAGE_PUSH_GAMER_T0_RECIP_LIST(gamerHandle: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15709201857782019146)), gamerHandle);
}
/// Used to be known as _SC_INBOX_MESSAGE_SEND_UGC_STAT_UPDATE_EVENT
pub fn SC_INBOX_SEND_UGCSTATUPDATE_TO_RECIP_LIST(data: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12001315800923192070)), data);
}
pub fn SC_INBOX_MESSAGE_GET_UGCDATA(p0: c_int, p1: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(7626887770285646420)), p0, p1);
}
/// Used to be known as _SC_INBOX_MESSAGE_GET_BOUNTY_DATA
pub fn SC_INBOX_GET_BOUNTY_DATA_AT_INDEX(index: c_int, outData: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(9790831289471689958)), index, outData);
}
/// Used to be known as _SC_INBOX_GET_EMAILS
pub fn SC_EMAIL_RETRIEVE_EMAILS(offset: c_int, limit: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(291288992813482378)), offset, limit);
}
pub fn SC_EMAIL_GET_RETRIEVAL_STATUS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(1646770941550933162)));
}
pub fn SC_EMAIL_GET_NUM_RETRIEVED_EMAILS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(9057174982204174488)));
}
pub fn SC_EMAIL_GET_EMAIL_AT_INDEX(p0: c_int, p1: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5131737488626825222)), p0, p1);
}
pub fn SC_EMAIL_DELETE_EMAILS(p0: [*c]types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4948508597307199963)), p0, p1);
}
pub fn SC_EMAIL_MESSAGE_PUSH_GAMER_TO_RECIP_LIST(gamerHandle: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2535738978395512086)), gamerHandle);
}
pub fn SC_EMAIL_MESSAGE_CLEAR_RECIP_LIST() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(6187785034258785134)));
}
pub fn SC_EMAIL_SEND_EMAIL(p0: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1256426564723646231)), p0);
}
pub fn SC_EMAIL_SET_CURRENT_EMAIL_TAG(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(566281623328471127)), p0);
}
/// Used to be known as _SET_HANDLE_ROCKSTAR_MESSAGE_VIA_SCRIPT
pub fn SC_CACHE_NEW_ROCKSTAR_MSGS(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13808218334375472253)), toggle);
}
/// Used to be known as _IS_ROCKSTAR_MESSAGE_READY_FOR_SCRIPT
pub fn SC_HAS_NEW_ROCKSTAR_MSG() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(13554930057724333422)));
}
/// Used to be known as _ROCKSTAR_MESSAGE_GET_STRING
pub fn SC_GET_NEW_ROCKSTAR_MSG() [*c]const u8 {
return nativeCaller.invoke0(@as(u64, @intCast(16097162829550704520)));
}
pub fn SC_PRESENCE_ATTR_SET_INT(attrHash: types.Hash, value: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(2242395150778537927)), attrHash, value);
}
pub fn SC_PRESENCE_ATTR_SET_FLOAT(attrHash: types.Hash, value: f32) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(14178553594052299300)), attrHash, value);
}
pub fn SC_PRESENCE_ATTR_SET_STRING(attrHash: types.Hash, value: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(2918085674462623125)), attrHash, value);
}
pub fn SC_PRESENCE_SET_ACTIVITY_RATING(p0: types.Any, p1: f32) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5222226121362177503)), p0, p1);
}
pub fn SC_GAMERDATA_GET_INT(name: [*c]const u8, value: [*c]c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(14436975971694084778)), name, value);
}
pub fn SC_GAMERDATA_GET_FLOAT(name: [*c]const u8, value: [*c]f32) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(12065364329591679685)), name, value);
}
/// Used to be known as _SC_GET_IS_PROFILE_ATTRIBUTE_SET
pub fn SC_GAMERDATA_GET_BOOL(name: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9518074474632173527)), name);
}
pub fn SC_GAMERDATA_GET_STRING(name: [*c]const u8, value: [*c]u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(9222457167027436223)), name, value);
}
pub fn SC_GAMERDATA_GET_ACTIVE_XP_BONUS(value: [*c]f32) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3280675837645596255)), value);
}
/// Starts a task to check an entered string for profanity on the ROS/Social Club services.
/// See also: 1753344C770358AE, 82E4A58BABC15AE7.
/// Used to be known as _SC_START_CHECK_STRING_TASK
pub fn SC_PROFANITY_CHECK_STRING(string: [*c]const u8, token: [*c]c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(8458653310818113603)), string, token);
}
/// Used to be known as _SC_PROFANITY_CHECK_UGC_STRING
pub fn SC_PROFANITY_CHECK_STRING_UGC(string: [*c]const u8, token: [*c]c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(16945910801758026280)), string, token);
}
/// Used to be known as _SC_HAS_CHECK_STRING_TASK_COMPLETED
pub fn SC_PROFANITY_GET_CHECK_IS_VALID(token: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1680744588958193838)), token);
}
/// Used to be known as _SC_GET_CHECK_STRING_STATUS
pub fn SC_PROFANITY_GET_CHECK_IS_PENDING(token: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9431845538921274087)), token);
}
pub fn SC_PROFANITY_GET_STRING_PASSED(token: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9607122277766007145)), token);
}
pub fn SC_PROFANITY_GET_STRING_STATUS(token: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(10596374189893078243)), token);
}
pub fn SC_LICENSEPLATE_CHECK_STRING(p0: [*c]const u8, p1: [*c]c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(17778710458491060032)), p0, p1);
}
pub fn SC_LICENSEPLATE_GET_CHECK_IS_VALID(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(17450499666599218810)), p0);
}
pub fn SC_LICENSEPLATE_GET_CHECK_IS_PENDING(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10536139669876519254)), p0);
}
pub fn SC_LICENSEPLATE_GET_COUNT(token: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(8071974299159078780)), token);
}
pub fn SC_LICENSEPLATE_GET_PLATE(token: c_int, plateIndex: c_int) [*c]const u8 {
return nativeCaller.invoke2(@as(u64, @intCast(2108888205053243600)), token, plateIndex);
}
pub fn SC_LICENSEPLATE_GET_PLATE_DATA(token: c_int, plateIndex: c_int) [*c]const u8 {
return nativeCaller.invoke2(@as(u64, @intCast(3353379682425139395)), token, plateIndex);
}
pub fn SC_LICENSEPLATE_SET_PLATE_DATA(oldPlateText: [*c]const u8, newPlateText: [*c]const u8, plateData: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(15054977193248966378)), oldPlateText, newPlateText, plateData);
}
pub fn SC_LICENSEPLATE_ADD(plateText: [*c]const u8, plateData: [*c]types.Any, token: [*c]c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(1840220618037819048)), plateText, plateData, token);
}
pub fn SC_LICENSEPLATE_GET_ADD_IS_PENDING(token: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(560159903570416333)), token);
}
pub fn SC_LICENSEPLATE_GET_ADD_STATUS(token: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(9315695789069623725)), token);
}
pub fn SC_LICENSEPLATE_ISVALID(plateText: [*c]const u8, token: [*c]c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(1113296461350463280)), plateText, token);
}
pub fn SC_LICENSEPLATE_GET_ISVALID_IS_PENDING(token: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15204972160511920591)), token);
}
pub fn SC_LICENSEPLATE_GET_ISVALID_STATUS(token: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(6651464782698099740)), token);
}
pub fn SC_COMMUNITY_EVENT_IS_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(18415001803157329530)));
}
pub fn SC_COMMUNITY_EVENT_GET_EVENT_ID() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(5681793230013298233)));
}
pub fn SC_COMMUNITY_EVENT_GET_EXTRA_DATA_INT(p0: [*c]const u8, p1: [*c]c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(8145830472587337425)), p0, p1);
}
pub fn SC_COMMUNITY_EVENT_GET_EXTRA_DATA_FLOAT(p0: [*c]const u8, p1: [*c]f32) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5812074960454940734)), p0, p1);
}
pub fn SC_COMMUNITY_EVENT_GET_EXTRA_DATA_STRING(p0: [*c]const u8, p1: [*c]u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(11377731992513109712)), p0, p1);
}
pub fn SC_COMMUNITY_EVENT_GET_DISPLAY_NAME(p0: [*c]u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14035888979989090734)), p0);
}
pub fn SC_COMMUNITY_EVENT_IS_ACTIVE_FOR_TYPE(p0: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4974254207416714262)), p0);
}
pub fn SC_COMMUNITY_EVENT_GET_EVENT_ID_FOR_TYPE(p0: [*c]const u8) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(5367567768941238087)), p0);
}
pub fn SC_COMMUNITY_EVENT_GET_EXTRA_DATA_INT_FOR_TYPE(p0: [*c]const u8, p1: [*c]c_int, p2: [*c]const u8) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(16670718533674560902)), p0, p1, p2);
}
pub fn SC_COMMUNITY_EVENT_GET_EXTRA_DATA_FLOAT_FOR_TYPE(p0: [*c]const u8, p1: [*c]f32, p2: [*c]const u8) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(2697905129846826211)), p0, p1, p2);
}
pub fn SC_COMMUNITY_EVENT_GET_EXTRA_DATA_STRING_FOR_TYPE(p0: [*c]const u8, p1: [*c]u8, p2: [*c]const u8) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(2094918676218898734)), p0, p1, p2);
}
pub fn SC_COMMUNITY_EVENT_GET_DISPLAY_NAME_FOR_TYPE(p0: [*c]u8, p1: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(3737785157344691739)), p0, p1);
}
pub fn SC_COMMUNITY_EVENT_IS_ACTIVE_BY_ID(p0: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11846965926760098928)), p0);
}
pub fn SC_COMMUNITY_EVENT_GET_EXTRA_DATA_INT_BY_ID(p0: c_int, p1: [*c]const u8, p2: [*c]c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(10143348445200817020)), p0, p1, p2);
}
pub fn SC_COMMUNITY_EVENT_GET_EXTRA_DATA_FLOAT_BY_ID(p0: c_int, p1: [*c]const u8, p2: [*c]f32) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(14241328098729475145)), p0, p1, p2);
}
pub fn SC_COMMUNITY_EVENT_GET_EXTRA_DATA_STRING_BY_ID(p0: c_int, p1: [*c]const u8, p2: [*c]u8) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(7610602181657967128)), p0, p1, p2);
}
pub fn SC_COMMUNITY_EVENT_GET_DISPLAY_NAME_BY_ID(p0: c_int, p1: [*c]u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(1838941285278776266)), p0, p1);
}
pub fn SC_TRANSITION_NEWS_SHOW(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7780833457546870228)), p0);
}
pub fn SC_TRANSITION_NEWS_SHOW_TIMED(p0: types.Any, p1: types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(18324052926535614846)), p0, p1);
}
pub fn SC_TRANSITION_NEWS_SHOW_NEXT_ITEM() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(15569555517149002133)));
}
pub fn SC_TRANSITION_NEWS_HAS_EXTRA_DATA_TU() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(3459255939663279744)));
}
pub fn SC_TRANSITION_NEWS_GET_EXTRA_DATA_INT_TU(p0: [*c]const u8, p1: [*c]c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(10581891705787947985)), p0, p1);
}
pub fn SC_TRANSITION_NEWS_END() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(7446457660184252769)));
}
pub fn SC_PAUSE_NEWS_INIT_STARTER_PACK(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16498630267019136849)), p0);
}
/// Fills some 0x30 sized struct
pub fn SC_PAUSE_NEWS_GET_PENDING_STORY(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9963113293214513766)), p0);
}
pub fn SC_PAUSE_NEWS_SHUTDOWN() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(16903628454843877518)));
}
/// Returns the nickname of the logged-in Rockstar Social Club account.
/// Used to be known as _SC_GET_NICKNAME
pub fn SC_ACCOUNT_INFO_GET_NICKNAME() [*c]const u8 {
return nativeCaller.invoke0(@as(u64, @intCast(1841152146231184511)));
}
pub fn SC_ACHIEVEMENT_INFO_STATUS(p0: [*c]c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2474614145210663211)), p0);
}
/// Same as HAS_ACHIEVEMENT_BEEN_PASSED
/// Used to be known as _SC_GET_HAS_ACHIEVEMENT_BEEN_PASSED
pub fn SC_HAS_ACHIEVEMENT_BEEN_PASSED(achievementId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4723644269590817820)), achievementId);
}
};
pub const STATS = struct {
/// Example:
/// for (v_2 = 0; v_2 <= 4; v_2 += 1) {
/// STATS::STAT_CLEAR_SLOT_FOR_RELOAD(v_2);
/// }
pub fn STAT_CLEAR_SLOT_FOR_RELOAD(statSlot: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16936474796576384173)), statSlot);
}
pub fn STAT_LOAD(statSlot: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11984435121915370726)), statSlot);
}
pub fn STAT_SAVE(p0: c_int, p1: windows.BOOL, p2: c_int, p3: windows.BOOL) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(16175744795673809661)), p0, p1, p2, p3);
}
pub fn STAT_SET_OPEN_SAVETYPE_IN_JOB(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6235330846678990040)), p0);
}
pub fn STAT_LOAD_PENDING(statSlot: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11634222782993667681)), statSlot);
}
pub fn STAT_SAVE_PENDING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(9023621802390373804)));
}
pub fn STAT_SAVE_PENDING_OR_REQUESTED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(13526188748229557923)));
}
/// p0 is characterSlot? seems range from 0 to 2
pub fn STAT_DELETE_SLOT(p0: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5306537703468780912)), p0);
}
pub fn STAT_SLOT_IS_LOADED(statSlot: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(939738356816354876)), statSlot);
}
pub fn STAT_CLOUD_SLOT_LOAD_FAILED(p0: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9163783863233863500)), p0);
}
pub fn STAT_CLOUD_SLOT_LOAD_FAILED_CODE(p0: types.Any) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(16471534362760120918)), p0);
}
pub fn STAT_SET_BLOCK_SAVES(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17596866715346286544)), toggle);
}
pub fn STAT_GET_BLOCK_SAVES() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(7673880282228494358)));
}
pub fn STAT_CLOUD_SLOT_SAVE_FAILED(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9108889746028410703)), p0);
}
pub fn STAT_CLEAR_PENDING_SAVES(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12138105244504849233)), p0);
}
pub fn STAT_LOAD_DIRTY_READ_DETECTED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(17056287129341346817)));
}
pub fn STAT_CLEAR_DIRTY_READ_DETECTED() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(11190268722901280265)));
}
pub fn STAT_GET_LOAD_SAFE_TO_PROGRESS_TO_MP_FROM_SP() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(13898344324803620526)));
}
/// Returns stat hash based on dataType, statIndex/statId and characterSlot. Related to CStatsMpCharacterMappingData
pub fn _GET_STAT_HASH_FOR_CHARACTER_STAT(dataType: c_int, statIndex: c_int, charSlot: c_int) types.Hash {
return nativeCaller.invoke3(@as(u64, @intCast(15464483031479305521)), dataType, statIndex, charSlot);
}
/// Example:
/// STATS::STAT_SET_INT(MISC::GET_HASH_KEY("MPPLY_KILLS_PLAYERS"), 1337, true);
pub fn STAT_SET_INT(statName: types.Hash, value: c_int, save: windows.BOOL) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(12909319269763101761)), statName, value, save);
}
/// Example:
/// STATS::STAT_SET_FLOAT(MISC::GET_HASH_KEY("MP0_WEAPON_ACCURACY"), 66.6f, true);
pub fn STAT_SET_FLOAT(statName: types.Hash, value: f32, save: windows.BOOL) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(5211115015523703612)), statName, value, save);
}
/// Example:
/// STATS::STAT_SET_BOOL(MISC::GET_HASH_KEY("MPPLY_MELEECHLENGECOMPLETED"), trur, true);
pub fn STAT_SET_BOOL(statName: types.Hash, value: windows.BOOL, save: windows.BOOL) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(5418890436592845874)), statName, value, save);
}
/// The following values have been found in the decompiled scripts:
/// "RC_ABI1"
/// "RC_ABI2"
/// "RC_BA1"
/// "RC_BA2"
/// "RC_BA3"
/// "RC_BA3A"
/// "RC_BA3C"
/// "RC_BA4"
/// "RC_DRE1"
/// "RC_EPS1"
/// "RC_EPS2"
/// "RC_EPS3"
/// "RC_EPS4"
/// "RC_EPS5"
/// "RC_EPS6"
/// "RC_EPS7"
/// "RC_EPS8"
/// "RC_EXT1"
/// "RC_EXT2"
/// "RC_EXT3"
/// "RC_EXT4"
/// "RC_FAN1"
/// "RC_FAN2"
/// "RC_FAN3"
/// "RC_HAO1"
/// "RC_HUN1"
/// "RC_HUN2"
/// "RC_JOS1"
/// "RC_JOS2"
/// "RC_JOS3"
/// "RC_JOS4"
/// "RC_MAU1"
/// "RC_MIN1"
/// "RC_MIN2"
/// "RC_MIN3"
/// "RC_MRS1"
/// "RC_MRS2"
/// "RC_NI1"
/// "RC_NI1A"
/// "RC_NI1B"
/// "RC_NI1C"
/// "RC_NI1D"
/// "RC_NI2"
/// "RC_NI3"
/// "RC_OME1"
/// "RC_OME2"
/// "RC_PA1"
/// "RC_PA2"
/// "RC_PA3"
/// "RC_PA3A"
/// "RC_PA3B"
/// "RC_PA4"
/// "RC_RAM1"
/// "RC_RAM2"
/// "RC_RAM3"
/// "RC_RAM4"
/// "RC_RAM5"
/// "RC_SAS1"
/// "RC_TON1"
/// "RC_TON2"
/// "RC_TON3"
/// "RC_TON4"
/// "RC_TON5"
pub fn STAT_SET_GXT_LABEL(statName: types.Hash, value: [*c]const u8, save: windows.BOOL) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(1686967509200874208)), statName, value, save);
}
/// 'value' is a structure to a structure, 'numFields' is how many fields there are in said structure (usually 7).
/// The structure looks like this:
/// int year
/// int month
/// int day
/// int hour
/// int minute
/// int second
/// int millisecond
/// The decompiled scripts use TIME::GET_POSIX_TIME to fill this structure.
pub fn STAT_SET_DATE(statName: types.Hash, value: [*c]types.Any, numFields: c_int, save: windows.BOOL) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(3182285401449548772)), statName, value, numFields, save);
}
pub fn STAT_SET_STRING(statName: types.Hash, value: [*c]const u8, save: windows.BOOL) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(12140335934556418519)), statName, value, save);
}
pub fn STAT_SET_POS(statName: types.Hash, x: f32, y: f32, z: f32, save: windows.BOOL) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(15791942317835806510)), statName, x, y, z, save);
}
pub fn STAT_SET_MASKED_INT(statName: types.Hash, p1: c_int, p2: c_int, p3: c_int, save: windows.BOOL) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(8915749936381744144)), statName, p1, p2, p3, save);
}
pub fn STAT_SET_USER_ID(statName: types.Hash, value: [*c]const u8, save: windows.BOOL) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(10150535098105773585)), statName, value, save);
}
/// p1 always true.
pub fn STAT_SET_CURRENT_POSIX_TIME(statName: types.Hash, p1: windows.BOOL) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(14049062049037487201)), statName, p1);
}
/// p2 appears to always be -1
pub fn STAT_GET_INT(statHash: types.Hash, outValue: [*c]c_int, p2: c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(8538750310448033597)), statHash, outValue, p2);
}
pub fn STAT_GET_FLOAT(statHash: types.Hash, outValue: [*c]f32, p2: types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(15541478783997101388)), statHash, outValue, p2);
}
pub fn STAT_GET_BOOL(statHash: types.Hash, outValue: [*c]windows.BOOL, p2: types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(1276179861973759118)), statHash, outValue, p2);
}
/// p3 is probably characterSlot or BOOL save, always -1
pub fn STAT_GET_DATE(statHash: types.Hash, outValue: [*c]types.Any, numFields: c_int, p3: types.Any) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(10020417841698472523)), statHash, outValue, numFields, p3);
}
/// p1 is always -1 in the script files
pub fn STAT_GET_STRING(statHash: types.Hash, p1: c_int) [*c]const u8 {
return nativeCaller.invoke2(@as(u64, @intCast(16502179337152486260)), statHash, p1);
}
/// p3 is probably characterSlot or BOOL save, always -1
pub fn STAT_GET_POS(statName: types.Hash, outX: [*c]f32, outY: [*c]f32, outZ: [*c]f32, p4: types.Any) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(3823418424324172315)), statName, outX, outY, outZ, p4);
}
/// p4 is probably characterSlot or BOOL save
pub fn STAT_GET_MASKED_INT(statHash: types.Hash, outValue: [*c]c_int, p2: c_int, p3: c_int, p4: types.Any) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(7300763395024677547)), statHash, outValue, p2, p3, p4);
}
/// Returns the rockstar ID (user id) value of a given stat. Returns "STAT_UNKNOWN" if the statHash is invalid or the stat has no userId
pub fn STAT_GET_USER_ID(statHash: types.Hash) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(2550659756676332514)), statHash);
}
pub fn STAT_GET_LICENSE_PLATE(statName: types.Hash) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(6085440726694933220)), statName);
}
pub fn STAT_SET_LICENSE_PLATE(statName: types.Hash, str: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(7637844548809561818)), statName, str);
}
pub fn STAT_INCREMENT(statName: types.Hash, value: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11194375024613955849)), statName, value);
}
pub fn STAT_COMMUNITY_START_SYNCH() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6509226632792151042)));
}
pub fn STAT_COMMUNITY_SYNCH_IS_PENDING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(12813509627718268337)));
}
pub fn STAT_COMMUNITY_GET_HISTORY(statName: types.Hash, p1: c_int, outValue: [*c]f32) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(13752292769533324567)), statName, p1, outValue);
}
/// p0 seems to range from 0 to 7
pub fn STAT_RESET_ALL_ONLINE_CHARACTER_STATS(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2798769033825484425)), p0);
}
/// p0 seems to range from 0 to 7
pub fn STAT_LOCAL_RESET_ALL_ONLINE_CHARACTER_STATS(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12072901167110216278)), p0);
}
pub fn STAT_GET_NUMBER_OF_DAYS(statName: types.Hash) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(16206296671008569193)), statName);
}
pub fn STAT_GET_NUMBER_OF_HOURS(statName: types.Hash) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(17497807257329119171)), statName);
}
pub fn STAT_GET_NUMBER_OF_MINUTES(statName: types.Hash) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(8467810453804433845)), statName);
}
pub fn STAT_GET_NUMBER_OF_SECONDS(statName: types.Hash) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(3233680186593767435)), statName);
}
/// Does not take effect immediately, unfortunately.
/// profileSetting seems to only be 936, 937 and 938 in scripts
/// Used to be known as _STAT_SET_PROFILE_SETTING
pub fn STAT_SET_PROFILE_SETTING_VALUE(profileSetting: c_int, value: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7561565913806111631)), profileSetting, value);
}
/// This native does absolutely nothing, just a nullsub
pub fn STATS_COMPLETED_CHARACTER_CREATION(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13843260897124736602)), p0);
}
/// Needs more research. Possibly used to calculate the "mask" when calling "STAT_SET_MASKED_INT"?
/// Used to be known as _STAT_GET_PACKED_INT_MASK
pub fn PACKED_STAT_GET_INT_STAT_INDEX(p0: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(10732406389452956473)), p0);
}
/// Used to be known as _GET_PSTAT_INT_HASH
pub fn GET_PACKED_INT_STAT_KEY(index: c_int, spStat: windows.BOOL, charStat: windows.BOOL, character: c_int) types.Hash {
return nativeCaller.invoke4(@as(u64, @intCast(7052938158685658631)), index, spStat, charStat, character);
}
/// Used to be known as _GET_TUPSTAT_INT_HASH
/// Used to be known as _GET_PACKED_TITLE_UPDATE_INT_STAT_KEY
pub fn GET_PACKED_TU_INT_STAT_KEY(index: c_int, spStat: windows.BOOL, charStat: windows.BOOL, character: c_int) types.Hash {
return nativeCaller.invoke4(@as(u64, @intCast(15090483553124952148)), index, spStat, charStat, character);
}
/// Needs more research. Gets the stat name of a masked int?
/// section - values used in the decompiled scripts:
/// "_NGPSTAT_INT"
/// "_MP_NGPSTAT_INT"
/// "_MP_LRPSTAT_INT"
/// "_MP_APAPSTAT_INT"
/// "_MP_LR2PSTAT_INT"
/// "_MP_BIKEPSTAT_INT"
/// "_MP_IMPEXPPSTAT_INT"
/// "_MP_GUNRPSTAT_INT"
/// "_NGDLCPSTAT_INT"
/// "_MP_NGDLCPSTAT_INT"
/// "_DLCSMUGCHARPSTAT_INT"
/// "_GANGOPSPSTAT_INT"
/// "_BUSINESSBATPSTAT_INT"
/// "_ARENAWARSPSTAT_INT"
/// "_CASINOPSTAT_INT"
/// "_CASINOHSTPSTAT_INT"
/// Used to be known as _GET_NGSTAT_INT_HASH
pub fn GET_PACKED_NG_INT_STAT_KEY(index: c_int, spStat: windows.BOOL, charStat: windows.BOOL, character: c_int, section: [*c]const u8) types.Hash {
return nativeCaller.invoke5(@as(u64, @intCast(3120111251418510298)), index, spStat, charStat, character, section);
}
/// Used to be known as _GET_PACKED_STAT_BOOL
pub fn GET_PACKED_STAT_BOOL_CODE(index: c_int, characterSlot: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(15744232198466957744)), index, characterSlot);
}
/// Used to be known as _GET_PACKED_STAT_INT
pub fn GET_PACKED_STAT_INT_CODE(index: c_int, characterSlot: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(849210721969600268)), index, characterSlot);
}
/// Used to be known as _SET_PACKED_STAT_BOOL
pub fn SET_PACKED_STAT_BOOL_CODE(index: c_int, value: windows.BOOL, characterSlot: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(15819554148298771719)), index, value, characterSlot);
}
/// Used to be known as _SET_PACKED_STAT_INT
pub fn SET_PACKED_STAT_INT_CODE(index: c_int, value: c_int, characterSlot: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(1549607960675208494)), index, value, characterSlot);
}
pub fn PLAYSTATS_BACKGROUND_SCRIPT_ACTION(action: [*c]const u8, value: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5767386913429428009)), action, value);
}
/// p3: VehicleConversion, SCAdminCashGift
/// p4: 0
pub fn _PLAYSTATS_FLOW_LOW(posX: f32, posY: f32, posZ: f32, p3: [*c]const u8, p4: types.Any, amount: c_int) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(16618982851811508115)), posX, posY, posZ, p3, p4, amount);
}
/// interiorAction: can either be InteriorEntry or InteriorExit
pub fn _PLAYSTATS_FLOW_MEDIUM(x: f32, y: f32, z: f32, interiorAction: [*c]const u8, p4: c_int, p5: types.Hash) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(14143894523715071182)), x, y, z, interiorAction, p4, p5);
}
pub fn PLAYSTATS_NPC_INVITE(p0: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10593957849328155716)), p0);
}
pub fn PLAYSTATS_AWARD_XP(amount: c_int, @"type": types.Hash, category: types.Hash) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(5114145200206417892)), amount, @"type", category);
}
pub fn PLAYSTATS_RANK_UP(rank: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14407822532172496820)), rank);
}
pub fn PLAYSTATS_STARTED_SESSION_IN_OFFLINEMODE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(686623877187970253)));
}
pub fn PLAYSTATS_ACTIVITY_DONE(p0: c_int, activityId: c_int, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(11561269029515104902)), p0, activityId, p2);
}
pub fn PLAYSTATS_LEAVE_JOB_CHAIN(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(14248847500126099104)), p0, p1, p2, p3, p4);
}
pub fn PLAYSTATS_MISSION_STARTED(p0: [*c]const u8, p1: types.Any, p2: types.Any, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(13950508037900673585)), p0, p1, p2, p3);
}
pub fn PLAYSTATS_MISSION_OVER(p0: [*c]const u8, p1: types.Any, p2: types.Any, p3: windows.BOOL, p4: windows.BOOL, p5: windows.BOOL) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(8956449348010210084)), p0, p1, p2, p3, p4, p5);
}
pub fn PLAYSTATS_MISSION_CHECKPOINT(p0: [*c]const u8, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(14483674715095796765)), p0, p1, p2, p3);
}
pub fn PLAYSTATS_RANDOM_MISSION_DONE(name: [*c]const u8, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(8180273178956739297)), name, p1, p2, p3);
}
pub fn PLAYSTATS_ROS_BET(amount: c_int, act: c_int, player: types.Player, cm: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(1305961281935463057)), amount, act, player, cm);
}
pub fn PLAYSTATS_RACE_CHECKPOINT(p0: types.Vehicle, p1: types.Any, p2: c_int, p3: c_int, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(11256567160511258084)), p0, p1, p2, p3, p4);
}
pub fn PLAYSTATS_CREATE_MATCH_HISTORY_ID_2(playerAccountId: [*c]c_int, posixTime: [*c]c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(7921400392267733969)), playerAccountId, posixTime);
}
pub fn PLAYSTATS_MATCH_STARTED(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(13583105163036663357)), p0, p1, p2);
}
pub fn PLAYSTATS_SHOP_ITEM(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(1686688962002908113)), p0, p1, p2, p3, p4);
}
/// Used to be known as _PLAYSTATS_CRATE_DROP
pub fn PLAYSTATS_CRATE_DROP_MISSION_DONE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any, p6: types.Any, p7: types.Any) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(2066691732226574320)), p0, p1, p2, p3, p4, p5, p6, p7);
}
/// Used to be known as _PLAYSTATS_AMBIENT_MISSION_CRATE_CREATED
/// Used to be known as _PLAYSTATS_CRATE_CREATED_MISSION_DONE
pub fn PLAYSTATS_CRATE_CREATED(p0: f32, p1: f32, p2: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(12666345229212282694)), p0, p1, p2);
}
/// Used to be known as _PLAYSTATS_HOLD_UP
pub fn PLAYSTATS_HOLD_UP_MISSION_DONE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(14627719537886469809)), p0, p1, p2, p3);
}
/// Used to be known as _PLAYSTATS_IMP_EXP
pub fn PLAYSTATS_IMPORT_EXPORT_MISSION_DONE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(3128300827883161617)), p0, p1, p2, p3);
}
/// Used to be known as _PLAYSTATS_RACE_TO_POINT
pub fn PLAYSTATS_RACE_TO_POINT_MISSION_DONE(p0: c_int, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(12528201028562987284)), p0, p1, p2, p3);
}
pub fn PLAYSTATS_ACQUIRED_HIDDEN_PACKAGE(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8767158209719485452)), p0);
}
pub fn PLAYSTATS_WEBSITE_VISITED(scaleformHash: types.Hash, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15992930246972209169)), scaleformHash, p1);
}
pub fn PLAYSTATS_FRIEND_ACTIVITY(p0: c_int, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1112914853483403505)), p0, p1);
}
/// This native does absolutely nothing, just a nullsub
pub fn PLAYSTATS_ODDJOB_DONE(totalTimeMs: c_int, p1: c_int, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(7628715043616619340)), totalTimeMs, p1, p2);
}
pub fn PLAYSTATS_PROP_CHANGE(p0: types.Ped, p1: c_int, p2: c_int, p3: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(13435255206363649767)), p0, p1, p2, p3);
}
pub fn PLAYSTATS_CLOTH_CHANGE(p0: types.Ped, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(3799194223729862841)), p0, p1, p2, p3, p4);
}
/// This is a typo made by R*. It's supposed to be called PLAYSTATS_WEAPON_MOD_CHANGE.
pub fn PLAYSTATS_WEAPON_MODE_CHANGE(weaponHash: types.Hash, componentHashTo: types.Hash, componentHashFrom: types.Hash) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(16815466946351869092)), weaponHash, componentHashTo, componentHashFrom);
}
pub fn PLAYSTATS_CHEAT_APPLIED(cheat: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6942411377125371199)), cheat);
}
pub fn PLAYSTATS_JOB_ACTIVITY_END(p0: [*c]types.Any, p1: [*c]types.Any, p2: [*c]types.Any, p3: [*c]types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(17925815556800123356)), p0, p1, p2, p3);
}
pub fn PLAYSTATS_JOB_BEND(p0: [*c]types.Any, p1: [*c]types.Any, p2: [*c]types.Any, p3: [*c]types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(17706902130925392576)), p0, p1, p2, p3);
}
pub fn PLAYSTATS_JOB_LTS_END(p0: [*c]types.Any, p1: [*c]types.Any, p2: [*c]types.Any, p3: [*c]types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(12049046000527327220)), p0, p1, p2, p3);
}
pub fn PLAYSTATS_JOB_LTS_ROUND_END(p0: [*c]types.Any, p1: [*c]types.Any, p2: [*c]types.Any, p3: [*c]types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(1504398889163179232)), p0, p1, p2, p3);
}
pub fn PLAYSTATS_QUICKFIX_TOOL(element: c_int, item: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10434948262282134597)), element, item);
}
pub fn PLAYSTATS_IDLE_KICK(msStoodIdle: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6747422340528087663)), msStoodIdle);
}
pub fn PLAYSTATS_SET_JOIN_TYPE(joinType: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15060932466269815966)), joinType);
}
/// Used to be known as _PLAYSTATS_HEIST_SAVE_CHEAT
pub fn PLAYSTATS_HEIST_SAVE_CHEAT(hash: types.Hash, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17653831306435135587)), hash, p1);
}
/// Used to be known as _PLAYSTATS_DIRECTOR_MODE
pub fn PLAYSTATS_APPEND_DIRECTOR_METRIC(p0: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5058226363036468550)), p0);
}
/// Used to be known as _PLAYSTATS_AWARD_BADSPORT
pub fn PLAYSTATS_AWARD_BAD_SPORT(id: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5166525244238128259)), id);
}
/// Used to be known as _PLAYSTATS_PEGASAIRCRAFT
pub fn PLAYSTATS_PEGASUS_AS_PERSONAL_AIRCRAFT(modelHash: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10768877801008734498)), modelHash);
}
pub fn _PLAYSTATS_SHOPMENU_NAV(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(17973477609267911826)), p0, p1, p2, p3);
}
/// Used to be known as _PLAYSTATS_FREEMODE_CHALLENGES
pub fn PLAYSTATS_FM_EVENT_CHALLENGES(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7665377501801251369)), p0);
}
/// Used to be known as _PLAYSTATS_FREEMODE_VEHICLE_TARGET
pub fn PLAYSTATS_FM_EVENT_VEHICLETARGET(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13812499786099967403)), p0);
}
/// Used to be known as _PLAYSTATS_FREEMODE_URBAN_WARFARE
pub fn PLAYSTATS_FM_EVENT_URBANWARFARE(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10132273842250963285)), p0);
}
/// Used to be known as _PLAYSTATS_FREEMODE_CHECKPOINT_COLLECTION
pub fn PLAYSTATS_FM_EVENT_CHECKPOINTCOLLECTION(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4459595322769876644)), p0);
}
/// Used to be known as _PLAYSTATS_FREEMODE_ATOB
pub fn PLAYSTATS_FM_EVENT_ATOB(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13448575633841220584)), p0);
}
/// Used to be known as _PLAYSTATS_FREEMODE_PENNED_IN
pub fn PLAYSTATS_FM_EVENT_PENNEDIN(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1908655210799379589)), p0);
}
/// Used to be known as _PLAYSTATS_FREEMODE_PASS_THE_PARCEL
pub fn PLAYSTATS_FM_EVENT_PASSTHEPARCEL(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4725988259761428822)), p0);
}
/// Used to be known as _PLAYSTATS_FREEMODE_HOT_PROPERTY
pub fn PLAYSTATS_FM_EVENT_HOTPROPERTY(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9574588459565982028)), p0);
}
/// Used to be known as _PLAYSTATS_FREEMODE_DEADDROP
pub fn PLAYSTATS_FM_EVENT_DEADDROP(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(764625910507222659)), p0);
}
/// Used to be known as _PLAYSTATS_FREEMODE_KING_OF_THE_CASTLE
pub fn PLAYSTATS_FM_EVENT_KINGOFTHECASTLE(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1606764678899894341)), p0);
}
/// Used to be known as _PLAYSTATS_FREEMODE_CRIMINAL_DAMAGE
pub fn PLAYSTATS_FM_EVENT_CRIMINALDAMAGE(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17131530920737400264)), p0);
}
/// Used to be known as _PLAYSTATS_FREEMODE_COMPETITIVE_URBAN_WARFARE
pub fn PLAYSTATS_FM_EVENT_COMPETITIVEURBANWARFARE(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7300812149499971306)), p0);
}
/// Used to be known as _PLAYSTATS_FREEMODE_HUNT_BEAST
pub fn PLAYSTATS_FM_EVENT_HUNTBEAST(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3231617888242436776)), p0);
}
/// Used to be known as _PLAYSTATS_PI_MENU_HIDE_SETTINGS
pub fn PLAYSTATS_PIMENU_HIDE_OPTIONS(data: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2322511679369343097)), data);
}
pub fn LEADERBOARDS_GET_NUMBER_OF_COLUMNS(p0: c_int, p1: types.Any) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(1259676479113854766)), p0, p1);
}
pub fn LEADERBOARDS_GET_COLUMN_ID(p0: c_int, p1: c_int, p2: c_int) c_int {
return nativeCaller.invoke3(@as(u64, @intCast(14174312892429953662)), p0, p1, p2);
}
pub fn LEADERBOARDS_GET_COLUMN_TYPE(p0: c_int, p1: types.Any, p2: types.Any) c_int {
return nativeCaller.invoke3(@as(u64, @intCast(13785500072013239507)), p0, p1, p2);
}
pub fn LEADERBOARDS_READ_CLEAR_ALL() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(11766981029412162059)));
}
pub fn LEADERBOARDS_READ_CLEAR(p0: types.Any, p1: types.Any, p2: types.Any) c_int {
return nativeCaller.invoke3(@as(u64, @intCast(8993227156949980929)), p0, p1, p2);
}
pub fn LEADERBOARDS_READ_PENDING(p0: types.Any, p1: types.Any, p2: types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(12409999195844651714)), p0, p1, p2);
}
pub fn LEADERBOARDS_READ_ANY_PENDING() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(11754343700827837117)));
}
pub fn LEADERBOARDS_READ_SUCCESSFUL(p0: types.Any, p1: types.Any, p2: types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(3436688693710979884)), p0, p1, p2);
}
pub fn LEADERBOARDS2_READ_FRIENDS_BY_ROW(p0: [*c]types.Any, p1: [*c]types.Any, p2: types.Any, p3: windows.BOOL, p4: types.Any, p5: types.Any) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(10487493845665303427)), p0, p1, p2, p3, p4, p5);
}
pub fn LEADERBOARDS2_READ_BY_HANDLE(p0: [*c]types.Any, p1: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(14053222755243900686)), p0, p1);
}
pub fn LEADERBOARDS2_READ_BY_RANK(p0: [*c]types.Any, p1: types.Any, p2: types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(13415235588138288282)), p0, p1, p2);
}
pub fn LEADERBOARDS2_READ_BY_RADIUS(p0: [*c]types.Any, p1: types.Any, p2: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(6693905934776977604)), p0, p1, p2);
}
pub fn LEADERBOARDS2_READ_BY_SCORE_INT(p0: [*c]types.Any, p1: types.Any, p2: types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(9145823822820450666)), p0, p1, p2);
}
pub fn LEADERBOARDS2_READ_BY_SCORE_FLOAT(p0: [*c]types.Any, p1: f32, p2: types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(16601051866252480316)), p0, p1, p2);
}
pub fn LEADERBOARDS2_READ_RANK_PREDICTION(p0: [*c]types.Any, p1: [*c]types.Any, p2: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(14091132015804044412)), p0, p1, p2);
}
/// Used to be known as _LEADERBOARDS2_READ_BY_PLATFORM
pub fn LEADERBOARDS2_READ_BY_PLAFORM(p0: [*c]types.Any, gamerHandleCsv: [*c]const u8, platformName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(17414959947355662113)), p0, gamerHandleCsv, platformName);
}
/// Used to be known as LEADERBOARDS2_READ_BY_HELP_PURPLE_START
pub fn LEADERBOARDS2_READ_GET_ROW_DATA_START(p0: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11599369747962202445)), p0);
}
/// Used to be known as LEADERBOARDS2_READ_BY_HELP_PURPLE_END
pub fn LEADERBOARDS2_READ_GET_ROW_DATA_END() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(8192056541605958358)));
}
/// Used to be known as LEADERBOARDS2_READ_BY_HELP_PURPLE_INFO
pub fn LEADERBOARDS2_READ_GET_ROW_DATA_INFO(p0: types.Any, p1: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(3780503180616416145)), p0, p1);
}
/// Used to be known as LEADERBOARDS2_READ_BY_HELP_PURPLE_INT
pub fn LEADERBOARDS2_READ_GET_ROW_DATA_INT(p0: types.Any, p1: types.Any) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(9824478818019789370)), p0, p1);
}
/// Used to be known as LEADERBOARDS2_READ_BY_HELP_PURPLE_FLOAT
pub fn LEADERBOARDS2_READ_GET_ROW_DATA_FLOAT(p0: types.Any, p1: types.Any) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(4055795177535209341)), p0, p1);
}
pub fn LEADERBOARDS2_WRITE_DATA(p0: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12547598471139995209)), p0);
}
pub fn LEADERBOARDS_WRITE_ADD_COLUMN(p0: types.Any, p1: types.Any, p2: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(849523555731296873)), p0, p1, p2);
}
pub fn LEADERBOARDS_WRITE_ADD_COLUMN_LONG(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(3343118456493061529)), p0, p1, p2);
}
pub fn LEADERBOARDS_CACHE_DATA_ROW(p0: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13383318079891653357)), p0);
}
pub fn LEADERBOARDS_CLEAR_CACHE_DATA() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(15325796172190064604)));
}
pub fn LEADERBOARDS_CLEAR_CACHE_DATA_ID(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10288276446022368511)), p0);
}
pub fn LEADERBOARDS_GET_CACHE_EXISTS(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11263841987227156012)), p0);
}
pub fn LEADERBOARDS_GET_CACHE_TIME(p0: types.Any) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(17315245624822986440)), p0);
}
pub fn LEADERBOARDS_GET_CACHE_NUMBER_OF_ROWS(p0: types.Any) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(6387883062920579501)), p0);
}
pub fn LEADERBOARDS_GET_CACHE_DATA_ROW(p0: types.Any, p1: types.Any, p2: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(10457614364798521971)), p0, p1, p2);
}
/// Used to be known as _UPDATE_STAT_INT
pub fn PRESENCE_EVENT_UPDATESTAT_INT(statHash: types.Hash, value: c_int, p2: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(1296786554448025581)), statHash, value, p2);
}
/// Used to be known as _UPDATE_STAT_FLOAT
pub fn PRESENCE_EVENT_UPDATESTAT_FLOAT(statHash: types.Hash, value: f32, p2: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(3505596339527850424)), statHash, value, p2);
}
pub fn PRESENCE_EVENT_UPDATESTAT_INT_WITH_STRING(statHash: types.Hash, value: c_int, p2: c_int, string: [*c]const u8) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(7242846310179740751)), statHash, value, p2, string);
}
pub fn GET_PLAYER_HAS_DRIVEN_ALL_VEHICLES() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6822157347310818020)));
}
pub fn SET_HAS_POSTED_ALL_VEHICLES_DRIVEN() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(13925614457829988332)));
}
pub fn SET_PROFILE_SETTING_PROLOGUE_COMPLETE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(13003566115280473445)));
}
/// Sets profile setting 939
pub fn SET_PROFILE_SETTING_SP_CHOP_MISSION_COMPLETE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(14302919639509195234)));
}
/// Sets profile setting 933
pub fn SET_PROFILE_SETTING_CREATOR_RACES_DONE(value: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17411338634752619029)), value);
}
/// Sets profile setting 934
pub fn SET_PROFILE_SETTING_CREATOR_DM_DONE(value: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4087766931770823071)), value);
}
/// Sets profile setting 935
pub fn SET_PROFILE_SETTING_CREATOR_CTF_DONE(value: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6140733103462002062)), value);
}
pub fn SET_JOB_ACTIVITY_ID_STARTED(p0: types.Any, characterSlot: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8231485972689181543)), p0, characterSlot);
}
pub fn SET_FREEMODE_PROLOGUE_DONE(p0: types.Any, characterSlot: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(937261121067054075)), p0, characterSlot);
}
/// Sets profile setting 940 and 941
pub fn SET_FREEMODE_STRAND_PROGRESSION_STATUS(profileSetting: c_int, settingValue: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8778378414050081993)), profileSetting, settingValue);
}
pub fn STAT_NETWORK_INCREMENT_ON_SUICIDE(p0: types.Any, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4795963659938393142)), p0, p1);
}
pub fn STAT_SET_CHEAT_IS_ACTIVE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(323343103739606588)));
}
pub fn LEADERBOARDS2_WRITE_DATA_FOR_EVENT_TYPE(p0: [*c]types.Any, p1: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(14519858284755623260)), p0, p1);
}
pub fn FORCE_CLOUD_MP_STATS_DOWNLOAD_AND_OVERWRITE_LOCAL_SAVE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(8013622860191339171)));
}
pub fn STAT_MIGRATE_CLEAR_FOR_RESTART() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(14431701714524094645)));
}
/// platformName must be one of the following: ps3, xbox360, ps4, xboxone
/// Used to be known as _STAT_MIGRATE_SAVE
pub fn STAT_MIGRATE_SAVEGAME_START(platformName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11945812917125553766)), platformName);
}
pub fn STAT_MIGRATE_SAVEGAME_GET_STATUS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(11124714157173170193)));
}
pub fn STAT_MIGRATE_CHECK_ALREADY_DONE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(5515218683065266537)));
}
pub fn STAT_MIGRATE_CHECK_START() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14330702922318706363)));
}
pub fn STAT_MIGRATE_CHECK_GET_IS_PLATFORM_AVAILABLE(p0: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(6617461675217668783)), p0);
}
pub fn STAT_MIGRATE_CHECK_GET_PLATFORM_STATUS(p0: c_int, p1: [*c]types.Any) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(16044908746008723095)), p0, p1);
}
pub fn STAT_GET_SAVE_MIGRATION_STATUS(data: [*c]types.Any) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(9829409359531763905)), data);
}
/// Used to be known as _STAT_SAVE_MIGRATION_CANCEL
pub fn STAT_SAVE_MIGRATION_CANCEL_PENDING_OPERATION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(5759913811985064980)));
}
/// Used to be known as _STAT_GET_CANCEL_SAVE_MIGRATION_STATUS
pub fn STAT_GET_CANCEL_SAVE_MIGRATION_STATUS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(6229468805688469990)));
}
/// Used to be known as _STAT_SAVE_MIGRATION_CONSUME_CONTENT_UNLOCK
pub fn STAT_SAVE_MIGRATION_CONSUME_CONTENT(contentId: types.Hash, srcPlatform: [*c]const u8, srcGamerHandle: [*c]const u8) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(3634675924293778369)), contentId, srcPlatform, srcGamerHandle);
}
/// Used to be known as _STAT_GET_SAVE_MIGRATION_CONSUME_CONTENT_UNLOCK_STATUS
pub fn STAT_GET_SAVE_MIGRATION_CONSUME_CONTENT_STATUS(p0: [*c]c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(14869377738856783584)), p0);
}
/// Used to be known as _STAT_MANAGER_SET_MUTABLE
pub fn STAT_ENABLE_STATS_TRACKING() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(11016574469671126979)));
}
/// Prevents updates to CStatsMgr (e.g., STAT_SET_* natives)
/// Used to be known as _STAT_MANAGER_SET_IMMUTABLE
pub fn STAT_DISABLE_STATS_TRACKING() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(7103626505871408298)));
}
/// Used to be known as _STAT_MANAGER_IS_MUTABLE
pub fn STAT_IS_STATS_TRACKING_ENABLED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(13708308589074815044)));
}
/// enum StatTrackingType
/// {
/// LongestWheelie = 1,
/// LongestStoppie = 2,
/// NoCrashes = 3,
/// HighestSpeed = 4,
/// _MostFlips = 5,
/// _LongestSpin = 6,
/// _HighestJumpReached = 7,
/// LongestJump = 8,
/// _NearMissesNoCrash = 9,
/// LongestFallSurvived = 10,
/// LowestParachute = 11,
/// ReverseDriving = 12,
/// LongestFreefall = 13,
/// VehiclesStolen = 14,
/// _SomeCFireEventCount = 15,
/// _Unk16 = 16,
/// _LowFlyingTime = 17,
/// LowFlying = 18,
/// _InvertedFlyingTime = 19,
/// InvertedFlying = 20,
/// _PlaneSpinCount = 21,
/// MeleeKills = 22, // Players
/// _LongestSniperKill = 23,
/// SniperSkills = 24, // Players
/// DrivebyKills = 25, // Players
/// HeadshotKills = 26, // Players
/// LongestBail = 27,
/// _TotalRammedByCar = 28,
/// NearMissesPrecise = 29,
/// _FreefallTime = 30,
/// Unk31 = 31,
/// }
/// enum StatTrackingValueType
/// {
/// Total,
/// Max,
/// Min
/// }
/// Used to be known as _STAT_TRACKING_ENABLE
pub fn STAT_START_RECORD_STAT(statType: c_int, valueType: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(3735499057318867813)), statType, valueType);
}
/// Used to be known as _STAT_TRACKING_CLEAR_PROGRESS
pub fn STAT_STOP_RECORD_STAT() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(12061155113903153725)));
}
/// Used to be known as _STAT_GET_PROGRESS_OF_TRACKED_STAT
pub fn STAT_GET_RECORDED_VALUE(value: [*c]f32) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(17374607921103721322)), value);
}
/// Used to be known as _STAT_IS_TRACKING_ENABLED
pub fn STAT_IS_RECORDING_STAT() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(10060157383120176012)));
}
/// Perform the most near misses with other vehicles in a land vehicle without crashing
/// Used to be known as _STAT_GET_CHALLENGE_NEAR_MISSES
pub fn STAT_GET_CURRENT_NEAR_MISS_NOCRASH_PRECISE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(16754868069277946070)));
}
/// Perform the longest wheelie on a motorcycle
/// Used to be known as _STAT_GET_CHALLENGE_LONGEST_WHEELIE
pub fn STAT_GET_CURRENT_REAR_WHEEL_DISTANCE() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(12196870491660689149)));
}
/// Perform the longest stoppie on a motorcycle
/// Used to be known as _STAT_GET_CHALLENGE_LONGEST_STOPPIE
pub fn STAT_GET_CURRENT_FRONT_WHEEL_DISTANCE() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(9558908572057115662)));
}
/// Perform the longest jump in a land vehicle
/// Used to be known as _STAT_GET_CHALLENGE_LONGEST_JUMP
pub fn STAT_GET_CURRENT_JUMP_DISTANCE() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(11441541644660057402)));
}
/// Drive the furthest distance in a land vehicle without crashing
/// Used to be known as _STAT_GET_CHALLENGE_NO_CRASHES
pub fn STAT_GET_CURRENT_DRIVE_NOCRASH_DISTANCE() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(13445296355555802501)));
}
/// Achieve the highest speed in a land vehicle
/// Used to be known as _STAT_GET_CHALLENGE_HIGHEST_SPEED
pub fn STAT_GET_CURRENT_SPEED() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(6172393068173086391)));
}
/// Reverse the longest distance without crashing
/// Used to be known as _STAT_GET_CHALLENGE_REVERSE_DRIVING
pub fn STAT_GET_CURRENT_DRIVING_REVERSE_DISTANCE() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(3659958909376347442)));
}
/// Fall the longest distance with a parachute before opening it
/// Used to be known as _STAT_GET_CHALLENGE_LONGEST_FREEFALL
pub fn STAT_GET_CURRENT_SKYDIVING_DISTANCE() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(12678889735550524622)));
}
/// Fly low to the ground for the longest distance
/// Used to be known as _STAT_GET_CHALLENGE_LOW_FLYING
pub fn STAT_GET_CHALLENGE_FLYING_DIST() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(7929240611303736708)));
}
/// Used to be known as _STAT_GET_HEIGHT_ABOVE_GROUND
pub fn STAT_GET_FLYING_ALTITUDE(outValue: [*c]f32) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1913645162782162363)), outValue);
}
/// Or non-flyable area
/// Used to be known as _STAT_IS_ABOVE_DEEP_WATER
pub fn STAT_IS_PLAYER_VEHICLE_ABOVE_OCEAN() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(18010618556407355884)));
}
/// Travel the furthest distance when bailing from a vehicle
/// Used to be known as _STAT_GET_LONGEST_BAIL
pub fn STAT_GET_VEHICLE_BAIL_DISTANCE() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(831898695577771117)));
}
/// This function is hard-coded to always return 1.
pub fn STAT_ROLLBACK_SAVE_MIGRATION() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(12959712686925057581)));
}
/// Sets profile setting 866
/// Used to be known as _SET_HAS_CONTENT_UNLOCKS_FLAGS
pub fn SET_HAS_SPECIALEDITION_CONTENT(value: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15762725996750413333)), value);
}
/// Sets profile setting 501
/// Used to be known as _SET_SAVE_MIGRATION_TRANSACTION_ID
pub fn SET_SAVE_MIGRATION_TRANSACTION_ID_WARNING(transactionId: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17760270588872832269)), transactionId);
}
pub fn GET_BOSS_GOON_UUID(characterSlot: c_int, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(7764395768671817406)), characterSlot, p1, p2);
}
/// Used to be known as _PLAYSTATS_BW_BOSS_ON_BOSS_DEATH_MATCH
pub fn PLAYSTATS_BW_BOSSONBOSSDEATHMATCH(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10199205469336740421)), p0);
}
/// Used to be known as _PLAYSTATS_BW_YACHT_ATTACK
pub fn PLAYSTATS_BW_YATCHATTACK(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15105616563684304736)), p0);
}
/// Used to be known as _PLAYSTATS_BW_HUNT_THE_BOSS
pub fn PLAYSTATS_BW_HUNT_THE_BOSS(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9802224097873110190)), p0);
}
/// Used to be known as _PLAYSTATS_BW_SIGHTSEER
pub fn PLAYSTATS_BW_SIGHTSEER(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18213164787491667116)), p0);
}
/// Used to be known as _PLAYSTATS_BW_ASSAULT
pub fn PLAYSTATS_BW_ASSAULT(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7462331374075382747)), p0);
}
/// Used to be known as _PLAYSTATS_BW_BELLY_OF_THE_BEAST
pub fn PLAYSTATS_BW_BELLY_OF_THE_BEAST(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12030605211757852138)), p0);
}
/// Used to be known as _PLAYSTATS_BW_HEADHUNTER
pub fn PLAYSTATS_BW_HEAD_HUNTER(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6913803036466883089)), p0);
}
/// Used to be known as _PLAYSTATS_BW_FRAGILE_GOOODS
pub fn PLAYSTATS_BW_FRAGILE_GOODS(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2894520681709388615)), p0);
}
/// Used to be known as _PLAYSTATS_BW_AIR_FREIGHT
pub fn PLAYSTATS_BW_AIR_FREIGHT(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17323781245007844419)), p0);
}
/// Used to be known as _PLAYSTATS_BC_CAR_JACKING
pub fn PLAYSTATS_BC_CAR_JACKING(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8870079580392319445)), p0);
}
/// Used to be known as _PLAYSTATS_BC_SMASH_AND_GRAB
pub fn PLAYSTATS_BC_SMASH_AND_GRAB(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(498482334864393246)), p0);
}
/// Used to be known as _PLAYSTATS_BC_PROTECTION_RACKET
pub fn PLAYSTATS_BC_PROTECTION_RACKET(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1508048290572998182)), p0);
}
/// Used to be known as _PLAYSTATS_BC_MOST_WANTED
pub fn PLAYSTATS_BC_MOST_WANTED(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10596776692690543049)), p0);
}
/// Used to be known as _PLAYSTATS_BC_FINDERS_KEEPERS
pub fn PLAYSTATS_BC_FINDERS_KEEPERS(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16367802301768026827)), p0);
}
/// Used to be known as _PLAYSTATS_BC_POINT_TO_POINT
pub fn PLAYSTATS_BC_POINT_TO_POINT(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8286656527214917624)), p0);
}
/// Used to be known as _PLAYSTATS_BC_CASHING
pub fn PLAYSTATS_BC_CASHING(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6037885909452614035)), p0);
}
/// Used to be known as _PLAYSTATS_BC_SALVAGE
pub fn PLAYSTATS_BC_SALVAGE(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9022444058110694281)), p0);
}
/// Used to be known as _PLAYSTATS_SPENT_PI_CUSTOM_LOADOUT
pub fn PLAYSTATS_SPENT_PI_CUSTOM_LOADOUT(amount: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13713631333510798987)), amount);
}
/// Used to be known as _PLAYSTATS_BUY_CONTRABAND
pub fn PLAYSTATS_BUY_CONTRABAND_MISSION(data: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15454135392107049463)), data);
}
/// Used to be known as _PLAYSTATS_SELL_CONTRABAND
pub fn PLAYSTATS_SELL_CONTRABAND_MISSION(data: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14351170026963548014)), data);
}
/// Used to be known as _PLAYSTATS_DEFEND_CONTRABAND
pub fn PLAYSTATS_DEFEND_CONTRABAND_MISSION(data: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2739708355486563165)), data);
}
/// Used to be known as _PLAYSTATS_RECOVER_CONTRABAND
pub fn PLAYSTATS_RECOVER_CONTRABAND_MISSION(data: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(349323262825257517)), data);
}
/// Used to be known as _PLAYSTATS_HIT_CONTRABAND_DESTROY_LIMIT
pub fn PLAYSTATS_HIT_CONTRABAND_DESTROY_LIMIT(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6984762044908496966)), p0);
}
/// Used to be known as _PLAYSTATS_BECOME_BOSS
pub fn START_BEING_BOSS(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(4521240656848484029)), p0, p1, p2);
}
/// Used to be known as _PLAYSTATS_BECOME_GOON
pub fn START_BEING_GOON(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(10873612636734299145)), p0, p1, p2);
}
/// Used to be known as _PLAYSTATS_END_BEING_BOSS
pub fn END_BEING_BOSS(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(11800899991608135378)), p0, p1, p2);
}
/// Used to be known as _PLAYSTATS_END_BEING_GOON
pub fn END_BEING_GOON(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(7767857873581964677)), p0, p1, p2, p3, p4);
}
/// Used to be known as _HIRED_LIMO
pub fn HIRED_LIMO(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8728664007952783012)), p0, p1);
}
/// Used to be known as _ORDERED_BOSS_VEHICLE
pub fn ORDER_BOSS_VEHICLE(p0: types.Any, p1: types.Any, vehicleHash: types.Hash) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(14890399978938844897)), p0, p1, vehicleHash);
}
/// Used to be known as _PLAYSTATS_CHANGE_UNIFORM
pub fn CHANGE_UNIFORM(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(15116817222292411677)), p0, p1, p2);
}
/// Used to be known as _PLAYSTATS_CHANGE_GOON_LOOKING_FOR_WORK
pub fn CHANGE_GOON_LOOKING_FOR_WORK(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4940902616692121791)), p0);
}
/// Used to be known as _PLAYSTATS_GHOSTING_TO_PLAYER
pub fn SEND_METRIC_GHOSTING_TO_PLAYER(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8085068529057400974)), p0);
}
/// Used to be known as _PLAYSTATS_VIP_POACH
pub fn SEND_METRIC_VIP_POACH(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(12272975286059631349)), p0, p1, p2);
}
/// Used to be known as _PLAYSTATS_PUNISH_BODYGUARD
pub fn SEND_METRIC_PUNISH_BODYGUARD(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(97676138129909484)), p0);
}
/// Allows CEventNetworkStuntPerformed to be triggered.
/// Used to be known as _PLAYSTATS_STUNT_PERFORMED_EVENT_ALLOW_TRIGGER
pub fn PLAYSTATS_START_TRACKING_STUNTS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(10560307500704567027)));
}
/// Disallows CEventNetworkStuntPerformed to be triggered.
/// Used to be known as _PLAYSTATS_STUNT_PERFORMED_EVENT_DISALLOW_TRIGGER
pub fn PLAYSTATS_STOP_TRACKING_STUNTS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(9979991810062001501)));
}
/// Used to be known as _PLAYSTATS_MISSION_ENDED
pub fn PLAYSTATS_MISSION_ENDED(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13778513276289815293)), p0);
}
/// Used to be known as _PLAYSTATS_IMPEXP_MISSION_ENDED
pub fn PLAYSTATS_IMPEXP_MISSION_ENDED(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9046500570024469703)), p0);
}
/// Used to be known as _PLAYSTATS_CHANGE_MC_ROLE
pub fn PLAYSTATS_CHANGE_MC_ROLE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, role: c_int, p5: c_int, p6: types.Any) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(816940483847037160)), p0, p1, p2, p3, role, p5, p6);
}
/// Used to be known as _PLAYSTATS_CHANGE_MC_OUTFIT
pub fn PLAYSTATS_CHANGE_MC_OUTFIT(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(2948934905689570738)), p0, p1, p2, p3, p4);
}
/// Used to be known as _PLAYSTATS_CHANGE_MC_EMBLEM
pub fn PLAYSTATS_SWITCH_MC_EMBLEM(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(743325249583827860)), p0, p1, p2, p3, p4);
}
/// Used to be known as _PLAYSTATS_MC_REQUEST_BIKE
pub fn PLAYSTATS_MC_REQUEST_BIKE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(14710344443894692330)), p0, p1, p2, p3, p4);
}
/// Used to be known as _PLAYSTATS_KILLED_RIVAL_MC_MEMBER
pub fn PLAYSTATS_MC_KILLED_RIVAL_MC_MEMBER(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(17668986167014370598)), p0, p1, p2, p3, p4);
}
/// Used to be known as _PLAYSTATS_ABANDONING_MC
pub fn PLAYSTATS_ABANDONED_MC(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(15373247063020529874)), p0, p1, p2, p3, p4);
}
/// Used to be known as _PLAYSTATS_EARNED_MC_POINTS
pub fn PLAYSTATS_EARNED_MC_POINTS(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(5770369536710702286)), p0, p1, p2, p3, p4, p5);
}
/// Used to be known as _PLAYSTATS_MC_FORMATION_ENDS
pub fn PLAYSTATS_MC_FORMATION_ENDS(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any, p6: types.Any) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(271041414600850290)), p0, p1, p2, p3, p4, p5, p6);
}
/// Used to be known as _PLAYSTATS_MC_CLUBHOUSE_ACTIVITY
pub fn PLAYSTATS_MC_CLUBHOUSE_ACTIVITY(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any, p6: types.Any, p7: types.Any) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(9910676582319007028)), p0, p1, p2, p3, p4, p5, p6, p7);
}
/// Used to be known as _PLAYSTATS_RIVAL_BEHAVIOUR
pub fn PLAYSTATS_RIVAL_BEHAVIOR(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any, p6: types.Any, p7: types.Any, p8: types.Any, p9: types.Any) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(2858128349403610723)), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9);
}
/// Used to be known as _PLAYSTATS_COPY_RANK_INTO_NEW_SLOT
pub fn PLAYSTATS_COPY_RANK_INTO_NEW_SLOT(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any, p6: types.Any) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(13197090220221047050)), p0, p1, p2, p3, p4, p5, p6);
}
/// Used to be known as _PLAYSTATS_DUPE_DETECTION
pub fn PLAYSTATS_DUPE_DETECTED(data: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9550839653924551429)), data);
}
/// Used to be known as _PLAYSTATS_BAN_ALERT
pub fn PLAYSTATS_BAN_ALERT(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5868130316867006437)), p0);
}
/// Used to be known as _PLAYSTATS_GUNRUN_MISSION_ENDED
pub fn PLAYSTATS_GUNRUNNING_MISSION_ENDED(data: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1057465772832789850)), data);
}
/// Used to be known as _PLAYSTATS_GUNRUN_RND
pub fn PLAYSTATS_GUNRUNNING_RND(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15778369643847306220)), p0);
}
/// Used to be known as _PLAYSTATS_BUSINESS_BATTLE_ENDED
pub fn PLAYSTATS_BUSINESS_BATTLE_ENDED(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3561702565450880884)), p0);
}
/// Used to be known as _PLAYSTATS_WAREHOUSE_MISSION_ENDED
pub fn PLAYSTATS_WAREHOUSE_MISSION_ENDED(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3277102478951331934)), p0);
}
/// Used to be known as _PLAYSTATS_NIGHTCLUB_MISSION_ENDED
pub fn PLAYSTATS_NIGHTCLUB_MISSION_ENDED(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9442986586368060665)), p0);
}
/// Used to be known as _PLAYSTATS_DJ_USAGE
pub fn PLAYSTATS_DJ_USAGE(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12857608738871383847)), p0, p1);
}
/// Used to be known as _PLAYSTATS_MINIGAME_USAGE
pub fn PLAYSTATS_MINIGAME_USAGE(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(13928465919726721458)), p0, p1, p2);
}
/// Used to be known as _PLAYSTATS_STONE_HATCHET_END
pub fn PLAYSTATS_STONE_HATCHET_ENDED(data: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3883121393515464240)), data);
}
/// Used to be known as _PLAYSTATS_SMUG_MISSION_ENDED
pub fn PLAYSTATS_SMUGGLER_MISSION_ENDED(data: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3606315763735682525)), data);
}
/// Used to be known as _PLAYSTATS_H2_FMPREP_END
pub fn PLAYSTATS_FM_HEIST_PREP_ENDED(data: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15613895544899226811)), data);
}
/// Used to be known as _PLAYSTATS_H2_INSTANCE_END
pub fn PLAYSTATS_INSTANCED_HEIST_ENDED(data: [*c]types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(2167524243805339925)), data, p1, p2, p3);
}
/// Used to be known as _PLAYSTATS_DAR_MISSION_END
pub fn PLAYSTATS_DAR_CHECKPOINT(data: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(847333135075054849)), data);
}
/// Used to be known as _PLAYSTATS_ENTER_SESSION_PACK
pub fn PLAYSTATS_ENTER_SESSION_PACK(data: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9768291472006617430)), data);
}
/// Used to be known as _PLAYSTATS_DRONE_USAGE
pub fn PLAYSTATS_DRONE_USAGE(p0: c_int, p1: c_int, p2: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(7406093875911933902)), p0, p1, p2);
}
/// Used to be known as _PLAYSTATS_SPECTATOR_WHEEL_SPIN
pub fn PLAYSTATS_SPIN_WHEEL(p0: c_int, p1: c_int, p2: c_int, p3: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(7435969121026308816)), p0, p1, p2, p3);
}
/// Used to be known as _PLAYSTATS_ARENA_WAR_SPECTATOR
pub fn PLAYSTATS_ARENA_WARS_SPECTATOR(p0: c_int, p1: c_int, p2: c_int, p3: c_int, p4: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(8020727967853846538)), p0, p1, p2, p3, p4);
}
/// Used to be known as _PLAYSTATS_ARENA_WARS_ENDED
pub fn PLAYSTATS_ARENA_WARS_ENDED(data: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13004665027390217157)), data);
}
/// Used to be known as _PLAYSTATS_PASSIVE_MODE
pub fn PLAYSTATS_SWITCH_PASSIVE_MODE(p0: windows.BOOL, p1: c_int, p2: c_int, p3: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(3886262068155914865)), p0, p1, p2, p3);
}
/// Used to be known as _PLAYSTATS_COLLECTIBLE
pub fn PLAYSTATS_COLLECTIBLE_PICKED_UP(p0: c_int, objectHash: types.Hash, p2: types.Any, p3: types.Any, moneyAmount: c_int, rpAmount: c_int, chipsAmount: c_int, p7: types.Any, p8: c_int, p9: types.Any, p10: types.Any) void {
_ = nativeCaller.invoke11(@as(u64, @intCast(14774773892453506290)), p0, objectHash, p2, p3, moneyAmount, rpAmount, chipsAmount, p7, p8, p9, p10);
}
/// Used to be known as _PLAYSTATS_CASINO_STORY_MISSION_ENDED
pub fn PLAYSTATS_CASINO_STORY_MISSION_ENDED(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18216123897043087744)), p0, p1);
}
/// Used to be known as _PLAYSTATS_CASINO_CHIP
pub fn PLAYSTATS_CASINO_CHIP(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(691852232327188498)), p0);
}
/// Used to be known as _PLAYSTATS_CASINO_ROULETTE
pub fn PLAYSTATS_CASINO_ROULETTE(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10741116190643775473)), p0);
}
/// Used to be known as _PLAYSTATS_CASINO_BLACKJACK
pub fn PLAYSTATS_CASINO_BLACKJACK(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4516713711249385389)), p0);
}
/// Used to be known as _PLAYSTATS_CASINO_THREECARDPOKER
pub fn PLAYSTATS_CASINO_THREE_CARD_POKER(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17816516324978269237)), p0);
}
/// Used to be known as _PLAYSTATS_CASINO_SLOTMACHINE
pub fn PLAYSTATS_CASINO_SLOT_MACHINE(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17248441864007942922)), p0);
}
/// Used to be known as _PLAYSTATS_CASINO_INSIDETRACK
pub fn PLAYSTATS_CASINO_INSIDE_TRACK(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(332991039873059462)), p0);
}
/// Used to be known as _PLAYSTATS_CASINO_LUCKYSEVEN
pub fn PLAYSTATS_CASINO_LUCKY_SEVEN(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(883598417211024634)), p0);
}
/// Used to be known as _PLAYSTATS_CASINO_ROULETTE_LIGHT
pub fn PLAYSTATS_CASINO_ROULETTE_LIGHT(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7310093865469450236)), p0);
}
/// Used to be known as _PLAYSTATS_CASINO_BLACKJACK_LIGHT
pub fn PLAYSTATS_CASINO_BLACKJACK_LIGHT(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15367720622126918511)), p0);
}
/// Used to be known as _PLAYSTATS_CASINO_THREECARDPOKER_LIGHT
pub fn PLAYSTATS_CASINO_THREE_CARD_POKER_LIGHT(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14483597724864778018)), p0);
}
/// Used to be known as _PLAYSTATS_CASINO_SLOTMACHINE_LIGHT
pub fn PLAYSTATS_CASINO_SLOT_MACHINE_LIGHT(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16573339679104443007)), p0);
}
/// Used to be known as _PLAYSTATS_CASINO_INSIDETRACK_LIGHT
pub fn PLAYSTATS_CASINO_INSIDE_TRACK_LIGHT(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2568120295216205383)), p0);
}
/// Used to be known as _PLAYSTATS_ARCADEGAME
pub fn PLAYSTATS_ARCADE_GAME(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any, p6: types.Any) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(5997243424377272664)), p0, p1, p2, p3, p4, p5, p6);
}
/// Used to be known as _PLAYSTATS_ARCADE_LOVEMATCH
pub fn PLAYSTATS_ARCADE_LOVE_MATCH(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5750460377678822437)), p0, p1);
}
/// Used to be known as _PLAYSTATS_CASINO_MISSION_ENDED
pub fn PLAYSTATS_FREEMODE_CASINO_MISSION_ENDED(data: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1877238448262970309)), data);
}
/// Used to be known as _PLAYSTATS_HEIST3_DRONE
pub fn PLAYSTATS_HEIST3_DRONE(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16122204690296595099)), p0);
}
/// Used to be known as _PLAYSTATS_HEIST3_HACK
pub fn PLAYSTATS_HEIST3_HACK(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(10591356838945507860)), p0, p1, p2, p3, p4, p5);
}
/// Used to be known as _PLAYSTATS_NPC_PHONE
pub fn PLAYSTATS_NPC_PHONE(p0: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(33760874230671763)), p0);
}
/// Used to be known as _PLAYSTATS_ARCADE_CABINET
pub fn PLAYSTATS_ARCADE_CABINET(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17944981477965928916)), p0);
}
/// Used to be known as _PLAYSTATS_HEIST3_FINALE
pub fn PLAYSTATS_HEIST3_FINALE(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3315310934253609767)), p0);
}
/// Used to be known as _PLAYSTATS_HEIST3_PREP
pub fn PLAYSTATS_HEIST3_PREP(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6035694674337149439)), p0);
}
/// Used to be known as _PLAYSTATS_MASTER_CONTROL
pub fn PLAYSTATS_MASTER_CONTROL(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(9298631186805719024)), p0, p1, p2, p3);
}
/// Used to be known as _PLAYSTATS_QUIT_MODE
pub fn PLAYSTATS_QUIT_MODE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(6625525431557848148)), p0, p1, p2, p3, p4);
}
/// Used to be known as _PLAYSTATS_MISSION_VOTE
pub fn PLAYSTATS_MISSION_VOTE(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13852979185079953563)), p0);
}
/// Used to be known as _PLAYSTATS_NJVS_VOTE
pub fn PLAYSTATS_NJVS_VOTE(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6690921144453369552)), p0);
}
pub fn PLAYSTATS_KILL_YOURSELF() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(5404176628756900139)));
}
/// Used to be known as _PLAYSTATS_FREEMODE_MISSION_END
pub fn PLAYSTATS_FM_MISSION_END(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(5091046114642946745)), p0, p1, p2, p3);
}
/// Used to be known as _PLAYSTATS_HEIST4_PREP
pub fn PLAYSTATS_HEIST4_PREP(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16126740742401536865)), p0);
}
/// Used to be known as _PLAYSTATS_HEIST4_FINALE
pub fn PLAYSTATS_HEIST4_FINALE(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13972809018908128598)), p0);
}
/// Used to be known as _PLAYSTATS_HEIST4_HACK
pub fn PLAYSTATS_HEIST4_HACK(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(3432612855239705747)), p0, p1, p2, p3, p4);
}
/// Used to be known as _PLAYSTATS_SUB_WEAP
pub fn PLAYSTATS_SUB_WEAP(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(15291547234442124720)), p0, p1, p2, p3);
}
/// Used to be known as _PLAYSTATS_FAST_TRVL
pub fn PLAYSTATS_FAST_TRVL(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any, p6: types.Any, p7: types.Any, p8: types.Any, p9: types.Any, p10: types.Any) void {
_ = nativeCaller.invoke11(@as(u64, @intCast(5603629066178797512)), p0, p1, p2, p3, p4, p5, p6, p7, p8, p9, p10);
}
/// Used to be known as _PLAYSTATS_HUB_ENTRY
pub fn PLAYSTATS_HUB_ENTRY(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2889339975462750686)), p0);
}
/// Used to be known as _PLAYSTATS_DJ_MISSION_ENDED
pub fn PLAYSTATS_DJ_MISSION_ENDED(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15477280598275002146)), p0);
}
/// Used to be known as _PLAYSTATS_ROBBERY_PREP
pub fn PLAYSTATS_ROBBERY_PREP(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1902735379545208885)), p0);
}
/// Used to be known as _PLAYSTATS_ROBBERY_FINALE
pub fn PLAYSTATS_ROBBERY_FINALE(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13521314515398606660)), p0);
}
/// Used to be known as _PLAYSTATS_EXTRA_EVENT
pub fn PLAYSTATS_EXTRA_EVENT(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18040141077673406361)), p0);
}
/// Used to be known as _PLAYSTATS_CARCLUB_POINTS
pub fn PLAYSTATS_CARCLUB_POINTS(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18380552369580571582)), p0);
}
/// Used to be known as _PLAYSTATS_CARCLUB_CHALLENGE
pub fn PLAYSTATS_CARCLUB_CHALLENGE(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(1263201802941349591)), p0, p1, p2, p3);
}
/// Used to be known as _PLAYSTATS_CARCLUB_PRIZE
pub fn PLAYSTATS_CARCLUB_PRIZE(p0: c_int, vehicleModel: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7622662011383583784)), p0, vehicleModel);
}
/// Used to be known as _PLAYSTATS_AWARDS_NAV
pub fn PLAYSTATS_AWARD_NAV(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(8139451973173308334)), p0, p1, p2, p3);
}
/// Used to be known as _PLAYSTATS_INST_MISSION_END
pub fn PLAYSTATS_INST_MISSION_END(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18348781883649036538)), p0);
}
/// Used to be known as _PLAYSTATS_HUB_EXIT
pub fn PLAYSTATS_HUB_EXIT(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6505076814625771826)), p0);
}
pub fn PLAYSTATS_VEH_DEL(bossId1: c_int, bossId2: c_int, bossType: c_int, vehicleID: c_int, reason: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(1199806834163324624)), bossId1, bossId2, bossType, vehicleID, reason);
}
/// Used to be known as _PLAYSTATS_INVENTORY
pub fn PLAYSTATS_INVENTORY(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9835207805439277320)), p0);
}
pub fn _PLAYSTATS_ACID_MISSION_END(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9954029615429921708)), p0);
}
pub fn _PLAYSTATS_ACID_RND(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14892505689547982266)), p0);
}
pub fn _PLAYSTATS_IDLE(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(17047623917464252881)), p0, p1, p2);
}
pub fn _PLAYSTATS_PLAYER_STYLE(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5258733065651808921)), p0);
}
pub fn _PLAYSTATS_RANDOM_EVENT(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9124415539645092756)), p0);
}
pub fn _PLAYSTATS_ALERT(data: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6217723010883051545)), data);
}
pub fn _PLAYSTATS_ATTRITION_STAGE_END(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13647071484184818088)), p0);
}
pub fn _PLAYSTATS_SHOWROOM_NAV(p0: types.Any, p1: types.Any, entity: types.Hash) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(10816873725047351515)), p0, p1, entity);
}
/// Data struct contains various tunables related to test drives at Simeons Showroom or Luxury Showcase.
pub fn _PLAYSTATS_SHOWROOM_OVERVIEW(data: [*c]types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1521491016943825967)), data);
}
};
pub const STREAMING = struct {
pub fn LOAD_ALL_OBJECTS_NOW() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(13649993082112101183)));
}
pub fn LOAD_SCENE(x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(4920441483675323355)), x, y, z);
}
pub fn NETWORK_UPDATE_LOAD_SCENE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14148093505384029254)));
}
pub fn IS_NETWORK_LOADING_SCENE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(4740700733220758699)));
}
pub fn SET_INTERIOR_ACTIVE(interiorID: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16391825850913138925)), interiorID, toggle);
}
/// Request a model to be loaded into memory.
pub fn REQUEST_MODEL(model: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10825852671273492652)), model);
}
pub fn REQUEST_MENU_PED_MODEL(model: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11539940711043417374)), model);
}
/// Checks if the specified model has loaded into memory.
pub fn HAS_MODEL_LOADED(model: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10999174976919095634)), model);
}
/// STREAMING::REQUEST_MODELS_IN_ROOM(l_13BC, "V_FIB01_cur_elev");
/// STREAMING::REQUEST_MODELS_IN_ROOM(l_13BC, "limbo");
/// STREAMING::REQUEST_MODELS_IN_ROOM(l_13BB, "V_Office_gnd_lifts");
/// STREAMING::REQUEST_MODELS_IN_ROOM(l_13BB, "limbo");
/// STREAMING::REQUEST_MODELS_IN_ROOM(l_13BC, "v_fib01_jan_elev");
/// STREAMING::REQUEST_MODELS_IN_ROOM(l_13BC, "limbo");
/// Used to be known as _REQUEST_INTERIOR_ROOM_BY_NAME
pub fn REQUEST_MODELS_IN_ROOM(interior: types.Interior, roomName: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9978358362105965656)), interior, roomName);
}
/// Unloads model from memory
pub fn SET_MODEL_AS_NO_LONGER_NEEDED(model: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16515533089562745515)), model);
}
/// Check if model is in cdimage(rpf)
pub fn IS_MODEL_IN_CDIMAGE(model: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3871372195910563393)), model);
}
/// Returns whether the specified model exists in the game.
pub fn IS_MODEL_VALID(model: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13846715278875188882)), model);
}
pub fn IS_MODEL_A_PED(model: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8467160340481104597)), model);
}
/// Returns whether the specified model represents a vehicle.
pub fn IS_MODEL_A_VEHICLE(model: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1849511532187010366)), model);
}
pub fn REQUEST_COLLISION_AT_COORD(x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(526990946549928359)), x, y, z);
}
pub fn REQUEST_COLLISION_FOR_MODEL(model: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10537494222108839883)), model);
}
pub fn HAS_COLLISION_FOR_MODEL_LOADED(model: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2507559639599083578)), model);
}
/// Alias of REQUEST_COLLISION_AT_COORD.
pub fn REQUEST_ADDITIONAL_COLLISION_AT_COORD(x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(14489608052167256554)), x, y, z);
}
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
pub fn DOES_ANIM_DICT_EXIST(animDict: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3288925407143094625)), animDict);
}
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
pub fn REQUEST_ANIM_DICT(animDict: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15257422121632202486)), animDict);
}
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
pub fn HAS_ANIM_DICT_LOADED(animDict: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15001957746457249932)), animDict);
}
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
pub fn REMOVE_ANIM_DICT(animDict: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17756110238032734726)), animDict);
}
/// Starts loading the specified animation set. An animation set provides movement animations for a ped. See SET_PED_MOVEMENT_CLIPSET.
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
/// Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json
pub fn REQUEST_ANIM_SET(animSet: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7972635428772450029)), animSet);
}
/// Gets whether the specified animation set has finished loading. An animation set provides movement animations for a ped. See SET_PED_MOVEMENT_CLIPSET.
/// Animation set and clip set are synonymous.
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
/// Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json
pub fn HAS_ANIM_SET_LOADED(animSet: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14189161536823175600)), animSet);
}
/// Unloads the specified animation set. An animation set provides movement animations for a ped. See SET_PED_MOVEMENT_CLIPSET.
/// Animation set and clip set are synonymous.
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
/// Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json
pub fn REMOVE_ANIM_SET(animSet: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1600190916137591987)), animSet);
}
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
/// Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json
pub fn REQUEST_CLIP_SET(clipSet: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15179134168094313033)), clipSet);
}
/// Alias for HAS_ANIM_SET_LOADED.
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
/// Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json
pub fn HAS_CLIP_SET_LOADED(clipSet: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3567472081491954419)), clipSet);
}
/// Alias for REMOVE_ANIM_SET.
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
/// Full list of movement clipsets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/movementClipsetsCompact.json
pub fn REMOVE_CLIP_SET(clipSet: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(141645767035637140)), clipSet);
}
/// Exemple: REQUEST_IPL("TrevorsTrailerTrash");
/// Full list of IPLs and interior entity sets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ipls.json
pub fn REQUEST_IPL(iplName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4734559983020792692)), iplName);
}
/// Removes an IPL from the map.
/// Full list of IPLs and interior entity sets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ipls.json
/// Example:
/// C#:
/// Function.Call(Hash.REMOVE_IPL, "trevorstrailertidy");
/// C++:
/// STREAMING::REMOVE_IPL("trevorstrailertidy");
/// iplName = Name of IPL you want to remove.
pub fn REMOVE_IPL(iplName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17180206544770345005)), iplName);
}
/// Full list of IPLs and interior entity sets by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/ipls.json
pub fn IS_IPL_ACTIVE(iplName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9846911559021573269)), iplName);
}
pub fn SET_STREAMING(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7929828657818798216)), toggle);
}
/// 0 - default
/// 1 - HeistIsland
/// Used to be known as _LOAD_GLOBAL_WATER_TYPE
pub fn LOAD_GLOBAL_WATER_FILE(waterType: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9097084249329858259)), waterType);
}
/// Used to be known as _GET_GLOBAL_WATER_TYPE
pub fn GET_GLOBAL_WATER_FILE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(17816729980689799469)));
}
pub fn SET_GAME_PAUSES_FOR_STREAMING(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8177647310938554076)), toggle);
}
pub fn SET_REDUCE_PED_MODEL_BUDGET(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8626075141584545552)), toggle);
}
pub fn SET_REDUCE_VEHICLE_MODEL_BUDGET(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9278866077444525299)), toggle);
}
/// This is a NOP function. It does nothing at all.
pub fn SET_DITCH_POLICE_MODELS(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4813192708654442036)), toggle);
}
pub fn GET_NUMBER_OF_STREAMING_REQUESTS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(4638713605285395593)));
}
/// maps script name (thread + 0xD0) by lookup via scriptfx.dat - does nothing when script name is empty
pub fn REQUEST_PTFX_ASSET() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(10685166128146757064)));
}
pub fn HAS_PTFX_ASSET_LOADED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14590989371548583963)));
}
pub fn REMOVE_PTFX_ASSET() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(9855706948368681587)));
}
/// From the b678d decompiled scripts:
/// STREAMING::REQUEST_NAMED_PTFX_ASSET("core_snow");
/// STREAMING::REQUEST_NAMED_PTFX_ASSET("fm_mission_controler");
/// STREAMING::REQUEST_NAMED_PTFX_ASSET("proj_xmas_firework");
/// STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_apartment_mp");
/// STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_biolab_heist");
/// STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_indep_fireworks");
/// STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_indep_parachute");
/// STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_indep_wheelsmoke");
/// STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_mp_cig_plane");
/// STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_mp_creator");
/// STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_mp_tankbattle");
/// STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_ornate_heist");
/// STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_prison_break_heist_station");
pub fn REQUEST_NAMED_PTFX_ASSET(fxName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13262405284139535030)), fxName);
}
pub fn HAS_NAMED_PTFX_ASSET_LOADED(fxName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9728410087137920084)), fxName);
}
/// Used to be known as _REMOVE_NAMED_PTFX_ASSET
pub fn REMOVE_NAMED_PTFX_ASSET(fxName: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6873033708056672621)), fxName);
}
pub fn SET_VEHICLE_POPULATION_BUDGET(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14672198393358120169)), p0);
}
/// Control how many new (ambient?) peds will spawn in the game world.
/// Range for p0 seems to be 0-3, where 0 is none and 3 is the normal level.
pub fn SET_PED_POPULATION_BUDGET(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10130059273862070515)), p0);
}
pub fn CLEAR_FOCUS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(3582399230505917858)));
}
/// Override the area where the camera will render the terrain.
/// p3, p4 and p5 are usually set to 0.0
/// Used to be known as _SET_FOCUS_AREA
pub fn SET_FOCUS_POS_AND_VEL(x: f32, y: f32, z: f32, offsetX: f32, offsetY: f32, offsetZ: f32) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(13507514344510389797)), x, y, z, offsetX, offsetY, offsetZ);
}
/// It seems to make the entity's coords mark the point from which LOD-distances are measured. In my testing, setting a vehicle as the focus entity and moving that vehicle more than 300 distance units away from the player will make the level of detail around the player go down drastically (shadows disappear, textures go extremely low res, etc). The player seems to be the default focus entity.
pub fn SET_FOCUS_ENTITY(entity: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1841822097142223645)), entity);
}
pub fn IS_ENTITY_FOCUS(entity: types.Entity) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3305628913299216199)), entity);
}
pub fn SET_RESTORE_FOCUS_ENTITY(p0: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(581307532518502380)), p0);
}
/// Possible p0 values:
/// "prologue"
/// "Prologue_Main"
pub fn SET_MAPDATACULLBOX_ENABLED(name: [*c]const u8, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12615252212068267465)), name, toggle);
}
/// This native does absolutely nothing, just a nullsub
pub fn SET_ALL_MAPDATA_CULLED(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5643827625767894650)), p0);
}
/// Always returns zero.
/// Used to be known as FORMAT_FOCUS_HEADING
pub fn STREAMVOL_CREATE_SPHERE(x: f32, y: f32, z: f32, rad: f32, p4: types.Any, p5: types.Any) c_int {
return nativeCaller.invoke6(@as(u64, @intCast(2421946546546551293)), x, y, z, rad, p4, p5);
}
/// Always returns zero.
pub fn STREAMVOL_CREATE_FRUSTUM(p0: f32, p1: f32, p2: f32, p3: f32, p4: f32, p5: f32, p6: f32, p7: types.Any, p8: types.Any) c_int {
return nativeCaller.invoke9(@as(u64, @intCast(2251520038503688060)), p0, p1, p2, p3, p4, p5, p6, p7, p8);
}
/// Always returns zero.
pub fn STREAMVOL_CREATE_LINE(p0: f32, p1: f32, p2: f32, p3: f32, p4: f32, p5: f32, p6: types.Any) c_int {
return nativeCaller.invoke7(@as(u64, @intCast(781780310675118351)), p0, p1, p2, p3, p4, p5, p6);
}
pub fn STREAMVOL_DELETE(unused: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2226986994190643283)), unused);
}
pub fn STREAMVOL_HAS_LOADED(unused: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9025752219894176557)), unused);
}
pub fn STREAMVOL_IS_VALID(unused: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(559312740087656492)), unused);
}
pub fn IS_STREAMVOL_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(13589651095095073964)));
}
/// `radius` value is usually between `3f` and `7000f` in original 1868 scripts.
/// `p7` is 0, 1, 2, 3 or 4 used in decompiled scripts, 0 is by far the most common.
/// Returns True if success, used only 7 times in decompiled scripts of 1868
pub fn NEW_LOAD_SCENE_START(posX: f32, posY: f32, posZ: f32, offsetX: f32, offsetY: f32, offsetZ: f32, radius: f32, p7: c_int) windows.BOOL {
return nativeCaller.invoke8(@as(u64, @intCast(2389877639980251842)), posX, posY, posZ, offsetX, offsetY, offsetZ, radius, p7);
}
pub fn NEW_LOAD_SCENE_START_SPHERE(x: f32, y: f32, z: f32, radius: f32, p4: types.Any) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(12452370149643997616)), x, y, z, radius, p4);
}
pub fn NEW_LOAD_SCENE_STOP() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(13949725492155249828)));
}
pub fn IS_NEW_LOAD_SCENE_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(11824770054270229381)));
}
pub fn IS_NEW_LOAD_SCENE_LOADED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(123889098213268177)));
}
pub fn IS_SAFE_TO_START_PLAYER_SWITCH() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(8207725548282354349)));
}
/// // this enum comes directly from R* so don't edit this
/// enum ePlayerSwitchTypes
/// {
/// SWITCH_TYPE_AUTO,
/// SWITCH_TYPE_LONG,
/// SWITCH_TYPE_MEDIUM,
/// SWITCH_TYPE_SHORT
/// };
/// Use GET_IDEAL_PLAYER_SWITCH_TYPE for the best switch type.
/// ----------------------------------------------------
/// Examples from the decompiled scripts:
/// STREAMING::START_PLAYER_SWITCH(l_832._f3, PLAYER::PLAYER_PED_ID(), 0, 3);
/// STREAMING::START_PLAYER_SWITCH(l_832._f3, PLAYER::PLAYER_PED_ID(), 2050, 3);
/// STREAMING::START_PLAYER_SWITCH(PLAYER::PLAYER_PED_ID(), l_832._f3, 1024, 3);
/// STREAMING::START_PLAYER_SWITCH(g_141F27, PLAYER::PLAYER_PED_ID(), 513, v_14);
/// Note: DO NOT, use SWITCH_TYPE_LONG with flag 513. It leaves you stuck in the clouds. You'll have to call STOP_PLAYER_SWITCH() to return to your ped.
/// Flag 8 w/ SWITCH_TYPE_LONG will zoom out 3 steps, then zoom in 2/3 steps and stop on the 3rd and just hang there.
/// Flag 8 w/ SWITCH_TYPE_MEDIUM will zoom out 1 step, and just hang there.
pub fn START_PLAYER_SWITCH(from: types.Ped, to: types.Ped, flags: c_int, switchType: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(18060066917042199911)), from, to, flags, switchType);
}
pub fn STOP_PLAYER_SWITCH() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(10790806933449775777)));
}
/// Returns true if the player is currently switching, false otherwise.
/// (When the camera is in the sky moving from Trevor to Franklin for example)
pub fn IS_PLAYER_SWITCH_IN_PROGRESS() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(15695836346704376671)));
}
pub fn GET_PLAYER_SWITCH_TYPE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(12954967789100899938)));
}
/// x1, y1, z1 -- Coords of your ped model
/// x2, y2, z2 -- Coords of the ped you want to switch to
pub fn GET_IDEAL_PLAYER_SWITCH_TYPE(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32) c_int {
return nativeCaller.invoke6(@as(u64, @intCast(13103137814654094853)), x1, y1, z1, x2, y2, z2);
}
pub fn GET_PLAYER_SWITCH_STATE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(5117590216442426021)));
}
pub fn GET_PLAYER_SHORT_SWITCH_STATE() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(2375816641523492864)));
}
pub fn SET_PLAYER_SHORT_SWITCH_STYLE(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6854500591887249001)), p0);
}
pub fn GET_PLAYER_SWITCH_JUMP_CUT_INDEX() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(8701193290245248053)));
}
pub fn SET_PLAYER_SWITCH_OUTRO(cameraCoordX: f32, cameraCoordY: f32, cameraCoordZ: f32, camRotationX: f32, camRotationY: f32, camRotationZ: f32, camFov: f32, camFarClip: f32, rotationOrder: c_int) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(13981625651669789537)), cameraCoordX, cameraCoordY, cameraCoordZ, camRotationX, camRotationY, camRotationZ, camFov, camFarClip, rotationOrder);
}
/// All names can be found in playerswitchestablishingshots.meta
pub fn SET_PLAYER_SWITCH_ESTABLISHING_SHOT(name: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1143524802295151717)), name);
}
pub fn ALLOW_PLAYER_SWITCH_PAN() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(4886801473252993257)));
}
pub fn ALLOW_PLAYER_SWITCH_OUTRO() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(8421219511541720896)));
}
pub fn ALLOW_PLAYER_SWITCH_ASCENT() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(10244007289206761876)));
}
pub fn ALLOW_PLAYER_SWITCH_DESCENT() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(12492949308869181049)));
}
pub fn IS_SWITCH_READY_FOR_DESCENT() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(16116145226749974963)));
}
pub fn ENABLE_SWITCH_PAUSE_BEFORE_DESCENT() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(15310336574637648845)));
}
pub fn DISABLE_SWITCH_OUTRO_FX() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(13646007536612586427)));
}
/// doesn't act normally when used on mount chilliad
/// Flags is a bitflag:
/// 2^n - Enabled Functionality:
/// 0 - Skip camera rotate up
/// 3 - Wait for SET_PLAYER_SWITCH_ESTABLISHING_SHOT / hang at last step. You will still need to run 0x74DE2E8739086740 to exit "properly" and then STOP_PLAYER_SWITCH
/// 6 - Invert Switch Direction (false = out, true = in)
/// 8 - Hang above ped
/// switchType: 0 - 3
/// 0: 1 step towards ped
/// 1: 3 steps out from ped
/// 2: 1 step out from ped
/// 3: 1 step towards ped
/// Used to be known as _SWITCH_OUT_PLAYER
pub fn SWITCH_TO_MULTI_FIRSTPART(ped: types.Ped, flags: c_int, switchType: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(12300210255363577532)), ped, flags, switchType);
}
/// Used to be known as _SWITCH_IN_PLAYER
pub fn SWITCH_TO_MULTI_SECONDPART(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15576080799818947768)), ped);
}
pub fn IS_SWITCH_TO_MULTI_FIRSTPART_FINISHED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(10609283266083141108)));
}
/// Used to be known as SET_PLAYER_INVERTED_UP
pub fn GET_PLAYER_SWITCH_INTERP_OUT_DURATION() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(631303040090047675)));
}
pub fn GET_PLAYER_SWITCH_INTERP_OUT_CURRENT_TIME() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(6577683649291326117)));
}
/// Used to be known as DESTROY_PLAYER_IN_PAUSE_MENU
pub fn IS_SWITCH_SKIPPING_DESCENT() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(6590150046017011326)));
}
pub fn SET_SCENE_STREAMING_TRACKS_CAM_POS_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(2202356593894833699)));
}
pub fn GET_LODSCALE() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(870796597400843421)));
}
/// This allows you to override "extended distance scaling" setting. Needs to be called each frame.
/// Max scaling seems to be 200.0, normal is 1.0
/// See https://gfycat.com/DetailedHauntingIncatern
pub fn OVERRIDE_LODSCALE_THIS_FRAME(scaling: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12061583168054117262)), scaling);
}
pub fn REMAP_LODSCALE_RANGE_THIS_FRAME(p0: f32, p1: f32, p2: f32, p3: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(13751963975671628051)), p0, p1, p2, p3);
}
pub fn SUPPRESS_HD_MAP_STREAMING_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(5126107042663278678)));
}
pub fn SET_RENDER_HD_ONLY(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4660940953094668786)), toggle);
}
pub fn FORCE_ALLOW_TIME_BASED_FADING_THIS_FRAME() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(284185301824822590)));
}
pub fn IPL_GROUP_SWAP_START(iplName1: [*c]const u8, iplName2: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10783828341731855079)), iplName1, iplName2);
}
pub fn IPL_GROUP_SWAP_CANCEL() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(7199896357528767660)));
}
pub fn IPL_GROUP_SWAP_IS_READY() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(18093653944824726026)));
}
pub fn IPL_GROUP_SWAP_FINISH() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(17627329577555951526)));
}
pub fn IPL_GROUP_SWAP_IS_ACTIVE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(5794149789284519384)));
}
/// This native is used to attribute the SRL that BEGIN_SRL is going to load. This is usually used for 'in-game' cinematics (not cutscenes but camera stuff) instead of SET_FOCUS_POS_AND_VEL because it loads a specific area of the map which is pretty useful when the camera moves from distant areas.
/// For instance, GTA:O opening cutscene.
/// https://pastebin.com/2EeKVeLA : a list of SRL found in srllist.meta
/// https://pastebin.com/zd9XYUWY here is the content of a SRL file opened with codewalker.
pub fn PREFETCH_SRL(srl: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4405742584854648876)), srl);
}
/// Returns true when the srl from BEGIN_SRL is loaded.
pub fn IS_SRL_LOADED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(14998737188714557627)));
}
pub fn BEGIN_SRL() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(11217864779081431075)));
}
/// Clear the current srl and stop rendering the area selected by PREFETCH_SRL and started with BEGIN_SRL.
pub fn END_SRL() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(738964234645925399)));
}
pub fn SET_SRL_TIME(p0: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12054539833599911864)), p0);
}
pub fn SET_SRL_POST_CUTSCENE_CAMERA(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(17238070873252424076)), p0, p1, p2, p3, p4, p5);
}
pub fn SET_SRL_READAHEAD_TIMES(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(13741284702225495386)), p0, p1, p2, p3);
}
pub fn SET_SRL_LONG_JUMP_MODE(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2361794840612055679)), p0);
}
pub fn SET_SRL_FORCE_PRESTREAM(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17876293797489278094)), p0);
}
pub fn SET_HD_AREA(x: f32, y: f32, z: f32, radius: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(13285379626243450741)), x, y, z, radius);
}
pub fn CLEAR_HD_AREA() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(14868829675486513171)));
}
/// Used to be known as _LOAD_MISSION_CREATOR_DATA
pub fn INIT_CREATOR_BUDGET() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(13088827437700724874)));
}
pub fn SHUTDOWN_CREATOR_BUDGET() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(14763468085510208215)));
}
pub fn ADD_MODEL_TO_CREATOR_BUDGET(modelHash: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(847543479770252902)), modelHash);
}
pub fn REMOVE_MODEL_FROM_CREATOR_BUDGET(modelHash: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17331731064279450531)), modelHash);
}
/// 0.0 = no memory used
/// 1.0 = all memory used
/// Maximum model memory (as defined in common\data\missioncreatordata.meta) is 100 MiB
/// Used to be known as _GET_USED_CREATOR_MODEL_MEMORY_PERCENTAGE
pub fn GET_USED_CREATOR_BUDGET() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(4412836299265293621)));
}
/// Enables the specified island. For more information, see islandhopper.meta
/// Used to be known as _SET_ISLAND_HOPPER_ENABLED
pub fn SET_ISLAND_ENABLED(name: [*c]const u8, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11141091453926071537)), name, toggle);
}
};
pub const TASK = struct {
/// Stand still (?)
pub fn TASK_PAUSE(ped: types.Ped, ms: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16661672023969927234)), ped, ms);
}
/// Makes the specified ped stand still for (time) milliseconds.
pub fn TASK_STAND_STILL(ped: types.Ped, time: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10492227417279764825)), ped, time);
}
/// Definition is wrong. This has 4 parameters (Not sure when they were added. v350 has 2, v678 has 4).
/// v350: Ped ped, bool unused
/// v678: Ped ped, bool unused, bool flag1, bool flag2
/// flag1 = super jump, flag2 = do nothing if flag1 is false and doubles super jump height if flag1 is true.
pub fn TASK_JUMP(ped: types.Ped, usePlayerLaunchForce: windows.BOOL, doSuperJump: windows.BOOL, useFullSuperJumpForce: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(784761447855974321)), ped, usePlayerLaunchForce, doSuperJump, useFullSuperJumpForce);
}
pub fn TASK_COWER(ped: types.Ped, duration: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4517671858179444245)), ped, duration);
}
/// In the scripts, p3 was always -1.
/// p3 seems to be duration or timeout of turn animation.
/// Also facingPed can be 0 or -1 so ped will just raise hands up.
pub fn TASK_HANDS_UP(ped: types.Ped, duration: c_int, facingPed: types.Ped, timeToFacePed: c_int, flags: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(17503999823725459728)), ped, duration, facingPed, timeToFacePed, flags);
}
pub fn UPDATE_TASK_HANDS_UP_DURATION(ped: types.Ped, duration: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12218207504077932596)), ped, duration);
}
/// The given ped will try to open the nearest door to 'seat'.
/// Example: telling the ped to open the door for the driver seat does not necessarily mean it will open the driver door, it may choose to open the passenger door instead if that one is closer.
pub fn TASK_OPEN_VEHICLE_DOOR(ped: types.Ped, vehicle: types.Vehicle, timeOut: c_int, seat: c_int, speed: f32) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(10833287586458935394)), ped, vehicle, timeOut, seat, speed);
}
/// speed 1.0 = walk, 2.0 = run
/// p5 1 = normal, 3 = teleport to vehicle, 16 = teleport directly into vehicle
/// p6 is always 0
/// Usage of seat
/// -1 = driver
/// 0 = passenger
/// 1 = left back seat
/// 2 = right back seat
/// 3 = outside left
/// 4 = outside right
pub fn TASK_ENTER_VEHICLE(ped: types.Ped, vehicle: types.Vehicle, timeout: c_int, seat: c_int, speed: f32, flag: c_int, overrideEntryClipsetName: [*c]const u8, p7: types.Any) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(13983202585294707880)), ped, vehicle, timeout, seat, speed, flag, overrideEntryClipsetName, p7);
}
/// Flags from decompiled scripts:
/// 0 = normal exit and closes door.
/// 1 = normal exit and closes door.
/// 16 = teleports outside, door kept closed.
/// 64 = normal exit and closes door, maybe a bit slower animation than 0.
/// 256 = normal exit but does not close the door.
/// 4160 = ped is throwing himself out, even when the vehicle is still.
/// 262144 = ped moves to passenger seat first, then exits normally
/// Others to be tried out: 320, 512, 131072.
pub fn TASK_LEAVE_VEHICLE(ped: types.Ped, vehicle: types.Vehicle, flags: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(15266022280670526978)), ped, vehicle, flags);
}
/// Used to be known as _TASK_GET_OFF_BOAT
pub fn TASK_GET_OFF_BOAT(ped: types.Ped, boat: types.Vehicle) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11241239185137020415)), ped, boat);
}
pub fn TASK_SKY_DIVE(ped: types.Ped, instant: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6924063218637123744)), ped, instant);
}
/// Second parameter is unused.
/// second parameter was for jetpack in the early stages of gta and the hard coded code is now removed
pub fn TASK_PARACHUTE(ped: types.Ped, giveParachuteItem: windows.BOOL, instant: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(15200147081389834667)), ped, giveParachuteItem, instant);
}
/// makes ped parachute to coords x y z. Works well with PATHFIND::GET_SAFE_COORD_FOR_PED
pub fn TASK_PARACHUTE_TO_TARGET(ped: types.Ped, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(12915805977192419386)), ped, x, y, z);
}
pub fn SET_PARACHUTE_TASK_TARGET(ped: types.Ped, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(14056640000561048999)), ped, x, y, z);
}
pub fn SET_PARACHUTE_TASK_THRUST(ped: types.Ped, thrust: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(516148973502087959)), ped, thrust);
}
/// minHeightAboveGround: the minimum height above ground the heli must be at before the ped can start rappelling
/// Only appears twice in the scripts.
/// TASK::TASK_RAPPEL_FROM_HELI(PLAYER::PLAYER_PED_ID(), 10.0f);
/// TASK::TASK_RAPPEL_FROM_HELI(a_0, 10.0f);
pub fn TASK_RAPPEL_FROM_HELI(ped: types.Ped, minHeightAboveGround: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(678138103285225033)), ped, minHeightAboveGround);
}
/// info about driving modes: https://gtaforums.com/topic/822314-guide-driving-styles/
pub fn TASK_VEHICLE_DRIVE_TO_COORD(ped: types.Ped, vehicle: types.Vehicle, x: f32, y: f32, z: f32, speed: f32, p6: types.Any, vehicleModel: types.Hash, drivingMode: c_int, stopRange: f32, straightLineDistance: f32) void {
_ = nativeCaller.invoke11(@as(u64, @intCast(16330802319343843239)), ped, vehicle, x, y, z, speed, p6, vehicleModel, drivingMode, stopRange, straightLineDistance);
}
pub fn TASK_VEHICLE_DRIVE_TO_COORD_LONGRANGE(ped: types.Ped, vehicle: types.Vehicle, x: f32, y: f32, z: f32, speed: f32, driveMode: c_int, stopRange: f32) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(1552531582173918732)), ped, vehicle, x, y, z, speed, driveMode, stopRange);
}
pub fn TASK_VEHICLE_DRIVE_WANDER(ped: types.Ped, vehicle: types.Vehicle, speed: f32, drivingStyle: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(5188501456062479616)), ped, vehicle, speed, drivingStyle);
}
/// p6 always -1
/// p7 always 10.0
/// p8 always 1
pub fn TASK_FOLLOW_TO_OFFSET_OF_ENTITY(ped: types.Ped, entity: types.Entity, offsetX: f32, offsetY: f32, offsetZ: f32, movementSpeed: f32, timeout: c_int, stoppingRange: f32, persistFollowing: windows.BOOL) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(3479844549214047358)), ped, entity, offsetX, offsetY, offsetZ, movementSpeed, timeout, stoppingRange, persistFollowing);
}
pub fn TASK_GO_STRAIGHT_TO_COORD(ped: types.Ped, x: f32, y: f32, z: f32, speed: f32, timeout: c_int, targetHeading: f32, distanceToSlide: f32) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(15522596972595670923)), ped, x, y, z, speed, timeout, targetHeading, distanceToSlide);
}
pub fn TASK_GO_STRAIGHT_TO_COORD_RELATIVE_TO_ENTITY(ped: types.Ped, entity: types.Entity, x: f32, y: f32, z: f32, moveBlendRatio: f32, time: c_int) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(7053587784249954606)), ped, entity, x, y, z, moveBlendRatio, time);
}
/// Makes the specified ped achieve the specified heading.
/// pedHandle: The handle of the ped to assign the task to.
/// heading: The desired heading.
/// timeout: The time, in milliseconds, to allow the task to complete. If the task times out, it is cancelled, and the ped will stay at the heading it managed to reach in the time.
pub fn TASK_ACHIEVE_HEADING(ped: types.Ped, heading: f32, timeout: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(10644603204722958141)), ped, heading, timeout);
}
/// MulleKD19: Clears the current point route. Call this before TASK_EXTEND_ROUTE and TASK_FOLLOW_POINT_ROUTE.
pub fn TASK_FLUSH_ROUTE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(9516460747797729286)));
}
/// MulleKD19: Adds a new point to the current point route. Call TASK_FLUSH_ROUTE before the first call to this. Call TASK_FOLLOW_POINT_ROUTE to make the Ped go the route.
/// A maximum of 8 points can be added.
pub fn TASK_EXTEND_ROUTE(x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2195655964724855866)), x, y, z);
}
/// MulleKD19: Makes the ped go on the created point route.
/// ped: The ped to give the task to.
/// speed: The speed to move at in m/s.
/// int: Unknown. Can be 0, 1, 2 or 3.
/// Example:
/// TASK_FLUSH_ROUTE();
/// TASK_EXTEND_ROUTE(0f, 0f, 70f);
/// TASK_EXTEND_ROUTE(10f, 0f, 70f);
/// TASK_EXTEND_ROUTE(10f, 10f, 70f);
/// TASK_FOLLOW_POINT_ROUTE(GET_PLAYER_PED(), 1f, 0);
pub fn TASK_FOLLOW_POINT_ROUTE(ped: types.Ped, speed: f32, mode: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(6437195450626368110)), ped, speed, mode);
}
/// The entity will move towards the target until time is over (duration) or get in target's range (distance). p5 and p6 are unknown, but you could leave p5 = 1073741824 or 100 or even 0 (didn't see any difference but on the decompiled scripts, they use 1073741824 mostly) and p6 = 0
/// Note: I've only tested it on entity -> ped and target -> vehicle. It could work differently on other entities, didn't try it yet.
/// Example: TASK::TASK_GO_TO_ENTITY(pedHandle, vehicleHandle, 5000, 4.0, 100, 1073741824, 0)
/// Ped will run towards the vehicle for 5 seconds and stop when time is over or when he gets 4 meters(?) around the vehicle (with duration = -1, the task duration will be ignored).
/// enum EGOTO_ENTITY_SCRIPT_FLAGS
/// {
/// EGOTO_ENTITY_NEVER_SLOW_FOR_PATH_LENGTH = 0x01,
/// };
pub fn TASK_GO_TO_ENTITY(entity: types.Entity, target: types.Entity, duration: c_int, distance: f32, moveBlendRatio: f32, slowDownDistance: f32, flags: c_int) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(7640095384362883202)), entity, target, duration, distance, moveBlendRatio, slowDownDistance, flags);
}
/// Makes the specified ped flee the specified distance from the specified position.
pub fn TASK_SMART_FLEE_COORD(ped: types.Ped, x: f32, y: f32, z: f32, distance: f32, time: c_int, preferPavements: windows.BOOL, quitIfOutOfRange: windows.BOOL) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(10689433456246744533)), ped, x, y, z, distance, time, preferPavements, quitIfOutOfRange);
}
/// Makes a ped run away from another ped (fleeTarget).
/// distance = ped will flee this distance.
/// fleeTime = ped will flee for this amount of time, set to "-1" to flee forever
pub fn TASK_SMART_FLEE_PED(ped: types.Ped, fleeTarget: types.Ped, safeDistance: f32, fleeTime: c_int, preferPavements: windows.BOOL, updateToNearestHatedPed: windows.BOOL) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(2499727468660491277)), ped, fleeTarget, safeDistance, fleeTime, preferPavements, updateToNearestHatedPed);
}
pub fn TASK_REACT_AND_FLEE_PED(ped: types.Ped, fleeTarget: types.Ped) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8271025944283959729)), ped, fleeTarget);
}
pub fn TASK_SHOCKING_EVENT_REACT(ped: types.Ped, eventHandle: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4982135451075216987)), ped, eventHandle);
}
pub fn TASK_WANDER_IN_AREA(ped: types.Ped, x: f32, y: f32, z: f32, radius: f32, minimalLength: f32, timeBetweenWalks: f32) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(16164602603745899285)), ped, x, y, z, radius, minimalLength, timeBetweenWalks);
}
/// Makes ped walk around the area.
/// set p1 to 10.0f and p2 to 10 if you want the ped to walk anywhere without a duration.
pub fn TASK_WANDER_STANDARD(ped: types.Ped, heading: f32, flags: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(13518926983824632347)), ped, heading, flags);
}
pub fn TASK_WANDER_SPECIFIC(ped: types.Ped, conditionalAnimGroupStr: [*c]const u8, conditionalAnimStr: [*c]const u8, heading: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(7573263405281337496)), ped, conditionalAnimGroupStr, conditionalAnimStr, heading);
}
/// Modes:
/// 0 - ignore heading
/// 1 - park forward
/// 2 - park backwards
/// Depending on the angle of approach, the vehicle can park at the specified heading or at its exact opposite (-180) angle.
/// Radius seems to define how close the vehicle has to be -after parking- to the position for this task considered completed. If the value is too small, the vehicle will try to park again until it's exactly where it should be. 20.0 Works well but lower values don't, like the radius is measured in centimeters or something.
pub fn TASK_VEHICLE_PARK(ped: types.Ped, vehicle: types.Vehicle, x: f32, y: f32, z: f32, heading: f32, mode: c_int, radius: f32, keepEngineOn: windows.BOOL) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(1098373536217184078)), ped, vehicle, x, y, z, heading, mode, radius, keepEngineOn);
}
/// known "killTypes" are: "AR_stealth_kill_knife" and "AR_stealth_kill_a".
pub fn TASK_STEALTH_KILL(killer: types.Ped, target: types.Ped, stealthKillActionResultHash: types.Hash, desiredMoveBlendRatio: f32, stealthFlags: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(12276179632630664153)), killer, target, stealthKillActionResultHash, desiredMoveBlendRatio, stealthFlags);
}
pub fn TASK_PLANT_BOMB(ped: types.Ped, x: f32, y: f32, z: f32, heading: f32) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(10835639164684593599)), ped, x, y, z, heading);
}
/// If no timeout, set timeout to -1.
pub fn TASK_FOLLOW_NAV_MESH_TO_COORD(ped: types.Ped, x: f32, y: f32, z: f32, moveBlendRatio: f32, time: c_int, targetRadius: f32, flags: c_int, targetHeading: f32) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(1572784988947265811)), ped, x, y, z, moveBlendRatio, time, targetRadius, flags, targetHeading);
}
pub fn TASK_FOLLOW_NAV_MESH_TO_COORD_ADVANCED(ped: types.Ped, x: f32, y: f32, z: f32, moveBlendRatio: f32, time: c_int, targetRadius: f32, flags: c_int, slideToCoordHeading: f32, maxSlopeNavigable: f32, clampMaxSearchDistance: f32, targetHeading: f32) void {
_ = nativeCaller.invoke12(@as(u64, @intCast(1726439451896699820)), ped, x, y, z, moveBlendRatio, time, targetRadius, flags, slideToCoordHeading, maxSlopeNavigable, clampMaxSearchDistance, targetHeading);
}
pub fn SET_PED_PATH_CAN_USE_CLIMBOVERS(ped: types.Ped, Toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10234050815090880500)), ped, Toggle);
}
pub fn SET_PED_PATH_CAN_USE_LADDERS(ped: types.Ped, Toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8621491691477485422)), ped, Toggle);
}
pub fn SET_PED_PATH_CAN_DROP_FROM_HEIGHT(ped: types.Ped, Toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16384594378313898575)), ped, Toggle);
}
/// Default modifier is 1.0, minimum is 0.0 and maximum is 10.0.
pub fn SET_PED_PATH_CLIMB_COST_MODIFIER(ped: types.Ped, modifier: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9863777880417544779)), ped, modifier);
}
/// Used to be known as SET_PED_PATHS_WIDTH_PLANT
pub fn SET_PED_PATH_MAY_ENTER_WATER(ped: types.Ped, mayEnterWater: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17533680636106336236)), ped, mayEnterWater);
}
pub fn SET_PED_PATH_PREFER_TO_AVOID_WATER(ped: types.Ped, avoidWater: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4106753751182965052)), ped, avoidWater);
}
pub fn SET_PED_PATH_AVOID_FIRE(ped: types.Ped, avoidFire: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4923931356997885536)), ped, avoidFire);
}
/// Needs to be looped! And yes, it does work and is not a hash collision.
/// Birds will try to reach the given height.
pub fn SET_GLOBAL_MIN_BIRD_FLIGHT_HEIGHT(height: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7812360542331942135)), height);
}
/// Looks like the last parameter returns true if the path has been calculated, while the first returns the remaining distance to the end of the path.
/// Return value of native is the same as GET_NAVMESH_ROUTE_RESULT
/// Looks like the native returns an int for the path's state:
/// 1 - ???
/// 2 - ???
/// 3 - Finished Generating
pub fn GET_NAVMESH_ROUTE_DISTANCE_REMAINING(ped: types.Ped, distanceRemaining: [*c]f32, isPathReady: [*c]windows.BOOL) c_int {
return nativeCaller.invoke3(@as(u64, @intCast(14336576906188871213)), ped, distanceRemaining, isPathReady);
}
/// See GET_NAVMESH_ROUTE_DISTANCE_REMAINING for more details.
pub fn GET_NAVMESH_ROUTE_RESULT(ped: types.Ped) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(7146793828793061288)), ped);
}
pub fn IS_CONTROLLED_VEHICLE_UNABLE_TO_GET_TO_ROAD(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4483582511875677686)), ped);
}
/// example from fm_mission_controller
/// TASK::TASK_GO_TO_COORD_ANY_MEANS(l_649, sub_f7e86(-1, 0), 1.0, 0, 0, 786603, 0xbf800000);
///
pub fn TASK_GO_TO_COORD_ANY_MEANS(ped: types.Ped, x: f32, y: f32, z: f32, moveBlendRatio: f32, vehicle: types.Vehicle, useLongRangeVehiclePathing: windows.BOOL, drivingFlags: c_int, maxRangeToShootTargets: f32) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(6612490191631957640)), ped, x, y, z, moveBlendRatio, vehicle, useLongRangeVehiclePathing, drivingFlags, maxRangeToShootTargets);
}
pub fn TASK_GO_TO_COORD_ANY_MEANS_EXTRA_PARAMS(ped: types.Ped, x: f32, y: f32, z: f32, moveBlendRatio: f32, vehicle: types.Vehicle, useLongRangeVehiclePathing: windows.BOOL, drivingFlags: c_int, maxRangeToShootTargets: f32, extraVehToTargetDistToPreferVehicle: f32, driveStraightLineDistance: f32, extraFlags: c_int, warpTimerMS: f32) void {
_ = nativeCaller.invoke13(@as(u64, @intCast(2149448057859283913)), ped, x, y, z, moveBlendRatio, vehicle, useLongRangeVehiclePathing, drivingFlags, maxRangeToShootTargets, extraVehToTargetDistToPreferVehicle, driveStraightLineDistance, extraFlags, warpTimerMS);
}
pub fn TASK_GO_TO_COORD_ANY_MEANS_EXTRA_PARAMS_WITH_CRUISE_SPEED(ped: types.Ped, x: f32, y: f32, z: f32, moveBlendRatio: f32, vehicle: types.Vehicle, useLongRangeVehiclePathing: windows.BOOL, drivingFlags: c_int, maxRangeToShootTargets: f32, extraVehToTargetDistToPreferVehicle: f32, driveStraightLineDistance: f32, extraFlags: c_int, cruiseSpeed: f32, targetArriveDist: f32) void {
_ = nativeCaller.invoke14(@as(u64, @intCast(13325260827509029634)), ped, x, y, z, moveBlendRatio, vehicle, useLongRangeVehiclePathing, drivingFlags, maxRangeToShootTargets, extraVehToTargetDistToPreferVehicle, driveStraightLineDistance, extraFlags, cruiseSpeed, targetArriveDist);
}
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
/// float speed > normal speed is 8.0f
/// ----------------------
/// float speedMultiplier > multiply the playback speed
/// ----------------------
/// int duration: time in millisecond
/// ----------------------
/// -1 _ _ _ _ _ _ _> Default (see flag)
/// 0 _ _ _ _ _ _ _ > Not play at all
/// Small value _ _ > Slow down animation speed
/// Other _ _ _ _ _ > freeze player control until specific time (ms) has
/// _ _ _ _ _ _ _ _ _ passed. (No effect if flag is set to be
/// _ _ _ _ _ _ _ _ _ controllable.)
/// int flag:
/// ----------------------
/// enum eAnimationFlags
/// {
/// ANIM_FLAG_NORMAL = 0,
/// ANIM_FLAG_REPEAT = 1,
/// ANIM_FLAG_STOP_LAST_FRAME = 2,
/// ANIM_FLAG_UPPERBODY = 16,
/// ANIM_FLAG_ENABLE_PLAYER_CONTROL = 32,
/// ANIM_FLAG_CANCELABLE = 120,
/// };
/// Odd number : loop infinitely
/// Even number : Freeze at last frame
/// Multiple of 4: Freeze at last frame but controllable
/// 01 to 15 > Full body
/// 10 to 31 > Upper body
/// 32 to 47 > Full body > Controllable
/// 48 to 63 > Upper body > Controllable
/// ...
/// 001 to 255 > Normal
/// 256 to 511 > Garbled
/// ...
/// playbackRate:
/// values are between 0.0 and 1.0
/// lockX:
/// 0 in most cases 1 for rcmepsilonism8 and rcmpaparazzo_3
/// > 1 for mini@sprunk
///
/// lockY:
/// 0 in most cases
/// 1 for missfam5_yoga, missfra1mcs_2_crew_react
/// lockZ:
/// 0 for single player
/// Can be 1 but only for MP
pub fn TASK_PLAY_ANIM(ped: types.Ped, animDictionary: [*c]const u8, animationName: [*c]const u8, blendInSpeed: f32, blendOutSpeed: f32, duration: c_int, flag: c_int, playbackRate: f32, lockX: windows.BOOL, lockY: windows.BOOL, lockZ: windows.BOOL) void {
_ = nativeCaller.invoke11(@as(u64, @intCast(16881741240819145620)), ped, animDictionary, animationName, blendInSpeed, blendOutSpeed, duration, flag, playbackRate, lockX, lockY, lockZ);
}
/// It's similar to TASK_PLAY_ANIM, except the first 6 floats let you specify the initial position and rotation of the task. (Ped gets teleported to the position).
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
pub fn TASK_PLAY_ANIM_ADVANCED(ped: types.Ped, animDict: [*c]const u8, animName: [*c]const u8, posX: f32, posY: f32, posZ: f32, rotX: f32, rotY: f32, rotZ: f32, animEnterSpeed: f32, animExitSpeed: f32, duration: c_int, flag: types.Any, animTime: f32, rotOrder: c_int, ikFlags: c_int) void {
_ = nativeCaller.invoke16(@as(u64, @intCast(9497441865609983755)), ped, animDict, animName, posX, posY, posZ, rotX, rotY, rotZ, animEnterSpeed, animExitSpeed, duration, flag, animTime, rotOrder, ikFlags);
}
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
pub fn STOP_ANIM_TASK(entity: types.Entity, animDictionary: [*c]const u8, animationName: [*c]const u8, blendDelta: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(10952532887463698442)), entity, animDictionary, animationName, blendDelta);
}
/// From fm_mission_controller.c:
/// reserve_network_mission_objects(get_num_reserved_mission_objects(0) + 1);
/// vVar28 = {0.094f, 0.02f, -0.005f};
/// vVar29 = {-92.24f, 63.64f, 150.24f};
/// func_253(&uVar30, joaat("prop_ld_case_01"), Global_1592429.imm_34757[iParam1 <268>], 1, 1, 0, 1);
/// set_entity_lod_dist(net_to_ent(uVar30), 500);
/// attach_entity_to_entity(net_to_ent(uVar30), iParam0, get_ped_bone_index(iParam0, 28422), vVar28, vVar29, 1, 0, 0, 0, 2, 1);
/// Var31.imm_4 = 1065353216;
/// Var31.imm_5 = 1065353216;
/// Var31.imm_9 = 1065353216;
/// Var31.imm_10 = 1065353216;
/// Var31.imm_14 = 1065353216;
/// Var31.imm_15 = 1065353216;
/// Var31.imm_17 = 1040187392;
/// Var31.imm_18 = 1040187392;
/// Var31.imm_19 = -1;
/// Var32.imm_4 = 1065353216;
/// Var32.imm_5 = 1065353216;
/// Var32.imm_9 = 1065353216;
/// Var32.imm_10 = 1065353216;
/// Var32.imm_14 = 1065353216;
/// Var32.imm_15 = 1065353216;
/// Var32.imm_17 = 1040187392;
/// Var32.imm_18 = 1040187392;
/// Var32.imm_19 = -1;
/// Var31 = 1;
/// Var31.imm_1 = "weapons@misc@jerrycan@mp_male";
/// Var31.imm_2 = "idle";
/// Var31.imm_20 = 1048633;
/// Var31.imm_4 = 0.5f;
/// Var31.imm_16 = get_hash_key("BONEMASK_ARMONLY_R");
/// task_scripted_animation(iParam0, &Var31, &Var32, &Var32, 0f, 0.25f);
/// set_model_as_no_longer_needed(joaat("prop_ld_case_01"));
/// remove_anim_dict("anim@heists@biolab@");
pub fn TASK_SCRIPTED_ANIMATION(ped: types.Ped, priorityLowData: [*c]c_int, priorityMidData: [*c]c_int, priorityHighData: [*c]c_int, blendInDelta: f32, blendOutDelta: f32) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(1328270928019696613)), ped, priorityLowData, priorityMidData, priorityHighData, blendInDelta, blendOutDelta);
}
pub fn PLAY_ENTITY_SCRIPTED_ANIM(entity: types.Entity, priorityLowData: [*c]c_int, priorityMidData: [*c]c_int, priorityHighData: [*c]c_int, blendInDelta: f32, blendOutDelta: f32) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(8620433692846193905)), entity, priorityLowData, priorityMidData, priorityHighData, blendInDelta, blendOutDelta);
}
/// Looks like p1 may be a flag, still need to do some research, though.
pub fn STOP_ANIM_PLAYBACK(entity: types.Entity, priority: c_int, secondary: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(17152180813269878225)), entity, priority, secondary);
}
pub fn SET_ANIM_WEIGHT(entity: types.Entity, weight: f32, priority: c_int, index: c_int, secondary: windows.BOOL) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(2341619226725592904)), entity, weight, priority, index, secondary);
}
/// Used to be known as _SET_ANIM_PLAYBACK_TIME
pub fn SET_ANIM_PHASE(entity: types.Entity, phase: f32, priority: c_int, secondary: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(15993350289303014217)), entity, phase, priority, secondary);
}
pub fn SET_ANIM_RATE(entity: types.Entity, rate: f32, priority: c_int, secondary: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(228920270337460295)), entity, rate, priority, secondary);
}
pub fn SET_ANIM_LOOPED(entity: types.Entity, looped: windows.BOOL, priority: c_int, secondary: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(8071361188838645748)), entity, looped, priority, secondary);
}
/// Example from the scripts:
/// TASK::TASK_PLAY_PHONE_GESTURE_ANIMATION(PLAYER::PLAYER_PED_ID(), v_3, v_2, v_4, 0.25, 0.25, 0, 0);
/// =========================================================
/// ^^ No offense, but Idk how that would really help anyone.
/// As for the animDict & animation, they're both store in a global in all 5 scripts. So if anyone would be so kind as to read that global and comment what strings they use. Thanks.
/// Known boneMaskTypes'
/// "BONEMASK_HEADONLY"
/// "BONEMASK_HEAD_NECK_AND_ARMS"
/// "BONEMASK_HEAD_NECK_AND_L_ARM"
/// "BONEMASK_HEAD_NECK_AND_R_ARM"
/// p4 known args - 0.0f, 0.5f, 0.25f
/// p5 known args - 0.0f, 0.25f
/// p6 known args - 1 if a global if check is passed.
/// p7 known args - 1 if a global if check is passed.
/// The values found above, I found within the 5 scripts this is ever called in. (fmmc_launcher, fm_deathmatch_controller, fm_impromptu_dm_controller, fm_mission_controller, and freemode).
/// =========================================================
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
pub fn TASK_PLAY_PHONE_GESTURE_ANIMATION(ped: types.Ped, animDict: [*c]const u8, animation: [*c]const u8, boneMaskType: [*c]const u8, blendInDuration: f32, blendOutDuration: f32, isLooping: windows.BOOL, holdLastFrame: windows.BOOL) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(10356985398738282988)), ped, animDict, animation, boneMaskType, blendInDuration, blendOutDuration, isLooping, holdLastFrame);
}
/// Used to be known as _TASK_STOP_PHONE_GESTURE_ANIMATION
pub fn TASK_STOP_PHONE_GESTURE_ANIMATION(ped: types.Ped, blendOutOverride: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4584679054795456430)), ped, blendOutOverride);
}
pub fn IS_PLAYING_PHONE_GESTURE_ANIM(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13324939540337036304)), ped);
}
pub fn GET_PHONE_GESTURE_ANIM_CURRENT_TIME(ped: types.Ped) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(5143562392602840160)), ped);
}
pub fn GET_PHONE_GESTURE_ANIM_TOTAL_TIME(ped: types.Ped) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(2225049290569801414)), ped);
}
/// Most probably plays a specific animation on vehicle. For example getting chop out of van etc...
/// Here's how its used -
/// TASK::TASK_VEHICLE_PLAY_ANIM(l_325, "rcmnigel1b", "idle_speedo");
/// TASK::TASK_VEHICLE_PLAY_ANIM(l_556[0/*1*/], "missfra0_chop_drhome", "InCar_GetOutofBack_Speedo");
/// FYI : Speedo is the name of van in which chop was put in the mission.
pub fn TASK_VEHICLE_PLAY_ANIM(vehicle: types.Vehicle, animationSet: [*c]const u8, animationName: [*c]const u8) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(7635223960048549257)), vehicle, animationSet, animationName);
}
/// enum eScriptLookatFlags
/// {
/// SLF_SLOW_TURN_RATE = 1, // turn the head toward the target slowly
/// SLF_FAST_TURN_RATE = 2, // turn the head toward the target quickly
/// SLF_EXTEND_YAW_LIMIT = 4, // wide yaw head limits
/// SLF_EXTEND_PITCH_LIMIT = 8, // wide pitch head limit
/// SLF_WIDEST_YAW_LIMIT = 16, // widest yaw head limit
/// SLF_WIDEST_PITCH_LIMIT = 32, // widest pitch head limit
/// SLF_NARROW_YAW_LIMIT = 64, // narrow yaw head limits
/// SLF_NARROW_PITCH_LIMIT = 128, // narrow pitch head limit
/// SLF_NARROWEST_YAW_LIMIT = 256, // narrowest yaw head limit
/// SLF_NARROWEST_PITCH_LIMIT = 512, // narrowest pitch head limit
/// SLF_USE_TORSO = 1024, // use the torso aswell as the neck and head (currently disabled)
/// SLF_WHILE_NOT_IN_FOV = 2048, // keep tracking the target even if they are not in the hard coded FOV
/// SLF_USE_CAMERA_FOCUS = 4096, // use the camera as the target
/// SLF_USE_EYES_ONLY = 8192, // only track the target with the eyes
/// SLF_USE_LOOK_DIR = 16384, // use information in look dir DOF
/// SLF_FROM_SCRIPT = 32768, // internal use only
/// SLF_USE_REF_DIR_ABSOLUTE = 65536 // use absolute reference direction mode for solver
/// };
pub fn TASK_LOOK_AT_COORD(entity: types.Entity, x: f32, y: f32, z: f32, duration: c_int, flags: c_int, priority: c_int) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(8044667063384373619)), entity, x, y, z, duration, flags, priority);
}
/// For flags, please refer to TASK_LOOK_AT_COORD.
pub fn TASK_LOOK_AT_ENTITY(ped: types.Ped, lookAt: types.Entity, duration: c_int, flags: c_int, priority: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(7634936779166218604)), ped, lookAt, duration, flags, priority);
}
pub fn TASK_CLEAR_LOOK_AT(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1116979696540292745)), ped);
}
pub fn OPEN_SEQUENCE_TASK(taskSequenceId: [*c]c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16754879640974778667)), taskSequenceId);
}
pub fn CLOSE_SEQUENCE_TASK(taskSequenceId: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4172351724727787723)), taskSequenceId);
}
pub fn TASK_PERFORM_SEQUENCE(ped: types.Ped, taskSequenceId: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6537601060411640379)), ped, taskSequenceId);
}
pub fn TASK_PERFORM_SEQUENCE_LOCALLY(ped: types.Ped, taskSequenceId: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10102455826430609933)), ped, taskSequenceId);
}
pub fn CLEAR_SEQUENCE_TASK(taskSequenceId: [*c]c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4053593907568086412)), taskSequenceId);
}
pub fn SET_SEQUENCE_TO_REPEAT(taskSequenceId: c_int, repeat: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6397096036273113831)), taskSequenceId, repeat);
}
/// returned values:
/// 0 to 7 = task that's currently in progress, 0 meaning the first one.
/// -1 no task sequence in progress.
pub fn GET_SEQUENCE_PROGRESS(ped: types.Ped) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(47570426378728755)), ped);
}
/// Task index enum: https://alloc8or.re/gta5/doc/enums/eTaskTypeIndex.txt
pub fn GET_IS_TASK_ACTIVE(ped: types.Ped, taskIndex: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(12715354110265278805)), ped, taskIndex);
}
/// Gets the status of a script-assigned task.
/// taskHash: https://alloc8or.re/gta5/doc/enums/eScriptTaskHash.txt
pub fn GET_SCRIPT_TASK_STATUS(ped: types.Ped, taskHash: types.Hash) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(8642898859635411157)), ped, taskHash);
}
/// https://alloc8or.re/gta5/doc/enums/eVehicleMissionType.txt
pub fn GET_ACTIVE_VEHICLE_MISSION_TYPE(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(6001868555479239851)), vehicle);
}
/// Flags are the same flags used in TASK_LEAVE_VEHICLE
pub fn TASK_LEAVE_ANY_VEHICLE(ped: types.Ped, delayTime: c_int, flags: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(5786374414059643463)), ped, delayTime, flags);
}
pub fn TASK_AIM_GUN_SCRIPTED(ped: types.Ped, scriptTask: types.Hash, disableBlockingClip: windows.BOOL, instantBlendToAim: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(8798111594244947200)), ped, scriptTask, disableBlockingClip, instantBlendToAim);
}
pub fn TASK_AIM_GUN_SCRIPTED_WITH_TARGET(ped: types.Ped, target: types.Ped, x: f32, y: f32, z: f32, gunTaskType: c_int, disableBlockingClip: windows.BOOL, forceAim: windows.BOOL) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(9657317450239419820)), ped, target, x, y, z, gunTaskType, disableBlockingClip, forceAim);
}
pub fn UPDATE_TASK_AIM_GUN_SCRIPTED_TARGET(ped: types.Ped, target: types.Ped, x: f32, y: f32, z: f32, disableBlockingClip: windows.BOOL) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(10891106161309199056)), ped, target, x, y, z, disableBlockingClip);
}
pub fn GET_CLIP_SET_FOR_SCRIPTED_GUN_TASK(gunTaskType: c_int) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(4218938024697441477)), gunTaskType);
}
/// duration: the amount of time in milliseconds to do the task. -1 will keep the task going until either another task is applied, or CLEAR_ALL_TASKS() is called with the ped
pub fn TASK_AIM_GUN_AT_ENTITY(ped: types.Ped, entity: types.Entity, duration: c_int, instantBlendToAim: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(11192495582369525587)), ped, entity, duration, instantBlendToAim);
}
/// duration: the amount of time in milliseconds to do the task. -1 will keep the task going until either another task is applied, or CLEAR_ALL_TASKS() is called with the ped
pub fn TASK_TURN_PED_TO_FACE_ENTITY(ped: types.Ped, entity: types.Entity, duration: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(6544360553900626860)), ped, entity, duration);
}
pub fn TASK_AIM_GUN_AT_COORD(ped: types.Ped, x: f32, y: f32, z: f32, time: c_int, instantBlendToAim: windows.BOOL, playAnimIntro: windows.BOOL) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(7381949471095111073)), ped, x, y, z, time, instantBlendToAim, playAnimIntro);
}
/// Firing Pattern Hash Information: https://pastebin.com/Px036isB
pub fn TASK_SHOOT_AT_COORD(ped: types.Ped, x: f32, y: f32, z: f32, duration: c_int, firingPattern: types.Hash) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(5090980737222598918)), ped, x, y, z, duration, firingPattern);
}
/// Makes the specified ped shuffle to the next vehicle seat.
/// The ped MUST be in a vehicle and the vehicle parameter MUST be the ped's current vehicle.
pub fn TASK_SHUFFLE_TO_NEXT_VEHICLE_SEAT(ped: types.Ped, vehicle: types.Vehicle, useAlternateShuffle: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(8838316509574349803)), ped, vehicle, useAlternateShuffle);
}
pub fn CLEAR_PED_TASKS(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16280297226355339981)), ped);
}
pub fn CLEAR_PED_SECONDARY_TASK(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1687984505842882311)), ped);
}
pub fn TASK_EVERYONE_LEAVE_VEHICLE(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9192806827815412338)), vehicle);
}
/// enum ESEEK_ENTITY_OFFSET_FLAGS
/// {
/// ESEEK_OFFSET_ORIENTATES_WITH_ENTITY = 0x01,
/// ESEEK_KEEP_TO_PAVEMENTS = 0x02
/// };
pub fn TASK_GOTO_ENTITY_OFFSET(ped: types.Ped, entity: types.Entity, time: c_int, seekRadius: f32, seekAngleDeg: f32, moveBlendRatio: f32, gotoEntityOffsetFlags: c_int) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(16400790381650501159)), ped, entity, time, seekRadius, seekAngleDeg, moveBlendRatio, gotoEntityOffsetFlags);
}
pub fn TASK_GOTO_ENTITY_OFFSET_XY(ped: types.Ped, entity: types.Entity, duration: c_int, targetRadius: f32, offsetX: f32, offsetY: f32, moveBlendRatio: f32, gotoEntityOffsetFlags: c_int) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(3715046334087075241)), ped, entity, duration, targetRadius, offsetX, offsetY, moveBlendRatio, gotoEntityOffsetFlags);
}
/// duration in milliseconds
pub fn TASK_TURN_PED_TO_FACE_COORD(ped: types.Ped, x: f32, y: f32, z: f32, duration: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(2151193443362375025)), ped, x, y, z, duration);
}
/// '1 - brake
/// '3 - brake + reverse
/// '4 - turn left 90 + braking
/// '5 - turn right 90 + braking
/// '6 - brake strong (handbrake?) until time ends
/// '7 - turn left + accelerate
/// '8 - turn right + accelerate
/// '9 - weak acceleration
/// '10 - turn left + restore wheel pos to center in the end
/// '11 - turn right + restore wheel pos to center in the end
/// '13 - turn left + go reverse
/// '14 - turn left + go reverse
/// '16 - crash the game after like 2 seconds :)
/// '17 - keep actual state, game crashed after few tries
/// '18 - game crash
/// '19 - strong brake + turn left/right
/// '20 - weak brake + turn left then turn right
/// '21 - weak brake + turn right then turn left
/// '22 - brake + reverse
/// '23 - accelerate fast
/// '24 - brake
/// '25 - brake turning left then when almost stopping it turns left more
/// '26 - brake turning right then when almost stopping it turns right more
/// '27 - brake until car stop or until time ends
/// '28 - brake + strong reverse acceleration
/// '30 - performs a burnout (brake until stop + brake and accelerate)
/// '31 - accelerate + handbrake
/// '32 - accelerate very strong
/// Seems to be this:
/// Works on NPCs, but overrides their current task. If inside a task sequence (and not being the last task), "time" will work, otherwise the task will be performed forever until tasked with something else
pub fn TASK_VEHICLE_TEMP_ACTION(driver: types.Ped, vehicle: types.Vehicle, action: c_int, time: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(14135071823246254377)), driver, vehicle, action, time);
}
/// missionType: https://alloc8or.re/gta5/doc/enums/eVehicleMissionType.txt
pub fn TASK_VEHICLE_MISSION(driver: types.Ped, vehicle: types.Vehicle, vehicleTarget: types.Vehicle, missionType: c_int, cruiseSpeed: f32, drivingStyle: c_int, targetReached: f32, straightLineDistance: f32, DriveAgainstTraffic: windows.BOOL) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(7319519141423398110)), driver, vehicle, vehicleTarget, missionType, cruiseSpeed, drivingStyle, targetReached, straightLineDistance, DriveAgainstTraffic);
}
/// See TASK_VEHICLE_MISSION
pub fn TASK_VEHICLE_MISSION_PED_TARGET(ped: types.Ped, vehicle: types.Vehicle, pedTarget: types.Ped, missionType: c_int, maxSpeed: f32, drivingStyle: c_int, minDistance: f32, straightLineDistance: f32, DriveAgainstTraffic: windows.BOOL) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(10688258585250325882)), ped, vehicle, pedTarget, missionType, maxSpeed, drivingStyle, minDistance, straightLineDistance, DriveAgainstTraffic);
}
/// See TASK_VEHICLE_MISSION
pub fn TASK_VEHICLE_MISSION_COORS_TARGET(ped: types.Ped, vehicle: types.Vehicle, x: f32, y: f32, z: f32, mission: c_int, cruiseSpeed: f32, drivingStyle: c_int, targetReached: f32, straightLineDistance: f32, DriveAgainstTraffic: windows.BOOL) void {
_ = nativeCaller.invoke11(@as(u64, @intCast(17343116606543362243)), ped, vehicle, x, y, z, mission, cruiseSpeed, drivingStyle, targetReached, straightLineDistance, DriveAgainstTraffic);
}
/// Makes a ped follow the targetVehicle with <minDistance> in between.
/// note: minDistance is ignored if drivingstyle is avoiding traffic, but Rushed is fine.
/// Mode: The mode defines the relative position to the targetVehicle. The ped will try to position its vehicle there.
/// -1 = behind
/// 0 = ahead
/// 1 = left
/// 2 = right
/// 3 = back left
/// 4 = back right
/// if the target is closer than noRoadsDistance, the driver will ignore pathing/roads and follow you directly.
/// Driving Styles guide: gtaforums.com/topic/822314-guide-driving-styles/
pub fn TASK_VEHICLE_ESCORT(ped: types.Ped, vehicle: types.Vehicle, targetVehicle: types.Vehicle, mode: c_int, speed: f32, drivingStyle: c_int, minDistance: f32, minHeightAboveTerrain: c_int, noRoadsDistance: f32) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(1127840232930026496)), ped, vehicle, targetVehicle, mode, speed, drivingStyle, minDistance, minHeightAboveTerrain, noRoadsDistance);
}
/// Makes a ped in a vehicle follow an entity (ped, vehicle, etc.)
/// drivingStyle: http://gtaforums.com/topic/822314-guide-driving-styles/
/// Used to be known as _TASK_VEHICLE_FOLLOW
pub fn TASK_VEHICLE_FOLLOW(driver: types.Ped, vehicle: types.Vehicle, targetEntity: types.Entity, speed: f32, drivingStyle: c_int, minDistance: c_int) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(18182257234651046838)), driver, vehicle, targetEntity, speed, drivingStyle, minDistance);
}
/// chases targetEnt fast and aggressively
/// --
/// Makes ped (needs to be in vehicle) chase targetEnt.
pub fn TASK_VEHICLE_CHASE(driver: types.Ped, targetEnt: types.Entity) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4325893135057269587)), driver, targetEnt);
}
/// pilot, vehicle and altitude are rather self-explanatory.
/// p4: is unused variable in the function.
/// entityToFollow: you can provide a Vehicle entity or a Ped entity, the heli will protect them.
/// 'targetSpeed': The pilot will dip the nose AS MUCH AS POSSIBLE so as to reach this value AS FAST AS POSSIBLE. As such, you'll want to modulate it as opposed to calling it via a hard-wired, constant #.
/// 'radius' isn't just "stop within radius of X of target" like with ground vehicles. In this case, the pilot will fly an entire circle around 'radius' and continue to do so.
/// NOT CONFIRMED: p7 appears to be a FlyingStyle enum. Still investigating it as of this writing, but playing around with values here appears to result in different -behavior- as opposed to offsetting coordinates, altitude, target speed, etc.
/// NOTE: If the pilot finds enemies, it will engage them until it kills them, but will return to protect the ped/vehicle given shortly thereafter.
pub fn TASK_VEHICLE_HELI_PROTECT(pilot: types.Ped, vehicle: types.Vehicle, entityToFollow: types.Entity, targetSpeed: f32, drivingFlags: c_int, radius: f32, altitude: c_int, heliFlags: c_int) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(2164475639359274268)), pilot, vehicle, entityToFollow, targetSpeed, drivingFlags, radius, altitude, heliFlags);
}
/// Flag 8: Medium-aggressive boxing tactic with a bit of PIT
/// Flag 1: Aggressive ramming of suspect
/// Flag 2: Ram attempts
/// Flag 32: Stay back from suspect, no tactical contact. Convoy-like.
/// Flag 16: Ramming, seems to be slightly less aggressive than 1-2.
pub fn SET_TASK_VEHICLE_CHASE_BEHAVIOR_FLAG(ped: types.Ped, flag: c_int, set: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(14728559327049495015)), ped, flag, set);
}
pub fn SET_TASK_VEHICLE_CHASE_IDEAL_PURSUIT_DISTANCE(ped: types.Ped, distance: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7177440587069411037)), ped, distance);
}
/// Ped pilot should be in a heli.
/// EntityToFollow can be a vehicle or Ped.
/// x,y,z appear to be how close to the EntityToFollow the heli should be. Scripts use 0.0, 0.0, 80.0. Then the heli tries to position itself 80 units above the EntityToFollow. If you reduce it to -5.0, it tries to go below (if the EntityToFollow is a heli or plane)
/// NOTE: If the pilot finds enemies, it will engage them, then remain there idle, not continuing to chase the Entity given.
pub fn TASK_HELI_CHASE(pilot: types.Ped, entityToFollow: types.Entity, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(12430974951581855136)), pilot, entityToFollow, x, y, z);
}
pub fn TASK_PLANE_CHASE(pilot: types.Ped, entityToFollow: types.Entity, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(3252591731777960485)), pilot, entityToFollow, x, y, z);
}
pub fn TASK_PLANE_LAND(pilot: types.Ped, plane: types.Vehicle, runwayStartX: f32, runwayStartY: f32, runwayStartZ: f32, runwayEndX: f32, runwayEndY: f32, runwayEndZ: f32) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(13770162815871300288)), pilot, plane, runwayStartX, runwayStartY, runwayStartZ, runwayEndX, runwayEndY, runwayEndZ);
}
pub fn CLEAR_DEFAULT_PRIMARY_TASK(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6989784323272688942)), ped);
}
/// This native is very useful when switching the player to a ped inside a vehicle that has a task assigned prior to the player switch.
/// It is necessary to clear the ped's tasks AND call this native with the vehicle the player is switching into in order to allow the player to control the vehicle after the player switches.
/// Used to be known as _CLEAR_VEHICLE_TASKS
pub fn CLEAR_PRIMARY_VEHICLE_TASK(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15833664685809484071)), vehicle);
}
pub fn CLEAR_VEHICLE_CRASH_TASK(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6043205471939857040)), vehicle);
}
pub fn TASK_PLANE_GOTO_PRECISE_VTOL(ped: types.Ped, vehicle: types.Vehicle, x: f32, y: f32, z: f32, flightHeight: c_int, minHeightAboveTerrain: c_int, useDesiredOrientation: windows.BOOL, desiredOrientation: f32, autopilot: windows.BOOL) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(17868555759024296027)), ped, vehicle, x, y, z, flightHeight, minHeightAboveTerrain, useDesiredOrientation, desiredOrientation, autopilot);
}
/// Used in am_vehicle_spawn.ysc and am_mp_submarine.ysc.
/// p0 is always 0, p5 is always 1
/// p1 is the vehicle handle of the submarine. Submarine must have a driver, but the ped handle is not passed to the native.
/// Speed can be set by calling SET_DRIVE_TASK_CRUISE_SPEED after
pub fn TASK_SUBMARINE_GOTO_AND_STOP(ped: types.Ped, submarine: types.Vehicle, x: f32, y: f32, z: f32, autopilot: windows.BOOL) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(13991347412351421604)), ped, submarine, x, y, z, autopilot);
}
/// Must have targetVehicle, targetPed, OR destination X/Y/Z set
/// Will follow targeted vehicle/ped, or fly to destination
/// Set whichever is not being used to 0
/// Mission mode type:
/// - 4, 7: Forces heli to snap to the heading if set, flies to destination or tracks specified entity (mode 4 only works for coordinates, 7 works for coordinates OR ped/vehicle)
/// - 6: Attacks the target ped/vehicle with mounted weapons. If radius is set, will maintain that distance from target.
/// - 8: Makes the heli flee from the ped/vehicle/coordinate
/// - 9: Circles around target ped/vehicle, snaps to angle if set. Behavior flag (last parameter) of 2048 switches from counter-clockwise to clockwise circling. Does not work with coordinate destination.
/// - 10, 11: Follows ped/vehicle target and imitates target heading. Only works with ped/vehicle target, not coord target
/// - 19: Heli lands at specified coordinate, ignores heading (lands facing whatever direction it is facing when the task is started)
/// - 20: Makes the heli land when near target ped. It won't resume chasing.
/// - 21: Emulates a helicopter crash
/// - 23: makes the heli circle erratically around ped
/// Heli will fly at maxSpeed (up to actual maximum speed defined by the model's handling config)
/// You can use SET_DRIVE_TASK_CRUISE_SPEED to modulate the speed based on distance to the target without having to re-invoke the task native. Setting to 8.0 when close to the destination results in a much smoother approach.
/// If minHeight and maxHeight are set, heli will fly between those specified elevations, relative to ground level and any obstructions/buildings below. You can specify -1 for either if you only want to specify one. Usually it is easiest to leave maxHeight at -1, and specify a reasonable minHeight to ensure clearance over any obstacles. Note this MUST be passed as an INT, not a FLOAT.
/// Radius affects how closely the heli will follow tracked ped/vehicle, and when circling (mission type 9) sets the radius (in meters) that it will circle the target from
/// Heading is -1.0 for default behavior, which will point the nose of the helicopter towards the destination. Set a heading and the heli will lock to that direction when near its destination/target, but may still turn towards the destination when flying at higher speed from a further distance.
/// Behavior Flags is a bitwise value that modifies the AI behavior. Not clear what all flags do, but here are some guesses/notes:
/// 1: Forces heading to face E
/// 2: Unknown
/// 4: Tight circles around coordinate destination
/// 8: Unknown
/// 16: Circles around coordinate destination facing towards destination
/// 32: Flys to normally, then lands at coordinate destination and stays on the ground (using mission type 4)
/// 64: Ignores obstacles when flying, will follow at specified minHeight above ground level but will not avoid buildings, vehicles, etc.
/// 128: Unknown
/// 256: Unknown
/// 512: Unknown
/// 1024: Unknown
/// 2048: Reverses direction of circling (mission type 9) to clockwise
/// 4096: Hugs closer to the ground, maintains minHeight from ground generally, but barely clears buildings and dips down more between buildings instead of taking a more efficient/safe route
/// 8192: Unknown
/// Unk3 is a float value, you may see -1082130432 for this value in decompiled native scripts, this is the equivalent to -1.0f. Seems to affect acceleration/aggressiveness, but not sure exactly how it works. Higher value seems to result in lower acceleration/less aggressive flying. Almost always -1.0 in native scripts, occasionally 20.0 or 50.0. Setting to 400.0 seems to work well for making the pilot not overshoot the destination when using coordinate destination.
/// Notes updated by PNWParksFan, May 2021
pub fn TASK_HELI_MISSION(pilot: types.Ped, aircraft: types.Vehicle, targetVehicle: types.Vehicle, targetPed: types.Ped, destinationX: f32, destinationY: f32, destinationZ: f32, missionFlag: c_int, maxSpeed: f32, radius: f32, targetHeading: f32, maxHeight: c_int, minHeight: c_int, slowDownDistance: f32, behaviorFlags: c_int) void {
_ = nativeCaller.invoke15(@as(u64, @intCast(15767148344044076724)), pilot, aircraft, targetVehicle, targetPed, destinationX, destinationY, destinationZ, missionFlag, maxSpeed, radius, targetHeading, maxHeight, minHeight, slowDownDistance, behaviorFlags);
}
pub fn TASK_HELI_ESCORT_HELI(pilot: types.Ped, heli1: types.Vehicle, heli2: types.Vehicle, offsetX: f32, offsetY: f32, offsetZ: f32) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(12935835884309672464)), pilot, heli1, heli2, offsetX, offsetY, offsetZ);
}
/// EXAMPLE USAGE:
/// Fly around target (Precautiously, keeps high altitude):
/// Function.Call(Hash.TASK_PLANE_MISSION, pilot, selectedAirplane, 0, 0, Target.X, Target.Y, Target.Z, 4, 100f, 0f, 90f, 0, 200f);
/// Fly around target (Dangerously, keeps VERY low altitude):
/// Function.Call(Hash.TASK_PLANE_MISSION, pilot, selectedAirplane, 0, 0, Target.X, Target.Y, Target.Z, 4, 100f, 0f, 90f, 0, -500f);
/// Fly directly into target:
/// Function.Call(Hash.TASK_PLANE_MISSION, pilot, selectedAirplane, 0, 0, Target.X, Target.Y, Target.Z, 4, 100f, 0f, 90f, 0, -5000f);
/// EXPANDED INFORMATION FOR ADVANCED USAGE (custom pilot)
/// 'physicsSpeed': (THIS IS NOT YOUR ORDINARY SPEED PARAMETER: READ!!)
/// Think of this -first- as a radius value, not a true speed value. The ACTUAL effective speed of the plane will be that of the maximum speed permissible to successfully fly in a -circle- with a radius of 'physicsSpeed'. This also means that the plane must complete a circle before it can begin its "bombing run", its straight line pass towards the target. p9 appears to influence the angle at which a "bombing run" begins, although I can't confirm yet.
/// VERY IMPORTANT: A "bombing run" will only occur if a plane can successfully determine a possible navigable route (the slower the value of 'physicsSpeed', the more precise the pilot can be due to less influence of physics on flightpath). Otherwise, the pilot will continue to patrol around Destination (be it a dynamic Entity position vector or a fixed world coordinate vector.)
/// 0 = Plane's physics are almost entirely frozen, plane appears to "orbit" around precise destination point
/// 1-299 = Blend of "frozen, small radius" vs. normal vs. "accelerated, hyperfast, large radius"
/// 300+ = Vehicle behaves entirely like a normal gameplay plane.
/// 'patrolBlend' (The lower the value, the more the Destination is treated as a "fly AT" rather than a "fly AROUND point".)
/// Scenario: Destination is an Entity on ground level, wide open field
/// -5000 = Pilot kamikazes directly into Entity
/// -1000 = Pilot flies extremely low -around- Entity, very prone to crashing
/// -200 = Pilot flies lower than average around Entity.
/// 0 = Pilot flies around Entity, normal altitude
/// 200 = Pilot flies an extra eighty units or so higher than 0 while flying around Destination (this doesn't seem to correlate directly into distance units.)
/// -- Valid mission types found in the exe: --
/// 0 = None
/// 1 = Unk
/// 2 = CTaskVehicleRam
/// 3 = CTaskVehicleBlock
/// 4 = CTaskVehicleGoToPlane
/// 5 = CTaskVehicleStop
/// 6 = CTaskVehicleAttack
/// 7 = CTaskVehicleFollow
/// 8 = CTaskVehicleFleeAirborne
/// 9= CTaskVehicleCircle
/// 10 = CTaskVehicleEscort
/// 15 = CTaskVehicleFollowRecording
/// 16 = CTaskVehiclePoliceBehaviour
/// 17 = CTaskVehicleCrash
pub fn TASK_PLANE_MISSION(pilot: types.Ped, aircraft: types.Vehicle, targetVehicle: types.Vehicle, targetPed: types.Ped, destinationX: f32, destinationY: f32, destinationZ: f32, missionFlag: c_int, angularDrag: f32, targetReached: f32, targetHeading: f32, maxZ: f32, minZ: f32, precise: windows.BOOL) void {
_ = nativeCaller.invoke14(@as(u64, @intCast(2553607858489408392)), pilot, aircraft, targetVehicle, targetPed, destinationX, destinationY, destinationZ, missionFlag, angularDrag, targetReached, targetHeading, maxZ, minZ, precise);
}
pub fn TASK_PLANE_TAXI(pilot: types.Ped, aircraft: types.Vehicle, x: f32, y: f32, z: f32, cruiseSpeed: f32, targetReached: f32) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(10575402684550816514)), pilot, aircraft, x, y, z, cruiseSpeed, targetReached);
}
/// You need to call PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS after TASK_BOAT_MISSION in order for the task to execute.
/// Working example
/// float vehicleMaxSpeed = VEHICLE::GET_VEHICLE_ESTIMATED_MAX_SPEED(ENTITY::GET_ENTITY_MODEL(pedVehicle));
/// TASK::TASK_BOAT_MISSION(pedDriver, pedVehicle, 0, 0, waypointCoord.x, waypointCoord.y, waypointCoord.z, 4, vehicleMaxSpeed, 786469, -1.0, 7);
/// PED::SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(pedDriver, 1);
/// P8 appears to be driving style flag - see gtaforums.com/topic/822314-guide-driving-styles/ for documentation
pub fn TASK_BOAT_MISSION(pedDriver: types.Ped, vehicle: types.Vehicle, targetVehicle: types.Vehicle, targetPed: types.Ped, x: f32, y: f32, z: f32, mission: c_int, maxSpeed: f32, drivingStyle: c_int, targetReached: f32, boatFlags: types.Any) void {
_ = nativeCaller.invoke12(@as(u64, @intCast(1569610105169438271)), pedDriver, vehicle, targetVehicle, targetPed, x, y, z, mission, maxSpeed, drivingStyle, targetReached, boatFlags);
}
/// Example:
/// TASK::TASK_DRIVE_BY(l_467[1/*22*/], PLAYER::PLAYER_PED_ID(), 0, 0.0, 0.0, 2.0, 300.0, 100, 0, ${firing_pattern_burst_fire_driveby});
/// Needs working example. Doesn't seem to do anything.
/// I marked p2 as targetVehicle as all these shooting related tasks seem to have that in common.
/// I marked p6 as distanceToShoot as if you think of GTA's Logic with the native SET_VEHICLE_SHOOT natives, it won't shoot till it gets within a certain distance of the target.
/// I marked p7 as pedAccuracy as it seems it's mostly 100 (Completely Accurate), 75, 90, etc. Although this could be the ammo count within the gun, but I highly doubt it. I will change this comment once I find out if it's ammo count or not.
pub fn TASK_DRIVE_BY(driverPed: types.Ped, targetPed: types.Ped, targetVehicle: types.Vehicle, targetX: f32, targetY: f32, targetZ: f32, distanceToShoot: f32, pedAccuracy: c_int, pushUnderneathDrivingTaskIfDriving: windows.BOOL, firingPattern: types.Hash) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(3425815346453651825)), driverPed, targetPed, targetVehicle, targetX, targetY, targetZ, distanceToShoot, pedAccuracy, pushUnderneathDrivingTaskIfDriving, firingPattern);
}
/// For p1 & p2 (Ped, Vehicle). I could be wrong, as the only time this native is called in scripts is once and both are 0, but I assume this native will work like SET_MOUNTED_WEAPON_TARGET in which has the same exact amount of parameters and the 1st and last 3 parameters are right and the same for both natives.
pub fn SET_DRIVEBY_TASK_TARGET(shootingPed: types.Ped, targetPed: types.Ped, targetVehicle: types.Vehicle, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(16551575328854729454)), shootingPed, targetPed, targetVehicle, x, y, z);
}
pub fn CLEAR_DRIVEBY_TASK_UNDERNEATH_DRIVING_TASK(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14076947156617711465)), ped);
}
pub fn IS_DRIVEBY_TASK_UNDERNEATH_DRIVING_TASK(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9765465234159077400)), ped);
}
/// Forces the ped to use the mounted weapon.
/// Returns false if task is not possible.
pub fn CONTROL_MOUNTED_WEAPON(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15924237928379716442)), ped);
}
/// Note: Look in decompiled scripts and the times that p1 and p2 aren't 0. They are filled with vars. If you look through out that script what other natives those vars are used in, you can tell p1 is a ped and p2 is a vehicle. Which most likely means if you want the mounted weapon to target a ped set targetVehicle to 0 or vice-versa.
pub fn SET_MOUNTED_WEAPON_TARGET(shootingPed: types.Ped, targetPed: types.Ped, targetVehicle: types.Vehicle, x: f32, y: f32, z: f32, taskMode: c_int, ignoreTargetVehDeadCheck: windows.BOOL) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(14760708415523990457)), shootingPed, targetPed, targetVehicle, x, y, z, taskMode, ignoreTargetVehDeadCheck);
}
pub fn IS_MOUNTED_WEAPON_TASK_UNDERNEATH_DRIVING_TASK(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11754657829532138043)), ped);
}
/// Actually has 3 params, not 2.
/// p0: Ped
/// p1: int (or bool?)
/// p2: int
pub fn TASK_USE_MOBILE_PHONE(ped: types.Ped, usePhone: windows.BOOL, desiredPhoneMode: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(13630864193301112795)), ped, usePhone, desiredPhoneMode);
}
pub fn TASK_USE_MOBILE_PHONE_TIMED(ped: types.Ped, duration: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6836509677808544219)), ped, duration);
}
/// p2 tend to be 16, 17 or 1
/// p3 to p7 tend to be 0.0
pub fn TASK_CHAT_TO_PED(ped: types.Ped, target: types.Ped, flags: c_int, goToLocationX: f32, goToLocationY: f32, goToLocationZ: f32, headingDegs: f32, idleTime: f32) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(10102574530039184665)), ped, target, flags, goToLocationX, goToLocationY, goToLocationZ, headingDegs, idleTime);
}
/// Seat Numbers
/// -------------------------------
/// Driver = -1
/// Any = -2
/// Left-Rear = 1
/// Right-Front = 0
/// Right-Rear = 2
/// Extra seats = 3-14(This may differ from vehicle type e.g. Firetruck Rear Stand, Ambulance Rear)
pub fn TASK_WARP_PED_INTO_VEHICLE(ped: types.Ped, vehicle: types.Vehicle, seat: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(11132063835731916420)), ped, vehicle, seat);
}
/// //this part of the code is to determine at which entity the player is aiming, for example if you want to create a mod where you give orders to peds
/// Entity aimedentity;
/// Player player = PLAYER::PLAYER_ID();
/// PLAYER::_GET_AIMED_ENTITY(player, &aimedentity);
/// //bg is an array of peds
/// TASK::TASK_SHOOT_AT_ENTITY(bg[i], aimedentity, 5000, MISC::GET_HASH_KEY("FIRING_PATTERN_FULL_AUTO"));
/// in practical usage, getting the entity the player is aiming at and then task the peds to shoot at the entity, at a button press event would be better.
/// Firing Pattern Hash Information: https://pastebin.com/Px036isB
pub fn TASK_SHOOT_AT_ENTITY(entity: types.Entity, target: types.Entity, duration: c_int, firingPattern: types.Hash) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(637987121588266866)), entity, target, duration, firingPattern);
}
/// Climbs or vaults the nearest thing.
/// usePlayerLaunchForce is unused.
pub fn TASK_CLIMB(ped: types.Ped, usePlayerLaunchForce: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9933248364425581297)), ped, usePlayerLaunchForce);
}
pub fn TASK_CLIMB_LADDER(ped: types.Ped, fast: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13171208089415333908)), ped, fast);
}
/// Attaches a ped to a rope and allows player control to rappel down a wall. Disables all collisions while on the rope.
/// p10: Usually 1 in the scripts, clipSet: Clipset to use for the task, minZ: Minimum Z that the player can descend to, ropeHandle: Rope to attach this task to created with ADD_ROPE
/// Used to be known as TASK_RAPPEL_DOWN_WALL
pub fn TASK_RAPPEL_DOWN_WALL_USING_CLIPSET_OVERRIDE(ped: types.Ped, x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, minZ: f32, ropeHandle: c_int, clipSet: [*c]const u8, p10: types.Any, p11: types.Any) void {
_ = nativeCaller.invoke12(@as(u64, @intCast(16930837281545734035)), ped, x1, y1, z1, x2, y2, z2, minZ, ropeHandle, clipSet, p10, p11);
}
pub fn GET_TASK_RAPPEL_DOWN_WALL_STATE(ped: types.Ped) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(11323498930777448671)), ped);
}
/// Immediately stops the pedestrian from whatever it's doing. They stop fighting, animations, etc. they forget what they were doing.
pub fn CLEAR_PED_TASKS_IMMEDIATELY(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12295758863867781272)), ped);
}
pub fn TASK_PERFORM_SEQUENCE_FROM_PROGRESS(ped: types.Ped, taskIndex: c_int, progress1: c_int, progress2: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(9881490315637044464)), ped, taskIndex, progress1, progress2);
}
/// This native does absolutely nothing, just a nullsub
/// R* Comment:
/// SET_NEXT_DESIRED_MOVE_STATE - Function is deprecated - do not use anymore
pub fn SET_NEXT_DESIRED_MOVE_STATE(nextMoveState: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17418218490894141754)), nextMoveState);
}
pub fn SET_PED_DESIRED_MOVE_BLEND_RATIO(ped: types.Ped, newMoveBlendRatio: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2204559057982395077)), ped, newMoveBlendRatio);
}
pub fn GET_PED_DESIRED_MOVE_BLEND_RATIO(ped: types.Ped) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(9590367744336139245)), ped);
}
/// eg
/// TASK::TASK_GOTO_ENTITY_AIMING(v_2, PLAYER::PLAYER_PED_ID(), 5.0, 25.0);
/// ped = Ped you want to perform this task.
/// target = the Entity they should aim at.
/// distanceToStopAt = distance from the target, where the ped should stop to aim.
/// StartAimingDist = distance where the ped should start to aim.
pub fn TASK_GOTO_ENTITY_AIMING(ped: types.Ped, target: types.Entity, distanceToStopAt: f32, StartAimingDist: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(12239175179009747986)), ped, target, distanceToStopAt, StartAimingDist);
}
/// p1 is always GET_HASH_KEY("empty") in scripts, for the rare times this is used
pub fn TASK_SET_DECISION_MAKER(ped: types.Ped, decisionMakerId: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16970997011576201434)), ped, decisionMakerId);
}
pub fn TASK_SET_SPHERE_DEFENSIVE_AREA(ped: types.Ped, x: f32, y: f32, z: f32, radius: f32) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(10609361769477613988)), ped, x, y, z, radius);
}
pub fn TASK_CLEAR_DEFENSIVE_AREA(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10783522318166626685)), ped);
}
pub fn TASK_PED_SLIDE_TO_COORD(ped: types.Ped, x: f32, y: f32, z: f32, heading: f32, speed: f32) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(15010469479099992582)), ped, x, y, z, heading, speed);
}
pub fn TASK_PED_SLIDE_TO_COORD_HDG_RATE(ped: types.Ped, x: f32, y: f32, z: f32, heading: f32, speed: f32, headingChangeRate: f32) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(6506129629110488914)), ped, x, y, z, heading, speed, headingChangeRate);
}
pub fn ADD_COVER_POINT(x: f32, y: f32, z: f32, direction: f32, usage: c_int, height: c_int, arc: c_int, isPriority: windows.BOOL) types.ScrHandle {
return nativeCaller.invoke8(@as(u64, @intCast(15402638885934156159)), x, y, z, direction, usage, height, arc, isPriority);
}
pub fn REMOVE_COVER_POINT(coverpoint: types.ScrHandle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12549417329207351061)), coverpoint);
}
/// Checks if there is a cover point at position
pub fn DOES_SCRIPTED_COVER_POINT_EXIST_AT_COORDS(x: f32, y: f32, z: f32) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(12217014802665331249)), x, y, z);
}
pub fn GET_SCRIPTED_COVER_POINT_COORDS(coverpoint: types.ScrHandle) types.Vector3 {
return nativeCaller.invoke1(@as(u64, @intCast(6433972785867538053)), coverpoint);
}
/// Used to be known as _ADD_SCRIPTED_BLOCKING_AREA
pub fn ADD_SCRIPTED_COVER_AREA(x: f32, y: f32, z: f32, radius: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(2934017915918382250)), x, y, z, radius);
}
/// Makes the specified ped attack the target ped.
/// p2 should be 0
/// p3 should be 16
pub fn TASK_COMBAT_PED(ped: types.Ped, targetPed: types.Ped, combatFlags: c_int, threatResponseFlags: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(17394841866481616004)), ped, targetPed, combatFlags, threatResponseFlags);
}
pub fn TASK_COMBAT_PED_TIMED(ped: types.Ped, target: types.Ped, time: c_int, flags: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(10686814165295262686)), ped, target, time, flags);
}
pub fn TASK_SEEK_COVER_FROM_POS(ped: types.Ped, x: f32, y: f32, z: f32, duration: c_int, allowPeekingAndFiring: windows.BOOL) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(8479199890695358962)), ped, x, y, z, duration, allowPeekingAndFiring);
}
pub fn TASK_SEEK_COVER_FROM_PED(ped: types.Ped, target: types.Ped, duration: c_int, allowPeekingAndFiring: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(9571041169460368164)), ped, target, duration, allowPeekingAndFiring);
}
/// p5 is always -1
pub fn TASK_SEEK_COVER_TO_COVER_POINT(ped: types.Ped, coverpoint: types.ScrHandle, x: f32, y: f32, z: f32, time: c_int, allowPeekingAndFiring: windows.BOOL) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(15293544594376574079)), ped, coverpoint, x, y, z, time, allowPeekingAndFiring);
}
/// p8 causes the ped to take the shortest route to the cover position. It may have something to do with navmesh or pathfinding mechanics.
/// from michael2:
/// TASK::TASK_SEEK_COVER_TO_COORDS(ped, 967.5164794921875, -2121.603515625, 30.479299545288086, 978.94677734375, -2125.84130859375, 29.4752, -1, 1);
/// appears to be shorter variation
/// from michael3:
/// TASK::TASK_SEEK_COVER_TO_COORDS(ped, -2231.011474609375, 263.6326599121094, 173.60195922851562, -1, 0);
pub fn TASK_SEEK_COVER_TO_COORDS(ped: types.Ped, x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, timeout: c_int, shortRoute: windows.BOOL) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(4117532960019646252)), ped, x1, y1, z1, x2, y2, z2, timeout, shortRoute);
}
pub fn TASK_PUT_PED_DIRECTLY_INTO_COVER(ped: types.Ped, x: f32, y: f32, z: f32, time: c_int, allowPeekingAndFiring: windows.BOOL, blendInDuration: f32, forceInitialFacingDirection: windows.BOOL, forceFaceLeft: windows.BOOL, identifier: c_int, doEntry: windows.BOOL) void {
_ = nativeCaller.invoke11(@as(u64, @intCast(4715894700071059150)), ped, x, y, z, time, allowPeekingAndFiring, blendInDuration, forceInitialFacingDirection, forceFaceLeft, identifier, doEntry);
}
pub fn TASK_WARP_PED_DIRECTLY_INTO_COVER(ped: types.Ped, time: c_int, allowPeekingAndFiring: windows.BOOL, forceInitialFacingDirection: windows.BOOL, forceFaceLeft: windows.BOOL, identifier: c_int) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(7926874005424800374)), ped, time, allowPeekingAndFiring, forceInitialFacingDirection, forceFaceLeft, identifier);
}
/// p1 is 1, 2, or 3 in scripts
pub fn TASK_EXIT_COVER(ped: types.Ped, exitType: c_int, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(8769169158966693161)), ped, exitType, x, y, z);
}
/// from armenian3.c4
/// TASK::TASK_PUT_PED_DIRECTLY_INTO_MELEE(PlayerPed, armenianPed, 0.0, -1.0, 0.0, 0);
pub fn TASK_PUT_PED_DIRECTLY_INTO_MELEE(ped: types.Ped, meleeTarget: types.Ped, blendInDuration: f32, timeInMelee: f32, strafePhaseSync: f32, aiCombatFlags: c_int) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(2048242048576781881)), ped, meleeTarget, blendInDuration, timeInMelee, strafePhaseSync, aiCombatFlags);
}
/// used in sequence task
/// both parameters seems to be always 0
pub fn TASK_TOGGLE_DUCK(ped: types.Ped, toggleType: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12436233642443140600)), ped, toggleType);
}
/// From re_prisonvanbreak:
/// TASK::TASK_GUARD_CURRENT_POSITION(l_DD, 35.0, 35.0, 1);
pub fn TASK_GUARD_CURRENT_POSITION(ped: types.Ped, maxPatrolProximity: f32, defensiveAreaRadius: f32, setDefensiveArea: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(5357212602577714356)), ped, maxPatrolProximity, defensiveAreaRadius, setDefensiveArea);
}
pub fn TASK_GUARD_ASSIGNED_DEFENSIVE_AREA(ped: types.Ped, x: f32, y: f32, z: f32, heading: f32, maxPatrolProximity: f32, timer: c_int) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(15177702416162850971)), ped, x, y, z, heading, maxPatrolProximity, timer);
}
pub fn TASK_GUARD_SPHERE_DEFENSIVE_AREA(ped: types.Ped, defendPositionX: f32, defendPositionY: f32, defendPositionZ: f32, heading: f32, maxPatrolProximity: f32, time: c_int, x: f32, y: f32, z: f32, defensiveAreaRadius: f32) void {
_ = nativeCaller.invoke11(@as(u64, @intCast(14503559015034697186)), ped, defendPositionX, defendPositionY, defendPositionZ, heading, maxPatrolProximity, time, x, y, z, defensiveAreaRadius);
}
/// scenarioName example: "WORLD_HUMAN_GUARD_STAND"
pub fn TASK_STAND_GUARD(ped: types.Ped, x: f32, y: f32, z: f32, heading: f32, scenarioName: [*c]const u8) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(12538918064706920080)), ped, x, y, z, heading, scenarioName);
}
pub fn SET_DRIVE_TASK_CRUISE_SPEED(driver: types.Ped, cruiseSpeed: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6673073222263625992)), driver, cruiseSpeed);
}
pub fn SET_DRIVE_TASK_MAX_CRUISE_SPEED(ped: types.Ped, speed: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4632614851719509830)), ped, speed);
}
/// This native is used to set the driving style for specific ped.
/// Driving styles id seems to be:
/// 786468
/// 262144
/// 786469
/// http://gtaforums.com/topic/822314-guide-driving-styles/
pub fn SET_DRIVE_TASK_DRIVING_STYLE(ped: types.Ped, drivingStyle: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15766570009348321127)), ped, drivingStyle);
}
pub fn ADD_COVER_BLOCKING_AREA(startX: f32, startY: f32, startZ: f32, endX: f32, endY: f32, endZ: f32, blockObjects: windows.BOOL, blockVehicles: windows.BOOL, blockMap: windows.BOOL, blockPlayer: windows.BOOL) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(5027590626050820993)), startX, startY, startZ, endX, endY, endZ, blockObjects, blockVehicles, blockMap, blockPlayer);
}
pub fn REMOVE_ALL_COVER_BLOCKING_AREAS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(15809614640661354200)));
}
/// Used to be known as _REMOVE_COVER_BLOCKING_AREAS_AT_COORD
pub fn REMOVE_COVER_BLOCKING_AREAS_AT_POSITION(x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(18051494277141466980)), x, y, z);
}
/// Used to be known as _REMOVE_SPECIFIC_COVER_BLOCKING_AREA
pub fn REMOVE_SPECIFIC_COVER_BLOCKING_AREAS(startX: f32, startY: f32, startZ: f32, endX: f32, endY: f32, endZ: f32, blockObjects: windows.BOOL, blockVehicles: windows.BOOL, blockMap: windows.BOOL, blockPlayer: windows.BOOL) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(2248735413680690996)), startX, startY, startZ, endX, endY, endZ, blockObjects, blockVehicles, blockMap, blockPlayer);
}
/// Plays a scenario on a Ped at their current location.
/// unkDelay - Usually 0 or -1, doesn't seem to have any effect. Might be a delay between sequences.
/// playEnterAnim - Plays the "Enter" anim if true, otherwise plays the "Exit" anim. Scenarios that don't have any "Enter" anims won't play if this is set to true.
/// ----
/// From "am_hold_up.ysc.c4" at line 339:
/// TASK::TASK_START_SCENARIO_IN_PLACE(NETWORK::NET_TO_PED(l_8D._f4), sub_adf(), 0, 1);
/// I'm unsure of what the last two parameters are, however sub_adf() randomly returns 1 of 3 scenarios, those being:
/// WORLD_HUMAN_SMOKING
/// WORLD_HUMAN_HANG_OUT_STREET
/// WORLD_HUMAN_STAND_MOBILE
/// This makes sense, as these are what I commonly see when going by a liquor store.
/// -------------------------
/// List of scenarioNames: https://pastebin.com/6mrYTdQv
/// (^ Thank you so fucking much for this)
/// Also these:
/// WORLD_FISH_FLEE
/// DRIVE
/// WORLD_HUMAN_HIKER
/// WORLD_VEHICLE_ATTRACTOR
/// WORLD_VEHICLE_BICYCLE_MOUNTAIN
/// WORLD_VEHICLE_BIKE_OFF_ROAD_RACE
/// WORLD_VEHICLE_BIKER
/// WORLD_VEHICLE_CONSTRUCTION_PASSENGERS
/// WORLD_VEHICLE_CONSTRUCTION_SOLO
/// WORLD_VEHICLE_DRIVE_PASSENGERS
/// WORLD_VEHICLE_DRIVE_SOLO
/// WORLD_VEHICLE_EMPTY
/// WORLD_VEHICLE_PARK_PARALLEL
/// WORLD_VEHICLE_PARK_PERPENDICULAR_NOSE_IN
/// WORLD_VEHICLE_POLICE_BIKE
/// WORLD_VEHICLE_POLICE_CAR
/// WORLD_VEHICLE_POLICE_NEXT_TO_CAR
/// WORLD_VEHICLE_SALTON_DIRT_BIKE
/// WORLD_VEHICLE_TRUCK_LOGS
/// Full list of ped scenarios by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenariosCompact.json
pub fn TASK_START_SCENARIO_IN_PLACE(ped: types.Ped, scenarioName: [*c]const u8, unkDelay: c_int, playEnterAnim: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(1452976313881078745)), ped, scenarioName, unkDelay, playEnterAnim);
}
/// Full list of ped scenarios by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenariosCompact.json
/// Also a few more listed at TASK::TASK_START_SCENARIO_IN_PLACE just above.
/// ---------------
/// The first parameter in every scenario has always been a Ped of some sort. The second like TASK_START_SCENARIO_IN_PLACE is the name of the scenario.
/// The next 4 parameters were harder to decipher. After viewing "hairdo_shop_mp.ysc.c4", and being confused from seeing the case in other scripts, they passed the first three of the arguments as one array from a function, and it looked like it was obviously x, y, and z.
/// I haven't seen the sixth parameter go to or over 360, making me believe that it is rotation, but I really can't confirm anything.
/// I have no idea what the last 3 parameters are, but I'll try to find out.
/// -going on the last 3 parameters, they appear to always be "0, 0, 1"
/// p6 -1 also used in scrips
/// p7 used for sitting scenarios
/// p8 teleports ped to position
pub fn TASK_START_SCENARIO_AT_POSITION(ped: types.Ped, scenarioName: [*c]const u8, x: f32, y: f32, z: f32, heading: f32, duration: c_int, sittingScenario: windows.BOOL, teleport: windows.BOOL) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(18036631158424162055)), ped, scenarioName, x, y, z, heading, duration, sittingScenario, teleport);
}
/// Updated variables
/// An alternative to TASK::TASK_USE_NEAREST_SCENARIO_TO_COORD_WARP. Makes the ped walk to the scenario instead.
pub fn TASK_USE_NEAREST_SCENARIO_TO_COORD(ped: types.Ped, x: f32, y: f32, z: f32, distance: f32, duration: c_int) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(2846071673660833803)), ped, x, y, z, distance, duration);
}
pub fn TASK_USE_NEAREST_SCENARIO_TO_COORD_WARP(ped: types.Ped, x: f32, y: f32, z: f32, radius: f32, timeToLeave: c_int) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(6404928951124981443)), ped, x, y, z, radius, timeToLeave);
}
/// p5 is always 0 in scripts
pub fn TASK_USE_NEAREST_SCENARIO_CHAIN_TO_COORD(ped: types.Ped, x: f32, y: f32, z: f32, maxRange: f32, timeToLeave: c_int) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(11518548947881699507)), ped, x, y, z, maxRange, timeToLeave);
}
/// p5 is always -1 or 0 in scripts
pub fn TASK_USE_NEAREST_SCENARIO_CHAIN_TO_COORD_WARP(ped: types.Ped, x: f32, y: f32, z: f32, radius: f32, timeToLeave: c_int) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(10926452205845894705)), ped, x, y, z, radius, timeToLeave);
}
pub fn DOES_SCENARIO_EXIST_IN_AREA(x: f32, y: f32, z: f32, radius: f32, mustBeFree: windows.BOOL) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(6510277754647032769)), x, y, z, radius, mustBeFree);
}
pub fn DOES_SCENARIO_OF_TYPE_EXIST_IN_AREA(x: f32, y: f32, z: f32, scenarioName: [*c]const u8, radius: f32, mustBeFree: windows.BOOL) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(764780887253223105)), x, y, z, scenarioName, radius, mustBeFree);
}
pub fn IS_SCENARIO_OCCUPIED(x: f32, y: f32, z: f32, maxRange: f32, onlyUsersActuallyAtScenario: windows.BOOL) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(8685005888811098236)), x, y, z, maxRange, onlyUsersActuallyAtScenario);
}
pub fn PED_HAS_USE_SCENARIO_TASK(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2980886862190202071)), ped);
}
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
pub fn PLAY_ANIM_ON_RUNNING_SCENARIO(ped: types.Ped, animDict: [*c]const u8, animName: [*c]const u8) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(8394780375071454684)), ped, animDict, animName);
}
/// Full list of scenario groups used in scripts by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenarioGroupNames.json
/// Occurrences in the b617d scripts:
/// "ARMY_GUARD",
/// "ARMY_HELI",
/// "Cinema_Downtown",
/// "Cinema_Morningwood",
/// "Cinema_Textile",
/// "City_Banks",
/// "Countryside_Banks",
/// "DEALERSHIP",
/// "GRAPESEED_PLANES",
/// "KORTZ_SECURITY",
/// "LOST_BIKERS",
/// "LSA_Planes",
/// "LSA_Planes",
/// "MP_POLICE",
/// "Observatory_Bikers",
/// "POLICE_POUND1",
/// "POLICE_POUND2",
/// "POLICE_POUND3",
/// "POLICE_POUND4",
/// "POLICE_POUND5"
/// "QUARRY",
/// "SANDY_PLANES",
/// "SCRAP_SECURITY",
/// "SEW_MACHINE",
/// "SOLOMON_GATE",
/// "Triathlon_1_Start",
/// "Triathlon_2_Start",
/// "Triathlon_3_Start"
/// Sometimes used with IS_SCENARIO_GROUP_ENABLED:
/// if (TASK::DOES_SCENARIO_GROUP_EXIST("Observatory_Bikers") && (!TASK::IS_SCENARIO_GROUP_ENABLED("Observatory_Bikers"))) {
/// else if (TASK::IS_SCENARIO_GROUP_ENABLED("BLIMP")) {
pub fn DOES_SCENARIO_GROUP_EXIST(scenarioGroup: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(17943268986684571859)), scenarioGroup);
}
/// Full list of scenario groups used in scripts by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenarioGroupNames.json
/// Occurrences in the b617d scripts:
/// "ARMY_GUARD",
/// "ARMY_HELI",
/// "BLIMP",
/// "Cinema_Downtown",
/// "Cinema_Morningwood",
/// "Cinema_Textile",
/// "City_Banks",
/// "Countryside_Banks",
/// "DEALERSHIP",
/// "KORTZ_SECURITY",
/// "LSA_Planes",
/// "MP_POLICE",
/// "Observatory_Bikers",
/// "POLICE_POUND1",
/// "POLICE_POUND2",
/// "POLICE_POUND3",
/// "POLICE_POUND4",
/// "POLICE_POUND5",
/// "Rampage1",
/// "SANDY_PLANES",
/// "SCRAP_SECURITY",
/// "SEW_MACHINE",
/// "SOLOMON_GATE"
/// Sometimes used with DOES_SCENARIO_GROUP_EXIST:
/// if (TASK::DOES_SCENARIO_GROUP_EXIST("Observatory_Bikers") && (!TASK::IS_SCENARIO_GROUP_ENABLED("Observatory_Bikers"))) {
/// else if (TASK::IS_SCENARIO_GROUP_ENABLED("BLIMP")) {
pub fn IS_SCENARIO_GROUP_ENABLED(scenarioGroup: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3925460877865671577)), scenarioGroup);
}
/// Full list of scenario groups used in scripts by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenarioGroupNames.json
/// Occurrences in the b617d scripts: https://pastebin.com/Tvg2PRHU
pub fn SET_SCENARIO_GROUP_ENABLED(scenarioGroup: [*c]const u8, enabled: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(200662747229742670)), scenarioGroup, enabled);
}
pub fn RESET_SCENARIO_GROUPS_ENABLED() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(15965310171172810042)));
}
/// Full list of scenario groups used in scripts by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenarioGroupNames.json
/// Groups found in the scripts used with this native:
/// "AMMUNATION",
/// "QUARRY",
/// "Triathlon_1",
/// "Triathlon_2",
/// "Triathlon_3"
pub fn SET_EXCLUSIVE_SCENARIO_GROUP(scenarioGroup: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6007405949742746730)), scenarioGroup);
}
pub fn RESET_EXCLUSIVE_SCENARIO_GROUP() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(4756570639266240061)));
}
/// Full list of scenario types used in scripts by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenariosCompact.json
/// Occurrences in the b617d scripts:
/// "PROP_HUMAN_SEAT_CHAIR",
/// "WORLD_HUMAN_DRINKING",
/// "WORLD_HUMAN_HANG_OUT_STREET",
/// "WORLD_HUMAN_SMOKING",
/// "WORLD_MOUNTAIN_LION_WANDER",
/// "WORLD_HUMAN_DRINKING"
/// Sometimes used together with MISC::IS_STRING_NULL_OR_EMPTY in the scripts.
/// scenarioType could be the same as scenarioName, used in for example TASK::TASK_START_SCENARIO_AT_POSITION.
pub fn IS_SCENARIO_TYPE_ENABLED(scenarioType: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4215753753502451490)), scenarioType);
}
/// Full list of scenario types used in scripts by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/scenariosCompact.json
/// seems to enable/disable specific scenario-types from happening in the game world.
/// Here are some scenario types from the scripts:
/// "WORLD_MOUNTAIN_LION_REST"
/// "WORLD_MOUNTAIN_LION_WANDER"
/// "DRIVE"
/// "WORLD_VEHICLE_POLICE_BIKE"
/// "WORLD_VEHICLE_POLICE_CAR"
/// "WORLD_VEHICLE_POLICE_NEXT_TO_CAR"
/// "WORLD_VEHICLE_DRIVE_SOLO"
/// "WORLD_VEHICLE_BIKER"
/// "WORLD_VEHICLE_DRIVE_PASSENGERS"
/// "WORLD_VEHICLE_SALTON_DIRT_BIKE"
/// "WORLD_VEHICLE_BICYCLE_MOUNTAIN"
/// "PROP_HUMAN_SEAT_CHAIR"
/// "WORLD_VEHICLE_ATTRACTOR"
/// "WORLD_HUMAN_LEANING"
/// "WORLD_HUMAN_HANG_OUT_STREET"
/// "WORLD_HUMAN_DRINKING"
/// "WORLD_HUMAN_SMOKING"
/// "WORLD_HUMAN_GUARD_STAND"
/// "WORLD_HUMAN_CLIPBOARD"
/// "WORLD_HUMAN_HIKER"
/// "WORLD_VEHICLE_EMPTY"
/// "WORLD_VEHICLE_BIKE_OFF_ROAD_RACE"
/// "WORLD_HUMAN_PAPARAZZI"
/// "WORLD_VEHICLE_PARK_PERPENDICULAR_NOSE_IN"
/// "WORLD_VEHICLE_PARK_PARALLEL"
/// "WORLD_VEHICLE_CONSTRUCTION_SOLO"
/// "WORLD_VEHICLE_CONSTRUCTION_PASSENGERS"
/// "WORLD_VEHICLE_TRUCK_LOGS"
/// scenarioType could be the same as scenarioName, used in for example TASK::TASK_START_SCENARIO_AT_POSITION.
pub fn SET_SCENARIO_TYPE_ENABLED(scenarioType: [*c]const u8, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16953779142900023009)), scenarioType, toggle);
}
pub fn RESET_SCENARIO_TYPES_ENABLED() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(955024987292118381)));
}
pub fn IS_PED_ACTIVE_IN_SCENARIO(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12255244102459206851)), ped);
}
/// Used only once (am_mp_property_int)
/// ped was PLAYER_PED_ID()
/// Related to CTaskAmbientClips.
pub fn IS_PED_PLAYING_BASE_CLIP_IN_SCENARIO(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7069646766978141761)), ped);
}
/// Appears only in fm_mission_controller and used only 3 times.
/// ped was always PLAYER_PED_ID()
/// p1 was always true
/// p2 was always true
pub fn SET_PED_CAN_PLAY_AMBIENT_IDLES(ped: types.Ped, blockIdleClips: windows.BOOL, removeIdleClipIfPlaying: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(10365204289172881360)), ped, blockIdleClips, removeIdleClipIfPlaying);
}
/// Despite its name, it only attacks ONE hated target. The one closest to the specified position.
pub fn TASK_COMBAT_HATED_TARGETS_IN_AREA(ped: types.Ped, x: f32, y: f32, z: f32, radius: f32, combatFlags: c_int) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(5545608298846388384)), ped, x, y, z, radius, combatFlags);
}
/// Despite its name, it only attacks ONE hated target. The one closest hated target.
/// p2 seems to be always 0
pub fn TASK_COMBAT_HATED_TARGETS_AROUND_PED(ped: types.Ped, radius: f32, combatFlags: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(8932948940817864904)), ped, radius, combatFlags);
}
pub fn TASK_COMBAT_HATED_TARGETS_AROUND_PED_TIMED(ped: types.Ped, radius: f32, time: c_int, combatFlags: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(3150884457545943564)), ped, radius, time, combatFlags);
}
/// In every case of this native, I've only seen the first parameter passed as 0, although I believe it's a Ped after seeing tasks around it using 0. That's because it's used in a Sequence Task.
/// The last 3 parameters are definitely coordinates after seeing them passed in other scripts, and even being used straight from the player's coordinates.
/// ---
/// It seems that - in the decompiled scripts - this native was used on a ped who was in a vehicle to throw a projectile out the window at the player. This is something any ped will naturally do if they have a throwable and they are doing driveby-combat (although not very accurately).
/// It is possible, however, that this is how SWAT throws smoke grenades at the player when in cover.
/// ----------------------------------------------------
/// The first comment is right it definately is the ped as if you look in script finale_heist2b.c line 59628 in Xbox Scripts atleast you will see task_throw_projectile and the first param is Local_559[2 <14>] if you look above it a little bit line 59622 give_weapon_to_ped uses the same exact param Local_559[2 <14>] and we all know the first param of that native is ped. So it guaranteed has to be ped. 0 just may mean to use your ped by default for some reason.
pub fn TASK_THROW_PROJECTILE(ped: types.Ped, x: f32, y: f32, z: f32, ignoreCollisionEntityIndex: c_int, createInvincibleProjectile: windows.BOOL) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(8252165847224375889)), ped, x, y, z, ignoreCollisionEntityIndex, createInvincibleProjectile);
}
pub fn TASK_SWAP_WEAPON(ped: types.Ped, drawWeapon: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11681300754376708677)), ped, drawWeapon);
}
/// The 2nd param (drawWeapon) is not implemented.
/// -----------------------------------------------------------------------
/// The only occurrence I found in a R* script ("assassin_construction.ysc.c4"):
/// if (((v_3 < v_4) && (TASK::GET_SCRIPT_TASK_STATUS(PLAYER::PLAYER_PED_ID(), 0x6a67a5cc) != 1)) && (v_5 > v_3)) {
/// TASK::TASK_RELOAD_WEAPON(PLAYER::PLAYER_PED_ID(), 1);
/// }
pub fn TASK_RELOAD_WEAPON(ped: types.Ped, drawWeapon: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7120913868208590125)), ped, drawWeapon);
}
pub fn IS_PED_GETTING_UP(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3059318355911511788)), ped);
}
/// EX: Function.Call(Ped1, Ped2, Time, 0);
/// The last parameter is always 0 for some reason I do not know. The first parameter is the pedestrian who will writhe to the pedestrian in the other parameter. The third paremeter is how long until the Writhe task ends. When the task ends, the ped will die. If set to -1, he will not die automatically, and the task will continue until something causes it to end. This can be being touched by an entity, being shot, explosion, going into ragdoll, having task cleared. Anything that ends the current task will kill the ped at this point.
/// Third parameter does not appear to be time. The last parameter is not implemented (It's not used, regardless of value).
pub fn TASK_WRITHE(ped: types.Ped, target: types.Ped, minFireLoops: c_int, startState: c_int, forceShootOnGround: windows.BOOL, shootFromGroundTimer: c_int) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(14833779066214329454)), ped, target, minFireLoops, startState, forceShootOnGround, shootFromGroundTimer);
}
/// This native checks if a ped is on the ground, in pain from a (gunshot) wound.
/// Returns `true` if the ped is in writhe, `false` otherwise.
pub fn IS_PED_IN_WRITHE(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16048248660544706112)), ped);
}
/// patrolRoutes found in the b617d scripts:
/// "miss_Ass0",
/// "miss_Ass1",
/// "miss_Ass2",
/// "miss_Ass3",
/// "miss_Ass4",
/// "miss_Ass5",
/// "miss_Ass6",
/// "MISS_PATROL_6",
/// "MISS_PATROL_7",
/// "MISS_PATROL_8",
/// "MISS_PATROL_9",
/// "miss_Tower_01",
/// "miss_Tower_02",
/// "miss_Tower_03",
/// "miss_Tower_04",
/// "miss_Tower_05",
/// "miss_Tower_06",
/// "miss_Tower_07",
/// "miss_Tower_08",
/// "miss_Tower_10"
pub fn OPEN_PATROL_ROUTE(patrolRoute: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11775782035738541442)), patrolRoute);
}
pub fn CLOSE_PATROL_ROUTE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(12701255580442479553)));
}
/// Example:
/// TASK::ADD_PATROL_ROUTE_NODE(2, "WORLD_HUMAN_GUARD_STAND", -193.4915, -2378.864990234375, 10.9719, -193.4915, -2378.864990234375, 10.9719, 3000);
/// p0 is between 0 and 4 in the scripts.
/// p1 is "WORLD_HUMAN_GUARD_STAND" or "StandGuard".
/// p2, p3 and p4 is only one parameter sometimes in the scripts. Most likely a Vector3 hence p2, p3 and p4 are coordinates.
/// Examples:
/// TASK::ADD_PATROL_ROUTE_NODE(1, "WORLD_HUMAN_GUARD_STAND", l_739[7/*3*/], 0.0, 0.0, 0.0, 0);
/// TASK::ADD_PATROL_ROUTE_NODE(1, "WORLD_HUMAN_GUARD_STAND", l_B0[17/*44*/]._f3, l_B0[17/*44*/]._f3, 2000);
/// p5, p6 and p7 are for example set to: 1599.0406494140625, 2713.392578125, 44.4309.
/// p8 is an int, often random set to for example: MISC::GET_RANDOM_INT_IN_RANGE(5000, 10000).
pub fn ADD_PATROL_ROUTE_NODE(nodeId: c_int, nodeType: [*c]const u8, posX: f32, posY: f32, posZ: f32, headingX: f32, headingY: f32, headingZ: f32, duration: c_int) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(10295111106453597052)), nodeId, nodeType, posX, posY, posZ, headingX, headingY, headingZ, duration);
}
pub fn ADD_PATROL_ROUTE_LINK(nodeId1: c_int, nodeId2: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2524322982776776017)), nodeId1, nodeId2);
}
pub fn CREATE_PATROL_ROUTE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(12648997531343132892)));
}
/// From the b617d scripts:
/// TASK::DELETE_PATROL_ROUTE("miss_merc0");
/// TASK::DELETE_PATROL_ROUTE("miss_merc1");
/// TASK::DELETE_PATROL_ROUTE("miss_merc2");
/// TASK::DELETE_PATROL_ROUTE("miss_dock");
pub fn DELETE_PATROL_ROUTE(patrolRoute: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8604089281203999513)), patrolRoute);
}
/// Used to be known as _GET_PATROL_TASK_STATUS
pub fn GET_PATROL_TASK_INFO(ped: types.Ped, timeLeftAtNode: [*c]c_int, nodeId: [*c]c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(5978305092915355578)), ped, timeLeftAtNode, nodeId);
}
/// After looking at some scripts the second parameter seems to be an id of some kind. Here are some I found from some R* scripts:
/// "miss_Tower_01" (this went from 01 - 10)
/// "miss_Ass0" (0, 4, 6, 3)
/// "MISS_PATROL_8"
/// I think they're patrol routes, but I'm not sure. And I believe the 3rd parameter is a BOOL, but I can't confirm other than only seeing 0 and 1 being passed.
/// As far as I can see the patrol routes names such as "miss_Ass0" have been defined earlier in the scripts. This leads me to believe we can defined our own new patrol routes by following the same approach.
/// From the scripts
/// TASK::OPEN_PATROL_ROUTE("miss_Ass0");
/// TASK::ADD_PATROL_ROUTE_NODE(0, "WORLD_HUMAN_GUARD_STAND", l_738[0/*3*/], -139.4076690673828, -993.4732055664062, 26.2754, MISC::GET_RANDOM_INT_IN_RANGE(5000, 10000));
/// TASK::ADD_PATROL_ROUTE_NODE(1, "WORLD_HUMAN_GUARD_STAND", l_738[1/*3*/], -116.1391830444336, -987.4984130859375, 26.38541030883789, MISC::GET_RANDOM_INT_IN_RANGE(5000, 10000));
/// TASK::ADD_PATROL_ROUTE_NODE(2, "WORLD_HUMAN_GUARD_STAND", l_738[2/*3*/], -128.46847534179688, -979.0340576171875, 26.2754, MISC::GET_RANDOM_INT_IN_RANGE(5000, 10000));
/// TASK::ADD_PATROL_ROUTE_LINK(0, 1);
/// TASK::ADD_PATROL_ROUTE_LINK(1, 2);
/// TASK::ADD_PATROL_ROUTE_LINK(2, 0);
/// TASK::CLOSE_PATROL_ROUTE();
/// TASK::CREATE_PATROL_ROUTE();
pub fn TASK_PATROL(ped: types.Ped, patrolRouteName: [*c]const u8, alertState: c_int, canChatToPeds: windows.BOOL, useHeadLookAt: windows.BOOL) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(13665574152449359438)), ped, patrolRouteName, alertState, canChatToPeds, useHeadLookAt);
}
/// Makes the ped run to take cover
pub fn TASK_STAY_IN_COVER(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16562698007147448201)), ped);
}
/// x, y, z: offset in world coords from some entity.
pub fn ADD_VEHICLE_SUBTASK_ATTACK_COORD(ped: types.Ped, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(6697091213006265717)), ped, x, y, z);
}
pub fn ADD_VEHICLE_SUBTASK_ATTACK_PED(ped: types.Ped, target: types.Ped) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9652448456064476287)), ped, target);
}
pub fn TASK_VEHICLE_SHOOT_AT_PED(ped: types.Ped, target: types.Ped, fireTolerance: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(1201071848380568792)), ped, target, fireTolerance);
}
pub fn TASK_VEHICLE_AIM_AT_PED(ped: types.Ped, target: types.Ped) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16436033458109198487)), ped, target);
}
pub fn TASK_VEHICLE_SHOOT_AT_COORD(ped: types.Ped, x: f32, y: f32, z: f32, fireTolerance: f32) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(5877331030622116717)), ped, x, y, z, fireTolerance);
}
pub fn TASK_VEHICLE_AIM_AT_COORD(ped: types.Ped, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(4934852959810141199)), ped, x, y, z);
}
/// Differs from TASK_VEHICLE_DRIVE_TO_COORDS in that it will pick the shortest possible road route without taking one-way streets and other "road laws" into consideration.
/// WARNING:
/// A behaviorFlag value of 0 will result in a clunky, stupid driver!
/// Recommended settings:
/// speed = 30.0f,
/// behaviorFlag = 156,
/// stoppingRange = 5.0f;
/// If you simply want to have your driver move to a fixed location, call it only once, or, when necessary in the event of interruption.
/// If using this to continually follow a Ped who is on foot: You will need to run this in a tick loop. Call it in with the Ped's updated coordinates every 20 ticks or so and you will have one hell of a smart, fast-reacting NPC driver -- provided he doesn't get stuck. If your update frequency is too fast, the Ped may not have enough time to figure his way out of being stuck, and thus, remain stuck. One way around this would be to implement an "anti-stuck" mechanism, which allows the driver to realize he's stuck, temporarily pause the tick, unstuck, then resume the tick.
/// EDIT: This is being discussed in more detail at http://gtaforums.com/topic/818504-any-idea-on-how-to-make-peds-clever-and-insanely-fast-c/
pub fn TASK_VEHICLE_GOTO_NAVMESH(ped: types.Ped, vehicle: types.Vehicle, x: f32, y: f32, z: f32, speed: f32, behaviorFlag: c_int, stoppingRange: f32) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(1827035043851133678)), ped, vehicle, x, y, z, speed, behaviorFlag, stoppingRange);
}
/// movement_speed: mostly 2f, but also 1/1.2f, etc.
/// p8: always false
/// p9: 2f
/// p10: 0.5f
/// p11: true
/// p12: 0 / 512 / 513, etc.
/// p13: 0
/// firing_pattern: ${firing_pattern_full_auto}, 0xC6EE6B4C
pub fn TASK_GO_TO_COORD_WHILE_AIMING_AT_COORD(ped: types.Ped, x: f32, y: f32, z: f32, aimAtX: f32, aimAtY: f32, aimAtZ: f32, moveBlendRatio: f32, shoot: windows.BOOL, targetRadius: f32, slowDistance: f32, useNavMesh: windows.BOOL, navFlags: c_int, instantBlendToAim: windows.BOOL, firingPattern: types.Hash) void {
_ = nativeCaller.invoke15(@as(u64, @intCast(1238871098294766272)), ped, x, y, z, aimAtX, aimAtY, aimAtZ, moveBlendRatio, shoot, targetRadius, slowDistance, useNavMesh, navFlags, instantBlendToAim, firingPattern);
}
pub fn TASK_GO_TO_COORD_WHILE_AIMING_AT_ENTITY(ped: types.Ped, x: f32, y: f32, z: f32, aimAtID: types.Entity, moveBlendRatio: f32, shoot: windows.BOOL, targetRadius: f32, slowDistance: f32, useNavMesh: windows.BOOL, navFlags: c_int, instantBlendToAim: windows.BOOL, firingPattern: types.Hash, time: c_int) void {
_ = nativeCaller.invoke14(@as(u64, @intCast(12871679457162276423)), ped, x, y, z, aimAtID, moveBlendRatio, shoot, targetRadius, slowDistance, useNavMesh, navFlags, instantBlendToAim, firingPattern, time);
}
/// The ped will walk or run towards goToLocation, aiming towards goToLocation or focusLocation (depending on the aimingFlag) and shooting if shootAtEnemies = true to any enemy in his path.
/// If the ped is closer than noRoadsDistance, the ped will ignore pathing/navmesh and go towards goToLocation directly. This could cause the ped to get stuck behind tall walls if the goToLocation is on the other side. To avoid this, use 0.0f and the ped will always use pathing/navmesh to reach his destination.
/// If the speed is set to 0.0f, the ped will just stand there while aiming, if set to 1.0f he will walk while aiming, 2.0f will run while aiming.
/// The ped will stop aiming when he is closer than distanceToStopAt to goToLocation.
/// I still can't figure out what unkTrue is used for. I don't notice any difference if I set it to false but in the decompiled scripts is always true.
/// I think that unkFlag, like the driving styles, could be a flag that "work as a list of 32 bits converted to a decimal integer. Each bit acts as a flag, and enables or disables a function". What leads me to this conclusion is the fact that in the decompiled scripts, unkFlag takes values like: 0, 1, 5 (101 in binary) and 4097 (4096 + 1 or 1000000000001 in binary). For now, I don't know what behavior enable or disable this possible flag so I leave it at 0.
/// Note: After some testing, using unkFlag = 16 (0x10) enables the use of sidewalks while moving towards goToLocation.
/// The aimingFlag takes 2 values: 0 to aim at the focusLocation, 1 to aim at where the ped is heading (goToLocation).
/// Example:
/// enum AimFlag
/// {
/// AimAtFocusLocation,
/// AimAtGoToLocation
/// };
/// Vector3 goToLocation1 = { 996.2867f, 0, -2143.044f, 0, 28.4763f, 0 }; // remember the padding.
/// Vector3 goToLocation2 = { 990.2867f, 0, -2140.044f, 0, 28.4763f, 0 }; // remember the padding.
/// Vector3 focusLocation = { 994.3478f, 0, -2136.118f, 0, 29.2463f, 0 }; // the coord z should be a little higher, around +1.0f to avoid aiming at the ground
/// // 1st example
/// TASK::TASK_GO_TO_COORD_AND_AIM_AT_HATED_ENTITIES_NEAR_COORD(pedHandle, goToLocation1.x, goToLocation1.y, goToLocation1.z, focusLocation.x, focusLocation.y, focusLocation.z, 2.0f /*run*/, true /*shoot*/, 3.0f /*stop at*/, 0.0f /*noRoadsDistance*/, true /*always true*/, 0 /*possible flag*/, AimFlag::AimAtGoToLocation, -957453492 /*FullAuto pattern*/);
/// // 2nd example
/// TASK::TASK_GO_TO_COORD_AND_AIM_AT_HATED_ENTITIES_NEAR_COORD(pedHandle, goToLocation2.x, goToLocation2.y, goToLocation2.z, focusLocation.x, focusLocation.y, focusLocation.z, 1.0f /*walk*/, false /*don't shoot*/, 3.0f /*stop at*/, 0.0f /*noRoadsDistance*/, true /*always true*/, 0 /*possible flag*/, AimFlag::AimAtFocusLocation, -957453492 /*FullAuto pattern*/);
/// 1st example: The ped (pedhandle) will run towards goToLocation1. While running and aiming towards goToLocation1, the ped will shoot on sight to any enemy in his path, using "FullAuto" firing pattern. The ped will stop once he is closer than distanceToStopAt to goToLocation1.
/// 2nd example: The ped will walk towards goToLocation2. This time, while walking towards goToLocation2 and aiming at focusLocation, the ped will point his weapon on sight to any enemy in his path without shooting. The ped will stop once he is closer than distanceToStopAt to goToLocation2.
pub fn TASK_GO_TO_COORD_AND_AIM_AT_HATED_ENTITIES_NEAR_COORD(pedHandle: types.Ped, goToLocationX: f32, goToLocationY: f32, goToLocationZ: f32, focusLocationX: f32, focusLocationY: f32, focusLocationZ: f32, speed: f32, shootAtEnemies: windows.BOOL, distanceToStopAt: f32, noRoadsDistance: f32, useNavMesh: windows.BOOL, navFlags: c_int, taskFlags: c_int, firingPattern: types.Hash) void {
_ = nativeCaller.invoke15(@as(u64, @intCast(11913507004874961404)), pedHandle, goToLocationX, goToLocationY, goToLocationZ, focusLocationX, focusLocationY, focusLocationZ, speed, shootAtEnemies, distanceToStopAt, noRoadsDistance, useNavMesh, navFlags, taskFlags, firingPattern);
}
pub fn TASK_GO_TO_ENTITY_WHILE_AIMING_AT_COORD(ped: types.Ped, entity: types.Entity, aimX: f32, aimY: f32, aimZ: f32, moveBlendRatio: f32, shoot: windows.BOOL, targetRadius: f32, slowDistance: f32, useNavMesh: windows.BOOL, instantBlendToAim: windows.BOOL, firingPattern: types.Hash) void {
_ = nativeCaller.invoke12(@as(u64, @intCast(319782179644759269)), ped, entity, aimX, aimY, aimZ, moveBlendRatio, shoot, targetRadius, slowDistance, useNavMesh, instantBlendToAim, firingPattern);
}
/// shootatEntity:
/// If true, peds will shoot at Entity till it is dead.
/// If false, peds will just walk till they reach the entity and will cease shooting.
pub fn TASK_GO_TO_ENTITY_WHILE_AIMING_AT_ENTITY(ped: types.Ped, entityToWalkTo: types.Entity, entityToAimAt: types.Entity, speed: f32, shootatEntity: windows.BOOL, targetRadius: f32, slowDistance: f32, useNavMesh: windows.BOOL, instantBlendToAim: windows.BOOL, firingPattern: types.Hash) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(10900497284191097065)), ped, entityToWalkTo, entityToAimAt, speed, shootatEntity, targetRadius, slowDistance, useNavMesh, instantBlendToAim, firingPattern);
}
/// Makes the ped ragdoll like when falling from a great height
pub fn SET_HIGH_FALL_TASK(ped: types.Ped, minTime: c_int, maxTime: c_int, entryType: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(10124755914734031740)), ped, minTime, maxTime, entryType);
}
/// Full list of waypoint recordings by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/waypointRecordings.json
/// For a full list of the points, see here: goo.gl/wIH0vn
/// Max number of loaded recordings is 32.
pub fn REQUEST_WAYPOINT_RECORDING(name: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11452572689105639314)), name);
}
/// Full list of waypoint recordings by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/waypointRecordings.json
pub fn GET_IS_WAYPOINT_RECORDING_LOADED(name: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14649800469116238941)), name);
}
/// Full list of waypoint recordings by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/waypointRecordings.json
pub fn REMOVE_WAYPOINT_RECORDING(name: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18382439456700521928)), name);
}
/// Full list of waypoint recordings by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/waypointRecordings.json
/// For a full list of the points, see here: goo.gl/wIH0vn
pub fn WAYPOINT_RECORDING_GET_NUM_POINTS(name: [*c]const u8, points: [*c]c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5999730577058591284)), name, points);
}
/// Full list of waypoint recordings by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/waypointRecordings.json
/// For a full list of the points, see here: goo.gl/wIH0vn
pub fn WAYPOINT_RECORDING_GET_COORD(name: [*c]const u8, point: c_int, coord: [*c]types.Vector3) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(3438664618184061793)), name, point, coord);
}
/// Full list of waypoint recordings by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/waypointRecordings.json
pub fn WAYPOINT_RECORDING_GET_SPEED_AT_POINT(name: [*c]const u8, point: c_int) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(24244981874273449)), name, point);
}
/// Full list of waypoint recordings by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/waypointRecordings.json
/// For a full list of the points, see here: goo.gl/wIH0vn
pub fn WAYPOINT_RECORDING_GET_CLOSEST_WAYPOINT(name: [*c]const u8, x: f32, y: f32, z: f32, point: [*c]c_int) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(13126201362803033967)), name, x, y, z, point);
}
pub fn TASK_FOLLOW_WAYPOINT_RECORDING(ped: types.Ped, name: [*c]const u8, p2: c_int, p3: c_int, p4: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(529552391231721339)), ped, name, p2, p3, p4);
}
pub fn IS_WAYPOINT_PLAYBACK_GOING_ON_FOR_PED(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16157577551664225124)), ped);
}
pub fn GET_PED_WAYPOINT_PROGRESS(ped: types.Ped) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(2819441002312491156)), ped);
}
pub fn GET_PED_WAYPOINT_DISTANCE(p0: types.Any) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(16620666118384589765)), p0);
}
pub fn SET_PED_WAYPOINT_ROUTE_OFFSET(ped: types.Ped, x: f32, y: f32, z: f32) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(17120681420994176180)), ped, x, y, z);
}
pub fn GET_WAYPOINT_DISTANCE_ALONG_ROUTE(name: [*c]const u8, point: c_int) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(11941128409463383191)), name, point);
}
pub fn WAYPOINT_PLAYBACK_GET_IS_PAUSED(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8075927920486318539)), p0);
}
pub fn WAYPOINT_PLAYBACK_PAUSE(p0: types.Any, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(1095541594788396757)), p0, p1, p2);
}
pub fn WAYPOINT_PLAYBACK_RESUME(p0: types.Any, p1: windows.BOOL, p2: types.Any, p3: types.Any) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(2616433914101923117)), p0, p1, p2, p3);
}
pub fn WAYPOINT_PLAYBACK_OVERRIDE_SPEED(p0: types.Any, p1: f32, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(9042431214974701189)), p0, p1, p2);
}
pub fn WAYPOINT_PLAYBACK_USE_DEFAULT_SPEED(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7321120390089869312)), p0);
}
pub fn USE_WAYPOINT_RECORDING_AS_ASSISTED_MOVEMENT_ROUTE(name: [*c]const u8, p1: windows.BOOL, p2: f32, p3: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(6500167120046822837)), name, p1, p2, p3);
}
pub fn WAYPOINT_PLAYBACK_START_AIMING_AT_PED(ped: types.Ped, target: types.Ped, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2369791238929489193)), ped, target, p2);
}
pub fn WAYPOINT_PLAYBACK_START_AIMING_AT_COORD(ped: types.Ped, x: f32, y: f32, z: f32, p4: windows.BOOL) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(9901234207769680051)), ped, x, y, z, p4);
}
pub fn WAYPOINT_PLAYBACK_START_SHOOTING_AT_PED(ped: types.Ped, ped2: types.Ped, p2: windows.BOOL, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(16648584860776239324)), ped, ped2, p2, p3);
}
pub fn WAYPOINT_PLAYBACK_START_SHOOTING_AT_COORD(ped: types.Ped, x: f32, y: f32, z: f32, p4: windows.BOOL, firingPattern: types.Hash) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(394669491769685617)), ped, x, y, z, p4, firingPattern);
}
pub fn WAYPOINT_PLAYBACK_STOP_AIMING_OR_SHOOTING(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5183537896819843818)), ped);
}
/// Routes: "1_FIBStairs", "2_FIBStairs", "3_FIBStairs", "4_FIBStairs", "5_FIBStairs", "5_TowardsFire", "6a_FIBStairs", "7_FIBStairs", "8_FIBStairs", "Aprtmnt_1", "AssAfterLift", "ATM_1", "coroner2", "coroner_stairs", "f5_jimmy1", "fame1", "family5b", "family5c", "Family5d", "family5d", "FIB_Glass1", "FIB_Glass2", "FIB_Glass3", "finaBroute1A", "finalb1st", "finalB1sta", "finalbround", "finalbroute2", "Hairdresser1", "jan_foyet_ft_door", "Jo_3", "Lemar1", "Lemar2", "mansion_1", "Mansion_1", "pols_1", "pols_2", "pols_3", "pols_4", "pols_5", "pols_6", "pols_7", "pols_8", "Pro_S1", "Pro_S1a", "Pro_S2", "Towards_case", "trev_steps", "tunrs1", "tunrs2", "tunrs3", "Wave01457s"
pub fn ASSISTED_MOVEMENT_REQUEST_ROUTE(route: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9327632773940614266)), route);
}
pub fn ASSISTED_MOVEMENT_REMOVE_ROUTE(route: [*c]const u8) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3839410373541067051)), route);
}
pub fn ASSISTED_MOVEMENT_IS_ROUTE_LOADED(route: [*c]const u8) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6987796862537430849)), route);
}
pub fn ASSISTED_MOVEMENT_SET_ROUTE_PROPERTIES(route: [*c]const u8, props: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15348317526569659931)), route, props);
}
pub fn ASSISTED_MOVEMENT_OVERRIDE_LOAD_DISTANCE_THIS_FRAME(dist: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1410850791483177234)), dist);
}
/// p2 = Waypoint recording string (found in update\update.rpf\x64\levels\gta5\waypointrec.rpf
/// p3 = 786468
/// p4 = 0
/// p5 = 16
/// p6 = -1 (angle?)
/// p7/8/9 = usually v3.zero
/// p10 = bool (repeat?)
/// p11 = 1073741824
/// Full list of waypoint recordings by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/waypointRecordings.json
pub fn TASK_VEHICLE_FOLLOW_WAYPOINT_RECORDING(ped: types.Ped, vehicle: types.Vehicle, WPRecording: [*c]const u8, p3: c_int, p4: c_int, p5: c_int, p6: c_int, p7: f32, p8: windows.BOOL, p9: f32) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(3540949326590965741)), ped, vehicle, WPRecording, p3, p4, p5, p6, p7, p8, p9);
}
pub fn IS_WAYPOINT_PLAYBACK_GOING_ON_FOR_VEHICLE(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(17659539119890073228)), vehicle);
}
pub fn GET_VEHICLE_WAYPOINT_PROGRESS(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(10963116061220069721)), vehicle);
}
pub fn GET_VEHICLE_WAYPOINT_TARGET_POINT(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(4713969928189664189)), vehicle);
}
pub fn VEHICLE_WAYPOINT_PLAYBACK_PAUSE(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9966020413104745413)), vehicle);
}
pub fn VEHICLE_WAYPOINT_PLAYBACK_RESUME(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15854074397342684306)), vehicle);
}
pub fn VEHICLE_WAYPOINT_PLAYBACK_USE_DEFAULT_SPEED(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6695486673738041699)), vehicle);
}
pub fn VEHICLE_WAYPOINT_PLAYBACK_OVERRIDE_SPEED(vehicle: types.Vehicle, speed: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1305768549647921623)), vehicle, speed);
}
/// I cant believe I have to define this, this is one of the best natives.
/// It makes the ped ignore basically all shocking events around it. Occasionally the ped may comment or gesture, but other than that they just continue their daily activities. This includes shooting and wounding the ped. And - most importantly - they do not flee.
/// Since it is a task, every time the native is called the ped will stop for a moment.
pub fn TASK_SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10435426795485601129)), ped, toggle);
}
/// p2 always false
/// [30/03/2017] ins1de :
/// See FORCE_PED_MOTION_STATE
pub fn TASK_FORCE_MOTION_STATE(ped: types.Ped, state: types.Hash, forceRestart: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(5694078366121924523)), ped, state, forceRestart);
}
/// Example:
/// TASK::TASK_MOVE_NETWORK_BY_NAME(PLAYER::PLAYER_PED_ID(), "arm_wrestling_sweep_paired_a_rev3", 0.0f, true, "mini@arm_wrestling", 0);
/// Used to be known as _TASK_MOVE_NETWORK
pub fn TASK_MOVE_NETWORK_BY_NAME(ped: types.Ped, task: [*c]const u8, multiplier: f32, allowOverrideCloneUpdate: windows.BOOL, animDict: [*c]const u8, flags: c_int) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(3266090088685725238)), ped, task, multiplier, allowOverrideCloneUpdate, animDict, flags);
}
/// Example:
/// TASK::TASK_MOVE_NETWORK_ADVANCED_BY_NAME(PLAYER::PLAYER_PED_ID(), "minigame_tattoo_michael_parts", 324.13f, 181.29f, 102.6f, 0.0f, 0.0f, 22.32f, 2, 0, false, 0, 0);
/// Used to be known as _TASK_MOVE_NETWORK_ADVANCED
pub fn TASK_MOVE_NETWORK_ADVANCED_BY_NAME(ped: types.Ped, network: [*c]const u8, x: f32, y: f32, z: f32, rotX: f32, rotY: f32, rotZ: f32, rotOrder: c_int, blendDuration: f32, allowOverrideCloneUpdate: windows.BOOL, animDict: [*c]const u8, flags: c_int) void {
_ = nativeCaller.invoke13(@as(u64, @intCast(15398752612590394059)), ped, network, x, y, z, rotX, rotY, rotZ, rotOrder, blendDuration, allowOverrideCloneUpdate, animDict, flags);
}
/// Used only once in the scripts (am_mp_nightclub)
/// Used to be known as _TASK_MOVE_NETWORK_SCRIPTED
/// Used to be known as _TASK_MOVE_NETWORK_BY_NAME_WITH_INIT_PARAMS
pub fn TASK_MOVE_NETWORK_BY_NAME_WITH_INIT_PARAMS(ped: types.Ped, network: [*c]const u8, initialParameters: [*c]c_int, blendDuration: f32, allowOverrideCloneUpdate: windows.BOOL, animDict: [*c]const u8, flags: c_int) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(4415129293991305417)), ped, network, initialParameters, blendDuration, allowOverrideCloneUpdate, animDict, flags);
}
pub fn TASK_MOVE_NETWORK_ADVANCED_BY_NAME_WITH_INIT_PARAMS(ped: types.Ped, network: [*c]const u8, initialParameters: [*c]c_int, x: f32, y: f32, z: f32, rotX: f32, rotY: f32, rotZ: f32, rotOrder: c_int, blendDuration: f32, allowOverrideCloneUpdate: windows.BOOL, dictionary: [*c]const u8, flags: c_int) void {
_ = nativeCaller.invoke14(@as(u64, @intCast(2983685523121498549)), ped, network, initialParameters, x, y, z, rotX, rotY, rotZ, rotOrder, blendDuration, allowOverrideCloneUpdate, dictionary, flags);
}
pub fn IS_TASK_MOVE_NETWORK_ACTIVE(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10528537609198390337)), ped);
}
pub fn IS_TASK_MOVE_NETWORK_READY_FOR_TRANSITION(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3525624535481412151)), ped);
}
pub fn REQUEST_TASK_MOVE_NETWORK_STATE_TRANSITION(ped: types.Ped, name: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(14992507104788144502)), ped, name);
}
/// Used only once in the scripts (fm_mission_controller) like so:
/// TASK::SET_EXPECTED_CLONE_NEXT_TASK_MOVE_NETWORK_STATE(iLocal_3160, "Cutting");
pub fn SET_EXPECTED_CLONE_NEXT_TASK_MOVE_NETWORK_STATE(ped: types.Ped, state: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(12327378395246671577)), ped, state);
}
pub fn GET_TASK_MOVE_NETWORK_STATE(ped: types.Ped) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(8178058769432328045)), ped);
}
pub fn SET_TASK_MOVE_NETWORK_ANIM_SET(ped: types.Ped, clipSet: types.Hash, variableClipSet: types.Hash) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(9521546527352952201)), ped, clipSet, variableClipSet);
}
/// signalName - "Phase", "Wobble", "x_axis","y_axis","introphase","speed".
/// p2 - From what i can see it goes up to 1f (maybe).
/// Example: TASK::SET_TASK_MOVE_NETWORK_SIGNAL_FLOAT(PLAYER::PLAYER_PED_ID(), "Phase", 0.5);
/// Used to be known as _SET_TASK_PROPERTY_FLOAT
pub fn SET_TASK_MOVE_NETWORK_SIGNAL_FLOAT(ped: types.Ped, signalName: [*c]const u8, value: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(15400973881305242190)), ped, signalName, value);
}
/// Used to be known as _SET_TASK_MOVE_NETWORK_SIGNAL_FLOAT_2
pub fn SET_TASK_MOVE_NETWORK_SIGNAL_LOCAL_FLOAT(ped: types.Ped, signalName: [*c]const u8, value: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(3980887443223517091)), ped, signalName, value);
}
pub fn SET_TASK_MOVE_NETWORK_SIGNAL_FLOAT_LERP_RATE(ped: types.Ped, signalName: [*c]const u8, value: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(9670581840027424891)), ped, signalName, value);
}
/// Used to be known as _SET_TASK_PROPERTY_BOOL
pub fn SET_TASK_MOVE_NETWORK_SIGNAL_BOOL(ped: types.Ped, signalName: [*c]const u8, value: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(12729089900991484040)), ped, signalName, value);
}
/// Used to be known as _GET_TASK_MOVE_NETWORK_SIGNAL_FLOAT
pub fn GET_TASK_MOVE_NETWORK_SIGNAL_FLOAT(ped: types.Ped, signalName: [*c]const u8) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(4948060963607470658)), ped, signalName);
}
pub fn GET_TASK_MOVE_NETWORK_SIGNAL_BOOL(ped: types.Ped, signalName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(12105599148477820775)), ped, signalName);
}
pub fn GET_TASK_MOVE_NETWORK_EVENT(ped: types.Ped, eventName: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(13039172250820257356)), ped, eventName);
}
/// Doesn't actually return anything.
pub fn SET_TASK_MOVE_NETWORK_ENABLE_COLLISION_ON_NETWORK_CLONE_WHEN_FIXED(ped: types.Ped, enable: windows.BOOL) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(1151580605323675577)), ped, enable);
}
pub fn _SET_SCRIPT_TASK_ENABLE_COLLISION_ON_NETWORK_CLONE_WHEN_FIXED(ped: types.Ped, enable: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3672385261565199324)), ped, enable);
}
pub fn IS_MOVE_BLEND_RATIO_STILL(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3791159752754452828)), ped);
}
pub fn IS_MOVE_BLEND_RATIO_WALKING(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(17380441814118525215)), ped);
}
pub fn IS_MOVE_BLEND_RATIO_RUNNING(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15337117846544689465)), ped);
}
pub fn IS_MOVE_BLEND_RATIO_SPRINTING(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2639863049524614370)), ped);
}
pub fn IS_PED_STILL(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12405487600806068608)), ped);
}
pub fn IS_PED_WALKING(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16018204685783205658)), ped);
}
pub fn IS_PED_RUNNING(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14206728153055832226)), ped);
}
pub fn IS_PED_SPRINTING(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6333283514708902248)), ped);
}
/// What's strafing?
pub fn IS_PED_STRAFING(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16454885448303803913)), ped);
}
/// TASK::TASK_SYNCHRONIZED_SCENE(ped, scene, "creatures@rottweiler@in_vehicle@std_car", "get_in", 1000.0, -8.0, 4, 0, 0x447a0000, 0);
/// Full list of animation dictionaries and anims by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/animDictsCompact.json
pub fn TASK_SYNCHRONIZED_SCENE(ped: types.Ped, scene: c_int, animDictionary: [*c]const u8, animationName: [*c]const u8, blendIn: f32, blendOut: f32, flags: c_int, ragdollBlockingFlags: c_int, moverBlendDelta: f32, ikFlags: c_int) void {
_ = nativeCaller.invoke10(@as(u64, @intCast(17197321818494048340)), ped, scene, animDictionary, animationName, blendIn, blendOut, flags, ragdollBlockingFlags, moverBlendDelta, ikFlags);
}
/// Used to be known as TASK_AGITATED_ACTION
pub fn TASK_AGITATED_ACTION_CONFRONT_RESPONSE(ped: types.Ped, ped2: types.Ped) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1860469957888209150)), ped, ped2);
}
/// This function is called on peds in vehicles.
/// anim: animation name
/// p2, p3, p4: "sweep_low", "sweep_med" or "sweep_high"
/// p5: no idea what it does but is usually -1
pub fn TASK_SWEEP_AIM_ENTITY(ped: types.Ped, animDict: [*c]const u8, lowAnimName: [*c]const u8, medAnimName: [*c]const u8, hiAnimName: [*c]const u8, runtime: c_int, targetEntity: types.Entity, turnRate: f32, blendInDuration: f32) void {
_ = nativeCaller.invoke9(@as(u64, @intCast(2326038982017040474)), ped, animDict, lowAnimName, medAnimName, hiAnimName, runtime, targetEntity, turnRate, blendInDuration);
}
pub fn UPDATE_TASK_SWEEP_AIM_ENTITY(ped: types.Ped, entity: types.Entity) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16471702047283889331)), ped, entity);
}
pub fn TASK_SWEEP_AIM_POSITION(ped: types.Ped, animDict: [*c]const u8, lowAnimName: [*c]const u8, medAnimName: [*c]const u8, hiAnimName: [*c]const u8, runtime: c_int, x: f32, y: f32, z: f32, turnRate: f32, blendInDuration: f32) void {
_ = nativeCaller.invoke11(@as(u64, @intCast(8862679292048050130)), ped, animDict, lowAnimName, medAnimName, hiAnimName, runtime, x, y, z, turnRate, blendInDuration);
}
pub fn UPDATE_TASK_SWEEP_AIM_POSITION(ped: types.Ped, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(13479388600682422212)), ped, x, y, z);
}
/// Example from "me_amanda1.ysc.c4":
/// TASK::TASK_ARREST_PED(l_19F /* This is a Ped */ , PLAYER::PLAYER_PED_ID());
/// Example from "armenian1.ysc.c4":
/// if (!PED::IS_PED_INJURED(l_B18[0/*1*/])) {
/// TASK::TASK_ARREST_PED(l_B18[0/*1*/], PLAYER::PLAYER_PED_ID());
/// }
/// I would love to have time to experiment to see if a player Ped can arrest another Ped. Might make for a good cop mod.
/// Looks like only the player can be arrested this way. Peds react and try to arrest you if you task them, but the player charater doesn't do anything if tasked to arrest another ped.
pub fn TASK_ARREST_PED(ped: types.Ped, target: types.Ped) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17562252433449906865)), ped, target);
}
pub fn IS_PED_RUNNING_ARREST_TASK(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4451006101258455776)), ped);
}
/// This function is hard-coded to always return 0.
pub fn IS_PED_BEING_ARRESTED(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10421504610366576264)), ped);
}
pub fn UNCUFF_PED(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7440068821593357391)), ped);
}
pub fn IS_PED_CUFFED(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8423237306564019845)), ped);
}
};
pub const VEHICLE = struct {
/// p7 when set to true allows you to spawn vehicles under -100 z.
/// Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json
pub fn CREATE_VEHICLE(modelHash: types.Hash, x: f32, y: f32, z: f32, heading: f32, isNetwork: windows.BOOL, bScriptHostVeh: windows.BOOL, p7: windows.BOOL) types.Vehicle {
return nativeCaller.invoke8(@as(u64, @intCast(12625226732244324784)), modelHash, x, y, z, heading, isNetwork, bScriptHostVeh, p7);
}
/// Deletes a vehicle.
/// The vehicle must be a mission entity to delete, so call this before deleting: SET_ENTITY_AS_MISSION_ENTITY(vehicle, true, true);
/// eg how to use:
/// SET_ENTITY_AS_MISSION_ENTITY(vehicle, true, true);
/// DELETE_VEHICLE(&vehicle);
/// Deletes the specified vehicle, then sets the handle pointed to by the pointer to NULL.
pub fn DELETE_VEHICLE(vehicle: [*c]types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16877355631701828943)), vehicle);
}
pub fn SET_VEHICLE_ALLOW_HOMING_MISSLE_LOCKON(vehicle: types.Vehicle, toggle: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(9038612572300981920)), vehicle, toggle, p2);
}
/// Used to be known as _SET_VEHICLE_CAN_BE_LOCKED_ON
pub fn SET_VEHICLE_ALLOW_HOMING_MISSLE_LOCKON_SYNCED(vehicle: types.Vehicle, canBeLockedOn: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2151040074505494254)), vehicle, canBeLockedOn, p2);
}
/// Makes the vehicle accept no passengers.
pub fn SET_VEHICLE_ALLOW_NO_PASSENGERS_LOCKON(veh: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6707218932995881772)), veh, toggle);
}
/// Returns a value depending on the lock-on state of vehicle weapons.
/// 0: not locked on
/// 1: locking on
/// 2: locked on
pub fn GET_VEHICLE_HOMING_LOCKON_STATE(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(16623042203658435568)), vehicle);
}
pub fn GET_VEHICLE_HOMING_LOCKEDONTO_STATE(p0: types.Any) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(7974449729982181663)), p0);
}
pub fn SET_VEHICLE_HOMING_LOCKEDONTO_STATE(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4647087997143065811)), p0, p1);
}
pub fn IS_VEHICLE_MODEL(vehicle: types.Vehicle, model: types.Hash) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(4773408663263202697)), vehicle, model);
}
pub fn DOES_SCRIPT_VEHICLE_GENERATOR_EXIST(vehicleGenerator: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(17728538440791754870)), vehicleGenerator);
}
/// Creates a script vehicle generator at the given coordinates. Most parameters after the model hash are unknown.
/// Parameters:
/// x/y/z - Generator position
/// heading - Generator heading
/// p4 - Unknown (always 5.0)
/// p5 - Unknown (always 3.0)
/// modelHash - Vehicle model hash
/// p7/8/9/10 - Unknown (always -1)
/// p11 - Unknown (usually TRUE, only one instance of FALSE)
/// p12/13 - Unknown (always FALSE)
/// p14 - Unknown (usally FALSE, only two instances of TRUE)
/// p15 - Unknown (always TRUE)
/// p16 - Unknown (always -1)
/// Vector3 coords = GET_ENTITY_COORDS(PLAYER_PED_ID(), 0); CREATE_SCRIPT_VEHICLE_GENERATOR(coords.x, coords.y, coords.z, 1.0f, 5.0f, 3.0f, GET_HASH_KEY("adder"), -1. -1, -1, -1, -1, true, false, false, false, true, -1);
pub fn CREATE_SCRIPT_VEHICLE_GENERATOR(x: f32, y: f32, z: f32, heading: f32, p4: f32, p5: f32, modelHash: types.Hash, p7: c_int, p8: c_int, p9: c_int, p10: c_int, p11: windows.BOOL, p12: windows.BOOL, p13: windows.BOOL, p14: windows.BOOL, p15: windows.BOOL, p16: c_int) c_int {
return nativeCaller.invoke17(@as(u64, @intCast(11380464527765569814)), x, y, z, heading, p4, p5, modelHash, p7, p8, p9, p10, p11, p12, p13, p14, p15, p16);
}
pub fn DELETE_SCRIPT_VEHICLE_GENERATOR(vehicleGenerator: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2454510840071524957)), vehicleGenerator);
}
/// Only called once in the decompiled scripts. Presumably activates the specified generator.
pub fn SET_SCRIPT_VEHICLE_GENERATOR(vehicleGenerator: c_int, enabled: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15696769700584080560)), vehicleGenerator, enabled);
}
/// When p6 is true, vehicle generators are active.
/// p7 seems to always be true in story mode scripts, but it's sometimes false in online scripts.
pub fn SET_ALL_VEHICLE_GENERATORS_ACTIVE_IN_AREA(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, toggle: windows.BOOL, p7: windows.BOOL) void {
_ = nativeCaller.invoke8(@as(u64, @intCast(13917004117723053645)), x1, y1, z1, x2, y2, z2, toggle, p7);
}
pub fn SET_ALL_VEHICLE_GENERATORS_ACTIVE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(3795840726385927356)));
}
pub fn SET_ALL_LOW_PRIORITY_VEHICLE_GENERATORS_ACTIVE(active: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6954129466167359612)), active);
}
/// Related to car generators & CPlayerSwitchMgrLong
pub fn SET_VEHICLE_GENERATOR_AREA_OF_INTEREST(x: f32, y: f32, z: f32, radius: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(11129899222162558893)), x, y, z, radius);
}
pub fn CLEAR_VEHICLE_GENERATOR_AREA_OF_INTEREST() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(739552988220189972)));
}
/// Sets a vehicle on the ground on all wheels. Returns whether or not the operation was successful.
/// sfink: This has an additional param(Vehicle vehicle, float p1) which is always set to 5.0f in the b944 scripts.
pub fn SET_VEHICLE_ON_GROUND_PROPERLY(vehicle: types.Vehicle, p1: f32) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5292642784517372369)), vehicle, p1);
}
/// Used to be known as SET_ALL_VEHICLES_SPAWN
pub fn SET_VEHICLE_USE_CUTSCENE_WHEEL_COMPRESSION(p0: types.Vehicle, p1: windows.BOOL, p2: windows.BOOL, p3: windows.BOOL) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(16151008515437609239)), p0, p1, p2, p3);
}
pub fn IS_VEHICLE_STUCK_ON_ROOF(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13013133991342886879)), vehicle);
}
pub fn ADD_VEHICLE_UPSIDEDOWN_CHECK(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13199530267293122651)), vehicle);
}
pub fn REMOVE_VEHICLE_UPSIDEDOWN_CHECK(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14212995567744351888)), vehicle);
}
/// Returns true if the vehicle's current speed is less than, or equal to 0.0025f.
/// For some vehicles it returns true if the current speed is <= 0.00039999999.
pub fn IS_VEHICLE_STOPPED(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6278497493873644922)), vehicle);
}
/// Gets the number of passengers.
/// This native was modified in b2545 to take two additional parameters, allowing you to include the driver or exclude dead passengers.
/// To keep it working like before b2545, set includeDriver to false and includeDeadOccupants to true.
pub fn GET_VEHICLE_NUMBER_OF_PASSENGERS(vehicle: types.Vehicle, includeDriver: windows.BOOL, includeDeadOccupants: windows.BOOL) c_int {
return nativeCaller.invoke3(@as(u64, @intCast(2651249327676063369)), vehicle, includeDriver, includeDeadOccupants);
}
pub fn GET_VEHICLE_MAX_NUMBER_OF_PASSENGERS(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(12089054235866735952)), vehicle);
}
/// Returns max number of passengers (including the driver) for the specified vehicle model.
/// Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json
/// Used to be known as _GET_VEHICLE_MODEL_MAX_NUMBER_OF_PASSENGERS
pub fn GET_VEHICLE_MODEL_NUMBER_OF_SEATS(modelHash: types.Hash) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(3087559591220014500)), modelHash);
}
pub fn IS_SEAT_WARP_ONLY(vehicle: types.Vehicle, seatIndex: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(17866346945754625697)), vehicle, seatIndex);
}
pub fn IS_TURRET_SEAT(vehicle: types.Vehicle, seatIndex: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(16375082268351744128)), vehicle, seatIndex);
}
/// Returns true if the vehicle has the FLAG_ALLOWS_RAPPEL flag set.
/// Used to be known as _DOES_VEHICLE_ALLOW_RAPPEL
pub fn DOES_VEHICLE_ALLOW_RAPPEL(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5638924910568065101)), vehicle);
}
/// Use this native inside a looped function.
/// Values:
/// - `0.0` = no vehicles on streets
/// - `1.0` = normal vehicles on streets
pub fn SET_VEHICLE_DENSITY_MULTIPLIER_THIS_FRAME(multiplier: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2619521048766764343)), multiplier);
}
pub fn SET_RANDOM_VEHICLE_DENSITY_MULTIPLIER_THIS_FRAME(multiplier: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12948752261143492563)), multiplier);
}
pub fn SET_PARKED_VEHICLE_DENSITY_MULTIPLIER_THIS_FRAME(multiplier: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16926459000783100701)), multiplier);
}
/// Used to be known as _SET_SOMETHING_MULTIPLIER_THIS_FRAME
pub fn SET_DISABLE_RANDOM_TRAINS_THIS_FRAME(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15328251820983961707)), toggle);
}
/// Used to be known as _SET_SOME_VEHICLE_DENSITY_MULTIPLIER_THIS_FRAME
pub fn SET_AMBIENT_VEHICLE_RANGE_MULTIPLIER_THIS_FRAME(value: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10427762177004414426)), value);
}
pub fn SET_FAR_DRAW_VEHICLES(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2752349403850161347)), toggle);
}
pub fn SET_NUMBER_OF_PARKED_VEHICLES(value: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14601056006077421567)), value);
}
/// enum eVehicleLockState
/// {
/// VEHICLELOCK_NONE,
/// VEHICLELOCK_UNLOCKED,
/// VEHICLELOCK_LOCKED,
/// VEHICLELOCK_LOCKOUT_PLAYER_ONLY,
/// VEHICLELOCK_LOCKED_PLAYER_INSIDE,
/// VEHICLELOCK_LOCKED_INITIALLY,
/// VEHICLELOCK_FORCE_SHUT_DOORS,
/// VEHICLELOCK_LOCKED_BUT_CAN_BE_DAMAGED,
/// VEHICLELOCK_LOCKED_BUT_BOOT_UNLOCKED,
/// VEHICLELOCK_LOCKED_NO_PASSENGERS,
/// VEHICLELOCK_CANNOT_ENTER
/// };
pub fn SET_VEHICLE_DOORS_LOCKED(vehicle: types.Vehicle, doorLockStatus: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13142674893052018598)), vehicle, doorLockStatus);
}
/// doorId: see SET_VEHICLE_DOOR_SHUT
/// Used to be known as SET_PED_TARGETTABLE_VEHICLE_DESTROY
/// Used to be known as _SET_VEHICLE_DOOR_DESTROY_TYPE
pub fn SET_VEHICLE_INDIVIDUAL_DOORS_LOCKED(vehicle: types.Vehicle, doorId: c_int, doorLockStatus: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(13722593684471962573)), vehicle, doorId, doorLockStatus);
}
/// If set to true, prevents vehicle sirens from having sound, leaving only the lights.
/// Used to be known as DISABLE_VEHICLE_IMPACT_EXPLOSION_ACTIVATION
/// Used to be known as _SET_DISABLE_VEHICLE_SIREN_SOUND
pub fn SET_VEHICLE_HAS_MUTED_SIRENS(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15565863143422620276)), vehicle, toggle);
}
pub fn SET_VEHICLE_DOORS_LOCKED_FOR_PLAYER(vehicle: types.Vehicle, player: types.Player, toggle: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(5871197926712478929)), vehicle, player, toggle);
}
pub fn GET_VEHICLE_DOORS_LOCKED_FOR_PLAYER(vehicle: types.Vehicle, player: types.Player) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(17775545771403546645)), vehicle, player);
}
/// After some analysis, I've decided that these are what the parameters are.
/// We can see this being used in R* scripts such as "am_mp_property_int.ysc.c4":
/// l_11A1 = PED::GET_VEHICLE_PED_IS_IN(PLAYER::PLAYER_PED_ID(), 1);
/// ...
/// VEHICLE::SET_VEHICLE_DOORS_LOCKED_FOR_ALL_PLAYERS(l_11A1, 1);
pub fn SET_VEHICLE_DOORS_LOCKED_FOR_ALL_PLAYERS(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11743148728654440396)), vehicle, toggle);
}
pub fn SET_VEHICLE_DOORS_LOCKED_FOR_NON_SCRIPT_PLAYERS(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10896357530094567029)), vehicle, toggle);
}
pub fn SET_VEHICLE_DOORS_LOCKED_FOR_TEAM(vehicle: types.Vehicle, team: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(13267443194257140648)), vehicle, team, toggle);
}
/// Used to be known as _SET_VEHICLE_DOORS_LOCKED_FOR_UNK
pub fn SET_VEHICLE_DOORS_LOCKED_FOR_ALL_TEAMS(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2322540730124832844)), vehicle, toggle);
}
pub fn SET_VEHICLE_DONT_TERMINATE_TASK_WHEN_ACHIEVED(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8562022537810052254)), vehicle);
}
/// 0.0f = engine rev minimum
/// 1.0f = engine rev limit
pub fn _SET_VEHICLE_MAX_LAUNCH_ENGINE_REVS(vehicle: types.Vehicle, modifier: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6549945714686678051)), vehicle, modifier);
}
pub fn _GET_VEHICLE_THROTTLE(vehicle: types.Vehicle) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(10581603779986501410)), vehicle);
}
/// Explodes a selected vehicle.
/// Vehicle vehicle = Vehicle you want to explode.
/// BOOL isAudible = If explosion makes a sound.
/// BOOL isInvisible = If the explosion is invisible or not.
/// First BOOL does not give any visual explosion, the vehicle just falls apart completely but slowly and starts to burn.
pub fn EXPLODE_VEHICLE(vehicle: types.Vehicle, isAudible: windows.BOOL, isInvisible: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(13434538314134409548)), vehicle, isAudible, isInvisible);
}
/// Tested on the player's current vehicle. Unless you kill the driver, the vehicle doesn't loose control, however, if enabled, explodeOnImpact is still active. The moment you crash, boom.
pub fn SET_VEHICLE_OUT_OF_CONTROL(vehicle: types.Vehicle, killDriver: windows.BOOL, explodeOnImpact: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(17410082034936983756)), vehicle, killDriver, explodeOnImpact);
}
pub fn SET_VEHICLE_TIMED_EXPLOSION(vehicle: types.Vehicle, ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(3317592585230581937)), vehicle, ped, toggle);
}
pub fn ADD_VEHICLE_PHONE_EXPLOSIVE_DEVICE(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11073591500803197897)), vehicle);
}
/// Used to be known as _CLEAR_VEHICLE_PHONE_EXPLOSIVE_DEVICE
pub fn CLEAR_VEHICLE_PHONE_EXPLOSIVE_DEVICE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(12267651018428051999)));
}
pub fn HAS_VEHICLE_PHONE_EXPLOSIVE_DEVICE() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(7699655435779592757)));
}
/// Used to be known as _REQUEST_VEHICLE_PHONE_EXPLOSION
pub fn DETONATE_VEHICLE_PHONE_EXPLOSIVE_DEVICE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(17242540257743764670)));
}
pub fn HAVE_VEHICLE_REAR_DOORS_BEEN_BLOWN_OPEN_BY_STICKYBOMB(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7728316758094329412)), vehicle);
}
/// This is not tested - it's just an assumption.
/// - Nac
/// Doesn't seem to work. I'll try with an int instead. --JT
/// Read the scripts, im dumpass.
/// if (!VEHICLE::IS_TAXI_LIGHT_ON(l_115)) {
/// VEHICLE::SET_TAXI_LIGHTS(l_115, 1);
/// }
pub fn SET_TAXI_LIGHTS(vehicle: types.Vehicle, state: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6451410762761259225)), vehicle, state);
}
pub fn IS_TAXI_LIGHT_ON(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8432076543994056956)), vehicle);
}
/// garageName example "Michael - Beverly Hills"
/// Full list of garages by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/garages.json
pub fn IS_VEHICLE_IN_GARAGE_AREA(garageName: [*c]const u8, vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(14908120985973273538)), garageName, vehicle);
}
/// colorPrimary & colorSecondary are the paint index for the vehicle.
/// For a list of valid paint indexes, view: https://pastebin.com/pwHci0xK
/// -------------------------------------------------------------------------
/// Note: minimum color index is 0, maximum color index is (numColorIndices - 1)
/// Full list of vehicle colors by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicleColors.json
pub fn SET_VEHICLE_COLOURS(vehicle: types.Vehicle, colorPrimary: c_int, colorSecondary: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(5700796144468248065)), vehicle, colorPrimary, colorSecondary);
}
/// It switch to highbeam when p1 is set to true.
pub fn SET_VEHICLE_FULLBEAM(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10051990933519155742)), vehicle, toggle);
}
/// p1 (toggle) was always 1 (true) except in one case in the b678 scripts.
/// Used to be known as STEER_UNLOCK_BIAS
pub fn SET_VEHICLE_IS_RACING(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(509309337690280605)), vehicle, toggle);
}
/// p1, p2, p3 are RGB values for color (255,0,0 for Red, ect)
pub fn SET_VEHICLE_CUSTOM_PRIMARY_COLOUR(vehicle: types.Vehicle, r: c_int, g: c_int, b: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(8160934221331913706)), vehicle, r, g, b);
}
pub fn GET_VEHICLE_CUSTOM_PRIMARY_COLOUR(vehicle: types.Vehicle, r: [*c]c_int, g: [*c]c_int, b: [*c]c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(13136141173969739602)), vehicle, r, g, b);
}
pub fn CLEAR_VEHICLE_CUSTOM_PRIMARY_COLOUR(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6188458765339386935)), vehicle);
}
pub fn GET_IS_VEHICLE_PRIMARY_COLOUR_CUSTOM(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(17335973723136045595)), vehicle);
}
/// p1, p2, p3 are RGB values for color (255,0,0 for Red, ect)
pub fn SET_VEHICLE_CUSTOM_SECONDARY_COLOUR(vehicle: types.Vehicle, r: c_int, g: c_int, b: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(3949330575929153364)), vehicle, r, g, b);
}
pub fn GET_VEHICLE_CUSTOM_SECONDARY_COLOUR(vehicle: types.Vehicle, r: [*c]c_int, g: [*c]c_int, b: [*c]c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(9478332663426216668)), vehicle, r, g, b);
}
pub fn CLEAR_VEHICLE_CUSTOM_SECONDARY_COLOUR(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6916366759000678409)), vehicle);
}
/// Check if Vehicle Secondary is avaliable for customize
pub fn GET_IS_VEHICLE_SECONDARY_COLOUR_CUSTOM(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10451221855851406700)), vehicle);
}
/// The parameter fade is a value from 0-1, where 0 is fresh paint.
/// Used to be known as _SET_VEHICLE_PAINT_FADE
pub fn SET_VEHICLE_ENVEFF_SCALE(vehicle: types.Vehicle, fade: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4250770462311716468)), vehicle, fade);
}
/// The result is a value from 0-1, where 0 is fresh paint.
/// Used to be known as _GET_VEHICLE_PAINT_FADE
pub fn GET_VEHICLE_ENVEFF_SCALE(vehicle: types.Vehicle) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(12116963156199523331)), vehicle);
}
/// Hardcoded to not work in multiplayer.
pub fn SET_CAN_RESPRAY_VEHICLE(vehicle: types.Vehicle, state: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5961537328538620758)), vehicle, state);
}
/// Used for GTAO CEO/Associate spawned vehicles.
pub fn SET_GOON_BOSS_VEHICLE(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12335903972203171049)), vehicle, toggle);
}
pub fn SET_OPEN_REAR_DOORS_ON_EXPLOSION(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1954891159175955679)), vehicle, toggle);
}
pub fn FORCE_SUBMARINE_SURFACE_MODE(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3697570207336415455)), vehicle, toggle);
}
pub fn FORCE_SUBMARINE_NEURTAL_BUOYANCY(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14302782642363163582)), p0, p1);
}
/// Used to be known as _JITTER_VEHICLE
pub fn SET_SUBMARINE_CRUSH_DEPTHS(vehicle: types.Vehicle, p1: windows.BOOL, depth1: f32, depth2: f32, depth3: f32) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(14238256275250510279)), vehicle, p1, depth1, depth2, depth3);
}
/// Used to be known as _GET_SUBMARINE_IS_BELOW_FIRST_CRUSH_DEPTH
pub fn GET_SUBMARINE_IS_UNDER_DESIGN_DEPTH(submarine: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4499606969949596281)), submarine);
}
/// Used to be known as _GET_SUBMARINE_CRUSH_DEPTH_WARNING_STATE
pub fn GET_SUBMARINE_NUMBER_OF_AIR_LEAKS(submarine: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(665809114361297838)), submarine);
}
pub fn SET_BOAT_IGNORE_LAND_PROBES(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17104353206720676809)), p0, p1);
}
/// Use the vehicle bounds (instead of viewport) when deciding if a vehicle is sufficiently above the water (waterheight.dat), bypassing wave simulation checks
pub fn _SET_BOUNDS_AFFECT_WATER_PROBES(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9654755800810044897)), vehicle, toggle);
}
pub fn SET_BOAT_ANCHOR(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8492641107122760976)), vehicle, toggle);
}
/// Used to be known as _GET_BOAT_ANCHOR
/// Used to be known as _CAN_BOAT_BE_ANCHORED
pub fn CAN_ANCHOR_BOAT_HERE(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2792529512651097147)), vehicle);
}
/// Used to be known as _CAN_BOAT_BE_ANCHORED_2
/// Used to be known as _CAN_ANCHOR_BOAT_HERE_2
pub fn CAN_ANCHOR_BOAT_HERE_IGNORE_PLAYERS(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2662773195569338496)), vehicle);
}
/// Used to be known as _SET_BOAT_FROZEN_WHEN_ANCHORED
pub fn SET_BOAT_REMAINS_ANCHORED_WHILE_PLAYER_IS_DRIVER(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16423408364588467504)), vehicle, toggle);
}
/// No observed effect.
pub fn SET_FORCE_LOW_LOD_ANCHOR_MODE(vehicle: types.Vehicle, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12865411832137766901)), vehicle, p1);
}
/// Used to be known as _SET_BOAT_ANCHOR_BUOYANCY_COEFFICIENT
/// Used to be known as _SET_BOAT_MOVEMENT_RESISTANCE
pub fn SET_BOAT_LOW_LOD_ANCHOR_DISTANCE(vehicle: types.Vehicle, value: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16736125229695876482)), vehicle, value);
}
/// Used to be known as _IS_BOAT_ANCHORED_AND_FROZEN
pub fn IS_BOAT_ANCHORED(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12730851756176159138)), vehicle);
}
/// Used to be known as _SET_BOAT_EXPLODES_ON_WRECKED_ACTION
pub fn SET_BOAT_SINKS_WHEN_WRECKED(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10336211342771641250)), vehicle, toggle);
}
/// Used to be known as _SET_BOAT_SINKING
/// Used to be known as _SET_BOAT_IS_SINKING
pub fn SET_BOAT_WRECKED(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13633210168762965458)), vehicle);
}
/// Activate siren on vehicle (Only works if the vehicle has a siren).
pub fn SET_VEHICLE_SIREN(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17623225488012915581)), vehicle, toggle);
}
pub fn IS_VEHICLE_SIREN_ON(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5520275388034856114)), vehicle);
}
/// Used to be known as _IS_VEHICLE_SIREN_SOUND_ON
pub fn IS_VEHICLE_SIREN_AUDIO_ON(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13099916866306466688)), vehicle);
}
/// If set to true, vehicle will not take crash damage, but is still susceptible to damage from bullets and explosives
pub fn SET_VEHICLE_STRONG(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4507125931233151499)), vehicle, toggle);
}
pub fn REMOVE_VEHICLE_STUCK_CHECK(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9477473254601942857)), vehicle);
}
pub fn GET_VEHICLE_COLOURS(vehicle: types.Vehicle, colorPrimary: [*c]c_int, colorSecondary: [*c]c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(11642990248343929260)), vehicle, colorPrimary, colorSecondary);
}
/// Check if a vehicle seat is free.
/// seatIndex = -1 being the driver seat.
/// Use GET_VEHICLE_MAX_NUMBER_OF_PASSENGERS(vehicle) - 1 for last seat index.
/// isTaskRunning = on true the function returns already false while a task on the target seat is running (TASK_ENTER_VEHICLE/TASK_SHUFFLE_TO_NEXT_VEHICLE_SEAT) - on false only when a ped is finally sitting in the seat.
pub fn IS_VEHICLE_SEAT_FREE(vehicle: types.Vehicle, seatIndex: c_int, isTaskRunning: windows.BOOL) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(2498470473267324521)), vehicle, seatIndex, isTaskRunning);
}
/// If there is no ped in the seat, and the game considers the vehicle as ambient population, this will create a random occupant ped in the seat, which may be cleaned up by the game fairly soon if not marked as script-owned mission entity.
/// Seat indexes:
/// -1 = Driver
/// 0 = Front Right Passenger
/// 1 = Back Left Passenger
/// 2 = Back Right Passenger
/// 3 = Further Back Left Passenger (vehicles > 4 seats)
/// 4 = Further Back Right Passenger (vehicles > 4 seats)
/// etc.
/// If p2 is true it uses a different GetOccupant function.
pub fn GET_PED_IN_VEHICLE_SEAT(vehicle: types.Vehicle, seatIndex: c_int, p2: windows.BOOL) types.Ped {
return nativeCaller.invoke3(@as(u64, @intCast(13493027623591629670)), vehicle, seatIndex, p2);
}
pub fn GET_LAST_PED_IN_VEHICLE_SEAT(vehicle: types.Vehicle, seatIndex: c_int) types.Ped {
return nativeCaller.invoke2(@as(u64, @intCast(9509748267553039972)), vehicle, seatIndex);
}
pub fn GET_VEHICLE_LIGHTS_STATE(vehicle: types.Vehicle, lightsOn: [*c]windows.BOOL, highbeamsOn: [*c]windows.BOOL) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(13338338421850755375)), vehicle, lightsOn, highbeamsOn);
}
/// wheelID used for 4 wheelers seem to be (0, 1, 4, 5)
/// completely - is to check if tire completely gone from rim.
/// '0 = wheel_lf / bike, plane or jet front
/// '1 = wheel_rf
/// '2 = wheel_lm / in 6 wheels trailer, plane or jet is first one on left
/// '3 = wheel_rm / in 6 wheels trailer, plane or jet is first one on right
/// '4 = wheel_lr / bike rear / in 6 wheels trailer, plane or jet is last one on left
/// '5 = wheel_rr / in 6 wheels trailer, plane or jet is last one on right
/// '45 = 6 wheels trailer mid wheel left
/// '47 = 6 wheels trailer mid wheel right
pub fn IS_VEHICLE_TYRE_BURST(vehicle: types.Vehicle, wheelID: c_int, completely: windows.BOOL) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(13414279665309277353)), vehicle, wheelID, completely);
}
/// SCALE: Setting the speed to 30 would result in a speed of roughly 60mph, according to speedometer.
/// Speed is in meters per second
/// You can convert meters/s to mph here:
/// http://www.calculateme.com/Speed/MetersperSecond/ToMilesperHour.htm
pub fn SET_VEHICLE_FORWARD_SPEED(vehicle: types.Vehicle, speed: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12345673040874251733)), vehicle, speed);
}
/// Seems to be identical to SET_VEHICLE_FORWARD_SPEED
pub fn SET_VEHICLE_FORWARD_SPEED_XY(vehicle: types.Vehicle, speed: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7278118936683477509)), vehicle, speed);
}
/// This native makes the vehicle stop immediately, as happens when we enter a MP garage.
/// . distance defines how far it will travel until stopping. Garage doors use 3.0.
/// . If killEngine is set to 1, you cannot resume driving the vehicle once it stops. This looks like is a bitmapped integer.
/// Used to be known as _SET_VEHICLE_HALT
pub fn BRING_VEHICLE_TO_HALT(vehicle: types.Vehicle, distance: f32, duration: c_int, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(2741540918328977952)), vehicle, distance, duration, p3);
}
pub fn SET_VEHICLE_STEER_FOR_BUILDINGS(vehicle: types.Vehicle, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15918390557941869512)), vehicle, p1);
}
pub fn SET_VEHICLE_CAUSES_SWERVING(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10973546217508846796)), vehicle, toggle);
}
pub fn SET_IGNORE_PLANES_SMALL_PITCH_CHANGE(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9683890451700368550)), p0, p1);
}
/// Stops CTaskBringVehicleToHalt
/// Used to be known as _STOP_BRING_VEHICLE_TO_HALT
pub fn STOP_BRINGING_VEHICLE_TO_HALT(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8936886637159913518)), vehicle);
}
/// Returns true if vehicle is halted by BRING_VEHICLE_TO_HALT
/// Used to be known as _IS_VEHICLE_BEING_HALTED
pub fn IS_VEHICLE_BEING_BROUGHT_TO_HALT(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14311227783020744943)), vehicle);
}
pub fn LOWER_FORKLIFT_FORKS(forklift: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10536779578848789733)), forklift);
}
/// 0.0 = Lowest 1.0 = Highest. This is best to be used if you wanna pick-up a car since un-realistically on GTA V forklifts can't pick up much of anything due to vehicle mass. If you put this under a car then set it above 0.0 to a 'lifted-value' it will raise the car with no issue lol
pub fn SET_FORKLIFT_FORK_HEIGHT(vehicle: types.Vehicle, height: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4029524509185632805)), vehicle, height);
}
/// Used to be known as SET_PED_ENABLED_BIKE_RINGTONE
/// Used to be known as _IS_VEHICLE_NEAR_ENTITY
pub fn IS_ENTITY_ATTACHED_TO_HANDLER_FRAME(vehicle: types.Vehicle, entity: types.Entity) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(6300915648399759277)), vehicle, entity);
}
pub fn IS_ANY_ENTITY_ATTACHED_TO_HANDLER_FRAME(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7118528237038425681)), vehicle);
}
/// Finds the vehicle that is carrying this entity with a handler frame.
/// The model of the entity must be prop_contr_03b_ld or the function will return 0.
/// Used to be known as _GET_VEHICLE_ATTACHED_TO_ENTITY
/// Used to be known as _FIND_VEHICLE_CARRYING_THIS_ENTITY
pub fn FIND_HANDLER_VEHICLE_CONTAINER_IS_ATTACHED_TO(entity: types.Entity) types.Vehicle {
return nativeCaller.invoke1(@as(u64, @intCast(3989766801014769835)), entity);
}
/// Used to be known as _IS_HANDLER_FRAME_ABOVE_CONTAINER
pub fn IS_HANDLER_FRAME_LINED_UP_WITH_CONTAINER(vehicle: types.Vehicle, entity: types.Entity) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(9932179695416732963)), vehicle, entity);
}
pub fn ATTACH_CONTAINER_TO_HANDLER_FRAME_WHEN_LINED_UP(vehicle: types.Vehicle, entity: types.Entity) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7681103487467234772)), vehicle, entity);
}
pub fn DETACH_CONTAINER_FROM_HANDLER_FRAME(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8935216418893608636)), vehicle);
}
pub fn SET_VEHICLE_DISABLE_HEIGHT_MAP_AVOIDANCE(vehicle: types.Vehicle, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9991543696220151109)), vehicle, p1);
}
pub fn SET_BOAT_DISABLE_AVOIDANCE(vehicle: types.Vehicle, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(750455852747783536)), vehicle, p1);
}
pub fn IS_HELI_LANDING_AREA_BLOCKED(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7152077347623556470)), vehicle);
}
/// Used on helicopters and blimps during the CTaskVehicleLand task. Sets a value on the task to 10f
pub fn SET_SHORT_SLOWDOWN_FOR_LANDING(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1187339781137647529)), vehicle);
}
pub fn SET_HELI_TURBULENCE_SCALAR(vehicle: types.Vehicle, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16641144020667700442)), vehicle, p1);
}
/// Initially used in Max Payne 3, that's why we know the name.
pub fn SET_CAR_BOOT_OPEN(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(18176752360889296764)), vehicle);
}
/// "To burst tyres VEHICLE::SET_VEHICLE_TYRE_BURST(vehicle, 0, true, 1000.0)
/// to burst all tyres type it 8 times where p1 = 0 to 7.
/// p3 seems to be how much damage it has taken. 0 doesn't deflate them, 1000 completely deflates them.
/// '0 = wheel_lf / bike, plane or jet front
/// '1 = wheel_rf
/// '2 = wheel_lm / in 6 wheels trailer, plane or jet is first one on left
/// '3 = wheel_rm / in 6 wheels trailer, plane or jet is first one on right
/// '4 = wheel_lr / bike rear / in 6 wheels trailer, plane or jet is last one on left
/// '5 = wheel_rr / in 6 wheels trailer, plane or jet is last one on right
/// '45 = 6 wheels trailer mid wheel left
/// '47 = 6 wheels trailer mid wheel right
pub fn SET_VEHICLE_TYRE_BURST(vehicle: types.Vehicle, index: c_int, onRim: windows.BOOL, p3: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(17035463926257943429)), vehicle, index, onRim, p3);
}
/// Closes all doors of a vehicle:
pub fn SET_VEHICLE_DOORS_SHUT(vehicle: types.Vehicle, closeInstantly: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8654578603176050421)), vehicle, closeInstantly);
}
/// Allows you to toggle bulletproof tires.
pub fn SET_VEHICLE_TYRES_CAN_BURST(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16977941433352285254)), vehicle, toggle);
}
pub fn GET_VEHICLE_TYRES_CAN_BURST(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7461228425533296619)), vehicle);
}
pub fn SET_VEHICLE_WHEELS_CAN_BREAK(vehicle: types.Vehicle, enabled: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3004335601414621839)), vehicle, enabled);
}
/// doorId: see SET_VEHICLE_DOOR_SHUT
pub fn SET_VEHICLE_DOOR_OPEN(vehicle: types.Vehicle, doorId: c_int, loose: windows.BOOL, openInstantly: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(8963811182594345058)), vehicle, doorId, loose, openInstantly);
}
/// doorId: see SET_VEHICLE_DOOR_SHUT
/// Usually used alongside other vehicle door natives.
pub fn SET_VEHICLE_DOOR_AUTO_LOCK(vehicle: types.Vehicle, doorId: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(4270975794827988744)), vehicle, doorId, toggle);
}
pub fn SET_FLEEING_VEHICLES_USE_SWITCHED_OFF_NODES(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11693589762414217262)), p0);
}
/// windowIndex:
/// 0 = Front Right Window
/// 1 = Front Left Window
/// 2 = Back Right Window
/// 3 = Back Left Window
/// 4 = Unknown
/// 5 = Unknown
/// 6 = Windscreen
/// 7 = Rear Windscreen
pub fn REMOVE_VEHICLE_WINDOW(vehicle: types.Vehicle, windowIndex: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12038498450811400297)), vehicle, windowIndex);
}
/// Roll down all the windows of the vehicle passed through the first parameter.
pub fn ROLL_DOWN_WINDOWS(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9617836149684691286)), vehicle);
}
/// windowIndex:
/// 0 = Front Left Window
/// 1 = Front Right Window
/// 2 = Rear Left Window
/// 3 = Rear Right Window
/// 4 = Front Windscreen
/// 5 = Rear Windscreen
/// 6 = Mid Left
/// 7 = Mid Right
/// 8 = Invalid
pub fn ROLL_DOWN_WINDOW(vehicle: types.Vehicle, windowIndex: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8852360316713789923)), vehicle, windowIndex);
}
/// windowIndex:
/// 0 = Front Left Window
/// 1 = Front Right Window
/// 2 = Rear Left Window
/// 3 = Rear Right Window
/// 4 = Front Windscreen
/// 5 = Rear Windscreen
/// 6 = Mid Left
/// 7 = Mid Right
/// 8 = Invalid
pub fn ROLL_UP_WINDOW(vehicle: types.Vehicle, windowIndex: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6930569850916064601)), vehicle, windowIndex);
}
/// windowIndex:
/// 0 = Front Left Window
/// 1 = Front Right Window
/// 2 = Rear Left Window
/// 3 = Rear Right Window
/// 4 = Front Windscreen
/// 5 = Rear Windscreen
/// 6 = Mid Left
/// 7 = Mid Right
/// 8 = Invalid
pub fn SMASH_VEHICLE_WINDOW(vehicle: types.Vehicle, windowIndex: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11410817766430417497)), vehicle, windowIndex);
}
/// windowIndex:
/// 0 = Front Left Window
/// 1 = Front Right Window
/// 2 = Rear Left Window
/// 3 = Rear Right Window
/// 4 = Front Windscreen
/// 5 = Rear Windscreen
/// 6 = Mid Left
/// 7 = Mid Right
/// 8 = Invalid
/// Additional information: FIX_VEHICLE_WINDOW (0x140D0BB88) references an array of bone vehicle indices (0x141D4B3E0) { 2Ah, 2Bh, 2Ch, 2Dh, 2Eh, 2Fh, 28h, 29h } that correspond to: window_lf, window_rf, window_lr, window_rr, window_lm, window_rm, windscreen, windscreen_r. This array is used by most vehwindow natives.
/// Also, this function is coded to not work on vehicles of type: CBike, Bmx, CBoat, CTrain, and CSubmarine.
pub fn FIX_VEHICLE_WINDOW(vehicle: types.Vehicle, windowIndex: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8584567789502981762)), vehicle, windowIndex);
}
/// Detaches the vehicle's windscreen.
/// For further information, see : gtaforums.com/topic/859570-glass/#entry1068894566
/// Used to be known as _DETACH_VEHICLE_WINDSCREEN
pub fn POP_OUT_VEHICLE_WINDSCREEN(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7882527888856013523)), vehicle);
}
/// Pops off the "roof" bone in the direction of the specified offset from the vehicle.
/// Used to be known as _EJECT_JB700_ROOF
pub fn POP_OFF_VEHICLE_ROOF_WITH_IMPULSE(vehicle: types.Vehicle, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(16396684679968709580)), vehicle, x, y, z);
}
/// set's if the vehicle has lights or not.
/// not an on off toggle.
/// p1 = 0 ;vehicle normal lights, off then lowbeams, then highbeams
/// p1 = 1 ;vehicle doesn't have lights, always off
/// p1 = 2 ;vehicle has always on lights
/// p1 = 3 ;or even larger like 4,5,... normal lights like =1
/// note1: when using =2 on day it's lowbeam,highbeam
/// but at night it's lowbeam,lowbeam,highbeam
/// note2: when using =0 it's affected by day or night for highbeams don't exist in daytime.
pub fn SET_VEHICLE_LIGHTS(vehicle: types.Vehicle, state: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3812034297014287450)), vehicle, state);
}
/// Used to be known as _SET_VEHICLE_USE_PLAYER_LIGHT_SETTINGS
pub fn SET_VEHICLE_USE_PLAYER_LIGHT_SETTINGS(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14149228038100052700)), vehicle, toggle);
}
/// p1 can be either 0, 1 or 2.
/// Determines how vehicle lights behave when toggled.
/// 0 = Default (Lights can be toggled between off, normal and high beams)
/// 1 = Lights Disabled (Lights are fully disabled, cannot be toggled)
/// 2 = Always On (Lights can be toggled between normal and high beams)
/// Used to be known as _SET_VEHICLE_LIGHTS_MODE
pub fn SET_VEHICLE_HEADLIGHT_SHADOWS(vehicle: types.Vehicle, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2292506429516893524)), vehicle, p1);
}
pub fn SET_VEHICLE_ALARM(vehicle: types.Vehicle, state: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14836518586668520780)), vehicle, state);
}
pub fn START_VEHICLE_ALARM(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13330508336945546053)), vehicle);
}
pub fn IS_VEHICLE_ALARM_ACTIVATED(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4835145494804037428)), vehicle);
}
pub fn SET_VEHICLE_INTERIORLIGHT(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13555908479372192467)), vehicle, toggle);
}
/// Sets some bit of vehicle
pub fn SET_VEHICLE_FORCE_INTERIORLIGHT(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9809149421780872677)), vehicle, toggle);
}
/// multiplier = brightness of head lights.
/// this value isn't capped afaik.
/// multiplier = 0.0 no lights
/// multiplier = 1.0 default game value
pub fn SET_VEHICLE_LIGHT_MULTIPLIER(vehicle: types.Vehicle, multiplier: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12935821712570840444)), vehicle, multiplier);
}
pub fn ATTACH_VEHICLE_TO_TRAILER(vehicle: types.Vehicle, trailer: types.Vehicle, radius: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(4358713499366918996)), vehicle, trailer, radius);
}
/// This is the proper way of attaching vehicles to the car carrier, it's what Rockstar uses. Video Demo: https://www.youtube.com/watch?v=2lVEIzf7bgo
pub fn ATTACH_VEHICLE_ON_TO_TRAILER(vehicle: types.Vehicle, trailer: types.Vehicle, offsetX: f32, offsetY: f32, offsetZ: f32, coordsX: f32, coordsY: f32, coordsZ: f32, rotationX: f32, rotationY: f32, rotationZ: f32, disableCollisions: f32) void {
_ = nativeCaller.invoke12(@as(u64, @intCast(1636463030648963832)), vehicle, trailer, offsetX, offsetY, offsetZ, coordsX, coordsY, coordsZ, rotationX, rotationY, rotationZ, disableCollisions);
}
pub fn STABILISE_ENTITY_ATTACHED_TO_HELI(vehicle: types.Vehicle, entity: types.Entity, p2: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(3983159160330308376)), vehicle, entity, p2);
}
pub fn DETACH_VEHICLE_FROM_TRAILER(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10399707500062170502)), vehicle);
}
pub fn IS_VEHICLE_ATTACHED_TO_TRAILER(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16703635855612878604)), vehicle);
}
pub fn SET_TRAILER_INVERSE_MASS_SCALE(vehicle: types.Vehicle, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3066724414011636543)), vehicle, p1);
}
/// in the decompiled scripts, seems to be always called on the vehicle right after being attached to a trailer.
pub fn SET_TRAILER_LEGS_RAISED(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10794938863693855226)), vehicle);
}
/// Used to be known as _SET_TRAILER_LEGS_LOWERED
pub fn SET_TRAILER_LEGS_LOWERED(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9767311162033944898)), vehicle);
}
/// tyreIndex = 0 to 4 on normal vehicles
/// '0 = wheel_lf / bike, plane or jet front
/// '1 = wheel_rf
/// '2 = wheel_lm / in 6 wheels trailer, plane or jet is first one on left
/// '3 = wheel_rm / in 6 wheels trailer, plane or jet is first one on right
/// '4 = wheel_lr / bike rear / in 6 wheels trailer, plane or jet is last one on left
/// '5 = wheel_rr / in 6 wheels trailer, plane or jet is last one on right
/// '45 = 6 wheels trailer mid wheel left
/// '47 = 6 wheels trailer mid wheel right
pub fn SET_VEHICLE_TYRE_FIXED(vehicle: types.Vehicle, tyreIndex: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7931960884476783901)), vehicle, tyreIndex);
}
/// Sets a vehicle's license plate text. 8 chars maximum.
/// Example:
/// Ped playerPed = PLAYER::PLAYER_PED_ID();
/// Vehicle veh = PED::GET_VEHICLE_PED_IS_USING(playerPed);
/// char *plateText = "KING";
/// VEHICLE::SET_VEHICLE_NUMBER_PLATE_TEXT(veh, plateText);
pub fn SET_VEHICLE_NUMBER_PLATE_TEXT(vehicle: types.Vehicle, plateText: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10784026586230086215)), vehicle, plateText);
}
/// Returns the license plate text from a vehicle. 8 chars maximum.
pub fn GET_VEHICLE_NUMBER_PLATE_TEXT(vehicle: types.Vehicle) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(8998698628399956494)), vehicle);
}
/// Returns the number of *types* of licence plates, enumerated below in SET_VEHICLE_NUMBER_PLATE_TEXT_INDEX.
pub fn GET_NUMBER_OF_VEHICLE_NUMBER_PLATES() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(5498168532199037131)));
}
/// Plates:
/// Blue/White - 0
/// Yellow/black - 1
/// Yellow/Blue - 2
/// Blue/White2 - 3
/// Blue/White3 - 4
/// Yankton - 5
pub fn SET_VEHICLE_NUMBER_PLATE_TEXT_INDEX(vehicle: types.Vehicle, plateIndex: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10414832911214686369)), vehicle, plateIndex);
}
/// Returns the PlateType of a vehicle
/// Blue_on_White_1 = 3,
/// Blue_on_White_2 = 0,
/// Blue_on_White_3 = 4,
/// Yellow_on_Blue = 2,
/// Yellow_on_Black = 1,
/// North_Yankton = 5,
pub fn GET_VEHICLE_NUMBER_PLATE_TEXT_INDEX(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(17373694244543164821)), vehicle);
}
pub fn SET_RANDOM_TRAINS(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9284723967894636505)), toggle);
}
/// Train models HAVE TO be loaded (requested) before you use this.
/// For variation 15 - request:
/// freight
/// freightcar
/// freightgrain
/// freightcont1
/// freightcont2
/// freighttrailer
pub fn CREATE_MISSION_TRAIN(variation: c_int, x: f32, y: f32, z: f32, direction: windows.BOOL, p5: types.Any, p6: types.Any) types.Vehicle {
return nativeCaller.invoke7(@as(u64, @intCast(7189658880938010824)), variation, x, y, z, direction, p5, p6);
}
/// Toggles whether ambient trains can spawn on the specified track or not
/// `trackId` is the internal id of the train track to switch.
/// `state` is whether ambient trains can spawn or not
/// trackIds
/// 0 (`trains1.dat`) Main track around SA
/// 1 (`trains2.dat`) Davis Quartz Quarry branch
/// 2 (`trains3.dat`) Second track alongside live track along Roy Lewenstein Blv.
/// 3 (`trains4.dat`) Metro track circuit
/// 4 (`trains5.dat`) Branch in Mirror Park Railyard
/// 5 (`trains6.dat`) Branch in Mirror Park Railyard
/// 6 (`trains7.dat`) LS branch to Mirror Park Railyard
/// 7 (`trains8.dat`) Overground part of metro track along Forum Dr.
/// 8 (`trains9.dat`) Branch to Mirror Park Railyard
/// 9 (`trains10.dat`) Yankton train
/// 10 (`trains11.dat`) Part of metro track near mission row
/// 11 (`trains12.dat`) Yankton prologue mission train
/// Full list of all train tracks + track nodes by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/traintracks.json
pub fn SWITCH_TRAIN_TRACK(trackId: c_int, state: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18266947224440635168)), trackId, state);
}
/// Only called once inside main_persitant with the parameters p0 = 0, p1 = 120000
/// trackIndex: 0 - 26
/// Full list of all train tracks + track nodes by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/traintracks.json
pub fn SET_TRAIN_TRACK_SPAWN_FREQUENCY(trackIndex: c_int, frequency: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2420469018626878970)), trackIndex, frequency);
}
pub fn ALLOW_TRAIN_TO_BE_REMOVED_BY_POPULATION(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2526705179464482627)), p0);
}
pub fn DELETE_ALL_TRAINS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(8316584479950085245)));
}
pub fn SET_TRAIN_SPEED(train: types.Vehicle, speed: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12253108332762994403)), train, speed);
}
pub fn SET_TRAIN_CRUISE_SPEED(train: types.Vehicle, speed: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1605131416520909493)), train, speed);
}
pub fn SET_RANDOM_BOATS(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9530583018426679647)), toggle);
}
/// Used to be known as _SET_RANDOM_BOATS_IN_MP
pub fn SET_RANDOM_BOATS_MP(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15735035000830767306)), toggle);
}
pub fn SET_GARBAGE_TRUCKS(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3097765567273685773)), toggle);
}
/// Maximum amount of vehicles with vehicle stuck check appears to be 16.
pub fn DOES_VEHICLE_HAVE_STUCK_VEHICLE_CHECK(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6333402058924655728)), vehicle);
}
/// See REQUEST_VEHICLE_RECORDING
pub fn GET_VEHICLE_RECORDING_ID(recording: c_int, script: [*c]const u8) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(2401610889199999804)), recording, script);
}
/// Request the vehicle recording defined by the lowercase format string "%s%03d.yvr". For example, REQUEST_VEHICLE_RECORDING(1, "FBIs1UBER") corresponds to fbis1uber001.yvr.
/// For all vehicle recording/playback natives, "script" is a common prefix that usually corresponds to the script/mission the recording is used in, "recording" is its int suffix, and "id" (e.g., in native GET_TOTAL_DURATION_OF_VEHICLE_RECORDING_ID) corresponds to a unique identifier within the recording streaming module.
/// Note that only 24 recordings (hardcoded in multiple places) can ever active at a given time before clobbering begins.
pub fn REQUEST_VEHICLE_RECORDING(recording: c_int, script: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12632962730954637077)), recording, script);
}
/// See REQUEST_VEHICLE_RECORDING
pub fn HAS_VEHICLE_RECORDING_BEEN_LOADED(recording: c_int, script: [*c]const u8) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(3462530660256210884)), recording, script);
}
/// See REQUEST_VEHICLE_RECORDING
pub fn REMOVE_VEHICLE_RECORDING(recording: c_int, script: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17372084488104460232)), recording, script);
}
pub fn GET_POSITION_OF_VEHICLE_RECORDING_ID_AT_TIME(id: c_int, time: f32) types.Vector3 {
return nativeCaller.invoke2(@as(u64, @intCast(10543555057322447229)), id, time);
}
/// This native does no interpolation between pathpoints. The same position will be returned for all times up to the next pathpoint in the recording.
/// See REQUEST_VEHICLE_RECORDING
pub fn GET_POSITION_OF_VEHICLE_RECORDING_AT_TIME(recording: c_int, time: f32, script: [*c]const u8) types.Vector3 {
return nativeCaller.invoke3(@as(u64, @intCast(15150798036259634082)), recording, time, script);
}
pub fn GET_ROTATION_OF_VEHICLE_RECORDING_ID_AT_TIME(id: c_int, time: f32) types.Vector3 {
return nativeCaller.invoke2(@as(u64, @intCast(17361957376151309223)), id, time);
}
/// This native does no interpolation between pathpoints. The same rotation will be returned for all times up to the next pathpoint in the recording.
/// See REQUEST_VEHICLE_RECORDING
pub fn GET_ROTATION_OF_VEHICLE_RECORDING_AT_TIME(recording: c_int, time: f32, script: [*c]const u8) types.Vector3 {
return nativeCaller.invoke3(@as(u64, @intCast(2330648471473334445)), recording, time, script);
}
pub fn GET_TOTAL_DURATION_OF_VEHICLE_RECORDING_ID(id: c_int) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(1165608030841583334)), id);
}
/// See REQUEST_VEHICLE_RECORDING
pub fn GET_TOTAL_DURATION_OF_VEHICLE_RECORDING(recording: c_int, script: [*c]const u8) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(1029303147655924048)), recording, script);
}
/// Distance traveled in the vehicles current recording.
pub fn GET_POSITION_IN_RECORDING(vehicle: types.Vehicle) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(3291240748898849909)), vehicle);
}
/// Can be used with GET_TOTAL_DURATION_OF_VEHICLE_RECORDING{_ID} to compute a percentage.
pub fn GET_TIME_POSITION_IN_RECORDING(vehicle: types.Vehicle) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(6288981831131850052)), vehicle);
}
/// p3 is some flag related to 'trailers' (invokes CVehicle::GetTrailer).
/// See REQUEST_VEHICLE_RECORDING
pub fn START_PLAYBACK_RECORDED_VEHICLE(vehicle: types.Vehicle, recording: c_int, script: [*c]const u8, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(4577785406487502961)), vehicle, recording, script, p3);
}
/// flags requires further research, e.g., 0x4/0x8 are related to the AI driving task and 0x20 is internally set and interacts with dynamic entity components.
/// time, often zero and capped at 500, is related to SET_PLAYBACK_TO_USE_AI_TRY_TO_REVERT_BACK_LATER
pub fn START_PLAYBACK_RECORDED_VEHICLE_WITH_FLAGS(vehicle: types.Vehicle, recording: c_int, script: [*c]const u8, flags: c_int, time: c_int, drivingStyle: c_int) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(9043506659263882054)), vehicle, recording, script, flags, time, drivingStyle);
}
/// Often called after START_PLAYBACK_RECORDED_VEHICLE and SKIP_TIME_IN_PLAYBACK_RECORDED_VEHICLE; similar in use to FORCE_ENTITY_AI_AND_ANIMATION_UPDATE.
pub fn FORCE_PLAYBACK_RECORDED_VEHICLE_UPDATE(vehicle: types.Vehicle, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2246819055516817707)), vehicle, p1);
}
pub fn STOP_PLAYBACK_RECORDED_VEHICLE(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6089770571023433194)), vehicle);
}
pub fn PAUSE_PLAYBACK_RECORDED_VEHICLE(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7145638777801867697)), vehicle);
}
pub fn UNPAUSE_PLAYBACK_RECORDED_VEHICLE(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9834152984408425941)), vehicle);
}
pub fn IS_PLAYBACK_GOING_ON_FOR_VEHICLE(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2056539932144865004)), vehicle);
}
pub fn IS_PLAYBACK_USING_AI_GOING_ON_FOR_VEHICLE(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12585587717912215814)), vehicle);
}
pub fn GET_CURRENT_PLAYBACK_FOR_VEHICLE(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(4808724834963185748)), vehicle);
}
pub fn SKIP_TO_END_AND_STOP_PLAYBACK_RECORDED_VEHICLE(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12361869541218343043)), vehicle);
}
pub fn SET_PLAYBACK_SPEED(vehicle: types.Vehicle, speed: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7386936414660884344)), vehicle, speed);
}
/// AI abides by the provided driving style (e.g., stopping at red lights or waiting behind traffic) while executing the specificed vehicle recording.
/// FORCE_PLAYBACK_RECORDED_VEHICLE_UPDATE is a related native that deals with the AI physics for such recordings.
pub fn START_PLAYBACK_RECORDED_VEHICLE_USING_AI(vehicle: types.Vehicle, recording: c_int, script: [*c]const u8, speed: f32, drivingStyle: c_int) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(3016953963414045324)), vehicle, recording, script, speed, drivingStyle);
}
/// SET_TIME_POSITION_IN_RECORDING can be emulated by: desired_time - GET_TIME_POSITION_IN_RECORDING(vehicle)
pub fn SKIP_TIME_IN_PLAYBACK_RECORDED_VEHICLE(vehicle: types.Vehicle, time: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10680558840463170080)), vehicle, time);
}
/// Identical to SET_PLAYBACK_TO_USE_AI_TRY_TO_REVERT_BACK_LATER with 0 as arguments for p1 and p3.
pub fn SET_PLAYBACK_TO_USE_AI(vehicle: types.Vehicle, drivingStyle: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11910265865249128753)), vehicle, drivingStyle);
}
/// Time is number of milliseconds before reverting, zero for indefinitely.
pub fn SET_PLAYBACK_TO_USE_AI_TRY_TO_REVERT_BACK_LATER(vehicle: types.Vehicle, time: c_int, drivingStyle: c_int, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(7954348751808169776)), vehicle, time, drivingStyle, p3);
}
pub fn SET_ADDITIONAL_ROTATION_FOR_RECORDED_VEHICLE_PLAYBACK(vehicle: types.Vehicle, x: f32, y: f32, z: f32, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(6360497116269160439)), vehicle, x, y, z, p4);
}
pub fn SET_POSITION_OFFSET_FOR_RECORDED_VEHICLE_PLAYBACK(vehicle: types.Vehicle, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(8748954202524064234)), vehicle, x, y, z);
}
pub fn SET_GLOBAL_POSITION_OFFSET_FOR_RECORDED_VEHICLE_PLAYBACK(vehicle: types.Vehicle, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(18082699623687626484)), vehicle, x, y, z);
}
/// A vehicle recording playback flag only used in jewelry_heist
pub fn SET_SHOULD_LERP_FROM_AI_TO_FULL_RECORDING(vehicle: types.Vehicle, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(448920370433963400)), vehicle, p1);
}
pub fn EXPLODE_VEHICLE_IN_CUTSCENE(vehicle: types.Vehicle, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8676834177737408267)), vehicle, p1);
}
pub fn ADD_VEHICLE_STUCK_CHECK_WITH_WARP(p0: types.Any, p1: f32, p2: types.Any, p3: windows.BOOL, p4: windows.BOOL, p5: windows.BOOL, p6: types.Any) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(3434436927361464684)), p0, p1, p2, p3, p4, p5, p6);
}
/// Makes the vehicle stop spawning naturally in traffic. Here's an essential example:
/// VEHICLE::SET_VEHICLE_MODEL_IS_SUPPRESSED(MISC::GET_HASH_KEY("taco"), true);
/// Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json
pub fn SET_VEHICLE_MODEL_IS_SUPPRESSED(model: types.Hash, suppressed: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1135708215248050196)), model, suppressed);
}
/// Gets a random vehicle in a sphere at the specified position, of the specified radius.
/// x: The X-component of the position of the sphere.
/// y: The Y-component of the position of the sphere.
/// z: The Z-component of the position of the sphere.
/// radius: The radius of the sphere. Max is 9999.9004.
/// modelHash: The vehicle model to limit the selection to. Pass 0 for any model.
/// flags: The bitwise flags that modifies the behaviour of this function.
/// Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json
pub fn GET_RANDOM_VEHICLE_IN_SPHERE(x: f32, y: f32, z: f32, radius: f32, modelHash: types.Hash, flags: c_int) types.Vehicle {
return nativeCaller.invoke6(@as(u64, @intCast(4066588722478844188)), x, y, z, radius, modelHash, flags);
}
pub fn GET_RANDOM_VEHICLE_FRONT_BUMPER_IN_SPHERE(p0: f32, p1: f32, p2: f32, p3: f32, p4: c_int, p5: c_int, p6: c_int) types.Vehicle {
return nativeCaller.invoke7(@as(u64, @intCast(14219920157253745256)), p0, p1, p2, p3, p4, p5, p6);
}
pub fn GET_RANDOM_VEHICLE_BACK_BUMPER_IN_SPHERE(p0: f32, p1: f32, p2: f32, p3: f32, p4: c_int, p5: c_int, p6: c_int) types.Vehicle {
return nativeCaller.invoke7(@as(u64, @intCast(13044685025472194780)), p0, p1, p2, p3, p4, p5, p6);
}
/// Example usage
/// VEHICLE::GET_CLOSEST_VEHICLE(x, y, z, radius, hash, unknown leave at 70)
/// x, y, z: Position to get closest vehicle to.
/// radius: Max radius to get a vehicle.
/// modelHash: Limit to vehicles with this model. 0 for any.
/// flags: The bitwise flags altering the function's behaviour.
/// Does not return police cars or helicopters.
/// It seems to return police cars for me, does not seem to return helicopters, planes or boats for some reason
/// Only returns non police cars and motorbikes with the flag set to 70 and modelHash to 0. ModelHash seems to always be 0 when not a modelHash in the scripts, as stated above.
/// These flags were found in the b617d scripts: 0,2,4,6,7,23,127,260,2146,2175,12294,16384,16386,20503,32768,67590,67711,98309,100359.
/// Converted to binary, each bit probably represents a flag as explained regarding another native here: gtaforums.com/topic/822314-guide-driving-styles
/// Conversion of found flags to binary: https://pastebin.com/kghNFkRi
/// At exactly 16384 which is 0100000000000000 in binary and 4000 in hexadecimal only planes are returned.
/// It's probably more convenient to use worldGetAllVehicles(int *arr, int arrSize) and check the shortest distance yourself and sort if you want by checking the vehicle type with for example VEHICLE::IS_THIS_MODEL_A_BOAT
/// -------------------------------------------------------------------------
/// Conclusion: This native is not worth trying to use. Use something like this instead: https://pastebin.com/xiFdXa7h
/// Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json
pub fn GET_CLOSEST_VEHICLE(x: f32, y: f32, z: f32, radius: f32, modelHash: types.Hash, flags: c_int) types.Vehicle {
return nativeCaller.invoke6(@as(u64, @intCast(17815877436373559451)), x, y, z, radius, modelHash, flags);
}
/// Corrected p1. it's basically the 'carriage/trailer number'. So if the train has 3 trailers you'd call the native once with a var or 3 times with 1, 2, 3.
pub fn GET_TRAIN_CARRIAGE(train: types.Vehicle, trailerNumber: c_int) types.Vehicle {
return nativeCaller.invoke2(@as(u64, @intCast(624589709488827331)), train, trailerNumber);
}
/// Used to be known as _IS_MISSION_TRAIN
pub fn IS_MISSION_TRAIN(train: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12485754076329634812)), train);
}
pub fn DELETE_MISSION_TRAIN(train: [*c]types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6590650039989028757)), train);
}
/// p1 is always 0
pub fn SET_MISSION_TRAIN_AS_NO_LONGER_NEEDED(train: [*c]types.Vehicle, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13539901319752752104)), train, p1);
}
pub fn SET_MISSION_TRAIN_COORDS(train: types.Vehicle, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(6421190184434054966)), train, x, y, z);
}
pub fn IS_THIS_MODEL_A_BOAT(model: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5019570168338364899)), model);
}
/// Checks if model is a boat, then checks for FLAG_IS_JETSKI.
/// Used to be known as _IS_THIS_MODEL_A_SUBMERSIBLE
/// Used to be known as _IS_THIS_MODEL_AN_EMERGENCY_BOAT
pub fn IS_THIS_MODEL_A_JETSKI(model: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10752073029506790910)), model);
}
pub fn IS_THIS_MODEL_A_PLANE(model: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11571025849083470046)), model);
}
pub fn IS_THIS_MODEL_A_HELI(model: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15916903365363078378)), model);
}
/// To check if the model is an amphibious car, use IS_THIS_MODEL_AN_AMPHIBIOUS_CAR.
pub fn IS_THIS_MODEL_A_CAR(model: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9182194428474387960)), model);
}
pub fn IS_THIS_MODEL_A_TRAIN(model: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12363314968004559403)), model);
}
pub fn IS_THIS_MODEL_A_BIKE(model: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13045814370742226564)), model);
}
pub fn IS_THIS_MODEL_A_BICYCLE(model: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13804902037466111698)), model);
}
pub fn IS_THIS_MODEL_A_QUADBIKE(model: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4168859234758687272)), model);
}
/// Used to be known as _IS_THIS_MODEL_AN_AMPHIBIOUS_CAR
pub fn IS_THIS_MODEL_AN_AMPHIBIOUS_CAR(model: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7151557073908001718)), model);
}
/// Used to be known as _IS_THIS_MODEL_AN_AMPHIBIOUS_QUADBIKE
pub fn IS_THIS_MODEL_AN_AMPHIBIOUS_QUADBIKE(model: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11649119110350402317)), model);
}
/// Equivalent of SET_HELI_BLADES_SPEED(vehicleHandle, 1.0f);
/// this native works on planes to?
pub fn SET_HELI_BLADES_FULL_SPEED(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11635127903352186381)), vehicle);
}
/// Sets the speed of the helicopter blades in percentage of the full speed.
/// vehicleHandle: The helicopter.
/// speed: The speed in percentage, 0.0f being 0% and 1.0f being 100%.
pub fn SET_HELI_BLADES_SPEED(vehicle: types.Vehicle, speed: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18241842718139137101)), vehicle, speed);
}
pub fn FORCE_SUB_THROTTLE_FOR_TIME(vehicle: types.Vehicle, p1: f32, p2: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(11081908322697961722)), vehicle, p1, p2);
}
/// This has not yet been tested - it's just an assumption of what the types could be.
pub fn SET_VEHICLE_CAN_BE_TARGETTED(vehicle: types.Vehicle, state: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3985708116393687682)), vehicle, state);
}
pub fn SET_DONT_ALLOW_PLAYER_TO_ENTER_VEHICLE_IF_LOCKED_FOR_PLAYER(vehicle: types.Vehicle, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15836400051006278540)), vehicle, p1);
}
pub fn SET_VEHICLE_CAN_BE_VISIBLY_DAMAGED(vehicle: types.Vehicle, state: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5507947388011886209)), vehicle, state);
}
/// Used to be known as _SET_VEHICLE_LIGHTS_CAN_BE_VISIBLY_DAMAGED
pub fn SET_VEHICLE_HAS_UNBREAKABLE_LIGHTS(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1920970198774881684)), vehicle, toggle);
}
pub fn SET_VEHICLE_RESPECTS_LOCKS_WHEN_HAS_DRIVER(vehicle: types.Vehicle, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2527044344841504130)), vehicle, p1);
}
pub fn SET_VEHICLE_CAN_EJECT_PASSENGERS_IF_LOCKED(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(458526765048055477)), p0, p1);
}
/// Dirt level does not become greater than 15.0
pub fn GET_VEHICLE_DIRT_LEVEL(vehicle: types.Vehicle) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(10310917179768153643)), vehicle);
}
/// You can't use values greater than 15.0
/// Also, R* does (float)(rand() % 15) to get a random dirt level when generating a vehicle.
pub fn SET_VEHICLE_DIRT_LEVEL(vehicle: types.Vehicle, dirtLevel: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8778559758790880907)), vehicle, dirtLevel);
}
/// Appears to return true if the vehicle has any damage, including cosmetically.
/// Used to be known as _IS_VEHICLE_DAMAGED
pub fn GET_DOES_VEHICLE_HAVE_DAMAGE_DECALS(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13608840237274767006)), vehicle);
}
/// doorId: see SET_VEHICLE_DOOR_SHUT
pub fn IS_VEHICLE_DOOR_FULLY_OPEN(vehicle: types.Vehicle, doorId: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(4509014719907044386)), vehicle, doorId);
}
/// Starts or stops the engine on the specified vehicle.
/// vehicle: The vehicle to start or stop the engine on.
/// value: true to turn the vehicle on; false to turn it off.
/// instantly: if true, the vehicle will be set to the state immediately; otherwise, the current driver will physically turn on or off the engine.
/// disableAutoStart: If true, the system will prevent the engine from starting when the player got into it.
/// from what I've tested when I do this to a helicopter the propellers turn off after the engine has started. so is there any way to keep the heli propellers on?
pub fn SET_VEHICLE_ENGINE_ON(vehicle: types.Vehicle, value: windows.BOOL, instantly: windows.BOOL, disableAutoStart: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(2636792098548582430)), vehicle, value, instantly, disableAutoStart);
}
pub fn SET_VEHICLE_UNDRIVEABLE(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9996419924669770645)), vehicle, toggle);
}
pub fn SET_VEHICLE_PROVIDES_COVER(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6556939626901707223)), vehicle, toggle);
}
/// doorId: see SET_VEHICLE_DOOR_SHUT
pub fn SET_VEHICLE_DOOR_CONTROL(vehicle: types.Vehicle, doorId: c_int, speed: c_int, angle: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(17491875687605866443)), vehicle, doorId, speed, angle);
}
/// doorId: see SET_VEHICLE_DOOR_SHUT
pub fn SET_VEHICLE_DOOR_LATCHED(vehicle: types.Vehicle, doorId: c_int, p2: windows.BOOL, p3: windows.BOOL, p4: windows.BOOL) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(11937183589473234760)), vehicle, doorId, p2, p3, p4);
}
/// doorId: see SET_VEHICLE_DOOR_SHUT
pub fn GET_VEHICLE_DOOR_ANGLE_RATIO(vehicle: types.Vehicle, doorId: c_int) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(18320533513229773781)), vehicle, doorId);
}
/// doorId: see SET_VEHICLE_DOOR_SHUT
/// Used to be known as _GET_PED_USING_VEHICLE_DOOR
pub fn GET_PED_USING_VEHICLE_DOOR(vehicle: types.Vehicle, doord: c_int) types.Ped {
return nativeCaller.invoke2(@as(u64, @intCast(2414659197036496187)), vehicle, doord);
}
/// enum eDoorId
/// {
/// VEH_EXT_DOOR_INVALID_ID = -1,
/// VEH_EXT_DOOR_DSIDE_F,
/// VEH_EXT_DOOR_DSIDE_R,
/// VEH_EXT_DOOR_PSIDE_F,
/// VEH_EXT_DOOR_PSIDE_R,
/// VEH_EXT_BONNET,
/// VEH_EXT_BOOT
/// };
pub fn SET_VEHICLE_DOOR_SHUT(vehicle: types.Vehicle, doorId: c_int, closeInstantly: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(10653754407603636709)), vehicle, doorId, closeInstantly);
}
/// doorId: see SET_VEHICLE_DOOR_SHUT
pub fn SET_VEHICLE_DOOR_BROKEN(vehicle: types.Vehicle, doorId: c_int, deleteDoor: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(15336153818213079603)), vehicle, doorId, deleteDoor);
}
pub fn SET_VEHICLE_CAN_BREAK(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6467041784937131878)), vehicle, toggle);
}
pub fn DOES_VEHICLE_HAVE_ROOF(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10000351483635981184)), vehicle);
}
pub fn SET_VEHICLE_REMOVE_AGGRESSIVE_CARJACK_MISSION(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14173730158750193161)), p0);
}
pub fn SET_VEHICLE_AVOID_PLAYER_VEHICLE_RIOT_VAN_MISSION(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15217687745233982066)), p0);
}
pub fn SET_CARJACK_MISSION_REMOVAL_PARAMETERS(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13354897360535157211)), p0, p1);
}
/// Returns true if MF_IS_BIG (strModelFlags 0x8) handling model flag is set.
pub fn IS_BIG_VEHICLE(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11467357866649993982)), vehicle);
}
/// Returns the total amount of color combinations found in the vehicle's carvariations.meta entry.
pub fn GET_NUMBER_OF_VEHICLE_COLOURS(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(4293673586576970782)), vehicle);
}
/// Sets the selected vehicle's colors to the specified index of the color combination found in the vehicle's carvariations.meta entry.
pub fn SET_VEHICLE_COLOUR_COMBINATION(vehicle: types.Vehicle, colorCombination: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3740465110043524657)), vehicle, colorCombination);
}
/// Returns the index of the color combination found in the vehicle's carvariations.meta entry.
pub fn GET_VEHICLE_COLOUR_COMBINATION(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(7675309252482981206)), vehicle);
}
/// `color`: is the paint index for the vehicle.
/// Paint index goes from 0 to 12.
/// Be aware that it only works on xenon lights. Example: https://i.imgur.com/yV3cpG9.png
/// Full list of all vehicle xenon lights by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicleColors.json
/// Used to be known as _SET_VEHICLE_HEADLIGHTS_COLOUR
/// Used to be known as _SET_VEHICLE_XENON_LIGHTS_COLOUR
/// Used to be known as _SET_VEHICLE_XENON_LIGHTS_COLOR
pub fn SET_VEHICLE_XENON_LIGHT_COLOR_INDEX(vehicle: types.Vehicle, colorIndex: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16433691881432431111)), vehicle, colorIndex);
}
/// Returns the headlight color index from the vehicle. Value between 0, 12.
/// Use SET_VEHICLE_XENON_LIGHT_COLOR_INDEX to set the headlights color for the vehicle.
/// Must enable xenon headlights before it'll take affect.
/// Returns an int, value between 0-12 or 255 if no color is set.
/// Used to be known as _GET_VEHICLE_HEADLIGHTS_COLOUR
/// Used to be known as _GET_VEHICLE_XENON_LIGHTS_COLOUR
/// Used to be known as _GET_VEHICLE_XENON_LIGHTS_COLOR
pub fn GET_VEHICLE_XENON_LIGHT_COLOR_INDEX(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(4467343895069330651)), vehicle);
}
/// Setting this to false, makes the specified vehicle to where if you press Y your character doesn't even attempt the animation to enter the vehicle. Hence it's not considered aka ignored.
pub fn SET_VEHICLE_IS_CONSIDERED_BY_PLAYER(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3582938665954924237)), vehicle, toggle);
}
pub fn SET_VEHICLE_WILL_FORCE_OTHER_VEHICLES_TO_STOP(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13716858724054929397)), vehicle, toggle);
}
pub fn SET_VEHICLE_ACT_AS_IF_HAS_SIREN_ON(vehicle: types.Vehicle, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11235589065693984934)), vehicle, p1);
}
pub fn SET_VEHICLE_USE_MORE_RESTRICTIVE_SPAWN_CHECKS(vehicle: types.Vehicle, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9852863595025575577)), vehicle, p1);
}
pub fn SET_VEHICLE_MAY_BE_USED_BY_GOTO_POINT_ANY_MEANS(vehicle: types.Vehicle, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16740412531408164026)), vehicle, p1);
}
/// Not present in the retail version! It's just a nullsub.
/// p0 always true (except in one case)
/// successIndicator: 0 if success, -1 if failed
pub fn GET_RANDOM_VEHICLE_MODEL_IN_MEMORY(p0: windows.BOOL, modelHash: [*c]types.Hash, successIndicator: [*c]c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(386166814800147709)), p0, modelHash, successIndicator);
}
/// enum VehicleLockStatus = {
/// None = 0,
/// Unlocked = 1,
/// Locked = 2,
/// LockedForPlayer = 3,
/// StickPlayerInside = 4, -- Doesn't allow players to exit the vehicle with the exit vehicle key.
/// CanBeBrokenInto = 7, -- Can be broken into the car. If the glass is broken, the value will be set to 1
/// CanBeBrokenIntoPersist = 8, -- Can be broken into persist
/// CannotBeTriedToEnter = 10, -- Cannot be tried to enter (Nothing happens when you press the vehicle enter key).
/// }
pub fn GET_VEHICLE_DOOR_LOCK_STATUS(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(2719216112082266466)), vehicle);
}
/// Returns vehicle door lock state previously set with SET_VEHICLE_INDIVIDUAL_DOORS_LOCKED
/// Used to be known as _GET_VEHICLE_DOOR_DESTROY_TYPE
pub fn GET_VEHICLE_INDIVIDUAL_DOOR_LOCK_STATUS(vehicle: types.Vehicle, doorId: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(14576678556651678843)), vehicle, doorId);
}
/// doorID starts at 0, not seeming to skip any numbers. Four door vehicles intuitively range from 0 to 3.
pub fn IS_VEHICLE_DOOR_DAMAGED(veh: types.Vehicle, doorID: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(13322071994783909159)), veh, doorID);
}
/// doorId: see SET_VEHICLE_DOOR_SHUT
/// Used to be known as _SET_VEHICLE_DOOR_BREAKABLE
/// Used to be known as _SET_VEHICLE_DOOR_CAN_BREAK
pub fn SET_DOOR_ALLOWED_TO_BE_BROKEN_OFF(vehicle: types.Vehicle, doorId: c_int, isBreakable: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(3432081173349891800)), vehicle, doorId, isBreakable);
}
pub fn IS_VEHICLE_BUMPER_BOUNCING(vehicle: types.Vehicle, frontBumper: windows.BOOL) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(2862361333363068973)), vehicle, frontBumper);
}
pub fn IS_VEHICLE_BUMPER_BROKEN_OFF(vehicle: types.Vehicle, frontBumper: windows.BOOL) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5080155653783107654)), vehicle, frontBumper);
}
/// Usage:
/// public bool isCopInRange(Vector3 Location, float Range)
/// {
/// return Function.Call<bool>(Hash.IS_COP_PED_IN_AREA_3D, Location.X - Range, Location.Y - Range, Location.Z - Range, Location.X + Range, Location.Y + Range, Location.Z + Range);
/// }
pub fn IS_COP_VEHICLE_IN_AREA_3D(x1: f32, x2: f32, y1: f32, y2: f32, z1: f32, z2: f32) windows.BOOL {
return nativeCaller.invoke6(@as(u64, @intCast(9146641337764012650)), x1, x2, y1, y2, z1, z2);
}
/// Public Function isVehicleOnAllWheels(vh As Vehicle) As Boolean
/// Return Native.Function.Call(Of Boolean)(Hash.IS_VEHICLE_ON_ALL_WHEELS, vh)
/// End Function
pub fn IS_VEHICLE_ON_ALL_WHEELS(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12755545563352728290)), vehicle);
}
/// Returns `nMonetaryValue` from handling.meta for specific model.
/// Used to be known as _GET_VEHICLE_MODEL_MONETARY_VALUE
pub fn GET_VEHICLE_MODEL_VALUE(vehicleModel: types.Hash) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(6373650422620963382)), vehicleModel);
}
/// Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json
pub fn GET_VEHICLE_LAYOUT_HASH(vehicle: types.Vehicle) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(2941832761766075480)), vehicle);
}
pub fn GET_IN_VEHICLE_CLIPSET_HASH_FOR_SEAT(vehicle: types.Vehicle, p1: c_int) types.Hash {
return nativeCaller.invoke2(@as(u64, @intCast(11537032908023774124)), vehicle, p1);
}
/// Makes the train all jumbled up and derailed as it moves on the tracks (though that wont stop it from its normal operations)
pub fn SET_RENDER_TRAIN_AS_DERAILED(train: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3565462922087847220)), train, toggle);
}
/// They use the same color indexs as SET_VEHICLE_COLOURS.
pub fn SET_VEHICLE_EXTRA_COLOURS(vehicle: types.Vehicle, pearlescentColor: c_int, wheelColor: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2321312457832869427)), vehicle, pearlescentColor, wheelColor);
}
pub fn GET_VEHICLE_EXTRA_COLOURS(vehicle: types.Vehicle, pearlescentColor: [*c]c_int, wheelColor: [*c]c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(4306607109209941751)), vehicle, pearlescentColor, wheelColor);
}
/// Used to be known as _SET_VEHICLE_INTERIOR_COLOUR
/// Used to be known as _SET_VEHICLE_INTERIOR_COLOR
pub fn SET_VEHICLE_EXTRA_COLOUR_5(vehicle: types.Vehicle, color: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17585947422526242585)), vehicle, color);
}
/// Used to be known as _GET_VEHICLE_INTERIOR_COLOUR
/// Used to be known as _GET_VEHICLE_INTERIOR_COLOR
pub fn GET_VEHICLE_EXTRA_COLOUR_5(vehicle: types.Vehicle, color: [*c]c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9012939617897488694)), vehicle, color);
}
/// Used to be known as _SET_VEHICLE_DASHBOARD_COLOUR
/// Used to be known as _SET_VEHICLE_DASHBOARD_COLOR
pub fn SET_VEHICLE_EXTRA_COLOUR_6(vehicle: types.Vehicle, color: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6956317558672667244)), vehicle, color);
}
/// Used to be known as _GET_VEHICLE_DASHBOARD_COLOUR
/// Used to be known as _GET_VEHICLE_DASHBOARD_COLOR
pub fn GET_VEHICLE_EXTRA_COLOUR_6(vehicle: types.Vehicle, color: [*c]c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13214509638265019391)), vehicle, color);
}
pub fn STOP_ALL_GARAGE_ACTIVITY() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(1119119462339091814)));
}
/// This fixes a vehicle.
/// If the vehicle's engine's broken then you cannot fix it with this native.
pub fn SET_VEHICLE_FIXED(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1249505568339610652)), vehicle);
}
/// This fixes the deformation of a vehicle but the vehicle health doesn't improve
pub fn SET_VEHICLE_DEFORMATION_FIXED(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10753929475942778001)), vehicle);
}
/// Used to be known as _SET_VEHICLE_CAN_ENGINE_OPERATE_ON_FIRE
pub fn SET_VEHICLE_CAN_ENGINE_MISSFIRE(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2336178383040988938)), vehicle, toggle);
}
pub fn SET_VEHICLE_CAN_LEAK_OIL(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5889351003397591371)), vehicle, toggle);
}
pub fn SET_VEHICLE_CAN_LEAK_PETROL(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1811932647050764253)), vehicle, toggle);
}
pub fn SET_DISABLE_VEHICLE_PETROL_TANK_FIRES(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5069912345726698322)), vehicle, toggle);
}
pub fn SET_DISABLE_VEHICLE_PETROL_TANK_DAMAGE(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4019503531837018135)), vehicle, toggle);
}
pub fn SET_DISABLE_VEHICLE_ENGINE_FIRES(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10493595366067401029)), vehicle, toggle);
}
pub fn SET_VEHICLE_LIMIT_SPEED_WHEN_PLAYER_INACTIVE(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14198979231544683403)), vehicle, toggle);
}
/// sfink: sets bit in vehicle's structure, used by maintransition, fm_mission_controller, mission_race and a couple of other scripts. see dissassembly:
/// CVehicle *__fastcall sub_140CDAA10(signed int a1, char a2)
/// {
/// CVehicle *result; // rax@1
/// result = EntityAsCVehicle(a1);
/// if ( result )
/// {
/// result->field_886 &= 0xEFu;
/// result->field_886 |= 16 * (a2 & 1);
/// }
/// return result;
/// }
pub fn SET_VEHICLE_STOP_INSTANTLY_WHEN_PLAYER_INACTIVE(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7980292972752141336)), vehicle, toggle);
}
pub fn SET_DISABLE_PRETEND_OCCUPANTS(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2681469048992354070)), vehicle, toggle);
}
pub fn REMOVE_VEHICLES_FROM_GENERATORS_IN_AREA(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, p6: types.Any) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(5089597142388722618)), x1, y1, z1, x2, y2, z2, p6);
}
/// Locks the vehicle's steering to the desired angle, explained below.
/// Requires to be called onTick. Steering is unlocked the moment the function stops being called on the vehicle.
/// Steer bias:
/// -1.0 = full right
/// 0.0 = centered steering
/// 1.0 = full left
pub fn SET_VEHICLE_STEER_BIAS(vehicle: types.Vehicle, value: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4803349002010823870)), vehicle, value);
}
pub fn IS_VEHICLE_EXTRA_TURNED_ON(vehicle: types.Vehicle, extraId: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(15196977125611980989)), vehicle, extraId);
}
/// Available extraIds are 1-14, however none of the vehicles have extras above 12.
pub fn SET_VEHICLE_EXTRA(vehicle: types.Vehicle, extraId: c_int, disable: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(9143331738832080073)), vehicle, extraId, disable);
}
/// Checks via CVehicleModelInfo
pub fn DOES_EXTRA_EXIST(vehicle: types.Vehicle, extraId: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(1324855812493050196)), vehicle, extraId);
}
/// Returns true if specified extra part is broken off. It only works for extras that can break off during collisions, non-breakable extras always return false. Also returns true if the breakable extra is toggled off through script.
/// Used to be known as _DOES_VEHICLE_TYRE_EXIST
pub fn IS_EXTRA_BROKEN_OFF(vehicle: types.Vehicle, extraId: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(6002795641177033821)), vehicle, extraId);
}
pub fn SET_CONVERTIBLE_ROOF(vehicle: types.Vehicle, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17553992667821581506)), vehicle, p1);
}
pub fn LOWER_CONVERTIBLE_ROOF(vehicle: types.Vehicle, instantlyLower: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16056774613380606013)), vehicle, instantlyLower);
}
pub fn RAISE_CONVERTIBLE_ROOF(vehicle: types.Vehicle, instantlyRaise: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10331173284347444336)), vehicle, instantlyRaise);
}
/// 0 -> up
/// 1 -> lowering down
/// 2 -> down
/// 3 -> raising up
pub fn GET_CONVERTIBLE_ROOF_STATE(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(17925337595986853697)), vehicle);
}
/// Returns true if the vehicle has a convertible roof.
/// p1 is false almost always. However, in launcher_carwash/carwash1/carwash2 scripts, p1 is true and is accompanied by DOES_VEHICLE_HAVE_ROOF. If p1 is true, it seems that every single vehicle will return true irrespective of being a convertible.
pub fn IS_VEHICLE_A_CONVERTIBLE(vehicle: types.Vehicle, p1: windows.BOOL) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5977217488152739022)), vehicle, p1);
}
/// Transforms the `stormberg`/`toreador` to its "submarine" variant. If the vehicle is already in that state then the vehicle transformation audio will still play, but the vehicle won't change at all.
/// Used to be known as _TRANSFORM_STORMBERG_TO_WATER_VEHICLE
/// Used to be known as _TRANSFORM_VEHICLE_TO_SUBMARINE
pub fn TRANSFORM_TO_SUBMARINE(vehicle: types.Vehicle, noAnimation: windows.BOOL) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(13712481544041852606)), vehicle, noAnimation);
}
/// Transforms the `stormberg`/`toreador` to its "road vehicle" variant. If the vehicle is already in that state then the vehicle transformation audio will still play, but the vehicle won't change at all.
/// Used to be known as _TRANSFORM_STORMBERG_TO_ROAD_VEHICLE
/// Used to be known as _TRANSFORM_SUBMARINE_TO_VEHICLE
pub fn TRANSFORM_TO_CAR(vehicle: types.Vehicle, noAnimation: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3056255098283622302)), vehicle, noAnimation);
}
/// Used to be known as _GET_IS_SUBMARINE_VEHICLE_TRANSFORMED
pub fn IS_VEHICLE_IN_SUBMARINE_MODE(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12069021430080709093)), vehicle);
}
pub fn IS_VEHICLE_STOPPED_AT_TRAFFIC_LIGHTS(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2979683755510794905)), vehicle);
}
/// Apply damage to vehicle at a location. Location is relative to vehicle model (not world).
/// Radius of effect damage applied in a sphere at impact location
/// When `focusOnModel` set to `true`, the damage sphere will travel towards the vehicle from the given point, thus guaranteeing an impact
pub fn SET_VEHICLE_DAMAGE(vehicle: types.Vehicle, xOffset: f32, yOffset: f32, zOffset: f32, damage: f32, radius: f32, focusOnModel: windows.BOOL) void {
_ = nativeCaller.invoke7(@as(u64, @intCast(11663533030030266153)), vehicle, xOffset, yOffset, zOffset, damage, radius, focusOnModel);
}
pub fn SET_VEHICLE_OCCUPANTS_TAKE_EXPLOSIVE_DAMAGE(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3871725542130074483)), vehicle, toggle);
}
/// Returns 1000.0 if the function is unable to get the address of the specified vehicle or if it's not a vehicle.
/// Minimum: -4000
/// Maximum: 1000
/// -4000: Engine is destroyed
/// 0 and below: Engine catches fire and health rapidly declines
/// 300: Engine is smoking and losing functionality
/// 1000: Engine is perfect
pub fn GET_VEHICLE_ENGINE_HEALTH(vehicle: types.Vehicle) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(14149504890089024184)), vehicle);
}
/// 1000 is max health
/// Begins leaking gas at around 650 health
/// Minimum: -4000
/// Maximum: 1000
/// -4000: Engine is destroyed
/// 0 and below: Engine catches fire and health rapidly declines
/// 300: Engine is smoking and losing functionality
/// 1000: Engine is perfect
pub fn SET_VEHICLE_ENGINE_HEALTH(vehicle: types.Vehicle, health: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5041455353683427057)), vehicle, health);
}
/// Works just like SET_VEHICLE_ENGINE_HEALTH, but only for planes.
/// Used to be known as _SET_PLANE_ENGINE_HEALTH
pub fn SET_PLANE_ENGINE_HEALTH(vehicle: types.Vehicle, health: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3064312824809002036)), vehicle, health);
}
/// 1000 is max health
/// Begins leaking gas at around 650 health
/// -999.90002441406 appears to be minimum health, although nothing special occurs
pub fn GET_VEHICLE_PETROL_TANK_HEALTH(vehicle: types.Vehicle) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(9033565442791362676)), vehicle);
}
/// 1000 is max health
/// Begins leaking gas at around 650 health
/// -999.90002441406 appears to be minimum health, although nothing special occurs
pub fn SET_VEHICLE_PETROL_TANK_HEALTH(vehicle: types.Vehicle, health: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8132189641834549464)), vehicle, health);
}
/// p1 can be anywhere from 0 to 3 in the scripts.
/// p2 being how long in milliseconds the vehicle has been stuck
pub fn IS_VEHICLE_STUCK_TIMER_UP(vehicle: types.Vehicle, p1: c_int, ms: c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(7465809137861765236)), vehicle, p1, ms);
}
/// The inner function has a switch on the second parameter. It's the stuck timer index.
/// Here's some pseudo code I wrote for the inner function:
/// void __fastcall NATIVE_RESET_VEHICLE_STUCK_TIMER_INNER(CUnknown* unknownClassInVehicle, int timerIndex)
/// {
/// switch (timerIndex)
/// {
/// case 0:
/// unknownClassInVehicle->FirstStuckTimer = (WORD)0u;
/// case 1:
/// unknownClassInVehicle->SecondStuckTimer = (WORD)0u;
/// case 2:
/// unknownClassInVehicle->ThirdStuckTimer = (WORD)0u;
/// case 3:
/// unknownClassInVehicle->FourthStuckTimer = (WORD)0u;
/// case 4:
/// unknownClassInVehicle->FirstStuckTimer = (WORD)0u;
/// unknownClassInVehicle->SecondStuckTimer = (WORD)0u;
/// unknownClassInVehicle->ThirdStuckTimer = (WORD)0u;
/// unknownClassInVehicle->FourthStuckTimer = (WORD)0u;
/// break;
/// };
/// }
pub fn RESET_VEHICLE_STUCK_TIMER(vehicle: types.Vehicle, nullAttributes: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15517463679601715834)), vehicle, nullAttributes);
}
/// p1 is always 0 in the scripts.
/// p1 = check if vehicle is on fire
pub fn IS_VEHICLE_DRIVEABLE(vehicle: types.Vehicle, isOnFireCheck: windows.BOOL) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5486543479196481881)), vehicle, isOnFireCheck);
}
pub fn SET_VEHICLE_HAS_BEEN_OWNED_BY_PLAYER(vehicle: types.Vehicle, owned: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3125389474191733293)), vehicle, owned);
}
pub fn SET_VEHICLE_NEEDS_TO_BE_HOTWIRED(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18132988441774804710)), vehicle, toggle);
}
pub fn SET_VEHICLE_BLIP_THROTTLE_RANDOMLY(vehicle: types.Vehicle, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11475005392661980569)), vehicle, p1);
}
pub fn SET_POLICE_FOCUS_WILL_TRACK_VEHICLE(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5653396517677426945)), vehicle, toggle);
}
/// Sounds the horn for the specified vehicle.
/// vehicle: The vehicle to activate the horn for.
/// mode: The hash of "NORMAL" or "HELDDOWN". Can be 0.
/// duration: The duration to sound the horn, in milliseconds.
/// Note: If a player is in the vehicle, it will only sound briefly.
pub fn START_VEHICLE_HORN(vehicle: types.Vehicle, duration: c_int, mode: types.Hash, forever: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(11280502237559143724)), vehicle, duration, mode, forever);
}
/// If set to TRUE, it seems to suppress door noises and doesn't allow the horn to be continuous.
/// Used to be known as _SET_VEHICLE_SILENT
pub fn SET_VEHICLE_IN_CAR_MOD_SHOP(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11332460526619134019)), vehicle, toggle);
}
/// if true, axles won't bend.
pub fn SET_VEHICLE_HAS_STRONG_AXLES(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10588190813215531055)), vehicle, toggle);
}
/// Returns model name of vehicle in all caps. Needs to be displayed through localizing text natives to get proper display name.
/// -----------------------------------------------------------------------------------------------------------------------------------------
/// While often the case, this does not simply return the model name of the vehicle (which could be hashed to return the model hash). Variations of the same vehicle may also use the same display name.
/// -----------------------------------------------------------------------------------------------------------------------------------------
/// Returns "CARNOTFOUND" if the hash doesn't match a vehicle hash.
/// Using HUD::GET_FILENAME_FOR_AUDIO_CONVERSATION, you can get the localized name.
/// Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json
pub fn GET_DISPLAY_NAME_FROM_VEHICLE_MODEL(modelHash: types.Hash) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(12832350468514893849)), modelHash);
}
/// Will return a vehicle's manufacturer display label.
/// Returns "CARNOTFOUND" if the hash doesn't match a vehicle hash.
/// Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json
/// Used to be known as _GET_MAKE_NAME_FROM_VEHICLE_MODEL
pub fn GET_MAKE_NAME_FROM_VEHICLE_MODEL(modelHash: types.Hash) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(17847570802589409175)), modelHash);
}
/// The only example I can find of this function in the scripts, is this:
/// struct _s = VEHICLE::GET_VEHICLE_DEFORMATION_AT_POS(rPtr((A_0) + 4), 1.21f, 6.15f, 0.3f);
/// -----------------------------------------------------------------------------------------------------------------------------------------
/// PC scripts:
/// v_5/*{3}*/ = VEHICLE::GET_VEHICLE_DEFORMATION_AT_POS(a_0._f1, 1.21, 6.15, 0.3);
pub fn GET_VEHICLE_DEFORMATION_AT_POS(vehicle: types.Vehicle, offsetX: f32, offsetY: f32, offsetZ: f32) types.Vector3 {
return nativeCaller.invoke4(@as(u64, @intCast(5676452788774540598)), vehicle, offsetX, offsetY, offsetZ);
}
pub fn SET_VEHICLE_LIVERY(vehicle: types.Vehicle, livery: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6971396915951620534)), vehicle, livery);
}
/// -1 = no livery
pub fn GET_VEHICLE_LIVERY(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(3150587921134411402)), vehicle);
}
/// Returns -1 if the vehicle has no livery
pub fn GET_VEHICLE_LIVERY_COUNT(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(9779071972287304998)), vehicle);
}
/// Used to set the secondary livery (the roof on Tornado Custom being one such example.)
/// Livery value is dependent on the amount of liveries present in the vehicle's texture dictionary, for Tornado Custom this would be 0-6.
/// Used to be known as _SET_VEHICLE_ROOF_LIVERY
pub fn SET_VEHICLE_LIVERY2(vehicle: types.Vehicle, livery: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12021137051077784176)), vehicle, livery);
}
/// Returns index of the current vehicle's secondary livery. A getter for SET_VEHICLE_LIVERY2.
/// Used to be known as _GET_VEHICLE_ROOF_LIVERY
pub fn GET_VEHICLE_LIVERY2(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(6924566214525471270)), vehicle);
}
/// Returns a number of available secondary liveries, or -1 if vehicle has no secondary liveries available.
/// Used to be known as _GET_VEHICLE_ROOF_LIVERY_COUNT
pub fn GET_VEHICLE_LIVERY2_COUNT(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(6830623794211832020)), vehicle);
}
/// This will return false if the window is broken, or rolled down.
/// Window indexes:
/// 0 = Front Right Window
/// 1 = Front Left Window
/// 2 = Back Right Window
/// 3 = Back Left Window
/// Those numbers go on for vehicles that have more than 4 doors with windows.
pub fn IS_VEHICLE_WINDOW_INTACT(vehicle: types.Vehicle, windowIndex: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5108614288122905073)), vehicle, windowIndex);
}
/// Appears to return false if any window is broken.
/// Used to be known as _ARE_ALL_VEHICLE_WINDOWS_INTACT
pub fn ARE_ALL_VEHICLE_WINDOWS_INTACT(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1285886149750401519)), vehicle);
}
/// Returns false if every seat is occupied.
/// Used to be known as _IS_ANY_VEHICLE_SEAT_EMPTY
pub fn ARE_ANY_VEHICLE_SEATS_FREE(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3257505764128700288)), vehicle);
}
pub fn RESET_VEHICLE_WHEELS(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2437262575350542317)), vehicle, toggle);
}
pub fn IS_HELI_PART_BROKEN(vehicle: types.Vehicle, p1: windows.BOOL, p2: windows.BOOL, p3: windows.BOOL) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(13579677505201859722)), vehicle, p1, p2, p3);
}
/// Max 1000.
/// At 0 the main rotor will stall.
/// Used to be known as _GET_HELI_MAIN_ROTOR_HEALTH
pub fn GET_HELI_MAIN_ROTOR_HEALTH(vehicle: types.Vehicle) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(16486399787048096453)), vehicle);
}
/// Max 1000.
/// At 0 the tail rotor will stall.
/// Used to be known as _GET_HELI_TAIL_ROTOR_HEALTH
pub fn GET_HELI_TAIL_ROTOR_HEALTH(vehicle: types.Vehicle) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(12577683127534201996)), vehicle);
}
/// Max 1000.
/// At -100 both helicopter rotors will stall.
/// Used to be known as _GET_HELI_ENGINE_HEALTH
pub fn GET_HELI_TAIL_BOOM_HEALTH(vehicle: types.Vehicle) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(12416865476924450295)), vehicle);
}
/// Used to be known as _SET_HELI_MAIN_ROTOR_HEALTH
pub fn SET_HELI_MAIN_ROTOR_HEALTH(vehicle: types.Vehicle, health: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4636150225259834327)), vehicle, health);
}
/// Used to be known as _SET_HELI_TAIL_ROTOR_HEALTH
pub fn SET_HELI_TAIL_ROTOR_HEALTH(vehicle: types.Vehicle, health: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18311740781874220635)), vehicle, health);
}
/// Used to be known as WAS_COUNTER_ACTIVATED
/// Used to be known as SET_HELI_TAIL_EXPLODE_THROW_DASHBOARD
pub fn SET_HELI_TAIL_BOOM_CAN_BREAK_OFF(vehicle: types.Vehicle, toggle: windows.BOOL) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(4524075938350448617)), vehicle, toggle);
}
/// NOTE: Debugging functions are not present in the retail version of the game.
pub fn SET_VEHICLE_NAME_DEBUG(vehicle: types.Vehicle, name: [*c]const u8) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13825936842566056271)), vehicle, name);
}
/// Sets a vehicle to be strongly resistant to explosions. p0 is the vehicle; set p1 to false to toggle the effect on/off.
pub fn SET_VEHICLE_EXPLODES_ON_HIGH_EXPLOSION_DAMAGE(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8192198556078167562)), vehicle, toggle);
}
pub fn SET_VEHICLE_EXPLODES_ON_EXPLOSION_DAMAGE_AT_ZERO_BODY_HEALTH(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15376965024408866320)), vehicle, toggle);
}
pub fn SET_ALLOW_VEHICLE_EXPLODES_ON_CONTACT(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3765513770812774691)), vehicle, toggle);
}
pub fn SET_VEHICLE_DISABLE_TOWING(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3127547608149237099)), vehicle, toggle);
}
/// Used to be known as _GET_VEHICLE_HAS_LANDING_GEAR
/// Used to be known as _DOES_VEHICLE_HAVE_LANDING_GEAR
pub fn GET_VEHICLE_HAS_LANDING_GEAR(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16444614503220375972)), vehicle);
}
/// Works for vehicles with a retractable landing gear
/// Landing gear states:
/// 0: Deployed
/// 1: Closing
/// 2: Opening
/// 3: Retracted
/// Used to be known as _SET_VEHICLE_LANDING_GEAR
pub fn CONTROL_LANDING_GEAR(vehicle: types.Vehicle, state: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14972426531406603637)), vehicle, state);
}
/// Landing gear states:
/// 0: Deployed
/// 1: Closing (Retracting)
/// 2: (Landing gear state 2 is never used.)
/// 3: Opening (Deploying)
/// 4: Retracted
/// Returns the current state of the vehicles landing gear.
/// Used to be known as _GET_VEHICLE_LANDING_GEAR
pub fn GET_LANDING_GEAR_STATE(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(11173217139357185229)), vehicle);
}
pub fn IS_ANY_VEHICLE_NEAR_POINT(x: f32, y: f32, z: f32, radius: f32) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(7053161900751974118)), x, y, z, radius);
}
pub fn REQUEST_VEHICLE_HIGH_DETAIL_MODEL(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12027423328935770206)), vehicle);
}
pub fn _GET_VEHICLE_MODEL_NUM_DRIVE_GEARS(vehicleModel: types.Hash) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(7057191531223605738)), vehicleModel);
}
pub fn _GET_VEHICLE_MAX_DRIVE_GEAR_COUNT(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(2634900714844485389)), vehicle);
}
pub fn _GET_VEHICLE_CURRENT_DRIVE_GEAR(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(6203807605225819597)), vehicle);
}
pub fn _GET_VEHICLE_CURRENT_REV_RATIO(vehicle: types.Vehicle) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(18004727255713162782)), vehicle);
}
pub fn REMOVE_VEHICLE_HIGH_DETAIL_MODEL(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(29445876476569479)), vehicle);
}
pub fn IS_VEHICLE_HIGH_DETAIL(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2244350069363982968)), vehicle);
}
/// REQUEST_VEHICLE_ASSET(GET_HASH_KEY(cargobob3), 3);
/// vehicle found that have asset's:
/// cargobob3
/// submersible
/// blazer
pub fn REQUEST_VEHICLE_ASSET(vehicleHash: types.Hash, vehicleAsset: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9340843933356239674)), vehicleHash, vehicleAsset);
}
pub fn HAS_VEHICLE_ASSET_LOADED(vehicleAsset: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1999040935582472737)), vehicleAsset);
}
pub fn REMOVE_VEHICLE_ASSET(vehicleAsset: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12458814499592986293)), vehicleAsset);
}
/// Sets how much the crane on the tow truck is raised, where 0.0 is fully lowered and 1.0 is fully raised.
/// Used to be known as _SET_TOW_TRUCK_CRANE_RAISED
/// Used to be known as _SET_TOW_TRUCK_CRANE_HEIGHT
pub fn SET_VEHICLE_TOW_TRUCK_ARM_POSITION(vehicle: types.Vehicle, position: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18326476374594126794)), vehicle, position);
}
pub fn _SET_ATTACHED_VEHICLE_TO_TOW_TRUCK_ARM(towTruck: types.Vehicle, vehicle: types.Vehicle) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5241442095903242346)), towTruck, vehicle);
}
/// HookOffset defines where the hook is attached. leave at 0 for default attachment.
pub fn ATTACH_VEHICLE_TO_TOW_TRUCK(towTruck: types.Vehicle, vehicle: types.Vehicle, rear: windows.BOOL, hookOffsetX: f32, hookOffsetY: f32, hookOffsetZ: f32) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(2999801479832552712)), towTruck, vehicle, rear, hookOffsetX, hookOffsetY, hookOffsetZ);
}
/// First two parameters swapped. Scripts verify that towTruck is the first parameter, not the second.
pub fn DETACH_VEHICLE_FROM_TOW_TRUCK(towTruck: types.Vehicle, vehicle: types.Vehicle) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14040934353521151704)), towTruck, vehicle);
}
pub fn DETACH_VEHICLE_FROM_ANY_TOW_TRUCK(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15053789753048992984)), vehicle);
}
/// Scripts verify that towTruck is the first parameter, not the second.
pub fn IS_VEHICLE_ATTACHED_TO_TOW_TRUCK(towTruck: types.Vehicle, vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(1472107446507642836)), towTruck, vehicle);
}
pub fn GET_ENTITY_ATTACHED_TO_TOW_TRUCK(towTruck: types.Vehicle) types.Entity {
return nativeCaller.invoke1(@as(u64, @intCast(17287657456831270773)), towTruck);
}
pub fn SET_VEHICLE_AUTOMATICALLY_ATTACHES(vehicle: types.Vehicle, p1: windows.BOOL, p2: types.Any) types.Entity {
return nativeCaller.invoke3(@as(u64, @intCast(10063002459648431251)), vehicle, p1, p2);
}
/// Sets the arm position of a bulldozer. Position must be a value between 0.0 and 1.0. Ignored when `p2` is set to false, instead incrementing arm position by 0.1 (or 10%).
pub fn SET_VEHICLE_BULLDOZER_ARM_POSITION(vehicle: types.Vehicle, position: f32, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(17936655106386403255)), vehicle, position, p2);
}
pub fn SET_VEHICLE_TANK_TURRET_POSITION(vehicle: types.Vehicle, position: f32, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(6249109990886858682)), vehicle, position, p2);
}
pub fn SET_VEHICLE_TURRET_TARGET(vehicle: types.Vehicle, p1: windows.BOOL, x: f32, y: f32, z: f32, p5: windows.BOOL) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(396724732079637522)), vehicle, p1, x, y, z, p5);
}
pub fn SET_VEHICLE_TANK_STATIONARY(vehicle: types.Vehicle, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8322152388585918463)), vehicle, p1);
}
pub fn SET_VEHICLE_TURRET_SPEED_THIS_FRAME(vehicle: types.Vehicle, speed: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1194369293196529990)), vehicle, speed);
}
/// Used to be known as _DISABLE_VEHICLE_TURRET_MOVEMENT_THIS_FRAME
pub fn DISABLE_VEHICLE_TURRET_MOVEMENT_THIS_FRAME(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3659999272077112133)), vehicle);
}
/// Used to be known as _SET_DESIRED_VERTICAL_FLIGHT_PHASE
/// Used to be known as _SET_PLANE_VTOL_DESIRED_DIRECTION
pub fn SET_VEHICLE_FLIGHT_NOZZLE_POSITION(vehicle: types.Vehicle, angleRatio: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3519415630288612819)), vehicle, angleRatio);
}
/// Used to be known as _SET_VERTICAL_FLIGHT_PHASE
/// Used to be known as _SET_PLANE_VTOL_DIRECTION
pub fn SET_VEHICLE_FLIGHT_NOZZLE_POSITION_IMMEDIATE(vehicle: types.Vehicle, angle: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11143172112926947634)), vehicle, angle);
}
/// Used to be known as _GET_PLANE_HOVER_MODE_PERCENTAGE
/// Used to be known as _GET_VEHICLE_HOVER_MODE_PERCENTAGE
/// Used to be known as _GET_PLANE_VTOL_DIRECTION
/// Used to be known as _GET_VEHICLE_FLIGHT_NOZZLE_POSITION
pub fn GET_VEHICLE_FLIGHT_NOZZLE_POSITION(plane: types.Vehicle) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(15736142781931532910)), plane);
}
/// True stops vtols from switching modes. Doesn't stop the sound though.
/// Used to be known as _SET_PLANE_VTOL_ANIMATION_DISABLED
/// Used to be known as _SET_DISABLE_VEHICLE_FLIGHT_NOZZLE_POSITION
pub fn SET_DISABLE_VERTICAL_FLIGHT_MODE_TRANSITION(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14856041974383075215)), vehicle, toggle);
}
pub fn GENERATE_VEHICLE_CREATION_POS_FROM_PATHS(outVec: [*c]types.Vector3, p1: types.Any, outVec1: [*c]types.Vector3, p3: types.Any, p4: types.Any, p5: types.Any, p6: types.Any, p7: types.Any, p8: types.Any) windows.BOOL {
return nativeCaller.invoke9(@as(u64, @intCast(11854088970562390032)), outVec, p1, outVec1, p3, p4, p5, p6, p7, p8);
}
/// On accelerating, spins the driven wheels with the others braked, so you don't go anywhere.
pub fn SET_VEHICLE_BURNOUT(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18124618246404268283)), vehicle, toggle);
}
/// Returns whether the specified vehicle is currently in a burnout.
/// vb.net
/// Public Function isVehicleInBurnout(vh As Vehicle) As Boolean
/// Return Native.Function.Call(Of Boolean)(Hash.IS_VEHICLE_IN_BURNOUT, vh)
/// End Function
pub fn IS_VEHICLE_IN_BURNOUT(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1339724742140375275)), vehicle);
}
/// Reduces grip significantly so it's hard to go anywhere.
pub fn SET_VEHICLE_REDUCE_GRIP(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2463458723210797794)), vehicle, toggle);
}
/// val is 0-3
/// Often used in conjunction with: SET_VEHICLE_REDUCE_GRIP
/// Used to be known as _SET_VEHICLE_REDUCE_TRACTION
pub fn SET_VEHICLE_REDUCE_GRIP_LEVEL(vehicle: types.Vehicle, val: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7921431857838230779)), vehicle, val);
}
/// Sets the turn signal enabled for a vehicle.
/// Set turnSignal to 1 for left light, 0 for right light.
pub fn SET_VEHICLE_INDICATOR_LIGHTS(vehicle: types.Vehicle, turnSignal: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(13102187807342558704)), vehicle, turnSignal, toggle);
}
pub fn SET_VEHICLE_BRAKE_LIGHTS(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10570881273414561638)), vehicle, toggle);
}
pub fn SET_VEHICLE_TAIL_LIGHTS(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6347187226712444404)), vehicle, toggle);
}
pub fn SET_VEHICLE_HANDBRAKE(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7514121110102895138)), vehicle, toggle);
}
pub fn SET_VEHICLE_BRAKE(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16493023177471202908)), vehicle, toggle);
}
pub fn INSTANTLY_FILL_VEHICLE_POPULATION() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(5237062563221882480)));
}
/// Used to be known as _HAS_FILLED_VEHICLE_POPULATION
pub fn HAS_INSTANT_FILL_VEHICLE_POPULATION_FINISHED() windows.BOOL {
return nativeCaller.invoke0(@as(u64, @intCast(10508829948822211499)));
}
pub fn NETWORK_ENABLE_EMPTY_CROWDING_VEHICLES_REMOVAL(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5898325932266726880)), toggle);
}
/// Default:1000||This sets a value which is used when NETWORK_ENABLE_EMPTY_CROWDING_VEHICLES_REMOVAL(true) is called each frame.
pub fn NETWORK_CAP_EMPTY_CROWDING_VEHICLES_REMOVAL(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11865195855246088325)), p0);
}
/// Gets the trailer of a vehicle and puts it into the trailer parameter.
pub fn GET_VEHICLE_TRAILER_VEHICLE(vehicle: types.Vehicle, trailer: [*c]types.Vehicle) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(2079936996953260813)), vehicle, trailer);
}
pub fn _GET_VEHICLE_TRAILER_PARENT_VEHICLE(trailer: types.Vehicle) types.Vehicle {
return nativeCaller.invoke1(@as(u64, @intCast(9284684267872754834)), trailer);
}
/// vehicle must be a plane
pub fn SET_VEHICLE_USES_LARGE_REAR_RAMP(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14611477472789977703)), vehicle, toggle);
}
pub fn SET_VEHICLE_RUDDER_BROKEN(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(675646909037616623)), vehicle, toggle);
}
pub fn SET_CONVERTIBLE_ROOF_LATCH_STATE(vehicle: types.Vehicle, state: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1907464921881269103)), vehicle, state);
}
/// Used to be known as _GET_VEHICLE_MAX_SPEED
pub fn GET_VEHICLE_ESTIMATED_MAX_SPEED(vehicle: types.Vehicle) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(6030207453007825479)), vehicle);
}
pub fn GET_VEHICLE_MAX_BRAKING(vehicle: types.Vehicle) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(12501576933583198148)), vehicle);
}
pub fn GET_VEHICLE_MAX_TRACTION(vehicle: types.Vehicle) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(11615622724727426480)), vehicle);
}
/// static - max acceleration
pub fn GET_VEHICLE_ACCELERATION(vehicle: types.Vehicle) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(6760849226395965358)), vehicle);
}
/// Returns max speed (without mods) of the specified vehicle model in m/s.
/// Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json
/// Used to be known as _GET_VEHICLE_MODEL_MAX_SPEED
pub fn GET_VEHICLE_MODEL_ESTIMATED_MAX_SPEED(modelHash: types.Hash) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(17588740519377235267)), modelHash);
}
/// Returns max braking of the specified vehicle model.
/// Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json
pub fn GET_VEHICLE_MODEL_MAX_BRAKING(modelHash: types.Hash) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(15876311570061300812)), modelHash);
}
/// Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json
/// Used to be known as _GET_VEHICLE_MODEL_HAND_BRAKE
pub fn GET_VEHICLE_MODEL_MAX_BRAKING_MAX_MODS(modelHash: types.Hash) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(13815420397991984831)), modelHash);
}
/// Returns max traction of the specified vehicle model.
/// Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json
pub fn GET_VEHICLE_MODEL_MAX_TRACTION(modelHash: types.Hash) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(6025228394570841357)), modelHash);
}
/// Returns the acceleration of the specified model.
/// Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json
pub fn GET_VEHICLE_MODEL_ACCELERATION(modelHash: types.Hash) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(10089273025457314666)), modelHash);
}
/// 9.8 * thrust if air vehicle, else 0.38 + drive force?
/// Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json
/// Used to be known as _GET_VEHICLE_MODEL_DOWN_FORCE
/// Used to be known as _GET_VEHICLE_MODEL_ESTIMATED_AGILITY
pub fn GET_VEHICLE_MODEL_ACCELERATION_MAX_MODS(modelHash: types.Hash) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(5998965477527107654)), modelHash);
}
/// Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json
/// Used to be known as _GET_VEHICLE_MODEL_MAX_KNOTS
pub fn GET_FLYING_VEHICLE_MODEL_AGILITY(modelHash: types.Hash) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(14316116923238077644)), modelHash);
}
/// Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json
/// Used to be known as _GET_VEHICLE_MODEL_MOVE_RESISTANCE
pub fn GET_BOAT_VEHICLE_MODEL_AGILITY(modelHash: types.Hash) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(6531337081606161660)), modelHash);
}
/// Used to be known as _GET_VEHICLE_CLASS_MAX_SPEED
pub fn GET_VEHICLE_CLASS_ESTIMATED_MAX_SPEED(vehicleClass: c_int) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(54218174286978434)), vehicleClass);
}
pub fn GET_VEHICLE_CLASS_MAX_TRACTION(vehicleClass: c_int) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(15837028510951904353)), vehicleClass);
}
pub fn GET_VEHICLE_CLASS_MAX_AGILITY(vehicleClass: c_int) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(5733938639626755643)), vehicleClass);
}
pub fn GET_VEHICLE_CLASS_MAX_ACCELERATION(vehicleClass: c_int) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(3423835109740947374)), vehicleClass);
}
pub fn GET_VEHICLE_CLASS_MAX_BRAKING(vehicleClass: c_int) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(5473364583480552451)), vehicleClass);
}
/// Used to be known as _ADD_SPEED_ZONE_FOR_COORD
pub fn ADD_ROAD_NODE_SPEED_ZONE(x: f32, y: f32, z: f32, radius: f32, speed: f32, p5: windows.BOOL) c_int {
return nativeCaller.invoke6(@as(u64, @intCast(3235067526940988064)), x, y, z, radius, speed, p5);
}
/// Used to be known as _REMOVE_SPEED_ZONE
pub fn REMOVE_ROAD_NODE_SPEED_ZONE(speedzone: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1167337338073268903)), speedzone);
}
/// Used to be known as _OPEN_VEHICLE_BOMB_BAY
pub fn OPEN_BOMB_BAY_DOORS(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9793062281908792497)), vehicle);
}
pub fn CLOSE_BOMB_BAY_DOORS(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3843263829955894388)), vehicle);
}
/// Returns true when the bomb bay doors of this plane are open. False if they're closed.
/// Used to be known as _GET_ARE_BOMB_BAY_DOORS_OPEN
/// Used to be known as _ARE_BOMB_BAY_DOORS_OPEN
pub fn GET_ARE_BOMB_BAY_DOORS_OPEN(aircraft: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15028927856255482792)), aircraft);
}
/// Possibly: Returns whether the searchlight (found on police vehicles) is toggled on.
/// @Author Nac
pub fn IS_VEHICLE_SEARCHLIGHT_ON(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13905285848649779591)), vehicle);
}
/// Only works during nighttime.
pub fn SET_VEHICLE_SEARCHLIGHT(heli: types.Vehicle, toggle: windows.BOOL, canBeUsedByAI: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(1506555638038451522)), heli, toggle, canBeUsedByAI);
}
/// Used to be known as _DOES_VEHICLE_HAVE_SEARCHLIGHT
pub fn DOES_VEHICLE_HAVE_SEARCHLIGHT(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11025197643980230931)), vehicle);
}
/// Check if a vehicle seat is accessible. If you park your vehicle near a wall and the ped cannot enter/exit this side, the return value toggles from true (not blocked) to false (blocked).
/// seatIndex = -1 being the driver seat.
/// Use GET_VEHICLE_MAX_NUMBER_OF_PASSENGERS(vehicle) - 1 for last seat index.
/// side = only relevant for bikes/motorcycles to check if the left (false)/right (true) side is blocked.
/// onEnter = check if you can enter (true) or exit (false) a vehicle.
/// Used to be known as _IS_VEHICLE_SEAT_ACCESSIBLE
pub fn IS_ENTRY_POINT_FOR_SEAT_CLEAR(ped: types.Ped, vehicle: types.Vehicle, seatIndex: c_int, side: windows.BOOL, onEnter: windows.BOOL) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(7175414981322189399)), ped, vehicle, seatIndex, side, onEnter);
}
/// doorId: see SET_VEHICLE_DOOR_SHUT
/// Used to be known as _GET_ENTRY_POSITION_OF_DOOR
pub fn GET_ENTRY_POINT_POSITION(vehicle: types.Vehicle, doorId: c_int) types.Vector3 {
return nativeCaller.invoke2(@as(u64, @intCast(13859591633263918499)), vehicle, doorId);
}
pub fn CAN_SHUFFLE_SEAT(vehicle: types.Vehicle, seatIndex: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(3492644387460398901)), vehicle, seatIndex);
}
pub fn GET_NUM_MOD_KITS(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(3743304922253930013)), vehicle);
}
/// Set modKit to 0 if you plan to call SET_VEHICLE_MOD. That's what the game does. Most body modifications through SET_VEHICLE_MOD will not take effect until this is set to 0.
/// Full list of vehicle mod kits and mods by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicleModKits.json
pub fn SET_VEHICLE_MOD_KIT(vehicle: types.Vehicle, modKit: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2245783831530643834)), vehicle, modKit);
}
pub fn GET_VEHICLE_MOD_KIT(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(7144346870170407181)), vehicle);
}
pub fn GET_VEHICLE_MOD_KIT_TYPE(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(18160078651065191474)), vehicle);
}
/// Returns an int
/// Wheel Types:
/// 0: Sport
/// 1: Muscle
/// 2: Lowrider
/// 3: SUV
/// 4: Offroad
/// 5: Tuner
/// 6: Bike Wheels
/// 7: High End
/// 8: Benny's Originals
/// 9: Benny's Bespoke
/// 10: Racing
/// 11: Street
/// 12: Track
/// Tested in Los Santos Customs
pub fn GET_VEHICLE_WHEEL_TYPE(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(12965049668393645788)), vehicle);
}
/// 0: Sport
/// 1: Muscle
/// 2: Lowrider
/// 3: SUV
/// 4: Offroad
/// 5: Tuner
/// 6: Bike Wheels
/// 7: High End
/// 8: Benny's Originals
/// 9: Benny's Bespoke
/// 10: Racing
/// 11: Street
/// 12: Track
pub fn SET_VEHICLE_WHEEL_TYPE(vehicle: types.Vehicle, WheelType: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5223808454466558881)), vehicle, WheelType);
}
/// paintType:
/// 0: Normal
/// 1: Metallic
/// 2: Pearl
/// 3: Matte
/// 4: Metal
/// 5: Chrome
/// 6: Chameleon
pub fn GET_NUM_MOD_COLORS(paintType: c_int, p1: windows.BOOL) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(11912511502899890029)), paintType, p1);
}
/// paintType:
/// 0: Normal
/// 1: Metallic
/// 2: Pearl
/// 3: Matte
/// 4: Metal
/// 5: Chrome
/// 6: Chameleon
/// color: number of the color.
/// p3 seems to always be 0.
/// Full list of vehicle colors and vehicle plates by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicleColors.json
pub fn SET_VEHICLE_MOD_COLOR_1(vehicle: types.Vehicle, paintType: c_int, color: c_int, pearlescentColor: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(4899557154630895032)), vehicle, paintType, color, pearlescentColor);
}
/// Changes the secondary paint type and color
/// paintType:
/// 0: Normal
/// 1: Metallic
/// 2: Pearl
/// 3: Matte
/// 4: Metal
/// 5: Chrome
/// 6: Chameleon
/// color: number of the color
/// Full list of vehicle colors and vehicle plates by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicleColors.json
pub fn SET_VEHICLE_MOD_COLOR_2(vehicle: types.Vehicle, paintType: c_int, color: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(9323967158299838526)), vehicle, paintType, color);
}
pub fn GET_VEHICLE_MOD_COLOR_1(vehicle: types.Vehicle, paintType: [*c]c_int, color: [*c]c_int, pearlescentColor: [*c]c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(16777699334157870739)), vehicle, paintType, color, pearlescentColor);
}
pub fn GET_VEHICLE_MOD_COLOR_2(vehicle: types.Vehicle, paintType: [*c]c_int, color: [*c]c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(9320529165889799976)), vehicle, paintType, color);
}
/// Returns a string which is the codename of the vehicle's currently selected primary color
/// p1 is always 0
pub fn GET_VEHICLE_MOD_COLOR_1_NAME(vehicle: types.Vehicle, p1: windows.BOOL) [*c]const u8 {
return nativeCaller.invoke2(@as(u64, @intCast(12993031946558755724)), vehicle, p1);
}
/// Returns a string which is the codename of the vehicle's currently selected secondary color
pub fn GET_VEHICLE_MOD_COLOR_2_NAME(vehicle: types.Vehicle) [*c]const u8 {
return nativeCaller.invoke1(@as(u64, @intCast(5289377805256336801)), vehicle);
}
/// Used to be known as _IS_VEHICLE_MOD_LOAD_DONE
pub fn HAVE_VEHICLE_MODS_STREAMED_IN(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11134013156105876975)), vehicle);
}
/// Returns true for any mod part listed in GEN9_EXCLUSIVE_ASSETS_VEHICLES_FILE.
/// Used to be known as _IS_VEHICLE_MOD_HSW_EXCLUSIVE
pub fn IS_VEHICLE_MOD_GEN9_EXCLUSIVE(vehicle: types.Vehicle, modType: c_int, modIndex: c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(36959723841839120)), vehicle, modType, modIndex);
}
/// In b944, there are 50 (0 - 49) mod types.
/// Sets the vehicle mod.
/// The vehicle must have a mod kit first.
/// Any out of range ModIndex is stock.
/// #Mod Type
/// Spoilers - 0
/// Front Bumper - 1
/// Rear Bumper - 2
/// Side Skirt - 3
/// Exhaust - 4
/// Frame - 5
/// Grille - 6
/// Hood - 7
/// Fender - 8
/// Right Fender - 9
/// Roof - 10
/// Engine - 11
/// Brakes - 12
/// Transmission - 13
/// Horns - 14 (modIndex from 0 to 51)
/// Suspension - 15
/// Armor - 16
/// Front Wheels - 23
/// Back Wheels - 24 //only for motocycles
/// Plate holders - 25
/// Trim Design - 27
/// Ornaments - 28
/// Dial Design - 30
/// Steering Wheel - 33
/// Shifter Leavers - 34
/// Plaques - 35
/// Hydraulics - 38
/// Livery - 48
/// ENUMS: https://pastebin.com/QzEAn02v
pub fn SET_VEHICLE_MOD(vehicle: types.Vehicle, modType: c_int, modIndex: c_int, customTires: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(7705768285972510429)), vehicle, modType, modIndex, customTires);
}
/// In b944, there are 50 (0 - 49) mod types. See SET_VEHICLE_MOD for the list.
/// Returns -1 if the vehicle mod is stock
pub fn GET_VEHICLE_MOD(vehicle: types.Vehicle, modType: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(8586499896144719835)), vehicle, modType);
}
/// Only used for wheels(ModType = 23/24) Returns true if the wheels are custom wheels
pub fn GET_VEHICLE_MOD_VARIATION(vehicle: types.Vehicle, modType: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(12939491323657885148)), vehicle, modType);
}
/// Returns how many possible mods a vehicle has for a given mod type
pub fn GET_NUM_VEHICLE_MODS(vehicle: types.Vehicle, modType: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(16397203146118530630)), vehicle, modType);
}
pub fn REMOVE_VEHICLE_MOD(vehicle: types.Vehicle, modType: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10580672842142417412)), vehicle, modType);
}
/// Toggles:
/// UNK17 - 17
/// Turbo - 18
/// UNK19 - 19
/// Tire Smoke - 20
/// UNK21 - 21
/// Xenon Headlights - 22
pub fn TOGGLE_VEHICLE_MOD(vehicle: types.Vehicle, modType: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(3035231775696334088)), vehicle, modType, toggle);
}
pub fn IS_TOGGLE_MOD_ON(vehicle: types.Vehicle, modType: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(9561761758880500455)), vehicle, modType);
}
/// Returns the text label of a mod type for a given vehicle
/// Use GET_FILENAME_FOR_AUDIO_CONVERSATION to get the part name in the game's language
pub fn GET_MOD_TEXT_LABEL(vehicle: types.Vehicle, modType: c_int, modValue: c_int) [*c]const u8 {
return nativeCaller.invoke3(@as(u64, @intCast(9886916650758148812)), vehicle, modType, modValue);
}
/// Returns the name for the type of vehicle mod(Armour, engine etc)
pub fn GET_MOD_SLOT_NAME(vehicle: types.Vehicle, modType: c_int) [*c]const u8 {
return nativeCaller.invoke2(@as(u64, @intCast(5904499186143762624)), vehicle, modType);
}
/// Returns the text label of the vehicle's liveryIndex, as specified by the liveryNames section of the vehicle's modkit data in the carcols file.
/// example
/// int count = VEHICLE::GET_VEHICLE_LIVERY_COUNT(veh);
/// for (int i = 0; i < count; i++)
/// {
/// const char* LiveryName = VEHICLE::GET_LIVERY_NAME(veh, i);
/// }
/// this example will work fine to fetch all names
/// for example for Sanchez we get
/// SANC_LV1
/// SANC_LV2
/// SANC_LV3
/// SANC_LV4
/// SANC_LV5
/// Use GET_FILENAME_FOR_AUDIO_CONVERSATION, to get the localized livery name.
/// Full list of vehicle mod kits and mods by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicleModKits.json
pub fn GET_LIVERY_NAME(vehicle: types.Vehicle, liveryIndex: c_int) [*c]const u8 {
return nativeCaller.invoke2(@as(u64, @intCast(13026566506111638047)), vehicle, liveryIndex);
}
pub fn GET_VEHICLE_MOD_MODIFIER_VALUE(vehicle: types.Vehicle, modType: c_int, modIndex: c_int) c_int {
return nativeCaller.invoke3(@as(u64, @intCast(10422330747105880257)), vehicle, modType, modIndex);
}
/// Can be used for IS_DLC_VEHICLE_MOD and GET_DLC_VEHICLE_MOD_LOCK_HASH
/// Used to be known as _GET_VEHICLE_MOD_DATA
pub fn GET_VEHICLE_MOD_IDENTIFIER_HASH(vehicle: types.Vehicle, modType: c_int, modIndex: c_int) types.Hash {
return nativeCaller.invoke3(@as(u64, @intCast(5013578970299864838)), vehicle, modType, modIndex);
}
pub fn PRELOAD_VEHICLE_MOD(vehicle: types.Vehicle, modType: c_int, modIndex: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(8471070522906859146)), vehicle, modType, modIndex);
}
pub fn HAS_PRELOAD_MODS_FINISHED(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(501093978136604054)), vehicle);
}
pub fn RELEASE_PRELOAD_MODS(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4926227680272089863)), vehicle);
}
/// Sets the tire smoke's color of this vehicle.
/// vehicle: The vehicle that is the target of this method.
/// r: The red level in the RGB color code.
/// g: The green level in the RGB color code.
/// b: The blue level in the RGB color code.
/// Note: setting r,g,b to 0 will give the car the "Patriot" tire smoke.
pub fn SET_VEHICLE_TYRE_SMOKE_COLOR(vehicle: types.Vehicle, r: c_int, g: c_int, b: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(13094920670137621519)), vehicle, r, g, b);
}
pub fn GET_VEHICLE_TYRE_SMOKE_COLOR(vehicle: types.Vehicle, r: [*c]c_int, g: [*c]c_int, b: [*c]c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(13129463142448411587)), vehicle, r, g, b);
}
/// enum WindowTints
/// {
/// WINDOWTINT_NONE,
/// WINDOWTINT_PURE_BLACK,
/// WINDOWTINT_DARKSMOKE,
/// WINDOWTINT_LIGHTSMOKE,
/// WINDOWTINT_STOCK,
/// WINDOWTINT_LIMO,
/// WINDOWTINT_GREEN
/// };
/// Full list of all vehicle window tints by DurtyFree https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicleColors.json
pub fn SET_VEHICLE_WINDOW_TINT(vehicle: types.Vehicle, tint: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6324494699532199574)), vehicle, tint);
}
pub fn GET_VEHICLE_WINDOW_TINT(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(1072440087508450453)), vehicle);
}
pub fn GET_NUM_VEHICLE_WINDOW_TINTS() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(11318148397216196359)));
}
/// What's this for? Primary and Secondary RGB have their own natives and this one doesn't seem specific.
pub fn GET_VEHICLE_COLOR(vehicle: types.Vehicle, r: [*c]c_int, g: [*c]c_int, b: [*c]c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(17567543846557062472)), vehicle, r, g, b);
}
/// Some kind of flags.
pub fn GET_VEHICLE_COLOURS_WHICH_CAN_BE_SET(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(17203688625676236212)), vehicle);
}
/// iVar3 = get_vehicle_cause_of_destruction(uLocal_248[iVar2]);
/// if (iVar3 == joaat("weapon_stickybomb"))
/// {
/// func_171(726);
/// iLocal_260 = 1;
/// }
pub fn GET_VEHICLE_CAUSE_OF_DESTRUCTION(vehicle: types.Vehicle) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(16471302037889482016)), vehicle);
}
/// Used for helis.
/// Used to be known as _OVERRIDE_OVERHEAT_HEALTH
pub fn OVERRIDE_PLANE_DAMAGE_THREHSOLD(vehicle: types.Vehicle, health: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6837980663949203093)), vehicle, health);
}
pub fn _SET_TRANSMISSION_REDUCED_GEAR_RATIO(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3710670589067639184)), vehicle, toggle);
}
pub fn _GET_VEHICLE_DESIRED_DRIVE_GEAR(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(18270229796996110149)), vehicle);
}
/// From the driver's perspective, is the left headlight broken.
/// Used to be known as _IS_HEADLIGHT_L_BROKEN
pub fn GET_IS_LEFT_VEHICLE_HEADLIGHT_DAMAGED(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6843075163391201699)), vehicle);
}
/// From the driver's perspective, is the right headlight broken.
/// Used to be known as _IS_HEADLIGHT_R_BROKEN
pub fn GET_IS_RIGHT_VEHICLE_HEADLIGHT_DAMAGED(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12100247729950371616)), vehicle);
}
/// Returns true when both headlights are broken. This does not include extralights.
/// Used to be known as _IS_VEHICLE_ENGINE_ON_FIRE
pub fn GET_BOTH_VEHICLE_HEADLIGHTS_DAMAGED(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(17035338351297355971)), vehicle);
}
/// Used to be known as _SET_VEHICLE_ENGINE_POWER_MULTIPLIER
pub fn MODIFY_VEHICLE_TOP_SPEED(vehicle: types.Vehicle, value: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10638515397018075480)), vehicle, value);
}
/// To reset the max speed, set the `speed` value to `0.0` or lower.
/// Used to be known as _SET_VEHICLE_MAX_SPEED
pub fn SET_VEHICLE_MAX_SPEED(vehicle: types.Vehicle, speed: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13447825130553031686)), vehicle, speed);
}
/// Has something to do with trains. Always precedes SET_MISSION_TRAIN_AS_NO_LONGER_NEEDED.
/// May be true that it can be used with trains not sure, but not specifically for trains. Go find Xbox360 decompiled scripts and search for 'func_1333' in freemode.c it isn't used just for trains. Thanks for the info tho.
pub fn SET_VEHICLE_STAYS_FROZEN_WHEN_CLEANED_UP(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2086166438371148249)), vehicle, toggle);
}
pub fn SET_VEHICLE_ACT_AS_IF_HIGH_SPEED_FOR_FRAG_SMASHING(vehicle: types.Vehicle, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2278740525307151058)), vehicle, p1);
}
/// Sets some bit and float of vehicle. float is >= 0
pub fn SET_PEDS_CAN_FALL_OFF_THIS_VEHICLE_FROM_LARGE_FALL_DAMAGE(vehicle: types.Vehicle, toggle: windows.BOOL, p2: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(6468142661973051624)), vehicle, toggle, p2);
}
/// Used to be known as _ADD_VEHICLE_COMBAT_AVOIDANCE_AREA
pub fn ADD_VEHICLE_COMBAT_ANGLED_AVOIDANCE_AREA(p0: f32, p1: f32, p2: f32, p3: f32, p4: f32, p5: f32, p6: f32) c_int {
return nativeCaller.invoke7(@as(u64, @intCast(6102648063364385375)), p0, p1, p2, p3, p4, p5, p6);
}
pub fn REMOVE_VEHICLE_COMBAT_AVOIDANCE_AREA(p0: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16358521772546410525)), p0);
}
/// Used to be known as _ANY_PASSENGERS_RAPPELING
/// Used to be known as _IS_ANY_PASSENGER_RAPPELING_FROM_VEHICLE
pub fn IS_ANY_PED_RAPPELLING_FROM_HELI(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2962866341200953063)), vehicle);
}
/// <1.0 - Decreased torque
/// =1.0 - Default torque
/// >1.0 - Increased torque
/// Negative values will cause the vehicle to go backwards instead of forwards while accelerating.
/// value - is between 0.2 and 1.8 in the decompiled scripts.
/// This needs to be called every frame to take effect.
/// Used to be known as _SET_VEHICLE_ENGINE_TORQUE_MULTIPLIER
pub fn SET_VEHICLE_CHEAT_POWER_INCREASE(vehicle: types.Vehicle, value: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13086980938857091803)), vehicle, value);
}
pub fn SET_VEHICLE_INFLUENCES_WANTED_LEVEL(p0: types.Any, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(781912164321968495)), p0, p1);
}
/// Sets the wanted state of this vehicle.
pub fn SET_VEHICLE_IS_WANTED(vehicle: types.Vehicle, state: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17864695207840106278)), vehicle, state);
}
/// Sets the boat boom position for the `TR3` trailer.
/// Ratio value is between `0.0` and `1.0`, where `0.0` is 90 degrees to the left of the boat, and `1.0` is just slightly to the right/back of the boat.
/// To get the current boom position ratio, use GET_BOAT_BOOM_POSITION_RATIO
/// Used to be known as _SET_BOAT_BOOM_POSITION_RATIO
pub fn SWING_BOAT_BOOM_TO_RATIO(vehicle: types.Vehicle, ratio: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17620550585058804274)), vehicle, ratio);
}
/// Same call as ALLOW_BOAT_BOOM_TO_ANIMATE
/// Used to be known as _GET_BOAT_BOOM_POSITION_RATIO_2
pub fn SWING_BOAT_BOOM_FREELY(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13977345472634752035)), vehicle, toggle);
}
/// Used to be known as _GET_BOAT_BOOM_POSITION_RATIO_3
pub fn ALLOW_BOAT_BOOM_TO_ANIMATE(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1097555932723245622)), vehicle, toggle);
}
pub fn GET_BOAT_BOOM_POSITION_RATIO(vehicle: types.Vehicle) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(7365291076175537957)), vehicle);
}
pub fn DISABLE_PLANE_AILERON(vehicle: types.Vehicle, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2540751217074672028)), vehicle, p1, p2);
}
/// Returns true when in a vehicle, false whilst entering/exiting.
/// Used to be known as _IS_VEHICLE_ENGINE_ON
pub fn GET_IS_VEHICLE_ENGINE_RUNNING(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12552068584028443438)), vehicle);
}
pub fn SET_VEHICLE_USE_ALTERNATE_HANDLING(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2132403724273476767)), vehicle, toggle);
}
/// Only works on bikes, both X and Y work in the -1 - 1 range.
/// X forces the bike to turn left or right (-1, 1)
/// Y forces the bike to lean to the left or to the right (-1, 1)
/// Example with X -1/Y 1
/// http://i.imgur.com/TgIuAPJ.jpg
/// Used to be known as _SET_BIKE_LEAN_ANGLE
pub fn SET_BIKE_ON_STAND(vehicle: types.Vehicle, x: f32, y: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(11311433226459102395)), vehicle, x, y);
}
pub fn SET_VEHICLE_NOT_STEALABLE_AMBIENTLY(vehicle: types.Vehicle, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12323029800733276846)), vehicle, p1);
}
pub fn LOCK_DOORS_WHEN_NO_LONGER_NEEDED(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14976572021797561694)), vehicle);
}
pub fn SET_LAST_DRIVEN_VEHICLE(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12464596404723171026)), vehicle);
}
pub fn GET_LAST_DRIVEN_VEHICLE() types.Vehicle {
return nativeCaller.invoke0(@as(u64, @intCast(12884921330753189239)));
}
pub fn CLEAR_LAST_DRIVEN_VEHICLE() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(16147942081350518942)));
}
pub fn SET_VEHICLE_HAS_BEEN_DRIVEN_FLAG(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(160312516739012764)), vehicle, toggle);
}
/// Used to be known as _SET_PLANE_MIN_HEIGHT_ABOVE_GROUND
/// Used to be known as _SET_PLANE_MIN_HEIGHT_ABOVE_TERRAIN
pub fn SET_TASK_VEHICLE_GOTO_PLANE_MIN_HEIGHT_ABOVE_TERRAIN(plane: types.Vehicle, height: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13300010810241450331)), plane, height);
}
pub fn SET_VEHICLE_LOD_MULTIPLIER(vehicle: types.Vehicle, multiplier: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10641559937555192817)), vehicle, multiplier);
}
pub fn SET_VEHICLE_CAN_SAVE_IN_GARAGE(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4795116228859555501)), vehicle, toggle);
}
/// Also includes some "turnOffBones" when vehicle mods are installed.
/// Used to be known as _GET_VEHICLE_NUMBER_OF_BROKEN_OFF_BONES
pub fn GET_VEHICLE_NUM_OF_BROKEN_OFF_PARTS(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(4802172780256109575)), vehicle);
}
/// Used to be known as _GET_VEHICLE_NUMBER_OF_BROKEN_BONES
pub fn GET_VEHICLE_NUM_OF_BROKEN_LOOSEN_PARTS(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(3210151611429013041)), vehicle);
}
pub fn SET_FORCE_VEHICLE_ENGINE_DAMAGE_BY_BULLET(p0: types.Any, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5592644589027516884)), p0, p1);
}
/// Allows creation of CEventShockingPlaneFlyby, CEventShockingHelicopterOverhead, and other(?) Shocking events
pub fn SET_VEHICLE_GENERATES_ENGINE_SHOCKING_EVENTS(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2854526654683994421)), vehicle, toggle);
}
/// Copies sourceVehicle's damage (broken bumpers, broken lights, etc.) to targetVehicle.
pub fn COPY_VEHICLE_DAMAGES(sourceVehicle: types.Vehicle, targetVehicle: types.Vehicle) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16450127866771058467)), sourceVehicle, targetVehicle);
}
pub fn DISABLE_VEHICLE_EXPLOSION_BREAK_OFF_PARTS() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(17464399478513998072)));
}
pub fn SET_LIGHTS_CUTOFF_DISTANCE_TWEAK(distance: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13563938658184407814)), distance);
}
/// Commands the driver of an armed vehicle (p0) to shoot its weapon at a target (p1). p3, p4 and p5 are the coordinates of the target. Example:
/// WEAPON::SET_CURRENT_PED_VEHICLE_WEAPON(pilot,MISC::GET_HASH_KEY("VEHICLE_WEAPON_PLANE_ROCKET")); VEHICLE::SET_VEHICLE_SHOOT_AT_TARGET(pilot, target, targPos.x, targPos.y, targPos.z);
pub fn SET_VEHICLE_SHOOT_AT_TARGET(driver: types.Ped, entity: types.Entity, xTarget: f32, yTarget: f32, zTarget: f32) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(8416553235441156842)), driver, entity, xTarget, yTarget, zTarget);
}
/// Used to be known as _GET_VEHICLE_OWNER
pub fn GET_VEHICLE_LOCK_ON_TARGET(vehicle: types.Vehicle, entity: [*c]types.Entity) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(10330899868672905166)), vehicle, entity);
}
pub fn SET_FORCE_HD_VEHICLE(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10938795766069953520)), vehicle, toggle);
}
pub fn SET_VEHICLE_CUSTOM_PATH_NODE_STREAMING_RADIUS(vehicle: types.Vehicle, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1742653826879335403)), vehicle, p1);
}
pub fn GET_VEHICLE_PLATE_TYPE(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(11298569554518870240)), vehicle);
}
/// in script hook .net
/// Vehicle v = ...;
/// Function.Call(Hash.TRACK_VEHICLE_VISIBILITY, v.Handle);
pub fn TRACK_VEHICLE_VISIBILITY(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7225808929017855434)), vehicle);
}
/// must be called after TRACK_VEHICLE_VISIBILITY
/// it's not instant so probabilly must pass an 'update' to see correct result.
pub fn IS_VEHICLE_VISIBLE(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12252696799449023123)), vehicle);
}
pub fn SET_VEHICLE_GRAVITY(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9939806898937026522)), vehicle, toggle);
}
/// Enable/Disables global slipstream physics
pub fn SET_ENABLE_VEHICLE_SLIPSTREAMING(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16627509776179688759)), toggle);
}
pub fn SET_VEHICLE_SLIPSTREAMING_SHOULD_TIME_OUT(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17316861459643906496)), toggle);
}
/// Returns a float value between 0.0 and 3.0 related to its slipstream draft (boost/speedup).
/// Used to be known as _GET_VEHICLE_CURRENT_SLIPSTREAM_DRAFT
pub fn GET_VEHICLE_CURRENT_TIME_IN_SLIP_STREAM(vehicle: types.Vehicle) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(3911706331942440022)), vehicle);
}
/// Returns true if the vehicle is being slipstreamed by another vehicle
/// Used to be known as _IS_VEHICLE_SLIPSTREAM_LEADER
pub fn IS_VEHICLE_PRODUCING_SLIP_STREAM(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5243935893189903015)), vehicle);
}
pub fn SET_VEHICLE_INACTIVE_DURING_PLAYBACK(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(457162638838287477)), vehicle, toggle);
}
pub fn SET_VEHICLE_ACTIVE_DURING_PLAYBACK(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16140038260948851528)), vehicle, toggle);
}
/// Returns false if the vehicle has the FLAG_NO_RESPRAY flag set.
/// Used to be known as _IS_VEHICLE_SHOP_RESPRAY_ALLOWED
pub fn IS_VEHICLE_SPRAYABLE(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10180189662694304990)), vehicle);
}
pub fn SET_VEHICLE_ENGINE_CAN_DEGRADE(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10968347041253909753)), vehicle, toggle);
}
/// Adds some kind of shadow to the vehicle.
/// p1 and p2 use values from 0-255 and both make the shadow darker the lower the value is. -1 disables the effect.
/// Used to be known as _SET_VEHICLE_SHADOW_EFFECT
pub fn DISABLE_VEHCILE_DYNAMIC_AMBIENT_SCALES(vehicle: types.Vehicle, p1: c_int, p2: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(17358203470965593196)), vehicle, p1, p2);
}
/// Remove the weird shadow applied by DISABLE_VEHCILE_DYNAMIC_AMBIENT_SCALES.
/// Used to be known as _REMOVE_VEHICLE_SHADOW_EFFECT
pub fn ENABLE_VEHICLE_DYNAMIC_AMBIENT_SCALES(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17905642666200650246)), vehicle);
}
/// Used to be known as _VEHICLE_HAS_LANDING_GEAR
pub fn IS_PLANE_LANDING_GEAR_INTACT(plane: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4726715825995734919)), plane);
}
/// Used to be known as _ARE_PROPELLERS_UNDAMAGED
pub fn ARE_PLANE_PROPELLERS_INTACT(plane: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8457035875967810942)), plane);
}
/// Used to be known as _SET_PLANE_PROPELLERS_HEALTH
pub fn SET_PLANE_PROPELLER_HEALTH(plane: types.Vehicle, health: f32) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5512791535143907204)), plane, health);
}
pub fn SET_VEHICLE_CAN_DEFORM_WHEELS(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(927077622732950694)), vehicle, toggle);
}
/// Only returns true if the vehicle was marked as stolen with SET_VEHICLE_IS_STOLEN.
pub fn IS_VEHICLE_STOLEN(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5402557589466559571)), vehicle);
}
pub fn SET_VEHICLE_IS_STOLEN(vehicle: types.Vehicle, isStolen: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7472254198818494264)), vehicle, isStolen);
}
/// This native sets the turbulence multiplier. It only works for planes.
/// 0.0 = no turbulence at all.
/// 1.0 = heavy turbulence.
/// Works by just calling it once, does not need to be called every tick.
pub fn SET_PLANE_TURBULENCE_MULTIPLIER(vehicle: types.Vehicle, multiplier: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12478674817419047217)), vehicle, multiplier);
}
/// Used to be known as ADD_A_MARKER_OVER_VEHICLE
/// Used to be known as _ARE_VEHICLE_WINGS_INTACT
/// Used to be known as _ARE_PLANE_WINGS_INTACT
pub fn ARE_WINGS_OF_PLANE_INTACT(plane: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(6454115749644375671)), plane);
}
/// This native doesn't seem to do anything, might be a debug-only native.
/// Confirmed, it is a debug native.
pub fn ALLOW_AMBIENT_VEHICLES_TO_AVOID_ADVERSE_CONDITIONS(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12854615646716077963)), vehicle);
}
pub fn DETACH_VEHICLE_FROM_CARGOBOB(vehicle: types.Vehicle, cargobob: types.Vehicle) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1018327945767369117)), vehicle, cargobob);
}
pub fn DETACH_VEHICLE_FROM_ANY_CARGOBOB(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12535697291456201007)), vehicle);
}
/// Used to be known as _DETACH_ENTITY_FROM_CARGOBOB
pub fn DETACH_ENTITY_FROM_CARGOBOB(cargobob: types.Vehicle, entity: types.Entity) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(12610924579888632134)), cargobob, entity);
}
pub fn IS_VEHICLE_ATTACHED_TO_CARGOBOB(cargobob: types.Vehicle, vehicleAttached: types.Vehicle) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(15276571616016966105)), cargobob, vehicleAttached);
}
/// Returns attached vehicle (Vehicle in parameter must be cargobob)
pub fn GET_VEHICLE_ATTACHED_TO_CARGOBOB(cargobob: types.Vehicle) types.Vehicle {
return nativeCaller.invoke1(@as(u64, @intCast(9744526066508282341)), cargobob);
}
/// Used to be known as _GET_ENTITY_ATTACHED_TO_CARGOBOB
pub fn GET_ENTITY_ATTACHED_TO_CARGOBOB(p0: types.Any) types.Entity {
return nativeCaller.invoke1(@as(u64, @intCast(11027414846095689930)), p0);
}
pub fn ATTACH_VEHICLE_TO_CARGOBOB(cargobob: types.Vehicle, vehicle: types.Vehicle, p2: c_int, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(4694987047884322665)), cargobob, vehicle, p2, x, y, z);
}
pub fn ATTACH_ENTITY_TO_CARGOBOB(p0: types.Any, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any, p5: types.Any) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(11663622593587027998)), p0, p1, p2, p3, p4, p5);
}
/// Stops cargobob from being able to detach the attached vehicle.
/// Used to be known as _SET_CARGOBOB_HOOK_CAN_DETACH
pub fn SET_CARGOBOB_FORCE_DONT_DETACH_VEHICLE(cargobob: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6277995032391883046)), cargobob, toggle);
}
pub fn SET_CARGOBOB_EXCLUDE_FROM_PICKUP_ENTITY(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2248616050735793024)), p0, p1);
}
pub fn CAN_CARGOBOB_PICK_UP_ENTITY(p0: types.Any, p1: types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(3178849997947213772)), p0, p1);
}
/// Gets the position of the cargobob hook, in world coords.
/// Used to be known as _GET_CARGOBOB_HOOK_POSITION
pub fn GET_ATTACHED_PICK_UP_HOOK_POSITION(cargobob: types.Vehicle) types.Vector3 {
return nativeCaller.invoke1(@as(u64, @intCast(14689505661984491821)), cargobob);
}
/// Returns true only when the hook is active, will return false if the magnet is active
/// Used to be known as _IS_CARGOBOB_HOOK_ACTIVE
pub fn DOES_CARGOBOB_HAVE_PICK_UP_ROPE(cargobob: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(1738909640402755848)), cargobob);
}
/// Drops the Hook/Magnet on a cargobob
/// state
/// enum eCargobobHook
/// {
/// CARGOBOB_HOOK = 0,
/// CARGOBOB_MAGNET = 1,
/// };
/// Used to be known as _ENABLE_CARGOBOB_HOOK
pub fn CREATE_PICK_UP_ROPE_FOR_CARGOBOB(cargobob: types.Vehicle, state: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8929244404911140667)), cargobob, state);
}
/// Retracts the hook on the cargobob.
/// Note: after you retract it the natives for dropping the hook no longer work
/// Used to be known as _RETRACT_CARGOBOB_HOOK
pub fn REMOVE_PICK_UP_ROPE_FOR_CARGOBOB(cargobob: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10910198128113403908)), cargobob);
}
/// min: 1.9f, max: 100.0f
/// Used to be known as _SET_CARGOBOB_HOOK_POSITION
pub fn SET_PICKUP_ROPE_LENGTH_FOR_CARGOBOB(cargobob: types.Vehicle, length1: f32, length2: f32, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(9762711827796660259)), cargobob, length1, length2, p3);
}
pub fn SET_PICKUP_ROPE_LENGTH_WITHOUT_CREATING_ROPE_FOR_CARGOBOB(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(13901877820316162984)), p0, p1, p2);
}
pub fn SET_CARGOBOB_PICKUP_ROPE_DAMPING_MULTIPLIER(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14920851035725910791)), p0, p1);
}
pub fn SET_CARGOBOB_PICKUP_ROPE_TYPE(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(963600621618584245)), p0, p1);
}
/// Returns true only when the magnet is active, will return false if the hook is active
/// Used to be known as _IS_CARGOBOB_MAGNET_ACTIVE
/// Used to be known as _DOES_CARGOBOB_HAVE_PICKUP_MAGNET
pub fn DOES_CARGOBOB_HAVE_PICKUP_MAGNET(cargobob: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7928797542473710281)), cargobob);
}
/// Won't attract or magnetize to any helicopters or planes of course, but that's common sense.
/// Used to be known as _CARGOBOB_MAGNET_GRAB_VEHICLE
/// Used to be known as _SET_CARGOBOB_PICKUP_MAGNET_ACTIVE
pub fn SET_CARGOBOB_PICKUP_MAGNET_ACTIVE(cargobob: types.Vehicle, isActive: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11125673735726183579)), cargobob, isActive);
}
/// Used to be known as _SET_CARGOBOB_PICKUP_MAGNET_STRENGTH
pub fn SET_CARGOBOB_PICKUP_MAGNET_STRENGTH(cargobob: types.Vehicle, strength: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13600815474373564898)), cargobob, strength);
}
/// Used to be known as SET_CARGOBOB_PICKUP_MAGNET_EFFECT_RADIUS
pub fn SET_CARGOBOB_PICKUP_MAGNET_FALLOFF(cargobob: types.Vehicle, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11636084368942912638)), cargobob, p1);
}
/// Used to be known as SET_CARGOBOB_PICKUP_MAGNET_REDUCED_FALLOFF
pub fn SET_CARGOBOB_PICKUP_MAGNET_REDUCED_STRENGTH(cargobob: types.Vehicle, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7392547528560016687)), cargobob, p1);
}
/// Used to be known as SET_CARGOBOB_PICKUP_MAGNET_PULL_ROPE_LENGTH
pub fn SET_CARGOBOB_PICKUP_MAGNET_REDUCED_FALLOFF(cargobob: types.Vehicle, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7894436344240443899)), cargobob, p1);
}
pub fn SET_CARGOBOB_PICKUP_MAGNET_PULL_STRENGTH(cargobob: types.Vehicle, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17114389929821051818)), cargobob, p1);
}
/// Used to be known as SET_CARGOBOB_PICKUP_MAGNET_FALLOFF
pub fn SET_CARGOBOB_PICKUP_MAGNET_PULL_ROPE_LENGTH(vehicle: types.Vehicle, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7520260829624469643)), vehicle, p1);
}
/// Used to be known as SET_CARGOBOB_PICKUP_MAGNET_REDUCED_STRENGTH
pub fn SET_CARGOBOB_PICKUP_MAGNET_SET_TARGETED_MODE(vehicle: types.Vehicle, cargobob: types.Vehicle) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16357563558409616624)), vehicle, cargobob);
}
pub fn SET_CARGOBOB_PICKUP_MAGNET_SET_AMBIENT_MODE(vehicle: types.Vehicle, p1: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(11231352109576295892)), vehicle, p1, p2);
}
pub fn SET_CARGOBOB_PICKUP_MAGNET_ENSURE_PICKUP_ENTITY_UPRIGHT(vehicle: types.Vehicle, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6263203697368317878)), vehicle, p1);
}
pub fn DOES_VEHICLE_HAVE_WEAPONS(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2732763548735084768)), vehicle);
}
pub fn SET_VEHICLE_WILL_TELL_OTHERS_TO_HURRY(vehicle: types.Vehicle, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3191386997049802379)), vehicle, p1);
}
/// Full list of weapons by DurtyFree (Search for VEHICLE_*): https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn DISABLE_VEHICLE_WEAPON(disabled: windows.BOOL, weaponHash: types.Hash, vehicle: types.Vehicle, owner: types.Ped) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(17653101666101680214)), disabled, weaponHash, vehicle, owner);
}
/// Full list of weapons by DurtyFree (Search for VEHICLE_*): https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
/// Used to be known as _IS_VEHICLE_WEAPON_DISABLED
pub fn IS_VEHICLE_WEAPON_DISABLED(weaponHash: types.Hash, vehicle: types.Vehicle, owner: types.Ped) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(6213671875666315054)), weaponHash, vehicle, owner);
}
pub fn SET_VEHICLE_USED_FOR_PILOT_SCHOOL(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16167307938362295203)), vehicle, toggle);
}
/// Used to be known as _SET_VEHICLE_CLOSE_DOOR_DEFERED_ACTION
pub fn SET_VEHICLE_ACTIVE_FOR_PED_NAVIGATION(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2382786615732102506)), vehicle, toggle);
}
/// Returns an int
/// Vehicle Classes:
/// 0: Compacts
/// 1: Sedans
/// 2: SUVs
/// 3: Coupes
/// 4: Muscle
/// 5: Sports Classics
/// 6: Sports
/// 7: Super
/// 8: Motorcycles
/// 9: Off-road
/// 10: Industrial
/// 11: Utility
/// 12: Vans
/// 13: Cycles
/// 14: Boats
/// 15: Helicopters
/// 16: Planes
/// 17: Service
/// 18: Emergency
/// 19: Military
/// 20: Commercial
/// 21: Trains
/// char buffer[128];
/// std::sprintf(buffer, "VEH_CLASS_%i", VEHICLE::GET_VEHICLE_CLASS(vehicle));
/// const char* className = HUD::GET_FILENAME_FOR_AUDIO_CONVERSATION(buffer);
pub fn GET_VEHICLE_CLASS(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(2973386714919209570)), vehicle);
}
/// char buffer[128];
/// std::sprintf(buffer, "VEH_CLASS_%i", VEHICLE::GET_VEHICLE_CLASS_FROM_NAME (hash));
/// const char* className = HUD::GET_FILENAME_FOR_AUDIO_CONVERSATION(buffer);
/// Full list of vehicles by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/vehicles.json
pub fn GET_VEHICLE_CLASS_FROM_NAME(modelHash: types.Hash) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(16059586183117414912)), modelHash);
}
pub fn SET_PLAYERS_LAST_VEHICLE(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13609750184128445290)), vehicle);
}
pub fn SET_VEHICLE_CAN_BE_USED_BY_FLEEING_PEDS(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3460177052258514705)), vehicle, toggle);
}
pub fn SET_AIRCRAFT_PILOT_SKILL_NOISE_SCALAR(vehicle: types.Vehicle, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16537511156596798197)), vehicle, p1);
}
/// Money pickups are created around cars when they explode. Only works when the vehicle model is a car. A single pickup is between 1 and 18 dollars in size. All car models seem to give the same amount of money.
/// youtu.be/3arlUxzHl5Y
/// i.imgur.com/WrNpYFs.jpg
/// Used to be known as _SET_VEHICLE_CREATES_MONEY_PICKUPS_WHEN_EXPLODED
pub fn SET_VEHICLE_DROPS_MONEY_WHEN_BLOWN_UP(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(472707477634258518)), vehicle, toggle);
}
/// Used to be known as _SET_VEHICLE_JET_ENGINE_ON
pub fn SET_VEHICLE_KEEP_ENGINE_ON_WHEN_ABANDONED(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13329468185524349364)), vehicle, toggle);
}
/// Seems to copy some values in vehicle
pub fn SET_VEHICLE_IMPATIENCE_TIMER(vehicle: types.Vehicle, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7680666417712678480)), vehicle, p1);
}
/// Use the "AIHandling" string found in handling.meta
/// Used to be known as _SET_VEHICLE_HANDLING_HASH_FOR_AI
pub fn SET_VEHICLE_HANDLING_OVERRIDE(vehicle: types.Vehicle, hash: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1181455667866985021)), vehicle, hash);
}
/// Max value is 32767
pub fn SET_VEHICLE_EXTENDED_REMOVAL_RANGE(vehicle: types.Vehicle, range: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8781876888261021185)), vehicle, range);
}
pub fn SET_VEHICLE_STEERING_BIAS_SCALAR(p0: types.Any, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10378443027063572692)), p0, p1);
}
/// value between 0.0 and 1.0
/// Used to be known as _SET_HELICOPTER_ROLL_PITCH_YAW_MULT
pub fn SET_HELI_CONTROL_LAGGING_RATE_SCALAR(helicopter: types.Vehicle, multiplier: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7928685778725725644)), helicopter, multiplier);
}
/// Seems to be related to the metal parts, not tyres (like i was expecting lol)
pub fn SET_VEHICLE_FRICTION_OVERRIDE(vehicle: types.Vehicle, friction: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1745056329391671738)), vehicle, friction);
}
/// Used to be known as SET_VEHICLE_MAX_STR_TRAP
pub fn SET_VEHICLE_WHEELS_CAN_BREAK_OFF_WHEN_BLOW_UP(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11780178925065548617)), vehicle, toggle);
}
pub fn ARE_PLANE_CONTROL_PANELS_INTACT(vehicle: types.Vehicle, p1: windows.BOOL) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(17838640295920060215)), vehicle, p1);
}
/// Used to be known as GET_VEHICLE_DEFORMATION_GET_TREE
pub fn SET_VEHICLE_CEILING_HEIGHT(vehicle: types.Vehicle, height: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11845613838102143784)), vehicle, height);
}
pub fn SET_VEHICLE_NO_EXPLOSION_DAMAGE_FROM_DRIVER(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6797795254071336110)), vehicle, toggle);
}
pub fn CLEAR_VEHICLE_ROUTE_HISTORY(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7884388295745415342)), vehicle);
}
pub fn DOES_VEHICLE_EXIST_WITH_DECORATOR(decorator: [*c]const u8) types.Vehicle {
return nativeCaller.invoke1(@as(u64, @intCast(10766770371178634231)), decorator);
}
/// Used to be incorrectly named SET_VEHICLE_EXCLUSIVE_DRIVER
/// Toggles a flag related to SET_VEHICLE_EXCLUSIVE_DRIVER, however, doesn't enable that feature (or trigger script events related to it).
pub fn SET_VEHICLE_AI_CAN_USE_EXCLUSIVE_SEATS(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4685471052375971924)), vehicle, toggle);
}
/// index: 0 - 1
/// Used to be incorrectly named _SET_VEHICLE_EXCLUSIVE_DRIVER_2
pub fn SET_VEHICLE_EXCLUSIVE_DRIVER(vehicle: types.Vehicle, ped: types.Ped, index: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(13097905143211908739)), vehicle, ped, index);
}
/// Used to be known as _IS_PED_EXCLUSIVE_DRIVER_OF_VEHICLE
pub fn IS_PED_EXCLUSIVE_DRIVER_OF_VEHICLE(ped: types.Ped, vehicle: types.Vehicle, outIndex: [*c]c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(12726369798170340159)), ped, vehicle, outIndex);
}
pub fn DISABLE_INDIVIDUAL_PLANE_PROPELLER(vehicle: types.Vehicle, propeller: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5766986472521779299)), vehicle, propeller);
}
pub fn SET_VEHICLE_FORCE_AFTERBURNER(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12706241441111445463)), vehicle, toggle);
}
/// R* used it to "remove" vehicle windows when "nightshark" had some mod, which adding some kind of armored windows. When enabled, you can't break vehicles glass. All your bullets wiil shoot through glass. You also will not able to break the glass with any other way (hitting and etc)
/// Used to be known as _SET_DISABLE_VEHICLE_WINDOW_COLLISIONS
pub fn SET_DONT_PROCESS_VEHICLE_GLASS(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1191127947843525355)), vehicle, toggle);
}
pub fn SET_DISABLE_WANTED_CONES_RESPONSE(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5391513451941255398)), vehicle, toggle);
}
pub fn SET_USE_DESIRED_Z_CRUISE_SPEED_FOR_LANDING(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13154164555674449549)), vehicle, toggle);
}
pub fn SET_ARRIVE_DISTANCE_OVERRIDE_FOR_VEHICLE_PERSUIT_ATTACK(vehicle: types.Vehicle, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(145792176621802219)), vehicle, p1);
}
pub fn SET_VEHICLE_READY_FOR_CLEANUP(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14956833703762151564)), p0);
}
/// Toggles to render distant vehicles. They may not be vehicles but images to look like vehicles.
/// Used to be known as _DISPLAY_DISTANT_VEHICLES
pub fn SET_DISTANT_CARS_ENABLED(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17840505911926191709)), toggle);
}
/// Sets the color of the neon lights of the specified vehicle.
/// Used to be known as _SET_VEHICLE_NEON_LIGHTS_COLOUR
pub fn SET_VEHICLE_NEON_COLOUR(vehicle: types.Vehicle, r: c_int, g: c_int, b: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(10235090006366889621)), vehicle, r, g, b);
}
/// Index references CVehicleModelColor
/// Used to be known as _SET_VEHICLE_NEON_LIGHTS_COLOUR_INDEX
pub fn SET_VEHICLE_NEON_INDEX_COLOUR(vehicle: types.Vehicle, index: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13347306347645139409)), vehicle, index);
}
/// Gets the color of the neon lights of the specified vehicle.
/// See SET_VEHICLE_NEON_COLOUR (0x8E0A582209A62695) for more information
/// Used to be known as _GET_VEHICLE_NEON_LIGHTS_COLOUR
pub fn GET_VEHICLE_NEON_COLOUR(vehicle: types.Vehicle, r: [*c]c_int, g: [*c]c_int, b: [*c]c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(8510095654457341311)), vehicle, r, g, b);
}
/// Sets the neon lights of the specified vehicle on/off.
/// Indices:
/// 0 = Left
/// 1 = Right
/// 2 = Front
/// 3 = Back
/// Used to be known as _SET_VEHICLE_NEON_LIGHT_ENABLED
pub fn SET_VEHICLE_NEON_ENABLED(vehicle: types.Vehicle, index: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(3073461435007496809)), vehicle, index, toggle);
}
/// indices:
/// 0 = Left
/// 1 = Right
/// 2 = Front
/// 3 = Back
/// Used to be known as _IS_VEHICLE_NEON_LIGHT_ENABLED
pub fn GET_VEHICLE_NEON_ENABLED(vehicle: types.Vehicle, index: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(10109334683377952421)), vehicle, index);
}
pub fn SET_AMBIENT_VEHICLE_NEON_ENABLED(p0: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3882214270039849329)), p0);
}
/// Used to be known as _DISABLE_VEHICLE_NEON_LIGHTS
pub fn SUPPRESS_NEONS_ON_VEHICLE(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9509371877843605982)), vehicle, toggle);
}
/// Used to be known as _SET_DISABLE_SUPERDUMMY_MODE
pub fn SET_DISABLE_SUPERDUMMY(vehicle: types.Vehicle, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12720674040153828821)), vehicle, p1);
}
/// Used to be known as _REQUEST_VEHICLE_DASHBOARD_SCALEFORM_MOVIE
pub fn REQUEST_VEHICLE_DIAL(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(15826705244040414864)), vehicle);
}
/// Seems related to vehicle health, like the one in IV.
/// Max 1000, min 0.
/// Vehicle does not necessarily explode or become undrivable at 0.
pub fn GET_VEHICLE_BODY_HEALTH(vehicle: types.Vehicle) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(17469766964027330322)), vehicle);
}
/// p2 often set to 1000.0 in the decompiled scripts.
pub fn SET_VEHICLE_BODY_HEALTH(vehicle: types.Vehicle, value: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13221730319678876379)), vehicle, value);
}
/// Outputs 2 Vector3's.
/// Scripts check if out2.x - out1.x > someshit.x
/// Could be suspension related, as in max suspension height and min suspension height, considering the natives location.
/// Used to be known as _GET_VEHICLE_SUSPENSION_BOUNDS
pub fn GET_VEHICLE_SIZE(vehicle: types.Vehicle, out1: [*c]types.Vector3, out2: [*c]types.Vector3) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(16104378497256139832)), vehicle, out1, out2);
}
/// Gets the height of the vehicle's suspension.
/// The higher the value the lower the suspension. Each 0.002 corresponds with one more level lowered.
/// 0.000 is the stock suspension.
/// 0.008 is Ultra Suspension.
/// Used to be known as _GET_VEHICLE_SUSPENSION_HEIGHT
pub fn GET_FAKE_SUSPENSION_LOWERING_AMOUNT(vehicle: types.Vehicle) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(6022772658798698263)), vehicle);
}
/// Used to be known as _SET_CAR_HIGH_SPEED_BUMP_SEVERITY_MULTIPLIER
pub fn SET_CAR_HIGH_SPEED_BUMP_SEVERITY_MULTIPLIER(multiplier: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9582887004743788566)), multiplier);
}
/// Used to be known as _GET_NUMBER_OF_VEHICLE_DOORS
pub fn GET_NUMBER_OF_VEHICLE_DOORS(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(10561550669898559821)), vehicle);
}
/// If false, lowers hydraulics (if raised) and disables hydraulics controls. If true, raises hydraulics and enables hydraulics controls.
/// Only used once in each carmod script, on a car that does not have hydraulics to begin with.
/// Used to be known as _SET_HYDRAULIC_RAISED
pub fn SET_HYDRAULICS_CONTROL(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2932269383469114870)), vehicle, toggle);
}
pub fn SET_CAN_ADJUST_GROUND_CLEARANCE(vehicle: types.Vehicle, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12095788224996223220)), vehicle, p1);
}
/// 0 min 100 max
/// starts at 100
/// Seams to have health zones
/// Front of vehicle when damaged goes from 100-50 and stops at 50.
/// Rear can be damaged from 100-0
/// Only tested with two cars.
/// any idea how this differs from the first one?
/// --
/// May return the vehicle health on a scale of 0.0 - 100.0 (needs to be confirmed)
/// example:
/// v_F = ENTITY::GET_ENTITY_MODEL(v_3);
/// if (((v_F == ${tanker}) || (v_F == ${armytanker})) || (v_F == ${tanker2})) {
/// if (VEHICLE::GET_VEHICLE_HEALTH_PERCENTAGE(v_3) <= 1.0) {
/// NETWORK::NETWORK_EXPLODE_VEHICLE(v_3, 1, 1, -1);
/// }
/// }
/// Used to be known as _GET_VEHICLE_BODY_HEALTH_2
pub fn GET_VEHICLE_HEALTH_PERCENTAGE(vehicle: types.Vehicle, maxEngineHealth: f32, maxPetrolTankHealth: f32, maxBodyHealth: f32, maxMainRotorHealth: f32, maxTailRotorHealth: f32, maxUnkHealth: f32) f32 {
return nativeCaller.invoke7(@as(u64, @intCast(13325976614562141097)), vehicle, maxEngineHealth, maxPetrolTankHealth, maxBodyHealth, maxMainRotorHealth, maxTailRotorHealth, maxUnkHealth);
}
pub fn GET_VEHICLE_IS_MERCENARY(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15331489174703639389)), vehicle);
}
pub fn SET_VEHICLE_BROKEN_PARTS_DONT_AFFECT_AI_HANDLING(vehicle: types.Vehicle, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(14078720844518274984)), vehicle, p1);
}
/// Used to be known as _SET_VEHICLE_HUD_SPECIAL_ABILITY_BAR_ACTIVE
pub fn SET_VEHICLE_KERS_ALLOWED(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11081159153226301006)), vehicle, toggle);
}
/// Returns true if the vehicle has a HF_HAS_KERS (strHandlingFlags 0x4) handing flag set, for instance the lectro/vindicator bikes or the open wheelers.
/// Used to be known as _HAS_VEHICLE_KERS_BOOST
pub fn GET_VEHICLE_HAS_KERS(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5792559533331924207)), vehicle);
}
pub fn SET_PLANE_RESIST_TO_EXPLOSION(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16240335094792118013)), vehicle, toggle);
}
/// Used to be known as _SET_HELI_RESIST_TO_EXPLOSION
pub fn SET_HELI_RESIST_TO_EXPLOSION(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9256247539861039378)), vehicle, toggle);
}
pub fn SET_DISABLE_BMX_EXTRA_TRICK_FORCES(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2799441655457716456)), p0);
}
/// Works only on vehicles that support hydraulics.
/// Used to be known as _SET_HYDRAULIC_STATE
/// Used to be known as _SET_HYDRAULIC_WHEEL_VALUE
pub fn SET_HYDRAULIC_SUSPENSION_RAISE_FACTOR(vehicle: types.Vehicle, wheelId: c_int, value: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(9577636633989345036)), vehicle, wheelId, value);
}
/// Used to be known as _GET_HYDRAULIC_WHEEL_VALUE
pub fn GET_HYDRAULIC_SUSPENSION_RAISE_FACTOR(vehicle: types.Vehicle, wheelId: c_int) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(843804658755590883)), vehicle, wheelId);
}
/// Used to be known as _SET_CAMBERED_WHEELS_DISABLED
pub fn SET_CAN_USE_HYDRAULICS(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1297573955125263256)), vehicle, toggle);
}
/// States:
/// 4 = raise
/// 5 = lower
/// 6 = jump
/// Used to be known as _SET_HYDRAULIC_WHEEL_STATE
pub fn SET_HYDRAULIC_VEHICLE_STATE(vehicle: types.Vehicle, state: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10279587041368874109)), vehicle, state);
}
/// Sets vehicle wheel hydraulic states transition. Known states:
/// 0 - reset
/// 1 - raise wheel (uses value arg, works just like _SET_VEHICLE_HYDRAULIC_WHEEL_VALUE)
/// 2 - jump using wheel
/// Used to be known as _SET_HYDRAULIC_WHEEL_STATE_TRANSITION
pub fn SET_HYDRAULIC_WHEEL_STATE(vehicle: types.Vehicle, wheelId: c_int, state: c_int, value: f32, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(13997316495358270673)), vehicle, wheelId, state, value, p4);
}
pub fn HAS_VEHICLE_PETROLTANK_SET_ON_FIRE_BY_ENTITY(p0: types.Any, p1: types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(6604117671637501612)), p0, p1);
}
pub fn CLEAR_VEHICLE_PETROLTANK_FIRE_CULPRIT(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4907118662167955226)), vehicle);
}
/// Controls how fast bobbleheads and tsurikawas move on each axis.
/// p2 is probably z, but changing that value didn't seem to have a noticeable effect.
pub fn SET_VEHICLE_BOBBLEHEAD_VELOCITY(x: f32, y: f32, p2: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(9731024777952761288)), x, y, p2);
}
pub fn GET_VEHICLE_IS_DUMMY(p0: types.Any) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(9598238422622860086)), p0);
}
/// Used to be known as _SET_VEHICLE_DAMAGE_MODIFIER
pub fn SET_VEHICLE_DAMAGE_SCALE(vehicle: types.Vehicle, p1: f32) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5629731145273908878)), vehicle, p1);
}
/// Used to be known as _SET_VEHICLE_UNK_DAMAGE_MULTIPLIER
pub fn SET_VEHICLE_WEAPON_DAMAGE_SCALE(vehicle: types.Vehicle, multiplier: f32) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5018524739360700077)), vehicle, multiplier);
}
pub fn SET_DISABLE_DAMAGE_WITH_PICKED_UP_ENTITY(p0: types.Any, p1: types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(15283353564814752116)), p0, p1);
}
pub fn SET_VEHICLE_USES_MP_PLAYER_DAMAGE_MULTIPLIER(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13484678589808760959)), p0, p1);
}
/// When enabled, the player won't fall off the bike when landing from large heights.
pub fn SET_BIKE_EASY_TO_LAND(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8310862340885062050)), vehicle, toggle);
}
/// Inverts vehicle's controls. So INPUT_VEH_ACCELERATE will be INPUT_VEH_BRAKE and vise versa (same for A/D controls)
/// Doesn't work for planes/helis.
/// Used to be known as _SET_VEHICLE_CONTROLS_INVERTED
pub fn SET_INVERT_VEHICLE_CONTROLS(vehicle: types.Vehicle, state: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6598250818845233576)), vehicle, state);
}
/// Disables the screen effects and sound effects when driving over a speed boost pad.
pub fn SET_SPEED_BOOST_EFFECT_DISABLED(disabled: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8916705007427228158)), disabled);
}
/// Disables the screen effects and sound effects when driving over a slowdown pad.
pub fn SET_SLOW_DOWN_EFFECT_DISABLED(disabled: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7327497697880211785)), disabled);
}
pub fn SET_FORMATION_LEADER(vehicle: types.Vehicle, x: f32, y: f32, z: f32, p4: f32) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(4794877722726604464)), vehicle, x, y, z, p4);
}
/// Resets the effect of SET_FORMATION_LEADER
pub fn RESET_FORMATION_LEADER() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(16354046990608625121)));
}
pub fn GET_IS_BOAT_CAPSIZED(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13443755358914255277)), vehicle);
}
pub fn SET_ALLOW_RAMMING_SOOP_OR_RAMP(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9287325679885769761)), p0, p1);
}
/// Used to be known as _SET_VEHICLE_RAMP_LAUNCH_MODIFIER
pub fn SET_SCRIPT_RAMP_IMPULSE_SCALE(vehicle: types.Vehicle, impulseScale: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17276154640824366429)), vehicle, impulseScale);
}
/// doorId: see SET_VEHICLE_DOOR_SHUT
/// Used to be known as _DOES_VEHICLE_HAVE_DOOR
/// Used to be known as _GET_IS_DOOR_VALID
pub fn GET_IS_DOOR_VALID(vehicle: types.Vehicle, doorId: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(7232582464623474226)), vehicle, doorId);
}
/// Used to be known as _SET_VEHICLE_ROCKET_BOOST_REFILL_TIME
pub fn SET_SCRIPT_ROCKET_BOOST_RECHARGE_TIME(vehicle: types.Vehicle, seconds: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16145170128856116873)), vehicle, seconds);
}
/// Used to be known as _HAS_VEHICLE_ROCKET_BOOST
/// Used to be known as _DOES_VEHICLE_HAVE_ROCKET_BOOST
/// Used to be known as _GET_HAS_ROCKET_BOOST
pub fn GET_HAS_ROCKET_BOOST(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3951771193449683930)), vehicle);
}
/// Used to be known as _IS_VEHICLE_ROCKET_BOOST_ACTIVE
pub fn IS_ROCKET_BOOST_ACTIVE(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4410405085910852542)), vehicle);
}
/// Used to be known as _SET_VEHICLE_ROCKET_BOOST_ACTIVE
pub fn SET_ROCKET_BOOST_ACTIVE(vehicle: types.Vehicle, active: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9358855157613082681)), vehicle, active);
}
/// Used to be known as _GET_HAS_LOWERABLE_WHEELS
/// Used to be known as _DOES_VEHICLE_HAVE_RETRACTABLE_WHEELS
/// Used to be known as _GET_HAS_RETRACTABLE_WHEELS
pub fn GET_HAS_RETRACTABLE_WHEELS(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(15898116407875072140)), vehicle);
}
/// Used to be known as _GET_IS_WHEELS_LOWERED_STATE_ACTIVE
pub fn GET_IS_WHEELS_RETRACTED(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2134946589942270143)), vehicle);
}
/// Used to be known as _RAISE_LOWERABLE_WHEELS
/// Used to be known as _RAISE_RETRACTABLE_WHEELS
pub fn SET_WHEELS_EXTENDED_INSTANTLY(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(17753295444312751016)), vehicle);
}
/// Used to be known as _LOWER_RETRACTABLE_WHEELS
pub fn SET_WHEELS_RETRACTED_INSTANTLY(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5995907767309952846)), vehicle);
}
/// Returns true if the vehicle has the FLAG_JUMPING_CAR flag set.
/// Used to be known as _HAS_VEHICLE_JUMPING_ABILITY
/// Used to be known as _DOES_VEHICLE_HAVE_JUMPING_ABILITY
/// Used to be known as _GET_CAN_VEHICLE_JUMP
pub fn GET_CAR_HAS_JUMP(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10410282495026928105)), vehicle);
}
/// Allows vehicles with the FLAG_JUMPING_CAR flag to jump higher (i.e. Ruiner 2000).
/// Used to be known as _SET_USE_HIGHER_VEHICLE_JUMP_FORCE
pub fn SET_USE_HIGHER_CAR_JUMP(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17323683974913013976)), vehicle, toggle);
}
pub fn SET_CLEAR_FREEZE_WAITING_ON_COLLISION_ONCE_PLAYER_ENTERS(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12889514161342329330)), vehicle, toggle);
}
/// Set vehicle's primary mounted weapon 2 ammo. For example, use it on APC.
/// For example, you can "remove" any vehicle weapon from any vehicle.
/// ammoAmount -1 = infinite ammo (default value for any spawned vehicle tho)
/// Used to be known as _SET_VEHICLE_WEAPON_CAPACITY
pub fn SET_VEHICLE_WEAPON_RESTRICTED_AMMO(vehicle: types.Vehicle, weaponIndex: c_int, capacity: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(4957653164232974502)), vehicle, weaponIndex, capacity);
}
/// Used to be known as _GET_VEHICLE_WEAPON_CAPACITY
pub fn GET_VEHICLE_WEAPON_RESTRICTED_AMMO(vehicle: types.Vehicle, weaponIndex: c_int) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(9331966604781263799)), vehicle, weaponIndex);
}
/// Used to be known as _HAS_VEHICLE_PARACHUTE
/// Used to be known as _DOES_VEHICLE_HAVE_PARACHUTE
/// Used to be known as _GET_VEHICLE_HAS_PARACHUTE
pub fn GET_VEHICLE_HAS_PARACHUTE(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13591018391803054927)), vehicle);
}
/// Used to be known as _CAN_VEHICLE_PARACHUTE_BE_ACTIVATED
/// Used to be known as _GET_VEHICLE_CAN_ACTIVATE_PARACHUTE
pub fn GET_VEHICLE_CAN_DEPLOY_PARACHUTE(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12183988986306711267)), vehicle);
}
/// Used to be known as _SET_VEHICLE_PARACHUTE_ACTIVE
pub fn VEHICLE_START_PARACHUTING(vehicle: types.Vehicle, active: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(864603342341212823)), vehicle, active);
}
/// Used to be known as _IS_VEHICLE_PARACHUTE_ACTIVE
pub fn IS_VEHICLE_PARACHUTE_DEPLOYED(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4460004663503165135)), vehicle);
}
/// Used to be known as _SET_RAMP_VEHICLE_RECEIVES_RAMP_DAMAGE
/// Used to be known as _SET_VEHICLE_RECEIVES_RAMP_DAMAGE
pub fn VEHICLE_SET_RAMP_AND_RAMMING_CARS_TAKE_DAMAGE(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2940908458198899701)), vehicle, toggle);
}
/// Used to be known as _SET_VEHICLE_RAMP_SIDEWAYS_LAUNCH_MOTION
pub fn VEHICLE_SET_ENABLE_RAMP_CAR_SIDE_IMPULSE(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1998131056741791318)), p0, p1);
}
/// Used to be known as _SET_VEHICLE_RAMP_UPWARDS_LAUNCH_MOTION
pub fn VEHICLE_SET_ENABLE_NORMALISE_RAMP_CAR_VERTICAL_VELOCTIY(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8460828740016310788)), p0, p1);
}
pub fn VEHICLE_SET_JET_WASH_FORCE_ENABLED(p0: types.Any) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11326667946093879483)), p0);
}
/// Used to be known as _SET_VEHICLE_WEAPONS_DISABLED
pub fn SET_VEHICLE_WEAPON_CAN_TARGET_OBJECTS(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9706583350490740263)), vehicle, toggle);
}
/// Used for blazer5. Changes the quadbike-jetski transformation input from raise/lower convertible roof (hold H by default) to horn (press E by default.)
pub fn SET_VEHICLE_USE_BOOST_BUTTON_FOR_WHEEL_RETRACT(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4695296460217116378)), toggle);
}
pub fn _SET_VEHICLE_USE_HORN_BUTTON_FOR_NITROUS(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1837739713869130813)), toggle);
}
/// Parachute models:
/// - sr_prop_specraces_para_s_01
/// - imp_prop_impexp_para_s (SecuroServ; Default)
/// Plus, many more props can be used as vehicle parachutes, like umbrellas (prop_beach_parasol_03), and unlike SET_PLAYER_PARACHUTE_MODEL_OVERRIDE, you won't get stuck mid-air when using an umbrella.
/// Used to be known as _VEHICLE_SET_CUSTOM_PARACHUTE_MODEL
/// Used to be known as _SET_VEHICLE_PARACHUTE_MODEL
pub fn VEHICLE_SET_PARACHUTE_MODEL_OVERRIDE(vehicle: types.Vehicle, modelHash: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5575751468805460817)), vehicle, modelHash);
}
/// Variations available for the generic parachute (sr_prop_specraces_para_s_01):
/// - 0: Rainbow
/// - 1: Red
/// - 2: White, blue, yellow
/// - 3: Black, red, white
/// - 4: Red, white, blue
/// - 5: Blue
/// - 6: Black
/// - 7: Black, yellow
/// Used to be known as _VEHICLE_SET_CUSTOM_PARACHUTE_TEXTURE
/// Used to be known as _SET_VEHICLE_PARACHUTE_TEXTURE_VARIATION
pub fn VEHICLE_SET_PARACHUTE_MODEL_TINT_INDEX(vehicle: types.Vehicle, textureVariation: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12054678540305090691)), vehicle, textureVariation);
}
pub fn VEHICLE_SET_OVERRIDE_EXTENABLE_SIDE_RATIO(p0: types.Any, p1: types.Any) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(295462310503419699)), p0, p1);
}
pub fn VEHICLE_SET_EXTENABLE_SIDE_TARGET_RATIO(p0: types.Any, p1: types.Any) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(17559781988546094069)), p0, p1);
}
pub fn VEHICLE_SET_OVERRIDE_SIDE_RATIO(p0: types.Any, p1: types.Any) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(15268640944044535534)), p0, p1);
}
/// Used to be known as _GET_ALL_VEHICLES
pub fn GET_ALL_VEHICLES(vehsStruct: [*c]types.Any) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(11208927241441506024)), vehsStruct);
}
pub fn SET_CARGOBOB_EXTA_PICKUP_RANGE(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8268271317332611630)), p0, p1);
}
pub fn SET_OVERRIDE_VEHICLE_DOOR_TORQUE(p0: types.Any, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(7413957405759577784)), p0, p1, p2);
}
/// Enables/disables the ability to wheelie on motorcycles.
pub fn SET_WHEELIE_ENABLED(vehicle: types.Vehicle, enabled: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1374404757029580366)), vehicle, enabled);
}
pub fn SET_DISABLE_HELI_EXPLODE_FROM_BODY_DAMAGE(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17130712242632350921)), p0, p1);
}
pub fn SET_DISABLE_EXPLODE_FROM_BODY_DAMAGE_ON_COLLISION(vehicle: types.Vehicle, value: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2801587805711458404)), vehicle, value);
}
pub fn SET_TRAILER_ATTACHMENT_ENABLED(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3432386453688930313)), p0, p1);
}
/// Used to be known as _SET_VEHICLE_ROCKET_BOOST_PERCENTAGE
pub fn SET_ROCKET_BOOST_FILL(vehicle: types.Vehicle, percentage: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18352975442354984494)), vehicle, percentage);
}
/// Set state to true to extend the wings, false to retract them.
/// Used to be known as _SET_OPPRESSOR_TRANSFORM_STATE
pub fn SET_GLIDER_ACTIVE(vehicle: types.Vehicle, state: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6073551323999682027)), vehicle, state);
}
/// Resets the vehicle's turret to its default position in scripted cameras. Doesn't seem to affect turrets that are occupied by a ped.
pub fn SET_SHOULD_RESET_TURRET_IN_SCRIPTED_CAMERAS(vehicle: types.Vehicle, shouldReset: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8705157096798110239)), vehicle, shouldReset);
}
pub fn SET_VEHICLE_DISABLE_COLLISION_UPON_CREATION(vehicle: types.Vehicle, disable: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12637354140334266410)), vehicle, disable);
}
pub fn SET_GROUND_EFFECT_REDUCES_DRAG(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(4830803505957346279)), toggle);
}
/// Disables collision for this vehicle (maybe it also supports other entities, not sure).
/// Only world/building/fixed world objects will have their collisions disabled, props, peds, or any other entity still collides with the vehicle.
/// Example: https://streamable.com/6n45d5
/// Not sure if there is a native (and if so, which one) that resets the collisions.
/// Used to be known as _DISABLE_VEHICLE_WORLD_COLLISION
pub fn SET_DISABLE_MAP_COLLISION(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(8458446486553399469)), vehicle);
}
pub fn SET_DISABLE_PED_STAND_ON_TOP(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(9382671199950435881)), vehicle, toggle);
}
pub fn SET_VEHICLE_DAMAGE_SCALES(vehicle: types.Vehicle, p1: types.Any, p2: types.Any, p3: types.Any, p4: types.Any) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(10826903138422316619)), vehicle, p1, p2, p3, p4);
}
pub fn SET_PLANE_SECTION_DAMAGE_SCALE(vehicle: types.Vehicle, p1: types.Any, p2: types.Any) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(845439206254613275)), vehicle, p1, p2);
}
/// Stops the cargobob from being able to attach any vehicle
/// Used to be known as _SET_CARGOBOB_HOOK_CAN_ATTACH
pub fn SET_HELI_CAN_PICKUP_ENTITY_THAT_HAS_PICK_UP_DISABLED(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10711404499576291453)), vehicle, toggle);
}
/// Sets the amount of bombs that this vehicle has. As far as I know, this does _not_ impact vehicle weapons or the ammo of those weapons in any way, it is just a way to keep track of the amount of bombs in a specific plane.
/// Used to be known as _SET_VEHICLE_BOMBS
/// Used to be known as _SET_AIRCRAFT_BOMB_COUNT
/// Used to be known as _SET_VEHICLE_BOMB_COUNT
pub fn SET_VEHICLE_BOMB_AMMO(vehicle: types.Vehicle, bombCount: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17632416461353244532)), vehicle, bombCount);
}
/// Gets the amount of bombs that this vehicle has. As far as I know, this does _not_ impact vehicle weapons or the ammo of those weapons in any way, it is just a way to keep track of the amount of bombs in a specific plane.
/// Used to be known as _GET_AIRCRAFT_BOMB_COUNT
/// Used to be known as _GET_VEHICLE_BOMB_COUNT
pub fn GET_VEHICLE_BOMB_AMMO(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(16866751443983755681)), vehicle);
}
/// Similar to SET_VEHICLE_BOMB_AMMO, this sets the amount of countermeasures that are present on this vehicle.
/// Use GET_VEHICLE_BOMB_AMMO to get the current amount.
/// Used to be known as _SET_AIRCRAFT_COUNTERMEASURE_COUNT
/// Used to be known as _SET_VEHICLE_COUNTERMEASURE_COUNT
pub fn SET_VEHICLE_COUNTERMEASURE_AMMO(vehicle: types.Vehicle, counterMeasureCount: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11230327925766031445)), vehicle, counterMeasureCount);
}
/// Similar to `GET_VEHICLE_BOMB_AMMO`, this gets the amount of countermeasures that are present on this vehicle.
/// Use SET_VEHICLE_COUNTERMEASURE_AMMO to set the current amount.
/// Used to be known as _GET_AIRCRAFT_COUNTERMEASURE_COUNT
/// Used to be known as _GET_VEHICLE_COUNTERMEASURE_COUNT
pub fn GET_VEHICLE_COUNTERMEASURE_AMMO(vehicle: types.Vehicle) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(17890173915701360644)), vehicle);
}
pub fn SET_HELI_COMBAT_OFFSET(vehicle: types.Vehicle, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(738451845967157957)), vehicle, x, y, z);
}
/// Used in decompiled scripts in combination with GET_VEHICLE_SIZE
/// p7 is usually 2
/// p8 is usually 1
pub fn GET_CAN_VEHICLE_BE_PLACED_HERE(vehicle: types.Vehicle, x: f32, y: f32, z: f32, rotX: f32, rotY: f32, rotZ: f32, p7: c_int, p8: types.Any) windows.BOOL {
return nativeCaller.invoke9(@as(u64, @intCast(5905078611851256334)), vehicle, x, y, z, rotX, rotY, rotZ, p7, p8);
}
/// Sets a flag on heli and another vehicle type.
pub fn SET_DISABLE_AUTOMATIC_CRASH_TASK(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10917875813265043926)), vehicle, toggle);
}
/// Used in conjunction with SET_SPECIAL_FLIGHT_MODE_TARGET_RATIO, in Rockstar's scripts. Using this will instantly transform the vehicle into hover mode starting from the given ratio (ranging from 0.0 to 1.0, values greater than 1.0 will put the vehicle into a glitched state.) If this is not used alongside SET_SPECIAL_FLIGHT_MODE_TARGET_RATIO, the vehicle will automatically transform back into car mode.
/// Usable only with the deluxo and other vehicles with deluxo-like hover mode toggle, modded or otherwise. Does nothing when used on oppressor2.
/// Example:
/// Ped playerPed = PLAYER::PLAYER_PED_ID();
/// Vehicle veh = PED::GET_VEHICLE_PED_IS_USING(playerPed);
/// VEHICLE::SET_SPECIAL_FLIGHT_MODE_RATIO(veh, 0.7f);
/// VEHICLE::SET_SPECIAL_FLIGHT_MODE_TARGET_RATIO(veh, 1.0f);
/// Used to be known as _SET_VEHICLE_HOVER_TRANSFORM_RATIO
pub fn SET_SPECIAL_FLIGHT_MODE_RATIO(vehicle: types.Vehicle, ratio: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(15076074724104038455)), vehicle, ratio);
}
/// Used in conjunction with SET_SPECIAL_FLIGHT_MODE_RATIO, in Rockstar's scripts. The vehicle will transform into the given targetRatio, starting from the vehicle's current hover mode transform ratio (which can also be manually set by SET_SPECIAL_FLIGHT_MODE_RATIO,) i.e. setting targetRatio to 0.0 while the vehicle is in hover mode will transform the vehicle into car mode, likewise setting targetRatio to 1.0 while the vehicle is in car mode will transform the vehicle into hover mode, and if the current transform ratio is set to 0.7 while targetRatio is 1.0 the vehicle will transform into hover mode starting from being already partially transformed.
/// targetRatio is recommended to always be 0.0 or 1.0, otherwise the vehicle will transform into a glitched state.
/// Usable only with the deluxo and other vehicles with deluxo-like hover mode toggle, modded or otherwise. Does nothing when used on oppressor2.
/// Example:
/// Ped playerPed = PLAYER::PLAYER_PED_ID();
/// Vehicle veh = PED::GET_VEHICLE_PED_IS_USING(playerPed);
/// VEHICLE::SET_SPECIAL_FLIGHT_MODE_RATIO(veh, 0.7f);
/// VEHICLE::SET_SPECIAL_FLIGHT_MODE_TARGET_RATIO(veh, 1.0f);
/// Used to be known as _SET_VEHICLE_TRANSFORM_STATE
/// Used to be known as _SET_VEHICLE_HOVER_TRANSFORM_PERCENTAGE
pub fn SET_SPECIAL_FLIGHT_MODE_TARGET_RATIO(vehicle: types.Vehicle, targetRatio: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4867051427776102033)), vehicle, targetRatio);
}
/// It will override the ability to transform deluxo. For oppressor it will work just like SET_DISABLE_HOVER_MODE_FLIGHT
/// Used to be known as _SET_VEHICLE_HOVER_TRANSFORM_ENABLED
pub fn SET_SPECIAL_FLIGHT_MODE_ALLOWED(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17375195817804408675)), vehicle, toggle);
}
/// Disables "wings" for some flying vehicles. Works only for oppressor _2_ and deluxo.
/// For deluxo it just immediately removes vehicle's "wings" and you will be not able to fly up.
/// For oppressor 2 it will remove wings right after you land. And you will not able to fly up anymore too.
/// But for opressor 2 you still can fly if you somehow get back in the air.
/// Used to be known as _SET_VEHICLE_HOVER_TRANSFORM_ACTIVE
pub fn SET_DISABLE_HOVER_MODE_FLIGHT(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3266796618201947025)), vehicle, toggle);
}
/// Checks if Chernobog's stabilizers are deployed or not.
/// These are the metal supports that allow it to fire.
/// This native only applies to the Chernobog.
/// Used to be known as _ARE_CHERNOBOG_STABILIZERS_DEPLOYED
pub fn GET_OUTRIGGERS_DEPLOYED(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(4220198534704307845)), vehicle);
}
/// Native is significantly more complicated than simply generating a random vector & length.
/// The 'point' is either 400.0 or 250.0 units away from the Ped's current coordinates; and paths into functions like rage::grcViewport___IsSphereVisible
/// Used to be known as _FIND_RANDOM_POINT_IN_SPACE
pub fn FIND_SPAWN_COORDINATES_FOR_HELI(ped: types.Ped) types.Vector3 {
return nativeCaller.invoke1(@as(u64, @intCast(10216810855561049378)), ped);
}
/// Only used with the "akula" and "annihilator2" in the decompiled native scripts.
/// Used to be known as _SET_DEPLOY_HELI_STUB_WINGS
pub fn SET_DEPLOY_FOLDING_WINGS(vehicle: types.Vehicle, deploy: windows.BOOL, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(12849298272314504228)), vehicle, deploy, p2);
}
/// Only used with the "akula" and "annihilator2" in the decompiled native scripts.
/// Used to be known as _ARE_HELI_STUB_WINGS_DEPLOYED
pub fn ARE_FOLDING_WINGS_DEPLOYED(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(12605902328484345746)), vehicle);
}
pub fn _SET_DEPLOY_MISSILE_BAYS(vehicle: types.Vehicle, deploy: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(865331629040904805)), vehicle, deploy);
}
pub fn _ARE_MISSILE_BAYS_DEPLOYED(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16881535976618417939)), vehicle);
}
pub fn SET_DIP_STRAIGHT_DOWN_WHEN_CRASHING_PLANE(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12278284719034249376)), vehicle, toggle);
}
/// Toggles specific flag on turret
/// Used to be known as _SET_VEHICLE_TURRET_UNK
pub fn SET_TURRET_HIDDEN(vehicle: types.Vehicle, index: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(14267510182170511281)), vehicle, index, toggle);
}
/// Used to be known as _SET_SPECIALFLIGHT_WING_RATIO
pub fn SET_HOVER_MODE_WING_RATIO(vehicle: types.Vehicle, ratio: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8116140695162323819)), vehicle, ratio);
}
/// Disables turret movement when called in a loop. You can still fire and aim. You cannot shoot backwards though.
/// Used to be known as _SET_DISABLE_TURRET_MOVEMENT
/// Used to be known as _SET_DISABLE_TURRET_MOVEMENT_THIS_FRAME
pub fn SET_DISABLE_TURRET_MOVEMENT(vehicle: types.Vehicle, turretId: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16579363737896666986)), vehicle, turretId);
}
pub fn SET_FORCE_FIX_LINK_MATRICES(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9835759913695874162)), vehicle);
}
/// Affects the playback speed of the submarine car conversion animations. Does not affect hardcoded animations such as the wheels being retracted.
/// Used to be known as _SET_UNK_FLOAT_FOR_SUBMARINE_VEHICLE_TASK
pub fn SET_TRANSFORM_RATE_FOR_ANIMATION(vehicle: types.Vehicle, transformRate: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5296822661613602605)), vehicle, transformRate);
}
/// When set to true, the key to transform a car to submarine mode changes from raise/lower convertible roof (hold H by default) to special vehicle transform (press X by default.)
/// Used to be known as _SET_UNK_BOOL_FOR_SUBMARINE_VEHICLE_TASK
pub fn SET_TRANSFORM_TO_SUBMARINE_USES_ALTERNATE_INPUT(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4736093091632329382)), vehicle, toggle);
}
/// Does nothing. It's a nullsub.
pub fn SET_VEHICLE_COMBAT_MODE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(3953615755679023300)), toggle);
}
/// Does nothing. It's a nullsub.
pub fn SET_VEHICLE_DETONATION_MODE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(9430727015394289076)), toggle);
}
/// Does nothing. It's a nullsub.
pub fn SET_VEHICLE_SHUNT_ON_STICK(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(11069944889208529686)), toggle);
}
/// Used to be known as _GET_IS_VEHICLE_SHUNT_BOOST_ACTIVE
pub fn GET_IS_VEHICLE_SHUNTING(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(11692927322755575437)), vehicle);
}
pub fn GET_HAS_VEHICLE_BEEN_HIT_BY_SHUNT(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(16749326472444891684)), vehicle);
}
/// Returns last vehicle that was rammed by the given vehicle using the shunt boost.
/// Used to be known as _GET_LAST_RAMMED_VEHICLE
pub fn GET_LAST_SHUNT_VEHICLE(vehicle: types.Vehicle) types.Vehicle {
return nativeCaller.invoke1(@as(u64, @intCast(356622671460524791)), vehicle);
}
/// Used to be known as _SET_DISABLE_VEHICLE_UNK
pub fn SET_DISABLE_VEHICLE_EXPLOSIONS_DAMAGE(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1457233219157249378)), toggle);
}
/// Used to be known as _SET_VEHICLE_NITRO_ENABLED
pub fn SET_OVERRIDE_NITROUS_LEVEL(vehicle: types.Vehicle, toggle: windows.BOOL, level: f32, power: f32, rechargeTime: f32, disableSound: windows.BOOL) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(14477303374716757517)), vehicle, toggle, level, power, rechargeTime, disableSound);
}
pub fn SET_NITROUS_IS_ACTIVE(vehicle: types.Vehicle, enabled: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5070748000161435717)), vehicle, enabled);
}
pub fn _SET_OVERRIDE_TRACTION_LOSS_MULTIPLIER(vehicle: types.Vehicle, modifier: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12669297196016093082)), vehicle, modifier);
}
/// First two floats relate to rumble, the last is a threshold
pub fn _SET_DRIFT_SLIP_ANGLE_LIMITS(vehicle: types.Vehicle, durationScalar: f32, amplitudeScalar: f32, slipAngleLimit: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(15777456998132248326)), vehicle, durationScalar, amplitudeScalar, slipAngleLimit);
}
pub fn _SET_MINIMUM_TIME_BETWEEN_GEAR_SHIFTS(vehicle: types.Vehicle, time: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1643739503052138593)), vehicle, time);
}
pub fn FULLY_CHARGE_NITROUS(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1885825772320428582)), vehicle);
}
pub fn _GET_REMAINING_NITROUS_DURATION(vehicle: types.Vehicle) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(13746314707451659534)), vehicle);
}
pub fn IS_NITROUS_ACTIVE(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5268791736008069092)), vehicle);
}
pub fn CLEAR_NITROUS(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14450272821819007469)), vehicle);
}
/// Used to be known as _SET_VEHICLE_WHEELS_DEAL_DAMAGE
pub fn SET_INCREASE_WHEEL_CRUSH_DAMAGE(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2986144532570432559)), vehicle, toggle);
}
/// Sets some global vehicle related bool
/// Used to be known as _SET_DISABLE_VEHICLE_UNK_2
pub fn SET_DISABLE_WEAPON_BLADE_FORCES(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2386509567115891724)), toggle);
}
/// Changes the car jump control to require a double-tap to activate.
pub fn SET_USE_DOUBLE_CLICK_FOR_CAR_JUMP(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6610425929382778615)), toggle);
}
/// Returns true only if the "tombstone" bone is attached to the vehicle, irrespective of "FLAG_HAS_TOMBSTONE" being present or not. Detaching the tombstone will return false.
/// Used to be known as _GET_DOES_VEHICLE_HAVE_TOMBSTONE
pub fn GET_DOES_VEHICLE_HAVE_TOMBSTONE(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(8191962341675186727)), vehicle);
}
/// Disables detachable bumber from domnator4, dominator5, dominator6, see https://gfycat.com/SecondUnluckyGosling
/// Used to be known as _HIDE_VEHICLE_TOMBSTONE
pub fn HIDE_TOMBSTONE(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12570104447996265863)), vehicle, toggle);
}
pub fn APPLY_EMP_EFFECT(vehicle: types.Vehicle) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(2635249921065828018)), vehicle);
}
/// Returns whether this vehicle is currently disabled by an EMP mine.
/// Used to be known as _GET_IS_VEHICLE_EMP_DISABLED
pub fn GET_IS_VEHICLE_DISABLED_BY_EMP(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(362238040870672645)), vehicle);
}
pub fn SET_DISABLE_RETRACTING_WEAPON_BLADES(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(10307995872436982231)), toggle);
}
/// Usable wheels:
/// 0: wheel_lf
/// 1: wheel_rf
/// 2: wheel_lm1
/// 3: wheel_rm1
/// 4: wheel_lr
/// 5: wheel_rr
/// Used to be known as _GET_TYRE_HEALTH
pub fn GET_TYRE_HEALTH(vehicle: types.Vehicle, wheelIndex: c_int) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(6190954224750072704)), vehicle, wheelIndex);
}
/// SET_TYRE_WEAR_RATE must be active, otherwise values set to <1000.0f will default to 350.0f
/// Usable wheels:
/// 0: wheel_lf
/// 1: wheel_rf
/// 2: wheel_lm1
/// 3: wheel_rm1
/// 4: wheel_lr
/// 5: wheel_rr
/// Used to be known as _SET_TYRE_HEALTH
pub fn SET_TYRE_HEALTH(vehicle: types.Vehicle, wheelIndex: c_int, health: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(8414570155870644125)), vehicle, wheelIndex, health);
}
/// Returns the multiplier value from SET_TYRE_WEAR_RATE
/// Usable wheels:
/// 0: wheel_lf
/// 1: wheel_rf
/// 2: wheel_lm1
/// 3: wheel_rm1
/// 4: wheel_lr
/// 5: wheel_rr
/// Used to be known as _GET_TYRE_WEAR_MULTIPLIER
pub fn GET_TYRE_WEAR_RATE(vehicle: types.Vehicle, wheelIndex: c_int) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(7942230526716235633)), vehicle, wheelIndex);
}
/// Needs to be run for tire wear to work. Multiplier affects the downforce and how fast the tires will wear out, higher values essentially make the vehicle slower on straights and its tires will wear down quicker when cornering. Value must be >0f.
/// Default value in Rockstar's Open Wheel Race JSON's ("owrtws", "owrtwm", "owrtwh") is 1.0
/// Usable wheels:
/// 0: wheel_lf
/// 1: wheel_rf
/// 2: wheel_lm1
/// 3: wheel_rm1
/// 4: wheel_lr
/// 5: wheel_rr
/// Used to be known as _SET_TYRE_WEAR_MULTIPLIER
pub fn SET_TYRE_WEAR_RATE(vehicle: types.Vehicle, wheelIndex: c_int, multiplier: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(110705629056875682)), vehicle, wheelIndex, multiplier);
}
/// Controls how fast the tires wear out.
/// Default values from Rockstar's Open Wheel Race JSON's:
/// "owrtss" (Soft): 2.2
/// "owrtsm" (Medium): 1.7
/// "owrtsh" (Hard): 1.2
/// Usable wheels:
/// 0: wheel_lf
/// 1: wheel_rf
/// 2: wheel_lm1
/// 3: wheel_rm1
/// 4: wheel_lr
/// 5: wheel_rr
/// Used to be known as _SET_TYRE_SOFTNESS_MULTIPLIER
pub fn SET_TYRE_WEAR_RATE_SCALE(vehicle: types.Vehicle, wheelIndex: c_int, multiplier: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(4116716376237110935)), vehicle, wheelIndex, multiplier);
}
/// Controls how much traction the wheel loses.
/// Default values from Rockstar's Open Wheel Race JSON's:
/// "owrtds" (Soft): 0.05
/// "owrtdm" (Medium): 0.45
/// "owrtdh" (Hard): 0.8
/// Usable wheels:
/// 0: wheel_lf
/// 1: wheel_rf
/// 2: wheel_lm1
/// 3: wheel_rm1
/// 4: wheel_lr
/// 5: wheel_rr
/// Used to be known as _SET_TYRE_TRACTION_LOSS_MULTIPLIER
pub fn SET_TYRE_MAXIMUM_GRIP_DIFFERENCE_DUE_TO_WEAR_RATE(vehicle: types.Vehicle, wheelIndex: c_int, multiplier: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(14515331263737485160)), vehicle, wheelIndex, multiplier);
}
pub fn SET_AIRCRAFT_IGNORE_HIGHTMAP_OPTIMISATION(vehicle: types.Vehicle, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17921124033222955239)), vehicle, p1);
}
/// Lowers the vehicle's stance. Only works for vehicles that have strAdvancedFlags 0x8000 and 0x4000000 set.
/// Used to be known as _SET_REDUCE_DRIFT_VEHICLE_SUSPENSION
pub fn SET_REDUCED_SUSPENSION_FORCE(vehicle: types.Vehicle, enable: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(4194911084860680805)), vehicle, enable);
}
/// Used to be known as _SET_DRIFT_TYRES_ENABLED
pub fn SET_DRIFT_TYRES(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6541369163745689349)), vehicle, toggle);
}
/// Used to be known as _GET_DRIFT_TYRES_ENABLED
pub fn GET_DRIFT_TYRES_SET(vehicle: types.Vehicle) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3412165300017744083)), vehicle);
}
/// Implemented only for trains.
/// Used to be known as _NETWORK_USE_HIGH_PRECISION_VEHICLE_BLENDING
pub fn NETWORK_USE_HIGH_PRECISION_TRAIN_BLENDING(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17009002092623271764)), vehicle, toggle);
}
/// Only used in R* Script fm_content_cargo
pub fn SET_CHECK_FOR_ENOUGH_ROOM_FOR_PED(vehicle: types.Vehicle, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17266018735609052996)), vehicle, p1);
}
/// _SET_ALLOW_R* - _SET_ALLOW_V*
pub fn _SET_ALLOW_COLLISION_WHEN_IN_VEHICLE(vehicle: types.Vehicle, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2869481411145835245)), vehicle, toggle);
}
pub fn _IS_VEHICLE_GEN9_EXCLUSIVE_MODEL(vehicleModel: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7365849334533231358)), vehicleModel);
}
pub fn _GET_VEHICLE_MAX_EXHAUST_BONE_COUNT() c_int {
return nativeCaller.invoke0(@as(u64, @intCast(4531055535675852111)));
}
pub fn _GET_VEHICLE_EXHAUST_BONE(vehicle: types.Vehicle, index: c_int, boneIndex: [*c]c_int, axisX: [*c]windows.BOOL) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(16656827726673005336)), vehicle, index, boneIndex, axisX);
}
};
pub const WATER = struct {
/// This function set height to the value of z-axis of the water surface.
/// This function works with sea and lake. However it does not work with shallow rivers (e.g. raton canyon will return -100000.0f)
/// note: seems to return true when you are in water
pub fn GET_WATER_HEIGHT(x: f32, y: f32, z: f32, height: [*c]f32) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(17762927292766151972)), x, y, z, height);
}
pub fn GET_WATER_HEIGHT_NO_WAVES(x: f32, y: f32, z: f32, height: [*c]f32) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(10297116871110596500)), x, y, z, height);
}
pub fn TEST_PROBE_AGAINST_WATER(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, result: [*c]types.Vector3) windows.BOOL {
return nativeCaller.invoke7(@as(u64, @intCast(18421367862894008795)), x1, y1, z1, x2, y2, z2, result);
}
/// enum eScriptWaterTestResult
/// {
/// SCRIPT_WATER_TEST_RESULT_NONE,
/// SCRIPT_WATER_TEST_RESULT_WATER,
/// SCRIPT_WATER_TEST_RESULT_BLOCKED,
/// };
pub fn TEST_PROBE_AGAINST_ALL_WATER(x1: f32, y1: f32, z1: f32, x2: f32, y2: f32, z2: f32, flags: c_int, waterHeight: [*c]f32) c_int {
return nativeCaller.invoke8(@as(u64, @intCast(9904651976348723807)), x1, y1, z1, x2, y2, z2, flags, waterHeight);
}
/// See TEST_PROBE_AGAINST_ALL_WATER.
pub fn TEST_VERTICAL_PROBE_AGAINST_ALL_WATER(x: f32, y: f32, z: f32, flags: c_int, waterHeight: [*c]f32) c_int {
return nativeCaller.invoke5(@as(u64, @intCast(3113203377110074082)), x, y, z, flags, waterHeight);
}
/// Sets the water height for a given position and radius.
pub fn MODIFY_WATER(x: f32, y: f32, radius: f32, height: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(14142425935910774327)), x, y, radius, height);
}
/// Used to be known as _ADD_CURRENT_RISE
pub fn ADD_EXTRA_CALMING_QUAD(xLow: f32, yLow: f32, xHigh: f32, yHigh: f32, height: f32) c_int {
return nativeCaller.invoke5(@as(u64, @intCast(18284417518858540806)), xLow, yLow, xHigh, yHigh, height);
}
/// p0 is the handle returned from ADD_EXTRA_CALMING_QUAD
/// Used to be known as _REMOVE_CURRENT_RISE
pub fn REMOVE_EXTRA_CALMING_QUAD(calmingQuad: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12764659564178582191)), calmingQuad);
}
/// Sets a value that determines how aggressive the ocean waves will be. Values of 2.0 or more make for very aggressive waves like you see during a thunderstorm.
/// Works only ~200 meters around the player.
/// Used to be known as _SET_WAVES_INTENSITY
/// Used to be known as _SET_CURRENT_INTENSITY
pub fn SET_DEEP_OCEAN_SCALER(intensity: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(13360773722244290431)), intensity);
}
/// Gets the aggressiveness factor of the ocean waves.
/// Used to be known as _GET_WAVES_INTENSITY
/// Used to be known as _GET_CURRENT_INTENSITY
pub fn GET_DEEP_OCEAN_SCALER() f32 {
return nativeCaller.invoke0(@as(u64, @intCast(3110347731893794329)));
}
pub fn SET_CALMED_WAVE_HEIGHT_SCALER(height: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6084987251721979102)), height);
}
/// Sets the waves intensity back to original (1.0 in most cases).
/// Used to be known as _RESET_WAVES_INTENSITY
/// Used to be known as _RESET_CURRENT_INTENSITY
pub fn RESET_DEEP_OCEAN_SCALER() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(6800040885978927835)));
}
};
pub const WEAPON = struct {
/// Enables laser sight on any weapon.
/// It doesn't work. Neither on tick nor OnKeyDown
pub fn ENABLE_LASER_SIGHT_RENDERING(toggle: windows.BOOL) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(14462304661930534058)), toggle);
}
pub fn GET_WEAPON_COMPONENT_TYPE_MODEL(componentHash: types.Hash) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(987831216342151299)), componentHash);
}
/// Returns the model of any weapon.
/// Can also take an ammo hash?
/// sub_6663a(&l_115B, WEAPON::GET_WEAPONTYPE_MODEL(${ammo_rpg}));
pub fn GET_WEAPONTYPE_MODEL(weaponHash: types.Hash) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(17612694354744302228)), weaponHash);
}
pub fn GET_WEAPONTYPE_SLOT(weaponHash: types.Hash) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(4761789196682362784)), weaponHash);
}
pub fn GET_WEAPONTYPE_GROUP(weaponHash: types.Hash) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(14062629349971965772)), weaponHash);
}
/// Returns the amount of extra components the specified component has.
/// Returns -1 if the component isn't of type CWeaponComponentVariantModel.
/// Used to be known as _GET_WEAPON_COMPONENT_VARIANT_EXTRA_COMPONENT_COUNT
pub fn GET_WEAPON_COMPONENT_VARIANT_EXTRA_COUNT(componentHash: types.Hash) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(7302776444755636056)), componentHash);
}
/// Returns the model hash of the extra component at specified index.
/// Used to be known as _GET_WEAPON_COMPONENT_VARIANT_EXTRA_COMPONENT_MODEL
pub fn GET_WEAPON_COMPONENT_VARIANT_EXTRA_MODEL(componentHash: types.Hash, extraComponentIndex: c_int) types.Hash {
return nativeCaller.invoke2(@as(u64, @intCast(5556519296376539671)), componentHash, extraComponentIndex);
}
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn SET_CURRENT_PED_WEAPON(ped: types.Ped, weaponHash: types.Hash, bForceInHand: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(12535367907453402124)), ped, weaponHash, bForceInHand);
}
/// The return value seems to indicate returns true if the hash of the weapon object weapon equals the weapon hash.
/// p2 seems to be 1 most of the time.
/// p2 is not implemented
/// disassembly said that?
pub fn GET_CURRENT_PED_WEAPON(ped: types.Ped, weaponHash: [*c]types.Hash, p2: windows.BOOL) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(4217590589943717204)), ped, weaponHash, p2);
}
pub fn GET_CURRENT_PED_WEAPON_ENTITY_INDEX(ped: types.Ped, p1: types.Any) types.Entity {
return nativeCaller.invoke2(@as(u64, @intCast(4267453750986192380)), ped, p1);
}
/// p1 is always 0 in the scripts.
pub fn GET_BEST_PED_WEAPON(ped: types.Ped, p1: windows.BOOL) types.Hash {
return nativeCaller.invoke2(@as(u64, @intCast(9548732433391192802)), ped, p1);
}
/// Full list of weapons by DurtyFree (Search for VEHICLE_*): https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn SET_CURRENT_PED_VEHICLE_WEAPON(ped: types.Ped, weaponHash: types.Hash) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(8486287495292755370)), ped, weaponHash);
}
/// Example in VB
/// Public Shared Function GetVehicleCurrentWeapon(Ped As Ped) As Integer
/// Dim arg As New OutputArgument()
/// Native.Function.Call(Hash.GET_CURRENT_PED_VEHICLE_WEAPON, Ped, arg)
/// Return arg.GetResult(Of Integer)()
/// End Function
/// Usage:
/// If GetVehicleCurrentWeapon(Game.Player.Character) = -821520672 Then ...Do something
/// Note: -821520672 = VEHICLE_WEAPON_PLANE_ROCKET
pub fn GET_CURRENT_PED_VEHICLE_WEAPON(ped: types.Ped, weaponHash: [*c]types.Hash) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(1159492374221042396)), ped, weaponHash);
}
pub fn SET_PED_CYCLE_VEHICLE_WEAPONS_ONLY(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5775707058945875730)), ped);
}
/// Checks if the ped is currently equipped with a weapon matching a bit specified using a bitwise-or in typeFlags.
/// Type flag bit values:
/// 1 = Melee weapons
/// 2 = Explosive weapons
/// 4 = Any other weapons
/// Not specifying any bit will lead to the native *always* returning 'false', and for example specifying '4 | 2' will check for any weapon except fists and melee weapons.
/// 7 returns true if you are equipped with any weapon except your fists.
/// 6 returns true if you are equipped with any weapon except melee weapons.
/// 5 returns true if you are equipped with any weapon except the Explosives weapon group.
/// 4 returns true if you are equipped with any weapon except Explosives weapon group AND melee weapons.
/// 3 returns true if you are equipped with either Explosives or Melee weapons (the exact opposite of 4).
/// 2 returns true only if you are equipped with any weapon from the Explosives weapon group.
/// 1 returns true only if you are equipped with any Melee weapon.
/// 0 never returns true.
/// Note: When I say "Explosives weapon group", it does not include the Jerry can and Fire Extinguisher.
pub fn IS_PED_ARMED(ped: types.Ped, typeFlags: c_int) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(5140692576702410007)), ped, typeFlags);
}
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn IS_WEAPON_VALID(weaponHash: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10627493561550189747)), weaponHash);
}
/// p2 should be FALSE, otherwise it seems to always return FALSE
/// Bool does not check if the weapon is current equipped, unfortunately.
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn HAS_PED_GOT_WEAPON(ped: types.Ped, weaponHash: types.Hash, p2: windows.BOOL) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(10226742572059207868)), ped, weaponHash, p2);
}
pub fn IS_PED_WEAPON_READY_TO_SHOOT(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13262153763314100041)), ped);
}
pub fn GET_PED_WEAPONTYPE_IN_SLOT(ped: types.Ped, weaponSlot: types.Hash) types.Hash {
return nativeCaller.invoke2(@as(u64, @intCast(17293496626451649357)), ped, weaponSlot);
}
/// WEAPON::GET_AMMO_IN_PED_WEAPON(PLAYER::PLAYER_PED_ID(), a_0)
/// From decompiled scripts
/// Returns total ammo in weapon
/// GTALua Example :
/// natives.WEAPON.GET_AMMO_IN_PED_WEAPON(plyPed, WeaponHash)
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn GET_AMMO_IN_PED_WEAPON(ped: types.Ped, weaponhash: types.Hash) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(97480644549409105)), ped, weaponhash);
}
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn ADD_AMMO_TO_PED(ped: types.Ped, weaponHash: types.Hash, ammo: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(8714538174022443552)), ped, weaponHash, ammo);
}
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn SET_PED_AMMO(ped: types.Ped, weaponHash: types.Hash, ammo: c_int, p3: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(1505728147329083929)), ped, weaponHash, ammo, p3);
}
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn SET_PED_INFINITE_AMMO(ped: types.Ped, toggle: windows.BOOL, weaponHash: types.Hash) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(4529689184233022011)), ped, toggle, weaponHash);
}
pub fn SET_PED_INFINITE_AMMO_CLIP(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1746743299266654598)), ped, toggle);
}
pub fn SET_PED_STUN_GUN_FINITE_AMMO(p0: types.Any, p1: types.Any) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(2648156964382156554)), p0, p1);
}
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn GIVE_WEAPON_TO_PED(ped: types.Ped, weaponHash: types.Hash, ammoCount: c_int, isHidden: windows.BOOL, bForceInHand: windows.BOOL) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(13767458866752540619)), ped, weaponHash, ammoCount, isHidden, bForceInHand);
}
/// Gives a weapon to PED with a delay, example:
/// WEAPON::GIVE_DELAYED_WEAPON_TO_PED(PED::PLAYER_PED_ID(), MISC::GET_HASH_KEY("WEAPON_PISTOL"), 1000, false)
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn GIVE_DELAYED_WEAPON_TO_PED(ped: types.Ped, weaponHash: types.Hash, ammoCount: c_int, bForceInHand: windows.BOOL) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(12863085853907369077)), ped, weaponHash, ammoCount, bForceInHand);
}
/// setting the last params to false it does that same so I would suggest its not a toggle
pub fn REMOVE_ALL_PED_WEAPONS(ped: types.Ped, p1: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17464388802800305651)), ped, p1);
}
/// This native removes a specified weapon from your selected ped.
/// Example:
/// C#:
/// Function.Call(Hash.REMOVE_WEAPON_FROM_PED, Game.Player.Character, 0x99B507EA);
/// C++:
/// WEAPON::REMOVE_WEAPON_FROM_PED(PLAYER::PLAYER_PED_ID(), 0x99B507EA);
/// The code above removes the knife from the player.
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn REMOVE_WEAPON_FROM_PED(ped: types.Ped, weaponHash: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5231435679784720824)), ped, weaponHash);
}
/// Hides the players weapon during a cutscene.
pub fn HIDE_PED_WEAPON_FOR_SCRIPTED_CUTSCENE(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(8028090550332432527)), ped, toggle);
}
/// Has 5 parameters since latest patches.
pub fn SET_PED_CURRENT_WEAPON_VISIBLE(ped: types.Ped, visible: windows.BOOL, deselectWeapon: windows.BOOL, p3: windows.BOOL, p4: windows.BOOL) void {
_ = nativeCaller.invoke5(@as(u64, @intCast(514998932744280688)), ped, visible, deselectWeapon, p3, p4);
}
pub fn SET_PED_DROPS_WEAPONS_WHEN_DEAD(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5146179700877021608)), ped, toggle);
}
/// It determines what weapons caused damage:
/// If you want to define only a specific weapon, second parameter=weapon hash code, third parameter=0
/// If you want to define any melee weapon, second parameter=0, third parameter=1.
/// If you want to identify any weapon (firearms, melee, rockets, etc.), second parameter=0, third parameter=2.
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn HAS_PED_BEEN_DAMAGED_BY_WEAPON(ped: types.Ped, weaponHash: types.Hash, weaponType: c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(3257295647166759546)), ped, weaponHash, weaponType);
}
/// Does NOT seem to work with HAS_PED_BEEN_DAMAGED_BY_WEAPON. Use CLEAR_ENTITY_LAST_WEAPON_DAMAGE and HAS_ENTITY_BEEN_DAMAGED_BY_WEAPON instead.
pub fn CLEAR_PED_LAST_WEAPON_DAMAGE(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(1051863785197139128)), ped);
}
/// It determines what weapons caused damage:
/// If you want to define only a specific weapon, second parameter=weapon hash code, third parameter=0
/// If you want to define any melee weapon, second parameter=0, third parameter=1.
/// If you want to identify any weapon (firearms, melee, rockets, etc.), second parameter=0, third parameter=2.
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn HAS_ENTITY_BEEN_DAMAGED_BY_WEAPON(entity: types.Entity, weaponHash: types.Hash, weaponType: c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(1377327512274689684)), entity, weaponHash, weaponType);
}
pub fn CLEAR_ENTITY_LAST_WEAPON_DAMAGE(entity: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12423054505849681106)), entity);
}
pub fn SET_PED_DROPS_WEAPON(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(7743116959586172608)), ped);
}
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn SET_PED_DROPS_INVENTORY_WEAPON(ped: types.Ped, weaponHash: types.Hash, xOffset: f32, yOffset: f32, zOffset: f32, ammoCount: c_int) void {
_ = nativeCaller.invoke6(@as(u64, @intCast(2344713528402755814)), ped, weaponHash, xOffset, yOffset, zOffset, ammoCount);
}
/// p2 is mostly 1 in the scripts.
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn GET_MAX_AMMO_IN_CLIP(ped: types.Ped, weaponHash: types.Hash, p2: windows.BOOL) c_int {
return nativeCaller.invoke3(@as(u64, @intCast(11785304485072036602)), ped, weaponHash, p2);
}
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn GET_AMMO_IN_CLIP(ped: types.Ped, weaponHash: types.Hash, ammo: [*c]c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(3319718231269668700)), ped, weaponHash, ammo);
}
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn SET_AMMO_IN_CLIP(ped: types.Ped, weaponHash: types.Hash, ammo: c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(15911966477853176983)), ped, weaponHash, ammo);
}
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn GET_MAX_AMMO(ped: types.Ped, weaponHash: types.Hash, ammo: [*c]c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(15858883120068610355)), ped, weaponHash, ammo);
}
/// Returns the max ammo for an ammo type. Ammo types: https://gist.github.com/root-cause/faf41f59f7a6d818b7db0b839bd147c1
/// Used to be known as _GET_MAX_AMMO_2
/// Used to be known as _GET_MAX_AMMO_BY_TYPE
pub fn GET_MAX_AMMO_BY_TYPE(ped: types.Ped, ammoTypeHash: types.Hash, ammo: [*c]c_int) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(6365916988562282249)), ped, ammoTypeHash, ammo);
}
/// Ammo types: https://gist.github.com/root-cause/faf41f59f7a6d818b7db0b839bd147c1
/// Used to be known as _ADD_PED_AMMO
/// Used to be known as _ADD_AMMO_TO_PED_BY_TYPE
pub fn ADD_PED_AMMO_BY_TYPE(ped: types.Ped, ammoTypeHash: types.Hash, ammo: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2626269477619291231)), ped, ammoTypeHash, ammo);
}
/// Ammo types: https://gist.github.com/root-cause/faf41f59f7a6d818b7db0b839bd147c1
pub fn SET_PED_AMMO_BY_TYPE(ped: types.Ped, ammoTypeHash: types.Hash, ammo: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(6904548124944461182)), ped, ammoTypeHash, ammo);
}
pub fn GET_PED_AMMO_BY_TYPE(ped: types.Ped, ammoTypeHash: types.Hash) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(4166428001530627777)), ped, ammoTypeHash);
}
pub fn SET_PED_AMMO_TO_DROP(ped: types.Ped, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(11884981361672827119)), ped, p1);
}
pub fn SET_PICKUP_AMMO_AMOUNT_SCALER(p0: f32) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16582532232365756184)), p0);
}
/// Returns the current ammo type of the specified ped's specified weapon.
/// MkII magazines will change the return value, like Pistol MkII returning AMMO_PISTOL without any components and returning AMMO_PISTOL_TRACER after Tracer Rounds component is attached.
/// Use 0xF489B44DD5AF4BD9 if you always want AMMO_PISTOL.
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
/// Used to be known as _GET_PED_AMMO_TYPE
pub fn GET_PED_AMMO_TYPE_FROM_WEAPON(ped: types.Ped, weaponHash: types.Hash) types.Hash {
return nativeCaller.invoke2(@as(u64, @intCast(9217412182166970228)), ped, weaponHash);
}
/// Returns the base/default ammo type of the specified ped's specified weapon.
/// Use GET_PED_AMMO_TYPE_FROM_WEAPON if you want current ammo type (like AMMO_MG_INCENDIARY/AMMO_MG_TRACER while using MkII magazines) and use this if you want base ammo type. (AMMO_MG)
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
/// Used to be known as _GET_PED_AMMO_TYPE_FROM_WEAPON_2
pub fn GET_PED_ORIGINAL_AMMO_TYPE_FROM_WEAPON(ped: types.Ped, weaponHash: types.Hash) types.Hash {
return nativeCaller.invoke2(@as(u64, @intCast(17620813263454292953)), ped, weaponHash);
}
/// Pass ped. Pass address of Vector3.
/// The coord will be put into the Vector3.
/// The return will determine whether there was a coord found or not.
pub fn GET_PED_LAST_WEAPON_IMPACT_COORD(ped: types.Ped, coords: [*c]types.Vector3) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(7803898169126431682)), ped, coords);
}
/// p1/gadgetHash was always 0xFBAB5776 ("GADGET_PARACHUTE").
/// p2 is always true.
pub fn SET_PED_GADGET(ped: types.Ped, gadgetHash: types.Hash, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(15048692283445430810)), ped, gadgetHash, p2);
}
/// gadgetHash - was always 0xFBAB5776 ("GADGET_PARACHUTE").
pub fn GET_IS_PED_GADGET_EQUIPPED(ped: types.Ped, gadgetHash: types.Hash) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(17812074215687656812)), ped, gadgetHash);
}
/// Returns the hash of the weapon.
/// var num7 = WEAPON::GET_SELECTED_PED_WEAPON(num4);
/// sub_27D3(num7);
/// switch (num7)
/// {
/// case 0x24B17070:
/// Also see WEAPON::GET_CURRENT_PED_WEAPON. Difference?
/// -------------------------------------------------------------------------
/// The difference is that GET_SELECTED_PED_WEAPON simply returns the ped's current weapon hash but GET_CURRENT_PED_WEAPON also checks the weapon object and returns true if the hash of the weapon object equals the weapon hash
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn GET_SELECTED_PED_WEAPON(ped: types.Ped) types.Hash {
return nativeCaller.invoke1(@as(u64, @intCast(751455270629331523)), ped);
}
/// WEAPON::EXPLODE_PROJECTILES(PLAYER::PLAYER_PED_ID(), func_221(0x00000003), 0x00000001);
pub fn EXPLODE_PROJECTILES(ped: types.Ped, weaponHash: types.Hash, p2: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(18179854281387413988)), ped, weaponHash, p2);
}
/// If `explode` true, then removal is done through exploding the projectile. Basically the same as EXPLODE_PROJECTILES but without defining the owner ped.
pub fn REMOVE_ALL_PROJECTILES_OF_TYPE(weaponHash: types.Hash, explode: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(18181841982048199976)), weaponHash, explode);
}
/// Used to be known as _GET_LOCKON_RANGE_OF_CURRENT_PED_WEAPON
pub fn GET_LOCKON_DISTANCE_OF_CURRENT_PED_WEAPON(ped: types.Ped) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(9515828836988497052)), ped);
}
pub fn GET_MAX_RANGE_OF_CURRENT_PED_WEAPON(ped: types.Ped) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(9316994463577839225)), ped);
}
/// Fourth Parameter = unsure, almost always -1
pub fn HAS_VEHICLE_GOT_PROJECTILE_ATTACHED(driver: types.Ped, vehicle: types.Vehicle, weaponHash: types.Hash, p3: types.Any) windows.BOOL {
return nativeCaller.invoke4(@as(u64, @intCast(8177556713575955336)), driver, vehicle, weaponHash, p3);
}
/// Full list of weapons & components by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn GIVE_WEAPON_COMPONENT_TO_PED(ped: types.Ped, weaponHash: types.Hash, componentHash: types.Hash) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(15665442664280656825)), ped, weaponHash, componentHash);
}
/// Full list of weapons & components by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn REMOVE_WEAPON_COMPONENT_FROM_PED(ped: types.Ped, weaponHash: types.Hash, componentHash: types.Hash) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(2201109082612124681)), ped, weaponHash, componentHash);
}
/// Full list of weapons & components by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn HAS_PED_GOT_WEAPON_COMPONENT(ped: types.Ped, weaponHash: types.Hash, componentHash: types.Hash) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(14236759287530185536)), ped, weaponHash, componentHash);
}
/// Full list of weapons & components by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn IS_PED_WEAPON_COMPONENT_ACTIVE(ped: types.Ped, weaponHash: types.Hash, componentHash: types.Hash) windows.BOOL {
return nativeCaller.invoke3(@as(u64, @intCast(970769834681013918)), ped, weaponHash, componentHash);
}
/// Used to be known as _PED_SKIP_NEXT_RELOADING
pub fn REFILL_AMMO_INSTANTLY(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(10091819004293262727)), ped);
}
/// Forces a ped to reload only if they are able to; if they have a full magazine, they will not reload.
pub fn MAKE_PED_RELOAD(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(2354876776827322419)), ped);
}
/// Nearly every instance of p1 I found was 31. Nearly every instance of p2 I found was 0.
/// REQUEST_WEAPON_ASSET(iLocal_1888, 31, 26);
pub fn REQUEST_WEAPON_ASSET(weaponHash: types.Hash, p1: c_int, p2: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(6071771004139350467)), weaponHash, p1, p2);
}
pub fn HAS_WEAPON_ASSET_LOADED(weaponHash: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(3955096325251305710)), weaponHash);
}
pub fn REMOVE_WEAPON_ASSET(weaponHash: types.Hash) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(12252305655226026236)), weaponHash);
}
/// Now has 8 params.
pub fn CREATE_WEAPON_OBJECT(weaponHash: types.Hash, ammoCount: c_int, x: f32, y: f32, z: f32, showWorldModel: windows.BOOL, scale: f32, p7: types.Any, p8: types.Any, p9: types.Any) types.Object {
return nativeCaller.invoke10(@as(u64, @intCast(10755110271371022134)), weaponHash, ammoCount, x, y, z, showWorldModel, scale, p7, p8, p9);
}
/// componentHash:
/// (use WEAPON::GET_WEAPON_COMPONENT_TYPE_MODEL() to get hash value)
/// ${component_at_ar_flsh}, ${component_at_ar_supp}, ${component_at_pi_flsh}, ${component_at_scope_large}, ${component_at_ar_supp_02}
pub fn GIVE_WEAPON_COMPONENT_TO_WEAPON_OBJECT(weaponObject: types.Object, componentHash: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(3738402496176665051)), weaponObject, componentHash);
}
/// see DOES_WEAPON_TAKE_WEAPON_COMPONENT for full list of weapons & components
pub fn REMOVE_WEAPON_COMPONENT_FROM_WEAPON_OBJECT(object: types.Object, componentHash: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17859071658891376145)), object, componentHash);
}
/// see DOES_WEAPON_TAKE_WEAPON_COMPONENT for full list of weapons & components
pub fn HAS_WEAPON_GOT_WEAPON_COMPONENT(weapon: types.Object, componentHash: types.Hash) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(8548263397245042577)), weapon, componentHash);
}
pub fn GIVE_WEAPON_OBJECT_TO_PED(weaponObject: types.Object, ped: types.Ped) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(12824669778194449591)), weaponObject, ped);
}
/// Full list of weapons & components by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn DOES_WEAPON_TAKE_WEAPON_COMPONENT(weaponHash: types.Hash, componentHash: types.Hash) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(6696357820197948080)), weaponHash, componentHash);
}
/// Drops the current weapon and returns the object
/// Unknown behavior when unarmed.
pub fn GET_WEAPON_OBJECT_FROM_PED(ped: types.Ped, p1: windows.BOOL) types.Object {
return nativeCaller.invoke2(@as(u64, @intCast(14619208419641565549)), ped, p1);
}
/// Gives the specified loadout to the specified ped.
/// Loadouts are defined in common.rpf\data\ai\loadouts.meta
/// Used to be known as _GIVE_LOADOUT_TO_PED
pub fn GIVE_LOADOUT_TO_PED(ped: types.Ped, loadoutHash: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(7564004940768475302)), ped, loadoutHash);
}
/// tintIndex can be the following:
/// 0 - Normal
/// 1 - Green
/// 2 - Gold
/// 3 - Pink
/// 4 - Army
/// 5 - LSPD
/// 6 - Orange
/// 7 - Platinum
/// Full list of weapons, components & tint indexes by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn SET_PED_WEAPON_TINT_INDEX(ped: types.Ped, weaponHash: types.Hash, tintIndex: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(5806999861877102392)), ped, weaponHash, tintIndex);
}
/// Full list of weapons, components & tint indexes by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn GET_PED_WEAPON_TINT_INDEX(ped: types.Ped, weaponHash: types.Hash) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(3143211000917945247)), ped, weaponHash);
}
/// Full list of weapons, components & tint indexes by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn SET_WEAPON_OBJECT_TINT_INDEX(weapon: types.Object, tintIndex: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17881358221396206761)), weapon, tintIndex);
}
pub fn GET_WEAPON_OBJECT_TINT_INDEX(weapon: types.Object) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(14778618342366064215)), weapon);
}
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn GET_WEAPON_TINT_COUNT(weaponHash: types.Hash) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(6759740710971153399)), weaponHash);
}
/// Colors:
/// 0 = Gray
/// 1 = Dark Gray
/// 2 = Black
/// 3 = White
/// 4 = Blue
/// 5 = Cyan
/// 6 = Aqua
/// 7 = Cool Blue
/// 8 = Dark Blue
/// 9 = Royal Blue
/// 10 = Plum
/// 11 = Dark Purple
/// 12 = Purple
/// 13 = Red
/// 14 = Wine Red
/// 15 = Magenta
/// 16 = Pink
/// 17 = Salmon
/// 18 = Hot Pink
/// 19 = Rust Orange
/// 20 = Brown
/// 21 = Earth
/// 22 = Orange
/// 23 = Light Orange
/// 24 = Dark Yellow
/// 25 = Yellow
/// 26 = Light Brown
/// 27 = Lime Green
/// 28 = Olive
/// 29 = Moss
/// 30 = Turquoise
/// 31 = Dark Green
/// Full list of weapons, components, tint indexes & weapon liveries by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
/// Used to be known as _SET_PED_WEAPON_LIVERY_COLOR
pub fn SET_PED_WEAPON_COMPONENT_TINT_INDEX(ped: types.Ped, weaponHash: types.Hash, camoComponentHash: types.Hash, colorIndex: c_int) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(11521724316029606125)), ped, weaponHash, camoComponentHash, colorIndex);
}
/// Returns -1 if camoComponentHash is invalid/not attached to the weapon.
/// Full list of weapons, components, tint indexes & weapon liveries by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
/// Used to be known as _GET_PED_WEAPON_LIVERY_COLOR
pub fn GET_PED_WEAPON_COMPONENT_TINT_INDEX(ped: types.Ped, weaponHash: types.Hash, camoComponentHash: types.Hash) c_int {
return nativeCaller.invoke3(@as(u64, @intCast(17340547693307858733)), ped, weaponHash, camoComponentHash);
}
/// Colors:
/// 0 = Gray
/// 1 = Dark Gray
/// 2 = Black
/// 3 = White
/// 4 = Blue
/// 5 = Cyan
/// 6 = Aqua
/// 7 = Cool Blue
/// 8 = Dark Blue
/// 9 = Royal Blue
/// 10 = Plum
/// 11 = Dark Purple
/// 12 = Purple
/// 13 = Red
/// 14 = Wine Red
/// 15 = Magenta
/// 16 = Pink
/// 17 = Salmon
/// 18 = Hot Pink
/// 19 = Rust Orange
/// 20 = Brown
/// 21 = Earth
/// 22 = Orange
/// 23 = Light Orange
/// 24 = Dark Yellow
/// 25 = Yellow
/// 26 = Light Brown
/// 27 = Lime Green
/// 28 = Olive
/// 29 = Moss
/// 30 = Turquoise
/// 31 = Dark Green
/// Full list of weapons, components, tint indexes & weapon liveries by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
/// Used to be known as _SET_WEAPON_OBJECT_LIVERY_COLOR
pub fn SET_WEAPON_OBJECT_COMPONENT_TINT_INDEX(weaponObject: types.Object, camoComponentHash: types.Hash, colorIndex: c_int) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(6748685446660663014)), weaponObject, camoComponentHash, colorIndex);
}
/// Returns -1 if camoComponentHash is invalid/not attached to the weapon object.
/// Full list of weapons, components, tint indexes & weapon liveries by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
/// Used to be known as _GET_WEAPON_OBJECT_LIVERY_COLOR
pub fn GET_WEAPON_OBJECT_COMPONENT_TINT_INDEX(weaponObject: types.Object, camoComponentHash: types.Hash) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(12964262346989061707)), weaponObject, camoComponentHash);
}
pub fn GET_PED_WEAPON_CAMO_INDEX(ped: types.Ped, weaponHash: types.Hash) c_int {
return nativeCaller.invoke2(@as(u64, @intCast(11730095978102264453)), ped, weaponHash);
}
pub fn SET_WEAPON_OBJECT_CAMO_INDEX(weaponObject: types.Object, p1: c_int) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10915786003686370891)), weaponObject, p1);
}
/// struct WeaponHudStatsData
/// {
/// BYTE hudDamage; // 0x0000
/// char _0x0001[0x7]; // 0x0001
/// BYTE hudSpeed; // 0x0008
/// char _0x0009[0x7]; // 0x0009
/// BYTE hudCapacity; // 0x0010
/// char _0x0011[0x7]; // 0x0011
/// BYTE hudAccuracy; // 0x0018
/// char _0x0019[0x7]; // 0x0019
/// BYTE hudRange; // 0x0020
/// };
/// Usage:
/// WeaponHudStatsData data;
/// if (GET_WEAPON_HUD_STATS(weaponHash, (int *)&data))
/// {
/// // BYTE damagePercentage = data.hudDamage and so on
/// }
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn GET_WEAPON_HUD_STATS(weaponHash: types.Hash, outData: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(15649009931461107386)), weaponHash, outData);
}
pub fn GET_WEAPON_COMPONENT_HUD_STATS(componentHash: types.Hash, outData: [*c]types.Any) windows.BOOL {
return nativeCaller.invoke2(@as(u64, @intCast(12955435042151262712)), componentHash, outData);
}
/// This native does not return damages of weapons from the melee and explosive group.
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
/// Used to be known as _GET_WEAPON_DAMAGE
pub fn GET_WEAPON_DAMAGE(weaponHash: types.Hash, componentHash: types.Hash) f32 {
return nativeCaller.invoke2(@as(u64, @intCast(3545380775022239827)), weaponHash, componentHash);
}
/// // Returns the size of the default weapon component clip.
/// Use it like this:
/// char cClipSize[32];
/// Hash cur;
/// if (WEAPON::GET_CURRENT_PED_WEAPON(playerPed, &cur, 1))
/// {
/// if (WEAPON::IS_WEAPON_VALID(cur))
/// {
/// int iClipSize = WEAPON::GET_WEAPON_CLIP_SIZE(cur);
/// sprintf_s(cClipSize, "ClipSize: %.d", iClipSize);
/// vDrawString(cClipSize, 0.5f, 0.5f);
/// }
/// }
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn GET_WEAPON_CLIP_SIZE(weaponHash: types.Hash) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(6357925372124491444)), weaponHash);
}
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
/// Used to be known as _GET_WEAPON_TIME_BETWEEN_SHOTS
pub fn GET_WEAPON_TIME_BETWEEN_SHOTS(weaponHash: types.Hash) f32 {
return nativeCaller.invoke1(@as(u64, @intCast(458569658196096932)), weaponHash);
}
pub fn SET_PED_CHANCE_OF_FIRING_BLANKS(ped: types.Ped, xBias: f32, yBias: f32) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(9473430057970387325)), ped, xBias, yBias);
}
/// Returns handle of the projectile.
pub fn SET_PED_SHOOT_ORDNANCE_WEAPON(ped: types.Ped, p1: f32) types.Object {
return nativeCaller.invoke2(@as(u64, @intCast(13026898851905159710)), ped, p1);
}
pub fn REQUEST_WEAPON_HIGH_DETAIL_MODEL(weaponObject: types.Entity) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(5194424688306734064)), weaponObject);
}
pub fn _SET_WEAPON_PED_DAMAGE_MODIFIER(weapon: types.Hash, damageModifier: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1193896072795557360)), weapon, damageModifier);
}
/// Changes the weapon damage output by the given multiplier value. Must be run every frame.
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
/// Used to be known as _SET_WEAPON_DAMAGE_MODIFIER
/// Used to be known as _SET_WEAPON_DAMAGE_MODIFIER_THIS_FRAME
pub fn SET_WEAPON_DAMAGE_MODIFIER(weaponHash: types.Hash, damageMultiplier: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5140841433027198206)), weaponHash, damageMultiplier);
}
/// Used to be known as _SET_WEAPON_EXPLOSION_RADIUS_MULTIPLIER
pub fn SET_WEAPON_AOE_MODIFIER(weaponHash: types.Hash, multiplier: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(5396909443708183596)), weaponHash, multiplier);
}
/// ex, WEAPON::SET_WEAPON_EFFECT_DURATION_MODIFIER(joaat("vehicle_weapon_mine_slick"), 1.0);
pub fn SET_WEAPON_EFFECT_DURATION_MODIFIER(p0: types.Hash, p1: f32) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(16632583823339551118)), p0, p1);
}
/// This native returns a true or false value.
/// Ped ped = The ped whose weapon you want to check.
pub fn IS_PED_CURRENT_WEAPON_SILENCED(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(7345588343449861831)), ped);
}
/// Used to be known as SET_WEAPON_SMOKEGRENADE_ASSIGNED
pub fn IS_FLASH_LIGHT_ON(ped: types.Ped) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(5437569628196246124)), ped);
}
pub fn SET_FLASH_LIGHT_FADE_DISTANCE(distance: f32) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14890709808944305051)), distance);
}
/// Enables/disables flashlight on ped's weapon.
/// Used to be known as _SET_FLASH_LIGHT_ENABLED
pub fn SET_FLASH_LIGHT_ACTIVE_HISTORY(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(10992643470123515904)), ped, toggle);
}
/// Changes the selected ped aiming animation style.
/// Note : You must use GET_HASH_KEY!
/// Strings to use with GET_HASH_KEY :
/// "Ballistic",
/// "Default",
/// "Fat",
/// "Female",
/// "FirstPerson",
/// "FirstPersonAiming",
/// "FirstPersonFranklin",
/// "FirstPersonFranklinAiming",
/// "FirstPersonFranklinRNG",
/// "FirstPersonFranklinScope",
/// "FirstPersonMPFemale",
/// "FirstPersonMichael",
/// "FirstPersonMichaelAiming",
/// "FirstPersonMichaelRNG",
/// "FirstPersonMichaelScope",
/// "FirstPersonRNG",
/// "FirstPersonScope",
/// "FirstPersonTrevor",
/// "FirstPersonTrevorAiming",
/// "FirstPersonTrevorRNG",
/// "FirstPersonTrevorScope",
/// "Franklin",
/// "Gang",
/// "Gang1H",
/// "GangFemale",
/// "Hillbilly",
/// "MP_F_Freemode",
/// "Michael",
/// "SuperFat",
/// "Trevor"
pub fn SET_WEAPON_ANIMATION_OVERRIDE(ped: types.Ped, animStyle: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(1177036244454935001)), ped, animStyle);
}
/// enum class eDamageType
/// {
/// UNKNOWN = 0,
/// NONE = 1,
/// MELEE = 2,
/// BULLET = 3,
/// BULLET_RUBBER = 4,
/// EXPLOSIVE = 5,
/// FIRE = 6,
/// COLLISION = 7,
/// FALL = 8,
/// DROWN = 9,
/// ELECTRIC = 10,
/// BARBED_WIRE = 11,
/// FIRE_EXTINGUISHER = 12,
/// SMOKE = 13,
/// WATER_CANNON = 14,
/// TRANQUILIZER = 15,
/// };
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn GET_WEAPON_DAMAGE_TYPE(weaponHash: types.Hash) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(4314654132534227717)), weaponHash);
}
pub fn SET_EQIPPED_WEAPON_START_SPINNING_AT_FULL_SPEED(ped: types.Ped) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(16491315969314470309)), ped);
}
/// this returns if you can use the weapon while using a parachute
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
pub fn CAN_USE_WEAPON_ON_PARACHUTE(weaponHash: types.Hash) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(13581701627098144628)), weaponHash);
}
/// Both coordinates are from objects in the decompiled scripts. Native related to 0xECDC202B25E5CF48 p1 value. The only weapon hash used in the decompiled scripts is weapon_air_defence_gun. These two natives are used by the yacht script, decompiled scripts suggest it and the weapon hash used (valkyrie's rockets) are also used by yachts.
/// Used to be known as _CREATE_AIR_DEFENSE_SPHERE
pub fn CREATE_AIR_DEFENCE_SPHERE(x: f32, y: f32, z: f32, radius: f32, p4: f32, p5: f32, p6: f32, weaponHash: types.Hash) c_int {
return nativeCaller.invoke8(@as(u64, @intCast(10515681208687443609)), x, y, z, radius, p4, p5, p6, weaponHash);
}
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
/// Used to be known as _CREATE_AIR_DEFENSE_AREA
pub fn CREATE_AIR_DEFENCE_ANGLED_AREA(p0: f32, p1: f32, p2: f32, p3: f32, p4: f32, p5: f32, p6: f32, p7: f32, p8: f32, radius: f32, weaponHash: types.Hash) c_int {
return nativeCaller.invoke11(@as(u64, @intCast(11359640511477300232)), p0, p1, p2, p3, p4, p5, p6, p7, p8, radius, weaponHash);
}
/// Used to be known as _REMOVE_AIR_DEFENSE_ZONE
pub fn REMOVE_AIR_DEFENCE_SPHERE(zoneId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(774429300358739296)), zoneId);
}
/// Used to be known as _REMOVE_ALL_AIR_DEFENSE_ZONES
pub fn REMOVE_ALL_AIR_DEFENCE_SPHERES() void {
_ = nativeCaller.invoke0(@as(u64, @intCast(2181346728676877454)));
}
/// Used to be known as _SET_PLAYER_AIR_DEFENSE_ZONE_FLAG
pub fn SET_PLAYER_TARGETTABLE_FOR_AIR_DEFENCE_SPHERE(player: types.Player, zoneId: c_int, enable: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(17067552057518837576)), player, zoneId, enable);
}
/// Used to be known as _IS_AIR_DEFENSE_ZONE_INSIDE_SPHERE
/// Used to be known as _IS_ANY_AIR_DEFENSE_ZONE_INSIDE_SPHERE
pub fn IS_AIR_DEFENCE_SPHERE_IN_AREA(x: f32, y: f32, z: f32, radius: f32, outZoneId: [*c]c_int) windows.BOOL {
return nativeCaller.invoke5(@as(u64, @intCast(15760737785750737908)), x, y, z, radius, outZoneId);
}
/// Used to be known as _FIRE_AIR_DEFENSE_WEAPON
pub fn FIRE_AIR_DEFENCE_SPHERE_WEAPON_AT_POSITION(zoneId: c_int, x: f32, y: f32, z: f32) void {
_ = nativeCaller.invoke4(@as(u64, @intCast(4967753149926421364)), zoneId, x, y, z);
}
/// Used to be known as _DOES_AIR_DEFENSE_ZONE_EXIST
pub fn DOES_AIR_DEFENCE_SPHERE_EXIST(zoneId: c_int) windows.BOOL {
return nativeCaller.invoke1(@as(u64, @intCast(14806047015550418255)), zoneId);
}
/// Disables selecting the given weapon. Ped isn't forced to put the gun away. However you can't reselect the weapon if you holster then unholster. Weapon is also grayed out on the weapon wheel.
/// Full list of weapons by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/weapons.json
/// Used to be known as _SET_CAN_PED_SELECT_WEAPON
/// Used to be known as _SET_CAN_PED_EQUIP_WEAPON
pub fn SET_CAN_PED_SELECT_INVENTORY_WEAPON(ped: types.Ped, weaponHash: types.Hash, toggle: windows.BOOL) void {
_ = nativeCaller.invoke3(@as(u64, @intCast(13003892800235661540)), ped, weaponHash, toggle);
}
/// Disable all weapons. Does the same as 0xB4771B9AAF4E68E4 except for all weapons.
/// Used to be known as _SET_CAN_PED_EQUIP_ALL_WEAPONS
pub fn SET_CAN_PED_SELECT_ALL_WEAPONS(ped: types.Ped, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(17290046886974186761)), ped, toggle);
}
};
pub const ZONE = struct {
pub fn GET_ZONE_AT_COORDS(x: f32, y: f32, z: f32) c_int {
return nativeCaller.invoke3(@as(u64, @intCast(2811385424171021044)), x, y, z);
}
/// 'zoneName' corresponds to an entry in 'popzone.ipl'.
/// AIRP = Los Santos International Airport
/// ALAMO = Alamo Sea
/// ALTA = Alta
/// ARMYB = Fort Zancudo
/// BANHAMC = Banham Canyon Dr
/// BANNING = Banning
/// BEACH = Vespucci Beach
/// BHAMCA = Banham Canyon
/// BRADP = Braddock Pass
/// BRADT = Braddock Tunnel
/// BURTON = Burton
/// CALAFB = Calafia Bridge
/// CANNY = Raton Canyon
/// CCREAK = Cassidy Creek
/// CHAMH = Chamberlain Hills
/// CHIL = Vinewood Hills
/// CHU = Chumash
/// CMSW = Chiliad Mountain State Wilderness
/// CYPRE = Cypress Flats
/// DAVIS = Davis
/// DELBE = Del Perro Beach
/// DELPE = Del Perro
/// DELSOL = La Puerta
/// DESRT = Grand Senora Desert
/// DOWNT = Downtown
/// DTVINE = Downtown Vinewood
/// EAST_V = East Vinewood
/// EBURO = El Burro Heights
/// ELGORL = El Gordo Lighthouse
/// ELYSIAN = Elysian Island
/// GALFISH = Galilee
/// GOLF = GWC and Golfing Society
/// GRAPES = Grapeseed
/// GREATC = Great Chaparral
/// HARMO = Harmony
/// HAWICK = Hawick
/// HORS = Vinewood Racetrack
/// HUMLAB = Humane Labs and Research
/// JAIL = Bolingbroke Penitentiary
/// KOREAT = Little Seoul
/// LACT = Land Act Reservoir
/// LAGO = Lago Zancudo
/// LDAM = Land Act Dam
/// LEGSQU = Legion Square
/// LMESA = La Mesa
/// LOSPUER = La Puerta
/// MIRR = Mirror Park
/// MORN = Morningwood
/// MOVIE = Richards Majestic
/// MTCHIL = Mount Chiliad
/// MTGORDO = Mount Gordo
/// MTJOSE = Mount Josiah
/// MURRI = Murrieta Heights
/// NCHU = North Chumash
/// NOOSE = N.O.O.S.E
/// OCEANA = Pacific Ocean
/// PALCOV = Paleto Cove
/// PALETO = Paleto Bay
/// PALFOR = Paleto Forest
/// PALHIGH = Palomino Highlands
/// PALMPOW = Palmer-Taylor Power Station
/// PBLUFF = Pacific Bluffs
/// PBOX = Pillbox Hill
/// PROCOB = Procopio Beach
/// RANCHO = Rancho
/// RGLEN = Richman Glen
/// RICHM = Richman
/// ROCKF = Rockford Hills
/// RTRAK = Redwood Lights Track
/// SANAND = San Andreas
/// SANCHIA = San Chianski Mountain Range
/// SANDY = Sandy Shores
/// SKID = Mission Row
/// SLAB = Stab City
/// STAD = Maze Bank Arena
/// STRAW = Strawberry
/// TATAMO = Tataviam Mountains
/// TERMINA = Terminal
/// TEXTI = Textile City
/// TONGVAH = Tongva Hills
/// TONGVAV = Tongva Valley
/// VCANA = Vespucci Canals
/// VESP = Vespucci
/// VINE = Vinewood
/// WINDF = Ron Alternates Wind Farm
/// WVINE = West Vinewood
/// ZANCUDO = Zancudo River
/// ZP_ORT = Port of South Los Santos
/// ZQ_UAR = Davis Quartz
/// Full list of zones by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/zones.json
pub fn GET_ZONE_FROM_NAME_ID(zoneName: [*c]const u8) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(11010488726806031553)), zoneName);
}
pub fn GET_ZONE_POPSCHEDULE(zoneId: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(4842702485247014075)), zoneId);
}
/// AIRP = Los Santos International Airport
/// ALAMO = Alamo Sea
/// ALTA = Alta
/// ARMYB = Fort Zancudo
/// BANHAMC = Banham Canyon Dr
/// BANNING = Banning
/// BEACH = Vespucci Beach
/// BHAMCA = Banham Canyon
/// BRADP = Braddock Pass
/// BRADT = Braddock Tunnel
/// BURTON = Burton
/// CALAFB = Calafia Bridge
/// CANNY = Raton Canyon
/// CCREAK = Cassidy Creek
/// CHAMH = Chamberlain Hills
/// CHIL = Vinewood Hills
/// CHU = Chumash
/// CMSW = Chiliad Mountain State Wilderness
/// CYPRE = Cypress Flats
/// DAVIS = Davis
/// DELBE = Del Perro Beach
/// DELPE = Del Perro
/// DELSOL = La Puerta
/// DESRT = Grand Senora Desert
/// DOWNT = Downtown
/// DTVINE = Downtown Vinewood
/// EAST_V = East Vinewood
/// EBURO = El Burro Heights
/// ELGORL = El Gordo Lighthouse
/// ELYSIAN = Elysian Island
/// GALFISH = Galilee
/// GOLF = GWC and Golfing Society
/// GRAPES = Grapeseed
/// GREATC = Great Chaparral
/// HARMO = Harmony
/// HAWICK = Hawick
/// HORS = Vinewood Racetrack
/// HUMLAB = Humane Labs and Research
/// JAIL = Bolingbroke Penitentiary
/// KOREAT = Little Seoul
/// LACT = Land Act Reservoir
/// LAGO = Lago Zancudo
/// LDAM = Land Act Dam
/// LEGSQU = Legion Square
/// LMESA = La Mesa
/// LOSPUER = La Puerta
/// MIRR = Mirror Park
/// MORN = Morningwood
/// MOVIE = Richards Majestic
/// MTCHIL = Mount Chiliad
/// MTGORDO = Mount Gordo
/// MTJOSE = Mount Josiah
/// MURRI = Murrieta Heights
/// NCHU = North Chumash
/// NOOSE = N.O.O.S.E
/// OCEANA = Pacific Ocean
/// PALCOV = Paleto Cove
/// PALETO = Paleto Bay
/// PALFOR = Paleto Forest
/// PALHIGH = Palomino Highlands
/// PALMPOW = Palmer-Taylor Power Station
/// PBLUFF = Pacific Bluffs
/// PBOX = Pillbox Hill
/// PROCOB = Procopio Beach
/// RANCHO = Rancho
/// RGLEN = Richman Glen
/// RICHM = Richman
/// ROCKF = Rockford Hills
/// RTRAK = Redwood Lights Track
/// SANAND = San Andreas
/// SANCHIA = San Chianski Mountain Range
/// SANDY = Sandy Shores
/// SKID = Mission Row
/// SLAB = Stab City
/// STAD = Maze Bank Arena
/// STRAW = Strawberry
/// TATAMO = Tataviam Mountains
/// TERMINA = Terminal
/// TEXTI = Textile City
/// TONGVAH = Tongva Hills
/// TONGVAV = Tongva Valley
/// VCANA = Vespucci Canals
/// VESP = Vespucci
/// VINE = Vinewood
/// WINDF = Ron Alternates Wind Farm
/// WVINE = West Vinewood
/// ZANCUDO = Zancudo River
/// ZP_ORT = Port of South Los Santos
/// ZQ_UAR = Davis Quartz
/// Full list of zones by DurtyFree: https://github.com/DurtyFree/gta-v-data-dumps/blob/master/zones.json
pub fn GET_NAME_OF_ZONE(x: f32, y: f32, z: f32) [*c]const u8 {
return nativeCaller.invoke3(@as(u64, @intCast(14812450763245150666)), x, y, z);
}
pub fn SET_ZONE_ENABLED(zoneId: c_int, toggle: windows.BOOL) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(13429398643585996305)), zoneId, toggle);
}
/// cellphone range 1- 5 used for signal bar in iFruit phone
pub fn GET_ZONE_SCUMMINESS(zoneId: c_int) c_int {
return nativeCaller.invoke1(@as(u64, @intCast(6880135243135321913)), zoneId);
}
/// Only used once in the decompiled scripts. Seems to be related to scripted vehicle generators.
/// Modified example from "am_imp_exp.c4", line 6406:
/// /* popSchedules[0] = ZONE::GET_ZONE_POPSCHEDULE(ZONE::GET_ZONE_AT_COORDS(891.3, 807.9, 188.1));
/// etc.
/// */
/// ZONE::OVERRIDE_POPSCHEDULE_VEHICLE_MODEL(popSchedules[index], vehicleHash);
/// STREAMING::REQUEST_MODEL(vehicleHash);
pub fn OVERRIDE_POPSCHEDULE_VEHICLE_MODEL(scheduleId: c_int, vehicleHash: types.Hash) void {
_ = nativeCaller.invoke2(@as(u64, @intCast(6880754124677085047)), scheduleId, vehicleHash);
}
/// Only used once in the decompiled scripts. Seems to be related to scripted vehicle generators.
/// Modified example from "am_imp_exp.c4", line 6418:
/// /* popSchedules[0] = ZONE::GET_ZONE_POPSCHEDULE(ZONE::GET_ZONE_AT_COORDS(891.3, 807.9, 188.1));
/// etc.
/// */
/// STREAMING::SET_MODEL_AS_NO_LONGER_NEEDED(vehicleHash);
/// ZONE::CLEAR_POPSCHEDULE_OVERRIDE_VEHICLE_MODEL(popSchedules[index]);
pub fn CLEAR_POPSCHEDULE_OVERRIDE_VEHICLE_MODEL(scheduleId: c_int) void {
_ = nativeCaller.invoke1(@as(u64, @intCast(6633207860560761116)), scheduleId);
}
/// Returns a hash representing which part of the map the given coords are located.
/// Possible return values:
/// (Hash of) city -> -289320599
/// (Hash of) countryside -> 2072609373
/// C# Example :
/// Ped player = Game.Player.Character;
/// Hash h = Function.Call<Hash>(Hash.GET_HASH_OF_MAP_AREA_AT_COORDS, player.Position.X, player.Position.Y, player.Position.Z);
pub fn GET_HASH_OF_MAP_AREA_AT_COORDS(x: f32, y: f32, z: f32) types.Hash {
return nativeCaller.invoke3(@as(u64, @intCast(9144081107607193384)), x, y, z);
}
};
|
0 | repos/ScriptHookVZig | repos/ScriptHookVZig/src/enums.zig | const std = @import("std");
const DWORD = std.os.windows.DWORD;
pub const eAudioFlag = extern struct {
bits: c_int = 0,
pub const AudioFlagActivateSwitchWheelAudio: eAudioFlag = .{ .bits = 0 };
pub const AudioFlagAllowCutsceneOverScreenFade: eAudioFlag = .{ .bits = 1 };
pub const AudioFlagAllowForceRadioAfterRetune: eAudioFlag = .{ .bits = 2 };
pub const AudioFlagAllowPainAndAmbientSpeechToPlayDuringCutscene: eAudioFlag = .{ .bits = 3 };
pub const AudioFlagAllowPlayerAIOnMission: eAudioFlag = .{ .bits = 4 };
pub const AudioFlagAllowPoliceScannerWhenPlayerHasNoControl: eAudioFlag = .{ .bits = 5 };
pub const AudioFlagAllowRadioDuringSwitch: eAudioFlag = .{ .bits = 6 };
pub const AudioFlagAllowRadioOverScreenFade: eAudioFlag = .{ .bits = 7 };
pub const AudioFlagAllowScoreAndRadio: eAudioFlag = .{ .bits = 8 };
pub const AudioFlagAllowScriptedSpeechInSlowMo: eAudioFlag = .{ .bits = 9 };
pub const AudioFlagAvoidMissionCompleteDelay: eAudioFlag = .{ .bits = 10 };
pub const AudioFlagDisableAbortConversationForDeathAndInjury: eAudioFlag = .{ .bits = 11 };
pub const AudioFlagDisableAbortConversationForRagdoll: eAudioFlag = .{ .bits = 12 };
pub const AudioFlagDisableBarks: eAudioFlag = .{ .bits = 13 };
pub const AudioFlagDisableFlightMusic: eAudioFlag = .{ .bits = 14 };
pub const AudioFlagDisableReplayScriptStreamRecording: eAudioFlag = .{ .bits = 15 };
pub const AudioFlagEnableHeadsetBeep: eAudioFlag = .{ .bits = 16 };
pub const AudioFlagForceConversationInterrupt: eAudioFlag = .{ .bits = 17 };
pub const AudioFlagForceSeamlessRadioSwitch: eAudioFlag = .{ .bits = 18 };
pub const AudioFlagForceSniperAudio: eAudioFlag = .{ .bits = 19 };
pub const AudioFlagFrontendRadioDisabled: eAudioFlag = .{ .bits = 20 };
pub const AudioFlagHoldMissionCompleteWhenPrepared: eAudioFlag = .{ .bits = 21 };
pub const AudioFlagIsDirectorModeActive: eAudioFlag = .{ .bits = 22 };
pub const AudioFlagIsPlayerOnMissionForSpeech: eAudioFlag = .{ .bits = 23 };
pub const AudioFlagListenerReverbDisabled: eAudioFlag = .{ .bits = 24 };
pub const AudioFlagLoadMPData: eAudioFlag = .{ .bits = 25 };
pub const AudioFlagMobileRadioInGame: eAudioFlag = .{ .bits = 26 };
pub const AudioFlagOnlyAllowScriptTriggerPoliceScanner: eAudioFlag = .{ .bits = 27 };
pub const AudioFlagPlayMenuMusic: eAudioFlag = .{ .bits = 28 };
pub const AudioFlagPoliceScannerDisabled: eAudioFlag = .{ .bits = 29 };
pub const AudioFlagScriptedConvListenerMaySpeak: eAudioFlag = .{ .bits = 30 };
pub const AudioFlagSpeechDucksScore: eAudioFlag = .{ .bits = 31 };
pub const AudioFlagSuppressPlayerScubaBreathing: eAudioFlag = .{ .bits = 32 };
pub const AudioFlagWantedMusicDisabled: eAudioFlag = .{ .bits = 33 };
pub const AudioFlagWantedMusicOnMission: eAudioFlag = .{ .bits = 34 };
};
pub const eBlipColor = extern struct {
bits: c_int = 0,
pub const BlipColorWhite: eBlipColor = .{ .bits = @as(c_uint, @intCast(0)) };
pub const BlipColorRed: eBlipColor = .{ .bits = @as(c_uint, @intCast(1)) };
pub const BlipColorGreen: eBlipColor = .{ .bits = @as(c_uint, @intCast(2)) };
pub const BlipColorBlue: eBlipColor = .{ .bits = @as(c_uint, @intCast(3)) };
pub const BlipColorYellow: eBlipColor = .{ .bits = @as(c_uint, @intCast(66)) };
};
pub const eBlipSprite = extern struct {
bits: c_int = 0,
pub const BlipSpriteStandard: eBlipSprite = .{ .bits = @as(c_uint, @intCast(1)) };
pub const BlipSpriteBigBlip: eBlipSprite = .{ .bits = @as(c_uint, @intCast(2)) };
pub const BlipSpritePoliceOfficer: eBlipSprite = .{ .bits = @as(c_uint, @intCast(3)) };
pub const BlipSpritePoliceArea: eBlipSprite = .{ .bits = @as(c_uint, @intCast(4)) };
pub const BlipSpriteSquare: eBlipSprite = .{ .bits = @as(c_uint, @intCast(5)) };
pub const BlipSpritePlayer: eBlipSprite = .{ .bits = @as(c_uint, @intCast(6)) };
pub const BlipSpriteNorth: eBlipSprite = .{ .bits = @as(c_uint, @intCast(7)) };
pub const BlipSpriteWaypoint: eBlipSprite = .{ .bits = @as(c_uint, @intCast(8)) };
pub const BlipSpriteBigCircle: eBlipSprite = .{ .bits = @as(c_uint, @intCast(9)) };
pub const BlipSpriteBigCircleOutline: eBlipSprite = .{ .bits = @as(c_uint, @intCast(10)) };
pub const BlipSpriteArrowUpOutlined: eBlipSprite = .{ .bits = @as(c_uint, @intCast(11)) };
pub const BlipSpriteArrowDownOutlined: eBlipSprite = .{ .bits = @as(c_uint, @intCast(12)) };
pub const BlipSpriteArrowUp: eBlipSprite = .{ .bits = @as(c_uint, @intCast(13)) };
pub const BlipSpriteArrowDown: eBlipSprite = .{ .bits = @as(c_uint, @intCast(14)) };
pub const BlipSpritePoliceHelicopterAnimated: eBlipSprite = .{ .bits = @as(c_uint, @intCast(15)) };
pub const BlipSpriteJet: eBlipSprite = .{ .bits = @as(c_uint, @intCast(16)) };
pub const BlipSpriteNumber1: eBlipSprite = .{ .bits = @as(c_uint, @intCast(17)) };
pub const BlipSpriteNumber2: eBlipSprite = .{ .bits = @as(c_uint, @intCast(18)) };
pub const BlipSpriteNumber3: eBlipSprite = .{ .bits = @as(c_uint, @intCast(19)) };
pub const BlipSpriteNumber4: eBlipSprite = .{ .bits = @as(c_uint, @intCast(20)) };
pub const BlipSpriteNumber5: eBlipSprite = .{ .bits = @as(c_uint, @intCast(21)) };
pub const BlipSpriteNumber6: eBlipSprite = .{ .bits = @as(c_uint, @intCast(22)) };
pub const BlipSpriteNumber7: eBlipSprite = .{ .bits = @as(c_uint, @intCast(23)) };
pub const BlipSpriteNumber8: eBlipSprite = .{ .bits = @as(c_uint, @intCast(24)) };
pub const BlipSpriteNumber9: eBlipSprite = .{ .bits = @as(c_uint, @intCast(25)) };
pub const BlipSpriteNumber10: eBlipSprite = .{ .bits = @as(c_uint, @intCast(26)) };
pub const BlipSpriteGTAOCrew: eBlipSprite = .{ .bits = @as(c_uint, @intCast(27)) };
pub const BlipSpriteGTAOFriendly: eBlipSprite = .{ .bits = @as(c_uint, @intCast(28)) };
pub const BlipSpriteLift: eBlipSprite = .{ .bits = @as(c_uint, @intCast(36)) };
pub const BlipSpriteRaceFinish: eBlipSprite = .{ .bits = @as(c_uint, @intCast(38)) };
pub const BlipSpriteSafehouse: eBlipSprite = .{ .bits = @as(c_uint, @intCast(40)) };
pub const BlipSpritePoliceOfficer2: eBlipSprite = .{ .bits = @as(c_uint, @intCast(41)) };
pub const BlipSpritePoliceCarDot: eBlipSprite = .{ .bits = @as(c_uint, @intCast(42)) };
pub const BlipSpritePoliceHelicopter: eBlipSprite = .{ .bits = @as(c_uint, @intCast(43)) };
pub const BlipSpriteChatBubble: eBlipSprite = .{ .bits = @as(c_uint, @intCast(47)) };
pub const BlipSpriteGarage2: eBlipSprite = .{ .bits = @as(c_uint, @intCast(50)) };
pub const BlipSpriteDrugs: eBlipSprite = .{ .bits = @as(c_uint, @intCast(51)) };
pub const BlipSpriteStore: eBlipSprite = .{ .bits = @as(c_uint, @intCast(52)) };
pub const BlipSpritePoliceCar: eBlipSprite = .{ .bits = @as(c_uint, @intCast(56)) };
pub const BlipSpritePolicePlayer: eBlipSprite = .{ .bits = @as(c_uint, @intCast(58)) };
pub const BlipSpritePoliceStation: eBlipSprite = .{ .bits = @as(c_uint, @intCast(60)) };
pub const BlipSpriteHospital: eBlipSprite = .{ .bits = @as(c_uint, @intCast(61)) };
pub const BlipSpriteHelicopter: eBlipSprite = .{ .bits = @as(c_uint, @intCast(64)) };
pub const BlipSpriteStrangersAndFreaks: eBlipSprite = .{ .bits = @as(c_uint, @intCast(65)) };
pub const BlipSpriteArmoredTruck: eBlipSprite = .{ .bits = @as(c_uint, @intCast(66)) };
pub const BlipSpriteTowTruck: eBlipSprite = .{ .bits = @as(c_uint, @intCast(68)) };
pub const BlipSpriteBarber: eBlipSprite = .{ .bits = @as(c_uint, @intCast(71)) };
pub const BlipSpriteLosSantosCustoms: eBlipSprite = .{ .bits = @as(c_uint, @intCast(72)) };
pub const BlipSpriteClothes: eBlipSprite = .{ .bits = @as(c_uint, @intCast(73)) };
pub const BlipSpriteTattooParlor: eBlipSprite = .{ .bits = @as(c_uint, @intCast(75)) };
pub const BlipSpriteSimeon: eBlipSprite = .{ .bits = @as(c_uint, @intCast(76)) };
pub const BlipSpriteLester: eBlipSprite = .{ .bits = @as(c_uint, @intCast(77)) };
pub const BlipSpriteMichael: eBlipSprite = .{ .bits = @as(c_uint, @intCast(78)) };
pub const BlipSpriteTrevor: eBlipSprite = .{ .bits = @as(c_uint, @intCast(79)) };
pub const BlipSpriteRampage: eBlipSprite = .{ .bits = @as(c_uint, @intCast(84)) };
pub const BlipSpriteVinewoodTours: eBlipSprite = .{ .bits = @as(c_uint, @intCast(85)) };
pub const BlipSpriteLamar: eBlipSprite = .{ .bits = @as(c_uint, @intCast(86)) };
pub const BlipSpriteFranklin: eBlipSprite = .{ .bits = @as(c_uint, @intCast(88)) };
pub const BlipSpriteChinese: eBlipSprite = .{ .bits = @as(c_uint, @intCast(89)) };
pub const BlipSpriteAirport: eBlipSprite = .{ .bits = @as(c_uint, @intCast(90)) };
pub const BlipSpriteBar: eBlipSprite = .{ .bits = @as(c_uint, @intCast(93)) };
pub const BlipSpriteBaseJump: eBlipSprite = .{ .bits = @as(c_uint, @intCast(94)) };
pub const BlipSpriteCarWash: eBlipSprite = .{ .bits = @as(c_uint, @intCast(100)) };
pub const BlipSpriteComedyClub: eBlipSprite = .{ .bits = @as(c_uint, @intCast(102)) };
pub const BlipSpriteDart: eBlipSprite = .{ .bits = @as(c_uint, @intCast(103)) };
pub const BlipSpriteFIB: eBlipSprite = .{ .bits = @as(c_uint, @intCast(106)) };
pub const BlipSpriteDollarSign: eBlipSprite = .{ .bits = @as(c_uint, @intCast(108)) };
pub const BlipSpriteGolf: eBlipSprite = .{ .bits = @as(c_uint, @intCast(109)) };
pub const BlipSpriteAmmuNation: eBlipSprite = .{ .bits = @as(c_uint, @intCast(110)) };
pub const BlipSpriteExile: eBlipSprite = .{ .bits = @as(c_uint, @intCast(112)) };
pub const BlipSpriteShootingRange: eBlipSprite = .{ .bits = @as(c_uint, @intCast(119)) };
pub const BlipSpriteSolomon: eBlipSprite = .{ .bits = @as(c_uint, @intCast(120)) };
pub const BlipSpriteStripClub: eBlipSprite = .{ .bits = @as(c_uint, @intCast(121)) };
pub const BlipSpriteTennis: eBlipSprite = .{ .bits = @as(c_uint, @intCast(122)) };
pub const BlipSpriteTriathlon: eBlipSprite = .{ .bits = @as(c_uint, @intCast(126)) };
pub const BlipSpriteOffRoadRaceFinish: eBlipSprite = .{ .bits = @as(c_uint, @intCast(127)) };
pub const BlipSpriteKey: eBlipSprite = .{ .bits = @as(c_uint, @intCast(134)) };
pub const BlipSpriteMovieTheater: eBlipSprite = .{ .bits = @as(c_uint, @intCast(135)) };
pub const BlipSpriteMusic: eBlipSprite = .{ .bits = @as(c_uint, @intCast(136)) };
pub const BlipSpriteMarijuana: eBlipSprite = .{ .bits = @as(c_uint, @intCast(140)) };
pub const BlipSpriteHunting: eBlipSprite = .{ .bits = @as(c_uint, @intCast(141)) };
pub const BlipSpriteArmsTraffickingGround: eBlipSprite = .{ .bits = @as(c_uint, @intCast(147)) };
pub const BlipSpriteNigel: eBlipSprite = .{ .bits = @as(c_uint, @intCast(149)) };
pub const BlipSpriteAssaultRifle: eBlipSprite = .{ .bits = @as(c_uint, @intCast(150)) };
pub const BlipSpriteBat: eBlipSprite = .{ .bits = @as(c_uint, @intCast(151)) };
pub const BlipSpriteGrenade: eBlipSprite = .{ .bits = @as(c_uint, @intCast(152)) };
pub const BlipSpriteHealth: eBlipSprite = .{ .bits = @as(c_uint, @intCast(153)) };
pub const BlipSpriteKnife: eBlipSprite = .{ .bits = @as(c_uint, @intCast(154)) };
pub const BlipSpriteMolotov: eBlipSprite = .{ .bits = @as(c_uint, @intCast(155)) };
pub const BlipSpritePistol: eBlipSprite = .{ .bits = @as(c_uint, @intCast(156)) };
pub const BlipSpriteRPG: eBlipSprite = .{ .bits = @as(c_uint, @intCast(157)) };
pub const BlipSpriteShotgun: eBlipSprite = .{ .bits = @as(c_uint, @intCast(158)) };
pub const BlipSpriteSMG: eBlipSprite = .{ .bits = @as(c_uint, @intCast(159)) };
pub const BlipSpriteSniper: eBlipSprite = .{ .bits = @as(c_uint, @intCast(160)) };
pub const BlipSpriteSonicWave: eBlipSprite = .{ .bits = @as(c_uint, @intCast(161)) };
pub const BlipSpritePointOfInterest: eBlipSprite = .{ .bits = @as(c_uint, @intCast(162)) };
pub const BlipSpriteGTAOPassive: eBlipSprite = .{ .bits = @as(c_uint, @intCast(163)) };
pub const BlipSpriteGTAOUsingMenu: eBlipSprite = .{ .bits = @as(c_uint, @intCast(164)) };
pub const BlipSpriteLink: eBlipSprite = .{ .bits = @as(c_uint, @intCast(171)) };
pub const BlipSpriteMinigun: eBlipSprite = .{ .bits = @as(c_uint, @intCast(173)) };
pub const BlipSpriteGrenadeLauncher: eBlipSprite = .{ .bits = @as(c_uint, @intCast(174)) };
pub const BlipSpriteArmor: eBlipSprite = .{ .bits = @as(c_uint, @intCast(175)) };
pub const BlipSpriteCastle: eBlipSprite = .{ .bits = @as(c_uint, @intCast(176)) };
pub const BlipSpriteCamera: eBlipSprite = .{ .bits = @as(c_uint, @intCast(184)) };
pub const BlipSpriteHandcuffs: eBlipSprite = .{ .bits = @as(c_uint, @intCast(188)) };
pub const BlipSpriteYoga: eBlipSprite = .{ .bits = @as(c_uint, @intCast(197)) };
pub const BlipSpriteCab: eBlipSprite = .{ .bits = @as(c_uint, @intCast(198)) };
pub const BlipSpriteNumber11: eBlipSprite = .{ .bits = @as(c_uint, @intCast(199)) };
pub const BlipSpriteNumber12: eBlipSprite = .{ .bits = @as(c_uint, @intCast(200)) };
pub const BlipSpriteNumber13: eBlipSprite = .{ .bits = @as(c_uint, @intCast(201)) };
pub const BlipSpriteNumber14: eBlipSprite = .{ .bits = @as(c_uint, @intCast(202)) };
pub const BlipSpriteNumber15: eBlipSprite = .{ .bits = @as(c_uint, @intCast(203)) };
pub const BlipSpriteNumber16: eBlipSprite = .{ .bits = @as(c_uint, @intCast(204)) };
pub const BlipSpriteShrink: eBlipSprite = .{ .bits = @as(c_uint, @intCast(205)) };
pub const BlipSpriteEpsilon: eBlipSprite = .{ .bits = @as(c_uint, @intCast(206)) };
pub const BlipSpritePersonalVehicleCar: eBlipSprite = .{ .bits = @as(c_uint, @intCast(225)) };
pub const BlipSpritePersonalVehicleBike: eBlipSprite = .{ .bits = @as(c_uint, @intCast(226)) };
pub const BlipSpriteCustody: eBlipSprite = .{ .bits = @as(c_uint, @intCast(237)) };
pub const BlipSpriteArmsTraffickingAir: eBlipSprite = .{ .bits = @as(c_uint, @intCast(251)) };
pub const BlipSpriteFairground: eBlipSprite = .{ .bits = @as(c_uint, @intCast(266)) };
pub const BlipSpritePropertyManagement: eBlipSprite = .{ .bits = @as(c_uint, @intCast(267)) };
pub const BlipSpriteAltruist: eBlipSprite = .{ .bits = @as(c_uint, @intCast(269)) };
pub const BlipSpriteEnemy: eBlipSprite = .{ .bits = @as(c_uint, @intCast(270)) };
pub const BlipSpriteChop: eBlipSprite = .{ .bits = @as(c_uint, @intCast(273)) };
pub const BlipSpriteDead: eBlipSprite = .{ .bits = @as(c_uint, @intCast(274)) };
pub const BlipSpriteHooker: eBlipSprite = .{ .bits = @as(c_uint, @intCast(279)) };
pub const BlipSpriteFriend: eBlipSprite = .{ .bits = @as(c_uint, @intCast(280)) };
pub const BlipSpriteBountyHit: eBlipSprite = .{ .bits = @as(c_uint, @intCast(303)) };
pub const BlipSpriteGTAOMission: eBlipSprite = .{ .bits = @as(c_uint, @intCast(304)) };
pub const BlipSpriteGTAOSurvival: eBlipSprite = .{ .bits = @as(c_uint, @intCast(305)) };
pub const BlipSpriteCrateDrop: eBlipSprite = .{ .bits = @as(c_uint, @intCast(306)) };
pub const BlipSpritePlaneDrop: eBlipSprite = .{ .bits = @as(c_uint, @intCast(307)) };
pub const BlipSpriteSub: eBlipSprite = .{ .bits = @as(c_uint, @intCast(308)) };
pub const BlipSpriteRace: eBlipSprite = .{ .bits = @as(c_uint, @intCast(309)) };
pub const BlipSpriteDeathmatch: eBlipSprite = .{ .bits = @as(c_uint, @intCast(310)) };
pub const BlipSpriteArmWrestling: eBlipSprite = .{ .bits = @as(c_uint, @intCast(311)) };
pub const BlipSpriteAmmuNationShootingRange: eBlipSprite = .{ .bits = @as(c_uint, @intCast(313)) };
pub const BlipSpriteRaceAir: eBlipSprite = .{ .bits = @as(c_uint, @intCast(314)) };
pub const BlipSpriteRaceCar: eBlipSprite = .{ .bits = @as(c_uint, @intCast(315)) };
pub const BlipSpriteRaceSea: eBlipSprite = .{ .bits = @as(c_uint, @intCast(316)) };
pub const BlipSpriteGarbageTruck: eBlipSprite = .{ .bits = @as(c_uint, @intCast(318)) };
pub const BlipSpriteSafehouseForSale: eBlipSprite = .{ .bits = @as(c_uint, @intCast(350)) };
pub const BlipSpritePackage: eBlipSprite = .{ .bits = @as(c_uint, @intCast(351)) };
pub const BlipSpriteMartinMadrazo: eBlipSprite = .{ .bits = @as(c_uint, @intCast(352)) };
pub const BlipSpriteEnemyHelicopter: eBlipSprite = .{ .bits = @as(c_uint, @intCast(353)) };
pub const BlipSpriteBoost: eBlipSprite = .{ .bits = @as(c_uint, @intCast(354)) };
pub const BlipSpriteDevin: eBlipSprite = .{ .bits = @as(c_uint, @intCast(355)) };
pub const BlipSpriteMarina: eBlipSprite = .{ .bits = @as(c_uint, @intCast(356)) };
pub const BlipSpriteGarage: eBlipSprite = .{ .bits = @as(c_uint, @intCast(357)) };
pub const BlipSpriteGolfFlag: eBlipSprite = .{ .bits = @as(c_uint, @intCast(358)) };
pub const BlipSpriteHangar: eBlipSprite = .{ .bits = @as(c_uint, @intCast(359)) };
pub const BlipSpriteHelipad: eBlipSprite = .{ .bits = @as(c_uint, @intCast(360)) };
pub const BlipSpriteJerryCan: eBlipSprite = .{ .bits = @as(c_uint, @intCast(361)) };
pub const BlipSpriteMasks: eBlipSprite = .{ .bits = @as(c_uint, @intCast(362)) };
pub const BlipSpriteHeistSetup: eBlipSprite = .{ .bits = @as(c_uint, @intCast(363)) };
pub const BlipSpriteIncapacitated: eBlipSprite = .{ .bits = @as(c_uint, @intCast(364)) };
pub const BlipSpritePickupSpawn: eBlipSprite = .{ .bits = @as(c_uint, @intCast(365)) };
pub const BlipSpriteBoilerSuit: eBlipSprite = .{ .bits = @as(c_uint, @intCast(366)) };
pub const BlipSpriteCompleted: eBlipSprite = .{ .bits = @as(c_uint, @intCast(367)) };
pub const BlipSpriteRockets: eBlipSprite = .{ .bits = @as(c_uint, @intCast(368)) };
pub const BlipSpriteGarageForSale: eBlipSprite = .{ .bits = @as(c_uint, @intCast(369)) };
pub const BlipSpriteHelipadForSale: eBlipSprite = .{ .bits = @as(c_uint, @intCast(370)) };
pub const BlipSpriteMarinaForSale: eBlipSprite = .{ .bits = @as(c_uint, @intCast(371)) };
pub const BlipSpriteHangarForSale: eBlipSprite = .{ .bits = @as(c_uint, @intCast(372)) };
pub const BlipSpriteBusiness: eBlipSprite = .{ .bits = @as(c_uint, @intCast(374)) };
pub const BlipSpriteBusinessForSale: eBlipSprite = .{ .bits = @as(c_uint, @intCast(375)) };
pub const BlipSpriteRaceBike: eBlipSprite = .{ .bits = @as(c_uint, @intCast(376)) };
pub const BlipSpriteParachute: eBlipSprite = .{ .bits = @as(c_uint, @intCast(377)) };
pub const BlipSpriteTeamDeathmatch: eBlipSprite = .{ .bits = @as(c_uint, @intCast(378)) };
pub const BlipSpriteRaceFoot: eBlipSprite = .{ .bits = @as(c_uint, @intCast(379)) };
pub const BlipSpriteVehicleDeathmatch: eBlipSprite = .{ .bits = @as(c_uint, @intCast(380)) };
pub const BlipSpriteBarry: eBlipSprite = .{ .bits = @as(c_uint, @intCast(381)) };
pub const BlipSpriteDom: eBlipSprite = .{ .bits = @as(c_uint, @intCast(382)) };
pub const BlipSpriteMaryAnn: eBlipSprite = .{ .bits = @as(c_uint, @intCast(383)) };
pub const BlipSpriteCletus: eBlipSprite = .{ .bits = @as(c_uint, @intCast(384)) };
pub const BlipSpriteJosh: eBlipSprite = .{ .bits = @as(c_uint, @intCast(385)) };
pub const BlipSpriteMinute: eBlipSprite = .{ .bits = @as(c_uint, @intCast(386)) };
pub const BlipSpriteOmega: eBlipSprite = .{ .bits = @as(c_uint, @intCast(387)) };
pub const BlipSpriteTonya: eBlipSprite = .{ .bits = @as(c_uint, @intCast(388)) };
pub const BlipSpritePaparazzo: eBlipSprite = .{ .bits = @as(c_uint, @intCast(389)) };
pub const BlipSpriteCrosshair: eBlipSprite = .{ .bits = @as(c_uint, @intCast(390)) };
pub const BlipSpriteCreator: eBlipSprite = .{ .bits = @as(c_uint, @intCast(398)) };
pub const BlipSpriteCreatorDirection: eBlipSprite = .{ .bits = @as(c_uint, @intCast(399)) };
pub const BlipSpriteAbigail: eBlipSprite = .{ .bits = @as(c_uint, @intCast(400)) };
pub const BlipSpriteBlimp: eBlipSprite = .{ .bits = @as(c_uint, @intCast(401)) };
pub const BlipSpriteRepair: eBlipSprite = .{ .bits = @as(c_uint, @intCast(402)) };
pub const BlipSpriteTestosterone: eBlipSprite = .{ .bits = @as(c_uint, @intCast(403)) };
pub const BlipSpriteDinghy: eBlipSprite = .{ .bits = @as(c_uint, @intCast(404)) };
pub const BlipSpriteFanatic: eBlipSprite = .{ .bits = @as(c_uint, @intCast(405)) };
pub const BlipSpriteInformation: eBlipSprite = .{ .bits = @as(c_uint, @intCast(407)) };
pub const BlipSpriteCaptureBriefcase: eBlipSprite = .{ .bits = @as(c_uint, @intCast(408)) };
pub const BlipSpriteLastTeamStanding: eBlipSprite = .{ .bits = @as(c_uint, @intCast(409)) };
pub const BlipSpriteBoat: eBlipSprite = .{ .bits = @as(c_uint, @intCast(410)) };
pub const BlipSpriteCaptureHouse: eBlipSprite = .{ .bits = @as(c_uint, @intCast(411)) };
pub const BlipSpriteJerryCan2: eBlipSprite = .{ .bits = @as(c_uint, @intCast(415)) };
pub const BlipSpriteRP: eBlipSprite = .{ .bits = @as(c_uint, @intCast(416)) };
pub const BlipSpriteGTAOPlayerSafehouse: eBlipSprite = .{ .bits = @as(c_uint, @intCast(417)) };
pub const BlipSpriteGTAOPlayerSafehouseDead: eBlipSprite = .{ .bits = @as(c_uint, @intCast(418)) };
pub const BlipSpriteCaptureAmericanFlag: eBlipSprite = .{ .bits = @as(c_uint, @intCast(419)) };
pub const BlipSpriteCaptureFlag: eBlipSprite = .{ .bits = @as(c_uint, @intCast(420)) };
pub const BlipSpriteTank: eBlipSprite = .{ .bits = @as(c_uint, @intCast(421)) };
pub const BlipSpriteHelicopterAnimated: eBlipSprite = .{ .bits = @as(c_uint, @intCast(422)) };
pub const BlipSpritePlane: eBlipSprite = .{ .bits = @as(c_uint, @intCast(423)) };
pub const BlipSpritePlayerNoColor: eBlipSprite = .{ .bits = @as(c_uint, @intCast(425)) };
pub const BlipSpriteGunCar: eBlipSprite = .{ .bits = @as(c_uint, @intCast(426)) };
pub const BlipSpriteSpeedboat: eBlipSprite = .{ .bits = @as(c_uint, @intCast(427)) };
pub const BlipSpriteHeist: eBlipSprite = .{ .bits = @as(c_uint, @intCast(428)) };
pub const BlipSpriteStopwatch: eBlipSprite = .{ .bits = @as(c_uint, @intCast(430)) };
pub const BlipSpriteDollarSignCircled: eBlipSprite = .{ .bits = @as(c_uint, @intCast(431)) };
pub const BlipSpriteCrosshair2: eBlipSprite = .{ .bits = @as(c_uint, @intCast(432)) };
pub const BlipSpriteDollarSignSquared: eBlipSprite = .{ .bits = @as(c_uint, @intCast(434)) };
};
pub const eCameraShake = extern struct {
bits: c_int = 0,
pub const CameraShakeHand: eCameraShake = .{ .bits = @as(c_uint, @intCast(0)) };
pub const CameraShakeSmallExplosion: eCameraShake = .{ .bits = eCameraShake.CameraShakeHand.bits + 1 };
pub const CameraShakeMediumExplosion: eCameraShake = .{ .bits = eCameraShake.CameraShakeHand.bits + 2 };
pub const CameraShakeLargeExplosion: eCameraShake = .{ .bits = eCameraShake.CameraShakeHand.bits + 3 };
pub const CameraShakeJolt: eCameraShake = .{ .bits = eCameraShake.CameraShakeHand.bits + 4 };
pub const CameraShakeVibrate: eCameraShake = .{ .bits = eCameraShake.CameraShakeHand.bits + 5 };
pub const CameraShakeRoadVibration: eCameraShake = .{ .bits = eCameraShake.CameraShakeHand.bits + 6 };
pub const CameraShakeDrunk: eCameraShake = .{ .bits = eCameraShake.CameraShakeHand.bits + 7 };
pub const CameraShakeSkyDiving: eCameraShake = .{ .bits = eCameraShake.CameraShakeHand.bits + 8 };
pub const CameraShakeFamilyDrugTrip: eCameraShake = .{ .bits = eCameraShake.CameraShakeHand.bits + 9 };
pub const CameraShakeDeathFail: eCameraShake = .{ .bits = eCameraShake.CameraShakeHand.bits + 10 };
};
pub const eControl = extern struct {
bits: c_int = 0,
pub const ControlNextCamera: eControl = .{ .bits = @as(c_uint, @intCast(0)) };
pub const ControlLookLeftRight: eControl = .{ .bits = @as(c_uint, @intCast(1)) };
pub const ControlLookUpDown: eControl = .{ .bits = @as(c_uint, @intCast(2)) };
pub const ControlLookUpOnly: eControl = .{ .bits = @as(c_uint, @intCast(3)) };
pub const ControlLookDownOnly: eControl = .{ .bits = @as(c_uint, @intCast(4)) };
pub const ControlLookLeftOnly: eControl = .{ .bits = @as(c_uint, @intCast(5)) };
pub const ControlLookRightOnly: eControl = .{ .bits = @as(c_uint, @intCast(6)) };
pub const ControlCinematicSlowMo: eControl = .{ .bits = @as(c_uint, @intCast(7)) };
pub const ControlFlyUpDown: eControl = .{ .bits = @as(c_uint, @intCast(8)) };
pub const ControlFlyLeftRight: eControl = .{ .bits = @as(c_uint, @intCast(9)) };
pub const ControlScriptedFlyZUp: eControl = .{ .bits = @as(c_uint, @intCast(10)) };
pub const ControlScriptedFlyZDown: eControl = .{ .bits = @as(c_uint, @intCast(11)) };
pub const ControlWeaponWheelUpDown: eControl = .{ .bits = @as(c_uint, @intCast(12)) };
pub const ControlWeaponWheelLeftRight: eControl = .{ .bits = @as(c_uint, @intCast(13)) };
pub const ControlWeaponWheelNext: eControl = .{ .bits = @as(c_uint, @intCast(14)) };
pub const ControlWeaponWheelPrev: eControl = .{ .bits = @as(c_uint, @intCast(15)) };
pub const ControlSelectNextWeapon: eControl = .{ .bits = @as(c_uint, @intCast(16)) };
pub const ControlSelectPrevWeapon: eControl = .{ .bits = @as(c_uint, @intCast(17)) };
pub const ControlSkipCutscene: eControl = .{ .bits = @as(c_uint, @intCast(18)) };
pub const ControlCharacterWheel: eControl = .{ .bits = @as(c_uint, @intCast(19)) };
pub const ControlMultiplayerInfo: eControl = .{ .bits = @as(c_uint, @intCast(20)) };
pub const ControlSprint: eControl = .{ .bits = @as(c_uint, @intCast(21)) };
pub const ControlJump: eControl = .{ .bits = @as(c_uint, @intCast(22)) };
pub const ControlEnter: eControl = .{ .bits = @as(c_uint, @intCast(23)) };
pub const ControlAttack: eControl = .{ .bits = @as(c_uint, @intCast(24)) };
pub const ControlAim: eControl = .{ .bits = @as(c_uint, @intCast(25)) };
pub const ControlLookBehind: eControl = .{ .bits = @as(c_uint, @intCast(26)) };
pub const ControlPhone: eControl = .{ .bits = @as(c_uint, @intCast(27)) };
pub const ControlSpecialAbility: eControl = .{ .bits = @as(c_uint, @intCast(28)) };
pub const ControlSpecialAbilitySecondary: eControl = .{ .bits = @as(c_uint, @intCast(29)) };
pub const ControlMoveLeftRight: eControl = .{ .bits = @as(c_uint, @intCast(30)) };
pub const ControlMoveUpDown: eControl = .{ .bits = @as(c_uint, @intCast(31)) };
pub const ControlMoveUpOnly: eControl = .{ .bits = @as(c_uint, @intCast(32)) };
pub const ControlMoveDownOnly: eControl = .{ .bits = @as(c_uint, @intCast(33)) };
pub const ControlMoveLeftOnly: eControl = .{ .bits = @as(c_uint, @intCast(34)) };
pub const ControlMoveRightOnly: eControl = .{ .bits = @as(c_uint, @intCast(35)) };
pub const ControlDuck: eControl = .{ .bits = @as(c_uint, @intCast(36)) };
pub const ControlSelectWeapon: eControl = .{ .bits = @as(c_uint, @intCast(37)) };
pub const ControlPickup: eControl = .{ .bits = @as(c_uint, @intCast(38)) };
pub const ControlSniperZoom: eControl = .{ .bits = @as(c_uint, @intCast(39)) };
pub const ControlSniperZoomInOnly: eControl = .{ .bits = @as(c_uint, @intCast(40)) };
pub const ControlSniperZoomOutOnly: eControl = .{ .bits = @as(c_uint, @intCast(41)) };
pub const ControlSniperZoomInSecondary: eControl = .{ .bits = @as(c_uint, @intCast(42)) };
pub const ControlSniperZoomOutSecondary: eControl = .{ .bits = @as(c_uint, @intCast(43)) };
pub const ControlCover: eControl = .{ .bits = @as(c_uint, @intCast(44)) };
pub const ControlReload: eControl = .{ .bits = @as(c_uint, @intCast(45)) };
pub const ControlTalk: eControl = .{ .bits = @as(c_uint, @intCast(46)) };
pub const ControlDetonate: eControl = .{ .bits = @as(c_uint, @intCast(47)) };
pub const ControlHUDSpecial: eControl = .{ .bits = @as(c_uint, @intCast(48)) };
pub const ControlArrest: eControl = .{ .bits = @as(c_uint, @intCast(49)) };
pub const ControlAccurateAim: eControl = .{ .bits = @as(c_uint, @intCast(50)) };
pub const ControlContext: eControl = .{ .bits = @as(c_uint, @intCast(51)) };
pub const ControlContextSecondary: eControl = .{ .bits = @as(c_uint, @intCast(52)) };
pub const ControlWeaponSpecial: eControl = .{ .bits = @as(c_uint, @intCast(53)) };
pub const ControlWeaponSpecial2: eControl = .{ .bits = @as(c_uint, @intCast(54)) };
pub const ControlDive: eControl = .{ .bits = @as(c_uint, @intCast(55)) };
pub const ControlDropWeapon: eControl = .{ .bits = @as(c_uint, @intCast(56)) };
pub const ControlDropAmmo: eControl = .{ .bits = @as(c_uint, @intCast(57)) };
pub const ControlThrowGrenade: eControl = .{ .bits = @as(c_uint, @intCast(58)) };
pub const ControlVehicleMoveLeftRight: eControl = .{ .bits = @as(c_uint, @intCast(59)) };
pub const ControlVehicleMoveUpDown: eControl = .{ .bits = @as(c_uint, @intCast(60)) };
pub const ControlVehicleMoveUpOnly: eControl = .{ .bits = @as(c_uint, @intCast(61)) };
pub const ControlVehicleMoveDownOnly: eControl = .{ .bits = @as(c_uint, @intCast(62)) };
pub const ControlVehicleMoveLeftOnly: eControl = .{ .bits = @as(c_uint, @intCast(63)) };
pub const ControlVehicleMoveRightOnly: eControl = .{ .bits = @as(c_uint, @intCast(64)) };
pub const ControlVehicleSpecial: eControl = .{ .bits = @as(c_uint, @intCast(65)) };
pub const ControlVehicleGunLeftRight: eControl = .{ .bits = @as(c_uint, @intCast(66)) };
pub const ControlVehicleGunUpDown: eControl = .{ .bits = @as(c_uint, @intCast(67)) };
pub const ControlVehicleAim: eControl = .{ .bits = @as(c_uint, @intCast(68)) };
pub const ControlVehicleAttack: eControl = .{ .bits = @as(c_uint, @intCast(69)) };
pub const ControlVehicleAttack2: eControl = .{ .bits = @as(c_uint, @intCast(70)) };
pub const ControlVehicleAccelerate: eControl = .{ .bits = @as(c_uint, @intCast(71)) };
pub const ControlVehicleBrake: eControl = .{ .bits = @as(c_uint, @intCast(72)) };
pub const ControlVehicleDuck: eControl = .{ .bits = @as(c_uint, @intCast(73)) };
pub const ControlVehicleHeadlight: eControl = .{ .bits = @as(c_uint, @intCast(74)) };
pub const ControlVehicleExit: eControl = .{ .bits = @as(c_uint, @intCast(75)) };
pub const ControlVehicleHandbrake: eControl = .{ .bits = @as(c_uint, @intCast(76)) };
pub const ControlVehicleHotwireLeft: eControl = .{ .bits = @as(c_uint, @intCast(77)) };
pub const ControlVehicleHotwireRight: eControl = .{ .bits = @as(c_uint, @intCast(78)) };
pub const ControlVehicleLookBehind: eControl = .{ .bits = @as(c_uint, @intCast(79)) };
pub const ControlVehicleCinCam: eControl = .{ .bits = @as(c_uint, @intCast(80)) };
pub const ControlVehicleNextRadio: eControl = .{ .bits = @as(c_uint, @intCast(81)) };
pub const ControlVehiclePrevRadio: eControl = .{ .bits = @as(c_uint, @intCast(82)) };
pub const ControlVehicleNextRadioTrack: eControl = .{ .bits = @as(c_uint, @intCast(83)) };
pub const ControlVehiclePrevRadioTrack: eControl = .{ .bits = @as(c_uint, @intCast(84)) };
pub const ControlVehicleRadioWheel: eControl = .{ .bits = @as(c_uint, @intCast(85)) };
pub const ControlVehicleHorn: eControl = .{ .bits = @as(c_uint, @intCast(86)) };
pub const ControlVehicleFlyThrottleUp: eControl = .{ .bits = @as(c_uint, @intCast(87)) };
pub const ControlVehicleFlyThrottleDown: eControl = .{ .bits = @as(c_uint, @intCast(88)) };
pub const ControlVehicleFlyYawLeft: eControl = .{ .bits = @as(c_uint, @intCast(89)) };
pub const ControlVehicleFlyYawRight: eControl = .{ .bits = @as(c_uint, @intCast(90)) };
pub const ControlVehiclePassengerAim: eControl = .{ .bits = @as(c_uint, @intCast(91)) };
pub const ControlVehiclePassengerAttack: eControl = .{ .bits = @as(c_uint, @intCast(92)) };
pub const ControlVehicleSpecialAbilityFranklin: eControl = .{ .bits = @as(c_uint, @intCast(93)) };
pub const ControlVehicleStuntUpDown: eControl = .{ .bits = @as(c_uint, @intCast(94)) };
pub const ControlVehicleCinematicUpDown: eControl = .{ .bits = @as(c_uint, @intCast(95)) };
pub const ControlVehicleCinematicUpOnly: eControl = .{ .bits = @as(c_uint, @intCast(96)) };
pub const ControlVehicleCinematicDownOnly: eControl = .{ .bits = @as(c_uint, @intCast(97)) };
pub const ControlVehicleCinematicLeftRight: eControl = .{ .bits = @as(c_uint, @intCast(98)) };
pub const ControlVehicleSelectNextWeapon: eControl = .{ .bits = @as(c_uint, @intCast(99)) };
pub const ControlVehicleSelectPrevWeapon: eControl = .{ .bits = @as(c_uint, @intCast(100)) };
pub const ControlVehicleRoof: eControl = .{ .bits = @as(c_uint, @intCast(101)) };
pub const ControlVehicleJump: eControl = .{ .bits = @as(c_uint, @intCast(102)) };
pub const ControlVehicleGrapplingHook: eControl = .{ .bits = @as(c_uint, @intCast(103)) };
pub const ControlVehicleShuffle: eControl = .{ .bits = @as(c_uint, @intCast(104)) };
pub const ControlVehicleDropProjectile: eControl = .{ .bits = @as(c_uint, @intCast(105)) };
pub const ControlVehicleMouseControlOverride: eControl = .{ .bits = @as(c_uint, @intCast(106)) };
pub const ControlVehicleFlyRollLeftRight: eControl = .{ .bits = @as(c_uint, @intCast(107)) };
pub const ControlVehicleFlyRollLeftOnly: eControl = .{ .bits = @as(c_uint, @intCast(108)) };
pub const ControlVehicleFlyRollRightOnly: eControl = .{ .bits = @as(c_uint, @intCast(109)) };
pub const ControlVehicleFlyPitchUpDown: eControl = .{ .bits = @as(c_uint, @intCast(110)) };
pub const ControlVehicleFlyPitchUpOnly: eControl = .{ .bits = @as(c_uint, @intCast(111)) };
pub const ControlVehicleFlyPitchDownOnly: eControl = .{ .bits = @as(c_uint, @intCast(112)) };
pub const ControlVehicleFlyUnderCarriage: eControl = .{ .bits = @as(c_uint, @intCast(113)) };
pub const ControlVehicleFlyAttack: eControl = .{ .bits = @as(c_uint, @intCast(114)) };
pub const ControlVehicleFlySelectNextWeapon: eControl = .{ .bits = @as(c_uint, @intCast(115)) };
pub const ControlVehicleFlySelectPrevWeapon: eControl = .{ .bits = @as(c_uint, @intCast(116)) };
pub const ControlVehicleFlySelectTargetLeft: eControl = .{ .bits = @as(c_uint, @intCast(117)) };
pub const ControlVehicleFlySelectTargetRight: eControl = .{ .bits = @as(c_uint, @intCast(118)) };
pub const ControlVehicleFlyVerticalFlightMode: eControl = .{ .bits = @as(c_uint, @intCast(119)) };
pub const ControlVehicleFlyDuck: eControl = .{ .bits = @as(c_uint, @intCast(120)) };
pub const ControlVehicleFlyAttackCamera: eControl = .{ .bits = @as(c_uint, @intCast(121)) };
pub const ControlVehicleFlyMouseControlOverride: eControl = .{ .bits = @as(c_uint, @intCast(122)) };
pub const ControlVehicleSubTurnLeftRight: eControl = .{ .bits = @as(c_uint, @intCast(123)) };
pub const ControlVehicleSubTurnLeftOnly: eControl = .{ .bits = @as(c_uint, @intCast(124)) };
pub const ControlVehicleSubTurnRightOnly: eControl = .{ .bits = @as(c_uint, @intCast(125)) };
pub const ControlVehicleSubPitchUpDown: eControl = .{ .bits = @as(c_uint, @intCast(126)) };
pub const ControlVehicleSubPitchUpOnly: eControl = .{ .bits = @as(c_uint, @intCast(127)) };
pub const ControlVehicleSubPitchDownOnly: eControl = .{ .bits = @as(c_uint, @intCast(128)) };
pub const ControlVehicleSubThrottleUp: eControl = .{ .bits = @as(c_uint, @intCast(129)) };
pub const ControlVehicleSubThrottleDown: eControl = .{ .bits = @as(c_uint, @intCast(130)) };
pub const ControlVehicleSubAscend: eControl = .{ .bits = @as(c_uint, @intCast(131)) };
pub const ControlVehicleSubDescend: eControl = .{ .bits = @as(c_uint, @intCast(132)) };
pub const ControlVehicleSubTurnHardLeft: eControl = .{ .bits = @as(c_uint, @intCast(133)) };
pub const ControlVehicleSubTurnHardRight: eControl = .{ .bits = @as(c_uint, @intCast(134)) };
pub const ControlVehicleSubMouseControlOverride: eControl = .{ .bits = @as(c_uint, @intCast(135)) };
pub const ControlVehiclePushbikePedal: eControl = .{ .bits = @as(c_uint, @intCast(136)) };
pub const ControlVehiclePushbikeSprint: eControl = .{ .bits = @as(c_uint, @intCast(137)) };
pub const ControlVehiclePushbikeFrontBrake: eControl = .{ .bits = @as(c_uint, @intCast(138)) };
pub const ControlVehiclePushbikeRearBrake: eControl = .{ .bits = @as(c_uint, @intCast(139)) };
pub const ControlMeleeAttackLight: eControl = .{ .bits = @as(c_uint, @intCast(140)) };
pub const ControlMeleeAttackHeavy: eControl = .{ .bits = @as(c_uint, @intCast(141)) };
pub const ControlMeleeAttackAlternate: eControl = .{ .bits = @as(c_uint, @intCast(142)) };
pub const ControlMeleeBlock: eControl = .{ .bits = @as(c_uint, @intCast(143)) };
pub const ControlParachuteDeploy: eControl = .{ .bits = @as(c_uint, @intCast(144)) };
pub const ControlParachuteDetach: eControl = .{ .bits = @as(c_uint, @intCast(145)) };
pub const ControlParachuteTurnLeftRight: eControl = .{ .bits = @as(c_uint, @intCast(146)) };
pub const ControlParachuteTurnLeftOnly: eControl = .{ .bits = @as(c_uint, @intCast(147)) };
pub const ControlParachuteTurnRightOnly: eControl = .{ .bits = @as(c_uint, @intCast(148)) };
pub const ControlParachutePitchUpDown: eControl = .{ .bits = @as(c_uint, @intCast(149)) };
pub const ControlParachutePitchUpOnly: eControl = .{ .bits = @as(c_uint, @intCast(150)) };
pub const ControlParachutePitchDownOnly: eControl = .{ .bits = @as(c_uint, @intCast(151)) };
pub const ControlParachuteBrakeLeft: eControl = .{ .bits = @as(c_uint, @intCast(152)) };
pub const ControlParachuteBrakeRight: eControl = .{ .bits = @as(c_uint, @intCast(153)) };
pub const ControlParachuteSmoke: eControl = .{ .bits = @as(c_uint, @intCast(154)) };
pub const ControlParachutePrecisionLanding: eControl = .{ .bits = @as(c_uint, @intCast(155)) };
pub const ControlMap: eControl = .{ .bits = @as(c_uint, @intCast(156)) };
pub const ControlSelectWeaponUnarmed: eControl = .{ .bits = @as(c_uint, @intCast(157)) };
pub const ControlSelectWeaponMelee: eControl = .{ .bits = @as(c_uint, @intCast(158)) };
pub const ControlSelectWeaponHandgun: eControl = .{ .bits = @as(c_uint, @intCast(159)) };
pub const ControlSelectWeaponShotgun: eControl = .{ .bits = @as(c_uint, @intCast(160)) };
pub const ControlSelectWeaponSmg: eControl = .{ .bits = @as(c_uint, @intCast(161)) };
pub const ControlSelectWeaponAutoRifle: eControl = .{ .bits = @as(c_uint, @intCast(162)) };
pub const ControlSelectWeaponSniper: eControl = .{ .bits = @as(c_uint, @intCast(163)) };
pub const ControlSelectWeaponHeavy: eControl = .{ .bits = @as(c_uint, @intCast(164)) };
pub const ControlSelectWeaponSpecial: eControl = .{ .bits = @as(c_uint, @intCast(165)) };
pub const ControlSelectCharacterMichael: eControl = .{ .bits = @as(c_uint, @intCast(166)) };
pub const ControlSelectCharacterFranklin: eControl = .{ .bits = @as(c_uint, @intCast(167)) };
pub const ControlSelectCharacterTrevor: eControl = .{ .bits = @as(c_uint, @intCast(168)) };
pub const ControlSelectCharacterMultiplayer: eControl = .{ .bits = @as(c_uint, @intCast(169)) };
pub const ControlSaveReplayClip: eControl = .{ .bits = @as(c_uint, @intCast(170)) };
pub const ControlSpecialAbilityPC: eControl = .{ .bits = @as(c_uint, @intCast(171)) };
pub const ControlPhoneUp: eControl = .{ .bits = @as(c_uint, @intCast(172)) };
pub const ControlPhoneDown: eControl = .{ .bits = @as(c_uint, @intCast(173)) };
pub const ControlPhoneLeft: eControl = .{ .bits = @as(c_uint, @intCast(174)) };
pub const ControlPhoneRight: eControl = .{ .bits = @as(c_uint, @intCast(175)) };
pub const ControlPhoneSelect: eControl = .{ .bits = @as(c_uint, @intCast(176)) };
pub const ControlPhoneCancel: eControl = .{ .bits = @as(c_uint, @intCast(177)) };
pub const ControlPhoneOption: eControl = .{ .bits = @as(c_uint, @intCast(178)) };
pub const ControlPhoneExtraOption: eControl = .{ .bits = @as(c_uint, @intCast(179)) };
pub const ControlPhoneScrollForward: eControl = .{ .bits = @as(c_uint, @intCast(180)) };
pub const ControlPhoneScrollBackward: eControl = .{ .bits = @as(c_uint, @intCast(181)) };
pub const ControlPhoneCameraFocusLock: eControl = .{ .bits = @as(c_uint, @intCast(182)) };
pub const ControlPhoneCameraGrid: eControl = .{ .bits = @as(c_uint, @intCast(183)) };
pub const ControlPhoneCameraSelfie: eControl = .{ .bits = @as(c_uint, @intCast(184)) };
pub const ControlPhoneCameraDOF: eControl = .{ .bits = @as(c_uint, @intCast(185)) };
pub const ControlPhoneCameraExpression: eControl = .{ .bits = @as(c_uint, @intCast(186)) };
pub const ControlFrontendDown: eControl = .{ .bits = @as(c_uint, @intCast(187)) };
pub const ControlFrontendUp: eControl = .{ .bits = @as(c_uint, @intCast(188)) };
pub const ControlFrontendLeft: eControl = .{ .bits = @as(c_uint, @intCast(189)) };
pub const ControlFrontendRight: eControl = .{ .bits = @as(c_uint, @intCast(190)) };
pub const ControlFrontendRdown: eControl = .{ .bits = @as(c_uint, @intCast(191)) };
pub const ControlFrontendRup: eControl = .{ .bits = @as(c_uint, @intCast(192)) };
pub const ControlFrontendRleft: eControl = .{ .bits = @as(c_uint, @intCast(193)) };
pub const ControlFrontendRright: eControl = .{ .bits = @as(c_uint, @intCast(194)) };
pub const ControlFrontendAxisX: eControl = .{ .bits = @as(c_uint, @intCast(195)) };
pub const ControlFrontendAxisY: eControl = .{ .bits = @as(c_uint, @intCast(196)) };
pub const ControlFrontendRightAxisX: eControl = .{ .bits = @as(c_uint, @intCast(197)) };
pub const ControlFrontendRightAxisY: eControl = .{ .bits = @as(c_uint, @intCast(198)) };
pub const ControlFrontendPause: eControl = .{ .bits = @as(c_uint, @intCast(199)) };
pub const ControlFrontendPauseAlternate: eControl = .{ .bits = @as(c_uint, @intCast(200)) };
pub const ControlFrontendAccept: eControl = .{ .bits = @as(c_uint, @intCast(201)) };
pub const ControlFrontendCancel: eControl = .{ .bits = @as(c_uint, @intCast(202)) };
pub const ControlFrontendX: eControl = .{ .bits = @as(c_uint, @intCast(203)) };
pub const ControlFrontendY: eControl = .{ .bits = @as(c_uint, @intCast(204)) };
pub const ControlFrontendLb: eControl = .{ .bits = @as(c_uint, @intCast(205)) };
pub const ControlFrontendRb: eControl = .{ .bits = @as(c_uint, @intCast(206)) };
pub const ControlFrontendLt: eControl = .{ .bits = @as(c_uint, @intCast(207)) };
pub const ControlFrontendRt: eControl = .{ .bits = @as(c_uint, @intCast(208)) };
pub const ControlFrontendLs: eControl = .{ .bits = @as(c_uint, @intCast(209)) };
pub const ControlFrontendRs: eControl = .{ .bits = @as(c_uint, @intCast(210)) };
pub const ControlFrontendLeaderboard: eControl = .{ .bits = @as(c_uint, @intCast(211)) };
pub const ControlFrontendSocialClub: eControl = .{ .bits = @as(c_uint, @intCast(212)) };
pub const ControlFrontendSocialClubSecondary: eControl = .{ .bits = @as(c_uint, @intCast(213)) };
pub const ControlFrontendDelete: eControl = .{ .bits = @as(c_uint, @intCast(214)) };
pub const ControlFrontendEndscreenAccept: eControl = .{ .bits = @as(c_uint, @intCast(215)) };
pub const ControlFrontendEndscreenExpand: eControl = .{ .bits = @as(c_uint, @intCast(216)) };
pub const ControlFrontendSelect: eControl = .{ .bits = @as(c_uint, @intCast(217)) };
pub const ControlScriptLeftAxisX: eControl = .{ .bits = @as(c_uint, @intCast(218)) };
pub const ControlScriptLeftAxisY: eControl = .{ .bits = @as(c_uint, @intCast(219)) };
pub const ControlScriptRightAxisX: eControl = .{ .bits = @as(c_uint, @intCast(220)) };
pub const ControlScriptRightAxisY: eControl = .{ .bits = @as(c_uint, @intCast(221)) };
pub const ControlScriptRUp: eControl = .{ .bits = @as(c_uint, @intCast(222)) };
pub const ControlScriptRDown: eControl = .{ .bits = @as(c_uint, @intCast(223)) };
pub const ControlScriptRLeft: eControl = .{ .bits = @as(c_uint, @intCast(224)) };
pub const ControlScriptRRight: eControl = .{ .bits = @as(c_uint, @intCast(225)) };
pub const ControlScriptLB: eControl = .{ .bits = @as(c_uint, @intCast(226)) };
pub const ControlScriptRB: eControl = .{ .bits = @as(c_uint, @intCast(227)) };
pub const ControlScriptLT: eControl = .{ .bits = @as(c_uint, @intCast(228)) };
pub const ControlScriptRT: eControl = .{ .bits = @as(c_uint, @intCast(229)) };
pub const ControlScriptLS: eControl = .{ .bits = @as(c_uint, @intCast(230)) };
pub const ControlScriptRS: eControl = .{ .bits = @as(c_uint, @intCast(231)) };
pub const ControlScriptPadUp: eControl = .{ .bits = @as(c_uint, @intCast(232)) };
pub const ControlScriptPadDown: eControl = .{ .bits = @as(c_uint, @intCast(233)) };
pub const ControlScriptPadLeft: eControl = .{ .bits = @as(c_uint, @intCast(234)) };
pub const ControlScriptPadRight: eControl = .{ .bits = @as(c_uint, @intCast(235)) };
pub const ControlScriptSelect: eControl = .{ .bits = @as(c_uint, @intCast(236)) };
pub const ControlCursorAccept: eControl = .{ .bits = @as(c_uint, @intCast(237)) };
pub const ControlCursorCancel: eControl = .{ .bits = @as(c_uint, @intCast(238)) };
pub const ControlCursorX: eControl = .{ .bits = @as(c_uint, @intCast(239)) };
pub const ControlCursorY: eControl = .{ .bits = @as(c_uint, @intCast(240)) };
pub const ControlCursorScrollUp: eControl = .{ .bits = @as(c_uint, @intCast(241)) };
pub const ControlCursorScrollDown: eControl = .{ .bits = @as(c_uint, @intCast(242)) };
pub const ControlEnterCheatCode: eControl = .{ .bits = @as(c_uint, @intCast(243)) };
pub const ControlInteractionMenu: eControl = .{ .bits = @as(c_uint, @intCast(244)) };
pub const ControlMpTextChatAll: eControl = .{ .bits = @as(c_uint, @intCast(245)) };
pub const ControlMpTextChatTeam: eControl = .{ .bits = @as(c_uint, @intCast(246)) };
pub const ControlMpTextChatFriends: eControl = .{ .bits = @as(c_uint, @intCast(247)) };
pub const ControlMpTextChatCrew: eControl = .{ .bits = @as(c_uint, @intCast(248)) };
pub const ControlPushToTalk: eControl = .{ .bits = @as(c_uint, @intCast(249)) };
pub const ControlCreatorLS: eControl = .{ .bits = @as(c_uint, @intCast(250)) };
pub const ControlCreatorRS: eControl = .{ .bits = @as(c_uint, @intCast(251)) };
pub const ControlCreatorLT: eControl = .{ .bits = @as(c_uint, @intCast(252)) };
pub const ControlCreatorRT: eControl = .{ .bits = @as(c_uint, @intCast(253)) };
pub const ControlCreatorMenuToggle: eControl = .{ .bits = @as(c_uint, @intCast(254)) };
pub const ControlCreatorAccept: eControl = .{ .bits = @as(c_uint, @intCast(255)) };
pub const ControlCreatorDelete: eControl = .{ .bits = @as(c_uint, @intCast(256)) };
pub const ControlAttack2: eControl = .{ .bits = @as(c_uint, @intCast(257)) };
pub const ControlRappelJump: eControl = .{ .bits = @as(c_uint, @intCast(258)) };
pub const ControlRappelLongJump: eControl = .{ .bits = @as(c_uint, @intCast(259)) };
pub const ControlRappelSmashWindow: eControl = .{ .bits = @as(c_uint, @intCast(260)) };
pub const ControlPrevWeapon: eControl = .{ .bits = @as(c_uint, @intCast(261)) };
pub const ControlNextWeapon: eControl = .{ .bits = @as(c_uint, @intCast(262)) };
pub const ControlMeleeAttack1: eControl = .{ .bits = @as(c_uint, @intCast(263)) };
pub const ControlMeleeAttack2: eControl = .{ .bits = @as(c_uint, @intCast(264)) };
pub const ControlWhistle: eControl = .{ .bits = @as(c_uint, @intCast(265)) };
pub const ControlMoveLeft: eControl = .{ .bits = @as(c_uint, @intCast(266)) };
pub const ControlMoveRight: eControl = .{ .bits = @as(c_uint, @intCast(267)) };
pub const ControlMoveUp: eControl = .{ .bits = @as(c_uint, @intCast(268)) };
pub const ControlMoveDown: eControl = .{ .bits = @as(c_uint, @intCast(269)) };
pub const ControlLookLeft: eControl = .{ .bits = @as(c_uint, @intCast(270)) };
pub const ControlLookRight: eControl = .{ .bits = @as(c_uint, @intCast(271)) };
pub const ControlLookUp: eControl = .{ .bits = @as(c_uint, @intCast(272)) };
pub const ControlLookDown: eControl = .{ .bits = @as(c_uint, @intCast(273)) };
pub const ControlSniperZoomIn: eControl = .{ .bits = @as(c_uint, @intCast(274)) };
pub const ControlSniperZoomOut: eControl = .{ .bits = @as(c_uint, @intCast(275)) };
pub const ControlSniperZoomInAlternate: eControl = .{ .bits = @as(c_uint, @intCast(276)) };
pub const ControlSniperZoomOutAlternate: eControl = .{ .bits = @as(c_uint, @intCast(277)) };
pub const ControlVehicleMoveLeft: eControl = .{ .bits = @as(c_uint, @intCast(278)) };
pub const ControlVehicleMoveRight: eControl = .{ .bits = @as(c_uint, @intCast(279)) };
pub const ControlVehicleMoveUp: eControl = .{ .bits = @as(c_uint, @intCast(280)) };
pub const ControlVehicleMoveDown: eControl = .{ .bits = @as(c_uint, @intCast(281)) };
pub const ControlVehicleGunLeft: eControl = .{ .bits = @as(c_uint, @intCast(282)) };
pub const ControlVehicleGunRight: eControl = .{ .bits = @as(c_uint, @intCast(283)) };
pub const ControlVehicleGunUp: eControl = .{ .bits = @as(c_uint, @intCast(284)) };
pub const ControlVehicleGunDown: eControl = .{ .bits = @as(c_uint, @intCast(285)) };
pub const ControlVehicleLookLeft: eControl = .{ .bits = @as(c_uint, @intCast(286)) };
pub const ControlVehicleLookRight: eControl = .{ .bits = @as(c_uint, @intCast(287)) };
pub const ControlReplayStartStopRecording: eControl = .{ .bits = @as(c_uint, @intCast(288)) };
pub const ControlReplayStartStopRecordingSecondary: eControl = .{ .bits = @as(c_uint, @intCast(289)) };
pub const ControlScaledLookLeftRight: eControl = .{ .bits = @as(c_uint, @intCast(290)) };
pub const ControlScaledLookUpDown: eControl = .{ .bits = @as(c_uint, @intCast(291)) };
pub const ControlScaledLookUpOnly: eControl = .{ .bits = @as(c_uint, @intCast(292)) };
pub const ControlScaledLookDownOnly: eControl = .{ .bits = @as(c_uint, @intCast(293)) };
pub const ControlScaledLookLeftOnly: eControl = .{ .bits = @as(c_uint, @intCast(294)) };
pub const ControlScaledLookRightOnly: eControl = .{ .bits = @as(c_uint, @intCast(295)) };
pub const ControlReplayMarkerDelete: eControl = .{ .bits = @as(c_uint, @intCast(296)) };
pub const ControlReplayClipDelete: eControl = .{ .bits = @as(c_uint, @intCast(297)) };
pub const ControlReplayPause: eControl = .{ .bits = @as(c_uint, @intCast(298)) };
pub const ControlReplayRewind: eControl = .{ .bits = @as(c_uint, @intCast(299)) };
pub const ControlReplayFfwd: eControl = .{ .bits = @as(c_uint, @intCast(300)) };
pub const ControlReplayNewmarker: eControl = .{ .bits = @as(c_uint, @intCast(301)) };
pub const ControlReplayRecord: eControl = .{ .bits = @as(c_uint, @intCast(302)) };
pub const ControlReplayScreenshot: eControl = .{ .bits = @as(c_uint, @intCast(303)) };
pub const ControlReplayHidehud: eControl = .{ .bits = @as(c_uint, @intCast(304)) };
pub const ControlReplayStartpoint: eControl = .{ .bits = @as(c_uint, @intCast(305)) };
pub const ControlReplayEndpoint: eControl = .{ .bits = @as(c_uint, @intCast(306)) };
pub const ControlReplayAdvance: eControl = .{ .bits = @as(c_uint, @intCast(307)) };
pub const ControlReplayBack: eControl = .{ .bits = @as(c_uint, @intCast(308)) };
pub const ControlReplayTools: eControl = .{ .bits = @as(c_uint, @intCast(309)) };
pub const ControlReplayRestart: eControl = .{ .bits = @as(c_uint, @intCast(310)) };
pub const ControlReplayShowhotkey: eControl = .{ .bits = @as(c_uint, @intCast(311)) };
pub const ControlReplayCycleMarkerLeft: eControl = .{ .bits = @as(c_uint, @intCast(312)) };
pub const ControlReplayCycleMarkerRight: eControl = .{ .bits = @as(c_uint, @intCast(313)) };
pub const ControlReplayFOVIncrease: eControl = .{ .bits = @as(c_uint, @intCast(314)) };
pub const ControlReplayFOVDecrease: eControl = .{ .bits = @as(c_uint, @intCast(315)) };
pub const ControlReplayCameraUp: eControl = .{ .bits = @as(c_uint, @intCast(316)) };
pub const ControlReplayCameraDown: eControl = .{ .bits = @as(c_uint, @intCast(317)) };
pub const ControlReplaySave: eControl = .{ .bits = @as(c_uint, @intCast(318)) };
pub const ControlReplayToggletime: eControl = .{ .bits = @as(c_uint, @intCast(319)) };
pub const ControlReplayToggletips: eControl = .{ .bits = @as(c_uint, @intCast(320)) };
pub const ControlReplayPreview: eControl = .{ .bits = @as(c_uint, @intCast(321)) };
pub const ControlReplayToggleTimeline: eControl = .{ .bits = @as(c_uint, @intCast(322)) };
pub const ControlReplayTimelinePickupClip: eControl = .{ .bits = @as(c_uint, @intCast(323)) };
pub const ControlReplayTimelineDuplicateClip: eControl = .{ .bits = @as(c_uint, @intCast(324)) };
pub const ControlReplayTimelinePlaceClip: eControl = .{ .bits = @as(c_uint, @intCast(325)) };
pub const ControlReplayCtrl: eControl = .{ .bits = @as(c_uint, @intCast(326)) };
pub const ControlReplayTimelineSave: eControl = .{ .bits = @as(c_uint, @intCast(327)) };
pub const ControlReplayPreviewAudio: eControl = .{ .bits = @as(c_uint, @intCast(328)) };
pub const ControlVehicleDriveLook: eControl = .{ .bits = @as(c_uint, @intCast(329)) };
pub const ControlVehicleDriveLook2: eControl = .{ .bits = @as(c_uint, @intCast(330)) };
pub const ControlVehicleFlyAttack2: eControl = .{ .bits = @as(c_uint, @intCast(331)) };
pub const ControlRadioWheelUpDown: eControl = .{ .bits = @as(c_uint, @intCast(332)) };
pub const ControlRadioWheelLeftRight: eControl = .{ .bits = @as(c_uint, @intCast(333)) };
pub const ControlVehicleSlowMoUpDown: eControl = .{ .bits = @as(c_uint, @intCast(334)) };
pub const ControlVehicleSlowMoUpOnly: eControl = .{ .bits = @as(c_uint, @intCast(335)) };
pub const ControlVehicleSlowMoDownOnly: eControl = .{ .bits = @as(c_uint, @intCast(336)) };
pub const ControlMapPointOfInterest: eControl = .{ .bits = @as(c_uint, @intCast(337)) };
};
pub const eRadioStation = extern struct {
bits: c_int = 0,
pub const RadioStationLosSantosRockRadio: eRadioStation = .{ .bits = 0 };
pub const RadioStationNonStopPopFM: eRadioStation = .{ .bits = 1 };
pub const RadioStationLosSantos: eRadioStation = .{ .bits = 2 };
pub const RadioStationChannelX: eRadioStation = .{ .bits = 3 };
pub const RadioStationWestCoastTalkRadio: eRadioStation = .{ .bits = 4 };
pub const RadioStationRebelRadio: eRadioStation = .{ .bits = 5 };
pub const RadioStationSoulwaxFM: eRadioStation = .{ .bits = 6 };
pub const RadioStationEastLosFM: eRadioStation = .{ .bits = 7 };
pub const RadioStationWestCoastClassics: eRadioStation = .{ .bits = 8 };
pub const RadioStationTheBlueArk: eRadioStation = .{ .bits = 9 };
pub const RadioStationWorldWideFM: eRadioStation = .{ .bits = 10 };
pub const RadioStationFlyloFM: eRadioStation = .{ .bits = 11 };
pub const RadioStationTheLowdown: eRadioStation = .{ .bits = 12 };
pub const RadioStationTheLab: eRadioStation = .{ .bits = 13 };
pub const RadioStationMirrorPark: eRadioStation = .{ .bits = 14 };
pub const RadioStationSpace: eRadioStation = .{ .bits = 15 };
pub const RadioStationVinewoodBoulevardRadio: eRadioStation = .{ .bits = 16 };
};
pub const eWindowTitle = extern struct {
bits: c_int = 0,
pub const CELL_EMAIL_BOD: eWindowTitle = .{ .bits = 0 };
pub const CELL_EMAIL_BODE: eWindowTitle = .{ .bits = 1 };
pub const CELL_EMAIL_BODF: eWindowTitle = .{ .bits = 2 };
pub const CELL_EMAIL_SOD: eWindowTitle = .{ .bits = 3 };
pub const CELL_EMAIL_SODE: eWindowTitle = .{ .bits = 4 };
pub const CELL_EMAIL_SODF: eWindowTitle = .{ .bits = 5 };
pub const CELL_EMASH_BOD: eWindowTitle = .{ .bits = 6 };
pub const CELL_EMASH_BODE: eWindowTitle = .{ .bits = 7 };
pub const CELL_EMASH_BODF: eWindowTitle = .{ .bits = 8 };
pub const CELL_EMASH_SOD: eWindowTitle = .{ .bits = 9 };
pub const CELL_EMASH_SODE: eWindowTitle = .{ .bits = 10 };
pub const CELL_EMASH_SODF: eWindowTitle = .{ .bits = 11 };
pub const FMMC_KEY_TIP10: eWindowTitle = .{ .bits = 12 };
pub const FMMC_KEY_TIP12: eWindowTitle = .{ .bits = 13 };
pub const FMMC_KEY_TIP12F: eWindowTitle = .{ .bits = 14 };
pub const FMMC_KEY_TIP12N: eWindowTitle = .{ .bits = 15 };
pub const FMMC_KEY_TIP8: eWindowTitle = .{ .bits = 16 };
pub const FMMC_KEY_TIP8F: eWindowTitle = .{ .bits = 17 };
pub const FMMC_KEY_TIP8FS: eWindowTitle = .{ .bits = 18 };
pub const FMMC_KEY_TIP8S: eWindowTitle = .{ .bits = 19 };
pub const FMMC_KEY_TIP9: eWindowTitle = .{ .bits = 20 };
pub const FMMC_KEY_TIP9F: eWindowTitle = .{ .bits = 21 };
pub const FMMC_KEY_TIP9N: eWindowTitle = .{ .bits = 22 };
pub const PM_NAME_CHALL: eWindowTitle = .{ .bits = 23 };
};
pub const eGender = extern struct {
bits: c_int = 0,
pub const GenderMale: eGender = .{ .bits = 0 };
pub const GenderFemale: eGender = .{ .bits = 1 };
};
pub const eDrivingStyle = extern struct {
bits: c_int = 0,
pub const DrivingStyleNormal: eDrivingStyle = .{ .bits = @as(c_uint, @intCast(786603)) };
pub const DrivingStyleIgnoreLights: eDrivingStyle = .{ .bits = @as(c_uint, @intCast(2883621)) };
pub const DrivingStyleSometimesOvertakeTraffic: eDrivingStyle = .{ .bits = @as(c_uint, @intCast(5)) };
pub const DrivingStyleRushed: eDrivingStyle = .{ .bits = @as(c_uint, @intCast(1074528293)) };
pub const DrivingStyleAvoidTraffic: eDrivingStyle = .{ .bits = @as(c_uint, @intCast(786468)) };
pub const DrivingStyleAvoidTrafficExtremely: eDrivingStyle = .{ .bits = @as(c_uint, @intCast(6)) };
};
pub const eBone = extern struct {
bits: c_int = 0,
pub const SKEL_ROOT: eBone = .{ .bits = @as(c_uint, @intCast(0)) };
pub const SKEL_Pelvis: eBone = .{ .bits = @as(c_uint, @intCast(11816)) };
pub const SKEL_L_Thigh: eBone = .{ .bits = @as(c_uint, @intCast(58271)) };
pub const SKEL_L_Calf: eBone = .{ .bits = @as(c_uint, @intCast(63931)) };
pub const SKEL_L_Foot: eBone = .{ .bits = @as(c_uint, @intCast(14201)) };
pub const SKEL_L_Toe0: eBone = .{ .bits = @as(c_uint, @intCast(2108)) };
pub const IK_L_Foot: eBone = .{ .bits = @as(c_uint, @intCast(65245)) };
pub const PH_L_Foot: eBone = .{ .bits = @as(c_uint, @intCast(57717)) };
pub const MH_L_Knee: eBone = .{ .bits = @as(c_uint, @intCast(46078)) };
pub const SKEL_R_Thigh: eBone = .{ .bits = @as(c_uint, @intCast(51826)) };
pub const SKEL_R_Calf: eBone = .{ .bits = @as(c_uint, @intCast(36864)) };
pub const SKEL_R_Foot: eBone = .{ .bits = @as(c_uint, @intCast(52301)) };
pub const SKEL_R_Toe0: eBone = .{ .bits = @as(c_uint, @intCast(20781)) };
pub const IK_R_Foot: eBone = .{ .bits = @as(c_uint, @intCast(35502)) };
pub const PH_R_Foot: eBone = .{ .bits = @as(c_uint, @intCast(24806)) };
pub const MH_R_Knee: eBone = .{ .bits = @as(c_uint, @intCast(16335)) };
pub const RB_L_ThighRoll: eBone = .{ .bits = @as(c_uint, @intCast(23639)) };
pub const RB_R_ThighRoll: eBone = .{ .bits = @as(c_uint, @intCast(6442)) };
pub const SKEL_Spine_Root: eBone = .{ .bits = @as(c_uint, @intCast(57597)) };
pub const SKEL_Spine0: eBone = .{ .bits = @as(c_uint, @intCast(23553)) };
pub const SKEL_Spine1: eBone = .{ .bits = @as(c_uint, @intCast(24816)) };
pub const SKEL_Spine2: eBone = .{ .bits = @as(c_uint, @intCast(24817)) };
pub const SKEL_Spine3: eBone = .{ .bits = @as(c_uint, @intCast(24818)) };
pub const SKEL_L_Clavicle: eBone = .{ .bits = @as(c_uint, @intCast(64729)) };
pub const SKEL_L_UpperArm: eBone = .{ .bits = @as(c_uint, @intCast(45509)) };
pub const SKEL_L_Forearm: eBone = .{ .bits = @as(c_uint, @intCast(61163)) };
pub const SKEL_L_Hand: eBone = .{ .bits = @as(c_uint, @intCast(18905)) };
pub const SKEL_L_Finger00: eBone = .{ .bits = @as(c_uint, @intCast(26610)) };
pub const SKEL_L_Finger01: eBone = .{ .bits = @as(c_uint, @intCast(4089)) };
pub const SKEL_L_Finger02: eBone = .{ .bits = @as(c_uint, @intCast(4090)) };
pub const SKEL_L_Finger10: eBone = .{ .bits = @as(c_uint, @intCast(26611)) };
pub const SKEL_L_Finger11: eBone = .{ .bits = @as(c_uint, @intCast(4169)) };
pub const SKEL_L_Finger12: eBone = .{ .bits = @as(c_uint, @intCast(4170)) };
pub const SKEL_L_Finger20: eBone = .{ .bits = @as(c_uint, @intCast(26612)) };
pub const SKEL_L_Finger21: eBone = .{ .bits = @as(c_uint, @intCast(4185)) };
pub const SKEL_L_Finger22: eBone = .{ .bits = @as(c_uint, @intCast(4186)) };
pub const SKEL_L_Finger30: eBone = .{ .bits = @as(c_uint, @intCast(26613)) };
pub const SKEL_L_Finger31: eBone = .{ .bits = @as(c_uint, @intCast(4137)) };
pub const SKEL_L_Finger32: eBone = .{ .bits = @as(c_uint, @intCast(4138)) };
pub const SKEL_L_Finger40: eBone = .{ .bits = @as(c_uint, @intCast(26614)) };
pub const SKEL_L_Finger41: eBone = .{ .bits = @as(c_uint, @intCast(4153)) };
pub const SKEL_L_Finger42: eBone = .{ .bits = @as(c_uint, @intCast(4154)) };
pub const PH_L_Hand: eBone = .{ .bits = @as(c_uint, @intCast(60309)) };
pub const IK_L_Hand: eBone = .{ .bits = @as(c_uint, @intCast(36029)) };
pub const RB_L_ForeArmRoll: eBone = .{ .bits = @as(c_uint, @intCast(61007)) };
pub const RB_L_ArmRoll: eBone = .{ .bits = @as(c_uint, @intCast(5232)) };
pub const MH_L_Elbow: eBone = .{ .bits = @as(c_uint, @intCast(22711)) };
pub const SKEL_R_Clavicle: eBone = .{ .bits = @as(c_uint, @intCast(10706)) };
pub const SKEL_R_UpperArm: eBone = .{ .bits = @as(c_uint, @intCast(40269)) };
pub const SKEL_R_Forearm: eBone = .{ .bits = @as(c_uint, @intCast(28252)) };
pub const SKEL_R_Hand: eBone = .{ .bits = @as(c_uint, @intCast(57005)) };
pub const SKEL_R_Finger00: eBone = .{ .bits = @as(c_uint, @intCast(58866)) };
pub const SKEL_R_Finger01: eBone = .{ .bits = @as(c_uint, @intCast(64016)) };
pub const SKEL_R_Finger02: eBone = .{ .bits = @as(c_uint, @intCast(64017)) };
pub const SKEL_R_Finger10: eBone = .{ .bits = @as(c_uint, @intCast(58867)) };
pub const SKEL_R_Finger11: eBone = .{ .bits = @as(c_uint, @intCast(64096)) };
pub const SKEL_R_Finger12: eBone = .{ .bits = @as(c_uint, @intCast(64097)) };
pub const SKEL_R_Finger20: eBone = .{ .bits = @as(c_uint, @intCast(58868)) };
pub const SKEL_R_Finger21: eBone = .{ .bits = @as(c_uint, @intCast(64112)) };
pub const SKEL_R_Finger22: eBone = .{ .bits = @as(c_uint, @intCast(64113)) };
pub const SKEL_R_Finger30: eBone = .{ .bits = @as(c_uint, @intCast(58869)) };
pub const SKEL_R_Finger31: eBone = .{ .bits = @as(c_uint, @intCast(64064)) };
pub const SKEL_R_Finger32: eBone = .{ .bits = @as(c_uint, @intCast(64065)) };
pub const SKEL_R_Finger40: eBone = .{ .bits = @as(c_uint, @intCast(58870)) };
pub const SKEL_R_Finger41: eBone = .{ .bits = @as(c_uint, @intCast(64080)) };
pub const SKEL_R_Finger42: eBone = .{ .bits = @as(c_uint, @intCast(64081)) };
pub const PH_R_Hand: eBone = .{ .bits = @as(c_uint, @intCast(28422)) };
pub const IK_R_Hand: eBone = .{ .bits = @as(c_uint, @intCast(6286)) };
pub const RB_R_ForeArmRoll: eBone = .{ .bits = @as(c_uint, @intCast(43810)) };
pub const RB_R_ArmRoll: eBone = .{ .bits = @as(c_uint, @intCast(37119)) };
pub const MH_R_Elbow: eBone = .{ .bits = @as(c_uint, @intCast(2992)) };
pub const SKEL_Neck_1: eBone = .{ .bits = @as(c_uint, @intCast(39317)) };
pub const SKEL_Head: eBone = .{ .bits = @as(c_uint, @intCast(31086)) };
pub const IK_Head: eBone = .{ .bits = @as(c_uint, @intCast(12844)) };
pub const FACIAL_facialRoot: eBone = .{ .bits = @as(c_uint, @intCast(65068)) };
pub const FB_L_Brow_Out_000: eBone = .{ .bits = @as(c_uint, @intCast(58331)) };
pub const FB_L_Lid_Upper_000: eBone = .{ .bits = @as(c_uint, @intCast(45750)) };
pub const FB_L_Eye_000: eBone = .{ .bits = @as(c_uint, @intCast(25260)) };
pub const FB_L_CheekBone_000: eBone = .{ .bits = @as(c_uint, @intCast(21550)) };
pub const FB_L_Lip_Corner_000: eBone = .{ .bits = @as(c_uint, @intCast(29868)) };
pub const FB_R_Lid_Upper_000: eBone = .{ .bits = @as(c_uint, @intCast(43536)) };
pub const FB_R_Eye_000: eBone = .{ .bits = @as(c_uint, @intCast(27474)) };
pub const FB_R_CheekBone_000: eBone = .{ .bits = @as(c_uint, @intCast(19336)) };
pub const FB_R_Brow_Out_000: eBone = .{ .bits = @as(c_uint, @intCast(1356)) };
pub const FB_R_Lip_Corner_000: eBone = .{ .bits = @as(c_uint, @intCast(11174)) };
pub const FB_Brow_Centre_000: eBone = .{ .bits = @as(c_uint, @intCast(37193)) };
pub const FB_UpperLipRoot_000: eBone = .{ .bits = @as(c_uint, @intCast(20178)) };
pub const FB_UpperLip_000: eBone = .{ .bits = @as(c_uint, @intCast(61839)) };
pub const FB_L_Lip_Top_000: eBone = .{ .bits = @as(c_uint, @intCast(20279)) };
pub const FB_R_Lip_Top_000: eBone = .{ .bits = @as(c_uint, @intCast(17719)) };
pub const FB_Jaw_000: eBone = .{ .bits = @as(c_uint, @intCast(46240)) };
pub const FB_LowerLipRoot_000: eBone = .{ .bits = @as(c_uint, @intCast(17188)) };
pub const FB_LowerLip_000: eBone = .{ .bits = @as(c_uint, @intCast(20623)) };
pub const FB_L_Lip_Bot_000: eBone = .{ .bits = @as(c_uint, @intCast(47419)) };
pub const FB_R_Lip_Bot_000: eBone = .{ .bits = @as(c_uint, @intCast(49979)) };
pub const FB_Tongue_000: eBone = .{ .bits = @as(c_uint, @intCast(47495)) };
pub const RB_Neck_1: eBone = .{ .bits = @as(c_uint, @intCast(35731)) };
pub const IK_Root: eBone = .{ .bits = @as(c_uint, @intCast(56604)) };
};
pub const eFiringPattern = extern struct {
bits: c_int = 0,
pub const FiringPatternFullAuto: eFiringPattern = .{ .bits = @as(DWORD, @intCast(3337513804)) };
pub const FiringPatternBurstFire: eFiringPattern = .{ .bits = @as(DWORD, @intCast(3607063905)) };
pub const FiringPatternBurstInCover: eFiringPattern = .{ .bits = @as(DWORD, @intCast(40051185)) };
pub const FiringPatternBurstFireDriveby: eFiringPattern = .{ .bits = @as(DWORD, @intCast(3541198322)) };
pub const FiringPatternFromGround: eFiringPattern = .{ .bits = @as(DWORD, @intCast(577037782)) };
pub const FiringPatternDelayFireByOneSec: eFiringPattern = .{ .bits = @as(DWORD, @intCast(2055493265)) };
pub const FiringPatternSingleShot: eFiringPattern = .{ .bits = @as(DWORD, @intCast(1566631136)) };
pub const FiringPatternBurstFirePistol: eFiringPattern = .{ .bits = @as(DWORD, @intCast(2685983626)) };
pub const FiringPatternBurstFireSMG: eFiringPattern = .{ .bits = @as(DWORD, @intCast(3507334638)) };
pub const FiringPatternBurstFireRifle: eFiringPattern = .{ .bits = @as(DWORD, @intCast(2624893958)) };
pub const FiringPatternBurstFireMG: eFiringPattern = .{ .bits = @as(DWORD, @intCast(3044263348)) };
pub const FiringPatternBurstFirePumpShotGun: eFiringPattern = .{ .bits = @as(DWORD, @intCast(12239771)) };
pub const FiringPatternBurstFireHeli: eFiringPattern = .{ .bits = @as(DWORD, @intCast(2437838959)) };
pub const FiringPatternBurstFireMicro: eFiringPattern = .{ .bits = @as(DWORD, @intCast(1122960381)) };
pub const FiringPatternBurstFireBursts: eFiringPattern = .{ .bits = @as(DWORD, @intCast(1122960381)) };
pub const FiringPatternBurstFireTank: eFiringPattern = .{ .bits = @as(DWORD, @intCast(3804904049)) };
};
pub const eFont = extern struct {
bits: c_int = 0,
pub const FontChaletLondon: eFont = .{ .bits = @as(c_uint, @intCast(0)) };
pub const FontHouseScript: eFont = .{ .bits = @as(c_uint, @intCast(1)) };
pub const FontMonospace: eFont = .{ .bits = @as(c_uint, @intCast(2)) };
pub const FontChaletComprimeCologne: eFont = .{ .bits = @as(c_uint, @intCast(4)) };
pub const FontPricedown: eFont = .{ .bits = @as(c_uint, @intCast(7)) };
};
pub const eVehicleColor = extern struct {
bits: c_int = 0,
pub const VehicleColorMetallicBlack: eVehicleColor = .{ .bits = @as(c_uint, @intCast(0)) };
pub const VehicleColorMetallicGraphiteBlack: eVehicleColor = .{ .bits = @as(c_uint, @intCast(1)) };
pub const VehicleColorMetallicBlackSteel: eVehicleColor = .{ .bits = @as(c_uint, @intCast(2)) };
pub const VehicleColorMetallicDarkSilver: eVehicleColor = .{ .bits = @as(c_uint, @intCast(3)) };
pub const VehicleColorMetallicSilver: eVehicleColor = .{ .bits = @as(c_uint, @intCast(4)) };
pub const VehicleColorMetallicBlueSilver: eVehicleColor = .{ .bits = @as(c_uint, @intCast(5)) };
pub const VehicleColorMetallicSteelGray: eVehicleColor = .{ .bits = @as(c_uint, @intCast(6)) };
pub const VehicleColorMetallicShadowSilver: eVehicleColor = .{ .bits = @as(c_uint, @intCast(7)) };
pub const VehicleColorMetallicStoneSilver: eVehicleColor = .{ .bits = @as(c_uint, @intCast(8)) };
pub const VehicleColorMetallicMidnightSilver: eVehicleColor = .{ .bits = @as(c_uint, @intCast(9)) };
pub const VehicleColorMetallicGunMetal: eVehicleColor = .{ .bits = @as(c_uint, @intCast(10)) };
pub const VehicleColorMetallicAnthraciteGray: eVehicleColor = .{ .bits = @as(c_uint, @intCast(11)) };
pub const VehicleColorMatteBlack: eVehicleColor = .{ .bits = @as(c_uint, @intCast(12)) };
pub const VehicleColorMatteGray: eVehicleColor = .{ .bits = @as(c_uint, @intCast(13)) };
pub const VehicleColorMatteLightGray: eVehicleColor = .{ .bits = @as(c_uint, @intCast(14)) };
pub const VehicleColorUtilBlack: eVehicleColor = .{ .bits = @as(c_uint, @intCast(15)) };
pub const VehicleColorUtilBlackPoly: eVehicleColor = .{ .bits = @as(c_uint, @intCast(16)) };
pub const VehicleColorUtilDarksilver: eVehicleColor = .{ .bits = @as(c_uint, @intCast(17)) };
pub const VehicleColorUtilSilver: eVehicleColor = .{ .bits = @as(c_uint, @intCast(18)) };
pub const VehicleColorUtilGunMetal: eVehicleColor = .{ .bits = @as(c_uint, @intCast(19)) };
pub const VehicleColorUtilShadowSilver: eVehicleColor = .{ .bits = @as(c_uint, @intCast(20)) };
pub const VehicleColorWornBlack: eVehicleColor = .{ .bits = @as(c_uint, @intCast(21)) };
pub const VehicleColorWornGraphite: eVehicleColor = .{ .bits = @as(c_uint, @intCast(22)) };
pub const VehicleColorWornSilverGray: eVehicleColor = .{ .bits = @as(c_uint, @intCast(23)) };
pub const VehicleColorWornSilver: eVehicleColor = .{ .bits = @as(c_uint, @intCast(24)) };
pub const VehicleColorWornBlueSilver: eVehicleColor = .{ .bits = @as(c_uint, @intCast(25)) };
pub const VehicleColorWornShadowSilver: eVehicleColor = .{ .bits = @as(c_uint, @intCast(26)) };
pub const VehicleColorMetallicRed: eVehicleColor = .{ .bits = @as(c_uint, @intCast(27)) };
pub const VehicleColorMetallicTorinoRed: eVehicleColor = .{ .bits = @as(c_uint, @intCast(28)) };
pub const VehicleColorMetallicFormulaRed: eVehicleColor = .{ .bits = @as(c_uint, @intCast(29)) };
pub const VehicleColorMetallicBlazeRed: eVehicleColor = .{ .bits = @as(c_uint, @intCast(30)) };
pub const VehicleColorMetallicGracefulRed: eVehicleColor = .{ .bits = @as(c_uint, @intCast(31)) };
pub const VehicleColorMetallicGarnetRed: eVehicleColor = .{ .bits = @as(c_uint, @intCast(32)) };
pub const VehicleColorMetallicDesertRed: eVehicleColor = .{ .bits = @as(c_uint, @intCast(33)) };
pub const VehicleColorMetallicCabernetRed: eVehicleColor = .{ .bits = @as(c_uint, @intCast(34)) };
pub const VehicleColorMetallicCandyRed: eVehicleColor = .{ .bits = @as(c_uint, @intCast(35)) };
pub const VehicleColorMetallicSunriseOrange: eVehicleColor = .{ .bits = @as(c_uint, @intCast(36)) };
pub const VehicleColorMetallicClassicGold: eVehicleColor = .{ .bits = @as(c_uint, @intCast(37)) };
pub const VehicleColorMetallicOrange: eVehicleColor = .{ .bits = @as(c_uint, @intCast(38)) };
pub const VehicleColorMatteRed: eVehicleColor = .{ .bits = @as(c_uint, @intCast(39)) };
pub const VehicleColorMatteDarkRed: eVehicleColor = .{ .bits = @as(c_uint, @intCast(40)) };
pub const VehicleColorMatteOrange: eVehicleColor = .{ .bits = @as(c_uint, @intCast(41)) };
pub const VehicleColorMatteYellow: eVehicleColor = .{ .bits = @as(c_uint, @intCast(42)) };
pub const VehicleColorUtilRed: eVehicleColor = .{ .bits = @as(c_uint, @intCast(43)) };
pub const VehicleColorUtilBrightRed: eVehicleColor = .{ .bits = @as(c_uint, @intCast(44)) };
pub const VehicleColorUtilGarnetRed: eVehicleColor = .{ .bits = @as(c_uint, @intCast(45)) };
pub const VehicleColorWornRed: eVehicleColor = .{ .bits = @as(c_uint, @intCast(46)) };
pub const VehicleColorWornGoldenRed: eVehicleColor = .{ .bits = @as(c_uint, @intCast(47)) };
pub const VehicleColorWornDarkRed: eVehicleColor = .{ .bits = @as(c_uint, @intCast(48)) };
pub const VehicleColorMetallicDarkGreen: eVehicleColor = .{ .bits = @as(c_uint, @intCast(49)) };
pub const VehicleColorMetallicRacingGreen: eVehicleColor = .{ .bits = @as(c_uint, @intCast(50)) };
pub const VehicleColorMetallicSeaGreen: eVehicleColor = .{ .bits = @as(c_uint, @intCast(51)) };
pub const VehicleColorMetallicOliveGreen: eVehicleColor = .{ .bits = @as(c_uint, @intCast(52)) };
pub const VehicleColorMetallicGreen: eVehicleColor = .{ .bits = @as(c_uint, @intCast(53)) };
pub const VehicleColorMetallicGasolineBlueGreen: eVehicleColor = .{ .bits = @as(c_uint, @intCast(54)) };
pub const VehicleColorMatteLimeGreen: eVehicleColor = .{ .bits = @as(c_uint, @intCast(55)) };
pub const VehicleColorUtilDarkGreen: eVehicleColor = .{ .bits = @as(c_uint, @intCast(56)) };
pub const VehicleColorUtilGreen: eVehicleColor = .{ .bits = @as(c_uint, @intCast(57)) };
pub const VehicleColorWornDarkGreen: eVehicleColor = .{ .bits = @as(c_uint, @intCast(58)) };
pub const VehicleColorWornGreen: eVehicleColor = .{ .bits = @as(c_uint, @intCast(59)) };
pub const VehicleColorWornSeaWash: eVehicleColor = .{ .bits = @as(c_uint, @intCast(60)) };
pub const VehicleColorMetallicMidnightBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(61)) };
pub const VehicleColorMetallicDarkBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(62)) };
pub const VehicleColorMetallicSaxonyBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(63)) };
pub const VehicleColorMetallicBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(64)) };
pub const VehicleColorMetallicMarinerBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(65)) };
pub const VehicleColorMetallicHarborBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(66)) };
pub const VehicleColorMetallicDiamondBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(67)) };
pub const VehicleColorMetallicSurfBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(68)) };
pub const VehicleColorMetallicNauticalBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(69)) };
pub const VehicleColorMetallicBrightBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(70)) };
pub const VehicleColorMetallicPurpleBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(71)) };
pub const VehicleColorMetallicSpinnakerBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(72)) };
pub const VehicleColorMetallicUltraBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(73)) };
pub const VehicleColorUtilDarkBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(75)) };
pub const VehicleColorUtilMidnightBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(76)) };
pub const VehicleColorUtilBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(77)) };
pub const VehicleColorUtilSeaFoamBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(78)) };
pub const VehicleColorUtilLightningBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(79)) };
pub const VehicleColorUtilMauiBluePoly: eVehicleColor = .{ .bits = @as(c_uint, @intCast(80)) };
pub const VehicleColorUtilBrightBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(81)) };
pub const VehicleColorMatteDarkBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(82)) };
pub const VehicleColorMatteBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(83)) };
pub const VehicleColorMatteMidnightBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(84)) };
pub const VehicleColorWornDarkBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(85)) };
pub const VehicleColorWornBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(86)) };
pub const VehicleColorWornLightBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(87)) };
pub const VehicleColorMetallicTaxiYellow: eVehicleColor = .{ .bits = @as(c_uint, @intCast(88)) };
pub const VehicleColorMetallicRaceYellow: eVehicleColor = .{ .bits = @as(c_uint, @intCast(89)) };
pub const VehicleColorMetallicBronze: eVehicleColor = .{ .bits = @as(c_uint, @intCast(90)) };
pub const VehicleColorMetallicYellowBird: eVehicleColor = .{ .bits = @as(c_uint, @intCast(91)) };
pub const VehicleColorMetallicLime: eVehicleColor = .{ .bits = @as(c_uint, @intCast(92)) };
pub const VehicleColorMetallicChampagne: eVehicleColor = .{ .bits = @as(c_uint, @intCast(93)) };
pub const VehicleColorMetallicPuebloBeige: eVehicleColor = .{ .bits = @as(c_uint, @intCast(94)) };
pub const VehicleColorMetallicDarkIvory: eVehicleColor = .{ .bits = @as(c_uint, @intCast(95)) };
pub const VehicleColorMetallicChocoBrown: eVehicleColor = .{ .bits = @as(c_uint, @intCast(96)) };
pub const VehicleColorMetallicGoldenBrown: eVehicleColor = .{ .bits = @as(c_uint, @intCast(97)) };
pub const VehicleColorMetallicLightBrown: eVehicleColor = .{ .bits = @as(c_uint, @intCast(98)) };
pub const VehicleColorMetallicStrawBeige: eVehicleColor = .{ .bits = @as(c_uint, @intCast(99)) };
pub const VehicleColorMetallicMossBrown: eVehicleColor = .{ .bits = @as(c_uint, @intCast(100)) };
pub const VehicleColorMetallicBistonBrown: eVehicleColor = .{ .bits = @as(c_uint, @intCast(101)) };
pub const VehicleColorMetallicBeechwood: eVehicleColor = .{ .bits = @as(c_uint, @intCast(102)) };
pub const VehicleColorMetallicDarkBeechwood: eVehicleColor = .{ .bits = @as(c_uint, @intCast(103)) };
pub const VehicleColorMetallicChocoOrange: eVehicleColor = .{ .bits = @as(c_uint, @intCast(104)) };
pub const VehicleColorMetallicBeachSand: eVehicleColor = .{ .bits = @as(c_uint, @intCast(105)) };
pub const VehicleColorMetallicSunBleechedSand: eVehicleColor = .{ .bits = @as(c_uint, @intCast(106)) };
pub const VehicleColorMetallicCream: eVehicleColor = .{ .bits = @as(c_uint, @intCast(107)) };
pub const VehicleColorUtilBrown: eVehicleColor = .{ .bits = @as(c_uint, @intCast(108)) };
pub const VehicleColorUtilMediumBrown: eVehicleColor = .{ .bits = @as(c_uint, @intCast(109)) };
pub const VehicleColorUtilLightBrown: eVehicleColor = .{ .bits = @as(c_uint, @intCast(110)) };
pub const VehicleColorMetallicWhite: eVehicleColor = .{ .bits = @as(c_uint, @intCast(111)) };
pub const VehicleColorMetallicFrostWhite: eVehicleColor = .{ .bits = @as(c_uint, @intCast(112)) };
pub const VehicleColorWornHoneyBeige: eVehicleColor = .{ .bits = @as(c_uint, @intCast(113)) };
pub const VehicleColorWornBrown: eVehicleColor = .{ .bits = @as(c_uint, @intCast(114)) };
pub const VehicleColorWornDarkBrown: eVehicleColor = .{ .bits = @as(c_uint, @intCast(115)) };
pub const VehicleColorWornStrawBeige: eVehicleColor = .{ .bits = @as(c_uint, @intCast(116)) };
pub const VehicleColorBrushedSteel: eVehicleColor = .{ .bits = @as(c_uint, @intCast(117)) };
pub const VehicleColorBrushedBlackSteel: eVehicleColor = .{ .bits = @as(c_uint, @intCast(118)) };
pub const VehicleColorBrushedAluminium: eVehicleColor = .{ .bits = @as(c_uint, @intCast(119)) };
pub const VehicleColorChrome: eVehicleColor = .{ .bits = @as(c_uint, @intCast(120)) };
pub const VehicleColorWornOffWhite: eVehicleColor = .{ .bits = @as(c_uint, @intCast(121)) };
pub const VehicleColorUtilOffWhite: eVehicleColor = .{ .bits = @as(c_uint, @intCast(122)) };
pub const VehicleColorWornOrange: eVehicleColor = .{ .bits = @as(c_uint, @intCast(123)) };
pub const VehicleColorWornLightOrange: eVehicleColor = .{ .bits = @as(c_uint, @intCast(124)) };
pub const VehicleColorMetallicSecuricorGreen: eVehicleColor = .{ .bits = @as(c_uint, @intCast(125)) };
pub const VehicleColorWornTaxiYellow: eVehicleColor = .{ .bits = @as(c_uint, @intCast(126)) };
pub const VehicleColorPoliceCarBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(127)) };
pub const VehicleColorMatteGreen: eVehicleColor = .{ .bits = @as(c_uint, @intCast(128)) };
pub const VehicleColorMatteBrown: eVehicleColor = .{ .bits = @as(c_uint, @intCast(129)) };
pub const VehicleColorMatteWhite: eVehicleColor = .{ .bits = @as(c_uint, @intCast(131)) };
pub const VehicleColorWornWhite: eVehicleColor = .{ .bits = @as(c_uint, @intCast(132)) };
pub const VehicleColorWornOliveArmyGreen: eVehicleColor = .{ .bits = @as(c_uint, @intCast(133)) };
pub const VehicleColorPureWhite: eVehicleColor = .{ .bits = @as(c_uint, @intCast(134)) };
pub const VehicleColorHotPink: eVehicleColor = .{ .bits = @as(c_uint, @intCast(135)) };
pub const VehicleColorSalmonpink: eVehicleColor = .{ .bits = @as(c_uint, @intCast(136)) };
pub const VehicleColorMetallicVermillionPink: eVehicleColor = .{ .bits = @as(c_uint, @intCast(137)) };
pub const VehicleColorOrange: eVehicleColor = .{ .bits = @as(c_uint, @intCast(138)) };
pub const VehicleColorGreen: eVehicleColor = .{ .bits = @as(c_uint, @intCast(139)) };
pub const VehicleColorBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(140)) };
pub const VehicleColorMettalicBlackBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(141)) };
pub const VehicleColorMetallicBlackPurple: eVehicleColor = .{ .bits = @as(c_uint, @intCast(142)) };
pub const VehicleColorMetallicBlackRed: eVehicleColor = .{ .bits = @as(c_uint, @intCast(143)) };
pub const VehicleColorHunterGreen: eVehicleColor = .{ .bits = @as(c_uint, @intCast(144)) };
pub const VehicleColorMetallicPurple: eVehicleColor = .{ .bits = @as(c_uint, @intCast(145)) };
pub const VehicleColorMetaillicVDarkBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(146)) };
pub const VehicleColorModshopBlack1: eVehicleColor = .{ .bits = @as(c_uint, @intCast(147)) };
pub const VehicleColorMattePurple: eVehicleColor = .{ .bits = @as(c_uint, @intCast(148)) };
pub const VehicleColorMatteDarkPurple: eVehicleColor = .{ .bits = @as(c_uint, @intCast(149)) };
pub const VehicleColorMetallicLavaRed: eVehicleColor = .{ .bits = @as(c_uint, @intCast(150)) };
pub const VehicleColorMatteForestGreen: eVehicleColor = .{ .bits = @as(c_uint, @intCast(151)) };
pub const VehicleColorMatteOliveDrab: eVehicleColor = .{ .bits = @as(c_uint, @intCast(152)) };
pub const VehicleColorMatteDesertBrown: eVehicleColor = .{ .bits = @as(c_uint, @intCast(153)) };
pub const VehicleColorMatteDesertTan: eVehicleColor = .{ .bits = @as(c_uint, @intCast(154)) };
pub const VehicleColorMatteFoliageGreen: eVehicleColor = .{ .bits = @as(c_uint, @intCast(155)) };
pub const VehicleColorDefaultAlloyColor: eVehicleColor = .{ .bits = @as(c_uint, @intCast(156)) };
pub const VehicleColorEpsilonBlue: eVehicleColor = .{ .bits = @as(c_uint, @intCast(157)) };
pub const VehicleColorPureGold: eVehicleColor = .{ .bits = @as(c_uint, @intCast(158)) };
pub const VehicleColorBrushedGold: eVehicleColor = .{ .bits = @as(c_uint, @intCast(159)) };
};
pub const eVehicleDoor = extern struct {
bits: c_int = 0,
pub const VehicleDoorFrontLeftDoor: eVehicleDoor = .{ .bits = @as(c_uint, @intCast(0)) };
pub const VehicleDoorFrontRightDoor: eVehicleDoor = .{ .bits = @as(c_uint, @intCast(1)) };
pub const VehicleDoorBackLeftDoor: eVehicleDoor = .{ .bits = @as(c_uint, @intCast(2)) };
pub const VehicleDoorBackRightDoor: eVehicleDoor = .{ .bits = @as(c_uint, @intCast(3)) };
pub const VehicleDoorHood: eVehicleDoor = .{ .bits = @as(c_uint, @intCast(4)) };
pub const VehicleDoorTrunk: eVehicleDoor = .{ .bits = @as(c_uint, @intCast(5)) };
pub const VehicleDoorTrunk2: eVehicleDoor = .{ .bits = @as(c_uint, @intCast(6)) };
};
pub const eVehicleLockStatus = extern struct {
bits: c_int = 0,
pub const VehicleLockStatusNone: eVehicleLockStatus = .{ .bits = @as(c_uint, @intCast(0)) };
pub const VehicleLockStatusUnlocked: eVehicleLockStatus = .{ .bits = @as(c_uint, @intCast(1)) };
pub const VehicleLockStatusLocked: eVehicleLockStatus = .{ .bits = @as(c_uint, @intCast(2)) };
pub const VehicleLockStatusLockedForPlayer: eVehicleLockStatus = .{ .bits = @as(c_uint, @intCast(3)) };
pub const VehicleLockStatusStickPlayerInside: eVehicleLockStatus = .{ .bits = @as(c_uint, @intCast(4)) };
pub const VehicleLockStatusCanBeBrokenInto: eVehicleLockStatus = .{ .bits = @as(c_uint, @intCast(7)) };
pub const VehicleLockStatusCanBeBrokenIntoPersist: eVehicleLockStatus = .{ .bits = @as(c_uint, @intCast(8)) };
pub const VehicleLockStatusCannotBeTriedToEnter: eVehicleLockStatus = .{ .bits = @as(c_uint, @intCast(10)) };
};
pub const eVehicleLandingGear = extern struct {
bits: c_int = 0,
pub const VehicleLandingGearDeployed: eVehicleLandingGear = .{ .bits = @as(c_uint, @intCast(0)) };
pub const VehicleLandingGearClosing: eVehicleLandingGear = .{ .bits = @as(c_uint, @intCast(1)) };
pub const VehicleLandingGearOpening: eVehicleLandingGear = .{ .bits = @as(c_uint, @intCast(2)) };
pub const VehicleLandingGearRetracted: eVehicleLandingGear = .{ .bits = @as(c_uint, @intCast(3)) };
};
pub const eVehicleMod = extern struct {
bits: c_int = 0,
pub const VehicleModSpoilers: eVehicleMod = .{ .bits = @as(c_uint, @intCast(0)) };
pub const VehicleModFrontBumper: eVehicleMod = .{ .bits = @as(c_uint, @intCast(1)) };
pub const VehicleModRearBumper: eVehicleMod = .{ .bits = @as(c_uint, @intCast(2)) };
pub const VehicleModSideSkirt: eVehicleMod = .{ .bits = @as(c_uint, @intCast(3)) };
pub const VehicleModExhaust: eVehicleMod = .{ .bits = @as(c_uint, @intCast(4)) };
pub const VehicleModFrame: eVehicleMod = .{ .bits = @as(c_uint, @intCast(5)) };
pub const VehicleModGrille: eVehicleMod = .{ .bits = @as(c_uint, @intCast(6)) };
pub const VehicleModHood: eVehicleMod = .{ .bits = @as(c_uint, @intCast(7)) };
pub const VehicleModFender: eVehicleMod = .{ .bits = @as(c_uint, @intCast(8)) };
pub const VehicleModRightFender: eVehicleMod = .{ .bits = @as(c_uint, @intCast(9)) };
pub const VehicleModRoof: eVehicleMod = .{ .bits = @as(c_uint, @intCast(10)) };
pub const VehicleModEngine: eVehicleMod = .{ .bits = @as(c_uint, @intCast(11)) };
pub const VehicleModBrakes: eVehicleMod = .{ .bits = @as(c_uint, @intCast(12)) };
pub const VehicleModTransmission: eVehicleMod = .{ .bits = @as(c_uint, @intCast(13)) };
pub const VehicleModHorns: eVehicleMod = .{ .bits = @as(c_uint, @intCast(14)) };
pub const VehicleModSuspension: eVehicleMod = .{ .bits = @as(c_uint, @intCast(15)) };
pub const VehicleModArmor: eVehicleMod = .{ .bits = @as(c_uint, @intCast(16)) };
pub const VehicleModFrontWheels: eVehicleMod = .{ .bits = @as(c_uint, @intCast(23)) };
/// only for motocycles
pub const VehicleModBackWheels: eVehicleMod = .{ .bits = @as(c_uint, @intCast(24)) };
};
pub const eVehicleNeonLight = extern struct {
bits: c_int = 0,
pub const VehicleNeonLightLeft: eVehicleNeonLight = .{ .bits = @as(c_uint, @intCast(0)) };
pub const VehicleNeonLightRight: eVehicleNeonLight = .{ .bits = @as(c_uint, @intCast(1)) };
pub const VehicleNeonLightFront: eVehicleNeonLight = .{ .bits = @as(c_uint, @intCast(2)) };
pub const VehicleNeonLightBack: eVehicleNeonLight = .{ .bits = @as(c_uint, @intCast(3)) };
};
pub const eVehicleRoofState = extern struct {
bits: c_int = 0,
pub const VehicleRoofStateClosed: eVehicleRoofState = .{ .bits = 0 };
pub const VehicleRoofStateOpening: eVehicleRoofState = .{ .bits = 1 };
pub const VehicleRoofStateOpened: eVehicleRoofState = .{ .bits = 2 };
pub const VehicleRoofStateClosing: eVehicleRoofState = .{ .bits = 3 };
};
pub const eVehicleSeat = extern struct {
bits: c_int = 0,
pub const VehicleSeatNone: eVehicleSeat = .{ .bits = -3 };
pub const VehicleSeatAny: eVehicleSeat = .{ .bits = -2 };
pub const VehicleSeatDriver: eVehicleSeat = .{ .bits = -1 };
pub const VehicleSeatPassenger: eVehicleSeat = .{ .bits = 0 };
pub const VehicleSeatLeftFront: eVehicleSeat = .{ .bits = -1 };
pub const VehicleSeatRightFront: eVehicleSeat = .{ .bits = 0 };
pub const VehicleSeatLeftRear: eVehicleSeat = .{ .bits = 1 };
pub const VehicleSeatRightRear: eVehicleSeat = .{ .bits = 2 };
};
pub const eVehicleToggleMod = extern struct {
bits: c_int = 0,
pub const VehicleToggleModTurbo: eVehicleToggleMod = .{ .bits = @as(c_uint, @intCast(18)) };
pub const VehicleToggleModTireSmoke: eVehicleToggleMod = .{ .bits = @as(c_uint, @intCast(20)) };
pub const VehicleToggleModXenonHeadlights: eVehicleToggleMod = .{ .bits = @as(c_uint, @intCast(22)) };
};
pub const eVehicleWheelType = extern struct {
bits: c_int = 0,
pub const VehicleWheelTypeSport: eVehicleWheelType = .{ .bits = @as(c_uint, @intCast(0)) };
pub const VehicleWheelTypeMuscle: eVehicleWheelType = .{ .bits = @as(c_uint, @intCast(1)) };
pub const VehicleWheelTypeLowrider: eVehicleWheelType = .{ .bits = @as(c_uint, @intCast(2)) };
pub const VehicleWheelTypeSUV: eVehicleWheelType = .{ .bits = @as(c_uint, @intCast(3)) };
pub const VehicleWheelTypeOffroad: eVehicleWheelType = .{ .bits = @as(c_uint, @intCast(4)) };
pub const VehicleWheelTypeTuner: eVehicleWheelType = .{ .bits = @as(c_uint, @intCast(5)) };
pub const VehicleWheelTypeBikeWheels: eVehicleWheelType = .{ .bits = @as(c_uint, @intCast(6)) };
pub const VehicleWheelTypeHighEnd: eVehicleWheelType = .{ .bits = @as(c_uint, @intCast(7)) };
};
pub const eVehicleWindow = extern struct {
bits: c_int = 0,
pub const VehicleWindowFrontRight: eVehicleWindow = .{ .bits = @as(c_uint, @intCast(1)) };
pub const VehicleWindowFrontLeft: eVehicleWindow = .{ .bits = @as(c_uint, @intCast(0)) };
pub const VehicleWindowBackRight: eVehicleWindow = .{ .bits = @as(c_uint, @intCast(3)) };
pub const VehicleWindowBackLeft: eVehicleWindow = .{ .bits = @as(c_uint, @intCast(2)) };
};
pub const eVehicleWindowTint = extern struct {
bits: c_int = 0,
pub const VehicleWindowTintNone: eVehicleWindowTint = .{ .bits = @as(c_uint, @intCast(0)) };
pub const VehicleWindowTintPureBlack: eVehicleWindowTint = .{ .bits = @as(c_uint, @intCast(1)) };
pub const VehicleWindowTintDarkSmoke: eVehicleWindowTint = .{ .bits = @as(c_uint, @intCast(2)) };
pub const VehicleWindowTintLightSmoke: eVehicleWindowTint = .{ .bits = @as(c_uint, @intCast(3)) };
pub const VehicleWindowTintStock: eVehicleWindowTint = .{ .bits = @as(c_uint, @intCast(4)) };
pub const VehicleWindowTintLimo: eVehicleWindowTint = .{ .bits = @as(c_uint, @intCast(5)) };
pub const VehicleWindowTintGreen: eVehicleWindowTint = .{ .bits = @as(c_uint, @intCast(6)) };
};
pub const eNumberPlateMounting = extern struct {
bits: c_int = 0,
pub const NumberPlateMountingFrontAndRear: eNumberPlateMounting = .{ .bits = @as(c_uint, @intCast(0)) };
pub const NumberPlateMountingFront: eNumberPlateMounting = .{ .bits = @as(c_uint, @intCast(1)) };
pub const NumberPlateMountingRear: eNumberPlateMounting = .{ .bits = @as(c_uint, @intCast(2)) };
pub const NumberPlateMountingNone: eNumberPlateMounting = .{ .bits = @as(c_uint, @intCast(3)) };
};
pub const eNumberPlateType = extern struct {
bits: c_int = 0,
pub const NumberPlateTypeBlueOnWhite1: eNumberPlateType = .{ .bits = @as(c_uint, @intCast(0)) };
pub const NumberPlateTypeYellowOnBlack: eNumberPlateType = .{ .bits = @as(c_uint, @intCast(1)) };
pub const NumberPlateTypeYellowOnBlue: eNumberPlateType = .{ .bits = @as(c_uint, @intCast(2)) };
pub const NumberPlateTypeBlueOnWhite2: eNumberPlateType = .{ .bits = @as(c_uint, @intCast(3)) };
pub const NumberPlateTypeBlueOnWhite3: eNumberPlateType = .{ .bits = @as(c_uint, @intCast(4)) };
pub const NumberPlateTypeNorthYankton: eNumberPlateType = .{ .bits = @as(c_uint, @intCast(5)) };
};
pub const eVehicleClass = extern struct {
bits: c_int = 0,
pub const VehicleClassCompacts: eVehicleClass = .{ .bits = @as(c_uint, @intCast(0)) };
pub const VehicleClassSedans: eVehicleClass = .{ .bits = @as(c_uint, @intCast(1)) };
pub const VehicleClassSUVs: eVehicleClass = .{ .bits = @as(c_uint, @intCast(2)) };
pub const VehicleClassCoupes: eVehicleClass = .{ .bits = @as(c_uint, @intCast(3)) };
pub const VehicleClassMuscle: eVehicleClass = .{ .bits = @as(c_uint, @intCast(4)) };
pub const VehicleClassSportsClassics: eVehicleClass = .{ .bits = @as(c_uint, @intCast(5)) };
pub const VehicleClassSports: eVehicleClass = .{ .bits = @as(c_uint, @intCast(6)) };
pub const VehicleClassSuper: eVehicleClass = .{ .bits = @as(c_uint, @intCast(7)) };
pub const VehicleClassMotorcycles: eVehicleClass = .{ .bits = @as(c_uint, @intCast(8)) };
pub const VehicleClassOffRoad: eVehicleClass = .{ .bits = @as(c_uint, @intCast(9)) };
pub const VehicleClassIndustrial: eVehicleClass = .{ .bits = @as(c_uint, @intCast(10)) };
pub const VehicleClassUtility: eVehicleClass = .{ .bits = @as(c_uint, @intCast(11)) };
pub const VehicleClassVans: eVehicleClass = .{ .bits = @as(c_uint, @intCast(12)) };
pub const VehicleClassCycles: eVehicleClass = .{ .bits = @as(c_uint, @intCast(13)) };
pub const VehicleClassBoats: eVehicleClass = .{ .bits = @as(c_uint, @intCast(14)) };
pub const VehicleClassHelicopters: eVehicleClass = .{ .bits = @as(c_uint, @intCast(15)) };
pub const VehicleClassPlanes: eVehicleClass = .{ .bits = @as(c_uint, @intCast(16)) };
pub const VehicleClassService: eVehicleClass = .{ .bits = @as(c_uint, @intCast(17)) };
pub const VehicleClassEmergency: eVehicleClass = .{ .bits = @as(c_uint, @intCast(18)) };
pub const VehicleClassMilitary: eVehicleClass = .{ .bits = @as(c_uint, @intCast(19)) };
pub const VehicleClassCommercial: eVehicleClass = .{ .bits = @as(c_uint, @intCast(20)) };
pub const VehicleClassTrains: eVehicleClass = .{ .bits = @as(c_uint, @intCast(21)) };
};
pub const eExplosionType = extern struct {
bits: c_int = 0,
pub const ExplosionTypeGrenade: eExplosionType = .{ .bits = @as(c_uint, @intCast(0)) };
pub const ExplosionTypeGrenadeL: eExplosionType = .{ .bits = @as(c_uint, @intCast(1)) };
pub const ExplosionTypeStickyBomb: eExplosionType = .{ .bits = @as(c_uint, @intCast(2)) };
pub const ExplosionTypeMolotov: eExplosionType = .{ .bits = @as(c_uint, @intCast(3)) };
pub const ExplosionTypeRocket: eExplosionType = .{ .bits = @as(c_uint, @intCast(4)) };
pub const ExplosionTypeTankShell: eExplosionType = .{ .bits = @as(c_uint, @intCast(5)) };
pub const ExplosionTypeHiOctane: eExplosionType = .{ .bits = @as(c_uint, @intCast(6)) };
pub const ExplosionTypeCar: eExplosionType = .{ .bits = @as(c_uint, @intCast(7)) };
pub const ExplosionTypePlane: eExplosionType = .{ .bits = @as(c_uint, @intCast(8)) };
pub const ExplosionTypePetrolPump: eExplosionType = .{ .bits = @as(c_uint, @intCast(9)) };
pub const ExplosionTypeBike: eExplosionType = .{ .bits = @as(c_uint, @intCast(10)) };
pub const ExplosionTypeSteam: eExplosionType = .{ .bits = @as(c_uint, @intCast(11)) };
pub const ExplosionTypeFlame: eExplosionType = .{ .bits = @as(c_uint, @intCast(12)) };
pub const ExplosionTypeWaterHydrant: eExplosionType = .{ .bits = @as(c_uint, @intCast(13)) };
pub const ExplosionTypeGasCanister: eExplosionType = .{ .bits = @as(c_uint, @intCast(14)) };
pub const ExplosionTypeBoat: eExplosionType = .{ .bits = @as(c_uint, @intCast(15)) };
pub const ExplosionTypeShipDestroy: eExplosionType = .{ .bits = @as(c_uint, @intCast(16)) };
pub const ExplosionTypeTruck: eExplosionType = .{ .bits = @as(c_uint, @intCast(17)) };
pub const ExplosionTypeBullet: eExplosionType = .{ .bits = @as(c_uint, @intCast(18)) };
pub const ExplosionTypeSmokeGL: eExplosionType = .{ .bits = @as(c_uint, @intCast(19)) };
pub const ExplosionTypeSmokeG: eExplosionType = .{ .bits = @as(c_uint, @intCast(20)) };
pub const ExplosionTypeBZGas: eExplosionType = .{ .bits = @as(c_uint, @intCast(21)) };
pub const ExplosionTypeFlare: eExplosionType = .{ .bits = @as(c_uint, @intCast(22)) };
pub const ExplosionTypeGasCanister2: eExplosionType = .{ .bits = @as(c_uint, @intCast(23)) };
pub const ExplosionTypeExtinguisher: eExplosionType = .{ .bits = @as(c_uint, @intCast(24)) };
pub const ExplosionTypeProgramAR: eExplosionType = .{ .bits = @as(c_uint, @intCast(25)) };
pub const ExplosionTypeTrain: eExplosionType = .{ .bits = @as(c_uint, @intCast(26)) };
pub const ExplosionTypeBarrel: eExplosionType = .{ .bits = @as(c_uint, @intCast(27)) };
pub const ExplosionTypePropane: eExplosionType = .{ .bits = @as(c_uint, @intCast(28)) };
pub const ExplosionTypeBlimp: eExplosionType = .{ .bits = @as(c_uint, @intCast(29)) };
pub const ExplosionTypeFlameExplode: eExplosionType = .{ .bits = @as(c_uint, @intCast(30)) };
pub const ExplosionTypeTanker: eExplosionType = .{ .bits = @as(c_uint, @intCast(31)) };
pub const ExplosionTypePlaneRocket: eExplosionType = .{ .bits = @as(c_uint, @intCast(32)) };
pub const ExplosionTypeVehicleBullet: eExplosionType = .{ .bits = @as(c_uint, @intCast(33)) };
pub const ExplosionTypeGasTank: eExplosionType = .{ .bits = @as(c_uint, @intCast(34)) };
pub const ExplosionTypeFireWork: eExplosionType = .{ .bits = @as(c_uint, @intCast(35)) };
pub const ExplosionTypeSnowBall: eExplosionType = .{ .bits = @as(c_uint, @intCast(36)) };
pub const ExplosionTypeProxMine: eExplosionType = .{ .bits = @as(c_uint, @intCast(37)) };
pub const ExplosionTypeValkyrie: eExplosionType = .{ .bits = @as(c_uint, @intCast(38)) };
};
pub const eIntersectFlags = extern struct {
bits: c_int = 0,
pub const IntersectFlagsEverything: eIntersectFlags = .{ .bits = -1 };
pub const IntersectFlagsMap: eIntersectFlags = .{ .bits = 1 };
pub const IntersectFlagsMissionEntities: eIntersectFlags = .{ .bits = 2 };
/// 4 and 8 both seem to be peds
pub const IntersectFlagsPeds1: eIntersectFlags = .{ .bits = 12 };
pub const IntersectFlagsObjects: eIntersectFlags = .{ .bits = 16 };
pub const IntersectFlagsUnk1: eIntersectFlags = .{ .bits = 32 };
pub const IntersectFlagsUnk2: eIntersectFlags = .{ .bits = 64 };
pub const IntersectFlagsUnk3: eIntersectFlags = .{ .bits = 128 };
pub const IntersectFlagsVegetation: eIntersectFlags = .{ .bits = 256 };
pub const IntersectFlagsUnk4: eIntersectFlags = .{ .bits = 512 };
};
pub const eMarkerType = extern struct {
bits: c_int = 0,
pub const MarkerTypeUpsideDownCone: eMarkerType = .{ .bits = @as(c_uint, @intCast(0)) };
pub const MarkerTypeVerticalCylinder: eMarkerType = .{ .bits = @as(c_uint, @intCast(1)) };
pub const MarkerTypeThickChevronUp: eMarkerType = .{ .bits = @as(c_uint, @intCast(2)) };
pub const MarkerTypeThinChevronUp: eMarkerType = .{ .bits = @as(c_uint, @intCast(3)) };
pub const MarkerTypeCheckeredFlagRect: eMarkerType = .{ .bits = @as(c_uint, @intCast(4)) };
pub const MarkerTypeCheckeredFlagCircle: eMarkerType = .{ .bits = @as(c_uint, @intCast(5)) };
pub const MarkerTypeVerticleCircle: eMarkerType = .{ .bits = @as(c_uint, @intCast(6)) };
pub const MarkerTypePlaneModel: eMarkerType = .{ .bits = @as(c_uint, @intCast(7)) };
pub const MarkerTypeLostMCDark: eMarkerType = .{ .bits = @as(c_uint, @intCast(8)) };
pub const MarkerTypeLostMCLight: eMarkerType = .{ .bits = @as(c_uint, @intCast(9)) };
pub const MarkerTypeNumber0: eMarkerType = .{ .bits = @as(c_uint, @intCast(10)) };
pub const MarkerTypeNumber1: eMarkerType = .{ .bits = @as(c_uint, @intCast(11)) };
pub const MarkerTypeNumber2: eMarkerType = .{ .bits = @as(c_uint, @intCast(12)) };
pub const MarkerTypeNumber3: eMarkerType = .{ .bits = @as(c_uint, @intCast(13)) };
pub const MarkerTypeNumber4: eMarkerType = .{ .bits = @as(c_uint, @intCast(14)) };
pub const MarkerTypeNumber5: eMarkerType = .{ .bits = @as(c_uint, @intCast(15)) };
pub const MarkerTypeNumber6: eMarkerType = .{ .bits = @as(c_uint, @intCast(16)) };
pub const MarkerTypeNumber7: eMarkerType = .{ .bits = @as(c_uint, @intCast(17)) };
pub const MarkerTypeNumber8: eMarkerType = .{ .bits = @as(c_uint, @intCast(18)) };
pub const MarkerTypeNumber9: eMarkerType = .{ .bits = @as(c_uint, @intCast(19)) };
pub const MarkerTypeChevronUpx1: eMarkerType = .{ .bits = @as(c_uint, @intCast(20)) };
pub const MarkerTypeChevronUpx2: eMarkerType = .{ .bits = @as(c_uint, @intCast(21)) };
pub const MarkerTypeChevronUpx3: eMarkerType = .{ .bits = @as(c_uint, @intCast(22)) };
pub const MarkerTypeHorizontalCircleFat: eMarkerType = .{ .bits = @as(c_uint, @intCast(23)) };
pub const MarkerTypeReplayIcon: eMarkerType = .{ .bits = @as(c_uint, @intCast(24)) };
pub const MarkerTypeHorizontalCircleSkinny: eMarkerType = .{ .bits = @as(c_uint, @intCast(25)) };
pub const MarkerTypeHorizontalCircleSkinny_Arrow: eMarkerType = .{ .bits = @as(c_uint, @intCast(26)) };
pub const MarkerTypeHorizontalSplitArrowCircle: eMarkerType = .{ .bits = @as(c_uint, @intCast(27)) };
pub const MarkerTypeDebugSphere: eMarkerType = .{ .bits = @as(c_uint, @intCast(28)) };
};
pub const eRelationship = extern struct {
bits: c_int = 0,
pub const RelationshipHate: eRelationship = .{ .bits = @as(c_uint, @intCast(5)) };
pub const RelationshipDislike: eRelationship = .{ .bits = @as(c_uint, @intCast(4)) };
pub const RelationshipNeutral: eRelationship = .{ .bits = @as(c_uint, @intCast(3)) };
pub const RelationshipLike: eRelationship = .{ .bits = @as(c_uint, @intCast(2)) };
pub const RelationshipRespect: eRelationship = .{ .bits = @as(c_uint, @intCast(1)) };
pub const RelationshipCompanion: eRelationship = .{ .bits = @as(c_uint, @intCast(0)) };
/// or neutral
pub const RelationshipPedestrians: eRelationship = .{ .bits = @as(c_uint, @intCast(255)) };
};
pub const eRopeType = extern struct {
bits: c_int = 0,
pub const RopeTypeNormal: eRopeType = .{ .bits = @as(c_uint, @intCast(4)) };
};
pub const eWeapon = extern struct {
bits: c_int = 0,
pub const WeaponKnife: eWeapon = .{ .bits = @as(DWORD, @intCast(2578778090)) };
pub const WeaponNightstick: eWeapon = .{ .bits = @as(DWORD, @intCast(1737195953)) };
pub const WeaponHammer: eWeapon = .{ .bits = @as(DWORD, @intCast(1317494643)) };
pub const WeaponBat: eWeapon = .{ .bits = @as(DWORD, @intCast(2508868239)) };
pub const WeaponGolfClub: eWeapon = .{ .bits = @as(DWORD, @intCast(1141786504)) };
pub const WeaponCrowbar: eWeapon = .{ .bits = @as(DWORD, @intCast(2227010557)) };
pub const WeaponPistol: eWeapon = .{ .bits = @as(DWORD, @intCast(453432689)) };
pub const WeaponCombatPistol: eWeapon = .{ .bits = @as(DWORD, @intCast(1593441988)) };
pub const WeaponAPPistol: eWeapon = .{ .bits = @as(DWORD, @intCast(584646201)) };
pub const WeaponPistol50: eWeapon = .{ .bits = @as(DWORD, @intCast(2578377531)) };
pub const WeaponMicroSMG: eWeapon = .{ .bits = @as(DWORD, @intCast(324215364)) };
pub const WeaponSMG: eWeapon = .{ .bits = @as(DWORD, @intCast(736523883)) };
pub const WeaponAssaultSMG: eWeapon = .{ .bits = @as(DWORD, @intCast(4024951519)) };
pub const WeaponCombatPDW: eWeapon = .{ .bits = @as(DWORD, @intCast(171789620)) };
pub const WeaponAssaultRifle: eWeapon = .{ .bits = @as(DWORD, @intCast(3220176749)) };
pub const WeaponCarbineRifle: eWeapon = .{ .bits = @as(DWORD, @intCast(2210333304)) };
pub const WeaponAdvancedRifle: eWeapon = .{ .bits = @as(DWORD, @intCast(2937143193)) };
pub const WeaponMG: eWeapon = .{ .bits = @as(DWORD, @intCast(2634544996)) };
pub const WeaponCombatMG: eWeapon = .{ .bits = @as(DWORD, @intCast(2144741730)) };
pub const WeaponPumpShotgun: eWeapon = .{ .bits = @as(DWORD, @intCast(487013001)) };
pub const WeaponSawnOffShotgun: eWeapon = .{ .bits = @as(DWORD, @intCast(2017895192)) };
pub const WeaponAssaultShotgun: eWeapon = .{ .bits = @as(DWORD, @intCast(3800352039)) };
pub const WeaponBullpupShotgun: eWeapon = .{ .bits = @as(DWORD, @intCast(2640438543)) };
pub const WeaponStunGun: eWeapon = .{ .bits = @as(DWORD, @intCast(911657153)) };
pub const WeaponSniperRifle: eWeapon = .{ .bits = @as(DWORD, @intCast(100416529)) };
pub const WeaponHeavySniper: eWeapon = .{ .bits = @as(DWORD, @intCast(205991906)) };
pub const WeaponGrenadeLauncher: eWeapon = .{ .bits = @as(DWORD, @intCast(2726580491)) };
pub const WeaponGrenadeLauncherSmoke: eWeapon = .{ .bits = @as(DWORD, @intCast(1305664598)) };
pub const WeaponRPG: eWeapon = .{ .bits = @as(DWORD, @intCast(2982836145)) };
pub const WeaponMinigun: eWeapon = .{ .bits = @as(DWORD, @intCast(1119849093)) };
pub const WeaponGrenade: eWeapon = .{ .bits = @as(DWORD, @intCast(2481070269)) };
pub const WeaponStickyBomb: eWeapon = .{ .bits = @as(DWORD, @intCast(741814745)) };
pub const WeaponSmokeGrenade: eWeapon = .{ .bits = @as(DWORD, @intCast(4256991824)) };
pub const WeaponBZGas: eWeapon = .{ .bits = @as(DWORD, @intCast(2694266206)) };
pub const WeaponMolotov: eWeapon = .{ .bits = @as(DWORD, @intCast(615608432)) };
pub const WeaponFireExtinguisher: eWeapon = .{ .bits = @as(DWORD, @intCast(101631238)) };
pub const WeaponPetrolCan: eWeapon = .{ .bits = @as(DWORD, @intCast(883325847)) };
pub const WeaponSNSPistol: eWeapon = .{ .bits = @as(DWORD, @intCast(3218215474)) };
pub const WeaponSpecialCarbine: eWeapon = .{ .bits = @as(DWORD, @intCast(3231910285)) };
pub const WeaponHeavyPistol: eWeapon = .{ .bits = @as(DWORD, @intCast(3523564046)) };
pub const WeaponBullpupRifle: eWeapon = .{ .bits = @as(DWORD, @intCast(2132975508)) };
pub const WeaponHomingLauncher: eWeapon = .{ .bits = @as(DWORD, @intCast(1672152130)) };
pub const WeaponProximityMine: eWeapon = .{ .bits = @as(DWORD, @intCast(2874559379)) };
pub const WeaponSnowball: eWeapon = .{ .bits = @as(DWORD, @intCast(126349499)) };
pub const WeaponVintagePistol: eWeapon = .{ .bits = @as(DWORD, @intCast(137902532)) };
pub const WeaponDagger: eWeapon = .{ .bits = @as(DWORD, @intCast(2460120199)) };
pub const WeaponFirework: eWeapon = .{ .bits = @as(DWORD, @intCast(2138347493)) };
pub const WeaponMusket: eWeapon = .{ .bits = @as(DWORD, @intCast(2828843422)) };
pub const WeaponMarksmanRifle: eWeapon = .{ .bits = @as(DWORD, @intCast(3342088282)) };
pub const WeaponHeavyShotgun: eWeapon = .{ .bits = @as(DWORD, @intCast(984333226)) };
pub const WeaponGusenberg: eWeapon = .{ .bits = @as(DWORD, @intCast(1627465347)) };
pub const WeaponHatchet: eWeapon = .{ .bits = @as(DWORD, @intCast(4191993645)) };
pub const WeaponRailgun: eWeapon = .{ .bits = @as(DWORD, @intCast(1834241177)) };
pub const WeaponUnarmed: eWeapon = .{ .bits = @as(DWORD, @intCast(2725352035)) };
};
pub const eWeaponGroup = extern struct {
bits: c_int = 0,
pub const WeaponGroupUnarmed: eWeaponGroup = .{ .bits = @as(DWORD, @intCast(2685387236)) };
pub const WeaponGroupMelee: eWeaponGroup = .{ .bits = @as(DWORD, @intCast(3566412244)) };
pub const WeaponGroupPistol: eWeaponGroup = .{ .bits = @as(DWORD, @intCast(416676503)) };
pub const WeaponGroupSMG: eWeaponGroup = .{ .bits = @as(DWORD, @intCast(3337201093)) };
pub const WeaponGroupAssaultRifle: eWeaponGroup = .{ .bits = @as(DWORD, @intCast(3352383570)) };
pub const WeaponGroupMG: eWeaponGroup = .{ .bits = @as(DWORD, @intCast(1159398588)) };
pub const WeaponGroupShotgun: eWeaponGroup = .{ .bits = @as(DWORD, @intCast(860033945)) };
pub const WeaponGroupSniper: eWeaponGroup = .{ .bits = @as(DWORD, @intCast(3082541095)) };
pub const WeaponGroupHeavy: eWeaponGroup = .{ .bits = @as(DWORD, @intCast(2725924767)) };
pub const WeaponGroupThrown: eWeaponGroup = .{ .bits = @as(DWORD, @intCast(1548507267)) };
pub const WeaponGroupPetrolCan: eWeaponGroup = .{ .bits = @as(DWORD, @intCast(1595662460)) };
};
pub const eWeaponTint = extern struct {
bits: c_int = 0,
pub const WeaponTintNormal: eWeaponTint = .{ .bits = @as(c_uint, @intCast(0)) };
pub const WeaponTintGreen: eWeaponTint = .{ .bits = @as(c_uint, @intCast(1)) };
pub const WeaponTintGold: eWeaponTint = .{ .bits = @as(c_uint, @intCast(2)) };
pub const WeaponTintPink: eWeaponTint = .{ .bits = @as(c_uint, @intCast(3)) };
pub const WeaponTintArmy: eWeaponTint = .{ .bits = @as(c_uint, @intCast(4)) };
pub const WeaponTintLSPD: eWeaponTint = .{ .bits = @as(c_uint, @intCast(5)) };
pub const WeaponTintOrange: eWeaponTint = .{ .bits = @as(c_uint, @intCast(6)) };
pub const WeaponTintPlatinum: eWeaponTint = .{ .bits = @as(c_uint, @intCast(7)) };
};
pub const ePickupType = extern struct {
bits: c_int = 0,
pub const PickupTypeCustomScript: ePickupType = .{ .bits = @as(DWORD, @intCast(738282662)) };
pub const PickupTypeVehicleCustomScript: ePickupType = .{ .bits = @as(DWORD, @intCast(2780351145)) };
pub const PickupTypeParachute: ePickupType = .{ .bits = @as(DWORD, @intCast(1735599485)) };
pub const PickupTypePortablePackage: ePickupType = .{ .bits = @as(DWORD, @intCast(2158727964)) };
pub const PickupTypePortableCrateUnfixed: ePickupType = .{ .bits = @as(DWORD, @intCast(1852930709)) };
pub const PickupTypeHealth: ePickupType = .{ .bits = @as(DWORD, @intCast(2406513688)) };
pub const PickupTypeHealthSnack: ePickupType = .{ .bits = @as(DWORD, @intCast(483577702)) };
pub const PickupTypeArmour: ePickupType = .{ .bits = @as(DWORD, @intCast(1274757841)) };
pub const PickupTypeMoneyCase: ePickupType = .{ .bits = @as(DWORD, @intCast(3463437675)) };
pub const PickupTypeMoneySecurityCase: ePickupType = .{ .bits = @as(DWORD, @intCast(3732468094)) };
pub const PickupTypeMoneyVariable: ePickupType = .{ .bits = @as(DWORD, @intCast(4263048111)) };
pub const PickupTypeMoneyMedBag: ePickupType = .{ .bits = @as(DWORD, @intCast(341217064)) };
pub const PickupTypeMoneyPurse: ePickupType = .{ .bits = @as(DWORD, @intCast(513448440)) };
pub const PickupTypeMoneyDepBag: ePickupType = .{ .bits = @as(DWORD, @intCast(545862290)) };
pub const PickupTypeMoneyWallet: ePickupType = .{ .bits = @as(DWORD, @intCast(1575005502)) };
pub const PickupTypeMoneyPaperBag: ePickupType = .{ .bits = @as(DWORD, @intCast(1897726628)) };
pub const PickupTypeWeaponPistol: ePickupType = .{ .bits = @as(DWORD, @intCast(4189041807)) };
pub const PickupTypeWeaponCombatPistol: ePickupType = .{ .bits = @as(DWORD, @intCast(2305275123)) };
pub const PickupTypeWeaponAPPistol: ePickupType = .{ .bits = @as(DWORD, @intCast(996550793)) };
pub const PickupTypeWeaponSNSPistol: ePickupType = .{ .bits = @as(DWORD, @intCast(3317114643)) };
pub const PickupTypeWeaponHeavyPistol: ePickupType = .{ .bits = @as(DWORD, @intCast(2633054488)) };
pub const PickupTypeWeaponMicroSMG: ePickupType = .{ .bits = @as(DWORD, @intCast(496339155)) };
pub const PickupTypeWeaponSMG: ePickupType = .{ .bits = @as(DWORD, @intCast(978070226)) };
pub const PickupTypeWeaponMG: ePickupType = .{ .bits = @as(DWORD, @intCast(2244651441)) };
pub const PickupTypeWeaponCombatMG: ePickupType = .{ .bits = @as(DWORD, @intCast(2995980820)) };
pub const PickupTypeWeaponAssaultRifle: ePickupType = .{ .bits = @as(DWORD, @intCast(4080829360)) };
pub const PickupTypeWeaponCarbineRifle: ePickupType = .{ .bits = @as(DWORD, @intCast(3748731225)) };
pub const PickupTypeWeaponAdvancedRifle: ePickupType = .{ .bits = @as(DWORD, @intCast(2998219358)) };
pub const PickupTypeWeaponSpecialCarbine: ePickupType = .{ .bits = @as(DWORD, @intCast(157823901)) };
pub const PickupTypeWeaponBullpupRifle: ePickupType = .{ .bits = @as(DWORD, @intCast(2170382056)) };
pub const PickupTypeWeaponPumpShotgun: ePickupType = .{ .bits = @as(DWORD, @intCast(2838846925)) };
pub const PickupTypeWeaponSawnoffShotgun: ePickupType = .{ .bits = @as(DWORD, @intCast(2528383651)) };
pub const PickupTypeWeaponAssaultShotgun: ePickupType = .{ .bits = @as(DWORD, @intCast(2459552091)) };
pub const PickupTypeWeaponSniperRifle: ePickupType = .{ .bits = @as(DWORD, @intCast(4264178988)) };
pub const PickupTypeWeaponHeavySniper: ePickupType = .{ .bits = @as(DWORD, @intCast(1765114797)) };
pub const PickupTypeWeaponGrenadeLauncher: ePickupType = .{ .bits = @as(DWORD, @intCast(779501861)) };
pub const PickupTypeWeaponRPG: ePickupType = .{ .bits = @as(DWORD, @intCast(1295434569)) };
pub const PickupTypeWeaponMinigun: ePickupType = .{ .bits = @as(DWORD, @intCast(792114228)) };
pub const PickupTypeWeaponGrenade: ePickupType = .{ .bits = @as(DWORD, @intCast(1577485217)) };
pub const PickupTypeWeaponStickyBomb: ePickupType = .{ .bits = @as(DWORD, @intCast(2081529176)) };
pub const PickupTypeWeaponSmokeGrenade: ePickupType = .{ .bits = @as(DWORD, @intCast(483787975)) };
pub const PickupTypeWeaponMolotov: ePickupType = .{ .bits = @as(DWORD, @intCast(768803961)) };
pub const PickupTypeWeaponPetrolCan: ePickupType = .{ .bits = @as(DWORD, @intCast(3332236287)) };
pub const PickupTypeWeaponKnife: ePickupType = .{ .bits = @as(DWORD, @intCast(663586612)) };
pub const PickupTypeWeaponNightstick: ePickupType = .{ .bits = @as(DWORD, @intCast(1587637620)) };
pub const PickupTypeWeaponBat: ePickupType = .{ .bits = @as(DWORD, @intCast(2179883038)) };
pub const PickupTypeWeaponCrowbar: ePickupType = .{ .bits = @as(DWORD, @intCast(2267924616)) };
pub const PickupTypeWeaponGolfclub: ePickupType = .{ .bits = @as(DWORD, @intCast(2297080999)) };
pub const PickupTypeWeaponBottle: ePickupType = .{ .bits = @as(DWORD, @intCast(4199656437)) };
pub const PickupTypeVehicleWeaponPistol: ePickupType = .{ .bits = @as(DWORD, @intCast(2773149623)) };
pub const PickupTypeVehicleWeaponCombatPistol: ePickupType = .{ .bits = @as(DWORD, @intCast(3500855031)) };
pub const PickupTypeVehicleWeaponAPPistol: ePickupType = .{ .bits = @as(DWORD, @intCast(3431676165)) };
pub const PickupTypeVehicleWeaponMicroSMG: ePickupType = .{ .bits = @as(DWORD, @intCast(3094015579)) };
pub const PickupTypeVehicleWeaponSawnoffShotgun: ePickupType = .{ .bits = @as(DWORD, @intCast(772217690)) };
pub const PickupTypeVehicleWeaponGrenade: ePickupType = .{ .bits = @as(DWORD, @intCast(2803366040)) };
pub const PickupTypeVehicleWeaponSmokeGrenade: ePickupType = .{ .bits = @as(DWORD, @intCast(1705498857)) };
pub const PickupTypeVehicleWeaponStickyBomb: ePickupType = .{ .bits = @as(DWORD, @intCast(746606563)) };
pub const PickupTypeVehicleWeaponMolotov: ePickupType = .{ .bits = @as(DWORD, @intCast(2228647636)) };
pub const PickupTypeVehicleHealth: ePickupType = .{ .bits = @as(DWORD, @intCast(160266735)) };
pub const PickupTypeAmmoPistol: ePickupType = .{ .bits = @as(DWORD, @intCast(544828034)) };
pub const PickupTypeAmmoSMG: ePickupType = .{ .bits = @as(DWORD, @intCast(292537574)) };
pub const PickupTypeAmmoMG: ePickupType = .{ .bits = @as(DWORD, @intCast(3730366643)) };
pub const PickupTypeAmmoRifle: ePickupType = .{ .bits = @as(DWORD, @intCast(3837603782)) };
pub const PickupTypeAmmoShotgun: ePickupType = .{ .bits = @as(DWORD, @intCast(2012476125)) };
pub const PickupTypeAmmoSniper: ePickupType = .{ .bits = @as(DWORD, @intCast(3224170789)) };
pub const PickupTypeAmmoGrenadeLauncher: ePickupType = .{ .bits = @as(DWORD, @intCast(2283450536)) };
pub const PickupTypeAmmoRPG: ePickupType = .{ .bits = @as(DWORD, @intCast(2223210455)) };
pub const PickupTypeAmmoMinigun: ePickupType = .{ .bits = @as(DWORD, @intCast(4065984953)) };
pub const PickupTypeAmmoMissileMP: ePickupType = .{ .bits = @as(DWORD, @intCast(4187887056)) };
pub const PickupTypeAmmoBulletMP: ePickupType = .{ .bits = @as(DWORD, @intCast(1426343849)) };
pub const PickupTypeAmmoGrenadeLauncherMP: ePickupType = .{ .bits = @as(DWORD, @intCast(2753668402)) };
};
pub const eHudComponent = extern struct {
bits: c_int = 0,
pub const HudComponentMain: eHudComponent = .{ .bits = @as(c_uint, @intCast(0)) };
pub const HudComponentWantedStars: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 1 };
pub const HudComponentWeaponIcon: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 2 };
pub const HudComponentCash: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 3 };
pub const HudComponentMpCash: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 4 };
pub const HudComponentMpMessage: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 5 };
pub const HudComponentVehicleName: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 6 };
pub const HudComponentAreaName: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 7 };
pub const HudComponentUnused: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 8 };
pub const HudComponentStreetName: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 9 };
pub const HudComponentHelpText: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 10 };
pub const HudComponentFloatingHelpText1: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 11 };
pub const HudComponentFloatingHelpText2: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 12 };
pub const HudComponentCashChange: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 13 };
pub const HudComponentReticle: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 14 };
pub const HudComponentSubtitleText: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 15 };
pub const HudComponentRadioStationsWheel: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 16 };
pub const HudComponentSaving: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 17 };
pub const HudComponentGameStreamUnused: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 18 };
pub const HudComponentWeaponWheel: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 19 };
pub const HudComponentWeaponWheelStats: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 20 };
pub const HudComponentDrugsPurse01: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 21 };
pub const HudComponentDrugsPurse02: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 22 };
pub const HudComponentDrugsPurse03: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 23 };
pub const HudComponentDrugsPurse04: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 24 };
pub const HudComponentMpTagCashFromBank: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 25 };
pub const HudComponentMpTagPackages: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 26 };
pub const HudComponentMpTagCuffKeys: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 27 };
pub const HudComponentMpTagDownloadData: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 28 };
pub const HudComponentMpTagIfPedFollowing: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 29 };
pub const HudComponentMpTagKeyCard: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 30 };
pub const HudComponentMpTagRandomObject: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 31 };
pub const HudComponentMpTagRemoteControl: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 32 };
pub const HudComponentMpTagCashFromSafe: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 33 };
pub const HudComponentMpTagWeaponsPackage: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 34 };
pub const HudComponentMpTagKeys: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 35 };
pub const HudComponentMpVehicle: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 36 };
pub const HudComponentMpVehicleHeli: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 37 };
pub const HudComponentMpVehiclePlane: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 38 };
pub const HudComponentPlayerSwitchAlert: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 39 };
pub const HudComponentMpRankBar: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 40 };
pub const HudComponentDirectorMode: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 41 };
pub const HudComponentReplayController: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 42 };
pub const HudComponentReplayMouse: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 43 };
pub const HudComponentReplayHeader: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 44 };
pub const HudComponentReplayOptions: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 45 };
pub const HudComponentReplayHelpText: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 46 };
pub const HudComponentReplayMiscText: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 47 };
pub const HudComponentReplayTopLine: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 48 };
pub const HudComponentReplayBottomLine: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 49 };
pub const HudComponentReplayLeftBar: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 50 };
pub const HudComponentReplayTimer: eHudComponent = .{ .bits = eHudComponent.HudComponentMain.bits + 51 };
};
|
0 | repos/ScriptHookVZig | repos/ScriptHookVZig/docs/main.js | (function() {
const CAT_namespace = 0;
const CAT_global_variable = 1;
const CAT_function = 2;
const CAT_primitive = 3;
const CAT_error_set = 4;
const CAT_global_const = 5;
const CAT_alias = 6;
const CAT_type = 7;
const CAT_type_type = 8;
const CAT_type_function = 9;
const domDocTestsCode = document.getElementById("docTestsCode");
const domFnErrorsAnyError = document.getElementById("fnErrorsAnyError");
const domFnProto = document.getElementById("fnProto");
const domFnProtoCode = document.getElementById("fnProtoCode");
const domHdrName = document.getElementById("hdrName");
const domHelpModal = document.getElementById("helpDialog");
const domListErrSets = document.getElementById("listErrSets");
const domListFields = document.getElementById("listFields");
const domListParams = document.getElementById("listParams");
const domListFnErrors = document.getElementById("listFnErrors");
const domListFns = document.getElementById("listFns");
const domListGlobalVars = document.getElementById("listGlobalVars");
const domListInfo = document.getElementById("listInfo");
const domListNamespaces = document.getElementById("listNamespaces");
const domListNav = document.getElementById("listNav");
const domListSearchResults = document.getElementById("listSearchResults");
const domListTypes = document.getElementById("listTypes");
const domListValues = document.getElementById("listValues");
const domSearch = document.getElementById("search");
const domSectDocTests = document.getElementById("sectDocTests");
const domSectErrSets = document.getElementById("sectErrSets");
const domSectFields = document.getElementById("sectFields");
const domSectParams = document.getElementById("sectParams");
const domSectFnErrors = document.getElementById("sectFnErrors");
const domSectFns = document.getElementById("sectFns");
const domSectGlobalVars = document.getElementById("sectGlobalVars");
const domSectNamespaces = document.getElementById("sectNamespaces");
const domSectNav = document.getElementById("sectNav");
const domSectSearchNoResults = document.getElementById("sectSearchNoResults");
const domSectSearchResults = document.getElementById("sectSearchResults");
const domSectSource = document.getElementById("sectSource");
const domSectTypes = document.getElementById("sectTypes");
const domSectValues = document.getElementById("sectValues");
const domSourceText = document.getElementById("sourceText");
const domStatus = document.getElementById("status");
const domTableFnErrors = document.getElementById("tableFnErrors");
const domTldDocs = document.getElementById("tldDocs");
var searchTimer = null;
const curNav = {
// 0 = home
// 1 = decl (decl)
// 2 = source (path)
tag: 0,
// unsigned int: decl index
decl: null,
// string file name matching tarball path
path: null,
// when this is populated, pressing the "view source" command will
// navigate to this hash.
viewSourceHash: null,
};
var curNavSearch = "";
var curSearchIndex = -1;
var imFeelingLucky = false;
// names of modules in the same order as wasm
const moduleList = [];
let wasm_promise = fetch("main.wasm");
let sources_promise = fetch("sources.tar").then(function(response) {
if (!response.ok) throw new Error("unable to download sources");
return response.arrayBuffer();
});
var wasm_exports = null;
const text_decoder = new TextDecoder();
const text_encoder = new TextEncoder();
WebAssembly.instantiateStreaming(wasm_promise, {
js: {
log: function(ptr, len) {
const msg = decodeString(ptr, len);
console.log(msg);
},
panic: function (ptr, len) {
const msg = decodeString(ptr, len);
throw new Error("panic: " + msg);
},
},
}).then(function(obj) {
wasm_exports = obj.instance.exports;
window.wasm = obj; // for debugging
sources_promise.then(function(buffer) {
const js_array = new Uint8Array(buffer);
const ptr = wasm_exports.alloc(js_array.length);
const wasm_array = new Uint8Array(wasm_exports.memory.buffer, ptr, js_array.length);
wasm_array.set(js_array);
wasm_exports.unpack(ptr, js_array.length);
updateModuleList();
window.addEventListener('popstate', onPopState, false);
domSearch.addEventListener('keydown', onSearchKeyDown, false);
domSearch.addEventListener('input', onSearchChange, false);
window.addEventListener('keydown', onWindowKeyDown, false);
onHashChange(null);
});
});
function renderTitle() {
const suffix = " - Zig Documentation";
if (curNavSearch.length > 0) {
document.title = curNavSearch + " - Search" + suffix;
} else if (curNav.decl != null) {
document.title = fullyQualifiedName(curNav.decl) + suffix;
} else if (curNav.path != null) {
document.title = curNav.path + suffix;
} else {
document.title = moduleList[0] + suffix; // Home
}
}
function render() {
domFnErrorsAnyError.classList.add("hidden");
domFnProto.classList.add("hidden");
domHdrName.classList.add("hidden");
domHelpModal.classList.add("hidden");
domSectErrSets.classList.add("hidden");
domSectDocTests.classList.add("hidden");
domSectFields.classList.add("hidden");
domSectParams.classList.add("hidden");
domSectFnErrors.classList.add("hidden");
domSectFns.classList.add("hidden");
domSectGlobalVars.classList.add("hidden");
domSectNamespaces.classList.add("hidden");
domSectNav.classList.add("hidden");
domSectSearchNoResults.classList.add("hidden");
domSectSearchResults.classList.add("hidden");
domSectSource.classList.add("hidden");
domSectTypes.classList.add("hidden");
domSectValues.classList.add("hidden");
domStatus.classList.add("hidden");
domTableFnErrors.classList.add("hidden");
domTldDocs.classList.add("hidden");
renderTitle();
if (curNavSearch !== "") return renderSearch();
switch (curNav.tag) {
case 0: return renderHome();
case 1:
if (curNav.decl == null) {
return renderNotFound();
} else {
return renderDecl(curNav.decl);
}
case 2: return renderSource(curNav.path);
default: throw new Error("invalid navigation state");
}
}
function renderHome() {
if (moduleList.length == 0) {
domStatus.textContent = "sources.tar contains no modules";
domStatus.classList.remove("hidden");
return;
}
return renderModule(0);
}
function renderModule(pkg_index) {
const root_decl = wasm_exports.find_module_root(pkg_index);
return renderDecl(root_decl);
}
function renderDecl(decl_index) {
const category = wasm_exports.categorize_decl(decl_index, 0);
switch (category) {
case CAT_namespace:
return renderNamespacePage(decl_index);
case CAT_global_variable:
case CAT_primitive:
case CAT_global_const:
case CAT_type:
case CAT_type_type:
return renderGlobal(decl_index);
case CAT_function:
return renderFunction(decl_index);
case CAT_type_function:
return renderTypeFunction(decl_index);
case CAT_error_set:
return renderErrorSetPage(decl_index);
case CAT_alias:
return renderDecl(wasm_exports.get_aliasee());
default:
throw new Error("unrecognized category " + category);
}
}
function renderSource(path) {
const decl_index = findFileRoot(path);
if (decl_index == null) return renderNotFound();
renderNavFancy(decl_index, [{
name: "[src]",
href: location.hash,
}]);
domSourceText.innerHTML = declSourceHtml(decl_index);
domSectSource.classList.remove("hidden");
}
function renderDeclHeading(decl_index) {
curNav.viewSourceHash = "#src/" + unwrapString(wasm_exports.decl_file_path(decl_index));
const hdrNameSpan = domHdrName.children[0];
const srcLink = domHdrName.children[1];
hdrNameSpan.innerText = unwrapString(wasm_exports.decl_category_name(decl_index));
srcLink.setAttribute('href', curNav.viewSourceHash);
domHdrName.classList.remove("hidden");
renderTopLevelDocs(decl_index);
}
function renderTopLevelDocs(decl_index) {
const tld_docs_html = unwrapString(wasm_exports.decl_docs_html(decl_index, false));
if (tld_docs_html.length > 0) {
domTldDocs.innerHTML = tld_docs_html;
domTldDocs.classList.remove("hidden");
}
}
function renderNav(cur_nav_decl, list) {
return renderNavFancy(cur_nav_decl, []);
}
function renderNavFancy(cur_nav_decl, list) {
{
// First, walk backwards the decl parents within a file.
let decl_it = cur_nav_decl;
let prev_decl_it = null;
while (decl_it != null) {
list.push({
name: declIndexName(decl_it),
href: navLinkDeclIndex(decl_it),
});
prev_decl_it = decl_it;
decl_it = declParent(decl_it);
}
// Next, walk backwards the file path segments.
if (prev_decl_it != null) {
const file_path = fullyQualifiedName(prev_decl_it);
const parts = file_path.split(".");
parts.pop(); // skip last
for (;;) {
const href = navLinkFqn(parts.join("."));
const part = parts.pop();
if (!part) break;
list.push({
name: part,
href: href,
});
}
}
list.reverse();
}
resizeDomList(domListNav, list.length, '<li><a href="#"></a></li>');
for (let i = 0; i < list.length; i += 1) {
const liDom = domListNav.children[i];
const aDom = liDom.children[0];
aDom.textContent = list[i].name;
aDom.setAttribute('href', list[i].href);
if (i + 1 == list.length) {
aDom.classList.add("active");
} else {
aDom.classList.remove("active");
}
}
domSectNav.classList.remove("hidden");
}
function renderNotFound() {
domStatus.textContent = "Declaration not found.";
domStatus.classList.remove("hidden");
}
function navLinkFqn(full_name) {
return '#' + full_name;
}
function navLinkDeclIndex(decl_index) {
return navLinkFqn(fullyQualifiedName(decl_index));
}
function resizeDomList(listDom, desiredLen, templateHtml) {
// add the missing dom entries
var i, ev;
for (i = listDom.childElementCount; i < desiredLen; i += 1) {
listDom.insertAdjacentHTML('beforeend', templateHtml);
}
// remove extra dom entries
while (desiredLen < listDom.childElementCount) {
listDom.removeChild(listDom.lastChild);
}
}
function renderErrorSetPage(decl_index) {
renderNav(decl_index);
renderDeclHeading(decl_index);
const errorSetList = declErrorSet(decl_index).slice();
renderErrorSet(decl_index, errorSetList);
}
function renderErrorSet(base_decl, errorSetList) {
if (errorSetList == null) {
domFnErrorsAnyError.classList.remove("hidden");
} else {
resizeDomList(domListFnErrors, errorSetList.length, '<div></div>');
for (let i = 0; i < errorSetList.length; i += 1) {
const divDom = domListFnErrors.children[i];
const html = unwrapString(wasm_exports.error_html(base_decl, errorSetList[i]));
divDom.innerHTML = html;
}
domTableFnErrors.classList.remove("hidden");
}
domSectFnErrors.classList.remove("hidden");
}
function renderParams(decl_index) {
// Prevent params from being emptied next time wasm calls memory.grow.
const params = declParams(decl_index).slice();
if (params.length !== 0) {
resizeDomList(domListParams, params.length, '<div></div>');
for (let i = 0; i < params.length; i += 1) {
const divDom = domListParams.children[i];
divDom.innerHTML = unwrapString(wasm_exports.decl_param_html(decl_index, params[i]));
}
domSectParams.classList.remove("hidden");
}
}
function renderTypeFunction(decl_index) {
renderNav(decl_index);
renderDeclHeading(decl_index);
renderTopLevelDocs(decl_index);
renderParams(decl_index);
renderDocTests(decl_index);
const members = unwrapSlice32(wasm_exports.type_fn_members(decl_index, false)).slice();
const fields = unwrapSlice32(wasm_exports.type_fn_fields(decl_index)).slice();
if (members.length !== 0 || fields.length !== 0) {
renderNamespace(decl_index, members, fields);
} else {
domSourceText.innerHTML = declSourceHtml(decl_index);
domSectSource.classList.remove("hidden");
}
}
function renderDocTests(decl_index) {
const doctest_html = declDoctestHtml(decl_index);
if (doctest_html.length > 0) {
domDocTestsCode.innerHTML = doctest_html;
domSectDocTests.classList.remove("hidden");
}
}
function renderFunction(decl_index) {
renderNav(decl_index);
renderDeclHeading(decl_index);
renderTopLevelDocs(decl_index);
renderParams(decl_index);
renderDocTests(decl_index);
domFnProtoCode.innerHTML = fnProtoHtml(decl_index, false);
domFnProto.classList.remove("hidden");
const errorSetNode = fnErrorSet(decl_index);
if (errorSetNode != null) {
const base_decl = wasm_exports.fn_error_set_decl(decl_index, errorSetNode);
renderErrorSet(base_decl, errorSetNodeList(decl_index, errorSetNode));
}
domSourceText.innerHTML = declSourceHtml(decl_index);
domSectSource.classList.remove("hidden");
}
function renderGlobal(decl_index) {
renderNav(decl_index);
renderDeclHeading(decl_index);
const docs_html = declDocsHtmlShort(decl_index);
if (docs_html.length > 0) {
domTldDocs.innerHTML = docs_html;
domTldDocs.classList.remove("hidden");
}
domSourceText.innerHTML = declSourceHtml(decl_index);
domSectSource.classList.remove("hidden");
}
function renderNamespace(base_decl, members, fields) {
const typesList = [];
const namespacesList = [];
const errSetsList = [];
const fnsList = [];
const varsList = [];
const valsList = [];
member_loop: for (let i = 0; i < members.length; i += 1) {
let member = members[i];
const original = member;
while (true) {
const member_category = wasm_exports.categorize_decl(member, 0);
switch (member_category) {
case CAT_namespace:
if (wasm_exports.decl_field_count(member) > 0) {
typesList.push({original: original, member: member});
} else {
namespacesList.push({original: original, member: member});
}
continue member_loop;
case CAT_namespace:
namespacesList.push({original: original, member: member});
continue member_loop;
case CAT_global_variable:
varsList.push(member);
continue member_loop;
case CAT_function:
fnsList.push(member);
continue member_loop;
case CAT_type:
case CAT_type_type:
case CAT_type_function:
typesList.push({original: original, member: member});
continue member_loop;
case CAT_error_set:
errSetsList.push({original: original, member: member});
continue member_loop;
case CAT_global_const:
case CAT_primitive:
valsList.push({original: original, member: member});
continue member_loop;
case CAT_alias:
member = wasm_exports.get_aliasee();
continue;
default:
throw new Error("uknown category: " + member_category);
}
}
}
typesList.sort(byDeclIndexName2);
namespacesList.sort(byDeclIndexName2);
errSetsList.sort(byDeclIndexName2);
fnsList.sort(byDeclIndexName);
varsList.sort(byDeclIndexName);
valsList.sort(byDeclIndexName2);
if (typesList.length !== 0) {
resizeDomList(domListTypes, typesList.length, '<li><a href="#"></a></li>');
for (let i = 0; i < typesList.length; i += 1) {
const liDom = domListTypes.children[i];
const aDom = liDom.children[0];
const original_decl = typesList[i].original;
const decl = typesList[i].member;
aDom.textContent = declIndexName(original_decl);
aDom.setAttribute('href', navLinkDeclIndex(decl));
}
domSectTypes.classList.remove("hidden");
}
if (namespacesList.length !== 0) {
resizeDomList(domListNamespaces, namespacesList.length, '<li><a href="#"></a></li>');
for (let i = 0; i < namespacesList.length; i += 1) {
const liDom = domListNamespaces.children[i];
const aDom = liDom.children[0];
const original_decl = namespacesList[i].original;
const decl = namespacesList[i].member;
aDom.textContent = declIndexName(original_decl);
aDom.setAttribute('href', navLinkDeclIndex(decl));
}
domSectNamespaces.classList.remove("hidden");
}
if (errSetsList.length !== 0) {
resizeDomList(domListErrSets, errSetsList.length, '<li><a href="#"></a></li>');
for (let i = 0; i < errSetsList.length; i += 1) {
const liDom = domListErrSets.children[i];
const aDom = liDom.children[0];
const original_decl = errSetsList[i].original;
const decl = errSetsList[i].member;
aDom.textContent = declIndexName(original_decl);
aDom.setAttribute('href', navLinkDeclIndex(decl));
}
domSectErrSets.classList.remove("hidden");
}
if (fnsList.length !== 0) {
resizeDomList(domListFns, fnsList.length,
'<div><dt><code></code></dt><dd></dd></div>');
for (let i = 0; i < fnsList.length; i += 1) {
const decl = fnsList[i];
const divDom = domListFns.children[i];
const dtDom = divDom.children[0];
const ddDocs = divDom.children[1];
const protoCodeDom = dtDom.children[0];
protoCodeDom.innerHTML = fnProtoHtml(decl, true);
ddDocs.innerHTML = declDocsHtmlShort(decl);
}
domSectFns.classList.remove("hidden");
}
if (fields.length !== 0) {
resizeDomList(domListFields, fields.length, '<div></div>');
for (let i = 0; i < fields.length; i += 1) {
const divDom = domListFields.children[i];
divDom.innerHTML = unwrapString(wasm_exports.decl_field_html(base_decl, fields[i]));
}
domSectFields.classList.remove("hidden");
}
if (varsList.length !== 0) {
resizeDomList(domListGlobalVars, varsList.length,
'<tr><td><a href="#"></a></td><td></td><td></td></tr>');
for (let i = 0; i < varsList.length; i += 1) {
const decl = varsList[i];
const trDom = domListGlobalVars.children[i];
const tdName = trDom.children[0];
const tdNameA = tdName.children[0];
const tdType = trDom.children[1];
const tdDesc = trDom.children[2];
tdNameA.setAttribute('href', navLinkDeclIndex(decl));
tdNameA.textContent = declIndexName(decl);
tdType.innerHTML = declTypeHtml(decl);
tdDesc.innerHTML = declDocsHtmlShort(decl);
}
domSectGlobalVars.classList.remove("hidden");
}
if (valsList.length !== 0) {
resizeDomList(domListValues, valsList.length,
'<tr><td><a href="#"></a></td><td></td><td></td></tr>');
for (let i = 0; i < valsList.length; i += 1) {
const trDom = domListValues.children[i];
const tdName = trDom.children[0];
const tdNameA = tdName.children[0];
const tdType = trDom.children[1];
const tdDesc = trDom.children[2];
const original_decl = valsList[i].original;
const decl = valsList[i].member;
tdNameA.setAttribute('href', navLinkDeclIndex(decl));
tdNameA.textContent = declIndexName(original_decl);
tdType.innerHTML = declTypeHtml(decl);
tdDesc.innerHTML = declDocsHtmlShort(decl);
}
domSectValues.classList.remove("hidden");
}
}
function renderNamespacePage(decl_index) {
renderNav(decl_index);
renderDeclHeading(decl_index);
const members = namespaceMembers(decl_index, false).slice();
const fields = declFields(decl_index).slice();
renderNamespace(decl_index, members, fields);
}
function operatorCompare(a, b) {
if (a === b) {
return 0;
} else if (a < b) {
return -1;
} else {
return 1;
}
}
function updateCurNav(location_hash) {
curNav.tag = 0;
curNav.decl = null;
curNav.path = null;
curNav.viewSourceHash = null;
curNavSearch = "";
if (location_hash.length > 1 && location_hash[0] === '#') {
const query = location_hash.substring(1);
const qpos = query.indexOf("?");
let nonSearchPart;
if (qpos === -1) {
nonSearchPart = query;
} else {
nonSearchPart = query.substring(0, qpos);
curNavSearch = decodeURIComponent(query.substring(qpos + 1));
}
if (nonSearchPart.length > 0) {
const source_mode = nonSearchPart.startsWith("src/");
if (source_mode) {
curNav.tag = 2;
curNav.path = nonSearchPart.substring(4);
} else {
curNav.tag = 1;
curNav.decl = findDecl(nonSearchPart);
}
}
}
}
function onHashChange(state) {
history.replaceState({}, "");
navigate(location.hash);
if (state == null) window.scrollTo({top: 0});
}
function onPopState(ev) {
onHashChange(ev.state);
}
function navigate(location_hash) {
updateCurNav(location_hash);
if (domSearch.value !== curNavSearch) {
domSearch.value = curNavSearch;
}
render();
if (imFeelingLucky) {
imFeelingLucky = false;
activateSelectedResult();
}
}
function activateSelectedResult() {
if (domSectSearchResults.classList.contains("hidden")) {
return;
}
var liDom = domListSearchResults.children[curSearchIndex];
if (liDom == null && domListSearchResults.children.length !== 0) {
liDom = domListSearchResults.children[0];
}
if (liDom != null) {
var aDom = liDom.children[0];
location.href = aDom.getAttribute("href");
curSearchIndex = -1;
}
domSearch.blur();
}
function onSearchKeyDown(ev) {
switch (ev.code) {
case "Enter":
if (ev.shiftKey || ev.ctrlKey || ev.altKey) return;
clearAsyncSearch();
imFeelingLucky = true;
location.hash = computeSearchHash();
ev.preventDefault();
ev.stopPropagation();
return;
case "Escape":
if (ev.shiftKey || ev.ctrlKey || ev.altKey) return;
domSearch.value = "";
domSearch.blur();
curSearchIndex = -1;
ev.preventDefault();
ev.stopPropagation();
startSearch();
return;
case "ArrowUp":
if (ev.shiftKey || ev.ctrlKey || ev.altKey) return;
moveSearchCursor(-1);
ev.preventDefault();
ev.stopPropagation();
return;
case "ArrowDown":
if (ev.shiftKey || ev.ctrlKey || ev.altKey) return;
moveSearchCursor(1);
ev.preventDefault();
ev.stopPropagation();
return;
default:
ev.stopPropagation(); // prevent keyboard shortcuts
return;
}
}
function onSearchChange(ev) {
curSearchIndex = -1;
startAsyncSearch();
}
function moveSearchCursor(dir) {
if (curSearchIndex < 0 || curSearchIndex >= domListSearchResults.children.length) {
if (dir > 0) {
curSearchIndex = -1 + dir;
} else if (dir < 0) {
curSearchIndex = domListSearchResults.children.length + dir;
}
} else {
curSearchIndex += dir;
}
if (curSearchIndex < 0) {
curSearchIndex = 0;
}
if (curSearchIndex >= domListSearchResults.children.length) {
curSearchIndex = domListSearchResults.children.length - 1;
}
renderSearchCursor();
}
function onWindowKeyDown(ev) {
switch (ev.code) {
case "Escape":
if (ev.shiftKey || ev.ctrlKey || ev.altKey) return;
if (!domHelpModal.classList.contains("hidden")) {
domHelpModal.classList.add("hidden");
ev.preventDefault();
ev.stopPropagation();
}
break;
case "KeyS":
if (ev.shiftKey || ev.ctrlKey || ev.altKey) return;
domSearch.focus();
domSearch.select();
ev.preventDefault();
ev.stopPropagation();
startAsyncSearch();
break;
case "KeyU":
if (ev.shiftKey || ev.ctrlKey || ev.altKey) return;
ev.preventDefault();
ev.stopPropagation();
navigateToSource();
break;
case "Slash":
if (!ev.shiftKey || ev.ctrlKey || ev.altKey) return;
ev.preventDefault();
ev.stopPropagation();
showHelpModal();
break;
}
}
function showHelpModal() {
domHelpModal.classList.remove("hidden");
domHelpModal.style.left = (window.innerWidth / 2 - domHelpModal.clientWidth / 2) + "px";
domHelpModal.style.top = (window.innerHeight / 2 - domHelpModal.clientHeight / 2) + "px";
domHelpModal.focus();
}
function navigateToSource() {
if (curNav.viewSourceHash != null) {
location.hash = curNav.viewSourceHash;
}
}
function clearAsyncSearch() {
if (searchTimer != null) {
clearTimeout(searchTimer);
searchTimer = null;
}
}
function startAsyncSearch() {
clearAsyncSearch();
searchTimer = setTimeout(startSearch, 10);
}
function computeSearchHash() {
// How location.hash works:
// 1. http://example.com/ => ""
// 2. http://example.com/# => ""
// 3. http://example.com/#foo => "#foo"
// wat
const oldWatHash = location.hash;
const oldHash = oldWatHash.startsWith("#") ? oldWatHash : "#" + oldWatHash;
const parts = oldHash.split("?");
const newPart2 = (domSearch.value === "") ? "" : ("?" + domSearch.value);
return parts[0] + newPart2;
}
function startSearch() {
clearAsyncSearch();
navigate(computeSearchHash());
}
function renderSearch() {
renderNav(curNav.decl);
const ignoreCase = (curNavSearch.toLowerCase() === curNavSearch);
const results = executeQuery(curNavSearch, ignoreCase);
if (results.length !== 0) {
resizeDomList(domListSearchResults, results.length, '<li><a href="#"></a></li>');
for (let i = 0; i < results.length; i += 1) {
const liDom = domListSearchResults.children[i];
const aDom = liDom.children[0];
const match = results[i];
const full_name = fullyQualifiedName(match);
aDom.textContent = full_name;
aDom.setAttribute('href', navLinkFqn(full_name));
}
renderSearchCursor();
domSectSearchResults.classList.remove("hidden");
} else {
domSectSearchNoResults.classList.remove("hidden");
}
}
function renderSearchCursor() {
for (let i = 0; i < domListSearchResults.children.length; i += 1) {
var liDom = domListSearchResults.children[i];
if (curSearchIndex === i) {
liDom.classList.add("selected");
} else {
liDom.classList.remove("selected");
}
}
}
function updateModuleList() {
moduleList.length = 0;
for (let i = 0;; i += 1) {
const name = unwrapString(wasm_exports.module_name(i));
if (name.length == 0) break;
moduleList.push(name);
}
}
function byDeclIndexName(a, b) {
const a_name = declIndexName(a);
const b_name = declIndexName(b);
return operatorCompare(a_name, b_name);
}
function byDeclIndexName2(a, b) {
const a_name = declIndexName(a.original);
const b_name = declIndexName(b.original);
return operatorCompare(a_name, b_name);
}
function decodeString(ptr, len) {
if (len === 0) return "";
return text_decoder.decode(new Uint8Array(wasm_exports.memory.buffer, ptr, len));
}
function unwrapString(bigint) {
const ptr = Number(bigint & 0xffffffffn);
const len = Number(bigint >> 32n);
return decodeString(ptr, len);
}
function declTypeHtml(decl_index) {
return unwrapString(wasm_exports.decl_type_html(decl_index));
}
function declDocsHtmlShort(decl_index) {
return unwrapString(wasm_exports.decl_docs_html(decl_index, true));
}
function fullyQualifiedName(decl_index) {
return unwrapString(wasm_exports.decl_fqn(decl_index));
}
function declIndexName(decl_index) {
return unwrapString(wasm_exports.decl_name(decl_index));
}
function declSourceHtml(decl_index) {
return unwrapString(wasm_exports.decl_source_html(decl_index));
}
function declDoctestHtml(decl_index) {
return unwrapString(wasm_exports.decl_doctest_html(decl_index));
}
function fnProtoHtml(decl_index, linkify_fn_name) {
return unwrapString(wasm_exports.decl_fn_proto_html(decl_index, linkify_fn_name));
}
function setQueryString(s) {
const jsArray = text_encoder.encode(s);
const len = jsArray.length;
const ptr = wasm_exports.query_begin(len);
const wasmArray = new Uint8Array(wasm_exports.memory.buffer, ptr, len);
wasmArray.set(jsArray);
}
function executeQuery(query_string, ignore_case) {
setQueryString(query_string);
const ptr = wasm_exports.query_exec(ignore_case);
const head = new Uint32Array(wasm_exports.memory.buffer, ptr, 1);
const len = head[0];
return new Uint32Array(wasm_exports.memory.buffer, ptr + 4, len);
}
function namespaceMembers(decl_index, include_private) {
return unwrapSlice32(wasm_exports.namespace_members(decl_index, include_private));
}
function declFields(decl_index) {
return unwrapSlice32(wasm_exports.decl_fields(decl_index));
}
function declParams(decl_index) {
return unwrapSlice32(wasm_exports.decl_params(decl_index));
}
function declErrorSet(decl_index) {
return unwrapSlice64(wasm_exports.decl_error_set(decl_index));
}
function errorSetNodeList(base_decl, err_set_node) {
return unwrapSlice64(wasm_exports.error_set_node_list(base_decl, err_set_node));
}
function unwrapSlice32(bigint) {
const ptr = Number(bigint & 0xffffffffn);
const len = Number(bigint >> 32n);
if (len === 0) return [];
return new Uint32Array(wasm_exports.memory.buffer, ptr, len);
}
function unwrapSlice64(bigint) {
const ptr = Number(bigint & 0xffffffffn);
const len = Number(bigint >> 32n);
if (len === 0) return [];
return new BigUint64Array(wasm_exports.memory.buffer, ptr, len);
}
function findDecl(fqn) {
setInputString(fqn);
const result = wasm_exports.find_decl();
if (result === -1) return null;
return result;
}
function findFileRoot(path) {
setInputString(path);
const result = wasm_exports.find_file_root();
if (result === -1) return null;
return result;
}
function declParent(decl_index) {
const result = wasm_exports.decl_parent(decl_index);
if (result === -1) return null;
return result;
}
function fnErrorSet(decl_index) {
const result = wasm_exports.fn_error_set(decl_index);
if (result === 0) return null;
return result;
}
function setInputString(s) {
const jsArray = text_encoder.encode(s);
const len = jsArray.length;
const ptr = wasm_exports.set_input_string(len);
const wasmArray = new Uint8Array(wasm_exports.memory.buffer, ptr, len);
wasmArray.set(jsArray);
}
})();
|
0 | repos/ScriptHookVZig | repos/ScriptHookVZig/docs/index.html | <!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Zig Documentation</title>
<link rel="icon" href="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNTMgMTQwIj48ZyBmaWxsPSIjRjdBNDFEIj48Zz48cG9seWdvbiBwb2ludHM9IjQ2LDIyIDI4LDQ0IDE5LDMwIi8+PHBvbHlnb24gcG9pbnRzPSI0NiwyMiAzMywzMyAyOCw0NCAyMiw0NCAyMiw5NSAzMSw5NSAyMCwxMDAgMTIsMTE3IDAsMTE3IDAsMjIiIHNoYXBlLXJlbmRlcmluZz0iY3Jpc3BFZGdlcyIvPjxwb2x5Z29uIHBvaW50cz0iMzEsOTUgMTIsMTE3IDQsMTA2Ii8+PC9nPjxnPjxwb2x5Z29uIHBvaW50cz0iNTYsMjIgNjIsMzYgMzcsNDQiLz48cG9seWdvbiBwb2ludHM9IjU2LDIyIDExMSwyMiAxMTEsNDQgMzcsNDQgNTYsMzIiIHNoYXBlLXJlbmRlcmluZz0iY3Jpc3BFZGdlcyIvPjxwb2x5Z29uIHBvaW50cz0iMTE2LDk1IDk3LDExNyA5MCwxMDQiLz48cG9seWdvbiBwb2ludHM9IjExNiw5NSAxMDAsMTA0IDk3LDExNyA0MiwxMTcgNDIsOTUiIHNoYXBlLXJlbmRlcmluZz0iY3Jpc3BFZGdlcyIvPjxwb2x5Z29uIHBvaW50cz0iMTUwLDAgNTIsMTE3IDMsMTQwIDEwMSwyMiIvPjwvZz48Zz48cG9seWdvbiBwb2ludHM9IjE0MSwyMiAxNDAsNDAgMTIyLDQ1Ii8+PHBvbHlnb24gcG9pbnRzPSIxNTMsMjIgMTUzLDExNyAxMDYsMTE3IDEyMCwxMDUgMTI1LDk1IDEzMSw5NSAxMzEsNDUgMTIyLDQ1IDEzMiwzNiAxNDEsMjIiIHNoYXBlLXJlbmRlcmluZz0iY3Jpc3BFZGdlcyIvPjxwb2x5Z29uIHBvaW50cz0iMTI1LDk1IDEzMCwxMTAgMTA2LDExNyIvPjwvZz48L2c+PC9zdmc+">
<style type="text/css">
body {
font-family: system-ui, -apple-system, Roboto, "Segoe UI", sans-serif;
color: #000000;
}
.hidden {
display: none;
}
table {
width: 100%;
}
a {
color: #2A6286;
}
pre{
font-family:"Source Code Pro",monospace;
font-size:1em;
background-color:#F5F5F5;
padding: 1em;
margin: 0;
overflow-x: auto;
}
code {
font-family:"Source Code Pro",monospace;
font-size: 0.9em;
}
code a {
color: #000000;
}
#listFields > div, #listParams > div {
margin-bottom: 1em;
}
#hdrName a {
font-size: 0.7em;
padding-left: 1em;
}
.fieldDocs {
border: 1px solid #F5F5F5;
border-top: 0px;
padding: 1px 1em;
}
#logo {
width: 8em;
padding: 0.5em 1em;
}
#navWrap {
width: -moz-available;
width: -webkit-fill-available;
width: stretch;
margin-left: 11em;
}
#search {
width: 100%;
}
nav {
width: 10em;
float: left;
}
nav h2 {
font-size: 1.2em;
text-decoration: underline;
margin: 0;
padding: 0.5em 0;
text-align: center;
}
nav p {
margin: 0;
padding: 0;
text-align: center;
}
section {
clear: both;
padding-top: 1em;
}
section h1 {
border-bottom: 1px dashed;
margin: 0 0;
}
section h2 {
font-size: 1.3em;
margin: 0.5em 0;
padding: 0;
border-bottom: 1px solid;
}
#listNav {
list-style-type: none;
margin: 0.5em 0 0 0;
padding: 0;
overflow: hidden;
background-color: #f1f1f1;
}
#listNav li {
float:left;
}
#listNav li a {
display: block;
color: #000;
text-align: center;
padding: .5em .8em;
text-decoration: none;
}
#listNav li a:hover {
background-color: #555;
color: #fff;
}
#listNav li a.active {
background-color: #FFBB4D;
color: #000;
}
#helpDialog {
width: 21em;
height: 21em;
position: fixed;
top: 0;
left: 0;
background-color: #333;
color: #fff;
border: 1px solid #fff;
}
#helpDialog h1 {
text-align: center;
font-size: 1.5em;
}
#helpDialog dt, #helpDialog dd {
display: inline;
margin: 0 0.2em;
}
kbd {
color: #000;
background-color: #fafbfc;
border-color: #d1d5da;
border-bottom-color: #c6cbd1;
box-shadow-color: #c6cbd1;
display: inline-block;
padding: 0.3em 0.2em;
font: 1.2em monospace;
line-height: 0.8em;
vertical-align: middle;
border: solid 1px;
border-radius: 3px;
box-shadow: inset 0 -1px 0;
cursor: default;
}
#listSearchResults li.selected {
background-color: #93e196;
}
#tableFnErrors dt {
font-weight: bold;
}
dl > div {
padding: 0.5em;
border: 1px solid #c0c0c0;
margin-top: 0.5em;
}
td, th {
text-align: unset;
vertical-align: top;
margin: 0;
padding: 0.5em;
max-width: 20em;
text-overflow: ellipsis;
overflow-x: hidden;
}
ul.columns {
column-width: 20em;
}
.tok-kw {
color: #333;
font-weight: bold;
}
.tok-str {
color: #d14;
}
.tok-builtin {
color: #0086b3;
}
.tok-comment {
color: #777;
font-style: italic;
}
.tok-fn {
color: #900;
font-weight: bold;
}
.tok-null {
color: #008080;
}
.tok-number {
color: #008080;
}
.tok-type {
color: #458;
font-weight: bold;
}
@media (prefers-color-scheme: dark) {
body {
background-color: #111;
color: #bbb;
}
pre {
background-color: #222;
color: #ccc;
}
a {
color: #88f;
}
code a {
color: #ccc;
}
.fieldDocs {
border-color:#2A2A2A;
}
#listNav {
background-color: #333;
}
#listNav li a {
color: #fff;
}
#listNav li a:hover {
background-color: #555;
color: #fff;
}
#listNav li a.active {
background-color: #FFBB4D;
color: #000;
}
#listSearchResults li.selected {
background-color: #000;
}
#listSearchResults li.selected a {
color: #fff;
}
dl > div {
border-color: #373737;
}
.tok-kw {
color: #eee;
}
.tok-str {
color: #2e5;
}
.tok-builtin {
color: #ff894c;
}
.tok-comment {
color: #aa7;
}
.tok-fn {
color: #B1A0F8;
}
.tok-null {
color: #ff8080;
}
.tok-number {
color: #ff8080;
}
.tok-type {
color: #68f;
}
}
</style>
</head>
<body>
<nav>
<a class="logo" href="#">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 140">
<g fill="#F7A41D">
<g>
<polygon points="46,22 28,44 19,30"/>
<polygon points="46,22 33,33 28,44 22,44 22,95 31,95 20,100 12,117 0,117 0,22" shape-rendering="crispEdges"/>
<polygon points="31,95 12,117 4,106"/>
</g>
<g>
<polygon points="56,22 62,36 37,44"/>
<polygon points="56,22 111,22 111,44 37,44 56,32" shape-rendering="crispEdges"/>
<polygon points="116,95 97,117 90,104"/>
<polygon points="116,95 100,104 97,117 42,117 42,95" shape-rendering="crispEdges"/>
<polygon points="150,0 52,117 3,140 101,22"/>
</g>
<g>
<polygon points="141,22 140,40 122,45"/>
<polygon points="153,22 153,117 106,117 120,105 125,95 131,95 131,45 122,45 132,36 141,22" shape-rendering="crispEdges"/>
<polygon points="125,95 130,110 106,117"/>
</g>
</g>
<style>
#text { fill: #121212 }
@media (prefers-color-scheme: dark) { #text { fill: #f2f2f2 } }
</style>
<g id="text">
<g>
<polygon points="260,22 260,37 229,40 177,40 177,22" shape-rendering="crispEdges"/>
<polygon points="260,37 207,99 207,103 176,103 229,40 229,37"/>
<polygon points="261,99 261,117 176,117 176,103 206,99" shape-rendering="crispEdges"/>
</g>
<rect x="272" y="22" shape-rendering="crispEdges" width="22" height="95"/>
<g>
<polygon points="394,67 394,106 376,106 376,81 360,70 346,67" shape-rendering="crispEdges"/>
<polygon points="360,68 376,81 346,67"/>
<path d="M394,106c-10.2,7.3-24,12-37.7,12c-29,0-51.1-20.8-51.1-48.3c0-27.3,22.5-48.1,52-48.1 c14.3,0,29.2,5.5,38.9,14l-13,15c-7.1-6.3-16.8-10-25.9-10c-17,0-30.2,12.9-30.2,29.5c0,16.8,13.3,29.6,30.3,29.6 c5.7,0,12.8-2.3,19-5.5L394,106z"/>
</g>
</g>
</svg>
</a>
</nav>
<div id="navWrap">
<input type="search" id="search" autocomplete="off" spellcheck="false" placeholder="`s` to search, `?` to see more options">
<div id="sectNav" class="hidden"><ul id="listNav"></ul></div>
</div>
<section>
<p id="status">Loading...</p>
<h1 id="hdrName" class="hidden"><span></span><a href="#">[src]</a></h1>
<div id="fnProto" class="hidden">
<pre><code id="fnProtoCode"></code></pre>
</div>
<div id="tldDocs" class="hidden"></div>
<div id="sectParams" class="hidden">
<h2>Parameters</h2>
<div id="listParams">
</div>
</div>
<div id="sectFnErrors" class="hidden">
<h2>Errors</h2>
<div id="fnErrorsAnyError">
<p><span class="tok-type">anyerror</span> means the error set is known only at runtime.</p>
</div>
<div id="tableFnErrors"><dl id="listFnErrors"></dl></div>
</div>
<div id="sectSearchResults" class="hidden">
<h2>Search Results</h2>
<ul id="listSearchResults"></ul>
</div>
<div id="sectSearchNoResults" class="hidden">
<h2>No Results Found</h2>
<p>Press escape to exit search and then '?' to see more options.</p>
</div>
<div id="sectFields" class="hidden">
<h2>Fields</h2>
<div id="listFields">
</div>
</div>
<div id="sectTypes" class="hidden">
<h2>Types</h2>
<ul id="listTypes" class="columns">
</ul>
</div>
<div id="sectNamespaces" class="hidden">
<h2>Namespaces</h2>
<ul id="listNamespaces" class="columns">
</ul>
</div>
<div id="sectGlobalVars" class="hidden">
<h2>Global Variables</h2>
<table>
<tbody id="listGlobalVars">
</tbody>
</table>
</div>
<div id="sectValues" class="hidden">
<h2>Values</h2>
<table>
<tbody id="listValues">
</tbody>
</table>
</div>
<div id="sectFns" class="hidden">
<h2>Functions</h2>
<dl id="listFns">
</dl>
</div>
<div id="sectErrSets" class="hidden">
<h2>Error Sets</h2>
<ul id="listErrSets" class="columns">
</ul>
</div>
<div id="sectDocTests" class="hidden">
<h2>Example Usage</h2>
<pre><code id="docTestsCode"></code></pre>
</div>
<div id="sectSource" class="hidden">
<h2>Source Code</h2>
<pre><code id="sourceText"></code></pre>
</div>
</section>
<div id="helpDialog" class="hidden">
<h1>Keyboard Shortcuts</h1>
<dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd></dl>
<dl><dt><kbd>Esc</kbd></dt><dd>Clear focus; close this dialog</dd></dl>
<dl><dt><kbd>s</kbd></dt><dd>Focus the search field</dd></dl>
<dl><dt><kbd>u</kbd></dt><dd>Go to source code</dd></dl>
<dl><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd></dl>
<dl><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd></dl>
<dl><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd></dl>
</div>
<script src="main.js"></script>
</body>
</html>
|
0 | repos/pe-ziglang | repos/pe-ziglang/pe-0003/pe-0003.zig | //! Largest Prime Factor
//! https://projecteuler.net/problem=3
const std = @import("std");
const time = std.time;
const Instant = time.Instant;
const print = std.debug.print;
pub fn main() !void {
const start = try Instant.now();
const answer = largestPrimeFactor(600_851_475_143);
const end = try Instant.now();
const duration: f64 = @floatFromInt(end.since(start));
print("\nProject Euler #3\nAnswer: {}\n", .{answer});
print("Elapsed time: {d:.0} milliseconds.\n\n", .{duration / time.ns_per_ms});
}
fn largestPrimeFactor(factor: i64) i64 {
var n: i64 = factor;
var d: i64 = 3;
while (d * d < n) {
if (@rem(n, d) == 0) {
n = @divTrunc(n, d);
} else {
d += 2;
}
}
return n;
}
// Test
test "The prime factors of 13_195" {
const result = largestPrimeFactor(13_195);
try std.testing.expectEqual(result, 29);
}
|
0 | repos/pe-ziglang | repos/pe-ziglang/pe-0055/pe-0055.zig | //! Lychrel Numbers
//! https://projecteuler.net/problem=55
const std = @import("std");
const time = std.time;
const Instant = time.Instant;
const print = std.debug.print;
fn reverse_digits(n: u128) u128 {
var reversed: u128 = 0;
var num = n;
while (num > 0) {
const digit = num % 10;
const reversed_new = reversed * 10 + digit;
reversed = reversed_new;
num /= 10;
}
return reversed;
}
fn is_palindrome(n: u128) bool {
return n == reverse_digits(n);
}
fn is_lychrel(n: u128) bool {
var current = n;
const max_iterations = 50;
var i: usize = 0;
while (i < max_iterations) {
const reversed_current = reverse_digits(current);
if (reversed_current == 0) {
return true; // Treat as Lychrel if overflow occurs
}
const current_new = current + reversed_current;
if (current_new < current) {
// Overflow detected
std.debug.print("Overflow detected in is_lychrel for n: {}\n", .{n});
return true; // Treat as Lychrel if overflow occurs
}
current = current_new;
if (is_palindrome(current)) {
return false;
}
i += 1;
}
return true;
}
pub fn main() !void {
const start = try Instant.now();
var lychrel_count: usize = 0;
var n: u128 = 1;
while (n < 10000) {
if (is_lychrel(n)) {
lychrel_count += 1;
}
n += 1;
}
const end = try Instant.now();
const duration: f64 = @floatFromInt(end.since(start));
print("\nProject Euler #55\nAnswer: {}\n", .{lychrel_count});
print("Elapsed time: {d:.0} milliseconds.\n\n", .{duration / time.ns_per_ms});
}
|
0 | repos/pe-ziglang | repos/pe-ziglang/pe-0001/pe-0001.zig | //! Multiples of 3 or 5
//! https://projecteuler.net/problem=1
const std = @import("std");
const time = std.time;
const Instant = time.Instant;
const print = std.debug.print;
pub fn main() !void {
const start = try Instant.now();
const answer = multiplesOf3or5(1_000);
const end = try Instant.now();
const duration: f64 = @floatFromInt(end.since(start));
print("\nProject Euler #2\nAnswer: {}\n", .{answer});
print("Elapsed time: {d:.0} milliseconds.\n\n", .{duration / time.ns_per_ms});
}
fn multiplesOf3or5(limit: usize) usize {
var answer: usize = 0;
var i: usize = 1;
while (i < limit) : (i += 1) {
if (gcd(i, 3 * 5) > 1) {
answer += i;
}
}
return answer;
}
fn gcd(u: usize, v: usize) usize {
if (v != 0) {
return gcd(v, u % v);
} else {
return u;
}
}
// Test
test "Sum of multiples below 10" {
const result = multiplesOf3or5(10);
try std.testing.expectEqual(result, 23);
}
|
Subsets and Splits