RedM Natives

Particle FX (non-looped)

Notes from the author
		EXAMPLE. MAKE FIREWORK BURST FROM YOUR PED:
------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------
		local new_ptfx_dictionary = "scr_lom_train"
		local new_ptfx_name = "scr_ind1_firework_burst"

		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 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(0xE6CFE43937061143,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)    -- StartNetworkedParticleFxNonLoopedOnEntity
		    				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_non_looped = {
 	[ptfx_dictionary] = {ptfx_name},
 }
1,141 rows
#dictionaryeffectNote
501coreent_dst_jug
502coreent_dst_jug_liquid
503coreent_dst_lantern
504coreent_dst_lantern_blast
505coreent_dst_lantern_glass
506coreent_dst_leather
507coreent_dst_litter
508coreent_dst_mail
509coreent_dst_metal_can
510coreent_dst_metal_frag
511coreent_dst_metal_spark
512coreent_dst_moonshine_jug
513coreent_dst_newspaper
514coreent_dst_office_paper
515coreent_dst_peanuts
516coreent_dst_pelt_fur
517coreent_dst_plant_leaves
518coreent_dst_poker_card
519coreent_dst_poker_chip
520coreent_dst_poop
521coreent_dst_poop_splash
522coreent_dst_pot
523coreent_dst_pot_leaves
524coreent_dst_rock
525coreent_dst_rotten_fish
526coreent_dst_rubbish
527coreent_dst_rubble
528coreent_dst_sand
529coreent_dst_seat_pad
530coreent_dst_snow
531coreent_dst_snow_lrg
532coreent_dst_snow_rails
533coreent_dst_snow_tombs
534coreent_dst_sparking_wires
535coreent_dst_steam_pipe
536coreent_dst_tobacco
537coreent_dst_tobacco_dried
538coreent_dst_tobacco_leaf
539coreent_dst_tower_debris
540coreent_dst_upholstery
541coreent_dst_wet_sand
542coreent_dst_wood_barrel
543coreent_dst_wood_chunky
544coreent_dst_wood_planks
545coreent_dst_wood_splinter
546coreent_dst_wood_spoke
547coreent_dst_wood_structure
548coreent_dst_yarrow
549coreent_dst_yarrow_slw
550coreent_exp_bone
551coreent_exp_concrete
552coreent_exp_cotton_bale
553coreent_exp_cotton_bale_sm
554coreent_exp_wood
555coreent_exp_wood_barrel
556coreent_exp_wood_barrel_liquid
557coreent_exp_wood_crate
558coreent_exp_wood_fence
559coreent_exp_wood_fence_med
560coreent_exp_wood_post
561coreent_ray_mud2_window_smash
562coreent_sht_bear_trap
563coreent_sht_beer_barrel
564coreent_sht_beer_barrel_splash
565coreent_sht_blood
566coreent_sht_blood_splash
567coreent_sht_bone
568coreent_sht_bush_foliage
569coreent_sht_cactus
570coreent_sht_cardboard
571coreent_sht_cotton_bale
572coreent_sht_electrical_box
573coreent_sht_fabric
574coreent_sht_feathers
575coreent_sht_flame
576coreent_sht_flour_sack
577coreent_sht_flower_petals
578coreent_sht_gloopy_liquid
579coreent_sht_grain_sack
580coreent_sht_hay
581coreent_sht_kerosene
582coreent_sht_milk
583coreent_sht_moonshine
584coreent_sht_moonshine_moving
585coreent_sht_oil
586coreent_sht_paper_bails
587coreent_sht_pillow
588coreent_sht_rock
589coreent_sht_rubbish
590coreent_sht_sandbag
591coreent_sht_snow_covered_bark
592coreent_sht_snow_covered_tree
593coreent_sht_sparking_wires
594coreent_sht_steam
595coreent_sht_steam_still
596coreent_sht_sugar_sack
597coreent_sht_telegraph_pole
598coreent_sht_water
599coreent_sht_water_tower
600coreent_sht_window_glass