-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient.lua
1713 lines (1226 loc) · 47.8 KB
/
client.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
ESX = nil
Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
Citizen.Wait(100)
end
RefreshMoney()
RefreshMoney2()
end)
local societymoney, societymoney2, disable, admin, Checked, rang, color = nil, nil, true, true, false, "", "" --variable autre argent société, activer/désactiver, rang du joueur, couleur du text etc.
local DoorIndex = 1; -- variable pour la liste des portes de voiture
local DoorList = {"Avant Gauche", "Avant Droit", "Arrière Gauche", "Arrière Droit", "Capot", "Coffre"} -- variable pour les portes de voiture
local avantg, avantd, arriereg, arriered, capot, coffre = false, false, false, false, false, false -- variable pour les portes de voiture
local CardIndex = 1;
local CardList = {"Donner", "Regarder"} -- variable pour les cartes d'identité
local noclip, showCoords, godmode, ghostmode, showName, gamerTags = false, false, false, false, false, {}
RegisterNetEvent('esx:playerLoaded')
AddEventHandler('esx:playerLoaded', function(xPlayer)
ESX.PlayerData = xPlayer
ESX.PlayerLoaded = true
end)
RegisterNetEvent('esx:onPlayerLogout')
AddEventHandler('esx:onPlayerLogout', function()
ESX.PlayerLoaded = false
ESX.PlayerData = {}
end)
RegisterNetEvent('esx:setJob')
AddEventHandler('esx:setJob', function(job)
ESX.PlayerData.job = job
RefreshMoney()
end)
RegisterNetEvent('esx:setJob2')
AddEventHandler('esx:setJob2', function(job2)
ESX.PlayerData.job2 = job2
RefreshMoney2()
end)
function OpenF5Menu()
local MainMenu = RageUI.CreateMenu("Xel_F5", "Menu IntÉractions", 1, 1, "commonmenu", "gradient_bgd", 255, --[[Rouge]] 255, --[[Vert]] 0, --[[Bleu]] 0)
MainMenu.EnableMouse = false;
local Perso = RageUI.CreateSubMenu(MainMenu, "Citoyenneté", "IntÉractions Personnelles")
local Divers = RageUI.CreateSubMenu(MainMenu, "Citoyenneté", "IntÉractions Diverses")
local Info = RageUI.CreateSubMenu(MainMenu, "Informations", "Tous savoir sur le serveur")
local SubMenu = RageUI.CreateSubMenu(Perso, "Portefeuille", "Portefeuille")
local CashSubmenu = RageUI.CreateSubMenu(SubMenu, "Argent Cash", "Portefeuille")
local DirtyCashSubmenu = RageUI.CreateSubMenu(SubMenu, "Argent Sale", "Portefeuille")
local Vetement = RageUI.CreateSubMenu(Perso, "Vêtements", "Enlever/Mettre vos VÊtements")
local Accessoires = RageUI.CreateSubMenu(Perso, "Accessoires", "Accessoires")
local Societe = RageUI.CreateSubMenu(Divers, "Société", "Gestion SociÉtÉ")
local Orga = RageUI.CreateSubMenu(Divers, "Organisation", "Gestion Organisation")
local Vehicule = RageUI.CreateSubMenu(Divers, "Véhicule", "Gestion Véhicule")
local Admin = RageUI.CreateSubMenu(MainMenu, "Administration", "Administration")
local AdminJoueur = RageUI.CreateSubMenu(Admin, "Administration", "Joueurs")
local AdminTP = RageUI.CreateSubMenu(Admin, "Administration", "TÉLÉPORTATION")
local AdminSanction = RageUI.CreateSubMenu(Admin, "Administration", "Sacntion")
local AdminVehicule = RageUI.CreateSubMenu(Admin, "Administration", "Véhicule")
local SubMenu11 = RageUI.CreateSubMenu(MainMenu, "Vide", "Vide")
function RageUI.PoolMenus:Example()
MainMenu:IsVisible(function(Items)
Items:AddSeparator("~b~↓~s~ Citoyenneté ~b~↓")
Items:AddButton("📌\tIntéraction Personnelle", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
end, Perso)
Items:AddButton("💡\tIntéraction Diverse", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
end, Divers)
Items:AddButton("📜\tInformations", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
end, Info)
Items:AddButton("⚜️\tAdministration", nil, { IsDisabled = admin, RightLabel = "~m~→→" }, function(onSelected)
end, Admin)
end, function(Panels)
end)
Perso:IsVisible(function(Items)
-- Items
Items:AddButton("📦 Inventaire", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if onSelected then
OpenInventory()
end
end)
Items:AddButton("💵 Portefeuille", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
end, SubMenu)
Items:AddButton("👔 Vêtements", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
end, Vetement)
Items:AddButton("🧢 Accessoires", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
end, Accessoires)
Items:AddButton("🧾 Factures", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
ExecuteCommand('factures')
CreateThread(function ()
RageUI.CloseAll()
end)
end
end)
end, function()
-- Panels
end)
Divers:IsVisible(function(Items)
-- Items
if ESX.PlayerData.job.grade_name == 'boss' then
Items:AddButton("🏢\tGestion Société", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
end, Societe)
end
if ESX.PlayerData.job2.grade_name == 'boss' then
Items:AddButton("🏗\tGestion Organisation", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
end, Orga)
end
if IsPedSittingInAnyVehicle(PlayerPedId()) then
if (GetPedInVehicleSeat(GetVehiclePedIsIn(PlayerPedId(), false), -1) == PlayerPedId()) then
disable = false
end
end
Items:AddButton("🚘\tGestion Véhicule", nil, { IsDisabled = disable, RightLabel = "~m~→→" }, function(onSelected)
end, Vehicule)
end, function()
-- Panels
end)
Info:IsVisible(function(Items)
-- Items
Items:AddSeparator(" Développer ~r~→~s~ ~p~Xeltax_~s~ ")
Items:AddSeparator(" Discord ~r~→~s~ ~b~BLABLABLA~s~ ")
Items:AddButton("💻\tTouches du serveur", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
end, touche)
end, function()
-- Panels
end)
SubMenu:IsVisible(function(Items)
-- Items
Items:AddSeparator("↓ ~b~Informations~s~ ↓")
Items:AddSeparator("~y~Job :~s~ " .. ESX.PlayerData.job.label .. "~y~ | ~s~" .. ESX.PlayerData.job.grade_label.. " ~y~|")
Items:AddSeparator("~r~Gang :~s~ " .. ESX.PlayerData.job2.label .. "~r~ | ~s~" .. ESX.PlayerData.job2.grade_label .. " ~r~|")
Items:AddSeparator("" .. GetPlayerName(PlayerId()) .." ~p~votre ID est :~s~ " ..GetPlayerServerId(PlayerId()))
Items:AddSeparator("↓ ~g~Finance~s~ ↓")
for i = 1, #ESX.PlayerData.accounts, 1 do
if ESX.PlayerData.accounts[i].name == 'money' then
Items:AddButton( "Argent Cash : ~g~" .. ESX.Math.GroupDigits(ESX.PlayerData.accounts[i].money) .. " ~s~$", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
end, CashSubmenu)
end
if ESX.PlayerData.accounts[i].name == 'bank' then
Items:AddButton( "Banque : ~g~" .. ESX.PlayerData.accounts[i].money .. " ~s~$", nil, { IsDisabled = false }, function(onSelected)
end)
end
if ESX.PlayerData.accounts[i].name == 'black_money' then
Items:AddButton( "Argent Sale : ~r~" .. ESX.PlayerData.accounts[i].money .. " ~s~$", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
end, DirtyCashSubmenu)
end
end
if Config.EnableJsFourIdCard == true then
Items:AddList("Carte d'identité", CardList, CardIndex, nil, { IsDisabled = false }, function(Index, onSelected, onListChange)
if (onListChange) then
CardIndex = Index;
end
if (onSelected) then
if Index == 1 then
closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
if closestDistance ~= -1 and closestDistance <= 3.0 then
TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(closestPlayer))
else
ESX.ShowNotification("~r~Aucun joueur à proximité")
end
elseif Index == 2 then
TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId()))
end
end
end)
Items:AddList("Permis de conduire", CardList, CardIndex, nil, { IsDisabled = false }, function(Index, onSelected, onListChange)
if (onListChange) then
CardIndex = Index;
end
if (onSelected) then
if Index == 1 then
closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
if closestDistance ~= -1 and closestDistance <= 3.0 then
TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(closestPlayer), 'driver')
else
ESX.ShowNotification("~r~Aucun joueur à proximité")
end
elseif Index == 2 then
TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId()), 'driver')
end
end
end)
Items:AddList("Permis de port d'arme", CardList, CardIndex, nil, { IsDisabled = false }, function(Index, onSelected, onListChange)
if (onListChange) then
CardIndex = Index;
end
if (onSelected) then
if Index == 1 then
closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
if closestDistance ~= -1 and closestDistance <= 3.0 then
TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(closestPlayer), 'weapon')
else
ESX.ShowNotification("~r~Aucun joueur à proximité")
end
elseif Index == 2 then
TriggerServerEvent('jsfour-idcard:open', GetPlayerServerId(PlayerId()), GetPlayerServerId(PlayerId()), 'weapon')
end
end
end)
end
end, function()
-- Panels
end)
CashSubmenu:IsVisible(function(Items)
Items:AddButton( "Donner", nil, { IsDisabled = false}, function(onSelected)
if (onSelected) then
local joueurProche = false
closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
if closestDistance ~= -1 and closestDistance <= 3 then
joueurProche = true
end
local quantity = KeyboardInput("Montant à jeter :", "", 20)
local post = true
if quantity ~= nil then
quantity = tonumber(quantity)
if type(quantity) == 'number' then
quantity = ESX.Math.Round(quantity)
else
post = false
ESX.ShowNotification("Montant Invalide")
end
end
if joueurProche == true then
if post == true then
TriggerServerEvent('esx:givecash', GetPlayerServerId(closestPlayer), quantity)
CreateThread(function ()
RageUI.CloseAll()
end)
else
ESX.ShowNotification("~r~Montant Invalide")
end
else
ESX.ShowNotification("~r~Aucun joueur proche.")
end
end
end)
Items:AddButton( "Jeter", nil, { IsDisabled = false}, function(onSelected)
if (onSelected) then
local quantity = KeyboardInput("Montant à jeter :", "", 20)
local post = true
if quantity ~= nil then
quantity = tonumber(quantity)
if type(quantity) == 'number' then
quantity = ESX.Math.Round(quantity)
else
post = false
ESX.ShowNotification("Montant Invalide")
end
end
if post == true then
TriggerServerEvent('esx:DropMoney', "money", quantity)
CreateThread(function ()
RageUI.CloseAll()
end)
else
ESX.ShowNotification("~r~Montant Invalide")
end
end
end)
end, function()
-- Panels
end)
DirtyCashSubmenu:IsVisible(function(Items)
Items:AddButton( "Donner", nil, { IsDisabled = false}, function(onSelected)
if (onSelected) then
local joueurProche = false
closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
if closestDistance ~= -1 and closestDistance <= 3 then
joueurProche = true
end
local quantity = KeyboardInput("Montant à jeter :", "", 20)
local post = true
if quantity ~= nil then
quantity = tonumber(quantity)
if type(quantity) == 'number' then
quantity = ESX.Math.Round(quantity)
else
post = false
ESX.ShowNotification("Montant Invalide")
end
end
if joueurProche == true then
if post == true then
TriggerServerEvent('esx:givecash', GetPlayerServerId(closestPlayer), quantity)
CreateThread(function ()
RageUI.CloseAll()
end)
else
ESX.ShowNotification("~r~Montant Invalide")
end
else
ESX.ShowNotification("~r~Aucun joueur proche.")
end
end
end)
Items:AddButton( "Jeter", nil, { IsDisabled = false}, function(onSelected)
if (onSelected) then
local quantity = KeyboardInput("Montant à jeter :", "", 20)
local post = true
if quantity ~= nil then
quantity = tonumber(quantity)
if type(quantity) == 'number' then
quantity = ESX.Math.Round(quantity)
else
post = false
ESX.ShowNotification("Montant Invalide")
end
end
if post == true then
TriggerServerEvent('esx:DropMoney', "black_money", quantity)
CreateThread(function ()
RageUI.CloseAll()
end)
else
ESX.ShowNotification("~r~Montant Invalide")
end
end
end)
end, function()
-- Panels
end)
Vetement:IsVisible(function(Items)
-- Items
local player = PlayerPedId()
Items:AddButton("🧥 Veste", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
ChangeVetement('torso', player)
end
end)
Items:AddButton("👖 Pantalon", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
ChangeVetement('pants', player)
end
end)
Items:AddButton("👟 Chaussure", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
ChangeVetement('shoes', player)
end
end)
Items:AddButton("🎒 Sac", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
ChangeVetement('bag', player)
end
end)
end, function()
-- Panels
end)
Accessoires:IsVisible(function(Items)
-- Items
local player = PlayerPedId()
Items:AddButton("👺 Masque", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
startAnimAction('misscommon@van_put_on_masks', 'put_on_mask_rds')
Citizen.Wait(1000)
ClearPedTasks(player)
SetUnsetAccessory('Mask')
end
end)
Items:AddButton("🎓 Chapeau / Casquette", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
startAnimAction('missheist_agency2ahelmet', 'take_off_helmet_stand')
Citizen.Wait(1000)
ClearPedTasks(player)
SetUnsetAccessory('Helmet')
end
end)
Items:AddButton("👂 Accessoires d'oreilles", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
startAnimAction('mini@ears_defenders', 'takeoff_earsdefenders_idle')
Citizen.Wait(1000)
ClearPedTasks(player)
SetUnsetAccessory('Ears')
end
end)
Items:AddButton("👀 Lunettes", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
startAnimAction('clothingspecs', 'take_off')
Citizen.Wait(1000)
ClearPedTasks(player)
SetUnsetAccessory('Glasses')
end
end)
end, function()
-- Panels
end)
Societe:IsVisible(function(Items)
-- Items
Items:AddSeparator("~y~Société ~s~: " .. ESX.PlayerData.job.label)
Items:AddSeparator("~h~Capital~h~ ~y~Société ~s~: " .. societymoney .. " ~g~$")
Items:AddSeparator("↓ ~y~~h~Gestion~h~~s~ de la ~y~Société~s~ ↓")
Items:AddButton("🖊 Recruter une personne", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
if ESX.PlayerData.job.grade_name == 'boss' then
local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
if closestPlayer == -1 or closestDistance > 3.0 then
ESX.ShowNotification("~r~Personne à proximité")
else
TriggerServerEvent('Xel_F5:Recruit', GetPlayerServerId(closestPlayer))
end
else
ESX.ShowNotification("Tu n'est pas le patron")
end
end
end)
Items:AddButton("📈 Promouvoir une personne", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
if ESX.PlayerData.job.grade_name == 'boss' then
local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
if closestPlayer == -1 or closestDistance > 3.0 then
ESX.ShowNotification("~r~Personne à proximité")
else
TriggerServerEvent('Xel_f5:Promote', GetPlayerServerId(closestPlayer))
end
else
ESX.ShowNotification("Tu n'est pas le patron")
end
end
end)
Items:AddButton("📉 Retrograder une personne", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
if ESX.PlayerData.job.grade_name == 'boss' then
local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
if closestPlayer == -1 or closestDistance > 3.0 then
ESX.ShowNotification("~r~Personne à proximité")
else
TriggerServerEvent('Xel_f5:Demote', GetPlayerServerId(closestPlayer))
end
else
ESX.ShowNotification("Tu n'est pas le patron")
end
end
end)
Items:AddButton("⛔️ Licencier une personne", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
if ESX.PlayerData.job.grade_name == 'boss' then
local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
if closestPlayer == -1 or closestDistance > 3.0 then
ESX.ShowNotification("~r~Personne à proximité")
else
TriggerServerEvent('Xel_f5:Fire', GetPlayerServerId(closestPlayer))
end
else
ESX.ShowNotification("Tu n'est pas le patron")
end
end
end)
end, function()
-- Panels
end)
Orga:IsVisible(function(Items)
-- Items
Items:AddSeparator("~r~Organisation ~s~: ~c~" .. ESX.PlayerData.job2.label)
Items:AddSeparator("~h~Capital~h~ ~r~Organisation ~s~: " .. societymoney2 .. " ~g~$")
Items:AddSeparator("↓ ~r~~h~Gestion~h~~s~ de ~r~l'Organisation~s~ ↓")
Items:AddButton("🩸 Recruter un membre", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
if ESX.PlayerData.job2.grade_name == 'boss' then
local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
if closestPlayer == -1 or closestDistance > 3.0 then
ESX.ShowNotification("~r~Personne à proximité")
else
TriggerServerEvent('Xel_F5:Recruit2', GetPlayerServerId(closestPlayer))
end
else
ESX.ShowNotification("Tu n'est pas le patron")
end
end
end)
Items:AddButton("♠️ Promouvoir un membre", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
if ESX.PlayerData.job2.grade_name == 'boss' then
local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
if closestPlayer == -1 or closestDistance > 3.0 then
ESX.ShowNotification("~r~Personne à proximité")
else
TriggerServerEvent('Xel_f5:Promote2', GetPlayerServerId(closestPlayer))
end
else
ESX.ShowNotification("Tu n'est pas le patron")
end
end
end)
Items:AddButton("♣️ Retrograder un membre", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
if ESX.PlayerData.job2.grade_name == 'boss' then
local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
if closestPlayer == -1 or closestDistance > 3.0 then
ESX.ShowNotification("~r~Personne à proximité")
else
TriggerServerEvent('Xel_f5:Demote2', GetPlayerServerId(closestPlayer))
end
else
ESX.ShowNotification("Tu n'est pas le patron")
end
end
end)
Items:AddButton("🔪 Virer un membre", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
if ESX.PlayerData.job2.grade_name == 'boss' then
local closestPlayer, closestDistance = ESX.Game.GetClosestPlayer()
if closestPlayer == -1 or closestDistance > 3.0 then
ESX.ShowNotification("~r~Personne à proximité")
else
TriggerServerEvent('Xel_f5:Fire2', GetPlayerServerId(closestPlayer))
end
else
ESX.ShowNotification("Tu n'est pas le patron")
end
end
end)
end, function()
-- Panels
end)
Vehicule:IsVisible(function(Items)
-- Items
local vehicule = GetVehiclePedIsIn(PlayerPedId(), false)
local etat = math.floor(GetVehicleBodyHealth(vehicule --[[ Vehicle ]])//10)
if etat >= 65 then
color = "~g~"
elseif etat < 65 and etat >= 35 then
color = "~o~"
elseif etat < 35 and etat >= 0 then
color = "~r~"
end
Items:AddSeparator("↓ ~b~Information~s~ du ~b~Véhicule~s~ ↓")
Items:AddSeparator("Etat du véhicule : "..color .. etat .. "%")
Items:AddButton("🔧 ~r~Eteindre~s~/~g~Allumer~s~ le moteur", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
if GetIsVehicleEngineRunning(vehicule) then
SetVehicleEngineOn(vehicule, false, false, true)
SetVehicleUndriveable(vehicule, true)
elseif not GetIsVehicleEngineRunning(vehicule) then
SetVehicleEngineOn(vehicule, true, false, true)
SetVehicleUndriveable(vehicule, false)
end
end
end)
Items:AddButton("🔑 ~r~Verrouiller~s~/~g~Déverouiller~s~ les portes", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
if GetVehicleDoorLockStatus(vehicule) == 1 then
SetVehicleDoorsLocked(vehicule --[[ Vehicle ]], 4 --[[ integer ]]) -- 4 veux dire que les gens son bloquer dedans + de RP
ESX.ShowNotification("Porte ~r~Vérouiller")
else
SetVehicleDoorsLocked(vehicule --[[ Vehicle ]], 1 --[[ integer ]])
ESX.ShowNotification("Porte ~g~Dévérouiller")
end
end
end)
Items:AddList("🚘 Porte du véhicule", DoorList, DoorIndex, nil, { IsDisabled = false }, function(Index, onSelected, onListChange)
if (onListChange) then
DoorIndex = Index;
end
if (onSelected) then
if Index == 1 then
if avantg == false then
avantg = true
SetVehicleDoorOpen(vehicule, 0, false, false)
elseif avantg == true then
avantg = false
SetVehicleDoorShut(vehicule, 0, false, false)
end
elseif Index == 2 then
if avantd == false then
avantd = true
SetVehicleDoorOpen(vehicule, 1, false, false)
elseif avantd == true then
avantd = false
SetVehicleDoorShut(vehicule, 1, false, false)
end
elseif Index == 3 then
if arriereg == false then
arriereg = true
SetVehicleDoorOpen(vehicule, 2, false, false)
elseif arriereg == true then
arriereg = false
SetVehicleDoorShut(vehicule, 2, false, false)
end
elseif Index == 4 then
if arriered == false then
arriered = true
SetVehicleDoorOpen(vehicule, 3, false, false)
elseif arriered == true then
arriered = false
SetVehicleDoorShut(vehicule, 3, false, false)
end
elseif Index == 5 then
if capot == false then
capot = true
SetVehicleDoorOpen(vehicule, 4, false, false)
elseif capot == true then
capot = false
SetVehicleDoorShut(vehicule, 4, false, false)
end
elseif Index == 6 then
if coffre == false then
coffre = true
SetVehicleDoorOpen(vehicule, 5, false, false)
elseif coffre == true then
coffre = false
SetVehicleDoorShut(vehicule, 5, false, false)
end
end
end
end)
end, function()
-- Panels
end)
Admin:IsVisible(function(Items)
-- Items
Items:CheckBox("⚜️ Mode Staff", nil, Checked, { Style = 1 }, function(onSelected, IsChecked)
if (onSelected) then
Checked = IsChecked
end
end)
if Checked then
Items:AddSeparator("Bonjour ~p~".. GetPlayerName(PlayerId()) .. "~s~ !")
Items:AddButton("😄 Joueurs", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
end, AdminJoueur)
Items:AddButton("📌 Téléportation", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
end, AdminTP)
Items:AddButton("🚘 Véhicule", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
end, AdminVehicule)
-- Items:AddButton("⚔️ Sanction", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
-- end, AdminSanction)
end
end, function()
-- Panels
end)
AdminJoueur:IsVisible(function(Items)
-- Items
Items:AddButton("👻 NoClip", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
AdminNoClip()
end
end)
Items:AddButton("🧲 Bring", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
local plyId = KeyboardInput("Id du Joueur :", "", 20)
if plyId ~= nil then
plyId = tonumber(plyId)
if type(plyId) == 'number' then
ExecuteCommand("bring " .. plyId)
end
end
end
end)
Items:AddButton("🔗 GoTo", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
local plyId = KeyboardInput("Id du Joueur :", "", 20)
if plyId ~= nil then
plyId = tonumber(plyId)
if type(plyId) == 'number' then
ExecuteCommand("goto " .. plyId)
end
end
end
end)
Items:AddButton("🦾 Invincible", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
local plyPed = PlayerPedId()
godmode = not godmode
if godmode then
SetEntityInvincible(plyPed, true)
ESX.ShowNotification("Mode Invincible ~g~Activer")
else
SetEntityInvincible(plyPed, false)
ESX.ShowNotification("Mode Invincible ~r~Désactiver")
end
end
end)
Items:AddButton("👀 Invisible", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
local plyPed = PlayerPedId()
ghostmode = not ghostmode
if ghostmode then
SetEntityVisible(plyPed, false, false)
ESX.ShowNotification("Mode Invisible ~g~Activer")
else
SetEntityVisible(plyPed, true, false)
ESX.ShowNotification("Mode Invisible ~r~Désactiver")
end
end
end)
Items:AddButton("👁🗨 Voir les Noms", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
showName = not showName
if not showname then
for targetPlayer, gamerTag in pairs(gamerTags) do
RemoveMpGamerTag(gamerTag)
gamerTags[targetPlayer] = nil
end
ESX.ShowNotification("Vision des Noms ~g~Activer !")
else
ESX.ShowNotification("Vision des Noms ~r~Désactiver !")
end
end
end)
Items:AddButton("🩹 Revive", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
local plyId = KeyboardInput("Id du Joueur :", "", 20)
if plyId ~= nil then
plyId = tonumber(plyId)
if type(plyId) == 'number' then
ExecuteCommand("revive " .. plyId)
end
end
end
end)
Items:AddButton("🩺 Revive All", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
ExecuteCommand("reviveall")
end
end)
Items:AddButton("🗺️ Voirs Coordonnées", nil, { IsDisabled = false, RightLabel = "~m~→→" }, function(onSelected)
if (onSelected) then
showCoords = not showCoords
end
end)