RedM Natives

Particle FX (looped)

Notes from the author
		EXAMPLE. MAKE FIRE BREATH FROM PED HEAD:
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
		local new_ptfx_dictionary = "anm_fire_dancers"
		local new_ptfx_name = "ent_anim_fire_breathe_loop"

		local is_particle_effect_active = false
		local current_ptfx_dictionary = new_ptfx_dictionary
		local current_ptfx_name = new_ptfx_name

		local current_ptfx_handle_id = false

		local bone_index = 247   -- ["PH_Head"]  = {bone_index = 247, bone_id = 57278},

		local ptfx_offcet_x = 0.0
		local ptfx_offcet_y = 0.0
		local ptfx_offcet_z = 0.0
		local ptfx_rot_x = -90.0
		local ptfx_rot_y = 0.0
		local ptfx_rot_z = 0.0
		local ptfx_scale = 1.0
		local ptfx_axis_x = 0
		local ptfx_axis_y = 0
		local ptfx_axis_z = 0


		Citizen.CreateThread(function()
		   	while true do
		        Citizen.Wait(0)
		        if Citizen.InvokeNative(0x91AEF906BCA88877,0, 0x17BEC168) then   -- just pressed E
		        	if not is_particle_effect_active then
		        		current_ptfx_dictionary = new_ptfx_dictionary
						current_ptfx_name = new_ptfx_name
		        		if not Citizen.InvokeNative(0x65BB72F29138F5D6, GetHashKey(current_ptfx_dictionary)) then -- HasNamedPtfxAssetLoaded
		        			Citizen.InvokeNative(0xF2B2353BBC0D4E8F, GetHashKey(current_ptfx_dictionary))  -- RequestNamedPtfxAsset
		        			local counter = 0
		        			while not Citizen.InvokeNative(0x65BB72F29138F5D6, GetHashKey(current_ptfx_dictionary)) and counter <= 300 do  -- while not HasNamedPtfxAssetLoaded
		        				Citizen.Wait(0)
		        			end
		        		end
		    			if Citizen.InvokeNative(0x65BB72F29138F5D6, GetHashKey(current_ptfx_dictionary)) then  -- HasNamedPtfxAssetLoaded
		    				Citizen.InvokeNative(0xA10DB07FC234DD12, current_ptfx_dictionary) -- UseParticleFxAsset

		    				current_ptfx_handle_id = Citizen.InvokeNative(0x9C56621462FFE7A6,current_ptfx_name,PlayerPedId(),ptfx_offcet_x,ptfx_offcet_y,ptfx_offcet_z,ptfx_rot_x,ptfx_rot_y,ptfx_rot_z,bone_index,ptfx_scale,ptfx_axis_x,ptfx_axis_y,ptfx_axis_z) -- StartNetworkedParticleFxLoopedOnEntityBone
		    				--current_ptfx_handle_id =  Citizen.InvokeNative(0x8F90AB32E1944BDE,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)    -- StartNetworkedParticleFxLoopedOnEntity
		    				is_particle_effect_active = true
						else
							print("cant load ptfx dictionary!")
		    			end
		        	else
		        		if current_ptfx_handle_id then
							if Citizen.InvokeNative(0x9DD5AFF561E88F2A, current_ptfx_handle_id) then   -- DoesParticleFxLoopedExist
								Citizen.InvokeNative(0x459598F579C98929, current_ptfx_handle_id, false)   -- RemoveParticleFx
							end
						end
						current_ptfx_handle_id = false
						is_particle_effect_active = false
		        	end
		        end
		    end
		end)

----------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------------------------
 ptfx_assets_looped = {
 	[ptfx_dictionary] = {ptfx_name},
 }
