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
701coreped_dog_mouth_froth
702coreped_foot_ash_horse_scuff
703coreped_foot_ash_muddy_horse_scuff
704coreped_foot_dirt_dry_horse_scuff
705coreped_foot_dirt_muddy_horse_scuff
706coreped_foot_dust_horse_scuff
707coreped_foot_dust_scuff
708coreped_foot_gravel_dirt_horse_scuff
709coreped_foot_gravel_grass_horse_scuff
710coreped_foot_gravel_horse_scuff
711coreped_foot_gravel_muddy_horse_scuff
712coreped_foot_gravel_scuff
713coreped_foot_hay_scuff
714coreped_foot_leaves_ficus_horse_scuff
715coreped_foot_leaves_horse_scuff
716coreped_foot_leaves_maple_horse_scuff
717coreped_foot_leaves_oak_horse_scuff
718coreped_foot_leaves_wet_ficus_horse_scuff
719coreped_foot_leaves_wet_horse_scuff
720coreped_foot_leaves_wet_maple_horse_scuff
721coreped_foot_leaves_wet_oak_horse_scuff
722coreped_foot_mud_soft_horse_scuff
723coreped_foot_powder_horse_scuff
724coreped_foot_sand_wet_horse_scuff
725coreped_foot_snow_horse_scuff
726coreped_foot_twigs_horse_scuff
727coreped_foot_twigs_wet_horse_scuff
728coreped_foot_water_horse_scuff
729coreped_grd_disturb_dust
730coreped_grd_disturb_dust_ash_horse_light
731coreped_grd_disturb_dust_dirt_horse_heavy
732coreped_grd_disturb_dust_dirt_horse_light
733coreped_grd_disturb_dust_dirt_horse_medium
734coreped_grd_disturb_dust_heavy
735coreped_grd_disturb_mud_underwater
736coreped_grd_disturb_snow
737coreped_grd_disturb_snow_horse
738coreped_grd_disturb_snow_loose
739coreped_grd_disturb_snow_loose_horse
740coreped_hatbrim_drip
741coreped_horse_flaming_hoof
742coreped_horse_mouth_froth
743coreped_underwater_disturb_dirt
744coreped_underwater_disturb_sand
745coreped_underwater_trails
746coreped_underwater_trails_horse
747coreped_wade_mud
748coreped_wade_mud_watery
749coreped_wade_snow
750coreped_wade_snow_horse
751coreped_wade_snow_horse_mp
752coreped_wade_snow_mp
753coreped_wade_tar
754coreped_wash_blood
755coreped_wash_mud
756coreped_water_drips
757coreped_water_drips_horse
758coreped_waterfall_collision
759coreproj_arrow_fire
760coreproj_arrow_fire_trail
761coreproj_arrow_trail
762coreproj_arrow_trail_custom
763coreproj_cannon_trail
764coreproj_disturb_dust
765coreproj_dynamite_fuse
766coreproj_dynamite_trail
767coreproj_molotov_flame
768coreproj_molotov_trail
769corescr_winter1_barn_door_snow
770corescrape_ash
771corescrape_blood
772corescrape_clay
773corescrape_concrete
774corescrape_dirt_dry
775corescrape_dust
776corescrape_glass
777corescrape_gravel
778corescrape_ice
779corescrape_manure
780corescrape_metal
781corescrape_moss
782corescrape_mud
783corescrape_mud_soft
784corescrape_mud_underwater
785corescrape_ped_foot_mud_soft
786corescrape_ped_grass
787corescrape_ped_leaves
788corescrape_ped_leaves_ficus
789corescrape_ped_leaves_maple
790corescrape_ped_leaves_oak
791corescrape_ped_limb_mud_soft
792corescrape_ped_snow
793corescrape_ped_torso_mud_soft
794corescrape_sand
795corescrape_sand_wet
796corescrape_slush
797corescrape_snow
798corescrape_twigs
799corescrape_wood
800coretrail_splash_blood