Çok Basit Bir Sistem Oyuncunun Pingi 600 ün Üzerinde olursa Oyuncu Kicklenir.
Kullanacağımız Rengi Belirtmek İçin Modun Başına
#define COLOR_GREEN 0x00D900C8Modun Başına
#define MAX_PING 600 // Değiştirebilirsiniz.OnPlayerUpdate'e de Şu Kodları Ekleyin. Tamam Bu İş :helal:
new string[128], string2[256];
new PlayerName[16];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
if(GetPlayerPing(playerid) >= MAX_PING)
{
format(string, sizeof(string), "%s ping limiti asimi yuzunden kicklendi. %d", PlayerName, MAX_PING);
SendClientMessageToAll(COLOR_GREEN, string);
format(string2, sizeof(string2), "Ping Limiti asimi yuzunden kicklendi. %d", MAX_PING);
SendClientMessage(playerid, COLOR_GREEN, string2);
Kick(playerid);
}
return 1;
}
Keşke copy + paste yaptıktak sonra bi test etseydin.
#include <a_samp>
#define COLOR_GREEN 0x00D900C8
#define MAX_PING 600 // Değiştirebilirsiniz.
public OnPlayerUpdate(playerid)
{
if(GetPlayerPing(playerid) >= MAX_PING)
{
new string[128], string2[128];
new PlayerName[24];
GetPlayerName(playerid, PlayerName, sizeof(PlayerName));
format(string, sizeof(string), "%s ping limiti asimi yuzunden kicklendi. %d", PlayerName, GetPlayerPing(playerid));
SendClientMessageToAll(COLOR_GREEN, string);
format(string2, sizeof(string2), "Ping Limiti asimi yuzunden kicklendi. %d", GetPlayerPing(playerid));
SendClientMessage(playerid, COLOR_GREEN, string2);
Kick(playerid);
return 1;
}
return 1;
}