fork download
  1. if data.current.value == 'menuperso_actions' then
  2.  
  3. ESX.UI.Menu.Open(
  4. 'default', GetCurrentResourceName(), 'menuperso_actions',
  5. {
  6. title = 'Actions',
  7. align = 'top-left',
  8. elements = {
  9. {label = 'Annuler Animations', value = 'menuperso_actions__annuler'},
  10. --{label = 'Faire ses besoins [WIP]', value = 'menuperso_actions_pipi'},
  11. {label = 'Arrestation', value = 'menuperso_actions_arrest'},
  12. {label = 'Animations de Salutations', value = 'menuperso_actions_Salute'},
  13. {label = 'Animations d\'Humeurs', value = 'menuperso_actions_Humor'},
  14. {label = 'Animations de Travail', value = 'menuperso_actions_Travail'},
  15. {label = 'Animations Festives', value = 'menuperso_actions_Festives'},
  16. {label = 'Animations Diverses', value = 'menuperso_actions_Others'},
  17. },
  18. },
  19. function(data2, menu2)
  20.  
  21. if data2.current.value == 'menuperso_actions__annuler' then
  22. local ped = GetPlayerPed(-1);
  23. if ped then
  24. ClearPedTasks(ped);
  25. end
  26. end
  27. if data2.current.value == 'menuperso_actions_arrest' then
  28.  
  29. local player = GetPlayerPed( -1 )
  30. if ( DoesEntityExist( player ) and not IsEntityDead( player )) then
  31. loadAnimDict( "random@arrests" )
  32. loadAnimDict( "random@arrests@busted" )
  33. if ( IsEntityPlayingAnim( player, "random@arrests@busted", "idle_a", 3 ) ) then
  34. TaskPlayAnim( player, "random@arrests@busted", "exit", 8.0, 1.0, -1, 2, 0, 0, 0, 0 )
  35. Wait (3000)
  36. TaskPlayAnim( player, "random@arrests", "kneeling_arrest_get_up", 8.0, 1.0, -1, 128, 0, 0, 0, 0 )
  37. else
  38. TaskPlayAnim( player, "random@arrests", "idle_2_hands_up", 8.0, 1.0, -1, 2, 0, 0, 0, 0 )
  39. Wait (4000)
  40. TaskPlayAnim( player, "random@arrests", "kneeling_arrest_idle", 8.0, 1.0, -1, 2, 0, 0, 0, 0 )
  41. Wait (500)
  42. TaskPlayAnim( player, "random@arrests@busted", "enter", 8.0, 1.0, -1, 2, 0, 0, 0, 0 )
  43. Wait (1000)
  44. TaskPlayAnim( player, "random@arrests@busted", "idle_a", 8.0, 1.0, -1, 9, 0, 0, 0, 0 )
  45. end
  46. end
  47.  
  48. end
  49. if data2.current.value == 'menuperso_actions_pipi' then
  50. ESX.UI.Menu.CloseAll()
  51. end
  52.  
  53. if data2.current.value == 'menuperso_actions_Salute' then
  54. ESX.UI.Menu.Open(
  55. 'default', GetCurrentResourceName(), 'menuperso_actions_Salute',
  56. {
  57. title = 'Animations Salutations',
  58. align = 'top-left',
  59. elements = {
  60. {label = 'Saluer', value = 'menuperso_actions_Salute_saluer'},
  61. {label = 'Serrer la main', value = 'menuperso_actions_Salute_serrerlamain'},
  62. {label = 'Tape en 5', value = 'menuperso_actions_Salute_tapeen5'},
  63. {label = 'Salut Militaire', value = 'menuperso_actions_Salute_salutmilitaire'},
  64. },
  65. },
  66. function(data3, menu3)
  67.  
  68. if data3.current.value == 'menuperso_actions_Salute_saluer' then
  69. animsAction({ lib = "gestures@m@standing@casual", anim = "gesture_hello" })
  70. end
  71.  
  72. if data3.current.value == 'menuperso_actions_Salute_serrerlamain' then
  73. animsAction({ lib = "mp_common", anim = "givetake1_a" })
  74. end
  75.  
  76. if data3.current.value == 'menuperso_actions_Salute_tapeen5' then
  77. animsAction({ lib = "mp_ped_interaction", anim = "highfive_guy_a" })
  78. end
  79.  
  80. if data3.current.value == 'menuperso_actions_Salute_salutmilitaire' then
  81. animsAction({ lib = "mp_player_int_uppersalute", anim = "mp_player_int_salute" })
  82. end
  83.  
  84. end,
  85. function(data3, menu3)
  86. menu3.close()
  87. end
  88. )
  89. end
  90.  
  91. if data2.current.value == 'menuperso_actions_Humor' then
  92. ESX.UI.Menu.Open(
  93. 'default', GetCurrentResourceName(), 'menuperso_actions_Humor',
  94. {
  95. title = 'Animations Humeurs',
  96. align = 'top-left',
  97. elements = {
  98. {label = 'Féliciter', value = 'menuperso_actions_Humor_feliciter'},
  99. {label = 'Super', value = 'menuperso_actions_Humor_super'},
  100. {label = 'Calme-toi', value = 'menuperso_actions_Humor_calmetoi'},
  101. {label = 'Avoir peur', value = 'menuperso_actions_Humor_avoirpeur'},
  102. {label = 'C\'est pas Possible!', value = 'menuperso_actions_Humor_cestpaspossible'},
  103. {label = 'Enlacer', value = 'menuperso_actions_Humor_enlacer'},
  104. {label = 'Doigt d\'honneur', value = 'menuperso_actions_Humor_doightdhonneur'},
  105. {label = 'Branleur', value = 'menuperso_actions_Humor_branleur'},
  106. {label = 'Balle dans la tete', value = 'menuperso_actions_Humor_balledanslatete'},
  107. },
  108. },
  109. function(data3, menu3)
  110.  
  111. if data3.current.value == 'menuperso_actions_Humor_feliciter' then
  112. animsActionScenario({anim = "WORLD_HUMAN_CHEERING" })
  113. end
  114.  
  115. if data3.current.value == 'menuperso_actions_Humor_super' then
  116. animsAction({ lib = "anim@mp_player_intcelebrationmale@thumbs_up", anim = "thumbs_up" })
  117. end
  118.  
  119. if data3.current.value == 'menuperso_actions_Humor_calmetoi' then
  120. animsAction({ lib = "gestures@m@standing@casual", anim = "gesture_easy_now" })
  121. end
  122.  
  123. if data3.current.value == 'menuperso_actions_Humor_avoirpeur' then
  124. animsAction({ lib = "amb@code_human_cower_stand@female@idle_a", anim = "idle_c" })
  125. end
  126.  
  127. if data3.current.value == 'menuperso_actions_Humor_cestpaspossible' then
  128. animsAction({ lib = "gestures@m@standing@casual", anim = "gesture_damn" })
  129. end
  130.  
  131. if data3.current.value == 'menuperso_actions_Humor_enlacer' then
  132. animsAction({ lib = "mp_ped_interaction", anim = "kisses_guy_a" })
  133. end
  134.  
  135. if data3.current.value == 'menuperso_actions_Humor_doightdhonneur' then
  136. animsAction({ lib = "mp_player_int_upperfinger", anim = "mp_player_int_finger_01_enter" })
  137. end
  138.  
  139. if data3.current.value == 'menuperso_actions_Humor_branleur' then
  140. animsAction({ lib = "mp_player_int_upperwank", anim = "mp_player_int_wank_01" })
  141. end
  142.  
  143. if data3.current.value == 'menuperso_actions_Humor_balledanslatete' then
  144. animsAction({ lib = "mp_suicide", anim = "pistol" })
  145. end
  146.  
  147. end,
  148. function(data3, menu3)
  149. menu3.close()
  150. end
  151. )
  152. end
  153.  
  154. if data2.current.value == 'menuperso_actions_Travail' then
  155. ESX.UI.Menu.Open(
  156. 'default', GetCurrentResourceName(), 'menuperso_actions_Travail',
  157. {
  158. title = 'Animations Travail',
  159. align = 'top-left',
  160. elements = {
  161. {label = 'Pêcheur', value = 'menuperso_actions_Travail_pecheur'},
  162. {label = 'Agriculteur', value = 'menuperso_actions_Travail_agriculteur'},
  163. {label = 'Dépanneur', value = 'menuperso_actions_Travail_depanneur'},
  164. {label = 'Prendre des notes', value = 'menuperso_actions_Travail_prendredesnotes'},
  165. {label = 'Inspecter', value = 'menuperso_actions_Travail_inspecter'},
  166. },
  167. },
  168. function(data3, menu3)
  169.  
  170. if data3.current.value == 'menuperso_actions_Travail_pecheur' then
  171. animsActionScenario({anim = "world_human_stand_fishing" })
  172. end
  173.  
  174. if data3.current.value == 'menuperso_actions_Travail_agriculteur' then
  175. animsActionScenario({anim = "world_human_gardener_plant" })
  176. end
  177.  
  178. if data3.current.value == 'menuperso_actions_Travail_depanneur' then
  179. animsActionScenario({anim = "world_human_vehicle_mechanic" })
  180. end
  181.  
  182. if data3.current.value == 'menuperso_actions_Travail_prendredesnotes' then
  183. animsActionScenario({anim = "WORLD_HUMAN_CLIPBOARD" })
  184. end
  185.  
  186. if data3.current.value == 'menuperso_actions_Travail_inspecter' then
  187. animsActionScenario({anim = "CODE_HUMAN_MEDIC_KNEEL" })
  188. end
  189.  
  190. end,
  191. function(data3, menu3)
  192. menu3.close()
  193. end
  194. )
  195. end
  196.  
  197. if data2.current.value == 'menuperso_actions_Festives' then
  198. ESX.UI.Menu.Open(
  199. 'default', GetCurrentResourceName(), 'menuperso_actions_Festives',
  200. {
  201. title = 'Animations Festives',
  202. align = 'top-left',
  203. elements = {
  204. {label = 'Danser', value = 'menuperso_actions_Festives_danser'},
  205. {label = 'Jouer de la musique', value = 'menuperso_actions_Festives_jouerdelamusique'},
  206. {label = 'Boire une biere', value = 'menuperso_actions_Festives_boireunebiere'},
  207. {label = 'Air Guitar', value = 'menuperso_actions_Festives_airguitar'},
  208. },
  209. },
  210. function(data3, menu3)
  211.  
  212. if data3.current.value == 'menuperso_actions_Festives_danser' then
  213. animsAction({ lib = "amb@world_human_partying@female@partying_beer@base", anim = "base" })
  214. end
  215.  
  216. if data3.current.value == 'menuperso_actions_Festives_jouerdelamusique' then
  217. animsActionScenario({anim = "WORLD_HUMAN_MUSICIAN" })
  218. end
  219.  
  220. if data3.current.value == 'menuperso_actions_Festives_boireunebiere' then
  221. animsActionScenario({anim = "WORLD_HUMAN_DRINKING" })
  222. end
  223.  
  224. if data3.current.value == 'menuperso_actions_Festives_airguitar' then
  225. animsAction({ lib = "anim@mp_player_intcelebrationfemale@air_guitar", anim = "air_guitar" })
  226. end
  227.  
  228. end,
  229. function(data3, menu3)
  230. menu3.close()
  231. end
  232. )
  233. end
  234.  
  235. if data2.current.value == 'menuperso_actions_Others' then
  236. ESX.UI.Menu.Open(
  237. 'default', GetCurrentResourceName(), 'menuperso_actions_Others',
  238. {
  239. title = 'Animations Diverses',
  240. align = 'top-left',
  241. elements = {
  242. {label = 'Fumer une clope', value = 'menuperso_actions_Others_fumeruneclope'},
  243. {label = 'Faire des pompes', value = 'menuperso_actions_Others_fairedespompes'},
  244. {label = 'Regarder aux jumelles', value = 'menuperso_actions_Others_regarderauxjumelles'},
  245. {label = 'Faire du Yoga', value = 'menuperso_actions_Others_faireduyoga'},
  246. {label = 'Faire la statue', value = 'menuperso_actions_Others_fairelastatut'},
  247. {label = 'Faire du jogging', value = 'menuperso_actions_Others_fairedujogging'},
  248. {label = 'Montrer ses muscles', value = 'menuperso_actions_Others_fairedesetirements'},
  249. {label = 'Racoller', value = 'menuperso_actions_Others_racoller'},
  250. {label = 'Racoller 2', value = 'menuperso_actions_Others_racoller2'},
  251. {label = 'S\'asseoir', value = 'menuperso_actions_Others_sasseoir'},
  252. {label = 'S\'asseoir (Par terre)', value = 'menuperso_actions_Others_sasseoirparterre'},
  253. {label = 'Attendre', value = 'menuperso_actions_Others_attendre'},
  254. {label = 'Nettoyer quelque chose', value = 'menuperso_actions_Others_nettoyerquelquechose'},
  255. {label = 'Lever les mains', value = 'menuperso_actions_Others_leverlesmains'},
  256. {label = 'Position de Fouille', value = 'menuperso_actions_Others_positiondefouille'},
  257. {label = 'Se gratter les c**', value = 'menuperso_actions_Others_segratterlesc'},
  258. {label = 'Prendre un selfie', value = 'menuperso_actions_Others_prendreunselfie'},
  259. },
  260. },
  261. function(data3, menu3)
  262.  
  263. if data3.current.value == 'menuperso_actions_Others_fumeruneclope' then
  264. animsActionScenario({ anim = "WORLD_HUMAN_SMOKING" })
  265. end
  266.  
  267. if data3.current.value == 'menuperso_actions_Others_fairedespompes' then
  268. animsActionScenario({ anim = "WORLD_HUMAN_PUSH_UPS" })
  269. end
  270.  
  271. if data3.current.value == 'menuperso_actions_Others_regarderauxjumelles' then
  272. animsActionScenario({ anim = "WORLD_HUMAN_BINOCULARS" })
  273. end
  274.  
  275. if data3.current.value == 'menuperso_actions_Others_faireduyoga' then
  276. animsActionScenario({ anim = "WORLD_HUMAN_YOGA" })
  277. end
  278.  
  279. if data3.current.value == 'menuperso_actions_Others_fairelastatut' then
  280. animsActionScenario({ anim = "WORLD_HUMAN_HUMAN_STATUE" })
  281. end
  282.  
  283. if data3.current.value == 'menuperso_actions_Others_fairedujogging' then
  284. animsActionScenario({ anim = "WORLD_HUMAN_JOG_STANDING" })
  285. end
  286.  
  287. if data3.current.value == 'menuperso_actions_Others_fairedesetirements' then
  288. animsActionScenario({ anim = "WORLD_HUMAN_MUSCLE_FLEX" })
  289. end
  290.  
  291. if data3.current.value == 'menuperso_actions_Others_racoller' then
  292. animsActionScenario({ anim = "WORLD_HUMAN_PROSTITUTE_HIGH_CLASS" })
  293. end
  294.  
  295. if data3.current.value == 'menuperso_actions_Others_racoller2' then
  296. animsActionScenario({ anim = "WORLD_HUMAN_PROSTITUTE_LOW_CLASS" })
  297. end
  298.  
  299. if data3.current.value == 'menuperso_actions_Others_sasseoir' then
  300. animsAction({ lib = "anim@heists@prison_heistunfinished_biztarget_idle", anim = "target_idle" })
  301. end
  302.  
  303. if data3.current.value == 'menuperso_actions_Others_sasseoirparterre' then
  304. animsActionScenario({ anim = "WORLD_HUMAN_PICNIC" })
  305. end
  306.  
  307. if data3.current.value == 'menuperso_actions_Others_attendre' then
  308. animsActionScenario({ anim = "world_human_leaning" })
  309. end
  310.  
  311. if data3.current.value == 'menuperso_actions_Others_nettoyerquelquechose' then
  312. animsActionScenario({ anim = "world_human_maid_clean" })
  313. end
  314.  
  315. if data3.current.value == 'menuperso_actions_Others_leverlesmains' then
  316. animsAction({ lib = "random@mugging3", anim = "handsup_standing_base" })
  317. end
  318.  
  319. if data3.current.value == 'menuperso_actions_Others_positiondefouille' then
  320. animsAction({ lib = "mini@prostitutes@sexlow_veh", anim = "low_car_bj_to_prop_female" })
  321. end
  322.  
  323. if data3.current.value == 'menuperso_actions_Others_segratterlesc' then
  324. animsAction({ lib = "mp_player_int_uppergrab_crotch", anim = "mp_player_int_grab_crotch" })
  325. end
  326.  
  327. if data3.current.value == 'menuperso_actions_Others_prendreunselfie' then
  328. animsActionScenario({ anim = "world_human_tourist_mobile" })
  329. end
  330.  
  331. end,
  332. function(data3, menu3)
  333. menu3.close()
  334. end
  335. )
  336. end
  337.  
  338.  
  339. end,
  340. function(data2, menu2)
  341. menu2.close()
  342. end
  343. )
  344.  
  345. end
Runtime error #stdin #stdout #stderr 0s 14120KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
lua5.3: prog.lua:1: attempt to index a nil value (global 'data')
stack traceback:
	prog.lua:1: in main chunk
	[C]: in ?