1. Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved Not Same Message

Discussion in 'Requests' started by Nouz, Aug 26, 2019.

  1. Nouz

    Nouz New Member

    Joined:
    Aug 26, 2019
    Messages:
    6
    Likes Received:
    0
    Category: Chat

    Suggested name: NotSameMessage

    Spigot/Skript Version: Skript 2.2-dev36 - Spigot 1.8.8

    What I want:

    I would like a system that allows a player not to send the same message twice, so if he sends a message like "Hello my name is Skript" he won't be able to send the same message.

    Ideas for commands:

    No command

    Ideas for permissions:

    To bypass this, use permission "skript.nsm


    When I'd like it by:
    Possibly today.
     
  2. Best Answer:
    Post #2 by ShaneBee, Aug 27, 2019
  3. ShaneBee

    Supporter + Addon Developer

    Joined:
    Sep 7, 2017
    Messages:
    2,183
    Likes Received:
    234
    Code (Skript):
    1. on join:
    2.     set {messages::%player%} to ""
    3.  
    4. on chat:
    5.     if {messages::%player%} = message:
    6.         if player does not have permission "skript.nsm":
    7.             cancel event
    8.             send "You can not send the same message twice"
    9.     else:
    10.         set {messages::%player%} to message
    --- Double Post Merged, Aug 27, 2019, Original Post Date: Aug 26, 2019 ---
    I forgot to add the permission in, I edited it with the permission
     
    malia likes this.

Share This Page

Loading...