Julian09123 Posted August 20, 2013 Posted August 20, 2013 Hola :3 como puedo hacer para que envez de ir a Freeroam/upgrades/nitro apretar Click derecho para tener nos osea Apretas click derecho matienes apretado y tienes y dejas de apretar y se acaba el nos alguien sabe o me podrian ayudar? a hacerlo? Skype: Juliang09123
MTA Team 0xCiBeR Posted August 20, 2013 MTA Team Posted August 20, 2013 Mmm... se me ocurren un par de maneras..Puedes utilizar: bindKey addVehicleUpgrade removeVehicleUpgrade unbindKey DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
NodZen Posted August 20, 2013 Posted August 20, 2013 Mmm... se me ocurren un par de maneras..Puedes utilizar: bindKey addVehicleUpgrade removeVehicleUpgrade unbindKey No hace falta el unbindKey,ya que puede usar "down" para ponerlo y "up" para sacarlo. ------------------------------------------------------------------------------------------ My scripts http://community.multitheftauto.com/index.php?p=resources&s=details&id=6977 http://community.multitheftauto.com/index.php?p=resources&s=details&id=7740
MTA Team 0xCiBeR Posted August 20, 2013 MTA Team Posted August 20, 2013 Lo puse, para que lo ejecute cuando sale del vehiculo asi no da errores Ej: addEventHandler("onVehicleExit",root, function () unbindKey (--etc etc end) DevOps Engineer, Cloud Advocate & Security Engineer(Red Team) | Coffee, Containers & Burp
Julian09123 Posted August 20, 2013 Author Posted August 20, 2013 Asi? function nitro ( sourcePlayer, bindKey ) theVehicle = getPlayerOccupiedVehicle ( sourcePlayer ) if ( theVehicle ) then addVehicleUpgrade ( theVehicle, 1010 ) bindKey ( player, "x", "down", funcInput ) end end addEventHandler("onVehicleEnter",root, nitro) function sacarnos ( sourcePlayer, bindKey ) theVehicle = getPlayerOccupiedVehicle ( sourcePlayer ) if ( theVehicle ) then removeVehicleUpgrade ( theVehicle, 1010 ) bindKey ( player, "x", "up", funcInput ) end end addEventHandler("onVehicleExit",root, sacarnos) Skype: Juliang09123
NodZen Posted August 20, 2013 Posted August 20, 2013 A Mi me funciona bien function Nitro () local theVehicle = getPedOccupiedVehicle (localPlayer) if theVehicle then addVehicleUpgrade(theVehicle,1010) end end bindKey("x","down",Nitro) function Sacar() local theVehicle = getPedOccupiedVehicle (localPlayer) if theVehicle then removeVehicleUpgrade ( theVehicle, 1010 ) end end bindKey("x","up", Sacar) ------------------------------------------------------------------------------------------ My scripts http://community.multitheftauto.com/index.php?p=resources&s=details&id=6977 http://community.multitheftauto.com/index.php?p=resources&s=details&id=7740
Julian09123 Posted August 20, 2013 Author Posted August 20, 2013 A Mi me funciona bien function Nitro () local theVehicle = getPedOccupiedVehicle (localPlayer) if theVehicle then addVehicleUpgrade(theVehicle,1010) end end bindKey("x","down",Nitro) function Sacar() local theVehicle = getPedOccupiedVehicle (localPlayer) if theVehicle then removeVehicleUpgrade ( theVehicle, 1010 ) end end bindKey("x","up", Sacar) Jajja no lo habia probado pensaba que tenia un error.Gracias :3 Skype: Juliang09123
NodZen Posted August 20, 2013 Posted August 20, 2013 Np. ------------------------------------------------------------------------------------------ My scripts http://community.multitheftauto.com/index.php?p=resources&s=details&id=6977 http://community.multitheftauto.com/index.php?p=resources&s=details&id=7740
Recommended Posts