PDA

View Full Version : Helpme! Dead Sysytem


nooion345
04/03/2015, 05:26 AM
Hi, I have that.

Public Onplayerdeath

- isdeathcrp [playerid] = 1;

And when they die, it will hurt badly. To wait for a doctor to help or push / acceptdeath at the point of death.

But players injured fatally shot dead system to not spawn,and they return of point hurt badly

How to Fix Bug ? Thank You

if (isdeathcrp[playerid] == 1)
{
isdeathcrp[playerid] = 2;
SetPlayerHealth(playerid, 10);
ApplyAnimation(playerid,"SWEET","Sweet_injuredloop", 4.0, 1, 0, 0, 0, 0);
SetPlayerVirtualWorld(playerid,PlayerInfo[playerid][pWorld]);
SetPlayerInterior(playerid,PlayerInfo[playerid][pInt]);
SetPlayerPos(playerid, DeadX[playerid], DeadY[playerid], DeadZ[playerid]);
SendClientMessage(playerid, COLOR_ALLDEPT, "คุณได้รับบาดเจ็บสาหัส");
SendClientMessage(playerid, COLOR_ALLDEPT, "คุณกำลังจะตายพิมพ์ /acceptdeath หรือให้รอ LSFMD");
SetPVarInt(playerid, "StepsAD", 30);
}



public OnPlayerDeath(playerid, killerid, reason)

DeadX[playerid] = X;
DeadY[playerid] = Y;
DeadZ[playerid] = Z;
isdeathcrp[playerid] = 1;

ATGOggy
04/03/2015, 06:10 AM
Use 'bodypart' for this

nooion345
04/03/2015, 08:34 AM
I do not understand.

CalvinC
04/03/2015, 08:47 AM
I had a similar problem to this, it might help using a small timer instead of using it in OnPlayerSpawn, that fixed it for me.