{"slug":"graphics/ptfx/ptfx_assets_non_looped","category":"graphics","title":"Particle FX (non-looped)","kind":"table","intro":"\t\tEXAMPLE. MAKE FIREWORK BURST FROM YOUR PED:\n------------------------------------------------------------------------------------------\n------------------------------------------------------------------------------------------\n\t\tlocal new_ptfx_dictionary = \"scr_lom_train\"\n\t\tlocal new_ptfx_name = \"scr_ind1_firework_burst\"\n\n\t\tlocal is_particle_effect_active = false\n\t\tlocal current_ptfx_dictionary = new_ptfx_dictionary\n\t\tlocal current_ptfx_name = new_ptfx_name\n\n\t\tlocal current_ptfx_handle_id = false\n\n\t\tlocal ptfx_offcet_x = 0.0\n\t\tlocal ptfx_offcet_y = 0.0\n\t\tlocal ptfx_offcet_z = 0.0\n\t\tlocal ptfx_rot_x = -90.0\n\t\tlocal ptfx_rot_y = 0.0\n\t\tlocal ptfx_rot_z = 0.0\n\t\tlocal ptfx_scale = 1.0\n\t\tlocal ptfx_axis_x = 0\n\t\tlocal ptfx_axis_y = 0\n\t\tlocal ptfx_axis_z = 0\n\n\n\t\tCitizen.CreateThread(function()\n\t\t   \twhile true do\n\t\t        Citizen.Wait(0)\n\t\t        if Citizen.InvokeNative(0x91AEF906BCA88877,0, 0x17BEC168) then   -- just pressed E\n\t\t        \tif not is_particle_effect_active then\n\t\t        \t\tcurrent_ptfx_dictionary = new_ptfx_dictionary\n\t\t\t\t\t\tcurrent_ptfx_name = new_ptfx_name\n\t\t        \t\tif not Citizen.InvokeNative(0x65BB72F29138F5D6, GetHashKey(current_ptfx_dictionary)) then -- HasNamedPtfxAssetLoaded\n\t\t        \t\t\tCitizen.InvokeNative(0xF2B2353BBC0D4E8F, GetHashKey(current_ptfx_dictionary))  -- RequestNamedPtfxAsset\n\t\t        \t\t\tlocal counter = 0\n\t\t        \t\t\twhile not Citizen.InvokeNative(0x65BB72F29138F5D6, GetHashKey(current_ptfx_dictionary)) and counter <= 300 do  -- while not HasNamedPtfxAssetLoaded\n\t\t        \t\t\t\tCitizen.Wait(0)\n\t\t        \t\t\tend\n\t\t        \t\tend\n\t\t    \t\t\tif Citizen.InvokeNative(0x65BB72F29138F5D6, GetHashKey(current_ptfx_dictionary)) then  -- HasNamedPtfxAssetLoaded\n\t\t    \t\t\t\tCitizen.InvokeNative(0xA10DB07FC234DD12, current_ptfx_dictionary) -- UseParticleFxAsset\n\n\n\t\t    \t\t\t\tcurrent_ptfx_handle_id =  Citizen.InvokeNative(0xE6CFE43937061143,current_ptfx_name,PlayerPedId(),ptfx_offcet_x,ptfx_offcet_y,ptfx_offcet_z,ptfx_rot_x,ptfx_rot_y,ptfx_rot_z,ptfx_scale,ptfx_axis_x,ptfx_axis_y,ptfx_axis_z)    -- StartNetworkedParticleFxNonLoopedOnEntity\n\t\t    \t\t\t\tis_particle_effect_active = true\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tprint(\"cant load ptfx dictionary!\")\n\t\t    \t\t\tend\n\t\t        \telse\n\t\t        \t\tif current_ptfx_handle_id then\n\t\t\t\t\t\t\tif Citizen.InvokeNative(0x9DD5AFF561E88F2A, current_ptfx_handle_id) then   -- DoesParticleFxLoopedExist\n\t\t\t\t\t\t\t\tCitizen.InvokeNative(0x459598F579C98929, current_ptfx_handle_id, false)   -- RemoveParticleFx\n\t\t\t\t\t\t\tend\n\t\t\t\t\t\tend\n\t\t\t\t\t\tcurrent_ptfx_handle_id = false\n\t\t\t\t\t\tis_particle_effect_active = false\n\t\t        \tend\n\t\t        end\n\t\t    end\n\t\tend)\n\n----------------------------------------------------------------------------------------------------------------\n----------------------------------------------------------------------------------------------------------------\n ptfx_assets_non_looped = {\n \t[ptfx_dictionary] = {ptfx_name},\n }","tables":[{"id":36,"name":"ptfx_assets_non_looped","columns":["dictionary","effect"],"rows":1141}],"sourceUrl":"https://github.com/femga/rdr3_discoveries/blob/477aaaccadb7f0c042286611d9939009636cff12/graphics/ptfx/ptfx_assets_non_looped.lua","rows":[{"row":0,"cells":{"dictionary":"scr_beechers","effect":"ent_brk_wood_planks"},"note":null},{"row":1,"cells":{"dictionary":"scr_beechers","effect":"ent_brk_wood_splinter"},"note":null},{"row":2,"cells":{"dictionary":"scr_beechers","effect":"ent_dst_dust"},"note":null},{"row":3,"cells":{"dictionary":"scr_mob3","effect":"scr_mob3_tram_panel_sparks"},"note":null},{"row":4,"cells":{"dictionary":"scr_mob3","effect":"scr_mob3_tram_sparks_sp"},"note":null},{"row":5,"cells":{"dictionary":"scr_beat_gator_hunters","effect":"scr_beat_gator_blood"},"note":null},{"row":6,"cells":{"dictionary":"scr_grays3","effect":"scr_grays_blood_headshot"},"note":null},{"row":7,"cells":{"dictionary":"scr_net_gunslinger","effect":"scr_sht_moneybag_coins"},"note":null},{"row":8,"cells":{"dictionary":"scr_fme_spawn_effects","effect":"scr_fme_smoke_puff_tint"},"note":null},{"row":9,"cells":{"dictionary":"scr_fme_spawn_effects","effect":"scr_net_fetch_smoke_puff"},"note":null},{"row":10,"cells":{"dictionary":"des_guama3_tower_exp","effect":"ent_ray_guama3_tower_exp"},"note":null},{"row":11,"cells":{"dictionary":"des_guama3_tower_exp","effect":"exp_smoke_trail"},"note":null},{"row":12,"cells":{"dictionary":"scr_sadie2","effect":"ent_brk_door_lock"},"note":null},{"row":13,"cells":{"dictionary":"scr_sadie2","effect":"scr_sad2_liq_splash"},"note":null},{"row":14,"cells":{"dictionary":"scr_sadie2","effect":"scr_sad2_logwagon_dust"},"note":null},{"row":15,"cells":{"dictionary":"scr_beat_drown_murder","effect":"scr_beat_drown_splash"},"note":null},{"row":16,"cells":{"dictionary":"scr_winter4","effect":"scr_wnt4_private_car_breach"},"note":null},{"row":17,"cells":{"dictionary":"anm_kieran","effect":"ent_anim_food_plate_flip"},"note":null},{"row":18,"cells":{"dictionary":"scr_lom_train","effect":"scr_ind1_firework_burst"},"note":null},{"row":19,"cells":{"dictionary":"scr_lom_train","effect":"scr_ind1_firework_burst_lead"},"note":null},{"row":20,"cells":{"dictionary":"scr_lom_train","effect":"scr_ind1_firework_burst_long"},"note":null},{"row":21,"cells":{"dictionary":"scr_lom_train","effect":"scr_ind1_firework_burst_long_lead"},"note":null},{"row":22,"cells":{"dictionary":"scr_lom_train","effect":"scr_ind1_firework_burst_short"},"note":null},{"row":23,"cells":{"dictionary":"scr_lom_train","effect":"scr_ind1_firework_burst_short_lead"},"note":null},{"row":24,"cells":{"dictionary":"scr_lom_train","effect":"scr_ind1_firework_points"},"note":null},{"row":25,"cells":{"dictionary":"scr_lom_train","effect":"scr_ind1_firework_points_lead"},"note":null},{"row":26,"cells":{"dictionary":"scr_lom_train","effect":"scr_ind1_firework_ribbon"},"note":null},{"row":27,"cells":{"dictionary":"scr_lom_train","effect":"scr_ind1_firework_ribbon_lead"},"note":null},{"row":28,"cells":{"dictionary":"scr_lom_train","effect":"scr_ind1_firework_trail"},"note":null},{"row":29,"cells":{"dictionary":"scr_lom_train","effect":"scr_ind1_firework_trail_long"},"note":null},{"row":30,"cells":{"dictionary":"scr_lom_train","effect":"scr_ind1_firework_trail_ribbon"},"note":null},{"row":31,"cells":{"dictionary":"scr_lom_train","effect":"scr_ind1_firework_trail_short"},"note":null},{"row":32,"cells":{"dictionary":"scr_lom_train","effect":"scr_lom_train_firework"},"note":null},{"row":33,"cells":{"dictionary":"scr_lom_train","effect":"scr_lom_train_firework_burst_lead"},"note":null},{"row":34,"cells":{"dictionary":"scr_lom_train","effect":"scr_lom_train_firework_burst_long_lead"},"note":null},{"row":35,"cells":{"dictionary":"scr_lom_train","effect":"scr_lom_train_firework_burst_short_lead"},"note":null},{"row":36,"cells":{"dictionary":"scr_lom_train","effect":"scr_lom_train_firework_points_lead"},"note":null},{"row":37,"cells":{"dictionary":"scr_lom_train","effect":"scr_lom_train_firework_ribbon_lead"},"note":null},{"row":38,"cells":{"dictionary":"scr_mg_fishing","effect":"scr_mg_fish_splash"},"note":null},{"row":39,"cells":{"dictionary":"scr_mg_fishing","effect":"scr_mg_fish_struggle"},"note":null},{"row":40,"cells":{"dictionary":"scr_grays1","effect":"bul_decal_water"},"note":null},{"row":41,"cells":{"dictionary":"scr_grays1","effect":"exp_smoke_trail"},"note":null},{"row":42,"cells":{"dictionary":"scr_grays1","effect":"scr_gry1_exp"},"note":null},{"row":43,"cells":{"dictionary":"scr_grays1","effect":"scr_gry1_exp_ground"},"note":null},{"row":44,"cells":{"dictionary":"scr_grays1","effect":"scr_gry1_exp_jugs"},"note":null},{"row":45,"cells":{"dictionary":"anm_oddf","effect":"ent_anim_oddf_firework_burst"},"note":null},{"row":46,"cells":{"dictionary":"anm_oddf","effect":"ent_anim_oddf_powder_flash"},"note":null},{"row":47,"cells":{"dictionary":"anm_oddf","effect":"ent_anim_oddf_powder_flash_show"},"note":null},{"row":48,"cells":{"dictionary":"anm_oddf","effect":"scr_ind1_firework_trail_short"},"note":null},{"row":49,"cells":{"dictionary":"anm_brt","effect":"cs_mud2_mud_splash_body"},"note":null},{"row":50,"cells":{"dictionary":"anm_brt","effect":"cs_mud2_mud_splash_hand"},"note":null},{"row":51,"cells":{"dictionary":"anm_brt","effect":"ent_anim_cheers_splash"},"note":null},{"row":52,"cells":{"dictionary":"anm_brt","effect":"ent_anim_moonshine_splash"},"note":null},{"row":53,"cells":{"dictionary":"anm_brt","effect":"liquid_splash_water"},"note":null},{"row":54,"cells":{"dictionary":"anm_water_panning","effect":"ent_anim_water_panning_drop"},"note":null},{"row":55,"cells":{"dictionary":"anm_water_panning","effect":"ent_anim_water_panning_put_down"},"note":null},{"row":56,"cells":{"dictionary":"anm_water_panning","effect":"ent_anim_water_panning_slam"},"note":null},{"row":57,"cells":{"dictionary":"anm_foodprep","effect":"ent_anim_apple_bite_juice"},"note":null},{"row":58,"cells":{"dictionary":"anm_foodprep","effect":"ent_anim_food_plate"},"note":null},{"row":59,"cells":{"dictionary":"anm_foodprep","effect":"ent_anim_gut_blood_flick"},"note":null},{"row":60,"cells":{"dictionary":"anm_foodprep","effect":"ent_anim_gut_blood_spurt"},"note":null},{"row":61,"cells":{"dictionary":"anm_foodprep","effect":"ent_anim_gut_dried_meat_spurt"},"note":null},{"row":62,"cells":{"dictionary":"anm_foodprep","effect":"ent_anim_ladle_food_splash"},"note":null},{"row":63,"cells":{"dictionary":"anm_foodprep","effect":"sp_blood_drip_splash"},"note":null},{"row":64,"cells":{"dictionary":"des_guama3_cannon_exp","effect":"exp_gua3_cannon_exp"},"note":null},{"row":65,"cells":{"dictionary":"des_guama3_cannon_exp","effect":"exp_smoke_trail"},"note":null},{"row":66,"cells":{"dictionary":"scr_beat_murder_for_hire","effect":"scr_beat_murder_blood"},"note":null},{"row":67,"cells":{"dictionary":"scr_net_beat_wagon_lift","effect":"scr_net_beat_wagon_blood"},"note":null},{"row":68,"cells":{"dictionary":"scr_net_beat_wagon_lift","effect":"scr_net_beat_wagon_dust"},"note":null},{"row":69,"cells":{"dictionary":"scr_dm_ht","effect":"scr_dm_ht_swap_smoke"},"note":null},{"row":70,"cells":{"dictionary":"scr_dm_ht","effect":"scr_mp_item_pickup_smoke"},"note":null},{"row":71,"cells":{"dictionary":"anm_fin","effect":"ent_anim_fin_horse_fall_dust"},"note":null},{"row":72,"cells":{"dictionary":"anm_fin","effect":"ent_anim_fin_roll_dust"},"note":null},{"row":73,"cells":{"dictionary":"scr_braithwaites1","effect":"scr_braithwaites1_des_bottles"},"note":null},{"row":74,"cells":{"dictionary":"scr_braithwaites1","effect":"scr_brt1_bar_mg_glass_smash"},"note":null},{"row":75,"cells":{"dictionary":"scr_braithwaites1","effect":"scr_brt1_bar_mg_liq_splash"},"note":null},{"row":76,"cells":{"dictionary":"scr_braithwaites1","effect":"scr_brt1_bar_mg_liq_up_splash"},"note":null},{"row":77,"cells":{"dictionary":"scr_dm_ftb","effect":"scr_mp_chest_spawn_smoke"},"note":null},{"row":78,"cells":{"dictionary":"anm_human_sick_pee","effect":"ent_anim_cough_spray"},"note":null},{"row":79,"cells":{"dictionary":"anm_human_sick_pee","effect":"ent_anim_shit_decal"},"note":null},{"row":80,"cells":{"dictionary":"anm_human_sick_pee","effect":"ent_anim_shit_rain"},"note":null},{"row":81,"cells":{"dictionary":"anm_human_sick_pee","effect":"ent_anim_snot_blow"},"note":null},{"row":82,"cells":{"dictionary":"anm_human_sick_pee","effect":"liquid_splash_pee"},"note":null},{"row":83,"cells":{"dictionary":"scr_utopia2","effect":"bul_decal_water"},"note":null},{"row":84,"cells":{"dictionary":"scr_utopia2","effect":"scr_utopia2_exp_decal_sp"},"note":null},{"row":85,"cells":{"dictionary":"scr_utopia2","effect":"scr_utopia2_exp_ground"},"note":null},{"row":86,"cells":{"dictionary":"scr_utopia2","effect":"scr_utopia2_exp_post_splash"},"note":null},{"row":87,"cells":{"dictionary":"scr_utopia2","effect":"scr_utopia2_explosion_post"},"note":null},{"row":88,"cells":{"dictionary":"scr_utopia2","effect":"scr_utopia2_uw_silt"},"note":null},{"row":89,"cells":{"dictionary":"des_alchemist","effect":"ent_amb_alchemist_post_fire"},"note":null},{"row":90,"cells":{"dictionary":"des_alchemist","effect":"ent_amb_alchemist_post_fire_plume"},"note":null},{"row":91,"cells":{"dictionary":"des_alchemist","effect":"ent_exp_dis_alchemist"},"note":null},{"row":92,"cells":{"dictionary":"des_alchemist","effect":"exp_smoke_trail"},"note":null},{"row":93,"cells":{"dictionary":"anm_gang2","effect":"ent_anim_gng2_balloon_crash_spl"},"note":null},{"row":94,"cells":{"dictionary":"anm_fire","effect":"ent_anim_exp_grd_lantern"},"note":null},{"row":95,"cells":{"dictionary":"anm_fire","effect":"ent_anim_fire_fuel_burst"},"note":null},{"row":96,"cells":{"dictionary":"anm_fire","effect":"ent_anim_moon1_roof_collapse_embers"},"note":null},{"row":97,"cells":{"dictionary":"anm_fire","effect":"ent_anim_throw_embers"},"note":null},{"row":98,"cells":{"dictionary":"des_mob3","effect":"ent_ray_mob3_crash_exp"},"note":null},{"row":99,"cells":{"dictionary":"des_mob3","effect":"ent_ray_mob3_wagon_exp"},"note":null}],"table":36}