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
1anm_climbingent_anim_climbing_debris
2anm_climbingent_anim_debris_falling
3scr_net_player_signalscr_net_player_signal
4des_alchemistent_amb_alchemist_post_cloud_smk
5anm_craftingent_anim_bottle_pour_medicine
6anm_craftingent_anim_cauldron_drugs
7anm_craftingent_anim_craft_pestle_grind
8anm_odrent_anim_odr_knife_meat
9scr_mob2scr_mob2_fog_cem
10scr_beat_train_tracksscr_beat_train_sparks
11scr_native1scr_native1_campfire_smoke
12scr_campfiresent_amb_campfire_smoke_distance
13scr_campfiresent_amb_campfire_smoke_distance_gang
14cut_rdopncs_rdopn_faucet_pour
15anm_waterent_amb_water_drips_edge
16anm_waterent_anim_bottle_pour_water
17anm_waterent_anim_bottle_pour_whisky
18anm_waterent_anim_bubble_stream
19anm_waterent_anim_bubble_stream_ped
20anm_waterent_anim_mob5_face_drips
21anm_waterent_anim_moonshine_pour_shot
22anm_waterent_anim_ntv3_steam_leak
23anm_waterent_anim_oil_drips
24anm_waterent_anim_ped_finger_drips
25anm_waterent_anim_ped_ind3_water_drips
26anm_waterent_anim_ped_water_drips
27anm_waterent_anim_ped_water_wade_ripples
28anm_waterent_anim_sht_steam
29anm_waterent_anim_sht_steam_thick
30anm_waterent_anim_steam_horseboat_ripple
31anm_waterent_anim_steam_horseboat_splash
32anm_waterent_anim_water_bucket_drips
33anm_waterent_anim_water_bucket_fill
34anm_waterent_anim_water_gold_pan_loop
35anm_waterent_anim_water_kettle_splash_looped
36anm_waterent_anim_water_pan_submerge
37anm_waterent_anim_water_pump_pour
38anm_waterent_anim_water_shakeoff
39anm_waterent_anim_water_torture
40anm_waterent_anim_water_washing
41anm_waterent_anim_whiskey_pour_shot
42scr_poisoned_wellscr_poisoned_well_fog_anim
43anm_finent_anim_fin_dislodged_gravel
44anm_finent_anim_fin_tackle_dust
45anm_finent_anim_fin_tackle_gravel
46anm_finent_anim_train_roll_dust
47scr_mg_bathingscr_mg_bathing_foam_forearm
48scr_mg_bathingscr_mg_bathing_foam_head
49scr_mg_bathingscr_mg_bathing_foam_torso
50scr_mg_bathingscr_mg_bathing_foam_upperarm
51scr_mg_bathingscr_mg_bathing_tub_steam
52scr_winter1scr_winter1_barn_snow
53scr_winter1scr_winter1_cabin_fire
54scr_winter1scr_winter1_cabin_fire_roof
55scr_winter1scr_winter1_cabin_fire_roof_fall
56scr_winter1scr_winter1_cloud_density_anim
57scr_winter1scr_winter1_fog_cover
58scr_guama1scr_guama1_ship_leaking
59scr_net_dustscr_flow_camp_mp
60scr_fme_spawn_effectsscr_animal_poop_flies
61cut_utopia2cs_utopia2_water_drips
62cut_utopia2cs_utopia2_water_splash_loop
63scr_hideout_shadybellescr_hideout_sb_fuse
64anm_dishwashent_anim_dish_wash_arm_wade
65anm_dishwashent_anim_dish_wash_bowl_drips
66anm_dishwashent_anim_dish_wash_plate_drips
67anm_dishwashent_anim_dish_wash_splashes
68anm_dishwashent_anim_dish_wash_spoon_drips
69scr_net_target_racesscr_net_target_fire_ring_mp
70scr_net_pony_expressscr_net_race_smoke
71scr_genericent_amb_insect_fly_swarm
72scr_genericenv_smoke
73scr_genericscr_event_glint
74scr_genericscr_gen_shiny_bling
75scr_marstonent_amb_milk_bubbles
76scr_marstonscr_mg_milking
77scr_net_campeagle_eye_clue_animal_transform
78scr_net_campscr_net_animal_ghost
79scr_net_campscr_net_animal_ghost_boar
80scr_net_campscr_net_animal_ghost_head
81scr_net_campscr_net_animal_ghost_limb
82scr_net_campscr_net_animal_ghost_sma
83scr_net_campscr_net_spirit_animal_fade
84scr_hideout_ironcloudscr_ironcloud_fire_extinguish
85scr_hideout_ironcloudscr_ironcloud_fire_object
86des_moon1ent_anm_generic_fire_field
87des_moon1ent_ray_moon1_roof_fire
88des_mob3ent_ray_mob3_smoke_post
89des_mob3ent_ray_mob3_smoke_trail
90des_mob3ent_ray_mob3_trolley_sparks
91des_mob3scr_mob3_proj_dynamite_trail
92scr_net_moon5scr_net_moon2_still_fire
93scr_net_moon5scr_net_moon5_player_smoke
94scr_discoverablesent_amb_steam_geyser
95scr_discoverablesent_amb_witch_cauldron_bubble
96scr_discoverablesent_amb_witch_cauldron_steam
97scr_discoverablesscr_disc_meteor_shower
98scr_discoverablesscr_disc_whispering_trees
99scr_sadie2scr_sad2_liq_pour
100scr_player_campent_amb_campfire_dynamic