1,176 rows
#dictionaryeffectNote
501coreent_amb_steam_donkey_vent
502coreent_amb_steam_geyser
503coreent_amb_steam_pipe_hvy
504coreent_amb_steam_pipe_lgt
505coreent_amb_steam_piston
506coreent_amb_steam_pot
507coreent_amb_steam_vent_open_hvy
508coreent_amb_steam_vent_open_lgt
509coreent_amb_steam_vent_rnd_hvy
510coreent_amb_steam_vent_round
511coreent_amb_stove_fire_sml
512coreent_amb_stove_pipe_smoke
513coreent_amb_stove_pipe_smoke_darker
514coreent_amb_swing_trap_dust
515coreent_amb_tadpole_swarm
516coreent_amb_tar_bubbles
517coreent_amb_torch_fire
518coreent_amb_toy_boat_idle_smoke
519coreent_amb_trn4_train_smoke
520coreent_amb_trolley_hook_sparks
521coreent_amb_trop_fish_swarm_angel
522coreent_amb_trop_fish_swarm_col
523coreent_amb_trop_fish_swarm_lil
524coreent_amb_washtub_lather
525coreent_amb_water_cave_drips_mesh
526coreent_amb_water_drips_cave_col
527coreent_amb_water_drips_cave_lg
528coreent_amb_water_drips_cave_med
529coreent_amb_water_drips_cave_sm
530coreent_amb_water_drips_hydro
531coreent_amb_water_drips_lg
532coreent_amb_water_drips_med
533coreent_amb_water_drips_sm
534coreent_amb_water_drips_sm_sound
535coreent_amb_water_drips_trees
536coreent_amb_water_icicle_drips_sm
537coreent_amb_water_roof_drips_lg
538coreent_amb_water_roof_drips_med
539coreent_amb_water_roof_drips_sm
540coreent_amb_water_roof_pour
541coreent_amb_water_roof_pour_long
542coreent_amb_water_roof_rain_mesh
543coreent_amb_wf_bw
544coreent_amb_wf_close_spray
545coreent_amb_wf_cum_01
546coreent_amb_wf_dak_bb_01
547coreent_amb_wf_dak_bb_02
548coreent_amb_wf_dak_gp_03
549coreent_amb_wf_dak_gp_04
550coreent_amb_wf_dak_gp_05
551coreent_amb_wf_dak_gp_06
552coreent_amb_wf_dak_gp_v2_01
553coreent_amb_wf_dak_gp_v2_02
554coreent_amb_wf_dak_gp_v2_03
555coreent_amb_wf_dak_up_01
556coreent_amb_wf_dak_up_02
557coreent_amb_wf_dak_up_03
558coreent_amb_wf_decal
559coreent_amb_wf_ely_01
560coreent_amb_wf_ely_splash
561coreent_amb_wf_lens
562coreent_amb_wf_lmr_mist
563coreent_amb_wf_man
564coreent_amb_wf_man_narrow
565coreent_amb_wf_mist_lg
566coreent_amb_wf_mist_md
567coreent_amb_wf_proto_01
568coreent_amb_wf_proto_01_larger
569coreent_amb_wf_proto_02_cloud
570coreent_amb_wf_proto_02_cloud_va_wide
571coreent_amb_wf_proto_02_cloud_var
572coreent_amb_wf_proto_02_spray
573coreent_amb_wf_proto_fog
574coreent_amb_wf_soak
575coreent_amb_wf_splash_base
576coreent_amb_wf_splash_base_med
577coreent_amb_wf_splash_base_sm
578coreent_amb_wf_splash_cloud
579coreent_amb_wf_splash_lg
580coreent_amb_wf_splash_md
581coreent_amb_wf_splash_sm
582coreent_amb_wf_top_bits
583coreent_amb_wf_whitewater
584coreent_amb_wfall_strwb_base
585coreent_amb_wfall_strwb_top
586coreent_amb_wind_grass
587coreent_amb_wind_grass_dir
588coreent_amb_wind_hay
589coreent_amb_wind_hay_dir
590coreent_amb_wind_leaves
591coreent_amb_wind_leaves_dir
592coreent_amb_wind_leaves_swirl
593coreent_amb_wind_litter
594coreent_amb_wind_litter_dir
595coreent_amb_wind_litter_dust
596coreent_amb_wind_litter_dust_dir
597coreent_amb_wind_litter_dust_swirl
598coreent_amb_wind_litter_swirl
599coreent_amb_wind_petal_tint_dir
600coreent_amb_wind_rand_litter