06.11.2010, 17:44
This was your code:
These lines I don't understand:
1.) Why that ,playername in SendClientMessage
That should be like this:
2.) Here you have %s in SendClienMessage...You can't actually do that..
That should be like this:
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;
}
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).");
That should be like this:
pawn Код:
SendClientMessage(playerid,COLOR_GREEN,"Kicked - High Ping limit - Max 400.");
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);