1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
use std::ffi::c_void;

use omp_codegen::native;

use crate::players::Player;
use crate::types::vector::Vector3;

native!(Print,message: str);
native!(GetTickCount, -> isize);
native!(GetMaxPlayers, -> isize);
native!(VectorSize, vector: Vector3, -> f32);
native!(GetPlayerPoolSize, -> isize);
native!(GetVehiclePoolSize, -> isize);
native!(GetActorPoolSize, -> isize);
native!(IsAdminTeleportAllowed, -> bool);
native!(AllowAdminTeleport, allow: bool, -> bool);
native!(AreAllAnimationsEnabled, -> bool);
native!(EnableAllAnimations, allow: bool, -> bool);
native!(IsValidAnimationLibrary, name: str, -> bool);
native!(AreInteriorWeaponsAllowed, -> bool);
native!(AllowInteriorWeapons, allow: bool, -> bool);
native!(BlockIpAddress, ipAddress: str, timeMS: isize, -> bool);
native!(UnBlockIpAddress, ipAddress: str, -> bool);
native!(ConnectNPC, name: str, script: str, -> bool);
native!(DisableInteriorEnterExits, -> bool);
native!(DisableNameTagLOS, -> bool);
native!(EnableTirePopping, enable: bool, -> bool);
native!(EnableZoneNames, enable: bool, -> bool);
native!(GameTextForAll, msg: str, time: isize, style: isize);
native!(HideGameTextForAll, style: isize);
native!(GetConsoleVarAsBool, cvar: str, -> bool);
native!(GetConsoleVarAsInt, cvar: str, -> isize);
native!(GetConsoleVarAsFloat, cvar: str, -> f32);
native!(GetConsoleVarAsString, cvar: str, buffer: mut str, -> isize);
native!(GetNetworkStats, output: mut str);
native!(GetPlayerNetworkStats, player: struct Player, output: mut str);
native!(GetServerTickRate, -> isize);
native!(GetServerVarAsBool, cvar: str, -> bool);
native!(GetServerVarAsInt, cvar: str, -> isize);
native!(GetServerVarAsFloat, cvar: str, -> f32);
native!(GetServerVarAsString, cvar: str, buffer: mut str, -> isize);
native!(GetWeaponName, weaponid: isize, weapon: mut str);
native!(LimitGlobalChatRadius, chatRadius: f32);
native!(LimitPlayerMarkerRadius, markerRadius: f32);
native!(SendRconCommand, command: str);
native!(SetDeathDropAmount, amount: isize);
native!(SetGameModeText, string: str);
native!(SetGravity, gravity: f32);
native!(GetGravity, -> f32);
native!(SetNameTagDrawDistance, distance: f32);
native!(SetWeather, weatherid: isize);
native!(SetWorldTime, hour: isize);
native!(ShowNameTags, show: bool);
native!(ShowPlayerMarkers, mode: isize);
native!(UsePlayerPedAnims);
native!(GetWeather, -> isize);
native!(GetWorldTime, -> isize);
native!(ToggleChatTextReplacement, enable: bool);
native!(ChatTextReplacementToggled, -> bool);
native!(IsValidNickName, name: str, -> bool);
native!(AllowNickNameCharacter, character: isize, allow: bool);
native!(IsNickNameCharacterAllowed, char:char, -> bool);
native!(ClearBanList);
native!(IsBanned, ip: str, -> bool);
native!(GetWeaponSlot, weapon: u8, -> isize);
native!(AddServerRule, name: str, value: str);
native!(SetServerRule, name: str, value: str);
native!(IsValidServerRule, name: str, -> bool);
native!(RemoveServerRule, name: str);
native!(GetAnimationName, index: isize, lib: mut str, name: mut str);
native!(EnableStuntBonusForAll, enable: bool);
native!(CreateExplosion, pos: Vector3, explosion_type: isize, radius: f32);

#[doc(hidden)]
pub fn load_functions() {
    load_function!(Print);
    load_function!(GetTickCount);
    load_function!(GetMaxPlayers);
    load_function!(VectorSize);
    load_function!(GetPlayerPoolSize);
    load_function!(GetVehiclePoolSize);
    load_function!(GetActorPoolSize);
    load_function!(IsAdminTeleportAllowed);
    load_function!(AllowAdminTeleport);
    load_function!(AreAllAnimationsEnabled);
    load_function!(EnableAllAnimations);
    load_function!(IsValidAnimationLibrary);
    load_function!(AreInteriorWeaponsAllowed);
    load_function!(AllowInteriorWeapons);
    load_function!(BlockIpAddress);
    load_function!(UnBlockIpAddress);
    load_function!(ConnectNPC);
    load_function!(DisableInteriorEnterExits);
    load_function!(DisableNameTagLOS);
    load_function!(EnableTirePopping);
    load_function!(EnableZoneNames);
    load_function!(GameTextForAll);
    load_function!(HideGameTextForAll);
    load_function!(GetConsoleVarAsBool);
    load_function!(GetConsoleVarAsInt);
    load_function!(GetConsoleVarAsFloat);
    load_function!(GetConsoleVarAsString);
    load_function!(GetNetworkStats);
    load_function!(GetPlayerNetworkStats);
    load_function!(GetServerTickRate);
    load_function!(GetServerVarAsBool);
    load_function!(GetServerVarAsInt);
    load_function!(GetServerVarAsFloat);
    load_function!(GetServerVarAsString);
    load_function!(GetWeaponName);
    load_function!(LimitGlobalChatRadius);
    load_function!(LimitPlayerMarkerRadius);
    load_function!(SendRconCommand);
    load_function!(SetDeathDropAmount);
    load_function!(SetGameModeText);
    load_function!(SetGravity);
    load_function!(GetGravity);
    load_function!(SetNameTagDrawDistance);
    load_function!(SetWeather);
    load_function!(SetWorldTime);
    load_function!(ShowNameTags);
    load_function!(ShowPlayerMarkers);
    load_function!(UsePlayerPedAnims);
    load_function!(GetWeather);
    load_function!(GetWorldTime);
    load_function!(ToggleChatTextReplacement);
    load_function!(ChatTextReplacementToggled);
    load_function!(IsValidNickName);
    load_function!(AllowNickNameCharacter);
    load_function!(IsNickNameCharacterAllowed);
    load_function!(ClearBanList);
    load_function!(IsBanned);
    load_function!(GetWeaponSlot);
    load_function!(AddServerRule);
    load_function!(SetServerRule);
    load_function!(IsValidServerRule);
    load_function!(RemoveServerRule);
    load_function!(GetAnimationName);
    load_function!(EnableStuntBonusForAll);
    load_function!(CreateExplosion);
}