-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpeds.lua
83 lines (66 loc) · 2.38 KB
/
peds.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
local myPed = PlayerPedId()
local localPed = PlayerId()
function notify(string)
SetNotificationTextEntry("STRING")
AddTextComponentString(string)
DrawNotification(true, false)
end
function loadModel(modelHash)
local model = GetHashKey(modelHash)
RequestModel(model)
while not HasModelLoaded(model) do
RequestModel(model)
Citizen.Wait(0)
end
SetPlayerModel(localPed, model)
SetModelAsNoLongerNeeded(model)
end
--SHERIFF PED
RegisterCommand('sheriff', function()
loadModel("s_m_y_sheriff_01")
notify("~g~Sheriff~w~ Ped Applied!")
end, false)
--PD PED
RegisterCommand('cop', function()
loadModel("s_m_y_cop_01")
notify("~b~Police~w~ Ped Applied!")
end, false)
--SWAT PED
RegisterCommand('swat', function()
loadModel("S_M_Y_Swat_01")
notify("~r~SWAT~w~ Ped Applied!")
end, false)
--PRISONER PED
RegisterCommand('prisoner', function()
loadModel("S_M_Y_Prisoner_01")
notify("~o~Prisoner~w~ Ped Applied!")
end, false)
--EMS PED
RegisterCommand('ems', function()
loadModel('S_M_M_Paramedic_01')
notify("~b~~h~EMS~h~~w~ Ped Applied!")
end, false)
--FIRE PED
RegisterCommand('fire', function()
loadModel('S_M_Y_Fireman_01')
notify("~r~Fire~w~ Ped Applied!")
end, false)
--Remove Ped #2
RegisterCommand('pedremove2', function()
loadModel('a_m_y_hipster_02')
notify("~g~Sucess!~w~ Ped Removed!")
end, false)
--Remove Ped
RegisterCommand('pedremove', function()
loadModel('a_m_y_hipster_01')
notify("~g~Sucess! ~w~Ped Removed!")
end, false)
--Chat Suggestions
TriggerEvent('chat:addSuggestion', '/sheriff', 'Applies Sheriff Ped!')
TriggerEvent('chat:addSuggestion', '/cop', 'Applies Police Dept. Ped!')
TriggerEvent('chat:addSuggestion', '/swat', 'Loads the SWAT Team loadout')
TriggerEvent('chat:addSuggestion', '/prisoner', 'Applies Prisoner Outfit!')
TriggerEvent('chat:addSuggestion', '/ems', 'Applies EMS Ped!')
TriggerEvent('chat:addSuggestion', '/fire', 'Applies Fire Dept. Ped!')
TriggerEvent('chat:addSuggestion', '/pedremove', 'Removes Current Ped!')
TriggerEvent('chat:addSuggestion', '/pedremove2', 'Removes Current Ped!')