[Ajuda] Velocimetro
#1

Pessoal eu criei uma text draw para usar com um sistema de velocнmetro, mais sу que nгo ta aparecendo as informaзхes mais sim a textdraw que eu ponhei pra ser substituнda pela string que mostra s informaзхes, e eu nгo estou conseguindo arrumar esse erro se alguйm poder me ajudar fico grato, irei deixar o cуdigo abaixo.

Код:
/text dra OnGameModeInit....
	Textdraw91 = TextDrawCreate(592.000000, 321.000000, "000");
	TextDrawBackgroundColor(Textdraw91, 255);
	TextDrawFont(Textdraw91, 1);
	TextDrawLetterSize(Textdraw91, 0.259999, 1.799999);
	TextDrawColor(Textdraw91, -16776961);
	TextDrawSetOutline(Textdraw91, 0);
	TextDrawSetProportional(Textdraw91, 1);
	TextDrawSetShadow(Textdraw91, 1);
	
	Textdraw101 = TextDrawCreate(593.000000, 338.000000, "000");
	TextDrawBackgroundColor(Textdraw101, 255);
	TextDrawFont(Textdraw101, 1);
	TextDrawLetterSize(Textdraw101, 0.300000, 1.600000);
	TextDrawColor(Textdraw101, -16776961);
	TextDrawSetOutline(Textdraw101, 0);
	TextDrawSetProportional(Textdraw101, 1);
	TextDrawSetShadow(Textdraw101, 1);

	Textdraw131 = TextDrawCreate(586.000000, 353.000000, "000");
	TextDrawBackgroundColor(Textdraw131, 255);
	TextDrawFont(Textdraw131, 1);
	TextDrawLetterSize(Textdraw13, 0.300000, 1.600000);
	TextDrawColor(Textdraw131, -16776961);
	TextDrawSetOutline(Textdraw131, 0);
	TextDrawSetProportional(Textdraw131, 1);
	TextDrawSetShadow(Textdraw131, 1);

	Textdraw141 = TextDrawCreate(586.000000, 369.000000, "000");
	TextDrawBackgroundColor(Textdraw141, 255);
	TextDrawFont(Textdraw141, 1);
	TextDrawLetterSize(Textdraw141, 0.300000, 1.600000);
	TextDrawColor(Textdraw141, -16776961);
	TextDrawSetOutline(Textdraw141, 0);
	TextDrawSetProportional(Textdraw141, 1);
	TextDrawSetShadow(Textdraw141, 1);

//OnPlayerStateChange
if(newstate == PLAYER_STATE_DRIVER)
	{
		TextDrawShowForPlayer(playerid, Textdraw91);
		TextDrawShowForPlayer(playerid, Textdraw101);
		TextDrawShowForPlayer(playerid, Textdraw131);
		TextDrawShowForPlayer(playerid, Textdraw141);
	}
	else if(oldstate == PLAYER_STATE_DRIVER)
	{
		TextDrawHideForPlayer(playerid, Textdraw91);
		TextDrawHideForPlayer(playerid, Textdraw101);
		TextDrawHideForPlayer(playerid, Textdraw131);
		TextDrawHideForPlayer(playerid, Textdraw141);
	}

// Public para Getar a as informaзхes no velocнmetro
public Speedo()
{
    for(new playerid=0;playerid<MAX_PLAYERS;playerid++)
    {
		if(IsPlayerConnected(playerid) && IsPlayerInAnyVehicle(playerid))
		{
			//CHECAR VELOCIDADE
			new string[228];
			format(string,sizeof(string),"%dKM/H", VelocidadeKM(playerid));
			TextDrawSetString(Text:Textdraw91, string);
			TextDrawShowForPlayer(playerid, Textdraw91);
			//CHECAR LATARIA
			GetVehicleHealth(GetPlayerVehicleID(playerid), Lataria);
			format(string,sizeof(string),"Lataria: %0.0f%%", Lataria);
			TextDrawSetString(Textdraw131, string);
			//CHECAR VEICULO
			format(string,sizeof(string),"Veiculo: %s", Veiculos[GetVehicleModel(GetPlayerVehicleID(playerid))-400]);
			TextDrawSetString(Textdraw141, string);
			// Checar gasolina
			format(string,sizeof(string),"Gasolina: %d%", Gas[GetPlayerVehicleID(playerid)]);
			TextDrawSetString(Textdraw101, string);

		}
	
	}
}
Se precisar do resto sу avisar que eu posto!.
Reply


Messages In This Thread
Velocimetro - by MatheusAlcapone - 16.10.2012, 01:00
Re: Velocimetro - by zSuYaNw - 16.10.2012, 01:19
Re: Velocimetro - by MatheusAlcapone - 16.10.2012, 01:27
Re: Velocimetro - by zSuYaNw - 16.10.2012, 01:31
Re: Velocimetro - by MatheusAlcapone - 16.10.2012, 01:37
Re: Velocimetro - by zSuYaNw - 16.10.2012, 01:40
Re: Velocimetro - by MatheusAlcapone - 16.10.2012, 01:46
Re: Velocimetro - by ApocaSamp - 16.04.2016, 07:22
Re: Velocimetro - by HaRdiiZin - 16.04.2016, 12:09
Re: Velocimetro - by F1N4L - 16.04.2016, 12:22

Forum Jump:


Users browsing this thread: 1 Guest(s)