[Ajuda] Problemas TextDrawns.
#3

Use 1 SetTimerEx.
Tipo:
PHP код:
OnPlayerStateChange:
if(
newstate == PLAYER_STATE_DRIVER)
{
SetTimerEx("Velo", 500, 1, "i", playerid); // isso й o timer de 500 milisegundos que se repete quando acaba. Isso vai fazer atualizar o combustivel e a velocidade.
return 1;
}
forward Velo(playerid);
public 
Velo(playerid)
{
new 
State;
State = GetPlayerState(playerid); // aqui definimos o que й State.
if(State == PLAYER_STATE_DRIVER)
{
format(string, sizeof(string), "%i km/h", GetPlayerSpeed(playerid, true)); // formatamos a mensagem da text de velocidade.
TextDrawSetString(Text:Velocimetro[playerid], string); // setamos a mensagem na text Velocimetro
TextDrawShowForPlayer(playerid, Text:Velocimetro[playerid]); // mostramos a text Velocimetro para o player.
format(string, sizeof(string), "%d/100 combustivel", Combustivel[playerid]); // formatamos a mensagem da text de combustivel.
TextDrawSetString(Text:Combustivel[playerid], string); // setamos a mensagem na text Combus.
TextDrawShowForPlayer(playerid, Text:Combus[playerid]); // mostramos a text Combus para o player.
}
return 
1;
} 
Ai vocк adapta de acordo com seu gamemode. Foi feito agora, nгo sei se tem erro. Caso tenha, me fale.
Reply


Messages In This Thread
Problemas TextDrawns. - by MKVplayer123 - 15.03.2017, 00:09
Re: Problemas TextDrawns. - by Whoo - 15.03.2017, 00:37
Re: Problemas TextDrawns. - by Luiiiz - 15.03.2017, 00:54
Re: Problemas TextDrawns. - by [BOPE]Seu._.Madruga - 15.03.2017, 01:59
Re: Problemas TextDrawns. - by PowerEvolve - 15.03.2017, 02:04
Re: Problemas TextDrawns. - by MKVplayer123 - 15.03.2017, 13:17

Forum Jump:


Users browsing this thread: 1 Guest(s)