17.02.2014, 09:23
Hello, i've added for my server a ping limit. So if player joins for example with 10 ping, he gets automaticly kicked. But when i test for myself, i get kick ,but the messages are just spaming at one time. I would like to have only one message..
Chatlog:
I scripted this "OnPlayerUpdate" how fix that message shows only time? Not spam.
Thanks in advance!
Chatlog:
Код:
[12:18:32] [KICKED] Max ping exceeded <10> [12:18:32] [KICK] Ercha has been kicked: Max Ping <10> [12:18:32] [KICKED] Max ping exceeded <10> [12:18:32] [KICK] Ercha has been kicked: Max Ping <10> [12:18:32] [KICKED] Max ping exceeded <10> [12:18:32] [KICK] Ercha has been kicked: Max Ping <10> [12:18:32] [KICKED] Max ping exceeded <10> [12:18:32] [KICK] Ercha has been kicked: Max Ping <10> [12:18:32] [KICKED] Max ping exceeded <10> [12:18:32] [KICK] Ercha has been kicked: Max Ping <10> [12:18:32] [KICKED] Max ping exceeded <10> [12:18:32] [KICK] Ercha has been kicked: Max Ping <10> [12:18:32] [KICKED] Max ping exceeded <10> [12:18:32] [KICK] Ercha has been kicked: Max Ping <10> [12:18:32] [KICKED] Max ping exceeded <10> [12:18:32] [KICK] Ercha has been kicked: Max Ping <10> [12:18:32] [KICKED] Max ping exceeded <10> [12:18:32] [KICK] Ercha has been kicked: Max Ping <10> [12:18:32] [KICKED] Max ping exceeded <10> [12:18:32] [KICK] Ercha has been kicked: Max Ping <10> [12:18:32] Server closed the connection.
I scripted this "OnPlayerUpdate" how fix that message shows only time? Not spam.
Код:
public OnPlayerUpdate(playerid) { new playername[MAX_PLAYER_NAME], string[128]; if(GetPlayerPing(playerid) > 10 && GetPlayerPing(playerid) != 65535){ GetPlayerName(playerid, playername, MAX_PLAYER_NAME); SendClientMessage(playerid, COLOR_GREEN, "[KICKED] Max ping exceeded <10>"); Kick(playerid); format(string, 128, "[KICK] %s has been kicked: Max Ping <10>", playername); SendClientMessageToAll(COLOR_RED, string); }