Player death help
#9

At these time I set up this:

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
	if(PlayerInfo[playerid][pDeath] == 0)
	{
		PlayerInfo[playerid][pDeath] = 1;
		Update(playerid, pDeathu);
	}
	else if(PlayerInfo[playerid][pDeath] == 1)
	{
	    PlayerInfo[playerid][pDeath] = 2;
		Update(playerid, pDeathu);
	}
        SaveCoords(playerid);

public OnPlayerSpawn(playerid)
{
	if (!IsPlayerNPC(playerid))
	{
	    if(IsPlayerConnected(playerid))
		{
if(PlayerInfo[playerid][pDeath] == 1)
			{
				SetPlayerPos(playerid, PlayerInfo[playerid][pX], PlayerInfo[playerid][pY], PlayerInfo[playerid][pZ]);
				SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
                SetPlayerVirtualWorld(playerid, PlayerInfo[playerid][pVW]);
                SetPlayerInterior(playerid, PlayerInfo[playerid][pInterior]);
    			DeathLabel[playerid] = CreateDynamic3DTextLabel("{8A0808}This person is injured", 0xFFFFFFFF, 10.0, -0.45, -0.5, 15, playerid, INVALID_VEHICLE_ID, 0, -1, -1);
				SendClientMessage(playerid, -1, "If you don't get healed in 8 minutes you will be respawned at hospital.");
                SendToHospital[playerid] = SetTimerEx("Hospital", 60000*8, false, "i", playerid);
                TogglePlayerControllable(playerid, 1);
				AnimDeath[playerid] = SetTimerEx("DeathAnimation", 2500, false, "i", playerid);
			}
			else if(PlayerInfo[playerid][pDeath] == 2)
			{
			    DeathLabel[playerid] = CreateDynamic3DTextLabel("{8A0808}This person is death", 0xFFFFFFFF, 10.0, -0.45, -0.5, 15, playerid, INVALID_VEHICLE_ID, 0, -1, -1);
			    Hospital(playerid);
			}
			else
			{
			    TogglePlayerControllable(playerid, 1);
			    ClearAnimations(playerid);
			}
What I need is to remove the camera going up and execute the OnPlayerSpawn code in OnPlayerDeath inmediately he deaths.

Tried OnPlayerDeath return 0, TogglePlayerControlable, Give Health and nothing.
Reply


Messages In This Thread
Player death help - by HidroDF - 24.01.2017, 00:19
Re: Player death help - by LongQuad - 24.01.2017, 04:40
Re: Player death help - by GoldenLion - 24.01.2017, 05:07
Re: Player death help - by iLearner - 24.01.2017, 05:59
Respuesta: Re: Player death help - by HidroDF - 24.01.2017, 13:30
Re: Respuesta: Re: Player death help - by GoldenLion - 24.01.2017, 16:03
Respuesta: Re: Respuesta: Re: Player death help - by HidroDF - 24.01.2017, 16:15
Re: Player death help - by AndreiWow - 24.01.2017, 16:18
Respuesta: Player death help - by HidroDF - 24.01.2017, 16:22
Re: Player death help - by GoldenLion - 24.01.2017, 17:11

Forum Jump:


Users browsing this thread: 1 Guest(s)