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
901corewheel_disp_dirt_wet
902corewheel_disp_flour
903corewheel_disp_generic_underwater
904corewheel_disp_generic_wet
905corewheel_disp_grass
906corewheel_disp_grass_wet
907corewheel_disp_gravel
908corewheel_disp_gravel_wet
909corewheel_disp_ice
910corewheel_disp_leaves
911corewheel_disp_leaves_wet
912corewheel_disp_lod_dust_light
913corewheel_disp_lod_dust_medium
914corewheel_disp_lod_dust_sand_medium
915corewheel_disp_mud_liquid
916corewheel_disp_mud_soft
917corewheel_disp_oil
918corewheel_disp_petrol
919corewheel_disp_sand
920corewheel_disp_slush
921corewheel_disp_snow
922corewheel_disp_tar
923corewheel_disp_water
924corewheel_disp_water_puddle
925corewheel_fric_concrete
926corewheel_fric_dirt_dry
927corewheel_fric_dirt_wet
928corewheel_fric_flour
929corewheel_fric_generic_underwater
930corewheel_fric_generic_wet
931corewheel_fric_grass_dry
932corewheel_fric_gravel_dry
933corewheel_fric_gravel_wet
934corewheel_fric_ice
935corewheel_fric_leaves_dry
936corewheel_fric_mud_liquid
937corewheel_fric_mud_soft
938corewheel_fric_sand_dry
939corewheel_fric_snow
940corewheel_fric_tar
941corewheel_spray_mud_liquid
942corewheel_spray_mud_soft
943corewheel_spray_snow
944corewheel_spray_water
945corewpn_scope_glint
946scr_shows_fire_dancerscr_fire_dancer_disturb
947scr_fire_managerent_amb_campfire_dynamic
948scr_fire_managerent_amb_insect_water_flies
949scr_fire_managerent_anim_fire_tend_embers
950anm_bloodent_anim_blood_drips
951anm_bloodent_anim_blood_spurt
952anm_bloodent_anim_blood_spurt_cougar
953anm_bloodent_anim_mouth_blood
954anm_bloodent_anim_stab_blood_drips
955anm_bloodent_anim_throat_blood_deer
956anm_bloodent_anim_throat_slit_bear
957anm_bloodent_anim_wolf_blood_drip
958scr_train_robbery4scr_trainrob4_train_carriage_fire
959scr_train_robbery4scr_trn4_ground_plume
960scr_train_robbery4scr_trn4_train_const_smoke
961scr_train_robbery4scr_trn4_train_slide
962scr_train_robbery4scr_trn4_train_smoke_loop
963anm_coreent_anim_boat_smoke
964anm_coreent_anim_campfire_stomp
965anm_coreent_anim_muz_smoking_barrel
966anm_coreent_anim_ped_wade_snow
967anm_coreent_anim_train_exhaust_smoke
968anm_coreent_anim_vial_revive
969scr_net_moon_bartendingscr_net_moonshine_pour_bar
970scr_net_kothscr_net_koth_smoke_factory
971anm_weaponsent_anim_dynamite_fuse
972anm_weaponsent_anim_gun_linger
973anm_weaponsent_anim_molotov_flame
974anm_weaponsent_anim_muz_gatling
975anm_weaponsent_anim_muz_gatling_close
976anm_weaponsent_anim_proj_key_trail
977scr_adv_sokscr_adv_sok_torch
978scr_adv_sokscr_adv_sok_torch_horseback
979scr_adv_sokscr_adv_sok_torchsmoke
980scr_annesburgblood_stone_crusher_stream
981scr_trelawny2scr_trl2_train_steam
982scr_mg_fishingscr_mg_fishing_drips
983anm_brtent_anim_moonshine_pour
984cut_fud1CS_Fud1_Boat_scrape_sand_wet
985scr_arch_jameson3blood_stone_crusher_stream
986amb_lightsamb_arc_lamp_emit
987amb_lightsamb_bulb_g_01
988amb_lightsamb_bulb_g_01_frosted
989amb_lightsamb_bulb_g_01_frosted_skin
990amb_lightsamb_bulb_g_01_lantern
991amb_lightsamb_bulb_g_01_sign
992amb_lightsamb_bulb_g_01_sign_frosted
993amb_lightsamb_bulb_g_01_skin
994amb_lightsamb_bulb_g_01_xmas_sign
995amb_lightsamb_bulb_g_01_xmas_sign_frosted
996amb_lightsamb_candle_flame_emit
997amb_lightsamb_gas_flame_emit
998amb_lightsamb_gas_flame_emit_narrow
999amb_lightsamb_lantern_flame_emit
1000amb_lightsamb_miner_hat_flame_emit