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

  • 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!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

FireRoz

Active Member
May 28, 2020
133
6
18
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:
on chat:
  set {_messages} to the messages that a player has sent in the last 5 minutes
 
command /chatlogs [<offlineplayer>]:
  permission: chatlogs.check
  permission message: &cNo permissions
  trigger:
    send "&6&lChat logs of &e%arg-1%"
    send "&c%{_messages}%"
 
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:
on chat:
  set {_messages} to the messages that a player has sent in the last 5 minutes
 
command /chatlogs [<offlineplayer>]:
  permission: chatlogs.check
  permission message: &cNo permissions
  trigger:
    send "&6&lChat logs of &e%arg-1%"
    send "&c%{_messages}%"
Code:
on chat:
  add message to {messages::%player%}
  wait 5 minutes:
    remove message from {messages::%player%}
 
command /chatlogs [<offlineplayer>]:
  permission: chatlogs.check
  permission message: &cNo permissions
  trigger:
    send "&6&lChat logs of &e%arg-1%"
    send "&c%{messages::%arg-1%}%"
This should work.
 
i
Code:
on chat:
  add message to {messages::%player%}
  wait 5 minutes:
    remove message from {messages::%player%}
 
command /chatlogs [<offlineplayer>]:
  permission: chatlogs.check
  permission message: &cNo permissions
  trigger:
    send "&6&lChat logs of &e%arg-1%"
    send "&c%{messages::%arg-1%}%"
This should work.
it gave errors so I did this
Code:
on chat:
  add message to {messages::%player%}
  wait 300 seconds
  remove message from {messages::%player%}
and then it displays <none> where it should display player's chat logs
 
command /chatlogs [<offlineplayer>]:
  permission: chatlogs.check
  permission message: &cNo permissions
  trigger:
    send "&6&lChat logs of &e%arg-1%"
    send "&c%{messages::%arg-1%}%"
 
i

it gave errors so I did this
Code:
on chat:
  add message to {messages::%player%}
  wait 300 seconds
  remove message from {messages::%player%}
and then it displays <none> where it should display player's chat logs
 
command /chatlogs [<offlineplayer>]:
  permission: chatlogs.check
  permission message: &cNo permissions
  trigger:
    send "&6&lChat logs of &e%arg-1%"
    send "&c%{messages::%arg-1%}%"
My bad, I forgot to make the variable a list variable. Here's the tested code:
Code:
on chat:
    add message to {messages::%player%::*}
    wait 300 seconds
    remove message from {messages::%player%::*}
 
command /chatlogs [<offlineplayer>]:
    permission: chatlogs.check
    permission message: &cNo permissions
    trigger:
        send "&6&lChat logs of &e%arg-1%"
        send "&c%{messages::%arg-1%::*}%"
 
My bad, I forgot to make the variable a list variable. Here's the tested code:
Code:
on chat:
    add message to {messages::%player%::*}
    wait 300 seconds
    remove message from {messages::%player%::*}
 
command /chatlogs [<offlineplayer>]:
    permission: chatlogs.check
    permission message: &cNo permissions
    trigger:
        send "&6&lChat logs of &e%arg-1%"
        send "&c%{messages::%arg-1%::*}%"
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
 
Status
Not open for further replies.