Roleplay Damage?
#1

I want to do a "roleplay dead" system.
When a player have 10 HP to get him down and say "You need to wait medics! " And if a player shot at him / hit to not take damage to have a "god" with 10 hp
Reply
#2

This is section where people have problem with there code not to request!
Reply
#3

Try using a timer and detect his HP, then apply an animation and send him a message.
Reply
#4

pawn Код:
new bool:PlayerFalled[MAX_PLAYERS];
public OnPlayerConnect(playerid)
{
PlayerFalled[playerid] = false;
return 1;
}
forward Ali(playerid);
public Ali(playerid)
{
new Float:H;GetPlayerHealth(playerid,H);
if(H < 10)
{
if(PlayerFalled[playerid] == false)
{
PlayerFalled[playerid] = true;
for(new i;i<2;i++) ApplyAnimation(playerid,"CRACK", "crckdeth2",4.1,1,1,1,1,10000);
TogglePlayerControllable(playerid,0);
SendClientMessage(playerid,-1,"You've got some damages wait for a medic.");
}
}
else
{
if(PlayerFalled[playerid] == true)
{
PlayerFalled[playerid] = false;
TogglePlayerControllable(playerid,1);
}
}
return 1;
}
new Timer[MAX_PLAYERS];
public OnPlayerSpawn(playerid)
{
Timer[playerid] = SetTimerEx("Ali",1000,1,"i",playerid);
return 1;
}
public OnPlayerDeath(playerid)
{
KillTimer(Timer[playerid]);
if(PlayerFalled[playerid] == true)
{
PlayerFalled[playerid] = false;
}
return 1;
}
public OnPlayerDisconnect(playerid,reason)
{
if(Timer[playerid]) KillTimer(Timer[playerid]);
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)