Death help
#1

OK, how do i make when player died, then spawn in the same last death place?
Reply
#2

Add this to the top

pawn Код:
new Float:deathx[MAX_PLAYERS], Float:deathy[MAX_PLAYERS], Float:deathz[MAX_PLAYERS];
new died[MAX_PLAYERS];
Then:

pawn Код:
OnPlayerDeath(playerid)
{
GetPlayerPos(playerid, deathx[playerid], deathy[playerid], deathz[playerid]);
died[playerid] = 1;
}

OnPlayerSpawn(playerid);
{
if(died[playerid] == 1)
{
SetPlayerPos(playerid, deathx[playerid], deathy[playerid], deathz[playerid]);
}
}
Remember to set "died[MAX_PLAYERS]" to 0 when the player disconnects.
Reply
#3

Thnks, 1 rep for ya
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)