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!

  2. LOOKING FOR A VERSION OF SKRIPT?

    You can always check out our Wiki for downloads and any other information about Skript!

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

Solved add messages that a player has sent in the last 5 minutes to a list

Discussion in 'Skript' started by FireRoz, Nov 8, 2020.

Thread Status:
Not open for further replies.
  1. FireRoz

    FireRoz Active Member

    Joined:
    May 28, 2020
    Messages:
    134
    Likes Received:
    5
    I know it's kinda hard to understand the title, I know I am noob and I can't do it by myself, but I have searched for several hours now and I can't find a solution,

    Here's my code:
    Code (Text):
    1. on chat:
    2.   set {_messages} to the messages that a player has sent in the last 5 minutes
    3.  
    4. command /chatlogs [<offlineplayer>]:
    5.   permission: chatlogs.check
    6.   permission message: &cNo permissions
    7.   trigger:
    8.     send "&6&lChat logs of &e%arg-1%"
    9.     send "&c%{_messages}%"


     
  2. Best Answer:
    Post #4 by Fyriiee, Nov 13, 2020
  3. Fyriiee

    Fyriiee Member

    Joined:
    Sep 30, 2020
    Messages:
    26
    Likes Received:
    0
    Code (Text):
    1. on chat:
    2.   add message to {messages::%player%}
    3.   wait 5 minutes:
    4.     remove message from {messages::%player%}
    5.  
    6. command /chatlogs [<offlineplayer>]:
    7.   permission: chatlogs.check
    8.   permission message: &cNo permissions
    9.   trigger:
    10.     send "&6&lChat logs of &e%arg-1%"
    11.     send "&c%{messages::%arg-1%}%"
    This should work.
     
  4. FireRoz

    FireRoz Active Member

    Joined:
    May 28, 2020
    Messages:
    134
    Likes Received:
    5
    i
    it gave errors so I did this
    Code (Text):
    1. on chat:
    2.   add message to {messages::%player%}
    3.   wait 300 seconds
    4.   remove message from {messages::%player%}
    5. and then it displays <none> where it should display player's chat logs
    6.  
    7. command /chatlogs [<offlineplayer>]:
    8.   permission: chatlogs.check
    9.   permission message: &cNo permissions
    10.   trigger:
    11.     send "&6&lChat logs of &e%arg-1%"
    12.     send "&c%{messages::%arg-1%}%"
     
  5. Fyriiee

    Fyriiee Member

    Joined:
    Sep 30, 2020
    Messages:
    26
    Likes Received:
    0
    My bad, I forgot to make the variable a list variable. Here's the tested code:
    Code (Text):
    1. on chat:
    2.     add message to {messages::%player%::*}
    3.     wait 300 seconds
    4.     remove message from {messages::%player%::*}
    5.  
    6. command /chatlogs [<offlineplayer>]:
    7.     permission: chatlogs.check
    8.     permission message: &cNo permissions
    9.     trigger:
    10.         send "&6&lChat logs of &e%arg-1%"
    11.         send "&c%{messages::%arg-1%::*}%"
    12.  
     
  6. FireRoz

    FireRoz Active Member

    Joined:
    May 28, 2020
    Messages:
    134
    Likes Received:
    5
    Thank!
    it works.
    but not necessarily how I wanted it to.
    It says "hi" and "hi".
    can't it be like "gg"
    line 2
    "ggg"
    idk if u know what I mean but look that's what I mean.
    chat logs of fireroz
    gg
    bad word 1
    bad word 2
     
Thread Status:
Not open for further replies.

Share This Page

Loading...