EDIT: EVERYTHING WORKS NOW YAY! Just changed bind and unbind to bindf and unbindf like you told. Didnt know those commands worked in chat, aswell as in console.
Thx for helping!
--[[
I've lost my hope, i just changed it to:
function bind(thePlayer, command, key, cmdToExecute, valueEntered)
bindKey(thePlayer, tostring(key), "down", cmdToExecute, valueEntered)
outputChatBox(key.."has been bound to do:"..cdmToExecute, thePlayer)
end
function unbind(thePlayer, command, key)
unbindKey(thePlayer, tostring(key), "down")
outputChatBox(key.."has been unbound!", thePlayer)
end
addCommandHandler("bindf", bind) -- <--
addCommandHandler("unbind", unbind)
Binding works now,
But for some reason, it doesn't print the text
Also, even tough it says bindf, it works when you use bind
And, I want it so that it binds a function to a key, but doesn't mess up the actual controls
--]]