[Ajuda] Com Float - 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] Com Float (
/showthread.php?tid=294644)
[Ajuda] Com Float -
cotonete - 02.11.2011
Код:
new Float:Health, Float:Armour;
GetPlayerHealth(giveplayerid, Health);
GetPlayerArmour(giveplayerid, Armour);
ta certo nгo estб? me retorna um valor imenso ¬¬
Re: [Ajuda] Com Float -
DreeH - 02.11.2011
PHP код:
new
Float:V[2],
str[48]
;
GetPlayerHealth(giveplayerid, V[0]);
GetPlayerArmour(giveplayerid, V[1]);
format(str, sizeof(str), "A vida do ID: [%d] й: [%f] e o colete [%f].", giveplayerid, V[0], V[1]);
Testa.
Re: [Ajuda] Com Float -
TiagoPS - 02.11.2011
ele retorna valores imensos mesmo.
tipo
se o cara tiver de vida full
100.00000
Re: [Ajuda] Com Float -
cotonete - 02.11.2011
arrumei, tinha que ser usar esse parвmetro: %0.0f