1. Any idea on how to send a broadcast/message to all users?

    I have written a little script so that when a user joins they get a welcome %username% message using ChatMessage pulled from a config. I would also like to notify all other users that %username% has joined and or left the server

    Learning so be gently :)

    Cheers
    Dave
     
  2. Here's a hack kinda
    playerObject:SendConsoleCommand("chat.add \""..ChatName.."\"".."text")

    I havnt even setup a server yet so there probably is an easier way.
     
  3. Shall give it a shot thanks..Setting up the server was the easy bit...Outside my comfort zone now :)

    Will feedback results

    Cheers
     
  4. Code:
    global.ConsoleSystem.Broadcast("chat.add \"" .. ChatName .. "\" \"" .. text .. "\"")
     
  5. Great stuff thanks chaps :)

    Had some problems with your command Hatemail - Pushed the message out but was dropping all words after the first. For example it was pulling "Say hello to %username%" from the config but the message was only showing the first word, "Say"

    thomasfn, worked a treat thanks. Was the dropping of words on the above down to there being no space between the .. text ..?

    Workings of my first mod coming along nicely. Bit more to add like user disconnected etc but hopefully have something soon to upload.

    Thanks again all for you patience and guidance :)
     
  6. Wulf

    Wulf Community Admin

    Are you using quotation marks in your message? If so, you'll have to escape them better with \\\. @thomasfn
     
  7. Damn, just noticed renab already published a mod doing the same thing :) . Will finish it off (without looking at his lol ) , good learning experience. Back to the drawing board then. No point doing something a season developer such as him as already done.
     
  8. Wulf

    Wulf Community Admin

    Options are always good! I was still going to make mine as well once I finish a few others.