3 deaths = 15 minutes ban

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

    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.

Endas

Member
Jun 22, 2020
10
0
1
I make a skript, but kick and ban lines does not work. Can someone help?

variables:
{kill counter.%player%.kills_total} = 0

on death of player:
add 1 to {kill counter.%player%.deaths_total}
message " &6You died &e&l%{kill counter.%player%.deaths_total}% &6times."
if {kill counter.%player%.deaths_total} = 3:
set {kill counter.%player%.deaths_total} to 0
make console execute command "kick %player% &6you died 3 times, you will be able to log in after 15 minutes"
wait 10 ticks
make console execute command "ban %player% &6you died 3 times, you will be able to log in after 15 minutes"
wait 15 minutes
make console execute command "pardon %player%"
 
Hi, try this. It works for me. :emoji_wink:

Code:
variables:
    {kill.counter.%player%} = 0
    {ban.%player%} = false

on death:
    add 1 to {kill.counter.%player%}
    send "&7You died &e%{kill.counter.%player%}% &7times!" to player
    if {kill.counter.%player%} is bigger than 2:   
        if {ban.%player%} is false:
            set {ban.%player%} to true
            kick player due to "&8&l[&6AvantysDevServer&8&l] &7You died &e3 &7times!"
            wait 15 minutes
            set {ban.%player%} to false

command /checkvar:
    trigger:
        send "%{ban.%player%}%"

command /testun [<offlineplayer>]:
    trigger:
        set {ban.%arg 1%} to false
        send "unbanned"

Screen:
https://ctrlv.cz/ieqJ
 
Status
Not open for further replies.