How to fix the SPAM?
#1

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:

Код:
[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);
    }
Thanks in advance!
Reply


Messages In This Thread
How to fix the SPAM? - by Ercha - 17.02.2014, 09:23
Re: How to fix the SPAM? - by ]Rafaellos[ - 17.02.2014, 09:25
Re: How to fix the SPAM? - by Ercha - 17.02.2014, 09:32
Re: How to fix the SPAM? - by iJumbo - 17.02.2014, 09:33
Re: How to fix the SPAM? - by [EnErGyS]KING - 17.02.2014, 09:35
Re: How to fix the SPAM? - by Ercha - 17.02.2014, 09:37
Re: How to fix the SPAM? - by Ercha - 17.02.2014, 09:45
Re: How to fix the SPAM? - by Kyance - 17.02.2014, 10:55
Re: How to fix the SPAM? - by ]Rafaellos[ - 17.02.2014, 12:08
Re: How to fix the SPAM? - by Vince - 17.02.2014, 13:58

Forum Jump:


Users browsing this thread: 3 Guest(s)