{"slug":"animations/scenarios/ped_commands_for_selecting_anim_variations","category":"animations","title":"Ped commands for selecting anim variations","kind":"table","intro":" These are commands for activating clips variation for enter, base or exit conditional anims within some scenario.\n \n \n Citizen.CreateThread(function()\n \twhile true do\n  \t\tCitizen.Wait(0)\n  \t\tif Citizen.InvokeNative(0x91AEF906BCA88877,0, 0x17BEC168) then   -- pressed E\n \t\t\t-- TASK_START_SCENARIO_IN_PLACE_HASH with conditional anim PROP_HUMAN_SEAT_CHAIR_GENERIC_MALE_A. Works for male player peds:\n \t\t\tCitizen.InvokeNative(0x524B54361229154F, PlayerPedId(), GetHashKey(\"PROP_HUMAN_SEAT_CHAIR\"), 0, 1, GetHashKey(\"PROP_HUMAN_SEAT_CHAIR_GENERIC_MALE_A\"), -1.0, 0)\n \t\tend\n \t\tif Citizen.InvokeNative(0x91AEF906BCA88877,0, 0x956C2A0E) then   -- pressed R\n \t\t\tlocal ped_command_hash=GetHashKey(\"EAFOR_A_L_ANGRY\")  -- -- to play angry exit animation to the left side or GetHashKey(\"\"EAFOR_A_R_ANGRY\") to play angry exit animation to the right side\n \t\t\tlocal ped_command_hash_activation_duration=50.0   -- 50 seconds\n \t\t\t-- _ACTIVATE_PED_COMMAND_HASH (as result, if ped EXITS scenario, it plays animations activated by ped command hash \"EAFOR_A_L_ANGRY\")\n \t\t\tCitizen.InvokeNative(0xD65FDC686A031C83, PlayerPedId(), ped_command_hash, ped_command_hash_activation_duration) \n \t\t\t -- _FORCE_SCENARIO_TRANSITION:\n \t\t\tCitizen.InvokeNative(0x6D07B371E9439019, PlayerPedId() )\n\t\t\t-- CLEAR_PED_TASKS (as result we force ped to properly exit scenario and play animations activated by ped command hash EAFOR_A_L_ANGRY)\n\t\t\tCitizen.InvokeNative(0xE1EF3C1216AFF2CD, PlayerPedId(), 0, 0)\n \t\tend\n \tend\n end)\n local ped_commands = {\n \t{conditional_anim_name, anim_variations_type, ped_command_hash,},\n }","tables":[{"id":16,"name":"ped_command_hashes_for_selecting_anim_variations","columns":["key","value"],"rows":3}],"sourceUrl":"https://github.com/femga/rdr3_discoveries/blob/477aaaccadb7f0c042286611d9939009636cff12/animations/scenarios/ped_commands_for_selecting_anim_variations.lua","rows":[{"row":0,"cells":{"key":"conditional_anim_name","value":"EA_WORLD_HUMAN_TREE_CHOP_NEW_WORKING_PRE_SWING"},"note":null},{"row":1,"cells":{"key":"anim_variations_type","value":"ExitAnim"},"note":null},{"row":2,"cells":{"key":"ped_command_hash","value":"EXIT_TREE_FALL"},"note":null}],"table":16}