brad Posted September 18, 2011 Share Posted September 18, 2011 hi friends recently some friends helped me create a script type and smoke and good and all but something goes wrong, I activate the script (smoke) or click alt normally and remains active: S, then I would know who helps me when I hold the button turn activated the smoke and if I stop button turns off the smoke thanks client addEvent("fxNitro",true) local nitro = {} function FxNitro(veh) if nitro[veh] and isTimer(nitro[veh]) then killTimer(nitro[veh]) end if getVehicleController(veh) then local x,y,z = getElementPosition(veh) local rx,ry,rz = getElementRotation(veh) rz = math.rad(rz-180) local dx,dy = math.cos(rz)*2,math.sin(rz)*2 fxAddTankFire(x,y,z,dx,dy,z) nitro[veh] = setTimer(FxNitro,500,1,veh) nuevamente el efecto end end addEventHandler("fxNitro",getRootElement(),FxNitro) server function FxNitro(jugador) local veh = getPedOccupiedVehicle(jugador) if veh then triggerClientEvent("fxNitro",jugador, veh) que agreguen el efecto. end end addEventHandler("onPlayerJoin",getRootElement(),function() bindKey(source,"vehicle_fire", "down", FxNitro) llamar la función cuando este active el nitro. end) Link to comment
CapY Posted September 19, 2011 Share Posted September 19, 2011 Comments always start with this "--" So this is WRONG llamar la función cuando este active el nitro. CORRECT --llamar la función cuando este active el nitro. Add -- on your other comments too and post your debug errors. Link to comment
Castillo Posted September 19, 2011 Share Posted September 19, 2011 CaPy, he's asking how to make it stop the effect when he stops pressing the button, not that he has a bug in the script. Link to comment
CapY Posted September 19, 2011 Share Posted September 19, 2011 Solidsnake14 said: CaPy, he's asking how to make it stop the effect when he stops pressing the button, not that he has a bug in the script. I know, but anyway... Link to comment
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