(5, 0, 0, [],
[
(multiplayer_is_server),
#Loop through every player and check their ping.
(get_max_players, ":max"),
(try_for_range, ":i", 0, ":max"),
(player_is_active, ":i"),
(player_get_ping, ":ping", ":i"),
(gt, ":ping", 200), #Maximum ping: 200.
#Inform.
(str_store_player_username, s1, ":i"),
(str_store_string, s2, "@[Server] {s1} kicked: high ping."),
(display_message, s2, 0x999000),
(server_add_message_to_log, s2),
(try_end),
]),
(5, 0, 0, [],
[
(multiplayer_is_server),
#Loop through every player and check their ping.
(get_max_players, ":max"),
(try_for_range, ":i", 0, ":max"),
(player_is_active, ":i"),
(player_get_ping, ":ping", ":i"),
(gt, ":ping", 200), #Maximum ping: 200.
#Inform.
(str_store_player_username, s1, ":i"),
(str_store_string, s2, "@[Server] {s1} kicked: high ping."),
(display_message, s2, 0x999000),
(server_add_message_to_log, s2),
(kick_player, ":i"),
(try_end),
]),
#This in mission templates.
(5, 0, 0, [],
[
(multiplayer_is_server),
#Loop through every player and check their ping.
(get_max_players, ":max"),
(try_for_range, ":i", 0, ":max"),
(player_is_active, ":i"),
(player_get_ping, ":ping", ":i"),
(gt, ":ping", 200), #Maximum ping: 200.
#Inform.
(str_store_player_username, s1, ":i"),
(str_store_string, s0, "@[Server] {s1} kicked: high ping."),
(try_for_range, ":j", 0, ":max"),
(player_is_active, ":j"),
(multiplayer_send_string_to_player, ":j", client_display_message, s0),
(try_end),
(server_add_message_to_log, s0),
(kick_player, ":i"),
(try_end),
]),
#This in module_scripts.py to game_receive_network_message, client-side events.
(eq, ":event_type", client_display_message),
(display_message, s0, 0x999000),