Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Donate
Collapse

Plutonium

  1. Home
  2. MW3 Modding Support & Discussion
  3. Retrieve Chat Messages from Players with GSC

Retrieve Chat Messages from Players with GSC

Scheduled Pinned Locked Moved MW3 Modding Support & Discussion
2 Posts 2 Posters 253 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Dragundefined Offline
    Dragundefined Offline
    Drag
    wrote on last edited by
    #1

    Is there currently anyway to retrieve chat messages from players using GSC? I had previously done this using Lua with

    player::onnotify("say", function ....
    

    but I am currently unable to find a way to port this to GSC without any sort of extra plugin.

    The idea is to take the message and execute some sort of command, much like the commands you often see in Minecraft (/kill player, /help, etc...). I had it working previously in Lua with a multitude of commands, so if somebody could help me port it to GSC, that would be awesome. Or if I could do it in another language, I am open to that as well.

    Thank you!

    1 Reply Last reply
    0
    • mxveundefined Offline
      mxveundefined Offline
      mxve VIP
      wrote on last edited by
      #2
      init() {
          level thread chatListener();
      }
      
      chatListener() {
          while (true) {
              level waittill("say", message, player);
              println(player.name + " said: " + message);
          }
      }
      

      alt text

      1 Reply Last reply
      1

      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Donate