Ok so I saw this skript that was a command log and I wanted to try to make it so each player had their own logs. For example, you could do /logs Player Commands and all of those players command would be listed.
Heres the code:
on command:
if sender is a player:
set {_time} to now
add "&b%player%: &c/%full command% &6(%{_time}%)" to {logscommand::%player's uuid%}
on chat:
if sender is a player:
set {_time} to now
add "&a%player%: &7%message% &6(%{_time}%)" to {logschat::%player's uuid%}
command /logs [<text>] [<text>]:
permission: logs.see
permission message: &4You don't have permission for this command.
trigger:
if arg 1 isn't set:
send "&4&lSkriptz&8» &cUse: &7/logs <player> <commands|chat>"
else:
if arg 2 isn't set:
send "&4&lSkriptz&8» &cUse: &7/logs <player> <commands|chat>"
else:
if arg 2 is "command" or "commands":
send "&c&l&nCOMMAND LOGS:"
loop {logscommand::%{_arg1uuid}%}:
send "%loop-value%"
if arg 2 is "chat":
send "&c&l&nCHAT LOGS:"
loop {logschat::%{_arg1uuid}%}:
send "%loop-value%"
command /clearlogs [<text>]:
permission: logs.clear
trigger:
if arg 1 isn't set:
send "&4&lSkriptz&8» &cUse: &7/Clearlogs <player>"
else:
clear {logschat::%{_arg1uuid}%}
clear {logscommand::%{_arg1uuid}%}
send "&4&lSkriptz&8» &aYou have successfully cleared the logs of %{_arg1uuid}%!"
The error that I am recieving from says it cant loop a single value (Line 21 and Like 25)
Heres the code:
on command:
if sender is a player:
set {_time} to now
add "&b%player%: &c/%full command% &6(%{_time}%)" to {logscommand::%player's uuid%}
on chat:
if sender is a player:
set {_time} to now
add "&a%player%: &7%message% &6(%{_time}%)" to {logschat::%player's uuid%}
command /logs [<text>] [<text>]:
permission: logs.see
permission message: &4You don't have permission for this command.
trigger:
if arg 1 isn't set:
send "&4&lSkriptz&8» &cUse: &7/logs <player> <commands|chat>"
else:
if arg 2 isn't set:
send "&4&lSkriptz&8» &cUse: &7/logs <player> <commands|chat>"
else:
if arg 2 is "command" or "commands":
send "&c&l&nCOMMAND LOGS:"
loop {logscommand::%{_arg1uuid}%}:
send "%loop-value%"
if arg 2 is "chat":
send "&c&l&nCHAT LOGS:"
loop {logschat::%{_arg1uuid}%}:
send "%loop-value%"
command /clearlogs [<text>]:
permission: logs.clear
trigger:
if arg 1 isn't set:
send "&4&lSkriptz&8» &cUse: &7/Clearlogs <player>"
else:
clear {logschat::%{_arg1uuid}%}
clear {logscommand::%{_arg1uuid}%}
send "&4&lSkriptz&8» &aYou have successfully cleared the logs of %{_arg1uuid}%!"
The error that I am recieving from says it cant loop a single value (Line 21 and Like 25)