public OnPlayerSpawn(playerid)
{
IsAfterLifing[playerid] = 0;
if (IsDead[playerid] == 1)
{
TogglePlayerControllable(playerid,false);
ApplyAnimation(playerid,"PARACHUTE","FALL_skyDive_DIE", 4.0, 0, 0, 0, 1, 0);
SetTimerEx("AutoDeath",AUTODEATH_SECONDS * 1000,false,"i",playerid);
SCM(playerid,CYAN,"------------------ Health Advise -----------------");
SCM(playerid,WHITE,"You are bleeding to death.");
SCM(playerid,WHITE,"If you are lucky, the medics will help you.");
SCM(playerid,WHITE,"You can type /acceptdeath to give up and die.");
SCM(playerid,CYAN,"--------------------------------------------------------");
return 1;
}
return 1;
}
public CheckHealth(playerid)
{
new Float:Health;
GetPlayerHealth(playerid,Health);
if(Health < 20)
{
new hptimer;
hptimer = SetTimer("losehp",1000,true);
}
return 1;
}
forward hptimer(playerid);
public hptimer(playerid)
{
new Float:Health;
GetPlayerHealth(playerid, Health);
SetPlayerHealth(playerid, Health -5);
return 1;
}
|
public OnPlayerSpawn(playerid) { IsAfterLifing[playerid] = 0; if (IsDead[playerid] == 1) { ApplyAnimation(playerid,"PARACHUTE","FALL_skyDive_ DIE", 4.0, 0, 0, 0, 1, 0); SetTimerEx("AutoDeath",AUTODEATH_SECONDS * 1000,false,"i",playerid); TogglePlayerControllable(playerid,0); SCM(playerid,CYAN,"------------------ Health Advise -----------------"); SCM(playerid,WHITE,"You are bleeding to death."); SCM(playerid,WHITE,"If you are lucky, the medics will help you."); SCM(playerid,WHITE,"You can type /acceptdeath to give up and die."); SCM(playerid,CYAN,"--------------------------------------------------------"); return 1; } return 1; } |