Mefisto_PL Posted January 1, 2012 Share Posted January 1, 2012 I hate binds ... I can't make them so I want to somebody make me bind to nitro.. (Key: LPM) function nitro ( thePlayer, commandName, id ) if ( isPedInVehicle ( thePlayer ) ) then local id = 1010 local theVehicle = getPedOccupiedVehicle ( thePlayer ) local success = addVehicleUpgrade ( theVehicle, id ) if ( success ) then outputConsole ( getVehicleUpgradeSlotName ( id ) .. " dodane.", thePlayer ) else outputConsole ( "Nieudana próba dodania nitro.", thePlayer ) end else outputConsole ( "Musisz być w pojeździe !", thePlayer ) end end addCommandHandler ( "nitro", nitro ) Please help me ! :< Link to comment
Castillo Posted January 1, 2012 Share Posted January 1, 2012 (edited) addEventHandler("onPlayerJoin",root, function () bindKey(source,"1","down",nitro) end) addEventHandler("onResourceStart",resourceRoot, function () for index, player in ipairs(getElementsByType("player")) do bindKey(player,"1","down",nitro) end end) function nitro ( thePlayer ) if ( isPedInVehicle ( thePlayer ) ) then local id = 1010 local theVehicle = getPedOccupiedVehicle ( thePlayer ) local success = addVehicleUpgrade ( theVehicle, id ) if ( success ) then outputConsole ( getVehicleUpgradeSlotName ( id ) .. " dodane.", thePlayer ) else outputConsole ( "Nieudana próba dodania nitro.", thePlayer ) end else outputConsole ( "Musisz być w pojeździe !", thePlayer ) end end addCommandHandler ( "nitro", nitro ) Edited January 1, 2012 by Guest Link to comment
Mefisto_PL Posted January 1, 2012 Author Share Posted January 1, 2012 It doesn't work.. It's bind a key, but I don't have nitro and show me on console my error message "Nieudana próba dodania nitro." Link to comment
Mefisto_PL Posted January 1, 2012 Author Share Posted January 1, 2012 Anybody can help me ? : 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