OnPlayerDeath
#2

pawn Код:
new Died[MAX_PLAYERS];

enum pInfo
{
    Float:pX,
    Float:pY,
    Float:pZ
}
new DeathPosition[MAX_PLAYERS][pInfo];

public OnPlayerDeath(playerid, killerid, reason)
{
    new Float:X, Float:Y, Float:Z;
    GetPlayerPos(playerid, X, Y, Z);
    DeathPosition[playerid][pX] = X;
    DeathPosition[playerid][pY] = Y;
    DeathPosition[playerid][pZ] = Z;
    Died[playerid] = 1;
    return 1;
}

public OnPlayerSpawn(playerid)
{
    if(Died[playerid] == 1)
    {
        SetPlayerPos(playerid, DeathPosition[playerid][pX], DeathPosition[playerid][pY], DeathPosition[playerid][pZ]);
    }
    return 1;
}
Reply


Messages In This Thread
OnPlayerDeath - by PaulDinam - 06.01.2015, 18:37
Re: OnPlayerDeath - by HY - 06.01.2015, 18:45
Re: OnPlayerDeath - by Sid_Alexander - 06.01.2015, 18:48
Re: OnPlayerDeath - by PaulDinam - 06.01.2015, 18:51
Re: OnPlayerDeath - by Sid_Alexander - 06.01.2015, 18:53
Re: OnPlayerDeath - by HY - 06.01.2015, 18:54

Forum Jump:


Users browsing this thread: 2 Guest(s)