23.09.2015, 20:38
Quiero que salga solo dos nъmeros no todos, ademбs se bugea
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;
}