brad Posted September 26, 2011 Share Posted September 26, 2011 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 Link to comment
bandi94 Posted September 26, 2011 Share Posted September 26, 2011 "vehicle_fire" is not a key check here the key names: https://wiki.multitheftauto.com/wiki/Key_names Link to comment
brad Posted September 26, 2011 Author Share Posted September 26, 2011 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
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