I need to make a skript that detects when a player with the same ip is already playing, the second player (multi account) that tries to enter is kicked.
The skript works only with an ip, but it stops working when it comes to another ip different from the list.
Thanks in advance
The skript works only with an ip, but it stops working when it comes to another ip different from the list.
Thanks in advance
code_language.skript:
on load:
clear {ips::*}
on join:
set {ip.%player%} to ip of player
if {ip.%player%.checkip} is not set:
set {ip.%player%.checkip} to false
wait 1 tick
if {ip.%player%.checkip} is false:
if {ips::*} contains {ip.%player%}:
wait 1 tick
kick the player due to "Already other user is playing with your same ip."
else:
set {ip.%player%.checkip} to true
add {ip.%player%} to {ips::*}
on quit:
if {ip.%player%.checkip} is true:
remove {ip.%player%} from {ips::*}
set {ip.%player%.checkip} to false