SA-MP Forums Archive
[DUDA] "%d" de Float:Vida? - 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: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: [DUDA] "%d" de Float:Vida? (/showthread.php?tid=607871)



[DUDA] "%d" de Float:Vida? - yesid001 - 25.05.2016

pawn Код:
new Float:VidaN;
GetPlayerHealth(i,VidaN);
format(String, sizeof(String), "Vida Actual NPC:/*Acб que pongo? Con "%d" me sale: 1120403456*/",i,VidaN)



Respuesta: [DUDA] "%d" de Float:Vida? - EduGTA - 25.05.2016

GetPlayerHealth retorna un valor float.

Si usamos format y queremos mostrar un float, usamos "%f"

pawn Код:
format(String, sizeof(String), "Vida Actual NPC: %f", VidaN)
Espero que sea eso.



Respuesta: [DUDA] "%d" de Float:Vida? - yesid001 - 25.05.2016

Quote:
Originally Posted by EduGTA
Посмотреть сообщение
GetPlayerHealth retorna un valor float.

Si usamos format y queremos mostrar un float, usamos "%f"

pawn Код:
format(String, sizeof(String), "Vida Actual NPC: %f", VidaN)
Espero que sea eso.
Si era eso y funciona, gracias.