3D Text Label Death
#1

One Dyanmic3DTextLabel is not showed when one player is going in Injury Time

Код:
public OnPlayerWeaponShot(playerid, weaponid, hittype, hitid, Float:fX, Float:fY, Float:fZ)
{
	new Float:health, Float:x, Float:y, Float:z;
	GetPlayerHealth(hitid,health);
	if(hittype == BULLET_HIT_TYPE_PLAYER)
	{
		if(health < 45 && GetPVarInt(hitid, "Dead") == 0)
		{
			SetPlayerHealth(hitid, 45);
			SetTimerEx("Wounded", 0, 0, "ii", playerid, hitid);
		}
	}
    if(GetPVarInt(hitid, "Dead") == 6)
	{
		DestroyDynamic3DTextLabel(PlayerInfo[hitid][pInjuriesText]);
		GetPlayerPos(hitid, x, y, z);
		if(!PlayerInfo[hitid][pInjuriesText])
		{
			PlayerInfo[hitid][pInjuriesText] = CreateDynamic3DTextLabel("(( THIS PLAYER IS NOW DEAD ))", COLOR_ERROR, x, y, z, 25.0, hitid, INVALID_VEHICLE_ID, 0, GetPlayerVirtualWorld(hitid), GetPlayerInterior(hitid), -1, 20.0);
			SendClientMessage(hitid, 0xFFFF00AA, "-> You're now dead. You need to wait 60 seconds and then you'll get the ability to /respawnme.");
		}
		return 0;
	}
}

UNDER 20 HP, ANIM IS OK, TEXT BUT 3DTEXT IT'S NOT SHOWED


Код:
forward Wounded(playerid, hitid);
public Wounded(playerid, hitid)
{
	new Float:x, Float:y, Float:z;
	GetPlayerPos(hitid,x,y,z);
	SetPVarInt(hitid, "Dead", 6);
	ApplyAnimationEx(hitid, "WUZI", "CS_Dead_Guy", 4.0, 0, 1, 1, 1, 0);
	ResetPlayerWeapons(hitid);
	GameTextForPlayer(hitid, "~b~BRUTTALY WOUNDED", 5000, 3);
	new stringdamage[128] damagetext[128];
	GetPlayerPos(hitid, x, y, z);
	
	format(stringdamage, sizeof(stringdamage), "(( Has been injured %d times, \n/damages %d for more information.\n ))", CountDamages(hitid), hitid);

	PlayerInfo[hitid][pInjuriesText] = CreateDynamic3DTextLabel(stringdamage, COLOR_ERROR, x, y, z, 25.0, hitid, INVALID_VEHICLE_ID, 0, GetPlayerVirtualWorld(hitid), GetPlayerInterior(hitid), -1, 20.0);
	
	SendClientMessage(hitid, COLOR_ERROR, "You were brutally wounded, now if a medic or anyone else doesn't save you, you will die.");
	SendClientMessage(hitid, COLOR_ERROR, "To accept death type /acceptdeath.");
	format(damagetext, sizeof(damagetext), "(( Has been injured %d times, /damages %d for more information. ))", CountDamages(hitid), hitid);
	SendClientMessage(hitid, COLOR_ERROR, damagetext);
	return 1;
}
Reply


Messages In This Thread
3D Text Label Death - by valelele - 20.06.2017, 17:22

Forum Jump:


Users browsing this thread: 1 Guest(s)