-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbillionaire_services.lua
5000 lines (4989 loc) · 224 KB
/
billionaire_services.lua
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
---@diagnostic disable: undefined-global, lowercase-global
local billionaire_services=gui.get_tab("Billionaire Services")
local airport_index = 0
local pJet = 0
local pilot = 0
local copilot = 0
local jetSeat = 2
local heliSeat = 1
local setHeading = 0
local pHeli = 0
local heliPilot = 0
local heli_index = 0
local h_preset_index = 0
local bodyguard_index = 0
local playerIndex = 0
local guard_1 = 0
local guard_2 = 0
local guard_3 = 0
local escort_1 = 0
local escort_2 = 0
local escort_3 = 0
local escortCar = 0
local carBlip = 0
local limo = 0
local limoDriver = 0
local limoSeat = 2
local donutDirection = 7
local dbgclc = 0
local targetPlayer = 0
local btnPress = 0
local meleeIdx = 0
local pistolIdx = 0
local smgIdx = 0
local sgIdx = 0
local arIdx = 0
local mgIdx = 0
local srIdx = 0
local hvyIdx = 0
local grIdx = 0
local miscIdx = 0
local switch = 0
local lightSpeed = 1
local tab1Sound = true
local tab2Sound = true
local tab3Sound = true
local tab4Sound = true
local tab5Sound = true
local rgbLights = false
local bg_unarmed = false
local es_unarmed = false
local wpnWindow = false
local nineEleven = false
local plyrWindow = false
local bg_attack = false
local bgParachuting = false
local es_attack = false
local dbgWindow = false
local sirenOn = false
local quickSiren = false
local bgAutoTp = true
local esAutoTp = true
local arprtLstTop = true
local disableArprtLst = false
local jetTpBtn = false
local initialFlight = false
local newFlight = false
local flying = false
local can_land = false
local started_landing = false
local startLandingProcess = false
local showLandingSkip = false
local showSkipNotif = false
local skippedLandingProcess = false
local jetDismissed = false
local showPilotLeavingMsg = false
local showBailMsg = false
local heliWp = false
local heliInit = false
local heliPreset = false
local heliLandBtn = false
local heliDismissed = false
local disableHeliPresets = false
local overrideHLB = false
local showHeliTpBtn = false
local showSecHLB = false
local heliRappel = false
local isRappelling = false
local dismissed = false
local dismissedGuards = false
local sittingInEscortCar = false
local driveStarted = false
local driveToWp = false
local doingBurnout = false
local doingDriveBy = false
local doDonuts = false
local escortLeftCar = false
local onFoot = false
local escortCarAway = false
local askedToLeave = false
local law = false
local sittingInLimo = false
local limoWp = false
local limoCr = false
local limoDismissed = false
local showLimoMsg = false
local taskInProgress = false
local startFollowTask = false
local followOnFoot = false
local validModel = false
local allowInside = false
local currentTask = "None."
local hangarPos = vector3
local destination = vector3
local newDestination = vector3
local spawned_jet = {}
local spawned_pilot = {}
local spawned_limo = {}
local spawned_driver = {}
local spawned_bodyguards = {}
local spawned_escorts = {}
local spawned_SUV = {}
local guardBlips = {}
local presetNames = {}
local airports = {
{name = "Los Santos International Airport", hangar = vec3:new(-979.294, -2993.9, 13.9451), runwayStart = vec3:new(-1305.79, -2148.72, 13.9446), runwayEnd = vec3:new(-1663.04, -2775.99, 13.9447), taxiPos = vec3:new(-1046.74, -2971.01, 13.9487), cutPos = vec3:new(-2204.82, -2554.53, 678.723), checkPos = vec3:new(-860.534, -1476.28, 286.833), checkPosHdng = 143.321, heading = 50, escrtPos = vec3:new(-991.083, -3005.92, 13.9451), escrtHdng = 15.427},
{name = "Fort Zancudo", hangar = vec3:new(-2140.81, 3255.64, 32.8103), runwayStart = vec3:new(-1972.55, 2842.36, 32.8104), runwayEnd = vec3:new(-2598.1, 3199.13, 32.8118), taxiPos = vec3:new(-2166.8, 3203.57, 32.8049), cutPos = vec3:new(-3341.66, 3578.68, 595.203), checkPos = vec3:new(-1487.91, 2553.82, 266.253), checkPosHdng = 55.7258, heading = 132, escrtPos = vec3:new(-2134.02, 3241.4, 32.8103), escrtHdng = 97.989},
{name = "Sandy Shores Airfield", hangar = vec3:new(1744.21, 3276.24, 41.1191), runwayStart = vec3:new(1052.2, 3068.35, 41.6282), runwayEnd = vec3:new(1718.24, 3254.43, 41.1363), taxiPos = vec3:new(1705.72, 3254.61, 41.0139), cutPos = vec3:new(-164.118, 1830.04, 996.586), checkPos = vec3:new(633.196, 2975.52, 263.214), checkPosHdng = 277.875, heading = 150, escrtPos = vec3:new(1755.6, 3261.15, 41.3516), escrtHdng = 83.893},
}
local helis = {
837858166, -- Annihilator (allows rappelling)
295054921, -- Annihilator stealth
2634305738, -- Maverick (allows rappelling)
353883353, -- Police Maverick (allows rappelling)
4212341271, -- Savage
710198397, -- SuperVolito
2623428164, -- SuperVolito Carbon
3955379698, -- Swift FB
1075432268, -- Swift Deluxe
2694714877, -- Valkyrie
2449479409} -- Volatus
local heliPresets = {
{name = "Sandy Shores Helipad", pos = vec3:new(1770.17, 3239.85, 42.1217) },
{name = "Paleto Bay Sheriff's Office", pos = vec3:new(-475.02, 5988.46, 31.3367) },
{name = "Fort Zancudo Helipad", pos = vec3:new(-1859.4, 2795.65, 32.8066) },
{name = "The Diamond Casino Helipad", pos = vec3:new(965.931, 42.3014, 123.127) },
{name = "Vinewood Police Station", pos = vec3:new(579.992, 12.3636, 103.234) },
{name = "Hawick Agency Helipad", pos = vec3:new(393.284, -66.3109, 124.376) },
{name = "Richard's Majestic Helipad", pos = vec3:new(-913.493, -378.444, 137.906)},
{name = "Rockford Hills Agency Helipad", pos = vec3:new(-1007.68, -415.99, 80.1686) },
{name = "Vespucci Canals Agency Helipad", pos = vec3:new(-1010.76, -756.875, 81.7484)},
{name = "Little Seoul Agency Helipad", pos = vec3:new(-597.602, -716.92, 131.04) },
{name = "Lombank Office Helipad", pos = vec3:new(-1581.9, -569.51, 116.328) },
{name = "Mazebank West Office Helipad", pos = vec3:new(-1391.7, -477.587, 91.2508) },
{name = "Mazebank Tower Helipad", pos = vec3:new(-75.2834, -819.323, 326.175)},
{name = "Arcadius Office Helipad", pos = vec3:new(-144.582, -593.811, 211.775)},
}
local insults = {"GENERIC_CURSE_HIGH", "GENERIC_INSULT_HIGH", "GENERIC_WAR_CRY", "CHALLENGE_THREATEN"}
local bodyguards = {
{name = "Private Mercenaries", pedType = "PED_TYPE_ARMY", modelHash = {a = 0x613E626C, b = 0x5076A73B, c = 0xB3F3EE34}, weaponHash = {main = 0x83BF0278, sec = 350597077}, vehicle = 2230595153, vehCol = {prim = 153, sec = 12 }, vehRadio = "RADIO_19_USER" }, -- Carbine Rifle + Tactical SMG
{name = "High-Level Security", pedType = "PED_TYPE_CIVMALE", modelHash = {a = 0xF161D212, b = 0x2930C1AB, c = 0x55FE9B46}, weaponHash = {main = 0x2B5EF5EC, sec = 0}, vehicle = 666166960, vehCol = {prim = 0, sec = 0 }, vehRadio = "RADIO_19_USER" }, -- Ceramic Pistol
{name = "Ballas OGs", pedType = "PED_TYPE_GANG_AFRICAN_AMERICAN", modelHash = {a = 0x231AF63F, b = 0xABEF0004, c = 0xDB41B4EF}, weaponHash = {main = 0x1B06D571, sec = 0}, vehicle = 3431608412, vehCol = {prim = 145, sec = 145}, vehRadio = "RADIO_09_HIPHOP_OLD"}, -- Default Pistol
{name = "Families OGs", pedType = "PED_TYPE_GANG_AFRICAN_AMERICAN", modelHash = {a = 0x33A464E5, b = 0xE83B93B7, c = 0x84302B09}, weaponHash = {main = 0x1B06D571, sec = 0}, vehicle = 3265236814, vehCol = {prim = 53, sec = 53 }, vehRadio = "RADIO_03_HIPHOP_NEW"}, -- //
{name = "Vagos Esses", pedType = "PED_TYPE_GANG_PUERTO_RICAN", modelHash = {a = 0x837B64DE, b = 0x5AA42C21, c = 0x964D12DC}, weaponHash = {main = 0x1B06D571, sec = 0}, vehicle = 2254540506, vehCol = {prim = 88, sec = 0 }, vehRadio = "RADIO_08_MEXICAN" }, -- //
{name = "Lost MC", pedType = "PED_TYPE_GANG_BIKER_1", modelHash = {a = 0x32B11CDC, b = 0x4F46D607, c = 0xFD5537DE}, weaponHash = {main = 0x1B06D571, sec = 0}, vehicle = 2549763894, vehCol = {prim = 0, sec = 0 }, vehRadio = "RADIO_04_PUNK" }, -- //
{name = "Armenian Mobsters", pedType = "PED_TYPE_GANG_ALBANIAN", modelHash = {a = 0xE7714013, b = 0xFDA94268, c = 0xF1E823A2}, weaponHash = {main = 0x1B06D571, sec = 0}, vehicle = 83136452, vehCol = {prim = 111, sec = 0 }, vehRadio = "RADIO_15_MOTOWN" }, -- //
{name = "Cartel Sicarios", pedType = "PED_TYPE_GANG_PUERTO_RICAN", modelHash = {a = 0x995B3F9F, b = 0x7ED5AD78, c = 0xE6AC74A4}, weaponHash = {main = 0xBFEFFF6D, sec = 350597077}, vehicle = 4256087847, vehCol = {prim = 0, sec = 0 }, vehRadio = "RADIO_08_MEXICAN" }, -- Assault Rifle + Tactical SMG
{name = "Bad Bitches", pedType = "PED_TYPE_PROSTITUTE", modelHash = {a = 0x28ABF95, b = 0x81441B71, c = 0xAEEA76B5}, weaponHash = {main = 350597077, sec = 0}, vehicle = 461465043, vehCol = {prim = 30, sec = 111}, vehRadio = "RADIO_02_POP" }, -- Tactical SMG
{name = "Law: FIB", pedType = "PED_TYPE_COP", modelHash = {a = 0xEDBC7546, b = 0x7B8B434B, c = 0x5CDEF405}, weaponHash = {main = 0x1B06D571, sec = 0}, vehicle = 2647026068, vehCol = {prim = _, sec = _ }, vehRadio = "OFF" },
{name = "Law: LSPD", pedType = "PED_TYPE_COP", modelHash = {a = 0x5E3DA4A4, b = 0x15F8700D, c = 0x5E3DA4A4}, weaponHash = {main = 0x1B06D571, sec = 0}, vehicle = 1912215274, vehCol = {prim = _, sec = _ }, vehRadio = "OFF" },
{name = "Law: SWAT", pedType = "PED_TYPE_COP", modelHash = {a = 0x8D8F1B10, b = 0x8D8F1B10, c = 0x8D8F1B10}, weaponHash = {main = 736523883, sec = 0x1B06D571}, vehicle = 3089277354, vehCol = {prim = _, sec = _ }, vehRadio = "OFF" },
}
local allWeapons = {0x6589186A, 0x92A27487, 0x958A4A8F, 0xF9E6AA4B, 0x84BD7BFD, 0x8BB05FD7, 0x440E4788, 0x4E875F73, 0xF9DCBF2D, 0xD8DF3C3C, 0x99B507EA, 0xDD5DF8D9, 0xDFE37640, 0x678B81B1, 0x19044EE0, 0xCD274149, 0x94117305, 0x3813FC08, 0x1B06D571, 0xBFE256D4, 0x5EF9FEC4, 0x22D8FE39, 0x3656C8C1, 0x99AEEB3B, 0xBFD21232, 0x88374054, 0xD205520E, 0x83839C4 , 0x47757124, 0xDC4DB296, 0xC1B3C3D1, 0xCB96392F, 0x97EA20B8, 0xAF3696A1, 0x2B5EF5EC, 0x917F6C8C,0x1B06D571, 0xBFE256D4, 0x5EF9FEC4, 0x22D8FE39, 0x3656C8C1, 0x99AEEB3B, 0xBFD21232, 0x88374054, 0xD205520E, 0x83839C4 , 0x47757124, 0xDC4DB296, 0xC1B3C3D1, 0xCB96392F, 0x97EA20B8, 0xAF3696A1, 0x2B5EF5EC, 0x917F6C8C, 0x13532244, 0x2BE6766B, 0x78A97CD0, 0xEFE7E2DF, 0xA3D4D34, 0xDB1AA450, 0xBD248B55, 0x476BF155, 0x1D073A89, 0x555AF99A, 0x7846A318, 0xE284C527, 0x9D61E50F, 0xA89CB99E, 0x3AABBBAA, 0xEF951FBB, 0x12E82D3D, 0xBFEFFF6D, 0x394F415C, 0x83BF0278, 0xFAD1F1C9, 0xAF113F99, 0xC0A3098D, 0x969C3D67, 0x7F229F94, 0x84D6FAFD, 0x624FE830, 0x9D07F764, 0x7FD62962, 0xDBBD7280, 0x61012683, 0x5FC3C11, 0xC472FE2, 0xA914799, 0xC734385A, 0x6A6C02E0, 0xB1CA77B1, 0xA284510B, 0x4DD2DC56, 0x42BF8A85, 0x7F7497E5, 0x6D544C99, 0x63AB0442, 0x781FE4A, 0xB62D1F67, 0x93E220BD, 0xA0973D5E, 0xFDBC8A50, 0x497FACC3, 0x24B17070, 0x2C3731D9, 0xAB564B93, 0x787F0BB, 0xBA45E8B8, 0x23C9F95C, 0x60EC506, 0x787F0BB, 0x34A67B97, 0xFBAB5776, 0x88C78EB7}
local melee_weapons = {0x6589186A, 0x92A27487, 0x958A4A8F, 0xF9E6AA4B, 0x84BD7BFD, 0x8BB05FD7, 0x440E4788, 0x4E875F73, 0xF9DCBF2D, 0xD8DF3C3C, 0x99B507EA, 0xDD5DF8D9, 0xDFE37640, 0x678B81B1, 0x19044EE0, 0xCD274149, 0x94117305, 0x3813FC08}
local handguns = {0x1B06D571, 0xBFE256D4, 0x5EF9FEC4, 0x22D8FE39, 0x3656C8C1, 0x99AEEB3B, 0xBFD21232, 0x88374054, 0xD205520E, 0x83839C4 , 0x47757124, 0xDC4DB296, 0xC1B3C3D1, 0xCB96392F, 0x97EA20B8, 0xAF3696A1, 0x2B5EF5EC, 0x917F6C8C}
local smg = {0x13532244, 0x2BE6766B, 0x78A97CD0, 0xEFE7E2DF, 0xA3D4D34, 0xDB1AA450, 0xBD248B55, 0x476BF155}
local shotguns = {0x1D073A89, 0x555AF99A, 0x7846A318, 0xE284C527, 0x9D61E50F, 0xA89CB99E, 0x3AABBBAA, 0xEF951FBB, 0x12E82D3D}
local assault_rifles = {0xBFEFFF6D, 0x394F415C, 0x83BF0278, 0xFAD1F1C9, 0xAF113F99, 0xC0A3098D, 0x969C3D67, 0x7F229F94, 0x84D6FAFD, 0x624FE830}
local machine_guns = {0x9D07F764, 0x7FD62962, 0xDBBD7280, 0x61012683}
local sniper_rifles = {0x5FC3C11, 0xC472FE2, 0xA914799, 0xC734385A, 0x6A6C02E0}
local heavy_weapons = {0xB1CA77B1, 0xA284510B, 0x4DD2DC56, 0x42BF8A85, 0x7F7497E5, 0x6D544C99, 0x63AB0442, 0x781FE4A, 0xB62D1F67}
local throwables = {0x93E220BD, 0xA0973D5E, 0xFDBC8A50, 0x497FACC3, 0x24B17070, 0x2C3731D9, 0xAB564B93, 0x787F0BB, 0xBA45E8B8, 0x23C9F95C}
local misc_weapons = {0x60EC506, 0x787F0BB, 0x34A67B97, 0xFBAB5776, 0x88C78EB7}
local function displayHelis()
local heliNames = {}
for _, h in ipairs(helis) do
local heliName = vehicles.get_vehicle_display_name(h)
table.insert(heliNames, heliName)
end
heli_index, _ = ImGui.Combo("##heliList", heli_index, heliNames, #helis)
end
local function updateHeliPresets()
sortedPresets = {}
for _, preset in ipairs(heliPresets) do
table.insert(sortedPresets, preset)
end
table.sort(sortedPresets, function(a, b)
return a.name < b.name
end)
end
local function displayHeliPresets()
updateHeliPresets()
for _, preset in ipairs(sortedPresets) do
table.insert(presetNames, preset.name)
end
if disableHeliPresets then
ImGui.BeginDisabled()
h_preset_index, _ = ImGui.Combo("##heliPresetLocations", h_preset_index, presetNames, #sortedPresets)
ImGui.EndDisabled()
else
h_preset_index, _ = ImGui.Combo("##heliPresetLocations", h_preset_index, presetNames, #sortedPresets)
end
end
local function displayMelee()
local meleeNames = {}
for _, wpn in ipairs(melee_weapons) do
local weaponName = weapons.get_weapon_display_name(wpn)
table.insert(meleeNames, weaponName)
end
meleeIdx, used = ImGui.Combo("##meleeWeapons", meleeIdx, meleeNames, #melee_weapons)
end
local function displayHandguns()
local pistolNames = {}
for _, wpn in ipairs(handguns) do
local weaponName = weapons.get_weapon_display_name(wpn)
table.insert(pistolNames, weaponName)
end
pistolIdx, used = ImGui.Combo("##pistols", pistolIdx, pistolNames, #handguns)
end
local function displaySmg()
local smgNames = {}
for _, wpn in ipairs(smg) do
local weaponName = weapons.get_weapon_display_name(wpn)
table.insert(smgNames, weaponName)
end
smgIdx, used = ImGui.Combo("##smg", smgIdx, smgNames, #smg)
end
local function displayShotguns()
local sgNames = {}
for _, wpn in ipairs(shotguns) do
local weaponName = weapons.get_weapon_display_name(wpn)
table.insert(sgNames, weaponName)
end
sgIdx, used = ImGui.Combo("##shotguns", sgIdx, sgNames, #shotguns)
end
local function displayARs()
local arNames = {}
for _, wpn in ipairs(assault_rifles) do
local weaponName = weapons.get_weapon_display_name(wpn)
table.insert(arNames, weaponName)
end
arIdx, used = ImGui.Combo("##rifles", arIdx, arNames, #assault_rifles)
end
local function displayMGs()
local mgNames = {}
for _, wpn in ipairs(machine_guns) do
local weaponName = weapons.get_weapon_display_name(wpn)
table.insert(mgNames, weaponName)
end
mgIdx, used = ImGui.Combo("##machineGuns", mgIdx, mgNames, #machine_guns)
end
local function displaySRs()
local srNames = {}
for _, wpn in ipairs(sniper_rifles) do
local weaponName = weapons.get_weapon_display_name(wpn)
table.insert(srNames, weaponName)
end
srIdx, used = ImGui.Combo("##sniperRifles", srIdx, srNames, #sniper_rifles)
end
local function displayHvys()
local hvyNames = {}
for _, wpn in ipairs(heavy_weapons) do
local weaponName = weapons.get_weapon_display_name(wpn)
table.insert(hvyNames, weaponName)
end
hvyIdx, used = ImGui.Combo("##heavyWeapons", hvyIdx, hvyNames, #heavy_weapons)
end
local function displayGrs()
local grNames = {}
for _, wpn in ipairs(throwables) do
local weaponName = weapons.get_weapon_display_name(wpn)
table.insert(grNames, weaponName)
end
grIdx, used = ImGui.Combo("##throwables", grIdx, grNames, #throwables)
end
local function displayMiscW()
local miscNames = {}
for _, wpn in ipairs(misc_weapons) do
local weaponName = weapons.get_weapon_display_name(wpn)
if wpn == 0xFBAB5776 then
weaponName = "Parachute"
end
if wpn == 0x88C78EB7 then
weaponName = "Briefcase"
end
table.insert(miscNames, weaponName)
end
miscIdx, used = ImGui.Combo("##miscWeapons", miscIdx, miscNames, #misc_weapons)
end
--[[
local function sleep(s)
local ntime = os.clock() + s/10
repeat
coroutine.yield()
until os.clock() > ntime
end
]]
local function setBlipName(name, blip)
HUD.BEGIN_TEXT_COMMAND_SET_BLIP_NAME("STRING")
HUD.ADD_TEXT_COMPONENT_SUBSTRING_PLAYER_NAME(name)
HUD.END_TEXT_COMMAND_SET_BLIP_NAME(blip)
end
local function coloredText(text, color)
ImGui.PushStyleColor(ImGuiCol.Text, color[1]/255, color[2]/255, color[3]/255, color[4])
ImGui.PushTextWrapPos(ImGui.GetFontSize() * 20)
ImGui.TextWrapped(text)
ImGui.PopTextWrapPos()
ImGui.PopStyleColor(1)
end
local function helpmarker(colorFlag, text, color)
ImGui.SameLine()
ImGui.TextDisabled("(?)")
if ImGui.IsItemHovered() then
ImGui.SetNextWindowBgAlpha(0.8)
ImGui.BeginTooltip()
if colorFlag == true then
coloredText(text, color)
else
ImGui.PushTextWrapPos(ImGui.GetFontSize() * 20)
ImGui.TextWrapped(text)
ImGui.PopTextWrapPos()
end
ImGui.EndTooltip()
end
end
local function widgetToolTip(colorFlag, text, color)
if ImGui.IsItemHovered(ImGuiHoveredFlags.AllowWhenDisabled) then
ImGui.SetNextWindowBgAlpha(0.8)
ImGui.BeginTooltip()
if colorFlag == true then
coloredText(text, color)
else
ImGui.PushTextWrapPos(ImGui.GetFontSize() * 20)
ImGui.TextWrapped(text)
ImGui.PopTextWrapPos()
end
ImGui.EndTooltip()
end
end
local function widgetSound(sound)
script.run_in_fiber(function()
if sound == "Select" then
AUDIO.PLAY_SOUND_FRONTEND(-1, "SELECT", "HUD_FRONTEND_DEFAULT_SOUNDSET", true)
end
if sound == "Cancel" then
AUDIO.PLAY_SOUND_FRONTEND(-1, "CANCEL", "HUD_FREEMODE_SOUNDSET", true)
end
if sound == "Error" then
AUDIO.PLAY_SOUND_FRONTEND(-1, "ERROR", "HUD_FREEMODE_SOUNDSET", true)
end
if sound == "Nav" then
AUDIO.PLAY_SOUND_FRONTEND(-1, "NAV_LEFT_RIGHT", "HUD_FREEMODE_SOUNDSET", true)
end
if sound == "Nav2" then
AUDIO.PLAY_SOUND_FRONTEND(-1, "NAV_UP_DOWN", "HUD_FREEMODE_SOUNDSET", true)
end
if sound == "Pickup" then
AUDIO.PLAY_SOUND_FRONTEND(-1, "PICK_UP", "HUD_FRONTEND_DEFAULT_SOUNDSET", true)
end
if sound == "Select2" then
AUDIO.PLAY_SOUND_FRONTEND(-1, "CHANGE_STATION_LOUD", "RADIO_SOUNDSET", true)
end
if sound == "Radar" then
AUDIO.PLAY_SOUND_FRONTEND(-1, "RADAR_ACTIVATE", "DLC_BTL_SECURITY_VANS_RADAR_PING_SOUNDS", true)
end
if sound == "Delete" then
AUDIO.PLAY_SOUND_FRONTEND(-1, "DELETE", "HUD_DEATHMATCH_SOUNDSET", true)
end
if sound == "W_Pickup" then
AUDIO.PLAY_SOUND_FRONTEND(-1, "PICK_UP_WEAPON", "HUD_FRONTEND_CUSTOM_SOUNDSET", true)
end
end)
end
local function updateAirports()
filteredAirports = {}
for _, airport in ipairs(airports) do
table.insert(filteredAirports, airport)
end
end
local function displayAirports()
updateAirports()
local airportNames = {}
for _, airport in ipairs(filteredAirports) do
table.insert(airportNames, airport.name)
end
if disableArprtLst then
ImGui.BeginDisabled(true)
airport_index, used = ImGui.Combo("##airportList", airport_index, airportNames, #filteredAirports)
ImGui.EndDisabled()
else
airport_index, used = ImGui.Combo("##airportList", airport_index, airportNames, #filteredAirports)
end
end
local function updateGuards()
filteredGuards = {}
for _, bGuard in ipairs(bodyguards) do
table.insert(filteredGuards, bGuard)
end
table.sort(filteredGuards, function(a, b)
return a.name < b.name
end)
end
local function displayGuards()
updateGuards()
local groupNames = {}
for _, bGuard in ipairs(filteredGuards) do
table.insert(groupNames, bGuard.name)
end
bodyguard_index, used = ImGui.Combo("##bodyguardList", bodyguard_index, groupNames, #filteredGuards)
end
local function updatePlayerList()
filteredPlayers = {}
local players = entities.get_all_peds_as_handles()
for _, ped in ipairs(players) do
if PED.IS_PED_A_PLAYER(ped) then
if NETWORK.NETWORK_IS_PLAYER_ACTIVE(NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(ped)) then
if NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(player) == PLAYER.PLAYER_ID() then
table.insert(filteredPlayers, 1, ped)
else
table.insert(filteredPlayers, ped)
end
end
end
end
end
local function displayPlayerList()
updatePlayerList()
local playerNames = {}
for _, player in ipairs(filteredPlayers) do
local playerName = PLAYER.GET_PLAYER_NAME(NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(player))
local playerHost = NETWORK.NETWORK_GET_HOST_PLAYER_INDEX()
local friendCount = NETWORK.NETWORK_GET_FRIEND_COUNT()
if NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(player) == PLAYER.PLAYER_ID() then
playerName = playerName.." [You]"
end
if friendCount > 0 then
for i = 0, friendCount do
if playerName == NETWORK.NETWORK_GET_FRIEND_NAME(i) then
playerName = playerName.." [Friend]"
end
end
end
if playerHost == NETWORK.NETWORK_GET_PLAYER_INDEX_FROM_PED(player) then
playerName = playerName.." [Host]"
end
table.insert(playerNames, playerName)
end
playerIndex, used = ImGui.Combo("##playerList", playerIndex, playerNames, #filteredPlayers)
end
local function pedConfig(ped)
PED.SET_PED_CONFIG_FLAG(ped, 2, true)
PED.SET_PED_CONFIG_FLAG(ped, 43, true)
PED.SET_PED_CONFIG_FLAG(ped, 48, false)
PED.SET_PED_CONFIG_FLAG(ped, 140, false)
PED.SET_PED_CONFIG_FLAG(ped, 141, true)
PED.SET_PED_CONFIG_FLAG(ped, 144, true)
PED.SET_PED_CONFIG_FLAG(ped, 174, true)
PED.SET_PED_CONFIG_FLAG(ped, 177, true)
PED.SET_PED_CONFIG_FLAG(ped, 179, true)
PED.SET_PED_CONFIG_FLAG(ped, 249, true)
PED.SET_PED_CONFIG_FLAG(ped, 294, true)
PED.SET_PED_CONFIG_FLAG(ped, 311, true)
PED.SET_PED_CONFIG_FLAG(ped, 362, true)
PED.SET_PED_CONFIG_FLAG(ped, 363, true)
PED.SET_PED_CONFIG_FLAG(ped, 398, true)
PED.SET_PED_CONFIG_FLAG(ped, 401, true)
PED.SET_PED_CONFIG_FLAG(ped, 443, true)
-- PED.SET_RAGDOLL_BLOCKING_FLAGS(ped, 0)
-- PED.SET_RAGDOLL_BLOCKING_FLAGS(ped, 4)
-- PED.SET_RAGDOLL_BLOCKING_FLAGS(ped, 6)
-- PED.SET_RAGDOLL_BLOCKING_FLAGS(ped, 13)
-- PED.SET_RAGDOLL_BLOCKING_FLAGS(ped, 14)
-- PED.SET_RAGDOLL_BLOCKING_FLAGS(ped, 15)
PED.SET_PED_COMBAT_ABILITY(ped, 2)
PED.SET_PED_COMBAT_MOVEMENT(ped, 2)
PED.SET_PED_COMBAT_RANGE(ped, 2)
PED.SET_PED_HIGHLY_PERCEPTIVE(ped, true)
PED.SET_PED_SEEING_RANGE(ped, 300.0)
PED.SET_PED_HEARING_RANGE(ped, 300.0)
PED.SET_PED_COMBAT_ATTRIBUTES(ped, 1, true)
PED.SET_PED_COMBAT_ATTRIBUTES(ped, 2, true)
PED.SET_PED_COMBAT_ATTRIBUTES(ped, 3, true)
PED.SET_PED_COMBAT_ATTRIBUTES(ped, 5, true)
PED.SET_PED_COMBAT_ATTRIBUTES(ped, 12, true)
PED.SET_PED_COMBAT_ATTRIBUTES(ped, 13, true)
PED.SET_PED_COMBAT_ATTRIBUTES(ped, 20, true)
PED.SET_PED_COMBAT_ATTRIBUTES(ped, 21, true)
PED.SET_PED_COMBAT_ATTRIBUTES(ped, 22, true)
PED.SET_PED_COMBAT_ATTRIBUTES(ped, 27, true)
PED.SET_PED_COMBAT_ATTRIBUTES(ped, 28, true)
PED.SET_PED_COMBAT_ATTRIBUTES(ped, 31, true)
PED.SET_PED_COMBAT_ATTRIBUTES(ped, 34, true)
PED.SET_PED_COMBAT_ATTRIBUTES(ped, 41, true)
PED.SET_PED_COMBAT_ATTRIBUTES(ped, 42, true)
PED.SET_PED_COMBAT_ATTRIBUTES(ped, 46, true)
PED.SET_PED_COMBAT_ATTRIBUTES(ped, 50, true)
PED.SET_PED_COMBAT_ATTRIBUTES(ped, 54, true)
PED.SET_PED_COMBAT_ATTRIBUTES(ped, 55, true)
PED.SET_PED_COMBAT_ATTRIBUTES(ped, 58, true)
PED.SET_PED_COMBAT_ATTRIBUTES(ped, 61, true)
PED.SET_PED_COMBAT_ATTRIBUTES(ped, 71, true)
PED.SET_PED_ACCURACY(ped, math.random(70, 100))
PED.SET_PED_CAN_SWITCH_WEAPON(ped, true)
PED.SET_PED_CAN_BE_DRAGGED_OUT(ped, false)
PED.SET_PED_FIRING_PATTERN(ped, 3337513804)
WEAPON.SET_PED_DROPS_WEAPONS_WHEN_DEAD(ped, false)
end
--[[
local function iter(table)
local i = 0
local n = #table
return function ()
i = i + 1
if i <= n then
return table[i]
end
end
end
]]
local function nearestPed(closeTo)
script.run_in_fiber(function()
local gtaPeds = entities.get_all_peds_as_handles()
local myGroup = PED.GET_PED_GROUP_INDEX(self.get_ped())
for _, ped in ipairs(gtaPeds) do
if PED.IS_PED_HUMAN(ped) then
if ped ~= self.get_ped() then
if not PED.IS_PED_GROUP_MEMBER(ped, myGroup) then
local thisPos = ENTITY.GET_ENTITY_COORDS(closeTo, true)
local randomPedPos = ENTITY.GET_ENTITY_COORDS(ped, true)
local distCalc = SYSTEM.VDIST(thisPos.x, thisPos.y, thisPos.z, randomPedPos.x, randomPedPos.y, randomPedPos.z)
if distCalc < 50 then
if not ENTITY.IS_ENTITY_DEAD(ped) then
randomPed = ped
end
end
end
end
end
end
end)
return randomPed
end
local function giveWeapon(pedTable, weapon, weaponName, ped_category)
local sound
for _, ped in ipairs(pedTable) do
if ENTITY.DOES_ENTITY_EXIST(ped) then
if not WEAPON.HAS_PED_GOT_WEAPON(ped, weapon, false) then
WEAPON.GIVE_DELAYED_WEAPON_TO_PED(ped, weapon, 9999, false)
gui.show_message("Private Security", "Added "..weaponName.." to your".. ped_category.."' inventory.")
sound = "W_Pickup"
else
gui.show_error("Private Security", "Your "..ped_category.." already have this weapon.")
sound = "Error"
end
end
end
return sound
end
local function removeWeapon(pedTable, weapon, ped_category)
local sound
for _, ped in ipairs(pedTable) do
if WEAPON.HAS_PED_GOT_WEAPON(ped, weapon, false) then
WEAPON.REMOVE_WEAPON_FROM_PED(ped, weapon)
gui.show_message("Private Security", "Removed "..weaponName.." from your".. ped_category.."' inventory.")
sound = "Delete"
else
gui.show_error("Private Security", "Your "..ped_category.." do not have this weapon.")
sound = "Error"
end
return sound
end
end
billionaire_services:add_imgui(function()
ImGui.BeginTabBar("Billionaire Services", ImGuiTabBarFlags.None)
if ImGui.BeginTabItem("Private Flight") then
if tab1Sound then
widgetSound("Nav2")
tab1Sound = false
tab2Sound = true
tab3Sound = true
end
switch, isChanged = ImGui.RadioButton("Private Jet", switch, 0);ImGui.SameLine()
if isChanged then
widgetSound("Nav")
end
ImGui.Dummy(90, 1);ImGui.SameLine();switch, isChanged = ImGui.RadioButton("Private Heli", switch, 1)
if isChanged then
widgetSound("Nav")
end
if switch == 0 then
if arprtLstTop then
if disableArprtLst then
ImGui.TextDisabled("Choose an Airport:")
else
ImGui.Text("Choose an Airport:")
end
ImGui.PushItemWidth(280)
displayAirports()
ImGui.PopItemWidth()
if ImGui.IsItemHovered() and ImGui.IsItemClicked(0) then
widgetSound("Nav2")
end
end
local airportData = filteredAirports[airport_index + 1]
local jetModel = 0xB79F589E
local pilotModel = 0xE75B4B1C
local copilotModel = 0x864ED68E
if spawned_jet[1] == nil then
if ImGui.Button("Call Your Private Jet") then
widgetSound("Select")
jetDismissed = false
script.run_in_fiber(function(privateJet)
local myGroup = PED.GET_PED_GROUP_INDEX(self.get_ped())
if not PED.DOES_GROUP_EXIST(myGroup) then
myGroup = PED.CREATE_GROUP(0)
end
PED.SET_PED_AS_GROUP_LEADER(self.get_ped(), myGroup)
PED.SET_GROUP_SEPARATION_RANGE(myGroup, 16960)
PED.SET_GROUP_FORMATION(myGroup, 2)
PED.SET_GROUP_FORMATION_SPACING(myGroup, 3.0, 3.0, 1.0)
while not STREAMING.HAS_MODEL_LOADED(jetModel) do
STREAMING.REQUEST_MODEL(jetModel)
coroutine.yield()
end
pJet = VEHICLE.CREATE_VEHICLE(jetModel, 0.0, 0.0, 0.0, 0.0, true, false, false)
privateJet:sleep(200)
MISC.CLEAR_AREA_OF_VEHICLES(airportData.hangar.x, airportData.hangar.y, airportData.hangar.z, 5.0, false, false, false, false, false, false, 0)
ENTITY.SET_ENTITY_COORDS(pJet, airportData.hangar.x, airportData.hangar.y, airportData.hangar.z, true, true, true, true)
ENTITY.SET_ENTITY_HEADING(pJet, airportData.heading)
ENTITY.SET_ENTITY_INVINCIBLE(pJet, true)
VEHICLE.SET_ALLOW_VEHICLE_EXPLODES_ON_CONTACT(pJet, false)
VEHICLE.SET_VEHICLE_STRONG(pJet, true)
VEHICLE.SET_VEHICLE_ALLOW_HOMING_MISSLE_LOCKON(pJet, false, 0)
VEHICLE.SET_VEHICLE_DOOR_OPEN(pJet, 0, false, false)
VEHICLE.SET_VEHICLE_OCCUPANTS_TAKE_EXPLOSIVE_DAMAGE(pJet, false)
jetBlip = HUD.ADD_BLIP_FOR_ENTITY(pJet)
HUD.SET_BLIP_SPRITE(jetBlip, 423)
setBlipName("Private Jet", jetBlip)
table.insert(spawned_jet, pJet)
while not STREAMING.HAS_MODEL_LOADED(pilotModel) do
STREAMING.REQUEST_MODEL(pilotModel)
coroutine.yield()
end
pilot = PED.CREATE_PED_INSIDE_VEHICLE(pJet, "PED_TYPE_CIVMALE", pilotModel, -1, true, false)
ENTITY.SET_ENTITY_INVINCIBLE(pilot, true)
table.insert(spawned_pilot, pilot)
PED.SET_PED_CONFIG_FLAG(pilot, 251, true)
PED.SET_PED_CONFIG_FLAG(pilot, 255, true)
PED.SET_PED_CONFIG_FLAG(pilot, 398, true)
PED.SET_PED_CONFIG_FLAG(pilot, 402, true)
PED.SET_PED_CONFIG_FLAG(pilot, 167, true)
PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(pilot, true)
privateJet:sleep(100)
while not STREAMING.HAS_MODEL_LOADED(copilotModel) do
STREAMING.REQUEST_MODEL(copilotModel)
coroutine.yield()
end
copilot = PED.CREATE_PED_INSIDE_VEHICLE(pJet, "PED_TYPE_CIVMALE", copilotModel, 0, true, false)
ENTITY.SET_ENTITY_INVINCIBLE(copilot, true)
table.insert(spawned_pilot, copilot)
PED.SET_PED_CONFIG_FLAG(copilot, 251, true)
PED.SET_PED_CONFIG_FLAG(copilot, 255, true)
PED.SET_PED_CONFIG_FLAG(copilot, 398, true)
PED.SET_PED_CONFIG_FLAG(copilot, 402, true)
PED.SET_PED_CONFIG_FLAG(copilot, 167, true)
PED.SET_PED_AS_GROUP_MEMBER(copilot, myGroup)
PED.SET_BLOCKING_OF_NON_TEMPORARY_EVENTS(copilot, true)
VEHICLE.SET_VEHICLE_ENGINE_ON(pJet, true, false, false)
if NETWORK.NETWORK_IS_SESSION_STARTED() then
AUDIO.SET_VEH_RADIO_STATION(pJet, "RADIO_35_DLC_HEI4_MLR")
else
AUDIO.SET_VEH_RADIO_STATION(pJet, "RADIO_22_DLC_BATTLE_MIX1_RADIO")
end
end)
gui.show_message("Private Jet", "Your private jet is waiting for you at "..airportData.name..".")
end
else
arprtLstTop = false
if not jetDismissed then
ImGui.Spacing();ImGui.Spacing()
if ImGui.Button(" Dismiss Your Jet ") then
if not nineEleven then
if not flying then
widgetSound("Cancel")
showPilotLeavingMsg = true
jetDismissed = true
script.run_in_fiber(function(dismissJet)
if PED.IS_PED_SITTING_IN_VEHICLE(self.get_ped(), pJet) then
TASK.TASK_LEAVE_VEHICLE(self.get_ped(), pJet, 256)
dismissJet:sleep(2000)
end
if ENTITY.DOES_ENTITY_EXIST(pilot) or ENTITY.DOES_ENTITY_EXIST(copilot) then
VEHICLE.SET_VEHICLE_ENGINE_ON(pJet, false, false, false)
TASK.TASK_LEAVE_VEHICLE(pilot, pJet, 256)
TASK.TASK_LEAVE_VEHICLE(copilot, pJet, 256)
gui.show_message("Private Jet", "Your private jet has been dismissed. Please wait for your pilots to leave.")
TASK.TASK_WANDER_STANDARD(pilot, 10.0, 10)
TASK.TASK_WANDER_STANDARD(copilot, 10.0, 10)
dismissJet:sleep(10000)
PED.DELETE_PED(pilot)
PED.DELETE_PED(copilot)
if ENTITY.DOES_ENTITY_EXIST(pJet) then
ENTITY.SET_ENTITY_AS_MISSION_ENTITY(pJet, true, true)
dismissJet:sleep(200)
VEHICLE.DELETE_VEHICLE(pJet)
end
arprtLstTop = true
end
for k, _ in ipairs(spawned_jet) do
table.remove(spawned_jet, k)
end
for index, _ in ipairs(spawned_pilot) do
table.remove(spawned_pilot, index)
end
end)
else
widgetSound("Error")
gui.show_error("Private Jet", "Ask your pilot to land before dismissing your private jet.")
return
end
else
widgetSound("Error")
gui.show_error("Private Jet", "Too late now. Just brace yourself for impact.")
end
end
if jetTpBtn then
ImGui.SameLine();ImGui.Dummy(60, 1);ImGui.SameLine()
if ImGui.Button("Teleport To Jet") then
widgetSound("Select")
script.run_in_fiber(function(jettp)
CAM.DO_SCREEN_FADE_OUT(500)
jettp:sleep(1000)
TASK.CLEAR_PED_TASKS_IMMEDIATELY(self.get_ped())
PED.SET_PED_INTO_VEHICLE(self.get_ped(), pJet, 1)
jettp:sleep(1000)
CAM.DO_SCREEN_FADE_IN(500)
end)
end
end
ImGui.Spacing();ImGui.Text("Jet Options:");ImGui.Separator()
if not flying and not newFlight then
if PED.IS_PED_SITTING_IN_VEHICLE(self.get_ped(), pJet) then
ImGui.Dummy(75, 1);ImGui.SameLine()
if ImGui.Button("Fly Around Waypoint") then
script.run_in_fiber(function(flyTo)
local waypoint = HUD.GET_FIRST_BLIP_INFO_ID(HUD.GET_WAYPOINT_BLIP_ENUM_ID())
if HUD.DOES_BLIP_EXIST(waypoint) then
destination = HUD.GET_BLIP_COORDS(waypoint)
widgetSound("Select")
else
gui.show_error("Private Jet", "Please set a waypoint on the map first!")
widgetSound("Error")
return
end
if NETWORK.NETWORK_IS_SESSION_STARTED() then
AUDIO.SET_VEH_RADIO_STATION(pJet, "RADIO_35_DLC_HEI4_MLR") -- music locker for online
else
AUDIO.SET_VEH_RADIO_STATION(pJet, "RADIO_22_DLC_BATTLE_MIX1_RADIO") -- LSUR for SP
end
flying = true
initialFlight = true
VEHICLE.SET_VEHICLE_DOORS_SHUT(pJet, false)
TASK.TASK_VEHICLE_DRIVE_TO_COORD(pilot, pJet, airportData.taxiPos.x, airportData.taxiPos.y, airportData.taxiPos.z, 5.0, 0, 0xB79F589E, 8388614, 10.0, 10.0)
flyTo:sleep(6000)
CAM.DO_SCREEN_FADE_OUT(1000)
flyTo:sleep(1000)
CAM.DO_SCREEN_FADE_IN(1000)
ENTITY.SET_ENTITY_COORDS(pJet, airportData.cutPos.x, airportData.cutPos.y, airportData.cutPos.z, true, true, true, true)
VEHICLE.SET_VEHICLE_FORWARD_SPEED(pJet, 100.0) --360km/h
VEHICLE.CONTROL_LANDING_GEAR(pJet, 1)
TASK.TASK_PLANE_MISSION(pilot, pJet, 0, 0, destination.x, destination.y, destination.z + 600, 4, 100.0, 0, 90, 0, 0, 200)
flyTo:sleep(500)
initialFlight = false
end)
end
else
ImGui.TextWrapped("Board your private jet to see more options.")
end
end
else
if showPilotLeavingMsg then
local timer = 0
ImGui.TextWrapped("Your private jet has been dismissed. Please wait for your pilots to leave.")
timer = timer + 1
if timer > 50 then
showPilotLeavingMsg = false
end
end
end
if flying and not initialFlight then
if PED.IS_PED_SITTING_IN_VEHICLE(self.get_ped(), pJet) then
if not started_landing and not startLandingProcess then
ImGui.Dummy(75, 1);ImGui.SameLine()
if ImGui.Button("Fly To New Waypoint") then
script.run_in_fiber(function(newWp)
local newWaypoint = HUD.GET_FIRST_BLIP_INFO_ID(HUD.GET_WAYPOINT_BLIP_ENUM_ID())
if HUD.DOES_BLIP_EXIST(newWaypoint) then
newDestination = HUD.GET_BLIP_COORDS(newWaypoint)
if newDestination ~= destination then
widgetSound("Select")
TASK.TASK_PLANE_MISSION(pilot, pJet, 0, 0, newDestination.x, newDestination.y, newDestination.z + 600, 4, 100.0, 0, 90, 0, 0, 200)
newWp:sleep(500)
newFlight = true
flying = true
else
widgetSound("Error")
gui.show_error("Private Jet", "Please choose a different waypoint!")
return
end
else
widgetSound("Error")
gui.show_error("Private Jet", "Please set a waypoint on the map first!")
return
end
end)
end
end
else
ImGui.TextWrapped("Board your private jet to see more options.")
end
end
if flying and PED.IS_PED_SITTING_IN_VEHICLE(self.get_ped(), pJet) and not initialFlight then
if not started_landing and not startLandingProcess then
if btnPress == 0 then
ImGui.Dummy(120, 1);ImGui.SameLine()
if ImGui.Button("Do a 911") then
widgetSound("Select")
btnPress = btnPress + 1
end
elseif btnPress == 1 then
ImGui.Dummy(70, 1);ImGui.SameLine()
ImGui.Text("Are you sure about that?")
ImGui.Dummy(85, 1);ImGui.SameLine()
if ImGui.Button("YES, DO IT!") then
if not started_landing and not skippedLandingProcess then
widgetSound("Radar")
gui.show_error("Private Jet", "What's wrong with you? Fucking terrorist!")
script.run_in_fiber(function(terroristCunt)
nineEleven = true
initialFlight = true
newFlight = true
AUDIO.SET_VEH_RADIO_STATION(pJet, "OFF")
TASK.TASK_PLANE_MISSION(pilot, pJet, 0, 0, -77.7393, -802.863, 207.17, 6, 100.0, 0, 90.0, 0, 0, -5000) -- -77.7393, -802.863, 307.17
AUDIO.PLAY_PED_AMBIENT_SPEECH_NATIVE(pilot, "GENERIC_INSULT_HIGH", "SPEECH_PARAMS_FORCE_SHOUTED", 0)
terroristCunt:sleep(2000)
btnPress = btnPress + 1
end)
else
widgetSound("Error")
gui.show_message("Private Jet", "Your pilots can not commit acts of terrorism while in the process of landing.")
end
end
ImGui.SameLine();ImGui.Spacing();ImGui.SameLine()
if ImGui.Button(" No ") then
widgetSound("Cancel")
btnPress = 0
end
end
end
end
if PED.IS_PED_SITTING_IN_VEHICLE(self.get_ped(), pJet) then
ImGui.Spacing()
ImGui.Dummy(140, 1);ImGui.SameLine();ImGui.Text("Radio")
if AUDIO.IS_VEHICLE_RADIO_ON(pJet) then
ImGui.Dummy(125, 1);ImGui.SameLine()
if ImGui.Button("Turn Off") then
widgetSound("Select2")
AUDIO.SET_VEH_RADIO_STATION(pJet, "OFF")
end
ImGui.Dummy(5, 1);ImGui.SameLine()
if ImGui.Button("< Previous Station") then
widgetSound("Nav")
AUDIO.SET_RADIO_RETUNE_DOWN()
end
ImGui.SameLine();ImGui.Spacing();ImGui.SameLine()
if ImGui.Button("Next Station >") then
widgetSound("Nav")
AUDIO.SET_RADIO_RETUNE_UP()
end
local stationName = AUDIO.GET_PLAYER_RADIO_STATION_NAME()
local displayName = HUD.GET_FILENAME_FOR_AUDIO_CONVERSATION(stationName)
ImGui.Text("Now Playing: "..displayName)
else
ImGui.Dummy(125, 1);ImGui.SameLine()
if ImGui.Button("Turn On") then
if not nineEleven then
widgetSound("Select2")
AUDIO.SET_VEH_RADIO_STATION(pJet, "RADIO_22_DLC_BATTLE_MIX1_RADIO")
else
widgetSound("Error")
gui.show_error("Private Jet", "Are you seriously trying to listen to music while committing a terrorist act? Wow!")
end
end
end
ImGui.Spacing();ImGui.Separator()
ImGui.Dummy(140, 1);ImGui.SameLine();ImGui.Text("Seats")
ImGui.Dummy(5, 1);ImGui.SameLine()
if ImGui.Button(" < Previous Seat ") then
script.run_in_fiber(function()
local numSeats = VEHICLE.GET_VEHICLE_MAX_NUMBER_OF_PASSENGERS(pJet)
if jetSeat <= 1 then
jetSeat = numSeats
end
jetSeat = jetSeat - 1
if VEHICLE.IS_VEHICLE_SEAT_FREE(pJet, jetSeat, true) then
widgetSound("Nav")
PED.SET_PED_INTO_VEHICLE(self.get_ped(), pJet, jetSeat)
else
widgetSound("Error")
gui.show_message("Private Jet", "This seat is currently occupied.")
jetSeat = jetSeat - 1
return
end
end)
end
ImGui.SameLine();ImGui.Spacing();ImGui.SameLine()
if ImGui.Button(" Next Seat >") then
script.run_in_fiber(function()
local numSeats = VEHICLE.GET_VEHICLE_MAX_NUMBER_OF_PASSENGERS(pJet)
if jetSeat >= (numSeats - 1) then
jetSeat = 0
end
jetSeat = jetSeat + 1
if VEHICLE.IS_VEHICLE_SEAT_FREE(pJet, jetSeat, true) then
widgetSound("Nav")
PED.SET_PED_INTO_VEHICLE(self.get_ped(), pJet, jetSeat)
else
widgetSound("Error")
gui.show_message("Private Jet", "This seat is currently occupied.")
jetSeat = jetSeat + 1
return
end
end)
end
if not nineEleven then
ImGui.Spacing()
ImGui.Spacing()
ImGui.Text("Landing Options:")
ImGui.Separator()
if can_land then
if not arprtLstTop then
if disableArprtLst then
ImGui.TextDisabled("Choose an Airport:")
else
ImGui.Text("Choose an Airport:")
end
ImGui.PushItemWidth(280)
displayAirports()
ImGui.PopItemWidth()
if ImGui.IsItemHovered() and ImGui.IsItemClicked(0) then
widgetSound("Nav2")
end
end
if not startLandingProcess and not started_landing then
if not disableArprtLst then
if ImGui.Button("Land At "..airportData.name) then
local jetPos = ENTITY.GET_ENTITY_COORDS(pJet, false)
local hangarDist = SYSTEM.VDIST(jetPos.x, jetPos.y, jetPos.z, airportData.hangar.x, airportData.hangar.y, airportData.hangar.z)
if hangarDist <= 200 then
widgetSound("Error")
gui.show_message("Private Jet", "Your private jet is already at "..airportData.name)
return
else
skippedLandingProcess = false
startLandingProcess = true
script.run_in_fiber(function(script)
widgetSound("Select")
if spawned_escorts[1] ~= nil then
if ENTITY.DOES_ENTITY_EXIST(escortCar) then
if escortLeftCar then
TASK.CLEAR_PED_SECONDARY_TASK(escort_1)
TASK.CLEAR_PED_SECONDARY_TASK(escort_2)
TASK.CLEAR_PED_SECONDARY_TASK(escort_3)
PED.SET_PED_CONFIG_FLAG(escort_1, 402, true)
PED.SET_PED_CONFIG_FLAG(escort_2, 402, true)
PED.SET_PED_CONFIG_FLAG(escort_3, 402, true)
TASK.TASK_ENTER_VEHICLE(escort_1, escortCar, 10000, -1, 2.0, 1, 0, 0)
TASK.TASK_ENTER_VEHICLE(escort_2, escortCar, 10000, 0, 2.0, 1, 0, 0)
PED.SET_PED_INTO_VEHICLE(escort_3, escortCar, 1)
escortLeftCar = false
end
gui.show_message("Private Jet", "Flying towards "..airportData.name..". Your private escort will meet you there. Enjoy the rest of your flight!")