[Ajuda]TextDraw - 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: [Ajuda]TextDraw (
/showthread.php?tid=295947)
[Ajuda]TextDraw -
Lohran - 08.11.2011
tipo galera a textdraw aparace mais caso o player relogue ela n aparece mais
na verdade й um velocimetro no caso sу aparece com o player no carro
alguem sabe como aparecer td vez com o player relogando?
Re: [Ajuda]TextDraw -
Dolby - 08.11.2011
Posta o codigo ai.
Re: [Ajuda]TextDraw -
Lohran - 08.11.2011
pawn Код:
Speed[i] = TextDrawCreate(485.000000, 340.000000,"_");
TextDrawAlignment(Speed[i],0);
TextDrawBackgroundColor(Speed[i],0x000000FF);
TextDrawFont(Speed[i],1);
TextDrawLetterSize(Speed[i],0.300000, 1.500000);
TextDrawColor(Speed[i],0xFFFFFFFF);
TextDrawSetOutline(Speed[i],1);
TextDrawSetProportional(Speed[i],1);
public abaixo\/
pawn Код:
public Velocimetro()
{
new Float:Speedo_HP;
for(new i=0; i<MAX_PLAYERS; i++)
{
if(gPlayerLogged[i] == 1 && IsPlayerInAnyVehicle(i))
{
new vehicle = GetPlayerVehicleID(i);
GetVehicleHealth(vehicle, Speedo_HP);
new string[256];
format(string,sizeof(string),"~r~Veiculo: ~w~%s~n~~r~Velocidade:~w~ %d KM/h~n~~r~Combustivel: ~w~%d%%~n~~r~Saude: ~w~%0.0f%%~n~~r~GPS: ~w~%s" ,vehName[GetVehicleModel(vehicle)-400], GetPlayerSpeed(i, true), Gas[vehicle], Speedo_HP/10, ReturnPlayerZone(i));
TextDrawSetString(Speed[i], string);
if(TextShow[i] == false)
{
TextDrawShowForPlayer(i, Speed[i]);
TextShow[i] = true;
}
}
else
{
if(TextShow[i] == true)
{
TextDrawHideForPlayer(i, Speed[i]);
TextShow[i] = false;
}
}
}
}
Re: [Ajuda]TextDraw -
Dolby - 08.11.2011
Mais onde vocк colocou para mostrar o velocimetro? no OnPlayerEnterVehicle?
Re: [Ajuda]TextDraw -
Lohran - 08.11.2011
n apenas criei a textdraw e a public
Re: [Ajuda]TextDraw -
Dolby - 08.11.2011
Mais vocк esta chamando a public
Velocimetro?.
Re: [Ajuda]TextDraw -
Lohran - 08.11.2011
nгo, nem pensei nisso rs
Re: [Ajuda]TextDraw -
Lohran - 08.11.2011
malz o double post
sу q tipo antes em outros gamemodes eu n precisava chamar ela em onplayerentervehicle