SA-MP Forums Archive
[Ayuda] Label ERROR. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Ayuda] Label ERROR. (/showthread.php?tid=589892)



[Ayuda] Label ERROR. - Dwayne1999 - 23.09.2015



pawn Код:
new Text3D:DAMAGE[MAX_PLAYERS],Combate[MAX_PLAYERS];

public OnPlayerGiveDamage(playerid, damagedid, Float: amount, weaponid)
{
new string[100];
format(string,sizeof(string),"%f",amount);
DAMAGE[playerid] = Create3DTextLabel(string,0xFFFF00FF,30.0,40.0,30.0,20.0,5);
Attach3DTextLabelToPlayer(DAMAGE[playerid], playerid, 0.0, 0.0, 0.2);
SetTimerEx("SacarDamage",time,0,"d",playerid);
if(Combate[playerid] == 0)
{
Combate[playerid] = 1;
SendClientMessage(playerid,-1,"Entraste en combate.");
SetTimerEx("SacarCombate",time,0,"d",playerid);
}
if(Combate[damagedid]== 0)
{
SendClientMessage(playerid,-1,"Entraste en combate.");
Combate[damagedid] = 1;
SetTimerEx("SacarCombate",time,0,"d",damagedid);
}
return 1;
}

forward SacarDamage(playerid);
public SacarDamage(playerid)
{
Delete3DTextLabel(DAMAGE[playerid]);
return 1;
}
forward SacarCombate(playerid);
public SacarCombate(playerid)
{
Combate[playerid]=0;
return 1;
}