When players die in a event, they get sent to the hospital?
#6

Make sure you add that code before you reset the variable "IsAtEvent".

pawn Код:
public OnPlayerDeath(playerid, killerid, reason)
{
//   printf("OnPlayerDeath: playerid: %d, killerid: %d, reason: %s", playerid, killerid, reason); //debug
    ClearGuns(playerid);
    SetPlayerColor(playerid, TCOLOR_HOSPITAL);
    SetPlayerVirtualWorld(playerid, 0);
    PlayerInfo[playerid][pOnDuty] = 0;
    PlayerInfo[playerid][pBombs] = 0;
    PlayerInfo[playerid][pScope] = 0;
    PlayerInfo[playerid][pLocal] = 999;
    PlayerInfo[playerid][pVirtualWorld] = 0;
    PlayerInfo[killerid][pKills] += 1;
    CapturingTimer[playerid] = 0;
    STDPlayer[playerid] = 0;
    new name[MAX_PLAYER_NAME];
    new killa[MAX_PLAYER_NAME];
    new string[128];
    new caller = Mobile[playerid];
    GetPlayerName(playerid, name, sizeof(name));
    GetPlayerName(killerid, killa, sizeof(killa));
   
    if(IsAtEvent[playerid])
    {
        IsAtEvent[playerid] = 0;
        SetPlayerInterior(playerid,0);
        SetPlayerVirtualWorld(playerid, 0);
        SetPlayerPos(playerid,982.1890,-1624.2583,14.9526);
        SetPlayerFacingAngle(playerid, 90);
        SetCameraBehindPlayer(playerid);
    }
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)