Quote:
Originally Posted by Hwang
IsPlayerPingKick
pawn Code:
stock IsPlayerPingKick(playerid,maxping){ new pngString[256]; if(GetPlayerPing(playerid) > maxping){ format(pngString,256,"{ffffff}Server closed the connection, Your Ping: {00FF00}%d {ffffff}- Max Ping {00FF00}%d",GetPlayerPing(playerid),maxping); SendClientMessage(playerid,-1,pngString); Kick(playerid); }return true;}
Example:
pawn Code:
IsPlayerPingKick(playerid, 300);
> 300 Ping = Kick, public: OnPlayerUpdate
|
This will kick a player who just connected because the ping you get on OnPlayerConnect is 6355, so this will kick a player who just connected. I suggest you check if the player is spawned.