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
401coreent_amb_insect_firefly_swarm
402coreent_amb_insect_fly_swarm
403coreent_amb_insect_fly_swarm_horse
404coreent_amb_insect_fly_swarm_outhouse
405coreent_amb_insect_fly_swarm_shit
406coreent_amb_insect_fly_swarm_shit_tracking
407coreent_amb_insect_grasshopper
408coreent_amb_insect_maggots
409coreent_amb_insect_moths_night
410coreent_amb_insect_moths_night_window
411coreent_amb_insect_moths_swarm
412coreent_amb_insect_moths_swarm_lrg
413coreent_amb_insect_nat_swarm
414coreent_amb_insect_plane
415coreent_amb_insect_swamp_flies
416coreent_amb_insect_swarm
417coreent_amb_insect_water_bugs
418coreent_amb_int_fireplace
419coreent_amb_int_fireplace_win1
420coreent_amb_int_smoke_lingering
421coreent_amb_interior_show_fire
422coreent_amb_light_message_fog
423coreent_amb_maggots_bodyPartHead02
424coreent_amb_maggots_boneSkeleton02x
425coreent_amb_maggots_carcassCow01
426coreent_amb_maggots_carcassHorse01x
427coreent_amb_maggots_deadPokerPlayer01x
428coreent_amb_maggots_s_abe_corpse01
429coreent_amb_match_flame
430coreent_amb_mountain_cloud_01
431coreent_amb_mountain_cloud_02
432coreent_amb_oil_drips_med
433coreent_amb_ped_fish_ripples
434coreent_amb_pollen
435coreent_amb_rapid_area_spray
436coreent_amb_rapid_area_spray_hvy
437coreent_amb_rapid_dir_splash
438coreent_amb_rapid_dir_splash_light
439coreent_amb_rapid_dir_splash_long
440coreent_amb_rapid_dir_splash_short
441coreent_amb_rapid_dir_splash_wide
442coreent_amb_rapid_dir_spray
443coreent_amb_rapid_rock_drips
444coreent_amb_river_mist_gen
445coreent_amb_river_rock_splash
446coreent_amb_river_splash_gen
447coreent_amb_robot_bulb
448coreent_amb_robot_smoke
449coreent_amb_robot_sparks
450coreent_amb_rolling_boulder_dust
451coreent_amb_room_haze
452coreent_amb_sde_smokegroup_1
453coreent_amb_sde_smokegroup_2
454coreent_amb_sde_smokegroup_3
455coreent_amb_sde_smokegroup_4
456coreent_amb_sewer_drips_lg
457coreent_amb_sewer_drips_med
458coreent_amb_sewer_drips_sm
459coreent_amb_shit_drip
460coreent_amb_slaughter_sewer_discharge
461coreent_amb_smoke_cabin
462coreent_amb_smoke_cabin_distance
463coreent_amb_smoke_chimney
464coreent_amb_smoke_chimney_long
465coreent_amb_smoke_chimney_var_01
466coreent_amb_smoke_chimney_win1
467coreent_amb_smoke_factory
468coreent_amb_smoke_factory_exhaust
469coreent_amb_smoke_factory_exhaust_sma
470coreent_amb_smoke_factory_feed
471coreent_amb_smoke_factory_interior
472coreent_amb_smoke_factory_sma
473coreent_amb_smoke_mine
474coreent_amb_smoke_moon_still
475coreent_amb_smoke_pipe_s
476coreent_amb_smoke_pipe_spread
477coreent_amb_smoke_pipe_spread_var_01
478coreent_amb_smoke_smolder
479coreent_amb_smoke_stack_l_connector
480coreent_amb_smoke_stack_l_mainstream
481coreent_amb_smoke_stack_m_connector
482coreent_amb_smoke_stack_m_mainstream
483coreent_amb_smoke_stack_m_wind
484coreent_amb_smoke_stack_s_scatter
485coreent_amb_smoke_teepee_high
486coreent_amb_smoke_teepee_low
487coreent_amb_snow_drop
488coreent_amb_snow_falling_dust_debris
489coreent_amb_snow_mist_base
490coreent_amb_snow_mist_upper
491coreent_amb_snow_mountain_drifts
492coreent_amb_snow_mountain_drifts_close
493coreent_amb_snow_mountain_drifts_swirl
494coreent_amb_snow_roof_drifts
495coreent_amb_spring_bubbles
496coreent_amb_stage_light_smoke
497coreent_amb_steam_boat_engine
498coreent_amb_steam_compost_piles
499coreent_amb_steam_donkey_main
500coreent_amb_steam_donkey_pipes