Text:Lataria
Speedometer_Setup(playerid)
{
APlayerData[playerid][Lataria] = TextDrawCreate(479.000000, 406.000000, " "); // Sem estar escrito nada
TextDrawBackgroundColor(APlayerData[playerid][Lataria], 255);
TextDrawLetterSize(APlayerData[playerid][Lataria], 0.449999, 1.599998);
TextDrawColor(APlayerData[playerid][Lataria], -1);
TextDrawSetOutline(APlayerData[playerid][Lataria], 1);
TextDrawSetProportional(APlayerData[playerid][Lataria], 1);
TextDrawShowForPlayer(playerid, APlayerData[playerid][Lataria]);
APlayerData[playerid][SpeedometerTimer] = SetTimerEx("Speedometer_Update", 100, true, "i", playerid);
return 1;
}
Speedometer_Cleanup(playerid)
{
TextDrawDestroy(APlayerData[playerid][Lataria]);
return 1;
}
if(vehicleid != 0)
if(vehicleid != 0)
{
new Float:Vida;// Variavel da vida
GetVehicleHealth(GetPlayerVehicleID(playerid), Vida); // getando a vida
/*------------------------------------------------------------------------------
Lataria
------------------------------------------------------------------------------*/
new ss[50];
if ((Vida > 0) && (Vida < 1000))
format(ss, 50, "~w~Lataria: ~w~I~r~.........", Vida);
if ((Vida >= ((1000 / 10) * 1)) && (Vida < ((1000 / 10) * 2)))
format(ss, 50, "~w~Lataria: ~w~II~r~........", Vida);
if ((Vida >= ((1000 / 10) * 2)) && (Vida < ((1000 / 10) * 3)))
format(ss, 50, "~w~Lataria: ~w~III~r~.......", Vida);
if ((Vida >= ((1000 / 10) * 3)) && (Vida < ((1000 / 10) * 4)))
format(ss, 50, "~w~Lataria: ~w~IIII~r~......", Vida);
if ((Vida >= ((1000 / 10) * 4)) && (Vida < ((1000 / 10) * 5)))
format(ss, 50, "~w~Lataria: ~w~IIIII~r~.....", Vida);
if ((Vida >= ((1000 / 10) * 5)) && (Vida < ((1000 / 10) * 6)))
format(ss, 50, "~w~Lataria: ~w~IIIIII~r~....", Vida);
if ((Vida >= ((1000 / 10) * 6)) && (Vida < ((1000 / 10) * 7)))
format(ss, 50, "~w~Lataria: ~w~IIIIIII~r~...", Vida);
if ((Vida >= ((1000 / 10) * 7)) && (Vida < ((1000 / 10) * 8)))
format(ss, 50, "~w~Lataria: ~w~IIIIIIII~r~..", Vida);
if ((Vida >= ((1000 / 10) * 8)) && (Vida < ((1000 / 10) * 9)))
format(ss, 50, "~w~Lataria: ~w~IIIIIIIII~r~.", Vida);
if ((Vida >= ((1000 / 10) * 9)) && (Vida <= 1000))
format(ss, 50, "~w~Lataria: ~w~IIIIIIIIII", Vida);
if (Vida == 0)
format(ss, 50, "~w~Lataria: ~r~..........", Vida);
TextDrawSetString(APlayerData[playerid][Lataria], ss); // atualizando a textdraw
else
{
TextDrawSetString(APlayerData[playerid][SpeedometerText], " ");
TextDrawSetString(APlayerData[playerid][FuelGauge], " ");
APlayerData[playerid][PlayerSpeed] = 0;
}
else
{
TextDrawSetString(APlayerData[playerid][SpeedometerText], " ");
TextDrawSetString(APlayerData[playerid][FuelGauge], " ");
TextDrawSetString(APlayerData[playerid][Lataria], " ");
APlayerData[playerid][PlayerSpeed] = 0;
}
O tutorial esta bom, porem ele eh de um unico Gm que nem todos usam... :S
|
Eu fiz tudo certinho, revisei vбrias vezes mas o textdraw nгo aparece, por que??
Eu entro no veнculo e nada!! |
TextDrawShowForPlayer(playerid, APlayerData[playerid][Lataria]);
Eu fiz tudo certinho, revisei vбrias vezes mas o textdraw nгo aparece, por que??
Eu entro no veнculo e nada!! |