Jump to content

bindKey


Recommended Posts

Hello, i'm using a party chat and i think it's pretty complicated to use it, so i think about making this:

You can talk in party chat when you press U but i got a little problem with bindkey.

Server console: Party/commands.lua:101: Bad argument @'bindKey'

Here is the code:Line 101 = 12

function onPartyChat(player, cmd, ...) 
local party = Party.getPlayerParty(player) 
    if not party then 
        return Party.sendSystemMessage('You are not in a party.', player) 
    end 
local message = table.concat({...}, ' ') 
    if (message:gsub('#%x%x%x%x%x%x',''):gsub('[  ]','')):len() > 0 then 
        Party.sendChatMessageToAll(player, message, party) 
    end 
end 
addCommandHandler ( "party", onPartyChat ) 
bindKey ( source, "U", "down", "chatbox", "party" )  

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