Carbonik Posted October 16, 2010 Share Posted October 16, 2010 How make ! instead of / hm? Link to comment
dzek (varez) Posted October 16, 2010 Share Posted October 16, 2010 You need to catch every chat message (onPlayerChat event) then make a string.match (more info | even more info) to check if first letter is a "!" and get the rest of the chat input (command and arguments). Hide message with cancelEvent and do your actions based of command and arguments extracted from chat message. Also searching before asking is a good idea, because this was asked so many times already.. Also making command with exclamation mark at the beginning instead of slash is unnatural (from DOS times it's natural to pass arguments after slash!), uncommon (I think only 2-3 servers are using this.. Most players will just get confused) and just weird. And complicates the scripts. Link to comment
Timic Posted November 1, 2010 Share Posted November 1, 2010 An example : function(message,type) if (string.find(message,"!me")) and not (string.find(message," !me")) then setTimer(outputChatBox,50,1,"Im Here!",getRootElement(),255,0,0,true) Just learn Link to comment
dzek (varez) Posted November 1, 2010 Share Posted November 1, 2010 there is no need to bump this topic. author didn't respond - solved or no longer care. especially when he creates another topics. your example is also wrong. i can type "blablabla!me is cool and da man" and it will work.. and wtf? why timer??? Link to comment
Discord Moderators Zango Posted November 1, 2010 Discord Moderators Share Posted November 1, 2010 for fun actually you're not the only one who found that timer completely amusing Link to comment
Recommended Posts