-
Notifications
You must be signed in to change notification settings - Fork 3
/
vehicle.cpp
243 lines (183 loc) · 7.9 KB
/
vehicle.cpp
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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
#include "include/vehicle.h"
extern "C" {
void* vehicle_create(int isStatic, int modelId, float x, float y, float z, float angle, int colour1, int colour2, int respawnDelay, unsigned char addSiren) {
return call<void*>("vehicle_create", isStatic, modelId, x, y, z, angle, colour1, colour2, respawnDelay, addSiren);
}
void vehicle_release(void* vehicle) {
return call<void>("vehicle_release", vehicle);
}
void* vehicle_getByID(int id) {
return call<void*>("vehicle_getByID", id);
}
int vehicle_isStreamedInForPlayer(void* vehicle, void* player) {
return call<int>("vehicle_isStreamedInForPlayer", vehicle, player);
}
void vehicle_setColour(void* vehicle, int col1, int col2) {
return call<void>("vehicle_setColour", vehicle, col1, col2);
}
VehicleColour vehicle_getColour(void* vehicle) {
return call<VehicleColour>("vehicle_getColour", vehicle);
}
void vehicle_setHealth(void* vehicle, float health) {
return call<void>("vehicle_setHealth", vehicle, health);
}
float vehicle_getHealth(void* vehicle) {
return call<float>("vehicle_getHealth", vehicle);
}
void* vehicle_getDriver(void* vehicle) {
return call<void*>("vehicle_getDriver", vehicle);
}
Array vehicle_getPassengers(void* vehicle) {
return call<Array>("vehicle_getPassengers", vehicle);
}
void vehicle_setPlate(void* vehicle, String plate) {
return call<void>("vehicle_setPlate", vehicle, plate);
}
String vehicle_getPlate(void* vehicle) {
return call<String>("vehicle_getPlate", vehicle);
}
void vehicle_setDamageStatus(void* vehicle, int PanelStatus, int DoorStatus, uint8_t LightStatus, uint8_t TyreStatus, void* vehicleUpdater) {
return call<void>("vehicle_setDamageStatus", vehicle, PanelStatus, DoorStatus, LightStatus, TyreStatus, vehicleUpdater);
}
void vehicle_getDamageStatus(void* vehicle, int* PanelStatus, int* DoorStatus, int* LightStatus, int* TyreStatus) {
return call<void>("vehicle_getDamageStatus", vehicle, PanelStatus, DoorStatus, LightStatus, TyreStatus);
}
void vehicle_setPaintjob(void* vehicle, int paintjob) {
return call<void>("vehicle_setPaintjob", vehicle, paintjob);
}
int vehicle_getPaintjob(void* vehicle) {
return call<int>("vehicle_getPaintjob", vehicle);
}
void vehicle_addComponent(void* vehicle, int component) {
return call<void>("vehicle_addComponent", vehicle, component);
}
int vehicle_getComponentInSlot(void* vehicle, int slot) {
return call<int>("vehicle_getComponentInSlot", vehicle, slot);
}
void vehicle_removeComponent(void* vehicle, int component) {
return call<void>("vehicle_removeComponent", vehicle, component);
}
void vehicle_putPlayer(void* vehicle, void* player, int seatID) {
return call<void>("vehicle_putPlayer", vehicle, player, seatID);
}
void vehicle_setZAngle(void* vehicle, float angle) {
return call<void>("vehicle_setZAngle", vehicle, angle);
}
float vehicle_getZAngle(void* vehicle) {
return call<float>("vehicle_getZAngle", vehicle);
}
void vehicle_setParams(void* vehicle, VehicleParams* params) {
return call<void>("vehicle_setParams", vehicle, params);
}
void vehicle_setParamsForPlayer(void* vehicle, void* player, VehicleParams* params) {
return call<void>("vehicle_setParamsForPlayer", vehicle, player, params);
}
VehicleParams vehicle_getParams(void* vehicle) {
return call<VehicleParams>("vehicle_getParams", vehicle);
}
int vehicle_isDead(void* vehicle) {
return call<int>("vehicle_isDead", vehicle);
}
void vehicle_respawn(void* vehicle) {
return call<void>("vehicle_respawn", vehicle);
}
void vehicle_setRespawnDelay(void* vehicle, int delay) {
return call<void>("vehicle_setRespawnDelay", vehicle, delay);
}
long long vehicle_getRespawnDelay(void* vehicle) {
return call<long long>("vehicle_getRespawnDelay", vehicle);
}
int vehicle_isRespawning(void* vehicle) {
return call<int>("vehicle_isRespawning", vehicle);
}
void vehicle_setInterior(void* vehicle, int interiorID) {
return call<void>("vehicle_setInterior", vehicle, interiorID);
}
int vehicle_getInterior(void* vehicle) {
return call<int>("vehicle_getInterior", vehicle);
}
void vehicle_attachTrailer(void* vehicle, void* trailer) {
return call<void>("vehicle_attachTrailer", vehicle, trailer);
}
void vehicle_detachTrailer(void* vehicle) {
return call<void>("vehicle_detachTrailer", vehicle);
}
int vehicle_isTrailer(void* vehicle) {
return call<int>("vehicle_isTrailer", vehicle);
}
void* vehicle_getTrailer(void* vehicle) {
return call<void*>("vehicle_getTrailer", vehicle);
}
void* vehicle_getCab(void* vehicle) {
return call<void*>("vehicle_getCab", vehicle);
}
void vehicle_repair(void* vehicle) {
return call<void>("vehicle_repair", vehicle);
}
void vehicle_setVelocity(void* vehicle, float x, float y, float z) {
return call<void>("vehicle_setVelocity", vehicle, x, y, z);
}
Vector3 vehicle_getVelocity(void* vehicle) {
return call<Vector3>("vehicle_getVelocity", vehicle);
}
void vehicle_setAngularVelocity(void* vehicle, float x, float y, float z) {
return call<void>("vehicle_setAngularVelocity", vehicle, x, y, z);
}
Vector3 vehicle_getAngularVelocity(void* vehicle) {
return call<Vector3>("vehicle_getAngularVelocity", vehicle);
}
int vehicle_getModel(void* vehicle) {
return call<int>("vehicle_getModel", vehicle);
}
uint8_t vehicle_getLandingGearState(void* vehicle) {
return call<uint8_t>("vehicle_getLandingGearState", vehicle);
}
int vehicle_hasBeenOccupied(void* vehicle) {
return call<int>("vehicle_hasBeenOccupied", vehicle);
}
long vehicle_getLastOccupiedTime(void* vehicle) {
return call<long>("vehicle_getLastOccupiedTime", vehicle);
}
long vehicle_getLastSpawnTime(void* vehicle) {
return call<long>("vehicle_getLastSpawnTime", vehicle);
}
int vehicle_isOccupied(void* vehicle) {
return call<int>("vehicle_isOccupied", vehicle);
}
void vehicle_setSiren(void* vehicle, int status) {
return call<void>("vehicle_setSiren", vehicle, status);
}
uint8_t vehicle_getSirenState(void* vehicle) {
return call<uint8_t>("vehicle_getSirenState", vehicle);
}
uint32_t vehicle_getHydraThrustAngle(void* vehicle) {
return call<uint32_t>("vehicle_getHydraThrustAngle", vehicle);
}
float vehicle_getTrainSpeed(void* vehicle) {
return call<float>("vehicle_getTrainSpeed", vehicle);
}
int vehicle_getLastDriverPoolID(void* vehicle) {
return call<int>("vehicle_getLastDriverPoolID", vehicle);
}
Vector3 vehicle_getPosition(void* vehicle) {
return call<Vector3>("vehicle_getPosition", vehicle);
}
void vehicle_setPosition(void* vehicle, float x, float y, float z) {
return call<void>("vehicle_setPosition", vehicle, x, y, z);
}
Vector4 vehicle_getRotation(void* vehicle) {
return call<Vector4>("vehicle_getRotation", vehicle);
}
void vehicle_setVirtualWorld(void* vehicle, int vw) {
return call<void>("vehicle_setVirtualWorld", vehicle, vw);
}
int vehicle_getVirtualWorld(void* vehicle) {
return call<int>("vehicle_getVirtualWorld", vehicle);
}
float vehicle_getDistanceFromPoint(void* vehicle, float pX, float pY, float pZ) {
return call<float>("vehicle_getDistanceFromPoint", vehicle, pX, pY, pZ);
}
int vehicle_isInRangeOfPoint(void* vehicle, float range, float pX, float pY, float pZ) {
return call<int>("vehicle_isInRangeOfPoint", vehicle, range, pX, pY, pZ);
}
}