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
101des_mob3ent_ray_mob3_wood_planks
102des_mob3ent_ray_mob3_wood_splinters
103des_mob3exp_smoke_trail
104anm_loment_anim_lom_blood_burst
105anm_loment_anim_lom_blood_exit
106anm_loment_anim_lom_cig_exhale_mth
107anm_loment_anim_lom_impact_dustcloud
108scr_odd_fellowsscr_river5_magician_smoke
109cut_rrtlcs_rrtl_exp_smoke
110cut_rrtlcs_rrtl_sparks
111scr_mob4scr_mob4_ped_water_splash
112cut_mudcs_mud2_des_bottle
113cut_rdowncs_rdown_blood_cough
114scr_net_race_checkpointsscr_ind1_firework_burst
115scr_net_race_checkpointsscr_ind1_firework_trail
116scr_net_race_checkpointsscr_mp_item_pickup_spawn
117scr_net_race_checkpointsscr_net_race_barrel_break
118scr_net_race_checkpointsscr_net_race_box_break
119scr_net_race_checkpointsscr_net_race_checkpoint
120scr_net_race_checkpointsscr_net_race_finish_firework_burst
121scr_net_race_checkpointsscr_net_race_finish_firework_burst_trail
122scr_net_race_checkpointsscr_net_race_finish_firework_sparks
123scr_net_race_checkpointsscr_net_race_starting_flare
124scr_net_race_checkpointsscr_net_race_starting_flare_lead
125scr_beat_street_fightscr_beat_str_fght_win_smh
126cut_rdopncs_rdopn_exhale_mouth_pipe
127des_grh_outhouseent_ray_grh_poop_decal_spawner_sp
128des_grh_outhouseent_ray_grh_poop_exp
129scr_std1exp_grd_moonshine_trails_spawn
130scr_std1exp_smoke_trail
131scr_std1scr_nbd1_exp_bankwall
132scr_std1scr_nbd1_exp_bankwall_impact
133scr_std1scr_nbd1_exp_roof
134des_utopia1ent_amb_falling_debris
135des_utopia1ent_ray_utopia1_col_dust
136scr_beat_horse_racescr_beat_horse_race_bridge_smk
137scr_poisoned_wellexp_smoke_trail
138scr_poisoned_wellscr_poisoned_well_exp
139scr_poisoned_wellscr_poisoned_well_fog
140anm_coffeeent_anim_coffee_discard
141anm_coffeeent_anim_coffee_pour
142anm_coffeeent_anim_coffee_spit
143anm_coffeeent_anim_coffee_toss
144anm_coffeeent_anim_tea_toss
145anm_salent_anim_sal1_drown_splash_enter
146anm_salent_anim_sal1_drown_splash_exit
147anm_odrent_anim_kick_dust
148des_val_jailent_ray_val_jailwall_exp
149des_val_jailent_ray_val_jailwall_linger
150des_val_jailexp_smoke_trail
151scr_beat_bloated_corpsescr_beat_corpse_water_bubble_spawn
152anm_rallyent_anim_rally_cross_dust
153anm_rallyent_anim_rally_cross_fire
154scr_jack2ent_anim_spit_venom
155anm_homerobberyent_anim_corpse_mud_splash
156anm_homerobberyent_anim_wood_splinter_dir
157scr_train_robbery4ent_anim_trn4_train_coal
158scr_train_robbery4ent_anim_trn4_train_impact
159scr_train_robbery4ent_exp_trn4_carriage_exp
160scr_train_robbery4exp_grd_smoke_post_small
161scr_train_robbery4exp_smoke_trail
162scr_train_robbery4scr_trn4_train_exp
163scr_train_robbery4scr_trn4_train_smoke
164scr_train_robbery4scr_trn4_wall_dynamite
165scr_ind1ent_anim_ind_firework_light_flash
166scr_ind1scr_ind1_firework_burst
167scr_ind1scr_ind1_firework_burst_lead
168scr_ind1scr_ind1_firework_burst_long
169scr_ind1scr_ind1_firework_burst_long_lead
170scr_ind1scr_ind1_firework_burst_short
171scr_ind1scr_ind1_firework_burst_short_lead
172scr_ind1scr_ind1_firework_points
173scr_ind1scr_ind1_firework_points_lead
174scr_ind1scr_ind1_firework_ribbon
175scr_ind1scr_ind1_firework_ribbon_lead
176scr_ind1scr_ind1_firework_trail
177scr_ind1scr_ind1_firework_trail_long
178scr_ind1scr_ind1_firework_trail_ribbon
179scr_ind1scr_ind1_firework_trail_short
180scr_masonscr_mason_camera_flash
181anm_spitent_anim_saliva_spit
182anm_spitent_anim_saliva_tobacco_spit
183anm_spitent_anim_spit
184anm_spitent_anim_spit_blood_lip
185anm_spitent_anim_spit_cigar_end
186anm_spitent_anim_spit_kill_cam
187anm_spitent_anim_spit_kill_cam_sp
188anm_spitent_anim_spit_phlegm
189anm_spitent_anim_spit_venom
190anm_spitent_anim_squirt_syringe
191anm_smokingcs_matchstick_spark
192anm_smokingent_anim_cig_exhale_mth
193anm_smokingent_anim_cig_exhale_mth_car
194anm_smokingent_anim_cig_exhale_mth_short
195anm_smokingent_anim_cig_exhale_nse
196anm_smokingent_anim_cig_exhale_nse_car
197anm_smokingent_anim_cig_sparks
198anm_smokingent_anim_elec_sparks
199anm_smokingent_anim_matchstick_spark
200scr_mudtown5scr_mud5_safe_exp_post