Jump to content

Help with this script


brad

Recommended Posts

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) 

:D:D

Link to comment
  • 1 year later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...