04.11.2009, 19:45
I want if someone has minus 20 hp he will be automatic cracking for 8 seconds.
I DONT KNOW
forward IsDead(playerid);
public OnPlayerDeath(playerid, killerid, reason)
{
new Float: sfx;
new Float: sfy;
new Float: sfz;
GetPlayerPos(playerid, sfx, sfy, sfz);
SetPlayerPos(playerid, sfx, sfy, sfz);
TogglePlayerControllable(playerid, 0);
ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
SetTimer("IsDead",60000, true);
return 1;
}
public IsDead(playerid)
{
TogglePlayerControllable(playerid, 1);
SetPlayerHealth(playerid, 100);
SpawnPlayer(playerid);
SendClientMessage(playerid, COLOR_PURPLE, "** You wake up slowly");
return 1;
}
Originally Posted by Jo_123
I want if someone has minus 20 hp
|
GetPlayerName(playerid, currenthealth));
if(currenthealth < 20)
{
}
Originally Posted by Jo_123
he will be automatic cracking
|
new Float:currenthealth;
GetPlayerName(playerid, currenthealth));
if(currenthealth < 20)
{
LoopingAnim(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
}
Originally Posted by Jo_123
for 8 seconds.
|
forward StopCracking(playerid);
new Float:currenthealth;
GetPlayerName(playerid, currenthealth));
if(currenthealth < 20)
{
LoopingAnim(playerid, "CRACK", "crckdeth2", 4.0, 1, 0, 0, 0, 0);
SetTimerEx("StopCracking", 8000, 1, "i", playerid);
}
public StopCracking(playerid)
{
ApplyAnimation(playerid, "CARRY", "crry_prtial", 4.0, 0, 0, 0, 0, 0);
return 1;
}
Originally Posted by Benne
I made this once I was bored. You can't get -20 health I think...
On the top: pawn Код:
|