Fallo al morir
#1

Cuando muero mi personaje sale volando al morir.



Esto tengo en SetPlayerSpawn(playerid)

pawn Код:
if(IsPlayerConnected(playerid))
    {
        new Float:PosHeridoX, Float:PosHeridoY, Float:PosHeridoZ;
        GetPlayerPos(playerid, PosHeridoX, PosHeridoY, PosHeridoZ);
        SetPlayerSkin(playerid, PlayerInfo[playerid][pSkin]);
        SetPlayerHealth(playerid, PlayerInfo[playerid][pVidaGuardada]);
        SetPlayerArmour(playerid, PlayerInfo[playerid][pChalecoGuardado]);
        if(PosHeridoX == 50.0000 && PosHeridoY == 50.0000 && PosHeridoZ == 70.0000)
        {
            SetPlayerInterior(playerid,0);
            SetPlayerPos(playerid, 1172.7278,-1327.6288,15.4015);
            SetPlayerFacingAngle(playerid, 359.4621);
            SetCameraBehindPlayer(playerid);
        }
        if(PosHeridoX == 0.0 && PosHeridoY == 0.0 && PosHeridoZ == 0.0)
        {
            SetPlayerInterior(playerid,0);
            SetPlayerPos(playerid, 1172.7278,-1327.6288,15.4015);
            SetPlayerFacingAngle(playerid, 359.4621);
            SetCameraBehindPlayer(playerid);
        }
        if(EstadoMuerto[playerid] == 1)
        {
            SetPlayerPos(playerid,1172.7278,-1327.6288,15.4015);
            SetPlayerInteriorEx(playerid,0);
            SendClientMessage(playerid,-1,"Fuiste enviado al hospital");
            EstadoMuerto[playerid] = 0;
        }
        if(PlayerInfo[playerid][pRegistrado] == 0)
        {
            TogglePlayerControllable(playerid, 0);
        }
        if(PlayerCuffed[playerid] == 1)
        {
            //PlayerInfo[playerid][pHospital] = 0;
            PlayerInfo[playerid][pEncarcelado] = 1;
            PlayerInfo[playerid][pTiempoCarcel] = 600;
            PlayerCuffed[playerid] = 0;
        }
        if(EnExamenDeConducir[playerid] == 1)
        {
            new tmpcar = GetPlayerVehicleID(playerid);
            SendClientMessage(playerid,COLOR_WHITE,"[!] Has muerto, con lo cual no has pasado las pruebas");
            EnExamenDeConducir[playerid] = 0;
            EnCheckPointExamenConducir[playerid] = 0;
            DisablePlayerCheckpoint(playerid);
            SetVehicleToRespawn(tmpcar);
        }
        if(AdminDuty[playerid])
        {
            SetPlayerColor(playerid,COLOR_ADMINDUTY);
            SetPlayerHealth(playerid,999);
            SetPlayerArmour(playerid,999);
        }
        if(PlayerInfo[playerid][pEncarcelado] > 0)
        {
            if(PlayerInfo[playerid][pEncarcelado] == 1)
            {
                SetPlayerVirtualWorld(playerid,2);
                SetPlayerInterior(playerid,6);
                SetPlayerPos(playerid,264.5743,77.5118,1001.0391);
                SendClientMessage(playerid, COLOR_WHITE, "[!] No estas listo para la libertad condicional, vuelve a la cбrcel.");
                return 1;
            }
            else if(PlayerInfo[playerid][pEncarcelado] == 2)
            {
                SetPlayerVirtualWorld(playerid,0);
                SetPlayerInterior(playerid,0);
                SetPlayerPos(playerid,3312.4163,-1935.4459,10.9682);
                SendClientMessage(playerid, COLOR_WHITE, "[!] No estas listo para la libertad condicional, vuelve a la cбrcel.");
                return 1;
            }
        }
    }
    /*SetPlayerPos(playerid,PlayerInfo[playerid][pLoadPosX], PlayerInfo[playerid][pLoadPosY], PlayerInfo[playerid][pLoadPosZ]);
    SetPlayerInterior(playerid,PlayerInfo[playerid][pLoadPosInt]);
    SetPlayerVirtualWorld(playerid,PlayerInfo[playerid][pLoadPosW]);
    PlayerInfo[playerid][pLoadPos] = 0;*/

    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)