Jump to content

Help with bindkey


brad

Recommended Posts

Mta Hello friends I have a problem from time'm trying to resolve this:

I have a resource that pressing Alt key activates a smoke but I activ fxGlass or and not what I want off esque turn off when you stop playing the key here the server side script

function FxNitro(player) 
    local veh = getPedOccupiedVehicle(player)  
    if veh then 
        triggerClientEvent("fxNitro",player, veh)  
    end 
end 
addEventHandler("onPlayerJoin",getRootElement(),function() 
    bindKey(source,"vehicle_fire", "down", FxNitro)  
end) 

thax :D

Link to comment

pero va con este script

  
addEvent("fxNitro",true) 
  
local nitro = {} 
  
function FxNitro(veh) 
    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)*1,math.sin(rz)*1  
fxAddDebris ( x, y, z, 0 , 0 , 255 , 18 , 2.0 , 2 ) --color1 
        nitro[veh] = setTimer(FxNitro,50,1,veh)  
   end 
end 
addEventHandler("fxNitro",getRootElement(),FxNitro)   

thx for response

Link to comment

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...