Can someone know how to not automatic death?
#2

If I managed to understand your extremely broken english properly, I guess you're talking about a some kind of "death mode" ?

If so, you need to trigger a variable as true once a player dies and sets its position to where he died. Quite simple. Here's a demonstration:

pawn Код:
new bool:DID_IJUSTDIE[MAX_PLAYERS];
new Float:MYCOOL_COORDS[MAX_PLAYERS][4];

public OnPlayerSpawn(playerid)
{
    if(DID_IJUSTDIE[playerid])
        SetPlayerPos(playerid, MYCOOL_COORDS[playerid][0], MYCOOL_COORDS[playerid][1], MYCOOL_COORDS[playerid][2]),
        SetPlayerFacingAngle(playerid, MYCOOL_COORDS[playerid][3]),
        TogglePlayerControllable(playerid, false),
        DID_IJUSTDIE[playerid] = false;    
    return 1;
}

public OnPlayerDeath(playerid)
{
    DID_IJUSTDIE[playerid] = true;
   
    GetPlayerPos(playerid, MYCOOL_COORDS[playerid][0], MYCOOL_COORDS[playerid][1], MYCOOL_COORDS[playerid][2]);
    GetPlayerFacingAngle(playerid, MYCOOL_COORDS[playerid][3]);
    return 1;
}
Reply


Messages In This Thread
Can someone know how to not automatic death? - by Jardzskiiz - 30.05.2013, 05:35
Re: Can someone know how to not automatic death? - by GiamPy. - 30.05.2013, 11:06
Re: Can someone know how to not automatic death? - by Jardzskiiz - 30.05.2013, 11:21
Re: Can someone know how to not automatic death? - by GiamPy. - 30.05.2013, 11:23
Re: Can someone know how to not automatic death? - by Jardzskiiz - 30.05.2013, 11:32
Re: Can someone know how to not automatic death? - by GiamPy. - 30.05.2013, 11:35
Re: Can someone know how to not automatic death? - by Jardzskiiz - 30.05.2013, 11:39

Forum Jump:


Users browsing this thread: 2 Guest(s)