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
201anm_animalsent_anim_fish_flee_bubbles
202anm_animalsent_anim_hen_flee
203anm_animalsent_anim_horse_dust_spread
204anm_animalsent_anim_horse_dust_spread_preload
205anm_animalsent_anim_horse_graze_chew
206anm_animalsent_anim_horse_peeing
207anm_animalsent_anim_horse_water_drink
208anm_animalsent_anim_ped_beaver_ripple
209anm_animalsent_anim_slide_dust
210anm_animalsent_anim_sparrow_bath_splash
211anm_animalsent_anim_squirrel_pounce_dust
212anm_oddfent_anim_firework_fuse
213anm_oddfent_anim_oddf_campfire
214anm_oddfent_anim_oddf_firework_trail
215des_guama3_tower_expent_ray_guama3_tower_trail
216anm_peepingtoment_anim_opium_pipe_exhale
217anm_peepingtoment_anim_opium_pipe_smoke
218scr_mg_cleaning_stallsscr_mg_stalls_manure_flies
219cut_wintercs_cig_smoke
220cut_wintercs_ped_wade_snow
221scr_cornwall1scr_crn1_lantern_fire
222anm_rallyent_anim_rally_cross_fire_loop
223scr_dusters1scr_dusters1_camp_smoke
224scr_dzoavitsclaimscr_dzoav_coal_dump
225scr_dzoavitsclaimscr_dzoav_coal_dump_col
226scr_dzoavitsclaimscr_dzoav_fire_roof
227scr_dzoavitsclaimscr_dzoav_fire_window
228scr_dzoavitsclaimscr_dzoav_mine_haze
229scr_dzoavitsclaimscr_dzoav_waste_dump
230scr_dzoavitsclaimscr_dzoav_waste_dump_col
231scr_net_adversary_team_borderscr_net_team_border
232anm_salent_anim_sal1_drown_splash_loop
233scr_distance_smokescr_campfire_distance_light
234scr_distance_smokescr_campfire_distance_smoke_lod
235scr_distance_smokescr_campfire_distance_smoke_script
236scr_distance_smokescr_campfire_distance_smoke_sma
237scr_craftingscr_crafting_animal_potions
238des_tree_fallent_ray_tree_fall_leaves
239anm_homerobberyent_anim_aberdeen_bottle_pour
240anm_homerobberyent_anim_chimney_disturb_soot
241anm_homerobberyent_anim_grain_sift
242anm_loment_anim_lom_cig_smoke_cigar
243anm_loment_anim_lom_pipe_smoke
244anm_loment_anim_lom_throat_slit
245anm_loment_anim_lom_train_pipe_smoke
246anm_loment_anim_lom_train_piston_gland_steam
247anm_loment_anim_lom_train_steam_ambient
248scr_happyfamscr_happyfam_door_smk
249scr_happyfamscr_happyfam_pipe_smk
250scr_happyfamscr_happyfam_room_smk
251scr_loanshark_hunter2scr_loanshark_hunter2_smoke
252scr_beat_rallyscr_beat_rally_cross_fire_loop
253scr_beat_voodoo_ritualscr_beat_voodoo_blood_drips
254scr_arch_jameson2fire_gunpowder_half
255scr_arch_jameson2fire_gunpowder_one
256scr_arch_jameson2fire_gunpowder_pool
257scr_arch_jameson2fire_gunpowder_two
258des_utopia2ent_ray_utopia2_rock_dirt
259des_utopia2ent_ray_utopia2_tree_fall_needles
260des_utopia2ent_ray_utopia2_uw_silt
261anm_script_reent_anim_moths_swarm_night
262anm_script_reent_anim_snow_drifts
263scr_reverend1scr_rev_puke
264anm_collisionent_anim_roll_dust
265anm_collisionent_anim_roll_gravel
266anm_collisionent_anim_scrape_dust_joint
267anm_collisionent_anim_scrape_dust_limb
268anm_collisionent_anim_scrape_mud_joint
269anm_collisionent_anim_scrape_mud_limb
270anm_collisionent_anim_scrape_mud_soft_limb
271coreblood_cd_blood_trail
272coreblood_cd_blood_trail_gore
273corebullet_laser_sight
274corebullet_shotgun_tracer
275corebullet_tracer
276corebullet_tracer_incendiary
277coredecal_water_blood
278coreent_amb_ann_coal
279coreent_amb_ann_coal_bits
280coreent_amb_ann_coal_chute
281coreent_amb_ann_coal_chute_dive
282coreent_amb_ann_coal_mesh
283coreent_amb_ann_falling_dust
284coreent_amb_ann_smoke_street
285coreent_amb_ann_smokegroup_01
286coreent_amb_ann_smokegroup_02
287coreent_amb_ann_smokegroup_03
288coreent_amb_ann_sprinkler
289coreent_amb_ann_vapor
290coreent_amb_bathtub_lather
291coreent_amb_blacksmith_fire
292coreent_amb_boat_idle_smoke
293coreent_amb_bonfire
294coreent_amb_bonfire_mp
295coreent_amb_bonfire_nosmoke
296coreent_amb_bubble_stream
297coreent_amb_campfire_lrg
298coreent_amb_campfire_lrg_base
299coreent_amb_campfire_lrg_int
300coreent_amb_campfire_lrg_mp