Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 30
  1. #11
    Quote Originally Posted by PapaCharlie9 View Post

    If you also want to do message 4 six times, do this:

    Code:
    if ((message+1) == 2) { // We want to repeat message 2 three times
        plugin.SendGlobalMessage(spam[message]);
        plugin.SendGlobalMessage(spam[message]);
        plugin.SendGlobalMessage(spam[message]);
    } else if ((message+1) == 4) { // We want to repeat message 4 six times
        plugin.SendGlobalMessage(spam[message]);
        plugin.SendGlobalMessage(spam[message]);
        plugin.SendGlobalMessage(spam[message]);
        plugin.SendGlobalMessage(spam[message]);
        plugin.SendGlobalMessage(spam[message]);
        plugin.SendGlobalMessage(spam[message]);
    } else { // Just one time
        plugin.SendGlobalMessage(spam[message]);
    }
    And so on. Just add "if" or "else if" clauses for the message number and repeate the SendGlobalMessage line as many times as you want the message repeat.
    this isnt working for me either. it still sends 1 at a time for all

  2. #12
    Thanks papa! I'll mess with it and see if I can figure out how to add a 3rd, playerCount > 32.

  3. #13
    Quote Originally Posted by PapaCharlie9 View Post
    For pharbehind:

    The easiest way to have one set of messages for 1-15 players and another for 16+ is to:

    * Follow the steps in the OP, but instead of making one limit, make two.

    * Instead of putting the code in first_check, put the code in second_check

    * In first_check for the first limit (1-15), add this Expression:

    Code:
    ( server.PlayerCount < 16 )
    * In first_check of the second limit (16+), add this Expression:

    Code:
    ( server.PlayerCount >= 16)
    * Then customize the messages in the second_check of both limits as needed.
    Could I make the messages player count and map specific?

    So:
    Code:
     ( server.PlayerCount < 16 ) && ( server.MapFileName == "MP_001||MP_012" )
    Developer of PBSS Scanner || Feedback Thread


  4. #14
    Quote Originally Posted by Singh400 View Post
    Could I make the messages player count and map specific?

    So:
    Code:
     ( server.PlayerCount < 16 ) && ( server.MapFileName == "MP_001||MP_012" )
    Yes, but your syntax isn't quite right. You want this:

    Code:
     ( server.PlayerCount < 16 && Regex.Match(server.MapFileName, @"(?:MP_001|MP_012)", RegexOptions.IgnoreCase).Success )
    See my discussion of Regex.Match here: http://www.phogue.net/forumvb/showth...ll=1#post44100

  5. #15
    Quote Originally Posted by droopie View Post
    and if i wanted the message to show 3 times, 40x3 120 in a single spam.add message. now its just the 40 per spam.add message. hope it helps.
    Oh, sorry, I don't think that is possible. Your only choices are:

    1) Create a message string that is less than 128 characters.

    2) Send separate messages.

    You can't make one message get added to the end of a previous message.

    However, you can just build a single message string. For example, suppose you want to say three times:

    "Stop using M320 or grenades, noobs!"

    I think that is 36 charaters. The way you want it to look is like this in chat:

    [ADMIN] Stop using M320 or grenades,
    noobs! Stop using M320 or grenades,
    noobs! Stop using M320 or grenades,
    noobs!

    All you have to do is this:

    Code:
    String phrase = "Stop using M320 or grenades, noobs! "; // Notice I added a space at the end
    spam.Add(phrase + phrase + phrase);
    Last edited by PapaCharlie9; 14-03-2012 at 00:24.

  6. #16
    any update on increasing the timing between messages yet?

  7. #17
    Quote Originally Posted by droopie View Post
    any update on increasing the timing between messages yet?
    No, sorry. I'd have to completely rewrite the example to work around the bug in Insane Limits. It's on my list, but I've got a lot of other things to do first. Like play R20!

  8. #18
    Tried using this on R20, but it just spams the messages like crazy, even though I have interval set to 200.

  9. #19
    Quote Originally Posted by pharbehind View Post
    Tried using this on R20, but it just spams the messages like crazy, even though I have interval set to 200.
    You can't set the interval above 120, there's a bug.

    I noticed that the Spambot plugin comes with the latest PRoCon update. Maybe just use that instead? It's going to be a long time, if ever, that I fix this.

  10. #20
    Oh yeah, good deal. I just use that one. Thanks.

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •