Warnings.
#1

Fixed
Reply
#2

Код:
public OnPlayerDeath(playerid, killerid, reason)
{
	if(IsAtEvent[playerid] != 0)
	{
		if(!NoEventRespawn[playerid])
		{
			GetPlayerPos(playerid, LasttX[playerid], LasttY[playerid], LasttZ[playerid]); // I don't think you need this, Well anyways.
			SetPlayerPos(playerid, LasttX[playerid], LasttY[playerid], LasttZ[playerid]); // Will set him to his old coordinates.
			// And Here you respawn him in the event position, I guess you already have it too.
		}
		else
		{
			SetPlayerPos(playerid, EventX, EventY, EventZ); // When he dies, He will respawn again in event spawn.
			return 1;
		}
	}
	if(IsAtEvent[playerid] != 0)
	{
		Died[playerid] = 1; // This Means he is Dead.
		if(Died[playerid] == 1) // Here if he is Dead which happend above it will Start the Timer.
		{
			Died[playerid] = 0;
			TogglePlayerSpectating(playerid, 1);
			SetTimerEx("NoDeathCam", 500, 1, "i", playerid);
		}
		else
		{
			TogglePlayerSpectating(playerid, 0);
		}
	}
	return 1;
}
now try to use it
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)