-
Notifications
You must be signed in to change notification settings - Fork 18
/
Copy pathomp_vehicle.inc
1966 lines (1825 loc) · 88.1 KB
/
omp_vehicle.inc
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
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
#if defined _INC_omp_vehicle
#endinput
#endif
#define _INC_omp_vehicle
/**
* <library name="omp_vehicle" summary="open.mp vehicle functions.">
* <license>
* This Source Code Form is subject to the terms of the Mozilla Public License,
* v. 2.0. If a copy of the MPL was not distributed with this file, You can
* obtain one at http://mozilla.org/MPL/2.0/.
*
* The original code is copyright (c) 2023, open.mp team and contributors.
* </license>
* <summary pawndoc="true">
* This library uses the enhanced <em>pawndoc.xsl</em> from
* <a href="https://github.com/pawn-lang/pawndoc">pawn-lang/pawndoc</a>.
* This XSL has features such as library and markdown support, and will not
* render this message when used.
* </summary>
* </library>
*/
/// <p/>
#pragma tabsize 4
/**
* <library>omp_vehicle</library>
*/
#if defined MAX_VEHICLES
#if MAX_VEHICLES < 1 || MAX_VEHICLES > 2000
#error MAX_VEHICLES must be >= 1 and <= 2000
#endif
const __MAX_VEHICLES = MAX_VEHICLES;
#define __MAX_VEHICLES
#else
const MAX_VEHICLES = 2000;
#define MAX_VEHICLES 2000
#endif
/**
* <library>omp_vehicle</library>
*/
const INVALID_VEHICLE_ID = 0xFFFF;
#define INVALID_VEHICLE_ID 65535
/// <p/>
/**
* <library>omp_vehicle</library>
*/
#define CARMODTYPE: __TAG(CARMODTYPE):
enum CARMODTYPE:MAX_CARMODS
{
UNKNOWN_CARMODTYPE = -1,
CARMODTYPE_NONE = -1,
CARMODTYPE_SPOILER,
CARMODTYPE_HOOD,
CARMODTYPE_ROOF,
CARMODTYPE_SIDESKIRT,
CARMODTYPE_LAMPS,
CARMODTYPE_NITRO,
CARMODTYPE_EXHAUST,
CARMODTYPE_WHEELS,
CARMODTYPE_STEREO,
CARMODTYPE_HYDRAULICS,
CARMODTYPE_FRONT_BUMPER,
CARMODTYPE_REAR_BUMPER,
CARMODTYPE_VENT_RIGHT,
CARMODTYPE_VENT_LEFT,
CARMODTYPE_FRONT_BULLBAR,
CARMODTYPE_REAR_BULLBAR
}
static stock CARMODTYPE:_@CARMODTYPE() { return MAX_CARMODS; }
#define UNKNOWN_CARMODTYPE (CARMODTYPE:-1)
#define CARMODTYPE_NONE (CARMODTYPE:-1)
#define CARMODTYPE_SPOILER (CARMODTYPE:0)
#define CARMODTYPE_HOOD (CARMODTYPE:1)
#define CARMODTYPE_ROOF (CARMODTYPE:2)
#define CARMODTYPE_SIDESKIRT (CARMODTYPE:3)
#define CARMODTYPE_LAMPS (CARMODTYPE:4)
#define CARMODTYPE_NITRO (CARMODTYPE:5)
#define CARMODTYPE_EXHAUST (CARMODTYPE:6)
#define CARMODTYPE_WHEELS (CARMODTYPE:7)
#define CARMODTYPE_STEREO (CARMODTYPE:8)
#define CARMODTYPE_HYDRAULICS (CARMODTYPE:9)
#define CARMODTYPE_FRONT_BUMPER (CARMODTYPE:10)
#define CARMODTYPE_REAR_BUMPER (CARMODTYPE:11)
#define CARMODTYPE_VENT_RIGHT (CARMODTYPE:12)
#define CARMODTYPE_VENT_LEFT (CARMODTYPE:13)
#define CARMODTYPE_FRONT_BULLBAR (CARMODTYPE:14)
#define CARMODTYPE_REAR_BULLBAR (CARMODTYPE:15)
// Backwards-compatibility.
#define VEHICLE_PARAMS: _:
/**
* <library>omp_vehicle</library>
*/
const VEHICLE_PARAMS_UNSET = -1;
/**
* <library>omp_vehicle</library>
*/
const VEHICLE_PARAMS_OFF = 0;
/**
* <library>omp_vehicle</library>
*/
const VEHICLE_PARAMS_ON = 1;
/// <p/>
/**
* <library>omp_vehicle</library>
*/
#define VEHICLE_MODEL_INFO: __TAG(VEHICLE_MODEL_INFO):
enum VEHICLE_MODEL_INFO:MAX_VEHICLE_MODEL_INFOS
{
UNKNOWN_VEHICLE_MODEL_INFO = -1,
VEHICLE_MODEL_INFO_SIZE = 1,
VEHICLE_MODEL_INFO_FRONT_SEAT,
VEHICLE_MODEL_INFO_REAR_SEAT,
VEHICLE_MODEL_INFO_PETROL_CAP,
VEHICLE_MODEL_INFO_WHEELS_FRONT,
VEHICLE_MODEL_INFO_WHEELS_REAR,
VEHICLE_MODEL_INFO_WHEELS_MID,
// First so we don't have trailing commas.
#if __namemax > 31
VEHICLE_MODEL_INFO_FRONT_BUMPER_Z,
VEHICLE_MODEL_INFO_REAR_BUMPER_Z,
#endif
VEHICLE_MODEL_INFO_FRONTSEAT = VEHICLE_MODEL_INFO_FRONT_SEAT,
VEHICLE_MODEL_INFO_REARSEAT,
VEHICLE_MODEL_INFO_PETROLCAP,
VEHICLE_MODEL_INFO_WHEELSFRONT,
VEHICLE_MODEL_INFO_WHEELSREAR,
VEHICLE_MODEL_INFO_WHEELSMID,
VEHICLE_MODEL_INFO_FRONT_BUMPER,
VEHICLE_MODEL_INFO_REAR_BUMPER
}
static stock VEHICLE_MODEL_INFO:_@VEHICLE_MODEL_INFO() { return MAX_VEHICLE_MODEL_INFOS; }
#define UNKNOWN_VEHICLE_MODEL_INFO (VEHICLE_MODEL_INFO:-1)
#define VEHICLE_MODEL_INFO_SIZE (VEHICLE_MODEL_INFO:1)
#define VEHICLE_MODEL_INFO_FRONT_SEAT (VEHICLE_MODEL_INFO:2)
#define VEHICLE_MODEL_INFO_REAR_SEAT (VEHICLE_MODEL_INFO:3)
#define VEHICLE_MODEL_INFO_PETROL_CAP (VEHICLE_MODEL_INFO:4)
#define VEHICLE_MODEL_INFO_WHEELS_FRONT (VEHICLE_MODEL_INFO:5)
#define VEHICLE_MODEL_INFO_WHEELS_REAR (VEHICLE_MODEL_INFO:6)
#define VEHICLE_MODEL_INFO_WHEELS_MID (VEHICLE_MODEL_INFO:7)
#if __namemax > 31
#define VEHICLE_MODEL_INFO_FRONT_BUMPER_Z (VEHICLE_MODEL_INFO:8)
#define VEHICLE_MODEL_INFO_REAR_BUMPER_Z (VEHICLE_MODEL_INFO:9)
#endif
#define VEHICLE_MODEL_INFO_FRONTSEAT (VEHICLE_MODEL_INFO:2)
#define VEHICLE_MODEL_INFO_REARSEAT (VEHICLE_MODEL_INFO:3)
#define VEHICLE_MODEL_INFO_PETROLCAP (VEHICLE_MODEL_INFO:4)
#define VEHICLE_MODEL_INFO_WHEELSFRONT (VEHICLE_MODEL_INFO:5)
#define VEHICLE_MODEL_INFO_WHEELSREAR (VEHICLE_MODEL_INFO:6)
#define VEHICLE_MODEL_INFO_WHEELSMID (VEHICLE_MODEL_INFO:7)
#define VEHICLE_MODEL_INFO_FRONT_BUMPER (VEHICLE_MODEL_INFO:8)
#define VEHICLE_MODEL_INFO_REAR_BUMPER (VEHICLE_MODEL_INFO:9)
/// <p/>
/**
* <library>omp_vehicle</library>
*/
#define VEHICLE_PANEL_STATUS: __TAG(VEHICLE_PANEL_STATUS):
enum VEHICLE_PANEL_STATUS:__VEHICLE_PANEL_STATUS
{
UNKNOWN_VEHICLE_PANEL_STATUS = -1,
VEHICLE_PANEL_STATUS_NONE = 0
}
static stock VEHICLE_PANEL_STATUS:_@VEHICLE_PANEL_STATUS() { return __VEHICLE_PANEL_STATUS; }
#define UNKNOWN_VEHICLE_PANEL_STATUS (VEHICLE_PANEL_STATUS:-1)
#define VEHICLE_PANEL_STATUS_NONE (VEHICLE_PANEL_STATUS:0)
/// <p/>
/**
* <library>omp_vehicle</library>
*/
#define VEHICLE_DOOR_STATUS: __TAG(VEHICLE_DOOR_STATUS):
enum VEHICLE_DOOR_STATUS:__VEHICLE_DOOR_STATUS (<<= 1)
{
UNKNOWN_VEHICLE_DOOR_STATUS = -1,
VEHICLE_DOOR_STATUS_NONE = 0,
#if __namemax > 31
VEHICLE_DOOR_STATUS_BONNET_OPEN = 0x00000001,
VEHICLE_DOOR_STATUS_BONNET_DAMAGED,
VEHICLE_DOOR_STATUS_BONNET_MISSING,
VEHICLE_DOOR_STATUS_HOOD_OPEN = VEHICLE_DOOR_STATUS_BONNET_OPEN,
VEHICLE_DOOR_STATUS_HOOD_DAMAGED,
VEHICLE_DOOR_STATUS_HOOD_MISSING,
VEHICLE_DOOR_STATUS_BOOT_OPEN = 0x00000100,
VEHICLE_DOOR_STATUS_BOOT_DAMAGED,
VEHICLE_DOOR_STATUS_BOOT_MISSING,
VEHICLE_DOOR_STATUS_TRUNK_OPEN = VEHICLE_DOOR_STATUS_BOOT_OPEN,
VEHICLE_DOOR_STATUS_TRUNK_DAMAGED,
VEHICLE_DOOR_STATUS_TRUNK_MISSING,
VEHICLE_DOOR_STATUS_FRONT_LEFT_OPEN = 0x00010000,
VEHICLE_DOOR_STATUS_FRONT_LEFT_DAMAGED,
VEHICLE_DOOR_STATUS_FRONT_LEFT_MISSING,
VEHICLE_DOOR_STATUS_DRIVER_OPEN = VEHICLE_DOOR_STATUS_FRONT_LEFT_OPEN,
VEHICLE_DOOR_STATUS_DRIVER_DAMAGED,
VEHICLE_DOOR_STATUS_DRIVER_MISSING,
VEHICLE_DOOR_STATUS_FRONT_RIGHT_OPEN = 0x01000000,
VEHICLE_DOOR_STATUS_FRONT_RIGHT_DAMAGED,
VEHICLE_DOOR_STATUS_FRONT_RIGHT_MISSING,
VEHICLE_DOOR_STATUS_PASSENGER_OPEN = VEHICLE_DOOR_STATUS_FRONT_RIGHT_OPEN,
VEHICLE_DOOR_STATUS_PASSENGER_DAMAGED,
VEHICLE_DOOR_STATUS_PASSENGER_MISSING,
#endif
CARDOOR_NONE = 0,
CARDOOR_BONNET_OPEN = 0x00000001,
CARDOOR_BONNET_DAMAGED,
CARDOOR_BONNET_MISSING,
CARDOOR_HOOD_OPEN = CARDOOR_BONNET_OPEN,
CARDOOR_HOOD_DAMAGED,
CARDOOR_HOOD_MISSING,
CARDOOR_BOOT_OPEN = 0x00000100,
CARDOOR_BOOT_DAMAGED,
CARDOOR_BOOT_MISSING,
CARDOOR_TRUNK_OPEN = CARDOOR_BOOT_OPEN,
CARDOOR_TRUNK_DAMAGED,
CARDOOR_TRUNK_MISSING,
CARDOOR_FRONT_LEFT_OPEN = 0x00010000,
CARDOOR_FRONT_LEFT_DAMAGED,
CARDOOR_FRONT_LEFT_MISSING,
CARDOOR_DRIVER_OPEN = CARDOOR_FRONT_LEFT_OPEN,
CARDOOR_DRIVER_DAMAGED,
CARDOOR_DRIVER_MISSING,
CARDOOR_FRONT_RIGHT_OPEN = 0x01000000,
CARDOOR_FRONT_RIGHT_DAMAGED,
CARDOOR_FRONT_RIGHT_MISSING,
CARDOOR_PASSENGER_OPEN = CARDOOR_FRONT_RIGHT_OPEN,
CARDOOR_PASSENGER_DAMAGED,
CARDOOR_PASSENGER_MISSING
}
static stock VEHICLE_DOOR_STATUS:_@VEHICLE_DOOR_STATUS() { return __VEHICLE_DOOR_STATUS; }
#define UNKNOWN_VEHICLE_DOOR_STATUS (VEHICLE_DOOR_STATUS:-1)
#define VEHICLE_DOOR_STATUS_NONE (VEHICLE_DOOR_STATUS:0)
#if __namemax > 31
#define VEHICLE_DOOR_STATUS_BONNET_OPEN (VEHICLE_DOOR_STATUS:0x00000001)
#define VEHICLE_DOOR_STATUS_BONNET_DAMAGED (VEHICLE_DOOR_STATUS:0x00000002)
#define VEHICLE_DOOR_STATUS_BONNET_MISSING (VEHICLE_DOOR_STATUS:0x00000004)
#define VEHICLE_DOOR_STATUS_HOOD_OPEN (VEHICLE_DOOR_STATUS:0x00000001)
#define VEHICLE_DOOR_STATUS_HOOD_DAMAGED (VEHICLE_DOOR_STATUS:0x00000002)
#define VEHICLE_DOOR_STATUS_HOOD_MISSING (VEHICLE_DOOR_STATUS:0x00000004)
#define VEHICLE_DOOR_STATUS_BOOT_OPEN (VEHICLE_DOOR_STATUS:0x00000100)
#define VEHICLE_DOOR_STATUS_BOOT_DAMAGED (VEHICLE_DOOR_STATUS:0x00000200)
#define VEHICLE_DOOR_STATUS_BOOT_MISSING (VEHICLE_DOOR_STATUS:0x00000400)
#define VEHICLE_DOOR_STATUS_TRUNK_OPEN (VEHICLE_DOOR_STATUS:0x00000100)
#define VEHICLE_DOOR_STATUS_TRUNK_DAMAGED (VEHICLE_DOOR_STATUS:0x00000200)
#define VEHICLE_DOOR_STATUS_TRUNK_MISSING (VEHICLE_DOOR_STATUS:0x00000400)
#define VEHICLE_DOOR_STATUS_FRONT_LEFT_OPEN (VEHICLE_DOOR_STATUS:0x00010000)
#define VEHICLE_DOOR_STATUS_FRONT_LEFT_DAMAGED (VEHICLE_DOOR_STATUS:0x00020000)
#define VEHICLE_DOOR_STATUS_FRONT_LEFT_MISSING (VEHICLE_DOOR_STATUS:0x00040000)
#define VEHICLE_DOOR_STATUS_DRIVER_OPEN (VEHICLE_DOOR_STATUS:0x00010000)
#define VEHICLE_DOOR_STATUS_DRIVER_DAMAGED (VEHICLE_DOOR_STATUS:0x00020000)
#define VEHICLE_DOOR_STATUS_DRIVER_MISSING (VEHICLE_DOOR_STATUS:0x00040000)
#define VEHICLE_DOOR_STATUS_FRONT_RIGHT_OPEN (VEHICLE_DOOR_STATUS:0x01000000)
#define VEHICLE_DOOR_STATUS_FRONT_RIGHT_DAMAGED (VEHICLE_DOOR_STATUS:0x02000000)
#define VEHICLE_DOOR_STATUS_FRONT_RIGHT_MISSING (VEHICLE_DOOR_STATUS:0x04000000)
#define VEHICLE_DOOR_STATUS_PASSENGER_OPEN (VEHICLE_DOOR_STATUS:0x01000000)
#define VEHICLE_DOOR_STATUS_PASSENGER_DAMAGED (VEHICLE_DOOR_STATUS:0x02000000)
#define VEHICLE_DOOR_STATUS_PASSENGER_MISSING (VEHICLE_DOOR_STATUS:0x04000000)
#endif
#define CARDOOR_NONE (VEHICLE_DOOR_STATUS:0)
#define CARDOOR_BONNET_OPEN (VEHICLE_DOOR_STATUS:0x00000001)
#define CARDOOR_BONNET_DAMAGED (VEHICLE_DOOR_STATUS:0x00000002)
#define CARDOOR_BONNET_MISSING (VEHICLE_DOOR_STATUS:0x00000004)
#define CARDOOR_HOOD_OPEN (VEHICLE_DOOR_STATUS:0x00000001)
#define CARDOOR_HOOD_DAMAGED (VEHICLE_DOOR_STATUS:0x00000002)
#define CARDOOR_HOOD_MISSING (VEHICLE_DOOR_STATUS:0x00000004)
#define CARDOOR_BOOT_OPEN (VEHICLE_DOOR_STATUS:0x00000100)
#define CARDOOR_BOOT_DAMAGED (VEHICLE_DOOR_STATUS:0x00000200)
#define CARDOOR_BOOT_MISSING (VEHICLE_DOOR_STATUS:0x00000400)
#define CARDOOR_TRUNK_OPEN (VEHICLE_DOOR_STATUS:0x00000100)
#define CARDOOR_TRUNK_DAMAGED (VEHICLE_DOOR_STATUS:0x00000200)
#define CARDOOR_TRUNK_MISSING (VEHICLE_DOOR_STATUS:0x00000400)
#define CARDOOR_FRONT_LEFT_OPEN (VEHICLE_DOOR_STATUS:0x00010000)
#define CARDOOR_FRONT_LEFT_DAMAGED (VEHICLE_DOOR_STATUS:0x00020000)
#define CARDOOR_FRONT_LEFT_MISSING (VEHICLE_DOOR_STATUS:0x00040000)
#define CARDOOR_DRIVER_OPEN (VEHICLE_DOOR_STATUS:0x00010000)
#define CARDOOR_DRIVER_DAMAGED (VEHICLE_DOOR_STATUS:0x00020000)
#define CARDOOR_DRIVER_MISSING (VEHICLE_DOOR_STATUS:0x00040000)
#define CARDOOR_FRONT_RIGHT_OPEN (VEHICLE_DOOR_STATUS:0x01000000)
#define CARDOOR_FRONT_RIGHT_DAMAGED (VEHICLE_DOOR_STATUS:0x02000000)
#define CARDOOR_FRONT_RIGHT_MISSING (VEHICLE_DOOR_STATUS:0x04000000)
#define CARDOOR_PASSENGER_OPEN (VEHICLE_DOOR_STATUS:0x01000000)
#define CARDOOR_PASSENGER_DAMAGED (VEHICLE_DOOR_STATUS:0x02000000)
#define CARDOOR_PASSENGER_MISSING (VEHICLE_DOOR_STATUS:0x04000000)
/// <p/>
/**
* <library>omp_vehicle</library>
*/
#define VEHICLE_LIGHT_STATUS: __TAG(VEHICLE_LIGHT_STATUS):
enum VEHICLE_LIGHT_STATUS:__VEHICLE_LIGHT_STATUS
{
UNKNOWN_VEHICLE_LIGHT_STATUS = 0,
VEHICLE_LIGHT_STATUS_NONE = 0,
#if __namemax > 31
VEHICLE_LIGHT_STATUS_FRONT_LEFT_BROKEN = 1,
VEHICLE_LIGHT_STATUS_FRONT_RIGHT_BROKEN = 4,
VEHICLE_LIGHT_STATUS_DRIVER_BROKEN = VEHICLE_LIGHT_STATUS_FRONT_LEFT_BROKEN,
VEHICLE_LIGHT_STATUS_PASSENGER_BROKEN = VEHICLE_LIGHT_STATUS_FRONT_RIGHT_BROKEN,
VEHICLE_LIGHT_STATUS_REAR_BROKEN = 64,
#endif
CARLIGHT_FRONT_LEFT_BROKEN = 1,
CARLIGHT_FRONT_RIGHT_BROKEN = 4,
CARLIGHT_DRIVER_BROKEN = CARLIGHT_FRONT_LEFT_BROKEN,
CARLIGHT_PASSENGER_BROKEN = CARLIGHT_FRONT_RIGHT_BROKEN,
CARLIGHT_REAR_BROKEN = 64
}
static stock VEHICLE_LIGHT_STATUS:_@VEHICLE_LIGHT_STATUS() { return __VEHICLE_LIGHT_STATUS; }
#define UNKNOWN_VEHICLE_LIGHT_STATUS (VEHICLE_LIGHT_STATUS:0)
#define VEHICLE_LIGHT_STATUS_NONE (VEHICLE_LIGHT_STATUS:0)
#if __namemax > 31
#define VEHICLE_LIGHT_STATUS_FRONT_LEFT_BROKEN (VEHICLE_LIGHT_STATUS:1)
#define VEHICLE_LIGHT_STATUS_FRONT_RIGHT_BROKEN (VEHICLE_LIGHT_STATUS:4)
#define VEHICLE_LIGHT_STATUS_DRIVER_BROKEN (VEHICLE_LIGHT_STATUS:1)
#define VEHICLE_LIGHT_STATUS_PASSENGER_BROKEN (VEHICLE_LIGHT_STATUS:4)
#define VEHICLE_LIGHT_STATUS_REAR_BROKEN (VEHICLE_LIGHT_STATUS:64)
#endif
#define CARLIGHT_FRONT_LEFT_BROKEN (VEHICLE_LIGHT_STATUS:1)
#define CARLIGHT_FRONT_RIGHT_BROKEN (VEHICLE_LIGHT_STATUS:4)
#define CARLIGHT_DRIVER_BROKEN (VEHICLE_LIGHT_STATUS:1)
#define CARLIGHT_PASSENGER_BROKEN (VEHICLE_LIGHT_STATUS:4)
#define CARLIGHT_REAR_BROKEN (VEHICLE_LIGHT_STATUS:64)
/// <p/>
/**
* <library>omp_vehicle</library>
*/
#define VEHICLE_TYRE_STATUS: __TAG(VEHICLE_TYRE_STATUS):
#define VEHICLE_TIRE_STATUS: __TAG(VEHICLE_TYRE_STATUS):
enum VEHICLE_TYRE_STATUS:__VEHICLE_TYRE_STATUS
{
UNKNOWN_VEHICLE_TYRE_STATUS = -1,
VEHICLE_TYRE_STATUS_NONE = 0,
#if __namemax > 31
VEHICLE_TYRE_STATUS_FRONT_LEFT_POPPED = 8,
VEHICLE_TYRE_STATUS_FRONT_RIGHT_POPPED = 2,
VEHICLE_TYRE_STATUS_REAR_LEFT_POPPED = 4,
VEHICLE_TYRE_STATUS_REAR_RIGHT_POPPED = 1,
VEHICLE_TIRE_STATUS_FRONT_LEFT_POPPED = 8,
VEHICLE_TIRE_STATUS_FRONT_RIGHT_POPPED = 2,
VEHICLE_TIRE_STATUS_REAR_LEFT_POPPED = 4,
VEHICLE_TIRE_STATUS_REAR_RIGHT_POPPED = 1,
#endif
CARTYRE_FRONT_LEFT_POPPED = 8,
CARTYRE_FRONT_RIGHT_POPPED = 2,
CARTYRE_REAR_LEFT_POPPED = 4,
CARTYRE_REAR_RIGHT_POPPED = 1,
CARTIRE_FRONT_LEFT_POPPED = 8,
CARTIRE_FRONT_RIGHT_POPPED = 2,
CARTIRE_REAR_LEFT_POPPED = 4,
CARTIRE_REAR_RIGHT_POPPED = 1
}
static stock VEHICLE_TYRE_STATUS:_@VEHICLE_TYRE_STATUS() { return __VEHICLE_TYRE_STATUS; }
#define UNKNOWN_VEHICLE_TYRE_STATUS (VEHICLE_TYRE_STATUS:-1)
#define VEHICLE_TYRE_STATUS_NONE (VEHICLE_TYRE_STATUS:0)
#if __namemax > 31
#define VEHICLE_TYRE_STATUS_FRONT_LEFT_POPPED (VEHICLE_TYRE_STATUS:8)
#define VEHICLE_TYRE_STATUS_FRONT_RIGHT_POPPED (VEHICLE_TYRE_STATUS:2)
#define VEHICLE_TYRE_STATUS_REAR_LEFT_POPPED (VEHICLE_TYRE_STATUS:4)
#define VEHICLE_TYRE_STATUS_REAR_RIGHT_POPPED (VEHICLE_TYRE_STATUS:1)
#define VEHICLE_TIRE_STATUS_FRONT_LEFT_POPPED (VEHICLE_TYRE_STATUS:8)
#define VEHICLE_TIRE_STATUS_FRONT_RIGHT_POPPED (VEHICLE_TYRE_STATUS:2)
#define VEHICLE_TIRE_STATUS_REAR_LEFT_POPPED (VEHICLE_TYRE_STATUS:4)
#define VEHICLE_TIRE_STATUS_REAR_RIGHT_POPPED (VEHICLE_TYRE_STATUS:1)
#endif
#define CARTYRE_FRONT_LEFT_POPPED (VEHICLE_TYRE_STATUS:8)
#define CARTYRE_FRONT_RIGHT_POPPED (VEHICLE_TYRE_STATUS:2)
#define CARTYRE_REAR_LEFT_POPPED (VEHICLE_TYRE_STATUS:4)
#define CARTYRE_REAR_RIGHT_POPPED (VEHICLE_TYRE_STATUS:1)
#define CARTIRE_FRONT_LEFT_POPPED (VEHICLE_TYRE_STATUS:8)
#define CARTIRE_FRONT_RIGHT_POPPED (VEHICLE_TYRE_STATUS:2)
#define CARTIRE_REAR_LEFT_POPPED (VEHICLE_TYRE_STATUS:4)
#define CARTIRE_REAR_RIGHT_POPPED (VEHICLE_TYRE_STATUS:1)
/// <p/>
/**
* <library>omp_vehicle</library>
*/
#define LANDING_GEAR_STATE: __TAG(LANDING_GEAR_STATE):
enum LANDING_GEAR_STATE:__LANDING_GEAR_STATE
{
LANDING_GEAR_STATE_DOWN = 0,
LANDING_GEAR_STATE_UP
}
static stock LANDING_GEAR_STATE:_@LANDING_GEAR_STATE() { return __LANDING_GEAR_STATE; }
#define LANDING_GEAR_STATE_DOWN (LANDING_GEAR_STATE:0)
#define LANDING_GEAR_STATE_UP (LANDING_GEAR_STATE:1)
/*
888b 88 88
8888b 88 ,d ""
88 `8b 88 88
88 `8b 88 ,adPPYYba, MM88MMM 88 8b d8 ,adPPYba, ,adPPYba,
88 `8b 88 "" `Y8 88 88 `8b d8' a8P_____88 I8[ ""
88 `8b 88 ,adPPPPP88 88 88 `8b d8' 8PP""""""" `"Y8ba,
88 `8888 88, ,88 88, 88 `8b,d8' "8b, ,aa aa ]8I
88 `888 `"8bbdP"Y8 "Y888 88 "8" `"Ybbd8"' `"YbbdP"'
*/
/**
* <library>omp_vehicle</library>
* <summary>Adds a 'static' vehicle (models are pre-loaded for players) to the gamemode.</summary>
* <param name="modelid">The <a href="https://www.open.mp/docs/scripting/resources/vehicleid">Model ID</a> for the
* vehicle</param>
* <param name="spawnX">The x coordinate of the spawnpoint of this vehicle</param>
* <param name="spawnY">The y coordinate of the spawnpoint of this vehicle</param>
* <param name="spawnZ">The z coordinate of the spawnpoint of this vehicle</param>
* <param name="angle">Direction of vehicle - angle</param>
* <param name="colour1">The primary <a href="https://www.open.mp/docs/scripting/resources/vehiclecolorid">colour ID</a>. <b><c>-1</c></b>
* for random (random colour chosen by client)</param>
* <param name="colour2">The secondary <a href="https://www.open.mp/docs/scripting/resources/vehiclecolorid">colour ID</a>.
* <b><c>-1</c></b> for random (random colour chosen by client)</param>
* <returns>
* <ul>
* <li>The vehicle ID of the vehicle created (between <b><c>1</c></b> and <b><c>MAX_VEHICLES</c></b>).</li>
* <li><b><c>INVALID_VEHICLE_ID</c></b> (<b><c>65535</c></b>) if vehicle was not created (vehicle
* limit reached or invalid vehicle model ID passed).</li>
* </ul>
* </returns>
* <remarks>Can only be used when the server first starts (under <a href="#OnGameModeInit">OnGameModeInit</a>).</remarks>
* <seealso name="AddStaticVehicleEx" />
* <seealso name="CreateVehicle" />
* <seealso name="DestroyVehicle" />
*/
native AddStaticVehicle(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, colour1, colour2);
/**
* <library>omp_vehicle</library>
* <summary>Adds a 'static' vehicle (models are pre-loaded for players)to the gamemode. Differs from
* <a href="#AddStaticVehicle">AddStaticVehicle</a> in only one way: allows a respawn time to be set
* for when the vehicle is left unoccupied by the driver.</summary>
* <param name="modelid">The <a href="https://www.open.mp/docs/scripting/resources/vehicleid">Model ID</a> for the
* vehicle</param>
* <param name="spawnX">The x coordinate of the spawnpoint of this vehicle</param>
* <param name="spawnY">The y coordinate of the spawnpoint of this vehicle</param>
* <param name="spawnZ">The z coordinate of the spawnpoint of this vehicle</param>
* <param name="angle">Direction of vehicle - angle</param>
* <param name="colour1">The primary <a href="https://www.open.mp/docs/scripting/resources/vehiclecolorid">colour ID</a>. <b><c>-1</c></b>
* for random (random colour chosen by client)</param>
* <param name="colour2">The secondary <a href="https://www.open.mp/docs/scripting/resources/vehiclecolorid">colour ID</a>.
* <b><c>-1</c></b> for random (random colour chosen by client)</param>
* <param name="respawnDelay">The delay until the car is respawned without a driver, in seconds</param>
* <param name="addSiren"><b>Added in 0.3.7; will not work in earlier versions.</b> Enables the vehicle
* to have a siren, providing the vehicle has a horn (optional=<b><c>0</c></b>)</param>
* <returns>
* <ul>
* <li>The vehicle ID of the vehicle created (between <b><c>1</c></b> and <b><c>MAX_VEHICLES</c></b>).</li>
* <li><b><c>INVALID_VEHICLE_ID</c></b> (<b><c>65535</c></b>) if vehicle was not created (vehicle
* limit reached or invalid vehicle model ID passed).</li>
* </ul>
* </returns>
* <remarks>Can only be used when the server first starts (under <a href="#OnGameModeInit">OnGameModeInit</a>).</remarks>
* <seealso name="AddStaticVehicle" />
* <seealso name="CreateVehicle" />
* <seealso name="DestroyVehicle" />
*/
native AddStaticVehicleEx(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, colour1, colour2, respawnDelay, bool:addSiren = false);
/**
* <library>omp_vehicle</library>
* <summary>Creates a vehicle in the world. Can be used in place of <a href="#AddStaticVehicleEx">AddStaticVehicleEx</a>
* at any time in the script.</summary>
* <param name="modelid">The <a href="https://www.open.mp/docs/scripting/resources/vehicleid">model</a> for the vehicle</param>
* <param name="spawnX">The x coordinate for the vehicle</param>
* <param name="spawnY">The y coordinate for the vehicle</param>
* <param name="spawnZ">The z coordinate for the vehicle</param>
* <param name="angle">The facing angle for the vehicle</param>
* <param name="colour1">The primary <a href="https://www.open.mp/docs/scripting/resources/vehiclecolorid">colour ID</a></param>
* <param name="colour2">The secondary <a href="https://www.open.mp/docs/scripting/resources/vehiclecolorid">colour ID</a></param>
* <param name="respawnDelay">The delay until the car is respawned without a driver in <b>seconds</b>.
* Using <b><c>-1</c></b> will prevent the vehicle from respawning</param>
* <param name="addSiren"><b>Added in 0.3.7; will not work in earlier versions</b>. Enables the vehicle
* to have a siren, providing the vehicle has a horn (optional=<b><c>false</c></b>)</param>
* <seealso name="DestroyVehicle" />
* <seealso name="AddStaticVehicle" />
* <seealso name="AddStaticVehicleEx" />
* <seealso name="GetVehicleParamsSirenState" />
* <seealso name="OnVehicleSpawn" />
* <seealso name="OnVehicleSirenStateChange" />
* <remarks>Trains can only be added with AddStaticVehicle and AddStaticVehicleEx.</remarks>
* <returns>
* The vehicle ID of the vehicle created (<b><c>1</c></b> to <b><c>MAX_VEHICLES</c></b>).<br />
* <b><c>INVALID_VEHICLE_ID (65535)</c></b> if vehicle was not created (vehicle limit reached or invalid
* vehicle model ID passed).
* </returns>
*/
native CreateVehicle(modelid, Float:spawnX, Float:spawnY, Float:spawnZ, Float:angle, colour1, colour2, respawnDelay, bool:addSiren = false);
/**
* <library>omp_vehicle</library>
* <summary>Destroy a vehicle. It will disappear instantly.</summary>
* <param name="vehicleid">The ID of the vehicle to destroy</param>
* <seealso name="CreateVehicle" />
* <seealso name="RemovePlayerFromVehicle" />
* <seealso name="SetVehicleToRespawn" />
* <returns>
* <b><c>1</c></b>: The function executed successfully.<br />
* <b><c>0</c></b>: The function failed to execute. The vehicle does not exist.
* </returns>
*/
native bool:DestroyVehicle(vehicleid);
/**
* <library>omp_vehicle</library>
* <summary>Checks if a vehicle is streamed in for a player. Only nearby vehicles are streamed in (visible)
* for a player.</summary>
* <param name="vehicleid">The ID of the vehicle to check</param>
* <param name="playerid">The ID of the player to check</param>
* <seealso name="IsPlayerStreamedIn" />
* <seealso name="OnVehicleStreamIn" />
* <seealso name="OnVehicleStreamOut" />
* <seealso name="OnPlayerStreamIn" />
* <seealso name="OnPlayerStreamOut" />
* <returns>
* <b><c>0</c></b>: Vehicle is not streamed in for the player, or the function failed to execute (player
* and/or vehicle do not exist).<br />
* <b><c>1</c></b>: Vehicle is streamed in for the player.
* </returns>
*/
native bool:IsVehicleStreamedIn(vehicleid, playerid);
/**
* <library>omp_vehicle</library>
* <summary>Gets the position of a vehicle.</summary>
* <param name="vehicleid">The ID of the vehicle to get the position of</param>
* <param name="x">A float variable in which to store the x coordinate, passed by reference</param>
* <param name="y">A float variable in which to store the y coordinate, passed by reference</param>
* <param name="z">A float variable in which to store the z coordinate, passed by reference</param>
* <seealso name="GetVehicleDistanceFromPoint" />
* <seealso name="SetVehiclePos" />
* <seealso name="GetVehicleZAngle" />
* <returns>
* <b><c>1</c></b>: The function executed successfully.<br />
* <b><c>0</c></b>: The function failed to execute. The vehicle specified does not exist.
* </returns>
*/
native bool:GetVehiclePos(vehicleid, &Float:x, &Float:y, &Float:z);
/**
* <library>omp_vehicle</library>
* <summary>Set a vehicle's position.</summary>
* <param name="vehicleid">Vehicle ID that you want set new position</param>
* <param name="x">The x coordinate to position the vehicle at</param>
* <param name="y">The y coordinate to position the vehicle at</param>
* <param name="z">The z coordinate to position the vehicle at</param>
* <seealso name="SetPlayerPos" />
* <seealso name="GetVehiclePos" />
* <seealso name="SetVehicleZAngle" />
* <remarks>An empty vehicle will not fall after being teleported into the air.</remarks>
* <returns>
* <b><c>1</c></b>: The function executed successfully.<br />
* <b><c>0</c></b>: The function failed to execute. The vehicle specified does not exist.
* </returns>
*/
native bool:SetVehiclePos(vehicleid, Float:x, Float:y, Float:z);
/**
* <library>omp_vehicle</library>
* <summary>Get the rotation of a vehicle on the z axis (yaw).</summary>
* <param name="vehicleid">The ID of the vehicle to get the z angle of</param>
* <param name="angle">A float variable in which to store the z rotation, passed by reference</param>
* <seealso name="GetVehicleRotationQuat" />
* <seealso name="GetVehicleRotation" />
* <seealso name="SetVehicleZAngle" />
* <seealso name="GetVehiclePos" />
* <seealso name="GetPlayerFacingAngle" />
* <returns>
* <b><c>1</c></b>: The function executed successfully.<br />
* <b><c>0</c></b>: The function failed to execute. This means the vehicle does not exist.
* </returns>
*/
native bool:GetVehicleZAngle(vehicleid, &Float:angle);
/**
* <library>omp_vehicle</library>
* <summary>Returns a vehicle's rotation on all axes as a quaternion.</summary>
* <param name="vehicleid">The ID of the vehicle to get the rotation of</param>
* <param name="w">A float variable in which to store the first quaternion angle, passed by reference</param>
* <param name="x">A float variable in which to store the second quaternion angle, passed by reference</param>
* <param name="y">A float variable in which to store the third quaternion angle, passed by reference</param>
* <param name="z">A float variable in which to store the fourth quaternion angle, passed by reference</param>
* <seealso name="GetVehicleZAngle" />
* <remarks>
* <b>To euler:</b><br />
* <code>
* // GetVehicleRotation Created by IllidanS4<br />
* stock GetVehicleRotation(vehicleid, &Float:rx, &Float:ry, &Float:rz)<br />
* {<br />
* new Float:qw, Float:qx, Float:qy, Float:qz;<br />
* GetVehicleRotationQuat(vehicleid, qw, qx, qy, qz);<br />
* rx = asin((2 * qy * qz) - (2 * qx * qw));<br />
* ry = -atan2((qx * qz) + (qy * qw), 0.5 - (qx * qx) - (qy * qy));<br />
* rz = -atan2((qx * qy) + (qz * qw), 0.5 - (qx * qx) - (qz * qz));<br />
* }
* </code>
* </remarks>
* <remarks>There is no 'set' variation of this function; you can not SET a vehicle's rotation (apart
* from the <a href="#SetVehicleZAngle">z angle</a>) </remarks>
* <remarks>This function may return incorrect values for unoccupied vehicles. The reason is that the
* third row of the vehicle's internal rotation matrix gets corrupted if it gets updated while unoccupied.
* </remarks>
* <returns>
* <b><c>1</c></b>: The function executed successfully.<br />
* <b><c>0</c></b>: The function failed to execute. This means the vehicle specified does not exist.
* </returns>
*/
native bool:GetVehicleRotationQuat(vehicleid, &Float:w, &Float:x, &Float:y, &Float:z);
/**
* <library>omp_vehicle</library>
* <summary>This function can be used to calculate the distance (as a float) between a vehicle and another
* map coordinate. This can be useful to detect how far a vehicle away is from a location.</summary>
* <param name="vehicleid">The ID of the vehicle to calculate the distance for</param>
* <param name="x">The x map coordinate</param>
* <param name="y">The y map coordinate</param>
* <param name="z">The z map coordinate</param>
* <seealso name="GetPlayerDistanceFromPoint" />
* <seealso name="GetVehiclePos" />
* <returns>A float containing the distance from the point specified in the coordinates.</returns>
*/
native Float:GetVehicleDistanceFromPoint(vehicleid, Float:x, Float:y, Float:z);
/**
* <library>omp_vehicle</library>
* <summary>Set the z rotation (yaw) of a vehicle.</summary>
* <param name="vehicleid">The ID of the vehicle to set the rotation of</param>
* <param name="angle">The z angle to set</param>
* <seealso name="GetVehicleZAngle" />
* <seealso name="SetVehiclePos" />
* <remarks>A vehicle's x and y (pitch and roll) rotation will be reset when this function is used.
* The x and y rotations can not be set.</remarks>
* <remarks>This function does not work on unoccupied vehicles.</remarks>
* <returns>
* <b><c>1</c></b>: The function executed successfully.<br />
* <b><c>0</c></b>: The function failed to execute. The vehicle specified does not exist.
* </returns>
*/
native bool:SetVehicleZAngle(vehicleid, Float:angle);
/**
* <library>omp_vehicle</library>
* <summary>Set the parameters of a vehicle for a player.</summary>
* <param name="vehicle">The ID of the vehicle to set the parameters of</param>
* <param name="playerid">The ID of the player to set the vehicle's parameters for</param>
* <param name="objective"><b><c>0</c></b> to disable the objective or <b><c>1</c></b> to show it.
* This is a bobbing yellow arrow above the vehicle</param>
* <param name="doors"><b><c>0</c></b> to unlock the doors or <b><c>1</c></b> to lock them</param>
* <seealso name="SetVehicleParamsEx" />
* <remarks>Vehicles must be respawned for the 'objective' to be removed. This can be circumvented
* somewhat using Get/SetVehicleParamsEx which do not require the vehicle to be respawned. It is worth
* noting however that the object will be disabled on a global scale, and this is only useful if only
* one player has the vehicle as an objective.</remarks>
* <remarks>Since <b>0.3a</b> you will have to reapply this function when <a href="#OnVehicleStreamIn">OnVehicleStreamIn</a>
* is called.</remarks>
* <returns>
* <b><c>1</c></b>: The function executed successfully.<br />
* <b><c>0</c></b>: The function failed to execute. The player and/or vehicle specified do not exist.
* </returns>
*/
native bool:SetVehicleParamsForPlayer(vehicleid, playerid, objective = -1, doors = -1);
/**
* <library>omp_vehicle</library>
* <summary>Use this function before any player connects (<a href="#OnGameModeInit">OnGameModeInit</a>)
* to tell all clients that the script will control vehicle engines and lights. This prevents the game
* automatically turning the engine on/off when players enter/exit vehicles and headlights automatically
* coming on when it is dark.</summary>
* <seealso name="SetVehicleParamsEx" />
* <seealso name="GetVehicleParamsEx" />
* <seealso name="SetVehicleParamsForPlayer" />
* <remarks>Is it not possible to reverse this function after it has been used. You must either use
* it or not use it.</remarks>
* <returns>This function always returns <b><c>1</c></b>. It cannot fail to execute.</returns>
*/
native void:ManualVehicleEngineAndLights();
/**
* <library>omp_vehicle</library>
* <summary>Sets a vehicle's parameters for all players.</summary>
* <param name="vehicleid">The ID of the vehicle to set the parameters of</param>
* <param name="engine">Engine status. <b><c>0</c></b> - Off, <b><c>1</c></b> - On</param>
* <param name="lights">Light status. <b><c>0</c></b> - Off, <b><c>1</c></b> - On</param>
* <param name="alarm">Vehicle alarm status. If on, the alarm starts. <b><c>0</c></b> - Off, <b><c>1</c></b>
* - On</param>
* <param name="doors">Door lock status. <b><c>0</c></b> - Unlocked, <b><c>1</c></b> - Locked</param>
* <param name="bonnet">Bonnet (hood) status. <b><c>0</c></b> - Closed, <b><c>1</c></b> - Open</param>
* <param name="boot">Boot/trunk status. <b><c>0</c></b> - Closed, <b><c>1</c></b> - Open</param>
* <param name="objective">Toggle the objective arrow above the vehicle. <b><c>0</c></b> - Off, <b><c>1</c></b>
* - On</param>
* <seealso name="GetVehicleParamsEx" />
* <seealso name="SetVehicleParamsForPlayer" />
* <seealso name="UpdateVehicleDamageStatus" />
* <remarks>The alarm will not reset when finished, you'll need to reset it by yourself with this function.
* </remarks>
* <remarks>Lights also operate during the day (Only when <a href="#ManualVehicleEngineAndLights">ManualVehicleEngineAndLights</a>
* is enabled). </remarks>
* <returns>
* <b><c>1</c></b>: The function executed successfully.<br />
* <b><c>0</c></b>: The function failed to execute. This means the vehicle does not exist.
* </returns>
*/
native bool:SetVehicleParamsEx(vehicleid, engine = -1, lights = -1, alarm = -1, doors = -1, bonnet = -1, boot = -1, objective = -1);
/**
* <library>omp_vehicle</library>
* <summary>Gets a vehicle's parameters.</summary>
* <param name="vehicleid">The ID of the vehicle to get the parameters from</param>
* <param name="engine">Get the engine status. If <b><c>1</c></b>, the engine is running.</param>
* <param name="lights">Get the vehicle's lights' state. If <b><c>1</c></b> the lights are on</param>
* <param name="alarm">Get the vehicle's alarm state. If <b><c>1</c></b> the alarm is (or was) sounding</param>
* <param name="doors">Get the lock status of the doors. If <b><c>1</c></b> the doors are locked</param>
* <param name="bonnet">Get the bonnet/hood status. If <b><c>1</c></b>, it's open</param>
* <param name="boot">Get the boot/trunk status. <b><c>1</c></b> means it is open</param>
* <param name="objective">Get the objective status. <b><c>1</c></b> means the objective is on</param>
* <seealso name="SetVehicleParamsEx" />
* <remarks>If a parameter is unset (SetVehicleParamsEx not used beforehand) the value will be <b><c>-1</c></b>
* ('unset').</remarks>
*/
native bool:GetVehicleParamsEx(vehicleid, &engine = -1, &lights = -1, &alarm = -1, &doors = -1, &bonnet = -1, &boot = -1, &objective = -1);
/**
* <library>omp_vehicle</library>
*/
native bool:SetVehicleParamsSirenState(vehicleid, bool:enabled);
/**
* <library>omp_vehicle</library>
* <summary>Returns a vehicle's siren state (on/off).</summary>
* <param name="vehicleid">The ID of the vehicle to get the siren state of</param>
* <seealso name="OnVehicleSirenStateChange" />
* <returns><b><c>-1</c></b> if unset (off), <b><c>0</c></b> if off, <b><c>1</c></b> if on</returns>
*/
native GetVehicleParamsSirenState(vehicleid);
/**
* <library>omp_vehicle</library>
* <summary>Allows you to open and close the doors of a vehicle.</summary>
* <param name="vehicleid">The ID of the vehicle to set the door state of</param>
* <param name="frontLeft">The state of the driver's door. <b><c>1</c></b> to open, <b><c>0</c></b>
* to close</param>
* <param name="frontRight">The state of the passenger door. <b><c>1</c></b> to open, <b><c>0</c></b>
* to close</param>
* <param name="rearLeft">The state of the rear left door (if available). <b><c>1</c></b> to open, <b><c>0</c></b>
* to close</param>
* <param name="rearRight">The state of the rear right door (if available). <b><c>1</c></b> to open,
* <b><c>0</c></b> to close</param>
* <seealso name="GetVehicleParamsCarDoors" />
* <seealso name="SetVehicleParamsCarWindows" />
* <seealso name="GetVehicleParamsCarWindows" />
* <remarks><b><c>1</c></b> is open, <b><c>0</c></b> is closed</remarks>
*/
native bool:SetVehicleParamsCarDoors(vehicleid, frontLeft = -1, frontRight = -1, rearLeft = -1, rearRight = -1);
/**
* <library>omp_vehicle</library>
* <summary>Allows you to retrieve the current state of a vehicle's doors.</summary>
* <param name="vehicleid">The ID of the vehicle</param>
* <param name="frontLeft">The integer to save the state of the driver's door to</param>
* <param name="frontRight">The integer to save the state of the passenger's door to</param>
* <param name="rearLeft">The integer to save the state of the rear left door to (if available)</param>
* <param name="rearRight">The integer to save the state of the rear right door to (if available)</param>
* <seealso name="SetVehicleParamsCarDoors" />
* <seealso name="SetVehicleParamsCarWindows" />
* <seealso name="GetVehicleParamsCarWindows" />
* <remarks>The values returned in each variable are as follows: <b><c>-1</c></b> if not set, <b><c>0</c></b>
* if closed, <b><c>1</c></b> if open.</remarks>
*/
native bool:GetVehicleParamsCarDoors(vehicleid, &frontLeft = -1, &frontRight = -1, &rearLeft = -1, &rearRight = -1);
/**
* <library>omp_vehicle</library>
* <summary>Allows you to open and close the windows of a vehicle.</summary>
* <param name="vehicleid">The ID of the vehicle to set the window state of</param>
* <param name="frontLeft">The state of the driver's window. <b><c>0</c></b> to open, <b><c>1</c></b>
* to close</param>
* <param name="frontRight">The state of the passenger window. <b><c>0</c></b> to open, <b><c>1</c></b>
* to close</param>
* <param name="rearLeft">The state of the rear left window (if available). <b><c>0</c></b> to open,
* <b><c>1</c></b> to close</param>
* <param name="rearRight">The state of the rear right window (if available). <b><c>0</c></b> to open,
* <b><c>1</c></b> to close</param>
* <seealso name="SetVehicleParamsCarDoors" />
* <seealso name="GetVehicleParamsCarDoors" />
* <seealso name="GetVehicleParamsCarWindows" />
*/
native bool:SetVehicleParamsCarWindows(vehicleid, frontLeft = -1, frontRight = -1, rearLeft = -1, rearRight = -1);
/**
* <library>omp_vehicle</library>
* <summary>Allows you to retrieve the current state of a vehicle's windows.</summary>
* <param name="vehicleid">The ID of the vehicle</param>
* <param name="frontLeft">The integer to save the state of the drivers window to</param>
* <param name="frontRight">The integer to save the state of the passengers window to</param>
* <param name="rearLeft">The integer to save the state of the rear left window to (if available)</param>
* <param name="rearRight">The integer to save the state of the rear right window to (if available)</param>
* <seealso name="SetVehicleParamsCarWindows" />
* <seealso name="GetVehicleParamsCarDoors" />
* <seealso name="SetVehicleParamsCarDoors" />
* <remarks>The values returned in each variable are as follows: <b><c>-1</c></b> if not set, <b><c>0</c></b>
* if closed, <b><c>1</c></b> if open.</remarks>
* <returns>The vehicle's windows state is stored in the specified variables.</returns>
*/
native bool:GetVehicleParamsCarWindows(vehicleid, &frontLeft = -1, &frontRight = -1, &rearLeft = -1, &rearRight = -1);
/**
* <library>omp_vehicle</library>
* <summary>Sets a vehicle back to the position at where it was created.</summary>
* <param name="vehicleid">The ID of the vehicle to respawn</param>
* <seealso name="CreateVehicle" />
* <seealso name="DestroyVehicle" />
* <returns>
* <b><c>1</c></b>: The function executed successfully.<br />
* <b><c>0</c></b>: The function failed to execute. The vehicle does not exist.
* </returns>
*/
native bool:SetVehicleToRespawn(vehicleid);
/**
* <library>omp_vehicle</library>
* <summary>Links a vehicle to an interior. Vehicles can only be seen by players in the same interior
* (<a href="#SetPlayerInterior">SetPlayerInterior</a>).</summary>
* <param name="vehicleid">The ID of the vehicle to link to an interior</param>
* <param name="interiorid">The <a href="https://www.open.mp/docs/scripting/resources/interiorids">Interior ID</a> to
* link it to</param>
* <seealso name="SetVehicleVirtualWorld" />
* <seealso name="SetPlayerInterior" />
* <returns>
* <b><c>1</c></b>: The function executed successfully.<br />
* <b><c>0</c></b>: The function failed to execute. This means the vehicle does not exist.<br />
* </returns>
*/
native bool:LinkVehicleToInterior(vehicleid, interiorid);
/**
* <library>omp_vehicle</library>
* <summary>Adds a 'component' (often referred to as a 'mod' (modification)) to a vehicle. Valid components
* can be found <a href="https://www.open.mp/docs/scripting/resources/carcomponentid">here</a>.</summary>
* <param name="vehicleid">The ID of the vehicle to add the component to. Not to be confused with <a
* href="https://sampwiki.blast.hk/wiki/Confuse_modelid">modelid</a></param>
* <param name="component">The <a href="https://www.open.mp/docs/scripting/resources/carcomponentid">ID of the component</a>
* to add to the vehicle</param>
* <returns>
* <ul>
* <li><b><c>0</c></b> - The component was not added because the vehicle does not exist.</li>
* <li><b><c>1</c></b> - The component was successfully added to the vehicle.</li>
* </ul>
* </returns>
* <remarks>Using an invalid <a href="https://www.open.mp/docs/scripting/resources/carcomponentid">component ID</a>
* crashes the player's game. There are no internal checks for this.</remarks>
* <seealso name="RemoveVehicleComponent" />
* <seealso name="GetVehicleComponentInSlot" />
* <seealso name="GetVehicleComponentType" />
* <seealso name="OnVehicleMod" />
* <seealso name="OnEnterExitModShop" />
*/
native bool:AddVehicleComponent(vehicleid, component);
/**
* <library>omp_vehicle</library>
* <summary>Remove a component from a vehicle.</summary>
* <param name="vehicleid">ID of the vehicle.</param>
* <param name="component">ID of the <a href="https://www.open.mp/docs/scripting/resources/carcomponentid">component</a>
* to remove.</param>
* <seealso name="AddVehicleComponent" />
* <seealso name="GetVehicleComponentInSlot" />
* <seealso name="GetVehicleComponentType" />
* <seealso name="OnVehicleMod" />
* <seealso name="OnEnterExitModShop" />
*/
native bool:RemoveVehicleComponent(vehicleid, component);
/**
* <library>omp_vehicle</library>
* <summary>Is this component legal on this vehicle?</summary>
* <param name="vehicleid">ID of the vehicle.</param>
* <param name="component">ID of the <a href="https://www.open.mp/docs/scripting/resources/carcomponentid">component</a>
* to check.</param>
* <seealso name="AddVehicleComponent" />
* <seealso name="GetVehicleComponentInSlot" />
* <seealso name="GetVehicleComponentType" />
* <seealso name="OnVehicleMod" />
* <seealso name="OnEnterExitModShop" />
*/
native bool:VehicleCanHaveComponent(vehicleid, componentid);
/**
* <library>omp_vehicle</library>
* <summary>Gets the number of seats for a vehicle model.</summary>
* <param name="vehicleid">ID of the vehicle model.</param>
* <returns>
* <b><c>number of seats</c></b>: The number of seats as an integer.<br />
* </returns>
*/
native GetVehicleSeats(vehicleid);
/**
* <library>omp_vehicle</library>
* <summary>Gets the number of seats for a vehicle model.</summary>
* <param name="modelid">The ID of the vehicle model.</param>
* <returns>
* <b><c>number of seats</c></b>: The number of seats as an integer.<br />
* </returns>
*/
native GetVehicleMaxPassengers(vehicleid) = GetVehicleSeats;
/**
* <library>omp_vehicle</library>
* <summary>Change a vehicle's primary and secondary colours.</summary>
* <param name="vehicleid">The ID of the vehicle to change the colours of</param>
* <param name="color1">The new vehicle's primary <a href="https://www.open.mp/docs/scripting/resources/vehiclecolorid">colour
* ID</a></param>
* <param name="color2">The new vehicle's secondary <a href="https://www.open.mp/docs/scripting/resources/vehiclecolorid">colour
* ID</a></param>
* <seealso name="ChangeVehiclePaintjob" />
* <seealso name="OnVehicleRespray" />
* <remarks>Some vehicles have only a primary colour and some can not have the colour changed at all.
* A few (cement, squallo) have 4 colours, of which 2 can not currently be changed.</remarks>
* <returns>
* <b><c>1</c></b>: The function executed successfully. The vehicle's colour was successfully changed.<br
* />
* <b><c>0</c></b>: The function failed to execute. The vehicle does not exist.
* </returns>
*/
#if !defined MIXED_SPELLINGS
#pragma deprecated Use `ChangeVehicleColours`. To silence this warning and use different spellings define `MIXED_SPELLINGS` or define `SAMP_COMPAT` for general SA-MP API compatibility.
#endif
native bool:ChangeVehicleColor(vehicleid, color1, color2);
/**
* <library>omp_vehicle</library>
* <summary>Change a vehicle's primary and secondary colours.</summary>
* <param name="vehicleid">The ID of the vehicle to change the colours of</param>
* <param name="colour1">The new vehicle's primary <a href="https://www.open.mp/docs/scripting/resources/vehiclecolorid">colour
* ID</a></param>
* <param name="colour2">The new vehicle's secondary <a href="https://www.open.mp/docs/scripting/resources/vehiclecolorid">colour
* ID</a></param>
* <seealso name="ChangeVehiclePaintjob" />
* <seealso name="OnVehicleRespray" />
* <remarks>Some vehicles have only a primary colour and some can not have the colour changed at all.
* A few (cement, squallo) have 4 colours, of which 2 can not currently be changed.</remarks>
* <returns>
* <b><c>1</c></b>: The function executed successfully. The vehicle's colour was successfully changed.<br
* />
* <b><c>0</c></b>: The function failed to execute. The vehicle does not exist.
* </returns>
*/
native bool:ChangeVehicleColours(vehicleid, colour1, colour2) = ChangeVehicleColor;
/**
* <library>omp_vehicle</library>
* <summary>Change a vehicle's paintjob (for plain colours see <a href="#ChangeVehicleColor">ChangeVehicleColor</a>).</summary>
* <param name="vehicleid">The ID of the vehicle to change the paintjob of</param>
* <param name="paintjob">The ID of the Paintjob to apply. Use <b><c>3</c></b> to remove a paintjob</param>
* <seealso name="ChangeVehicleColours" />
* <seealso name="OnVehiclePaintjob" />
* <remarks>
* <b>Known Bugs:</b><br />
* This function calls <a href="#OnVehicleRespray">OnVehicleRespray</a>.<br />
* Vehicles change their colour to white anymore when a paintjob is removed.
* </remarks>
* <returns>This function always returns <b><c>1</c></b> (success), even if the vehicle passed is not
* created.</returns>
*/
native bool:ChangeVehiclePaintjob(vehicleid, paintjob);
/**
* <library>omp_vehicle</library>
* <summary>Set a vehicle's health. When a vehicle's health decreases the engine will produce smoke,
* and finally fire when it decreases to less than 250 (25%).</summary>
* <param name="vehicleid">The ID of the vehicle to set the health of</param>
* <param name="health">The health, given as a float value</param>
* <seealso name="GetVehicleHealth" />
* <seealso name="RepairVehicle" />
* <seealso name="SetPlayerHealth" />
* <seealso name="OnVehicleDeath" />
* <remarks>Full vehicle health is <b><c>1000</c></b>, however higher values are possible and increase
* the health of the vehicle.</remarks>
* <remarks>
* <b>Health:</b><br />
* <ul>
* <li>> 650 - undamaged</li>