[Ajuda] life do veнculo ta estranho - 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] life do veнculo ta estranho (
/showthread.php?tid=629275)
life do veнculo ta estranho -
johntrybescripter - 23.02.2017
Ola galera,
Fiz um sisteminha para informar ao player mediante box as informaзхes do carro em que ele esta dirigindo, esta tudo certo, a principio, aparece o "life" e quando bate o life "reduz" porйm, o life ta muito doidгo inves de aparecer 1000 ta aparecendo um muito numero, nгo ta igual /dl..
vlw!
pawn Код:
forward VerificarVeh();
public VerificarVeh()
{
foreach(Player, i)
{
for(new c = 0; c < MAX_VEHICLES; c++)
{
GetPlayerVehicleID(c);
if(IsPlayerInVehicle(i,c))
{
new Float:vlife;
GetVehicleHealth(c, vlife);
new string[50];
format(string, sizeof(string), "%i", vlife);
TextDrawSetString(infocar5, string);
}
}
}
return 1;
}
Re: life do veнculo ta estranho -
1sbedx - 23.02.2017
PHP код:
format(string, sizeof(string), "%.2f", vlife);
Re: life do veнculo ta estranho -
IlanZ - 23.02.2017
Vida do carro usa
Float tanto Vida, Colete, Coodenadas
Re: life do veнculo ta estranho -
johntrybescripter - 23.02.2017
Quote:
Originally Posted by 1sbedx
PHP код:
format(string, sizeof(string), "%.2f", vlife);
|
deu certo vlwww!
illanz usei Float porem tinha esquecido que й %f