Im using litebans and skript. I made a punish GUI and added a custom reason section. But when you type "permanent" and then the reasons it displays "false <reason>".
[doublepost=1555710720,1555707030][/doublepost]
Code:
command /customban [<offline player>]:
trigger:
if player has permission "exige.punish":
if arg-1 is set:
if arg-1 has played before:
set {customtime.%player%} to true
send message "{@prefix} How long should the user be banned for? (type 'permanent' for a permanent ban)"
set {custombanuser.%player%} to arg-1
else:
send message "{@prefix} &cThat player has never played before!"
else:
send message "{@prefix} &cYou need to specify a player to punish!"
else:
send message "Unknown Command."
on Chat:
if {customtime.%player%} is true:
cancel event
set {custombantime.%player%} to message
set {customtime.%player%} to false
set {customban.%player%} to true
send message "{@prefix} What is the reason for the ban?"
stop
if {customban.%player%} is true:
cancel event
set {custombanreason.%player%} to message
set {customban.%player%} to false
if {customtime.%player%} is "permanent":
make player execute command "ban %{custombanuser.%player%}% %{custombanreason.%player%}%"
if {customtime.%player%} is not "permanent":
make player execute command "ban %{custombanuser.%player%}% %{customtime.%player%}% %{custombanreason.%player%}%"
[doublepost=1555710720,1555707030][/doublepost]
Nevermind I found the error ^-^Im using litebans and skript. I made a punish GUI and added a custom reason section. But when you type "permanent" and then the reasons it displays "false <reason>".
Code:command /customban [<offline player>]: trigger: if player has permission "exige.punish": if arg-1 is set: if arg-1 has played before: set {customtime.%player%} to true send message "{@prefix} How long should the user be banned for? (type 'permanent' for a permanent ban)" set {custombanuser.%player%} to arg-1 else: send message "{@prefix} &cThat player has never played before!" else: send message "{@prefix} &cYou need to specify a player to punish!" else: send message "Unknown Command." on Chat: if {customtime.%player%} is true: cancel event set {custombantime.%player%} to message set {customtime.%player%} to false set {customban.%player%} to true send message "{@prefix} What is the reason for the ban?" stop if {customban.%player%} is true: cancel event set {custombanreason.%player%} to message set {customban.%player%} to false if {customtime.%player%} is "permanent": make player execute command "ban %{custombanuser.%player%}% %{custombanreason.%player%}%" if {customtime.%player%} is not "permanent": make player execute command "ban %{custombanuser.%player%}% %{customtime.%player%}% %{custombanreason.%player%}%"