[AJUDA] Ping alto. - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: Non-English (
https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (
https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (
https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA] Ping alto. (
/showthread.php?tid=286474)
[AJUDA] Ping alto. -
Baigou - 29.09.2011
Boa noite.
Procurei no forum um sistema de limitador de pings. Sabe, tipo se o player tiver um certo ping ir kikado.
Mas nada achei no forum. pesquisei sobre Alto Ping, Limitador de Ping, ou algo do tipo. Mas nada achei.
Por favor, se puderem me dar uma mгozinha '-'.
Obrigado.
Gracias.
ou alguma outra lingua. -n
Re: [AJUDA] Ping alto. -
Dolby - 29.09.2011
pawn Код:
if(GetPlayerPing(playerid) >= 1000) return Kick(playerid);
Re: [AJUDA] Ping alto. -
Lуs - 29.09.2011
Quote:
Originally Posted by Gustavo_Araujo
pawn Код:
if(GetPlayerPing(playerid) >= 1000) return Kick(playerid);
|
Correto:
pawn Код:
#define PingMaximo 1000 //Definir aqui o ping mбximo
public OnPlayerConnect(playerid)
{
SetTimerEx("ChecarPing", 1000, true, "i", playerid);
return 1;
}
forward ChecarPing(playerid);
public ChecarPing(playerid)
{
if(GetPlayerPing(playerid) >= PingMaximo) return Kick(playerid);
return 1;
}
Re: [AJUDA] Ping alto. -
Josma_cmd - 29.09.2011
Quote:
Originally Posted by Los
Correto:
pawn Код:
#define PingMaximo 1000 //Definir aqui o ping mбximo
public OnPlayerConnect(playerid) { SetTimerEx("ChecarPing", 1000, true, "i", playerid); return 1; }
forward ChecarPing(playerid); public ChecarPing(playerid) { if(GetPlayerPing(playerid) >= PingMaximo) return Kick(playerid); return 1; }
|
Completo* e nгo correto.
O cуdigo do Gustavo й funcional apenas nгo estб implementado.
Los, acho que й melhor um SetTimer no OnGameModeInit do que um SetTimerEx no OnPlayerConnect sendo que serб verificado a mesma coisa no mesmo intervalo de tempo...
Re: [AJUDA] Ping alto. -
Baigou - 29.09.2011
'-' vo testar 1 por 1 '-' dai vejo ... dai dou a rep *-*'
Re: [AJUDA] Ping alto. -
Baigou - 29.09.2011
Obrigado a todos.
Rep pro Los.. Mas a ajuda de vocкs foram bem uteis.. Muito obrigado.'