SA-MP Forums Archive
[DUV] SetTimer Nгo Carrega O.o? [RESOLVIDO] Andmeida - 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: [DUV] SetTimer Nгo Carrega O.o? [RESOLVIDO] Andmeida (/showthread.php?tid=145901)



[DUV] SetTimer Nгo Carrega O.o? [RESOLVIDO] Andmeida - ipsBruno - 04.05.2010

Tenho Isso em Meu SetTimer FS
Topo
pawn Код:
forward AntiHH(playerid);
Agora
OnFilterScriptInit
pawn Код:
SetTimer("AntiHH",1000,true);
Agora
pawn Код:
public AntiHH(playerid)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && GetPlayerState(i) != PLAYER_STATE_SPECTATING && GetPlayerState(i) != PLAYER_STATE_WASTED)
{
new Float:health;
GetPlayerHealth(i, health);
if(health >= 100.0)
{
SetPlayerHealth(i, 75.0);
GetPlayerHealth(i, health);
if(health > 75.0)
{
new name[MAX_PLAYER_NAME], string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s banido, Health Hack.",name);
SendClientMessageToAll(COLOR_RED, string);
Ban(playerid);
}
else
{
SetPlayerHealth(i, 100.0);
}
}
}
Mais Quando Entro no GM Nгo Funga Nem Com WH Tipo
Como senгo Carregasse o SetTimmer, o que esta errado no SetTimer?
Hum, Ainda nгo entendi isso
Ja Mudei TRUE FALSE e a Porra naum Funca


Re: [DUV] SetTimer Nгo Carrega O.o? - andmeida10 - 04.05.2010

Tenta:


pawn Код:
public AntiHH(playerid)
{
for(new i=0; i<MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && GetPlayerState(i) != PLAYER_STATE_SPECTATING && GetPlayerState(i) != PLAYER_STATE_WASTED)
{
new Float:health;
GetPlayerHealth(i, health);
if(health >= 100.0)
{
SetPlayerHealth(i, 75.0);
GetPlayerHealth(i, health);
if(health > 75.0)
{
new name[MAX_PLAYER_NAME], string[256];
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "%s banido, Health Hack.",name);
SendClientMessageToAll(COLOR_RED, string);
Ban(playerid);
}
else
{
SetPlayerHealth(i, 100.0);
}
}
return 1;
}

ou verifica se o public nгo estб dentro de um outro public.. аs vezes passa por distracзгo


Re: [DUV] SetTimer Nгo Carrega O.o? - ipsBruno - 04.05.2010

nвo Andmeida meu amor
O Problema nгo esta na public e sim no SetTimer

Pois com as outras publics nao funfa tbm



Re: [DUV] SetTimer Nгo Carrega O.o? - (o)Trydon - 04.05.2010

Drakon se coloco nakele FS de Admin? :P
tenta diminuir o tempo do
Код:
SetTimer("AntiHH",1000,true);
para
Код:
SetTimer("AntiHH",1,true);
^^


Re: [DUV] SetTimer Nгo Carrega O.o? - andmeida10 - 04.05.2010

Quote:
Originally Posted by Airton_
Drakon se coloco nakele FS de Admin? :P
tenta diminuir o tempo do
Код:
SetTimer("AntiHH",1000,true);
para
Код:
SetTimer("AntiHH",1,true);
^^
ta tolinho nгo? a cada 0.001 segundos vai chamar o Public


Re: [DUV] SetTimer Nгo Carrega O.o? - Douglinh@s - 04.05.2010


Quando eu preciso colocar tempo em alguma coisa nem ponho mais..

Aqui no meu GM nгo funciona mais SetTimer e nem SetTimerEx



Merda.

ALguйm sabe dizer?



Re: [DUV] SetTimer Nгo Carrega O.o? - (o)Trydon - 04.05.2010

Claro nй vei tem que atualiza bem rapido


Re: [DUV] SetTimer Nгo Carrega O.o? - andmeida10 - 04.05.2010

O SetTimer funciona no OnFilterScriptInit?


Tenta po-lo no OnPlayerConnect.... e ve se dб...


Re: [DUV] SetTimer Nгo Carrega O.o? - ipsBruno - 19.08.2010

Quote:
Originally Posted by higoroliveira22
Посмотреть сообщение
Public Sendo chamada na velocidade da luz
Sу para Correзгo..
A Velocidade da Luz й Executada em 299 .792.458 metros por Segundos, isto й podemos dar 3 Voltas na Terra em 3 Segundos..
a Velocidade de 1 Milissegundo
Код:
1ms = 0,001s
1s = 1000ms
Porйm podemos dizer que 1 Milissegundo equivale a 10-21 Ioctossegundo que Isto й 21x mais Rбpido, a velocidade da Luz й Executada em 3,3 Nanosegundos que й 10vezes mais lento que Millisegundo,portanto vocк se Equivocou dizendo que й na Velocidade da Luz por 1 Millisegundo.. Pois Millisegundo menos que Nanosegundos & Ioctossegundo que seriam a Velocidade Correta da Luz na Unidade de Tempo menor que Segundos..


Re: [DUV] SetTimer Nгo Carrega O.o? - TiagoPS - 19.08.2010

Quote:
Originally Posted by DraKoN
Посмотреть сообщение
Sу para Correзгo..
A Velocidade da Luz й Executada em 299 .792.458 metros por Segundos, isto й podemos dar 3 Voltas na Terra em 3 Segundos..
a Velocidade de 1 Milissegundo
Код:
1ms = 0,001s
1s = 1000ms
Porйm podemos dizer que 1 Milissegundo equivale a 10-21 Ioctossegundo que Isto й 21x mais Rбpido, a velocidade da Luz й Executada em 3,3 Nanosegundos que й 10vezes mais lento que Millisegundo,portanto vocк se Equivocou dizendo que й na Velocidade da Luz por 1 Millisegundo.. Pois Millisegundo menos que Nanosegundos & Ioctossegundo que seriam a Velocidade Correta da Luz na Unidade de Tempo menor que Segundos..
Seu Nerd