#i dont need help im just giving a few scripts
1 messages · Page 1 of 1 (latest)
Skript to warn players, notify them, and apply punishments.
Define a variable to store warnings for each player
variables:
{warnings::*} = 0
Command to warn a player
command /warn <player> <text>:
permission: admin.warn
trigger:
# Get the player and reason from the command arguments
set {_player} to arg-1
set {_reason} to arg-2
if {_player} is online:
# Increment the player's warning count
add 1 to {warnings::%{_player}%}
# Notify the player and others
send "&cYou have been warned for: %{_reason}%" to {_player}
broadcast "&e%{_player}% was warned for: %{_reason}%"
# Check the number of warnings and apply penalties
if {warnings::%{_player}%} = 1:
kick {_player} because "First warning issued. Please follow the rules!"
else if {warnings::%{_player}%} = 3:
ban {_player} because "You have been banned for accumulating 3 warnings."
else:
send "&cPlayer %{_player}% is not online."
Command to check warnings for a player
command /warnings <player>:
permission: admin.warn.check
trigger:
set {_player} to arg-1
if {warnings::%{_player}%} is set:
send "&e%{_player}% has %{warnings::%{_player}%}% warning(s)."
else:
send "&e%{_player}% has no warnings."
Command to reset warnings for a player (optional)
command /resetwarnings <player>:
permission: admin.warn.reset
trigger:
set {_player} to arg-1
delete {warnings::%{_player}%}
send "&aWarnings for %{_player}% have been reset."
Skript to kick a player with a "crashed" message.
command /crash <player>:
permission: admin.crash
trigger:
set {_player} to arg-1
if {_player} is online:
kick {_player} because "&cYou have been disconnected due to a crash."
send "&a%{_player}% has been 'crashed' (kicked from the server)."
else:
send "&cPlayer %{_player}% is not online."
Optional feedback to staff when they try to "crash" themselves.
on command "/crash":
if player is sender:
send "&cYou cannot crash yourself!"
cancel event