ISOFX Posted June 7, 2015 Share Posted June 7, 2015 Hello, Im having trouble with looping a particle effect in my Particle Effect menu, when i use the code below my menu keeps blinking and then if i keep the effect on the effect doesnt show on my screen does anyone know why this is happening? also if i remove "WAIT(500);" the game lags very badly, here is the code i used, if (featureWeaponExplosiveAmmo) // i just replaced this with the effect { if (bPlayerExists) STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_rcbarry2"); GRAPHICS::_SET_PTFX_ASSET_NEXT_CALL("scr_rcbarry2"); GRAPHICS::START_PARTICLE_FX_LOOPED_ON_ENTITY("scr_clown_appears", playerPed, 0.0, 0.0, -0.5, 0.0, 0.0, 0.0, 1.0, false, false, false); WAIT(500); } Does anyone know why? Thanks! Link to comment Share on other sites More sharing options...
Jitnaught Posted June 7, 2015 Share Posted June 7, 2015 1. You're if statement is wrong. If that is false, then STREAMING::REQUEST... isn't going to be called, but everything else is going to be. Surround STREAMING::REQUEST... and WAIT with { }s, like so: if (featureWeaponExplosiveAmmo) // i just replaced this with the effect{if (bPlayerExists){STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_rcbarry2");GRAPHICS::_SET_PTFX_ASSET_NEXT_CALL("scr_rcbarry2");GRAPHICS::START_PARTICLE_FX_LOOPED_ON_ENTITY("scr_clown_appears", playerPed, 0.0, 0.0, -0.5, 0.0, 0.0, 0.0, 1.0, false, false, false);WAIT(500); }} 2. WAIT(500) is going to make your menu blink because it isn't going to be drawn for the 500 milliseconds that the script is waiting. 3. When you remove WAIT(500) and it starts lagging, it's because you need at least a WAIT(0) somewhere in your loop. Link to comment Share on other sites More sharing options...
ISOFX Posted June 7, 2015 Author Share Posted June 7, 2015 1. You're if statement is wrong. If that is false, then STREAMING::REQUEST... isn't going to be called, but everything else is going to be. Surround STREAMING::REQUEST... and WAIT with { }s, like so: if (featureWeaponExplosiveAmmo) // i just replaced this with the effect{if (bPlayerExists){STREAMING::REQUEST_NAMED_PTFX_ASSET("scr_rcbarry2");GRAPHICS::_SET_PTFX_ASSET_NEXT_CALL("scr_rcbarry2");GRAPHICS::START_PARTICLE_FX_LOOPED_ON_ENTITY("scr_clown_appears", playerPed, 0.0, 0.0, -0.5, 0.0, 0.0, 0.0, 1.0, false, false, false);WAIT(500); }} 2. WAIT(500) is going to make your menu blink because it isn't going to be drawn for the 500 milliseconds that the script is waiting. 3. When you remove WAIT(500) and it starts lagging, it's because you need at least a WAIT(0) somewhere in your loop. I tried the code u gave me but i get the same thing, it keeps blinking Link to comment Share on other sites More sharing options...
Jitnaught Posted June 7, 2015 Share Posted June 7, 2015 (edited) I didn't fix all the problems in the code I gave you. Edited June 7, 2015 by LetsPlayOrDy Link to comment Share on other sites More sharing options...
ISOFX Posted June 7, 2015 Author Share Posted June 7, 2015 I didn't fix all the problems in the code I gave you. Could u fix it then? I cant find anyone to help me. Link to comment Share on other sites More sharing options...
XMOD1 Posted June 7, 2015 Share Posted June 7, 2015 Does "START_PARTICLE_FX_NON_LOOPED_ON_ENTITY" work on that asset? Link to comment Share on other sites More sharing options...
Jitnaught Posted June 7, 2015 Share Posted June 7, 2015 Sounds like you don't want help, but would rather somebody else would code it for you, which is not what I'm on this website for. Fireboyd78 1 Link to comment Share on other sites More sharing options...
Fireboyd78 Posted June 7, 2015 Share Posted June 7, 2015 Sounds like you don't want help, but would rather somebody else would code it for you, which is not what I'm on this website for. Pretty much this. Jitnaught 1 Link to comment Share on other sites More sharing options...
TragicMods Posted July 22, 2015 Share Posted July 22, 2015 (edited) _REQUEST_DLC_PTFX_ASSET(asset);_0x9C720B61(asset);if (_HAS_DLC_PTFX_LOADED(asset)){Ped playerPed = PLAYER_PED_ID();Vector3 coords = GET_ENTITY_COORDS(PLAYER_PED_ID(), true);START_PARTICLE_FX_NON_LOOPED_ON_ENTITY(PTFX, playerPed, 0.0, 0.0, -0.5, 0.0, 0.0, 0.0, 1.0, false, false, false);}else{drawNotification("~r~Error~s~: FX Not Loaded!");} works fine for me lol'd Edited July 22, 2015 by TragicMods Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now