[Ajuda] Velocimetro continua.
#1

Olб, to fazendo um sistema de velocнmetro em minha GM e o tempo nгo tб parando (o settimerex). Tipo: Eu entro no veiculo ai comeзa o timer mostrando a velocidade sу que quando sai do veнculo, continua enviando a mensagem. O Timer nгo para.

Code:
PHP код:
public OnPlayerStateChange(playeridnewstateoldstate)
{
    if(
newstate == PLAYER_STATE_DRIVER)
    {
    
SetTimerEx("velo"10001"i"playerid);
    return 
1;
    }
    if(
oldstate == PLAYER_STATE_DRIVER)
    {
    
KillTimer(velo(playerid));
    
KillTimer(velo2(playerid));
    return 
1;
    }
    return 
1;
}
forward velo(playerid);
public 
velo(playerid)
{
SetTimerEx("velo2"501"i"playerid);
return 
1;
}
forward velo2(playerid);
public 
velo2(playerid)
{
format(Stringsizeof(String), "| INFO | Sua velocidade й de: %ikm/h"GetPlayerSpeed(playeridtrue));
SendClientMessage(playerid0xFF0000AAString);
return 
1;

Obs: sгo 2 velo pra dar o tempo. Pq quando entra no veiculo, ja aparece a velocidade, entгo quero que espere um tempo atй poder mostrar a velocidade.
Eu coloquei SendClientMessage sу pra testar. Em breve vou mudar pra textdraw.
Reply


Messages In This Thread
Velocimetro continua. - by Luiiiz - 05.03.2017, 20:06
Re: Velocimetro continua. - by Cheleber_Pausini - 05.03.2017, 20:14
Re: Velocimetro continua. - by Tuznn - 05.03.2017, 20:17
Re: Velocimetro continua. - by Luiiiz - 05.03.2017, 20:21
Re: Velocimetro continua. - by Whoo - 05.03.2017, 20:22
Re: Velocimetro continua. - by Luiiiz - 05.03.2017, 20:24
Re: Velocimetro continua. - by Luiiiz - 05.03.2017, 20:28

Forum Jump:


Users browsing this thread: 1 Guest(s)