-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathvehicle_plus.inc
5265 lines (4911 loc) · 217 KB
/
vehicle_plus.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 _VEHICLE_PLUS_included
#endinput
#endif
#define _VEHICLE_PLUS_included
#include <open.mp>
#include <YSI_Data\y_foreach>
#include <YSI_Coding\y_timers>
#include <YSI_Coding\y_hooks>
#include <YSI_Game\y_vehicledata>
#include <streamer>
#include <errors>
/*
Since I don't know how to fix the tag mismatch warning,
where it happens on every line which performs tag checking,
for whether it is VehicleGroup: or _: a.k.a. no tag. Including
indirection before all YSI includes would literally "fix" all warning
including those which it shouldn't, or even sometimes, nothing would happen.
Warning is now disabled for this file.
Including a file after this library won't be affected by this.
If you encounter any bugs, I please you to open an issue on gihub, also
not to forget, documentation and wiki will be updated every new release.
> https://github.com/Mergevos/open-vehicle-plus
*/
#pragma warning push
#pragma warning disable 213
#if !defined RELEASED
#define RELEASED(%0) (((newkeys & (%0)) != (%0)) && ((oldkeys & (%0)) == (%0)))
#endif
#define VEHICLE_FRAMEWORK_TAGS \
{_, VehicleGroup}
#if !defined isnull
#define isnull(%1) ((!(%1[0])) || (((%1[0]) == '\1') && (!(%1[1]))))
#endif
native _Framework_CallLocalFunction(const function[], const format[], {VehicleGroup, Float,_}:...) = CallLocalFunction;
// --
// Script-Side
// --
#define MAX_VEHICLES_COMPONENTS 194
#define MAX_VEHICLE_COMPONENT_NAME 64
#define MAX_VEHICLES_MODELS 212
#define MAX_VEHICLE_COMPONENTS 48
#define INVALID_VEHICLE_COMPONENT_ID -1
#define BLINK_SIDES 4
static
Vehicle_gsOccupiedTick[MAX_VEHICLES],
Vehicle_gsRespawnTick[MAX_VEHICLES],
Vehicle_gsBlink[MAX_VEHICLES][BLINK_SIDES],
Timer: Vehicle_gsDistanceTimer[MAX_VEHICLES],
Float: Vehicle_gsPositionX[MAX_VEHICLES],
Float: Vehicle_gsPositionY[MAX_VEHICLES],
Float: Vehicle_gsPositionZ[MAX_VEHICLES],
Float: Vehicle_gsHealth[MAX_VEHICLES];
#if !defined MAX_NUMBER_PLATE
#define MAX_NUMBER_PLATE 32
#endif
#if !defined MAX_VEHICLE_GROUPS
#define MAX_VEHICLE_GROUPS 12
#endif
#define VEHICLE_UNIT: __TAG(VEHICLE_UNIT):
enum VEHICLE_UNIT:__VEHICLE_UNIT
{
VEHICLE_UNIT_METRIC,
VEHICLE_UNIT_IMPERIAL,
VEHICLE_UNIT_KILOWATT_HOUR
}
static stock VEHICLE_UNIT:_@VEHICLE_UNIT() { return __VEHICLE_UNIT; }
static const Float:Vehicle_gscPayNSprayLocations[10][3] = {
{1025.05, -1024.23, 32.1}, // LS Temple
{487.68, -1740.87, 11.13}, // LS Santa Maria
{-1420.73, 2583.37, 55.56}, // El Quebrados
{-1904.39, 284.97, 40.75}, // Wang Cars
{-2425.91, 1022.33, 50.10}, // Juniper Hill
{1975.60, 2162.16, 10.77}, // LV Redsands
{2065.38, -1831.51, 13.25}, // Idlewood
{-99.55, 1118.36, 19.44}, // Fort Carson
{721.07, -455.94, 16.04}, // Dillimore
{2393.74, 1493.01, 10.52} // LV Unused (Pyramid)
};
//--
// Header
// --
forward Error: Vehicle_GetTrailer(vehicleid, &output);
/**
* <library>omp_vehicle</library>
* <summary>Check if a vehicle ID is valid.</summary>
* <param name="vehicleid">The ID of the vehicle to check</param>
* <seealso name="CreateVehicle" />
* <seealso name="DestroyVehicle" />
* <returns>true or false.</returns>
*/
forward bool: IsPlayerInsidePaySpray(playerid);
/**
* <library>vehicle_plus</library>
* <summary>Gets vehicle fuel tank capacity.</summary>
* <param name="vehicleid">Vehicle.</param>
* <param name="unit">Unit we get capacity in.</param>
* <seealso name="Vehicle_SetFuelTankCapacity" />
* <seealso name="Vehicle_SetFuelConsumption" />
* <seealso name="Vehicle_GetFuelTankCapacity" />
* <seealso name="Vehicle_GetFuelLevel" />
* <seealso name="Vehicle_SetFuelLevel" />
* <seealso name="Vehicle_GetDistanceCanPass" />
* <seealso name="Vehicle_GetDistanceFromLastRefill" />
* <returns>INVALID_VEHICLE_ID if vehicle is invalid, tank capacity otherwise.</returns>
*/
forward Error: Vehicle_GetFuelTankCapacity(vehicleid, VEHICLE_UNIT: unit, &Float: output);
/**
* <library>vehicle_plus</library>
* <summary>Called when vehicle has been created.</summary>
* <param name="vehicleid">The ID of created vehicle.</param>
* <seealso name="Vehicle_Create" />
* <seealso name="Vehicle_CreateEx" />
* <seealso name="Vehicle_Destroy" />
* <seealso name="OnVehicleDestroy" />
* <returns>Doesn't return any specific value.</returns>
*/
forward OnVehicleFirstSpawn(vehicleid);
/**
* <library>vehicle_plus</library>
* <summary>Called when vehicle has been destroyed.</summary>
* <param name="vehicleid">The ID of destroyed vehicle.</param>
* <seealso name="Vehicle_Destroy" />
* <seealso name="Vehicle_Create" />
* <seealso name="Vehicle_CreateEx" />
* <seealso name="OnVehicleFirstSpawn" />
* <returns>Doesn't return any specific value.</returns>
*/
forward OnVehicleDestroy(vehicleid);
/**
* <library>vehicle_plus</library>
* <summary>Called when group has been initialized.</summary>
* <param name="VehicleGroup: groupid">The ID of initialized group.</param>
* <seealso name="Vehicle_GetGroupByName" />
* <seealso name="Vehicle_GroupHas" />
* <seealso name="Vehicle_GroupInit" />
* <seealso name="Vehicle_IsValidGroup" />
* <seealso name="Vehicle_AddToGroup" />
* <seealso name="Vehicle_RemoveFromGroup" />
* <seealso name="Vehicle_IsEmptyGroup" />
* <seealso name="Vehicle_GroupDestroy" />
* <seealso name="Vehicle_ClearGroup" />
* <seealso name="OnGroupAdd" />
* <seealso name="OnGroupRemoveMember" />
* <seealso name="OnGroupClear" />
* <returns>Doesn't return any specific value.</returns>
*/
forward OnGroupInitialize(VehicleGroup: groupid);
/**
* <library>vehicle_plus</library>
* <summary>Called when group has a member added.</summary>
* <param name="VehicleGroup: groupid">The ID of group that has member added.</param>
* <param name="vehicleid">The ID vehicle that has been added.</param>
* <seealso name="Vehicle_GetGroupByName" />
* <seealso name="Vehicle_GroupHas" />
* <seealso name="Vehicle_GroupInit" />
* <seealso name="Vehicle_IsValidGroup" />
* <seealso name="Vehicle_AddToGroup" />
* <seealso name="Vehicle_RemoveFromGroup" />
* <seealso name="Vehicle_IsEmptyGroup" />
* <seealso name="Vehicle_GroupDestroy" />
* <seealso name="Vehicle_ClearGroup" />
* <seealso name="OnGroupInitialize" />
* <seealso name="OnGroupRemoveMember" />
* <seealso name="OnGroupClear" />
* <returns>Doesn't return any specific value.</returns>
*/
forward OnGroupAdd(VehicleGroup: groupid, vehicleid);
/**
* <library>vehicle_plus</library>
* <summary>Called when group has a member removed.</summary>
* <param name="VehicleGroup: groupid">The ID of group that has member removed.</param>
* <param name="vehicleid">The ID vehicle that has been removed.</param>
* <seealso name="Vehicle_GetGroupByName" />
* <seealso name="Vehicle_GroupHas" />
* <seealso name="Vehicle_GroupInit" />
* <seealso name="Vehicle_IsValidGroup" />
* <seealso name="Vehicle_AddToGroup" />
* <seealso name="Vehicle_RemoveFromGroup" />
* <seealso name="Vehicle_IsEmptyGroup" />
* <seealso name="Vehicle_GroupDestroy" />
* <seealso name="Vehicle_ClearGroup" />
* <seealso name="OnGroupInitialize" />
* <seealso name="OnGroupAdd" />
* <seealso name="OnGroupClear" />
* <returns>Doesn't return any specific value.</returns>
*/
forward OnGroupRemoveMember(VehicleGroup: groupid, vehicleid);
/**
* <library>vehicle_plus</library>
* <summary>Called when group has been cleared.</summary>
* <param name="VehicleGroup: groupid">The ID of group that has been cleared.</param>
* <seealso name="Vehicle_GetGroupByName" />
* <seealso name="Vehicle_GroupHas" />
* <seealso name="Vehicle_GroupInit" />
* <seealso name="Vehicle_IsValidGroup" />
* <seealso name="Vehicle_AddToGroup" />
* <seealso name="Vehicle_RemoveFromGroup" />
* <seealso name="Vehicle_IsEmptyGroup" />
* <seealso name="Vehicle_GroupDestroy" />
* <seealso name="Vehicle_ClearGroup" />
* <seealso name="OnGroupInitialize" />
* <seealso name="OnGroupRemoveMember" />
* <seealso name="OnGroupAdd" />
* <returns>Doesn't return any specific value.</returns>
*/
forward OnGroupClear(VehicleGroup: groupid);
forward Error: Vehicle_GetFuelLevel(vehicleid, VEHICLE_UNIT: unit, &Float: output);
/**
* <summary>Called when vehicle's health change.</summary>
* <param name="vehicleid">Vehicle which health modified.</param>
* <param name="oldhealth">Old health.</param>
* <param name="newhealth">New health.</param>
* <seealso name="Vehicle_SetHealth" />
* <seealso name="Vehicle_GetHealth" />
* <seealso name="Vehicle_Repair" />
* <remarks>Called every 500 milliseconds.</remarks>
*/
forward OnVehicleHealthChange(vehicleid, Float: oldhealth, Float:newhealth);
forward OnVehicleDrivenDistanceUpdate(vehicleid);
forward OnTrailerHook(vehicleid, trailerid);
forward OnTrailerUnhook(vehicleid, trailerid);
forward OnVehiclePaintjobChange(vehicleid, paintjobid);
// --
// Vehicle Info
// --
#define DRIVE_TYPE: __TAG(DRIVE_TYPE):
enum DRIVE_TYPE:__DRIVE_TYPE
{
DRIVE_INVALID = 0,
DRIVE_4WD = 1,
DRIVE_FWD = 2,
DRIVE_RWD,
DRIVE_MANUAL
}
static stock DRIVE_TYPE:_@DRIVE_TYPE() { return __DRIVE_TYPE; }
#define ENGINE_TYPE: __TAG(ENGINE_TYPE):
enum ENGINE_TYPE:__ENGINE_TYPE
{
ENGINE_INVALID = 0,
ENGINE_PETROL = 1,
ENGINE_DIESEL = 2,
ENGINE_ELECTRIC
}
static stock ENGINE_TYPE:_@ENGINE_TYPE() { return __ENGINE_TYPE; }
static enum e_VEHICLE_INFO
{
E_VEHICLE_WINDOWS_NUMBER,
Float:E_VEHICLE_MASS,
DRIVE_TYPE: E_VEHICLE_DRIVE_TYPE,
ENGINE_TYPE: E_VEHICLE_ENGINE_TYPE,
E_VEHICLE_LIGHTS_NUMBER // rears are considered as one, while front ones are separated, bikes have 2 lights and 4-light vehs have 3
};
static const Vehicle_Info[212][e_VEHICLE_INFO] =
{
{4, 1700.0, DRIVE_4WD, ENGINE_DIESEL, 3},
{2, 1300.0, DRIVE_FWD, ENGINE_PETROL, 3},
{2, 1500.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 3800.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{4, 1200.0, DRIVE_FWD, ENGINE_PETROL, 3},
{4, 1600.0, DRIVE_RWD, ENGINE_PETROL, 3},
{1, 20000.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{2, 6500.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{2, 5500.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{4, 2200.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 1000.0, DRIVE_FWD, ENGINE_PETROL, 3},
{2, 1400.0, DRIVE_4WD, ENGINE_PETROL, 3},
{2, 1800.0, DRIVE_RWD, ENGINE_PETROL, 3},
{4, 2600.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{2, 3500.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{2, 1200.0, DRIVE_RWD, ENGINE_PETROL, 3},
{4, 2600.0, DRIVE_4WD, ENGINE_DIESEL, 3},
{2, 15000.0, DRIVE_4WD, ENGINE_PETROL, 0},
{4, 2000.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{2, 1800.0, DRIVE_RWD, ENGINE_PETROL, 3},
{4, 1450.0, DRIVE_FWD, ENGINE_PETROL, 3},
{2, 1850.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 1700.0, DRIVE_4WD, ENGINE_DIESEL, 3},
{2, 1700.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{0, 1200.0, DRIVE_RWD, ENGINE_PETROL, 3},
{1, 10000.0, DRIVE_4WD, ENGINE_PETROL, 0},
{4, 1600.0, DRIVE_RWD, ENGINE_PETROL, 3},
{4, 4000.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{2, 7000.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{2, 1400.0, DRIVE_RWD, ENGINE_PETROL, 3},
{0, 2200.0, DRIVE_RWD, ENGINE_PETROL, 0},
{2, 5500.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{0, 25000.0, DRIVE_4WD, ENGINE_DIESEL, 0},
{2, 10500.0, DRIVE_4WD, ENGINE_DIESEL, 3},
{2, 1400.0, DRIVE_RWD, ENGINE_PETROL, 3},
{0, 3800.0, DRIVE_RWD, ENGINE_DIESEL, 1},
{2, 1400.0, DRIVE_FWD, ENGINE_PETROL, 3},
{0, 9500.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{4, 1750.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 1600.0, DRIVE_RWD, ENGINE_PETROL, 3},
{4, 2000.0, DRIVE_FWD, ENGINE_PETROL, 3},
{0, 100.0, DRIVE_4WD, ENGINE_ELECTRIC, 0},
{2, 2500.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 8000.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{2, 5000.0, DRIVE_4WD, ENGINE_PETROL, 3},
{4, 1650.0, DRIVE_FWD, ENGINE_PETROL, 3},
{0, 2200.0, DRIVE_RWD, ENGINE_PETROL, 0},
{2, 3000.0, DRIVE_4WD, ENGINE_PETROL, 0},
{0, 350.0, DRIVE_RWD, ENGINE_PETROL, 2},
{0, 1900.0, DRIVE_RWD, ENGINE_PETROL, 3},
{0, 3800.0, DRIVE_RWD, ENGINE_DIESEL, 1},
{2, 1400.0, DRIVE_4WD, ENGINE_PETROL, 3},
{0, 2200.0, DRIVE_RWD, ENGINE_PETROL, 0},
{0, 5000.0, DRIVE_RWD, ENGINE_PETROL, 0},
{0, 2200.0, DRIVE_RWD, ENGINE_PETROL, 0},
{2, 8500.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{2, 4500.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{0, 1000.0, DRIVE_4WD, ENGINE_ELECTRIC, 3},
{4, 2000.0, DRIVE_RWD, ENGINE_PETROL, 3},
{4, 1900.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{2, 5000.0, DRIVE_4WD, ENGINE_PETROL, 0},
{0, 500.0, DRIVE_RWD, ENGINE_PETROL, 2},
{0, 350.0, DRIVE_RWD, ENGINE_PETROL, 2},
{0, 800.0, DRIVE_RWD, ENGINE_PETROL, 2},
{0, 100.0, DRIVE_FWD, ENGINE_PETROL, 0},
{0, 100.0, DRIVE_4WD, ENGINE_PETROL, 0},
{4, 1600.0, DRIVE_RWD, ENGINE_PETROL, 3},
{4, 1900.0, DRIVE_RWD, ENGINE_PETROL, 3},
{0, 500.0, DRIVE_RWD, ENGINE_PETROL, 2},
{2, 2500.0, DRIVE_4WD, ENGINE_PETROL, 0},
{4, 2500.0, DRIVE_4WD, ENGINE_PETROL, 3},
{0, 400.0, DRIVE_4WD, ENGINE_PETROL, 2},
{0, 1200.0, DRIVE_RWD, ENGINE_PETROL, 0},
{0, 800.0, DRIVE_RWD, ENGINE_PETROL, 0},
{2, 1950.0, DRIVE_FWD, ENGINE_PETROL, 3},
{2, 1700.0, DRIVE_RWD, ENGINE_PETROL, 3},
{1, 5000.0, DRIVE_4WD, ENGINE_PETROL, 0},
{2, 1400.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 1850.0, DRIVE_4WD, ENGINE_DIESEL, 3},
{4, 1500.0, DRIVE_FWD, ENGINE_PETROL, 3},
{2, 1400.0, DRIVE_4WD, ENGINE_PETROL, 3},
{0, 100.0, DRIVE_MANUAL, ENGINE_INVALID, 0},
{4, 1900.0, DRIVE_RWD, ENGINE_PETROL, 3},
{3, 1900.0, DRIVE_RWD, ENGINE_PETROL, 3},
{0, 5000.0, DRIVE_RWD, ENGINE_PETROL, 0},
{0, 1000.0, DRIVE_RWD, ENGINE_ELECTRIC, 3},
{0, 10000.0, DRIVE_4WD, ENGINE_DIESEL, 3},
{4, 5000.0, DRIVE_4WD, ENGINE_PETROL, 0},
{2, 3500.0, DRIVE_4WD, ENGINE_PETROL, 0},
{2, 2500.0, DRIVE_4WD, ENGINE_PETROL, 3},
{4, 3500.0, DRIVE_4WD, ENGINE_PETROL, 3},
{2, 1700.0, DRIVE_RWD, ENGINE_PETROL, 3},
{4, 1600.0, DRIVE_RWD, ENGINE_PETROL, 3},
{0, 3000.0, DRIVE_RWD, ENGINE_PETROL, 0},
{2, 1600.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 2000.0, DRIVE_4WD, ENGINE_PETROL, 3},
{2, 1000.0, DRIVE_FWD, ENGINE_PETROL, 3},
{4, 4500.0, DRIVE_4WD, ENGINE_PETROL, 0},
{2, 5500.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{2, 3500.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{2, 1300.0, DRIVE_4WD, ENGINE_DIESEL, 3},
{0, 100.0, DRIVE_4WD, ENGINE_PETROL, 0},
{2, 1600.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 1600.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 2100.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 2500.0, DRIVE_4WD, ENGINE_PETROL, 3},
{2, 1400.0, DRIVE_RWD, ENGINE_PETROL, 3},
{4, 2200.0, DRIVE_RWD, ENGINE_PETROL, 3},
{3, 3500.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{0, 100.0, DRIVE_MANUAL, ENGINE_INVALID, 0},
{0, 100.0, DRIVE_MANUAL, ENGINE_INVALID, 0},
{2, 10000.0, DRIVE_4WD, ENGINE_PETROL, 0},
{1, 5000.0, DRIVE_4WD, ENGINE_PETROL, 0},
{1, 5000.0, DRIVE_4WD, ENGINE_PETROL, 0},
{2, 3800.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{2, 5000.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{4, 1400.0, DRIVE_FWD, ENGINE_PETROL, 3},
{2, 1400.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 1700.0, DRIVE_RWD, ENGINE_PETROL, 3},
{0, 15000.0, DRIVE_4WD, ENGINE_PETROL, 0},
{1, 9000.0, DRIVE_4WD, ENGINE_PETROL, 0},
{0, 500.0, DRIVE_RWD, ENGINE_PETROL, 2},
{0, 400.0, DRIVE_RWD, ENGINE_PETROL, 2},
{0, 500.0, DRIVE_RWD, ENGINE_PETROL, 2},
{2, 5500.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{2, 3500.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{2, 1700.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 1200.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 4000.0, DRIVE_4WD, ENGINE_DIESEL, 3},
{4, 1800.0, DRIVE_RWD, ENGINE_PETROL, 3},
{0, 1000.0, DRIVE_FWD, ENGINE_ELECTRIC, 3},
{0, 2000.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{1, 8500.0, DRIVE_4WD, ENGINE_DIESEL, 3},
{2, 1600.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 1800.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 1950.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 1500.0, DRIVE_RWD, ENGINE_PETROL, 3},
{0, 5500.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{0, 5500.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{0, 1900.0, DRIVE_RWD, ENGINE_PETROL, 0},
{4, 1800.0, DRIVE_FWD, ENGINE_PETROL, 3},
{2, 1200.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 1600.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 1700.0, DRIVE_4WD, ENGINE_DIESEL, 3},
{2, 6500.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{2, 1700.0, DRIVE_RWD, ENGINE_PETROL, 3},
{4, 1800.0, DRIVE_RWD, ENGINE_PETROL, 3},
{4, 1600.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 20000.0, DRIVE_4WD, ENGINE_PETROL, 0},
{2, 1700.0, DRIVE_RWD, ENGINE_PETROL, 3},
{4, 1600.0, DRIVE_FWD, ENGINE_PETROL, 3},
{4, 1800.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 2600.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{0, 25000.0, DRIVE_4WD, ENGINE_PETROL, 0},
{2, 3000.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 1500.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 5000.0, DRIVE_4WD, ENGINE_PETROL, 3},
{2, 5000.0, DRIVE_4WD, ENGINE_PETROL, 3},
{2, 1400.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 1500.0, DRIVE_FWD, ENGINE_PETROL, 3},
{4, 1400.0, DRIVE_4WD, ENGINE_PETROL, 3},
{4, 1800.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 1500.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 10000.0, DRIVE_4WD, ENGINE_PETROL, 0},
{0, 100.0, DRIVE_4WD, ENGINE_ELECTRIC, 0},
{2, 1400.0, DRIVE_FWD, ENGINE_PETROL, 3},
{4, 1800.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 1500.0, DRIVE_RWD, ENGINE_PETROL, 3},
{0, 1000.0, DRIVE_RWD, ENGINE_PETROL, 3},
{0, 5500.0, DRIVE_RWD, ENGINE_DIESEL, 0},
{0, 5500.0, DRIVE_RWD, ENGINE_DIESEL, 0},
{0, 300.0, DRIVE_RWD, ENGINE_PETROL, 0},
{0, 800.0, DRIVE_RWD, ENGINE_PETROL, 0},
{2, 10000.0, DRIVE_4WD, ENGINE_PETROL, 3},
{2, 800.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 1700.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 1700.0, DRIVE_RWD, ENGINE_PETROL, 3},
{0, 60000.0, DRIVE_4WD, ENGINE_PETROL, 0},
{2, 5500.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{4, 2500.0, DRIVE_4WD, ENGINE_PETROL, 3},
{4, 2200.0, DRIVE_RWD, ENGINE_PETROL, 3},
{0, 500.0, DRIVE_RWD, ENGINE_PETROL, 2},
{3, 1900.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{2, 800.0, DRIVE_RWD, ENGINE_PETROL, 3},
{0, 3800.0, DRIVE_RWD, ENGINE_DIESEL, 0},
{4, 1800.0, DRIVE_RWD, ENGINE_PETROL, 3},
{0, 800.0, DRIVE_RWD, ENGINE_PETROL, 2},
{2, 1400.0, DRIVE_4WD, ENGINE_PETROL, 3},
{2, 5500.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{2, 1400.0, DRIVE_FWD, ENGINE_PETROL, 3},
{0, 5500.0, DRIVE_RWD, ENGINE_DIESEL, 0},
{0, 3800.0, DRIVE_RWD, ENGINE_DIESEL, 1},
{0, 40000.0, DRIVE_4WD, ENGINE_PETROL, 0},
{2, 5000.0, DRIVE_4WD, ENGINE_PETROL, 0},
{0, 100.0, DRIVE_4WD, ENGINE_ELECTRIC, 0},
{0, 2200.0, DRIVE_RWD, ENGINE_PETROL, 0},
{4, 1600.0, DRIVE_RWD, ENGINE_PETROL, 3},
{4, 1600.0, DRIVE_RWD, ENGINE_PETROL, 3},
{4, 1600.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 2500.0, DRIVE_4WD, ENGINE_DIESEL, 3},
{2, 1600.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{0, 5000.0, DRIVE_4WD, ENGINE_DIESEL, 3},
{2, 1500.0, DRIVE_RWD, ENGINE_PETROL, 3},
{2, 1500.0, DRIVE_RWD, ENGINE_PETROL, 3},
{4, 1600.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{2, 1700.0, DRIVE_4WD, ENGINE_DIESEL, 3},
{0, 1000.0, DRIVE_RWD, ENGINE_ELECTRIC, 1},
{0, 1000.0, DRIVE_RWD, ENGINE_ELECTRIC, 1},
{0, 1000.0, DRIVE_RWD, ENGINE_ELECTRIC, 0},
{2, 5500.0, DRIVE_RWD, ENGINE_DIESEL, 3},
{0, 400.0, DRIVE_RWD, ENGINE_ELECTRIC, 0},
{0, 1000.0, DRIVE_RWD, ENGINE_ELECTRIC, 1}
};
/**
* <summary> Gets vehicle mass</summary>
*/
stock Error: Vehicle_GetMass(vehicleid, &Float: mass)
{
if(!IsValidVehicle(vehicleid))
{
return Error(1, "Invalid vehicle");
}
mass = Vehicle_Info[GetVehicleModel(vehicleid) - 400][E_VEHICLE_MASS];
return Ok()
}
// --
// Params
// --
static enum PARAMS
{
VEHICLE_PARAMS: PARAMS_ENGINE,
VEHICLE_PARAMS: PARAMS_LIGHTS,
VEHICLE_PARAMS: PARAMS_ALARM,
VEHICLE_PARAMS: PARAMS_DOORS,
VEHICLE_PARAMS: PARAMS_BONNET,
VEHICLE_PARAMS: PARAMS_BOOT,
VEHICLE_PARAMS: PARAMS_OBJECTIVE
}
static
VEHICLE_PARAMS: Vehicle_gsParams[MAX_VEHICLES][PARAMS];
// --
// Groups
// --
#define INVALID_VEHICLE_GROUP_ID 0
static
Vehicle_gsGroupName[VehicleGroup: MAX_VEHICLE_GROUPS][24],
Iterator: Vehicle_gsActGps<MAX_VEHICLE_GROUPS>,
Iterator: Vehicle_gsGroups[VehicleGroup: MAX_VEHICLE_GROUPS]<MAX_VEHICLES>;
/**
* <library>vehicle_plus</library>
* <summary>Looks for a group with specified name.</summary>
* <param name="name">Name to look.</param>
* <seealso name="Vehicle_GroupHas" />
* <seealso name="Vehicle_GroupInit" />
* <seealso name="Vehicle_IsValidGroup" />
* <seealso name="Vehicle_AddToGroup" />
* <seealso name="Vehicle_RemoveFromGroup" />
* <seealso name="Vehicle_IsEmptyGroup" />
* <seealso name="Vehicle_GroupDestroy" />
* <seealso name="Vehicle_ClearGroup" />
* <seealso name="OnGroupInitialize" />
* <seealso name="OnGroupRemoveMember" />
* <seealso name="OnGroupAdd" />
* <seealso name="OnGroupClear" />
* <returns>Returns -1 if name is NULL, INVALID_VEHICLE_GROUP_ID if there are no groups to match with the name, and group id if there's a group with the specified name.</returns>
*/
stock Error: Vehicle_GetGroupByName(const name[], &VehicleGroup: output)
{
foreach(new i : Vehicle_gsActGps)
{
if(i == 0)
{
continue;
}
if(isnull(name))
{
return Error(1, "NULL group name");
}
if(!strcmp(name, Vehicle_gsGroupName[VehicleGroup: i]))
{
output = VehicleGroup: i;
return Ok();
}
}
return Error(2, "Invalid vehicle group");
}
/**
* <library>vehicle_plus</library>
* <summary>Checks whether the group has specified vehicle.</summary>
* <param name="vehicleid">ID of vehicle to seek for.</param>
* <seealso name="Vehicle_GetGroupByName" />
* <seealso name="Vehicle_GroupInit" />
* <seealso name="Vehicle_IsValidGroup" />
* <seealso name="Vehicle_AddToGroup" />
* <seealso name="Vehicle_RemoveFromGroup" />
* <seealso name="Vehicle_IsEmptyGroup" />
* <seealso name="Vehicle_GroupDestroy" />
* <seealso name="Vehicle_ClearGroup" />
* <seealso name="OnGroupInitialize" />
* <seealso name="OnGroupRemoveMember" />
* <seealso name="OnGroupAdd" />
* <seealso name="OnGroupClear" />
* <returns>Returns true if has, false otherwise.</returns>
*/
stock bool: Vehicle_GroupHas(VehicleGroup: groupid, vehicleid)
{
if(Iter_Contains(Vehicle_gsActGps, _:groupid) && IsValidVehicle(vehicleid) && Iter_Contains(Vehicle_gsGroups[groupid], vehicleid))
{
return true;
}
return false;
}
/**
* <library>vehicle_plus</library>
* <summary>Initialize a group.</summary>
* <param name="name">Name to set.</param>
* <seealso name="Vehicle_GetGroupByName" />
* <seealso name="Vehicle_GroupHas" />
* <seealso name="Vehicle_IsValidGroup" />
* <seealso name="Vehicle_AddToGroup" />
* <seealso name="Vehicle_RemoveFromGroup" />
* <seealso name="Vehicle_IsEmptyGroup" />
* <seealso name="Vehicle_GroupDestroy" />
* <seealso name="Vehicle_ClearGroup" />
* <seealso name="OnGroupInitialize" />
* <seealso name="OnGroupRemoveMember" />
* <seealso name="OnGroupAdd" />
* <seealso name="OnGroupClear" />
* <returns>ID of the group that has been initialized.</returns>
*/
stock Error: Vehicle_GroupInit(const name[], &VehicleGroup: index)
{
if(Iter_IsEmpty(Vehicle_gsActGps))
{
Iter_Add(Vehicle_gsActGps, 0);
}
new VehicleGroup: idx = VehicleGroup: Iter_Free(Vehicle_gsActGps);
new VehicleGroup: output;
new Error: ret = Vehicle_GetGroupByName(name, output);
if(IsError(ret))
{
if(ret == Error: 1)
{
Handled(true);
return Error(2, "NULL group name");
}
else if(ret == Error: 2)
{
return Error(1, "Invalid vehicle group");
}
}
if(output != VehicleGroup: INVALID_VEHICLE_GROUP_ID)
{
return Error(1, "Invalid vehicle group");
}
strcopy(Vehicle_gsGroupName[idx], name);
Iter_Add(Vehicle_gsActGps, _:idx);
_Framework_CallLocalFunction("OnGroupInitialize", "i", idx);
index = idx;
return Ok();
}
/**
* <library>vehicle_plus</library>
* <summary>Checks whether a specified group is valid.</summary>
* <param name="groupid">The group we are checking. </param>
* <seealso name="Vehicle_GetGroupByName" />
* <seealso name="Vehicle_GroupHas" />
* <seealso name="Vehicle_GroupInit" />
* <seealso name="Vehicle_AddToGroup" />
* <seealso name="Vehicle_RemoveFromGroup" />
* <seealso name="Vehicle_IsEmptyGroup" />
* <seealso name="Vehicle_GroupDestroy" />
* <seealso name="Vehicle_ClearGroup" />
* <seealso name="OnGroupInitialize" />
* <seealso name="OnGroupRemoveMember" />
* <seealso name="OnGroupAdd" />
* <seealso name="OnGroupClear" />
* <returns> Returns true if the group is valid, otherwise false. </returns>
*/
stock bool: Vehicle_IsValidGroup(VehicleGroup: groupid)
{
if(groupid == VehicleGroup: 0 || !Iter_Contains(Vehicle_gsActGps, _:groupid))
{
return false;
}
return true;
}
/**
* <library>vehicle_plus</library>
* <summary>Adds a vehicle to a created group.</summary>
* <param name="groupid">The group we are adding to.</param>
* <param name="vehicleid">Vehicle to add.</param>
* <seealso name="Vehicle_GetGroupByName" />
* <seealso name="Vehicle_GroupHas" />
* <seealso name="Vehicle_GroupInit" />
* <seealso name="Vehicle_IsValidGroup" />
* <seealso name="Vehicle_RemoveFromGroup" />
* <seealso name="Vehicle_IsEmptyGroup" />
* <seealso name="Vehicle_GroupDestroy" />
* <seealso name="Vehicle_ClearGroup" />
* <seealso name="OnGroupInitialize" />
* <seealso name="OnGroupRemoveMember" />
* <seealso name="OnGroupAdd" />
* <seealso name="OnGroupClear" />
* <returns>Returns error code 1 if vehicle or group isn't valid or 2 if vehicle specified is invalid or 3 if group already contains the vehicle, return 0 on success.</returns>
*/
stock Error: Vehicle_AddToGroup(VehicleGroup: groupid, vehicleid)
{
if(!Vehicle_IsValidGroup(groupid))
{
return Error(1, "Invalid group.");
}
else if(!IsValidVehicle(vehicleid))
{
return Error(2, "Invalid vehicle.");
}
else if(Iter_Contains(Vehicle_gsGroups[groupid], vehicleid))
{
return Ok(3); // vehicle already has been added
}
Iter_Add(Vehicle_gsGroups[groupid], vehicleid);
_Framework_CallLocalFunction("OnGroupAddMember", "ii", groupid, vehicleid);
return Ok();
}
/**
* <library>vehicle_plus</library>
* <summary>Removes a vehicle from a created group.</summary>
* <param name="groupid">The group we are removing member from.</param>
* <param name="vehicleid">Vehicle to remove.s</param>
* <seealso name="Vehicle_GetGroupByName" />
* <seealso name="Vehicle_GroupHas" />
* <seealso name="Vehicle_GroupInit" />
* <seealso name="Vehicle_IsValidGroup" />
* <seealso name="Vehicle_AddToGroup" />
* <seealso name="Vehicle_IsEmptyGroup" />
* <seealso name="Vehicle_GroupDestroy" />
* <seealso name="Vehicle_ClearGroup" />
* <seealso name="OnGroupInitialize" />
* <seealso name="OnGroupRemoveMember" />
* <seealso name="OnGroupAdd" />
* <seealso name="OnGroupClear" />
* <returns>1 if group isn't valid, 2 if vehicle has already been added, 0 on success.</returns>
*/
stock Error: Vehicle_RemoveFromGroup(VehicleGroup: groupid, vehicleid)
{
if(!Vehicle_IsValidGroup(groupid))
{
return Error(1, "Invalid group.");
}
else if(!Iter_Contains(Vehicle_gsGroups[groupid], vehicleid))
{
return Ok(2); // vehicle already has been added
}
Iter_Remove(Vehicle_gsGroups[groupid], vehicleid);
_Framework_CallLocalFunction("OnGroupRemoveMember", "ii", groupid, vehicleid);
return Ok();
}
/**
* <library>vehicle_plus</library>
* <summary>Clears a group.</summary>
* <param name="groupid">The group .</param>
* <seealso name="Vehicle_GetGroupByName" />
* <seealso name="Vehicle_GroupHas" />
* <seealso name="Vehicle_GroupInit" />
* <seealso name="Vehicle_IsValidGroup" />
* <seealso name="Vehicle_RemoveFromGroup" />
* <seealso name="Vehicle_IsEmptyGroup" />
* <seealso name="Vehicle_GroupDestroy" />
* <seealso name="Vehicle_AddToGroup" />
* <seealso name="OnGroupInitialize" />
* <seealso name="OnGroupRemoveMember" />
* <seealso name="OnGroupAdd" />
* <seealso name="OnGroupClear" />
* <returns>Error code 1 if group isn't valid, 2 if iterator was already empty, 0 on success.</returns>
*/
stock Error: Vehicle_ClearGroup(VehicleGroup: groupid)
{
if(!Vehicle_IsValidGroup(groupid))
{
return Error(1, "Invalid group.")
}
else if(Iter_IsEmpty(Vehicle_gsGroups[groupid]))
{
return Ok(2); // works but iterator was empty already
}
foreach(new i : Vehicle_gsGroups[groupid])
{
Iter_SafeRemove(Vehicle_gsGroups[groupid], i, i);
}
_Framework_CallLocalFunction("OnGroupClear", "i", groupid);
return Ok();
}
/**
* <library>vehicle_plus</library>
* <summary> Checks if a group is empty.</summary>
* <param name="groupid">True if empty, otherwise false. </param>
* <seealso name="Vehicle_GetGroupByName" />
* <seealso name="Vehicle_GroupHas" />
* <seealso name="Vehicle_GroupInit" />
* <seealso name="Vehicle_IsValidGroup" />
* <seealso name="Vehicle_RemoveFromGroup" />
* <seealso name="Vehicle_ClearGroup" />
* <seealso name="Vehicle_GroupDestroy" />
* <seealso name="Vehicle_AddToGroup" />
* <seealso name="OnGroupInitialize" />
* <seealso name="OnGroupRemoveMember" />
* <seealso name="OnGroupAdd" />
* <seealso name="OnGroupClear" />
* <returns>False if vehicle or group isn't valid, true otherwise</returns>
*/
stock bool: Vehicle_IsEmptyGroup(VehicleGroup: groupid)
{
if(!Vehicle_IsValidGroup(groupid))
{
return false;
}
return Iter_IsEmpty(Vehicle_gsGroups[groupid]);
}
/**
* <library>vehicle_plus</library>
* <summary>Destroys a group.</summary>
* <param name="groupid">Group to destroy.</param>
* <seealso name="Vehicle_GetGroupByName" />
* <seealso name="Vehicle_GroupHas" />
* <seealso name="Vehicle_GroupInit" />
* <seealso name="Vehicle_IsValidGroup" />
* <seealso name="Vehicle_RemoveFromGroup" />
* <seealso name="Vehicle_IsEmptyGroup" />
* <seealso name="Vehicle_ClearGroup" />
* <seealso name="Vehicle_AddToGroup" />
* <seealso name="OnGroupInitialize" />
* <seealso name="OnGroupRemoveMember" />
* <seealso name="OnGroupAdd" />
* <seealso name="OnGroupClear" />
* <returns>False if vehicle or group isn't valid, true otherwise</returns>
*/
stock Error: Vehicle_GroupDestroy(VehicleGroup: groupid)
{
if(!Iter_Contains(Vehicle_gsActGps, _:groupid))
{
return Error(1, "Invalid vehicle group");
}
foreach(new i : Vehicle_gsGroups[groupid])
{
Iter_SafeRemove(Vehicle_gsGroups[groupid], i, i);
}
Iter_Remove(Vehicle_gsActGps, _:groupid);
return Ok();
}
// --
// Blinkers
// --
#define VEHICLE_BLINKERS: __TAG(VEHICLE_BLINKERS):
enum VEHICLE_BLINKERS:__VEHICLE_BLINKERS
{
VEHICLE_BLINKERS_NOT_SET = -1,
VEHICLE_BLINKERS_LEFT = 0,
VEHICLE_BLINKERS_RIGHT,
VEHICLE_BLINKERS_EMERGENCY
}
static stock VEHICLE_BLINKERS:_@VEHICLE_BLINKERS() { return __VEHICLE_BLINKERS; }
static
VEHICLE_BLINKERS: Vehicle_gsBlinkSide[MAX_VEHICLES];
static enum e_BLINKING_ENUM
{
e_BLINKING_MODEL,
Float:e_BLINKING_POSX,
Float:e_BLINKING_POSY,
Float:e_BLINKING_POSZ,
Float:e_BLINKING_ROTX,
Float:e_BLINKING_ROTY,
Float:e_BLINKING_ROTZ
}
static const Vehicle_gscBlinkOffsets[][e_BLINKING_ENUM] =
{
{400, -0.9001, 2.0490, -0.0965, -0.9605, -2.2404, -0.0965},
{401, -0.9686, 2.5393, 0.0235, -0.9970, -2.2863, 0.0235},
{402, -0.8788, 2.5160, -0.0565, -0.9208, -2.5936, 0.0435},
{403, -1.3897, 3.6007, -0.2194, -1.1904, -0.9415, 1.8389},
{404, -0.7236, 2.1715, -0.0365, -0.7906, -2.7052, 0.0635},
{405, -0.9127, 2.2766, -0.0565, -0.8723, -2.6526, -0.0565},
{406, -2.2165, 4.9242, -0.0332, -2.0785, -5.2054, 0.5468},
{407, -0.9887, 4.0622, -0.0913, -1.0141, -3.4034, -0.0913},
{408, -0.9659, 4.7615, -0.2513, -0.8430, -3.9722, -0.5113},
{409, -0.7859, 3.5522, -0.0313, -0.8027, -3.8228, -0.0313},
{410, -0.825, 2.105, 0.0635, -0.8723, -2.1926, 0.1235},
{411, -0.9405, 2.6710, -0.1825, -0.9636, -2.4525, 0.0825},
{412, -0.8965, 2.6478, -0.0575, -0.9592, -3.4870, -0.1575},
{413, -0.8669, 2.5464, -0.0913, -0.8209, -2.5829, 0.0687},
{414, -0.8069, 2.7473, 0.0087, -0.9058, -3.2050, 0.1094},
{415, -0.8738, 2.4866, -0.2357, -0.7792, -2.3501, 0.0450},
{416, -0.8469, 2.9073, 0.0087, -1.0352, -3.5937, 1.4522},
{417, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000},
{418, -0.9511, 2.3820, -0.2357, -1.0081, -2.4904, -0.1557},
{419, -1.0742, 2.3978, -0.1757, -0.8127, -2.8620, -0.1557},
{420, -1.0142, 2.2978, -0.0157, -0.9637, -2.6744, 0.0043},
{421, -0.9013, 2.5343, -0.1357, -0.5921, -2.9228, -0.1957},
{422, -0.7813, 2.1543, -0.2657, -0.8985, -2.4349, -0.1057},
{423, -0.7817, 2.2093, -0.0313, -0.8340, -2.1794, 0.0596},
{424, -0.7350, 1.4505, 0.1087, -0.7062, -1.4778, 0.2996},
{425, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000},
{426, -1.0006, 2.3164, -0.0100, -0.9627, -2.6930, -0.0100},
{427, -0.8728, 2.5856, 0.1887, -0.9831, -3.8383, -0.3495},
{428, -0.8728, 2.5856, -0.2103, -0.9045, -2.8871, 1.2466},
{429, -0.7942, 2.2846, -0.2500, -0.8397, -2.3849, -0.0070},
{430, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000},
{431, -0.9771, 5.8479, 0.3497, -1.0300, -5.7043, -0.1041},
{432, -1.7168, 4.0330, 0.4497, -1.5830, -4.3414, 0.7039},
{433, -1.2619, 3.7708, -0.2163, -1.2966, -4.6534, -0.1051},
{434, 0.0, 0.0, 0.0, -0.4811, -1.9838, -0.0670},
{435, 0.0000, 0.0000, 0.0000, -1.0697, -3.9690, -1.1053}, //trailer
{436, -0.8495, 2.2519, -0.0070, -0.8948, -2.4838, 0.1130},
{437, -1.1156, 5.5395, -0.2163, -0.9856, -5.3099, 1.6458},
{438, -1.1128, 2.3675, -0.2870, -1.0992, -2.4601, -0.2870},
{439, -0.8381, 2.3101, -0.1470, -0.8221, -2.6534, -0.1070},
{440, -0.8270, 2.5573, -0.3173, -0.8676, -2.5376, -0.0149},
{441, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000},
{442, -1.0354, 2.8278, -0.1870, -1.0226, -3.0877, -0.1270},
{443, -1.0610, 5.7528, -0.9573, -1.2388, -7.1392, -0.8250},
{444, -0.9880, 2.7188, 0.6140, -1.0722, -3.0184, 0.7248},
{445, -0.9590, 2.3460, -0.0840, -0.9773, -2.8049, -0.0840},
{446, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000},
{447, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000},
{448, -0.1992, -0.9229, -0.1270},
{449, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000},
{450, 0.0000, 0.0000, 0.0000, -1.0697, -3.9690, -1.1053}, //trailer
{451, -0.9826, 1.9642, -0.1399, -0.8894, -2.3991, -0.0199},
{452, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000},
{453, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000},
{454, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000},
{455, 0.0000, 0.0000, 0.0000, -1.3866, -4.5162, -0.7399},
{456, 0.0000, 0.0000, 0.0000, -1.3045, -4.6123, 0.4601},
{457, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000},
{458, -0.9513, 2.4197, -0.1399, -0.9703, -2.7779, 0.0201},
{459, -0.8214, 2.5716, -0.1274, -0.8760, -2.5775, 0.1127},
{460, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000},
{461, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000},
{462, 0.0000, 0.0000, 0.0000, -0.2054, -0.9359, -0.1399},
{463, -0.2276, 0.7185, 0.3201, -0.1952, -1.0037, 0.1601},
{464, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000},
{465, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000},
{466, 0.0000, 0.0000, 0.0000, -1.0201, -2.7994, 0.0401},
{467, 0.0000, 0.0000, 0.0000, -0.9401, -3.0594, 0.1601},
{468, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000},
{469, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000},
{470, -1.0259, 2.1382, 0.2001, -1.0433, -2.5463, 0.1201},
{471, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000},
{472, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000},
{473, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000},
{474, 0.0000, 0.0000, 0.0000, -0.9833, -2.7663, -0.0599},
{475, -0.8681, 2.4086, -0.3399, -0.8632, -2.7629, -0.2399},
{476, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000},
{477, -0.8081, 2.6686, -0.1999, -0.9945, -2.6987, 0.0801},
{478, -1.0938, 2.0255, 0.1001, -1.0579, -2.5378, -0.2799},
{479, -0.9671, 2.4844, 0.0201, -0.9578, -2.7556, 0.0601},
{480, -0.5897, 2.2607, -0.4399, -0.9183, -2.3388, -0.1399},
{481, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000},
{482, -0.8841, 2.4094, -0.3399, -0.8685, -2.5676, 0.0201},
{483, -0.7770, 2.6235, -0.0199, -0.6709, -2.7712, -0.1999},
{484, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000},
{485, -0.6104, 1.7180, 0.2201, -0.7074, -1.3681, 0.1201},
{486, 0.0000, 0.0000, 0.0000, -0.5919, -3.2353, 0.9601},
{487, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000},
{488, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000},
{489, -1.1024, 2.5796, 0.0401, -1.1261, -2.6473, 0.1601},
{490, -1.0971, 3.1462, 0.0401, -1.1327, -3.1055, 0.1601},
{491, -0.8495, 2.5284, -0.0799, -0.8870, -2.7776, 0.0001},
{492, -0.7905, 2.4656, -0.0599, -0.9075, -2.8130, 0.0001},
{493, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000},
{494, -0.8513, 2.3630, -0.2199, -0.8275, -2.8485, 0.1401},
{495, -1.0909, 2.3818, 0.0001, -1.1540, -2.1156, -0.0399},
{496, -0.9219, 2.1787, 0.0401, -0.7095, -2.1087, 0.0801},
{497, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000, 0.0000},
{498, -0.8915, 3.0670, 0.2201, -0.9740, -3.0460, 0.3601},