Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void AddFXTrail(Entity e, Vector3 posOffset)
- {
- if (e != null && e.Exists())
- {
- Function.Call(Hash.REQUEST_NAMED_PTFX_ASSET, "scr_minigamegolf");
- Function.Call(Hash._SET_PTFX_ASSET_NEXT_CALL, "scr_minigamegolf");
- if (!Function.Call<bool>(Hash.DOES_PARTICLE_FX_LOOPED_EXIST, FxName)) //FxName is a global int in this example
- {
- FxName = Function.Call<int>(Hash.START_PARTICLE_FX_LOOPED_ON_ENTITY, "scr_golf_ball_trail", e, posOffset.X, posOffset.Y, posOffset.Z, 0.0, 0.0, 180.0, 3.0, false, false, false);
- Function.Call(Hash.SET_PARTICLE_FX_LOOPED_COLOUR, FxName, 0f, 10f, 250f, false);
- }
- }
- }
- void StopFXTrail()
- {
- Function.Call(Hash.REMOVE_PARTICLE_FX, FxName, true);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement