Question

Здравствуйте! Спавнит игрока постоянно в вирт мир т.е пропадают текстурки.

Спойлер



public OnPlayerSpawn(playerid)
{
    if(GetPlayerData(playerid, P_DOGHOUSE) != 1)
    {
        SCM(playerid, 0xCECECEFF"Чтобы повторно поставить будку для собаки используйте /doghouse.");
        SCM(playerid, 0xCECECEFF"После вашего перезахода/рестарта сервера она могла пропасть с участка.");
    }
    if(GetPVarInt(playerid,"Metro_start") == 1)
    {
        metro_status = 0;
        metro_user -= 1;
        DeletePVar(playerid, "Metro_work");
        DeletePVar(playerid, "Metro_start");
        DestroyVehicle(metro_train[playerid]);
        DisablePlayerCheckpoint(playerid);
        new fmt_str[130];

        format(fmt_str, sizeof fmt_str, "Рабочий день завершен. Вы заработали %d руб.", metro_zarplata[playerid]);
        SendClientMessage(playerid, 0x3399FFFF, fmt_str);

        GivePlayerMoneyEx(playerid, metro_zarplata[playerid], "Работа метро"truetrue);
        metro_train[playerid] = INVALID_VEHICLE_ID;
        metro_zarplata[playerid] = 0;

    }
    if(GetPVarInt(playerid,"Metro_work") == 1)
    {
        metro_user -= 1;
        DeletePVar(playerid, "Metro_work");
        DisablePlayerRaceCheckpoint(playerid);
        DestroyVehicle(metro_train[playerid]);
        new fmt_str[130];

        format(fmt_str, sizeof fmt_str, "Рабочий день завершен. Вы заработали %d руб.", metro_zarplata[playerid]);
        SendClientMessage(playerid, 0x3399FFFF, fmt_str);
        GivePlayerMoneyEx(playerid, metro_zarplata[playerid], "Работа метро"truetrue);
        metro_train[playerid] = INVALID_VEHICLE_ID;
        metro_zarplata[playerid] = 0;
        SendPacket_1(playerid, s_CefInterface, t_CefUpdate, "closeInterface('Machinist')");
        KillTimer(metro_taimer[playerid][0]);
    }
    if(GetPVarInt(playerid, "ruletkap") == 1)
    {
            SetSVarInt("ruletka"0);
    }
    
    SetPlayerVirtualWorld ( playerid , 0 );
        
    CheckPlayerFlood(playerid, true, MAX_FLOOD_RATE, 500, FLOOD_RATE_KICK);
    
    SetPlayerData(playerid, P_IN_HOUSE,         -1);
    SetPlayerData(playerid, P_IN_BUSINESS,         -1);
    SetPlayerData(playerid, P_IN_HOTEL_FLOOR,     -1);
    SetPlayerData(playerid, P_IN_HOTEL_ROOM,     -1);
    SetPlayerData(playerid, P_IN_ENTRANCE,        -1);
    SetPlayerData(playerid, P_IN_ENTRANCE_FLOOR,-1);
    
    SetPlayerSkillsInit(playerid);
    if(GetPVarInt(playerid, "SpecBool") == 1)
    {
                DeletePVar(playerid, "SpecBool");
                new Float:X = GetPVarFloat(playerid, "SpecX"), Float:Y = GetPVarFloat(playerid, "SpecY"), Float:Z = GetPVarFloat(playerid, "SpecZ"),
                Float:FA = GetPVarFloat(playerid, "SpecFA"), inter = GetPVarInt(playerid, "SpecInt"), world = GetPVarInt(playerid, "SpecWorld");
                DeletePVar(playerid, "SpecX");
                DeletePVar(playerid, "SpecY");
                DeletePVar(playerid, "SpecZ");
                DeletePVar(playerid, "SpecFA");
                DeletePVar(playerid, "SpecInt");
                DeletePVar(playerid, "SpecWorld");
                SetPlayerPos(playerid, X, Y, Z);
                SetPlayerFacingAngle(playerid, FA);
                SetPlayerVirtualWorld(playerid, world);
                SetPlayerInterior(playerid, inter);
                SetPlayerScore(playerid, GetPlayerLevel(playerid));
                SetPlayerSkin(playerid, GetPlayerData(playerid, P_SKIN));
                return true;
    }
    if(GetPVarInt(playerid, "EPLAYER"))
    {
        SetPlayerPosEx(playerid, GetPVarFloat(playerid,"e_X"), GetPVarFloat(playerid,"e_Y"), GetPVarFloat(playerid,"e_Z"), 0.0, GetPVarInt(playerid,"e_Int"), GetPVarInt(playerid,"e_Virt"));

        DeletePVar(playerid,"e_X");
        DeletePVar(playerid,"e_Y");
        DeletePVar(playerid,"e_Z");
        DeletePVar(playerid,"e_Int");
        DeletePVar(playerid,"e_Virt");
        DeletePVar(playerid,"e_HBC");
        DeletePVar(playerid, "e_time");
        DeletePVar(playerid,"EPLAYER");
        return 1;
    }
    
    if(GetPVarInt(playerid, "paintboll") == 1)
    {
        new idlobby = GetPlayerData(playerid,P_PAINT_LOBBY_ID);
        SetPlayerData(playerid, P_HOSPITAL, false);
        SetPlayerHealth(playerid, 100.0);

        if(PaintBallInfo[idlobby][p_gun] == 12)
        {
            GivePlayerWeapon(playerid, 222000);
        }
        if(PaintBallInfo[idlobby][p_gun] == 17)
        {
            GivePlayerWeapon(playerid, 282000);
        }

        if(PaintBallInfo[idlobby][p_gun] == 14)
        {
            GivePlayerWeapon(playerid, 252000);
        }
        if(PaintBallInfo[idlobby][p_gun] == 19)
        {
            GivePlayerWeapon(playerid, 242000);
        }
        if(PaintBallInfo[idlobby][p_gun] == 21)
        {
            GivePlayerWeapon(playerid, 302000);
        }
        if(PaintBallInfo[idlobby][p_gun] == 20)
        {
            GivePlayerWeapon(playerid, 312000);
        }
        if(PaintBallInfo[idlobby][p_gun] == 22)
        {
            GivePlayerWeapon(playerid, 342000);
        }

        new pos_count = setpos_paintball_area_count[PaintBallInfo[idlobby][p_location]]++;

        if(pos_count >= 8)
            setpos_paintball_area_count[PaintBallInfo[idlobby][p_location]] 0;

        new Float: pos_x = setpos_paintball_area[PaintBallInfo[idlobby][p_location]][pos_count][0];
        new Float: pos_y = setpos_paintball_area[PaintBallInfo[idlobby][p_location]][pos_count][1];
        new Float: pos_z = setpos_paintball_area[PaintBallInfo[idlobby][p_location]][pos_count][2];
        new Float: angle = setpos_paintball_area[PaintBallInfo[idlobby][p_location]][pos_count][3];

        SetPlayerPosACS(playerid,pos_x,pos_y,pos_z,angle,idlobby +1 ,0true);
        SetPlayerVirtualWorld(playerid, idlobby + 1);
        SetPlayerInterior(playerid, 0);
        TogglePlayerControllable(playerid, 0);
    }
    
    if(GetPVarInt(playerid,"dmzona") == 1)
    {
                        DelGun(playerid);
                        GivePlayerWeapon(playerid, PaintGun[random(sizeof(PaintGun))], 3000);

                        TI[playerid][tVirtualWorld] = 8;
                        TI[playerid][tInterior] = 0;

                        new rand = random(sizeof(DmArenaSpawns));

                        SetPlayerPosAC(playerid, DmArenaSpawns[rand][0], DmArenaSpawns[rand][1], DmArenaSpawns[rand][2]+1.5,
                            TI[playerid][tVirtualWorld], TI[playerid][tInterior], true);

                        SetPlayerHealth(playerid, 100.0);
                        SetPlayerColor(playerid,0x56FB4EFF);
                        return 1;
    }
    if(GetPVarInt(playerid,"dmzona") == 2)
    {
                        DelGun(playerid);
                        GivePlayerWeapon(playerid, ArenaGun[5], 3000);

                        TI[playerid][tVirtualWorld] = 141;
                        TI[playerid][tInterior] = 0;

                        new rand = random(sizeof(DMPositions));

                        SetPlayerPosAC(playerid, DMPositions[rand][0], DMPositions[rand][1], DMPositions[rand][2]+1.5, TI[playerid][tVirtualWorld],
                            TI[playerid][tInterior], true);

                        SetPlayerHealth(playerid, 100.0);
                        SetPlayerColor(playerid,0x56FB4EFF);
                        return 1;
    }

      if(!IsPlayerLogged(playerid))
    {
        if(GetPlayerData(playerid, P_ACCOUNT_STATE) == ACCOUNT_STATE_REG_SKIN)
        {
            new sex = bool: GetPlayerSex(playerid);

            TogglePlayerControllable(playerid, false);
            SetPlayerSelectSkin(playerid, 0, reg_skin_data[sex][0]);

            SetPlayerPosEx(playerid, 1992.2747,1899.1699,1001.0000,316.45994, _, false);

            SetPlayerCameraPos(playerid, 1993.2646,1900.5430,1001.5000);
            SetPlayerCameraLookAt(playerid, 1992.6815,1898.9471,1001.35002);

            ShowPlayerSelectPanelSkinReg(playerid, SELECT_PANEL_TYPE_REG_SKIN);

            PlayerTextDrawSetString(playerid, price_select_TD[playerid][0], SERVER_NAME_RP);
        }
    }
    else
    {
        SetPlayerInterior(playerid, 0);
        SetPlayerVirtualWorld(playerid, 0);

        SetPlayerSpawnPos(playerid);

        if(GetPlayerData(playerid, P_HOSPITAL)) SetPlayerHealthEx(playerid, 15.0);

        if(!GetPlayerData(playerid, P_ANIMS_INIT))
        {
            PreLoadPlayerAnims(playerid);
            SetPlayerData(playerid, P_ANIMS_INIT, true);
        }

        if(GetPlayerData(playerid, P_MASK) >= 2)
        {
            SetPlayerColorInit(playerid);
            SetPlayerData(playerid, P_MASK, 0);
        }
    }

    return 1;
}


 

 

Edited by keyl

Заметка от keyl , создано

3.2. Код больше 10 строк необходимо брать в теги "Код" и "Спойлер". Как это сделать рассказано в разделе "FAQ".

Устное предупреждение.

Share this post


Link to post

2 answers to this question

  • 0

о, это система зоомагазина на радмире?

 

Share this post


Link to post
  • 0

да

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0