-.Paradox.- Posted May 29, 2014 Share Posted May 29, 2014 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
MIKI785 Posted May 29, 2014 Share Posted May 29, 2014 source is undefined most likely... Try this instead: addEventHandler("onPlayerJoin", root, function () bindKey(source, "u", "down", "chatbox", "party") end) Or simply use bindKey client sided. 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