ping kicker
#5

This was your code:

pawn Код:
public OnPlayerUpdate(playerid)
{
    new string[128];
    new playername[MAX_PLAYER_NAME];
    GetPlayerName(playerid, playername, sizeof(playername));
    if((GetPlayerPing(playerid) >= 400 && GetPlayerPing(playerid) != 65535))
    SendClientMessage(playerid,COLOR_GREEN,"Kicked - High Ping limit - Max 400.", playername);
    SendClientMessageToAll(COLOR_GREEN, "%s has been kicked because he excedeed max ping limit (400).");
    Kick(playerid);
    return 1;
}
These lines I don't understand:

pawn Код:
1.) --> SendClientMessage(playerid,COLOR_GREEN,"Kicked - High Ping limit - Max 400.", playername);
    2.) --> SendClientMessageToAll(COLOR_GREEN, "%s has been kicked because he excedeed max ping limit (400).");
1.) Why that ,playername in SendClientMessage
That should be like this:
pawn Код:
SendClientMessage(playerid,COLOR_GREEN,"Kicked - High Ping limit - Max 400.");
2.) Here you have %s in SendClienMessage...You can't actually do that..
That should be like this:
pawn Код:
new string[128];
format(string, sizeof(string), "%s has been kicked because he excedeed max ping limit (400).",playerame);
SendClientMessageToAll(COLOR_GREEN, string);
Reply


Messages In This Thread
ping kicker - by Face9000 - 06.11.2010, 17:05
Re: ping kicker - by ••• ĤБĶБM ••• - 06.11.2010, 17:09
Re: ping kicker - by Face9000 - 06.11.2010, 17:16
Re: ping kicker - by Mike_Peterson - 06.11.2010, 17:44
Re: ping kicker - by Alex_Valde - 06.11.2010, 17:44
Re: ping kicker - by Kwarde - 07.11.2010, 17:06

Forum Jump:


Users browsing this thread: 1 Guest(s)