Injured on Death
#1

Well for RP servers you might need that
[I need help in making it]

When your player dies (Health Reaches "0") You want him to Come back to the same place he died in.. and keep on the floor and his hp automatically goes down... then he's sent to the hospital when his Health RE-REACHES "0"
Reply
#2

So,what is this about? suggestion? need help fixing your things? i don't really understand it
Reply
#3

Need help ....
Reply
#4

onplayerdeath: Getplayerpos

onplayerspawn: Setplayerpos, settimerex(hospital)

public hospital(playerid)
{
Setplayerpos;
setplayerhealth(playerid, 1);
}

If you face any problem post it here again.
Reply
#5

Quote:
Originally Posted by HurtLocker
Посмотреть сообщение
onplayerdeath: Getplayerpos

onplayerspawn: Setplayerpos, settimerex(hospital)

public hospital(playerid)
{
Setplayerpos;
setplayerhealth(playerid, 1);
}

If you face any problem post it here again.
Well that didn't work... I have every thing ready and good.. except that i want to set his position to the last place he died at!! i scripted all the rest and worked except that
Reply
#6

It's impossible not to work. Logic makes it necessarily working. Sorry, but there is something you didn't do correctly. And remove the setplayerpos from the onplayerspawn, now that i looked at it again is only needed in the timer.
Reply
#7

Quote:
Originally Posted by HurtLocker
Посмотреть сообщение
It's impossible not to work. Logic makes it necessarily working. Sorry, but there is something you didn't do correctly. And remove the setplayerpos from the onplayerspawn, now that i looked at it again is only needed in the timer.
Ok.. I Fixed.. it i used another thing Hurt...

pawn Код:
public AfterDeath(playerid)
{
   
   for(new i=0;i<MAX_PLAYERS;i++)
    {
        SetPlayerPos(i, DeathPosX[i], DeathPosY[i], DeathPosZ[i]);
        ApplyAnimation(i,"CRACK","crckdeth1",4.1,1,1,1,1,1,1);
        GameTextForPlayer(i, "~r~Injured~n~~w~Please Call the EMS /call 911", 5000, 3);
        new Float:HISCHP;
        GetPlayerHealth(i, HISCHP);
        SetPlayerHealth(i, HISCHP-5);
        if(HISCHP < 12.0)
        {
          PlayerInfo[i][pHospital] = 1;
          KillTimer(death_timer[i]);
          SetPlayerSpawn(i);
        }

    }
   return 1;
}
Rest of VARs and etc are in the script.. this is just to show how i made it work
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)