Jump to content

[Help] Bind Key


Killer.

Recommended Posts

Hello, today i want to do a bind for a handbrake system...but it doesnt work and it show error.

The Script

function reczny1 ( player ) 
local auto = getPedOccupiedVehicle ( player ) 
if auto then 
if isElementFrozen ( auto ) then 
setElementFrozen ( auto, false ) 
outputChatBox ( "Freno de mano liberado", player, 0, 0, 125 ) 
exports.chat:me( player, "quita el freno de mano.") 
else 
setElementFrozen ( auto, true ) 
outputChatBox ( "((Freno de mano puesto", player, 0, 0, 125 ) 
exports.chat:me( player, "pone el freno de mano.") 
end 
else 
outputChatBox ( "((No estás en un vehiculo))", player, 255, 0, 0 ) 
end 
end 
addCommandHandler ( "frenodemano", reczny1 ) 
  
bindKey ( player, string num_0, string down, string frenodemano, [ string arguments ] ) 

Error

[16:45:52] SCRIPT ERROR: vehicles/hand.lua:19: ')' expected near 'num_0' 
[16:45:52] ERROR: Loading script failed: vehicles/hand.lua:19: ')' expected near 
 'num_0' 
  

Link to comment
function reczny1 ( player ) 
local auto = getPedOccupiedVehicle ( player ) 
if auto then 
if isElementFrozen ( auto ) then 
setElementFrozen ( auto, false ) 
outputChatBox ( "Freno de mano liberado", player, 0, 0, 125 ) 
exports.chat:me( player, "quita el freno de mano.") 
else 
setElementFrozen ( auto, true ) 
outputChatBox ( "((Freno de mano puesto", player, 0, 0, 125 ) 
exports.chat:me( player, "pone el freno de mano.") 
end 
else 
outputChatBox ( "((No estás en un vehiculo))", player, 255, 0, 0 ) 
end 
end 
addCommandHandler ( "frenodemano", reczny1 ) 
bindKey ("num_0", "down", reczny1) 

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