OnPlayerDeath
#1

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
    if(PlayerUsingLoopingAnim[playerid])
    {
        PlayerUsingLoopingAnim[playerid] = 0;
    }
    PlayerInfo[playerid][pDeath] = 1;
    return 1;
}
pawn Код:
public OnPlayerSpawn(playerid)
{
    if(PlayerInfo[playerid][pDeath] == 1)
    {
        new time = (1 + random(4)), string[200];
        new nurse = random(sizeof(NurseNames));
        new bill = time*120;
        SetPlayerCameraPos(playerid, -2660.750244, 580.064697, 29.793859);
        SetPlayerCameraLookAt(playerid, -2660.882568, 584.698120, 27.919254);
        SetTimerEx("OnDeath", 60000, false, "d", playerid);
        SetVirtualWorld(playerid, 50000);
        SendClientMessage(playerid, -1, ""Pink"Hospital"White": San Fierro");
        format(string, sizeof(string), ""Pink"Nurse"White": %s", NurseNames[nurse]);
        SendClientMessage(playerid, -1, string);
        format(string, sizeof(string), ""Pink"Bill"White": $%d", bill);
        SendClientMessage(playerid, -1, string);
        format(string, sizeof(string), ""Pink"Time"White": %d minute(s)", time);
        SendClientMessage(playerid, -1, string);
        PlayerInfo[playerid][pDeath] = time;
        GiveCash(playerid, -bill);
        return 1;
    }
    return 1;
}
When I die, it freezes me and shows me the spawn button like OnPlayerRequestClass? How do I make it so when I finish the dying process it takes me straight to the camera view I have above? ^
Reply


Messages In This Thread
OnPlayerDeath - by AphexCCFC - 03.05.2014, 04:07
Re: OnPlayerDeath - by Dignity - 03.05.2014, 04:12
Re: OnPlayerDeath - by AphexCCFC - 03.05.2014, 04:19
Re: OnPlayerDeath - by Dignity - 03.05.2014, 04:23
Re: OnPlayerDeath - by AphexCCFC - 03.05.2014, 04:33
Re: OnPlayerDeath - by Dignity - 03.05.2014, 04:39
Re: OnPlayerDeath - by AphexCCFC - 03.05.2014, 04:40

Forum Jump:


Users browsing this thread: 1 Guest(s)