-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathanimations.lua
More file actions
89 lines (82 loc) · 6.09 KB
/
animations.lua
File metadata and controls
89 lines (82 loc) · 6.09 KB
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
PedAnimations = {
{label = 'None', dict = '', anim = '', flag = 0},
{label = 'Hands Up', dict = 'missminuteman_1ig_2', anim = 'handsup_base', flag = 49},
{label = 'Drunk', dict = 'move_m@drunk@verydrunk', anim = 'fidget_07', flag = 49},
{label = 'Smoking', dict = 'amb@world_human_smoking@male@male_a@base', anim = 'base', flag = 49},
{label = 'Clipboard', dict = 'missfam4', anim = 'base', flag = 49},
{label = 'Lean Against Wall', dict = 'amb@world_human_leaning@male@wall@back@foot_up@idle_a', anim = 'idle_a', flag = 49},
{label = 'Sit On Ground', dict = 'amb@world_human_picnic@male@idle_a', anim = 'idle_a', flag = 1},
{label = 'Sit In Chair', dict = 'amb@world_human_stupor@male@idle_a', anim = 'idle_a', flag = 1},
{label = 'Phone Call', dict = 'cellphone@', anim = 'cellphone_call_listen_base', flag = 49},
{label = 'Taking Photos', dict = 'amb@world_human_tourist_mobile@male@base', anim = 'base', flag = 49},
{label = 'Yoga', dict = 'amb@world_human_yoga@male@base', anim = 'base_a', flag = 1},
{label = 'Fishing', dict = 'amb@world_human_stand_fishing@base', anim = 'base', flag = 1},
{label = 'Cop Standby', dict = 'amb@world_human_cop_idles@male@base', anim = 'base', flag = 49},
{label = 'Medic Tending', dict = 'amb@medic@standing@tendtodead@base', anim = 'base', flag = 1},
{label = 'Binoculars', dict = 'amb@world_human_binoculars@male@base', anim = 'base', flag = 49},
{label = 'Welding', dict = 'amb@world_human_welding@male@base', anim = 'base', flag = 1},
{label = 'Wash', dict = 'amb@world_human_maid_clean@', anim = 'base', flag = 1},
{label = 'Kneel', dict = 'amb@world_human_gardener_plant@male@base', anim = 'base', flag = 1},
{label = 'Guard', dict = 'amb@world_human_guard_patrol@male@base', anim = 'base', flag = 49},
{label = 'Hammering', dict = 'amb@world_human_hammering@male@base', anim = 'base', flag = 1},
{label = 'Cheering', dict = 'amb@world_human_cheering@male_a', anim = 'base', flag = 1},
{label = 'Dancing', dict = 'anim@mp_player_intcelebrationfemale@wave', anim = 'wave', flag = 49},
{label = 'Push Ups', dict = 'amb@world_human_push_ups@male@base', anim = 'base', flag = 1},
{label = 'Sit Ups', dict = 'amb@world_human_sit_ups@male@base', anim = 'base', flag = 1},
{label = 'Sunbathe', dict = 'amb@world_human_sunbathe@male@back@base', anim = 'base', flag = 1},
{label = 'Sunbathe 2', dict = 'amb@world_human_sunbathe@male@front@base', anim = 'base', flag = 1},
{label = 'Prostitute', dict = 'mini@prostitutes@sexlow_veh', anim = 'low_car_sex_loop_player', flag = 1},
{label = 'Cower', dict = 'amb@code_human_cower@male@base', anim = 'base', flag = 1},
{label = 'Cry', dict = 'mp_suicide', anim = 'pistol', flag = 1},
{label = 'Facepalm', dict = 'anim@mp_player_intcelebrationmale@face_palm', anim = 'face_palm', flag = 49},
{label = 'Finger Kiss', dict = 'anim@mp_player_intcelebrationmale@finger_kiss', anim = 'finger_kiss', flag = 49},
{label = 'Finger Point', dict = 'anim@mp_player_intcelebrationmale@finger_point', anim = 'finger_point', flag = 49},
{label = 'Handshake', dict = 'mp_common', anim = 'givetake1_a', flag = 49},
{label = 'Jog', dict = 'move_m@jog@', anim = 'idle', flag = 49},
{label = 'Kneel Hurt', dict = 'amb@medic@standing@kneel@base', anim = 'base', flag = 1},
{label = 'Knock Door', dict = 'timetable@jimmy@doorknock@', anim = 'knockdoor_idle', flag = 49},
{label = 'Laugh', dict = 'anim@mp_player_intcelebrationmale@laugh', anim = 'laugh', flag = 49},
{label = 'Lean Bar', dict = 'amb@prop_human_bum_shopping_cart@male@base', anim = 'base', flag = 49},
{label = 'Lean Rail', dict = 'amb@world_human_leaning@female@rail@base', anim = 'base', flag = 49},
{label = 'Lookout', dict = 'amb@world_human_binoculars@male@base', anim = 'base', flag = 49},
{label = 'Medic Kneel', dict = 'amb@medic@standing@kneel@base', anim = 'base', flag = 1},
{label = 'Medic Tending 2', dict = 'amb@medic@standing@tendtodead@idle_a', anim = 'idle_a', flag = 1},
{label = 'Muscle Flex', dict = 'amb@world_human_muscle_flex@arms_at_side@base', anim = 'base', flag = 1},
{label = 'Notepad', dict = 'amb@world_human_clipboard@male@base', anim = 'base', flag = 49},
{label = 'Parking Meter', dict = 'amb@world_human_parking_meter@male@base', anim = 'base', flag = 49},
{label = 'Party', dict = 'amb@world_human_partying@female@base', anim = 'base', flag = 49},
{label = 'Point', dict = 'gestures@f@standing@casual', anim = 'gesture_point', flag = 49},
{label = 'Push', dict = 'missfinale_c2ig_11', anim = 'pushcar_offcliff_f', flag = 1},
{label = 'Salute', dict = 'anim@mp_player_intcelebrationmale@salute', anim = 'salute', flag = 49},
{label = 'Scratch Head', dict = 'anim@mp_player_intcelebrationmale@scratch_head', anim = 'scratch_head', flag = 49},
{label = 'Shake Head', dict = 'anim@mp_player_intcelebrationmale@thumbs_up', anim = 'thumbs_up', flag = 49},
{label = 'Shocked', dict = 'anim@mp_player_intcelebrationmale@shocked', anim = 'shocked', flag = 49},
{label = 'Shower', dict = 'amb@world_human_bum_wash@male@high@base', anim = 'base', flag = 1},
}
function ApplyPedAnimation(ped, animIndex)
if not animIndex or not PedAnimations[animIndex] then
print("Invalid animation index:", animIndex)
return
end
local anim = PedAnimations[animIndex]
if anim.dict == '' or anim.anim == '' then
return
end
if not HasAnimDictLoaded(anim.dict) then
RequestAnimDict(anim.dict)
local timeout = 500
while not HasAnimDictLoaded(anim.dict) and timeout > 0 do
Wait(10)
timeout = timeout - 1
end
if timeout <= 0 then
TriggerEvent('chat:addMessage', {
color = {255, 0, 0},
multiline = true,
args = {"Error", "Failed to load animation"}
})
return
end
end
TaskPlayAnim(ped, anim.dict, anim.anim, 8.0, -8.0, -1, anim.flag, 0, false, false, false)
end