HUD
Functions

GM: particle Effect Emit

Called before any of VCMod particle effects are created. This can be used to stop or override particle effects per object basis.

Used in: VCMod Main, VCMod ELS addons.

Server GM:VC_particleEffectEmit(Entity ent, Integer etype, String eff, Integer tmr)

Arguments

1. Entity ent; Vehicle
Vehicle emiting the effect.

2. Integer etype; Type
The type of the effect. Effect types can be:
0 - Damage backfire
1 - exhaust idle
2 - exhaust stress
3 - wheel normal
4 - wheel brake
5 - wheel sparks
6 - engine repair
7 - engine explosion
8 - Damage light glass
9 - Damage repair light glass
10 - Damage crash sparks
11 - Damage exhaust
12 - Damage repair exhaust
13 - Damage tire
14 - Damage repair tire
15 - Damage light turn on spark
16 - Damage engine smoke
17 - Damage engine fire

3. String eff; Effect name
This can be any of VCMod effects.

4. Integer tmr; Timer
Some effects have timer after which they get deleted. If this is nil, it means no timer.

Returns

1. Boolean/String If returned nil or nothing, default effects will play. If returned false the effect will not be ran. You can return custom effect name to replace default effect.

Example

// Will cause all effects wheel related effects to not play
hook.Add("VC_particleEffectEmit", "VC_particleEffectEmit_nowheeleffects", function(ent, etype, eff, tmr)
	if etype == 3 or etype == 4 oretype == 5 then return false end
end)

// Will cause all effects tire puncture effects to be replaced by glass breaking effects
hook.Add("VC_particleEffectEmit", "VC_particleEffectEmit_glassify", function(ent, etype, eff, tmr)
	if etype == 13 then return "VC_Glass_Light" end
end)
Page modified:
...2020-05-13 11:02:44