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
101scr_agnesdowd_ghostscr_ped_ghost_haze_stage1
102scr_proc_homerobberiesscr_homerob_chez_barn_fire
103anm_wntent_anim_door_snow_drifts
104anm_wntent_anim_lantern_fire_win1
105anm_wntent_anim_train_sparks
106anm_wntent_anim_winter1_fireplace_start
107anm_workent_anim_bale_debris_trail
108anm_workent_anim_brush_drip_trail
109anm_workent_anim_brush_dust
110anm_workent_anim_bucket_fill_splash
111anm_workent_anim_constant_sparks
112anm_workent_anim_cotton_dump_loop
113anm_workent_anim_cottonbale_leak
114anm_workent_anim_feed_looping
115anm_workent_anim_hay_pitchfork_lift
116anm_workent_anim_hay_pitchfork_lift_fork_hay
117anm_workent_anim_saw_wood
118anm_workent_anim_scrape_ground_debris
119anm_workent_anim_steam_horsegelding
120anm_workent_anim_table_wipe
121anm_workent_anim_water_cloth_squeeze
122anm_workent_anim_work_rake
123scr_beat_burning_bodiesscr_beat_burning_body_fire
124scr_beat_burning_bodiesscr_beat_burning_body_smk
125scr_beat_burning_bodiesscr_beat_burning_body_smk_start
126scr_mudtown5proj_dynamite_trail
127scr_native3scr_natv3_fire_oil_field
128scr_native3scr_natv3_fire_oil_plume
129scr_native3scr_natv3_generic_fire
130scr_mob3scr_mob3_proj_dynamite_trail
131scr_crackpotscr_crackpot_rc_sparks
132scr_crackpotscr_crackpot_sink_bubbles
133scr_crackpotscr_crackpot_tesla_coil
134scr_crackpotscr_crackpot_torpedo_spray
135anm_foodprepent_anim_bbq
136anm_foodprepent_anim_fly_swarm
137anm_foodprepent_anim_food_seasoning_shake
138anm_foodprepent_anim_food_seasoning_shake_into_hand
139anm_foodprepent_anim_food_seasoning_sprinkle
140anm_foodprepent_anim_foodprep_bits
141anm_foodprepent_anim_gut_blood_drain
142anm_foodprepent_anim_gut_blood_saw
143anm_foodprepent_anim_gut_dried_meat_saw
144anm_foodprepent_anim_ladle_drip_trail
145anm_foodprepent_anim_ladle_drips
146anm_foodprepent_anim_ladle_food_pour
147anm_foodprepent_anim_ladle_steam
148anm_foodprepent_anim_ladle_steam_int
149anm_foodprepent_anim_milk_pour
150anm_foodprepent_anim_pan_steam
151anm_foodprepent_anim_plate_steam
152scr_std1scr_nbd1_bankwall_fire_linger
153scr_std1scr_nbd1_bankwall_smolder
154scr_std1scr_nbd1_exp_bankwall_fall_dust
155scr_std1scr_nbd1_exp_bankwall_linger
156scr_std1scr_nbd1_smoke_01
157scr_std1scr_nbd1_smoke_02
158scr_std1scr_nbd1_smoke_chimney
159scr_std1scr_nbd1_smoke_chimney_rect
160scr_std1scr_nbd1_smoke_chimney_split
161scr_std1scr_nbd1_smoke_pipe_main
162scr_std1scr_nbd1_smoke_pipe_sub
163des_utopia1ent_ray_utopia1_debtrail
164anm_coffeeent_anim_coffee_drips
165anm_coffeeent_anim_coffee_steam
166anm_coffeeent_anim_coffee_steam_cold
167anm_coffeeent_anim_liquid_drips
168scr_beat_gator_huntersscr_beat_gator_blood_water
169scr_beat_gator_huntersscr_beat_gator_splash
170scr_gang2scr_gang2_air_balloon_smoke
171cut_rrtlcs_rrtl_electric_arcs
172cut_rrtlcs_rrtl_lightning
173cut_rrtlcs_rrtl_smoulder_smoke
174scr_metal_detectorscr_mp_metal_detector_sparks
175scr_net_gangbountyscr_net_gangbounty_smoke
176scr_bou1scr_bou1_climb_dust_loop
177scr_bou1scr_bou1_ped_water_splash
178scr_smuggler1scr_smug_fog
179anm_rmllrent_amb_insect_fly_swarm
180anm_rmllrent_anim_dusty_interior
181scr_beat_bloated_corpsescr_beat_corpse_water_bubble
182scr_winter2scr_blood_drips
183scr_winter2scr_winter2_smoke
184scr_beat_campfire_ambushscr_campfire_ambush_fire_extinguish
185anm_animalsent_anim_animal_foot_dust
186anm_animalsent_anim_animal_water_drink
187anm_animalsent_anim_animal_water_drink_drips
188anm_animalsent_anim_bear_dig_dirt_looped
189anm_animalsent_anim_beaver_eat_tree_splinters
190anm_animalsent_anim_bird_water_drink
191anm_animalsent_anim_bird_water_drink_drips
192anm_animalsent_anim_boar_spray
193anm_animalsent_anim_buffalo_fight_dust
194anm_animalsent_anim_buffalo_roll_dust
195anm_animalsent_anim_dog_peeing
196anm_animalsent_anim_dog_poo
197anm_animalsent_anim_dog_roll_dust
198anm_animalsent_anim_dog_water_drink
199anm_animalsent_anim_drink_drip_trail
200anm_animalsent_anim_fish_breath_bubbles