[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=382549)
TextDraw -
Lucas-Fc - 04.10.2012
Bom Galera. Seguinte. Queria que quando um player tomasse um tiro, aparecesse em cima da sua Cabeзa o quanto de HP que ele perdeu com o tiro.
Ex :
-10
Ta assim aqui :
pawn Код:
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
if(damagedid != INVALID_PLAYER_ID)
{
new String[40];
format(String, sizeof(String), "~g~-~r~%.0f", amount);
Sangue = Create3DTextLabel(String, -1, 30.0, 40.0, 50.0, 40.0, 0, 0);
Attach3DTextLabelToPlayer(Sangue, damagedid, 0.0, 0.0, 0.7);
SetTimerEx("Retirar3D", 2000, false, "d", damagedid);
}
return 1;
}
//------------------------------------------------------------------------------
forward Retirar3D(playerid);
public Retirar3D(playerid)
{
Delete3DTextLabel(playerid, Sangue);
return 1;
}
Da esses Warning :
pawn Код:
C:\Users\Lucas\Desktop\Servidor\gamemodes\DM.pwn(38) : warning 213: tag mismatch
C:\Users\Lucas\Desktop\Servidor\gamemodes\DM.pwn(38) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
2 Warnings.
Linha 38 :
pawn Код:
Delete3DTextLabel(playerid, Sangue);
Como fica In Game (
N era pra tar assim :\ )
Alguem me ajuda ai, fala o que ta errado. PF
+Rep se for o caso.
Re: TextDraw -
Lucas-Fc - 04.10.2012
Ninguйm ? UP
Re: TextDraw -
Lucas-Fc - 04.10.2012
Afz alguem ajuda ai '-'
Re: TextDraw -
FenixBorn - 04.10.2012
Parametro a mais,,o certo seria tipo assim ( EXEMPLO)
pawn Код:
Delete3DTextLabel(Sangue);
Re: TextDraw -
ViniBorn - 04.10.2012
pawn Код:
Delete3DTextLabel(Sangue);
Re: TextDraw -
Jason` - 04.10.2012
pawn Код:
new
PlayerText3D: mostrarDano;
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid) {
static string[32];
format(string, sizeof(string), "{32CD32}-{FF0000}%.0f", amount);
mostrarDano = CreatePlayer3DTextLabel(playerid, string, -1, 30.0, 40.0, 50.0, 40.0, 0, 0);
SetTimerEx("sumirDano", 3000, 0, "i", playerid);
return 1;
}
sumirDano(playerid); public sumirDano(playerid) {
return DeletePlayer3DTextLabel(playerid, mostrarDano);
}
Re: TextDraw -
Lucas-Fc - 04.10.2012
Vou testar aqui todos os exemplos. muito obrigado a todos
Re: TextDraw -
Lucas-Fc - 04.10.2012
Quote:
Originally Posted by Pedro_Miranda
pawn Код:
new PlayerText3D: mostrarDano;
public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid) {
static string[32]; format(string, sizeof(string), "{32CD32}-{FF0000}%.0f", amount); mostrarDano = CreatePlayer3DTextLabel(playerid, string, -1, 30.0, 40.0, 50.0, 40.0, 0, 0); SetTimerEx("sumirDano", 3000, 0, "i", playerid); return 1; }
sumirDano(playerid); public sumirDano(playerid) {
return DeletePlayer3DTextLabel(playerid, mostrarDano); }
|
Compilou direito, mais nгo aparece nada em cima do player. nгo aparece o Life que perdeu. Nгo aparece nada !
Up aff
Re: TextDraw -
Lucas-Fc - 04.10.2012
UP Alguйm Por Favor
Re: TextDraw -
Waldrey - 04.10.2012
Lucas espera mano