09.04.2015, 17:04
Okay, so I've figured out how to attach a label to someone when they die.. 'This player is bruitally wounded'
But I want to so when they /acceptdeath it deletes it..
ADDING THE LABEL:
And here I want the label to be removed
But I want to so when they /acceptdeath it deletes it..
ADDING THE LABEL:
Код:
forward PlayerDeathMode(playerid);
public PlayerDeathMode(playerid)
{
new string[128];
format(string, sizeof(string), "(( This player is bruitally wounded..\n/damages %s to check damages ))", playerid);
new Text3D:deathlabel = Create3DTextLabel(string, COLOR_LIGHTRED, 0.0, 0.0, 0.0, 15.0, 0);
Attach3DTextLabelToPlayer(deathlabel, playerid, 0.0, 0.0, 0.7);
ApplyAnimation(playerid, "KNIFE", "KILL_Knife_Ped_Die", 4.1, 0, 0, 0, 1, 0, 1);
SetPlayerColor(playerid, TRANSPARENT_GREY);
SendClientMessage(playerid, COLOR_LIGHTRED, "(( You are not bruitally wounded, you have 2 minutes to get help before you can acceptdeath. ))");
deathmodedeath[playerid] = SetTimerEx("PlayerDeathModeDEATH", 120000, false, "i", playerid);
deathmodeaccept[playerid] = SetTimerEx("PlayerDeathModeACCEPT", 60000, false, "i", playerid);
pDeathMode[playerid] = 1;
cantacceptdeath[playerid] = 1;
return 1;
}
Код:
CMD:acceptdeath(playerid, params[])
{
if(cantacceptdeath[playerid] == 1) return SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER:{FFFFFF} You must wait first.. ))");
SetPlayerPos(playerid, 1177.9880, -1323.7708, 15.0878);
SendClientMessage(playerid, COLOR_LIGHTRED, "** You accepted your fate, you're medical bills come to $500");
GivePlayerMoney(playerid, -500);
KillTimer(deathmodeaccept[playerid]);
KillTimer(deathmodedeath[playerid]);
return 1;
}


