Simple Ping System

Started by =RK=MarineForce, May 28, 2020, 02:04 PM

Previous topic - Next topic

=RK=MarineForce

onPlayerJoin
NewTimer( "pinglimit", 3000, 0, player.ID );
Class:
warning
function pinglimit(player)
{
local player = FindPlayer(player);
if(player.IsSpawned)
{
if(player.Ping > 400)
{
player.Pos.z += 5;
stats[player.ID].warning++;
MessagePlayer(" " + bazi + " You've been slapped due to having high ping! ",player);
if(stats[player.ID].warning = 1)Message(" " + bazi + " " + player.Name + " WARNED PING LIMIT (1/8) ");
if(stats[player.ID].warning = 2)Message(" " + bazi + " " + player.Name + " WARNED PING LIMIT (2/8) ");
if(stats[player.ID].warning = 3)Message(" " + bazi + " " + player.Name + " WARNED PING LIMIT (3/8) ");
if(stats[player.ID].warning = 4)Message(" " + bazi + " " + player.Name + " WARNED PING LIMIT (4/8) ");
if(stats[player.ID].warning = 5)Message(" " + bazi + " " + player.Name + " WARNED PING LIMIT (5/8) ");
if(stats[player.ID].warning = 6)Message(" " + bazi + " " + player.Name + " WARNED PING LIMIT (6/8) ");
if(stats[player.ID].warning = 7)Message(" " + bazi + " " + player.Name + " WARNED PING LIMIT (7/8) ");
if(stats[player.ID].warning = 8)Message(" " + bazi + " " + player.Name + "  KICKED DUE TO HAVING PING (8/8)");
if(stats[player.ID].warning = 8)KickPlayer(player);
}
}

}

you can freeze player too if him ping high or slap or drown . but this system is good. you can also add fps system just add FPS instead of Ping

SHy^

#1
Hmm. great. The warning shouldn't be sent after 3 seconds. Should be sent after every 1/2 mint btw.
It also contains wrong parameters(spaces) in some lines ( in function)

It's going to give you a lot of errors.

Gito Baloch

Programming is the language I speak, the world I shape, and the future I code

SHy^

Quote from: Gitobaloch on May 30, 2020, 04:59 AMWhat is "+bazi+" ?
He uses it as like
const bazi = [#ff00ff] I guess,also he has released a broken code with too much errors.

Gito Baloch

But still appreciate him he did something to the community. thanks my love @=RK=MarineForce  for providing the system.
Programming is the language I speak, the world I shape, and the future I code

Saiyan Attack


Saiyan Attack

Instead of soo sooo many warning u can simply put message

Message(" " + noobmaster6162 + " " + player.Name + " WARNED PING LIMIT ("+stats[user.id].warning+"/8) ");