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
801coretrail_splash_flour
802coretrail_splash_grain
803coretrail_splash_gunpowder
804coretrail_splash_oil
805coretrail_splash_petrol
806coretrail_splash_sand
807coretrail_splash_sugar
808coretrail_splash_water
809coreveg_disturb_flower_petals
810coreveg_disturb_flower_pollen
811coreveg_disturb_generic
812coreveh_air_debris
813coreveh_candle_flame
814coreveh_exhaust_boat
815coreveh_exhaust_boat_steam_large
816coreveh_exhaust_boat_steam_med
817coreveh_exhaust_boat_steam_med_turbine
818coreveh_exhaust_boat_steam_sma
819coreveh_exhaust_car
820coreveh_exhaust_car_steam
821coreveh_exhaust_hot_air_balloon
822coreveh_exhaust_misfire
823coreveh_exhaust_start
824coreveh_exhaust_train_smoke
825coreveh_exhaust_train_smoke_high
826coreveh_exhaust_train_smoke_low
827coreveh_exhaust_train_steam
828coreveh_ghost_train_furnace_fire
829coreveh_light_red_trail
830coreveh_trailer_petrol_spray
831coreveh_train_drain_cock_steam
832coreveh_train_furnace_fire
833coreveh_train_grd_disturb_dust_dirt
834coreveh_train_grd_disturb_dust_leaves
835coreveh_train_grd_disturb_dust_snow
836coreveh_train_piston_gland_steam
837coreveh_train_refrigerator_cold_air
838coreveh_train_room_cold_air
839coreveh_train_sparks
840coreveh_train_sparks_tender
841coreveh_train_whistle
842coreveh_vent_boat
843corewater_boat_bow
844corewater_boat_leak
845corewater_boat_lod
846corewater_boat_lod_bow
847corewater_boat_lod_side
848corewater_boat_oar_wade
849corewater_boat_prop
850corewater_boat_rev
851corewater_boat_steam_horseboat_bow
852corewater_boat_steam_horseboat_rev
853corewater_boat_steam_horseboat_wash
854corewater_boat_steam_keelboat_bow
855corewater_boat_steam_med_bow
856corewater_boat_steam_med_prop
857corewater_boat_steam_med_rev
858corewater_boat_steam_med_wash
859corewater_boat_steam_nbdguama_wash
860corewater_boat_steam_sma_bow
861corewater_boat_steam_sma_prop
862corewater_boat_steam_sma_rev
863corewater_boat_steam_sma_wash
864corewater_boat_steam_tugboat_bow
865corewater_boat_steam_tugboat_rev
866corewater_boat_steam_tugboat_wash
867corewater_boat_steam_turbine_bow
868corewater_boat_steam_turbine_rev
869corewater_boat_steam_turbine_wash
870corewater_boat_wash
871corewater_canoe_bow
872corewater_canoe_oar_wade
873corewater_canoe_rev
874corewater_canoe_wash
875corewater_pirogue_bow
876corewater_pirogue_rev
877corewater_pirogue_wash
878corewater_rowboat_bow
879corewater_rowboat_rev
880corewater_rowboat_swamp_bow
881corewater_rowboat_swamp_wash
882corewater_rowboat_wash
883corewater_splash_gator_wade
884corewater_splash_obj_trail
885corewater_splash_obj_wade
886corewater_splash_ped_duck_wade
887corewater_splash_ped_wade
888corewater_splash_ped_wade_human
889corewater_splash_ped_wade_lod
890corewater_splash_ped_wade_lower
891corewater_splash_ped_wade_lower_bear
892corewater_splash_ped_wade_lower_deer
893corewater_splash_ped_wade_lower_horse
894corewater_splash_rope_wade
895corewater_splash_veh_trail
896corewater_splash_veh_wade
897corewater_splash_wheel_cart
898coreweap_torch_fire_trail
899corewheel_disp_blood
900corewheel_disp_dirt_dry