SA-MP Forums Archive
[Pedido] HP Restante. ++REP. - 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: [Pedido] HP Restante. ++REP. (/showthread.php?tid=340364)



[Pedido] HP Restante. ++REP. - Gustavo_z - 07.05.2012

Bom, eu queria tipo no final do resultado do x1: [X1]: tal Derrotou tal ( HP Restante: tal ).
++REP
Obrigado!


Re: [Pedido] HP Restante. ++REP. - Lуs - 07.05.2012

GetPlayerHealth


Re: [Pedido] HP Restante. ++REP. - Gustavo_z - 07.05.2012

Poderia me dar um exemplo?


Re: [Pedido] HP Restante. ++REP. - zbt - 07.05.2012

pawn Код:
new s[50], Float:vida;
GetPlayerHealth(killerid, vida);
format(s, 50, "Tal derrotou tal [HP restante %.0f]", vida);
SendClientMessageToAll(-1, s);



Re: [Pedido] HP Restante. ++REP. - @Riichard - 07.05.2012

pawn Код:
new Float:health;
GetPlayerHealth(playerid, health);
format(string, sizeof(string), "Seu Codigo Mensagem,etc. [HP Restante : %d]", sendername,health);
Acho que seria assim. @-@


nemviquepostaram¬¬


Re: [Pedido] HP Restante. ++REP. - Lуs - 07.05.2012

pawn Код:
new L_STRING[128], L_VIDA = GetPlayerHealth(playerid);
format(L_STRING, 128, "Vocк estб com %f de vida!", L_N);
SendClientMessage(playerid, -1, L_STRING);
Abraзos.


Re: [Pedido] HP Restante. ++REP. - BreakDriFT - 07.05.2012

Riichard
pawn Код:
new Float:health;
GetPlayerHealth(playerid, health);
format(string, sizeof(string), "Seu Codigo Mensagem,etc. [HP Restante : %d]", sendername,health);
Isso vai dar Erro , cade o Sendername ?

pawn Код:
format(string, sizeof(string), "Seu HP Atual й %f",health);

%s = Para Letras /string
%d = Para numeros
%f = Para Float's
Podera ver mais aqui > https://sampwiki.blast.hk/wiki/Format

Pronto Editei ...


Re: [Pedido] HP Restante. ++REP. - Abravanel - 07.05.2012

Quote:
Originally Posted by BreakDriFT
Посмотреть сообщение
pawn Код:
format(string, sizeof(string), "Seu HP Atual й %d",health);
Isso tambйm irб dar erro.
O certo й:
pawn Код:
format(string, sizeof(string), "Seu HP Atual й %f",health);
%f = Floatings


Re: [Pedido] HP Restante. ++REP. - BreakDriFT - 07.05.2012

Em qual parte eu falei Que estava certo ?
Nгo vi o Float.. Apenas dei CTRL C e CTRL V.
e Como vi que se tratava de Numeros coloquei o %d .

E mandei o Link da wiki foi para isso.


Re: [Pedido] HP Restante. ++REP. - Abravanel - 07.05.2012

Quote:
Originally Posted by BreakDriFT
Посмотреть сообщение
Em qual parte eu falei Que estava certo ?
Nгo vi o Float.. Apenas dei CTRL C e CTRL V.
e Como vi que se tratava de Numeros coloquei o %d .

E mandei o Link da wiki foi para isso.
Okay, vocк nгo viu, e eu apenas te corrigi.
Qual o problema nisso? lol ._.'