Jump to content

Creating a new chat just for team chat?


Lukkaz

Recommended Posts

I have already done this before.

Use:

unbindKey("y", "down", "chatbox", "teamsay") 
bindKey("y", "down", "chatbox", "friendsay") 
addCommandHandler("friendsay", 
     function(thePlayer, theMessage) 
              for i,v in ipairs(myFriends) do 
                    outputChatBox(v, theMessage) 
              end 
      end 
) 

Link to comment

@qaisjp: Weird code. I don't know what it does, but as I see it, your script's messing clientside and serverside :/

What should it be? Because bindKey doesn't have a player element therefore it looks clientside and addCommandHandler has the player element therefore it looks serverside

And the myFriends table in ipairs isn't defined anywhere :/

Link to comment

Well, since you're saying you've created the new chatbox, all you gotta do now is cancel the event onPlayerChat when it detects a team-message and use the dxDrawText function to draw the message gathered from onPlayerChat (that was cancelled) to your new chatbox

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