Question

Здравствуйте, не спавнит с мобайла а с пк спавнит прощу помочь.

 

OnPlayerConnect

public OnPlayerConnect ( playerid )
{
    #if defined debug_mode
        printf ( "[DEBUG] [OnPlayerConnect] playerid:%d", playerid ) ;
    #endif

    online_server++;
    if(online_server > ronline_server) ronline_server = online_server;

    /*
        В цикле присвамваем значение -1 каждой ячейке массива, которая отвечает за
        время последнего срабатывания каждого кода анти-чита на игрока
    */
    for(new i = 0; i < AC_MAX_CODES; i++)
        pAntiCheatLastCodeTriggerTime[playerid][i] = -1;

    pAntiCheatSettingsPage{playerid} = 0// Присваиваем значение 0 переменной, хранящей номер страницы настроек анти-чита, на которой находится игрок
    pAntiCheatSettingsEditCodeId[playerid] = -1// Присваиваем переменной, хранящей идентификатор (ID) кода анти-чита, который редактирует игрок, занчение -1

    //==============================================================================
    GetPlayerName ( playerid, p_info [ playerid ] [ name ] , MAX_PLAYER_NAME ) ;
    GetPlayerIp ( playerid, p_t_info [ playerid ] [ p_ip ] ,  16 ) ;

    clear_player_data ( playerid ) ;
    SetPlayerColor ( playerid, 0xFFFFFF80 ) ; // col_middle_white
    TogglePlayerSpectating ( playerid, true ) ;
    p_t_info [ playerid ] [ p_tp_immune_time ] = 6 ;

     #if defined __anti_godmode
    antigm_OnPlayerConnect(playerid);
    #endif

    /*for ( new j = 0 ; j < 9 ; j ++ )
    {
        TextDrawShowForPlayer ( playerid, td_logo [ j ] ) ;
    }*/
    //==============================================================================
    for ( new i = 0; i < 20; i ++ ) SendClientMessage ( playerid, -1" " ) ;
  
    new tquery_string[85];
    format(tquery_string, sizeof(tquery_string), "SELECT `u_id` FROM `users` WHERE `u_name`='%s' LIMIT 1", p_info[playerid][name]);
    mysql_tquery(sql_connection, tquery_string, "check_player_registered""i", playerid);
  
    return 1;
}

npl

OnPlayerSpawn

public OnPlayerSpawn ( playerid )
{
    #if defined __anti_godmode
    antigm_OnPlayerSpawn(playerid);
    #endif

    new online_info[144];
    format(online_info, sizeof(online_info), ""c_server"[INFO]"c_grey" Текущий онлайн %d игрок(ов). Рекорд сегодня %d игрок(ов).", online_server, ronline_server);
    SendClientMessage(playerid, COLOR_WHITE, online_info);

    if ( vk_checking { playerid } == 1 )
    {
        show_dialog ( playerid, d_vk_entrance, DIALOG_STYLE_INPUT, ""c_server"Код безопасности"""c_white"Введите код безопасности, который был отправлен Вам Вконтакте:""Войти""Отмена" ) ;
    }
    else if ( google_checking { playerid } == 1 )
    {
        show_dialog ( playerid, d_googleauth_entrance, DIALOG_STYLE_INPUT, ""c_server"Google Auth"""c_white"Введите код из приложения:""Вход""Выйти" );
    }
    #if defined debug_mode
        printf ( "[DEBUG] [OnPlayerSpawn] playerid:%d", playerid ) ;
    #endif
    set_health ( playerid, 100 ) ;
    SetPlayerScore ( playerid, p_info [ playerid ] [ level ] ) ;
    SetPlayerSkills ( playerid ) ;
    p_t_info [ playerid ] [ p_tp_immune_time ] = 4 ;
    p_t_info [ playerid ] [ p_gun_immune_time ] = 8 ;

    if ( ! p_t_info [ playerid ] [ p_logged ] )
    {
        TogglePlayerSpectating ( playerid, false ) ;
        TogglePlayerControllable ( playerid, true ) ;
        set_world ( playerid, playerid ) ;
        SetPlayerPos ( playerid, 203.8164, -128.20531003.5259 ) ;
        set_interior ( playerid, 0 ) ;
        SetPlayerFacingAngle ( playerid, 143.130 ) ;
        TogglePlayerControllable ( playerid, 0 ) ;
        SetPlayerSkin ( playerid, registration_skins [ reg_info [ playerid ] [ reg_national ] - 1 ] [ reg_info [ playerid ] [ reg_gender ] - 1 ] [ 0 ] ) ;

        SetPlayerCameraPos ( playerid, 201.5432,-131.7309,1004.5259 ) ;
        //SetPlayerCameraLookAt ( playerid, 203.8164,-128.2053,1003.5259 ) ;

        SelectTextDraw ( playerid, 0xB0C4DEFF ) ;
        for ( new i = 0; i <= 12 ; i ++ )
        {
            TextDrawShowForPlayer ( playerid, td_regskins [ i ] ) ;
        }
        return 1;
    }
    if ( anim_loaded { playerid } == 0 )
    {
           PreloadAnimLib ( playerid,"BASEBALL" ) ;
           PreloadAnimLib ( playerid,"RAPPING" ) ;
        PreloadAnimLib ( playerid,"SHOP" ) ;
           PreloadAnimLib ( playerid,"BEACH" ) ;
           PreloadAnimLib ( playerid,"SMOKING" ) ;
        PreloadAnimLib ( playerid,"FOOD" ) ;
        PreloadAnimLib ( playerid,"ON_LOOKERS" ) ;
        PreloadAnimLib ( playerid,"DEALER" ) ;
        PreloadAnimLib ( playerid,"CRACK" ) ;
        PreloadAnimLib ( playerid,"CARRY" ) ;
        PreloadAnimLib ( playerid,"COP_AMBIENT" ) ;
        PreloadAnimLib ( playerid,"PARK" ) ;
        PreloadAnimLib ( playerid,"INT_HOUSE" ) ;
        PreloadAnimLib ( playerid,"BAR" ) ;
        PreloadAnimLib ( playerid,"GHANDS" ) ;
        PreloadAnimLib ( playerid,"BOMBER" ) ;
        PreloadAnimLib ( playerid,"DANCING" ) ;
        PreloadAnimLib ( playerid,"MISC" ) ;
        PreloadAnimLib ( playerid,"ped" ) ;
        PreloadAnimLib ( playerid,"DEALER" ) ;
        PreloadAnimLib ( playerid,"BENCHPRESS" ) ;
        PreloadAnimLib ( playerid,"GANGS" ) ;
        PreloadAnimLib ( playerid,"INT_OFFICE" ) ;
        PreloadAnimLib ( playerid,"RYDER" ) ;
        PreloadAnimLib ( playerid,"PED" ) ;
        PreloadAnimLib ( playerid,"CAR_CHAT" ) ;
        anim_loaded { playerid } = 1 ;
    }
    if ( p_info [ playerid ] [ fight_style ] ) SetPlayerFightingStyle ( playerid, p_info [ playerid ] [ fight_style ] ) ;
    else SetPlayerFightingStyle ( playerid, 0 ) ;

    ResetPlayerMoney ( playerid ) ;
    GivePlayerMoney ( playerid, p_info [ playerid ] [ money ] ) ;

    SetPlayerSkin ( playerid, p_info [ playerid ] [ skin ] ) ;

    if ( GetPVarInt ( playerid, "have_box" ) ) DeletePVar ( playerid, "have_box" ) ;
    if ( GetPVarInt ( playerid, "have_factory_box" ) ) DeletePVar ( playerid, "have_factory_box" ) ;
    if ( GetPVarInt ( playerid, "exam_vehicle" ) != 0 ) DestroyVehicle ( GetPVarInt ( playerid, "exam_vehicle" ) ), DeletePVar ( playerid, "exam_vehicle" ) ;
    if ( action_type { playerid } != 0 )
    {
        action_td_status ( playerid, false ) ;
    }

    if ( p_info [ playerid ] [ salary ] != 0 )
    {
        new _t_string [ 62 ] ;
        format ( _t_string, sizeof ( _t_string ), "Вы получили за работу компенсацию в размере %d$.", p_info [ playerid ] [ salary ] ) ;
        SendClientMessage ( playerid, 0xCCCCCCFF, _t_string ) ;
        give_money ( playerid, p_info [ playerid ] [ salary ] ) ;
        insert_money_log ( playerid, INVALID_PLAYER_ID, p_info [ playerid ] [ salary ], "компенсация ЗП" ) ;
        p_info [ playerid ] [ salary ] = 0 ;
    }

    if ( TeamPaint [ playerid ] > 0 )
    {
        switch ( StartPaintBall )
        {
            case 0:
            {
                TeamPaint[ playerid ] =
                KillPaint[ playerid ] =
                DeathPaint[ playerid ] = 0;
                TextDrawHideForPlayer ( playerid, PaintTextDraws ) ;
                PlayerTextDrawDestroy ( playerid, PaintStats [ playerid ] ) ;
                PaintStats [ playerid ] = PlayerText:-1 ;
            }
            case 2:
            {
                SetPlayerHealth(playerid, 100.0);
                SetPlayerSkinEx(playerid, SkinPaint [ p_info [ playerid ] [ gender ] ] [ TeamPaint [ playerid ] - 1 ] ) ;

                give_weapon ( playerid, 242000 ) ;
                give_weapon ( playerid, 252000 ) ;
                give_weapon ( playerid, 312000 ) ;

                new spawn = random(10);
                switch(TeamPaint[ playerid ])
                {
                    case 1:
                    {
                        set_pos ( playerid, SpawnBlueTeam[PaintBallMap-1][spawn][0], SpawnBlueTeam[PaintBallMap-1][spawn][1], SpawnBlueTeam[PaintBallMap-1][spawn][2], SpawnBlueTeam[PaintBallMap-1][spawn][3], 045 ) ;
                        SetPlayerColor ( playerid, 0x33AAFFFF ) ;
                    }
                    case 2:
                    {
                        set_pos ( playerid, SpawnRedTeam[PaintBallMap-1][spawn][0], SpawnRedTeam[PaintBallMap-1][spawn][1], SpawnRedTeam[PaintBallMap-1][spawn][2], SpawnRedTeam[PaintBallMap-1][spawn][3], 045 ) ;
                        SetPlayerColor ( playerid, 0xAA3333FF ) ;
                    }
                }
                return 1;
            }
        }
    }


    if ( p_info [ playerid ] [ admin ] != 0 && GetPVarInt ( playerid, "spectate_status" ) > 0 )
    {
        DeletePVar ( playerid, "spectate_status" ) ;
        set_pos ( playerid, p_t_info [ playerid ][ p_pos ] [ 0 ], p_t_info [ playerid ][ p_pos ] [ 1 ], p_t_info [ playerid ][ p_pos ] [ 2 ], p_t_info [ playerid ][ p_pos ] [ 3 ], p_t_info [ playerid ][ p_data ] [ 0 ], p_t_info [ playerid ][ p_data ] [ 1 ] ) ;
        CancelSelectTextDraw ( playerid ) ;
        ResetPlayerWeapons ( playerid ) ;
        is_control_chat{playerid} = in_recon_chat{playerid};
        for ( new j = 0 ; j < 7 ; j ++ )
        {
            TextDrawHideForPlayer ( playerid, sp_td [ j ] ) ;
            if ( j < 3 )
            {
                if ( sp_ptd [ playerid ] [ j ] != PlayerText:-1 ) PlayerTextDrawDestroy ( playerid, sp_ptd [ playerid ] [ j ] ) ;
                sp_ptd [ playerid ] [ j ] = PlayerText:-1;
            }
        }



        for ( new i = 0; i < 12; i ++ )
        {
            GivePlayerWeapon ( playerid, p_t_info [ playerid ] [ p_gun_slot ] [ i ], p_t_info [ playerid ] [ p_gun_ammo ] [ i ] ) ;
        }
        return 1 ;
    }
    reset_player_weapon ( playerid ) ;

    if ( gang_player ( playerid ) || mafia_player ( playerid ) || radio_player ( playerid ) )is_fraction_duty { playerid } = 1 ;
    else is_fraction_duty { playerid } = 0, SetPlayerColor ( playerid, 0xFFFFFF80 ) ; // col_white
    if ( gang_player ( playerid ) ) give_weapon ( playerid, 51 ) ;
    if ( p_info [ playerid ] [ jailed ] > 0 )
    {
        if ( 4 > p_info [ playerid ] [ jail ] > 0 )
        {
            new random_jail_pos = random ( 2 ) ;
            set_pos ( playerid, jail_spawn [ random_jail_pos ] [ 0 ],
                                jail_spawn [ random_jail_pos ] [ 1 ],
                                jail_spawn [ random_jail_pos ] [ 2 ],
                                jail_spawn [ random_jail_pos ] [ 3 ],
                                1, p_info [ playerid ] [ jail ] ) ;
            if ( is_fraction_duty { playerid } == 1 )SetPlayerSkin ( playerid, p_info [ playerid ] [ org_skin ] ), SetPlayerColor ( playerid, f_info [ p_info [ playerid ] [ member ] - 1 ] [ f_radar_color ] ) ;
            else SetPlayerSkin ( playerid, p_info [ playerid ] [ skin ] ) ;
            return 1 ;
        }
        else if ( p_info [ playerid ] [ jail ] == 10 )
        {
            set_pos(playerid, 217.99723082.9668658.7508268.2277215);

            if ( is_fraction_duty { playerid } == 1 )SetPlayerSkin ( playerid, p_info [ playerid ] [ org_skin ] ), SetPlayerColor ( playerid, f_info [ p_info [ playerid ] [ member ] - 1 ] [ f_radar_color ] ) ;
            else SetPlayerSkin ( playerid, p_info [ playerid ] [ skin ] ) ;
            return 1 ;
        }
    }
    if ( GetPVarInt ( playerid, "p_dead") == 5 ) DeletePVar ( playerid, "p_dead" ) ;
    if ( GetPVarInt ( playerid, "p_dead") >= 1 )
    {
        if ( GetPVarInt ( playerid, "p_dead") > 5 )
        {

            switch ( GetPVarInt ( playerid, "p_dead" ) )
            {
                case 593:set_pos ( playerid, 739.3827, -1414.35881500.9509176.800413 ) ;
                case 473:set_pos ( playerid, 739.3827, -1414.35881500.9509176.800412 ) ;
                case 587:set_pos ( playerid, 739.3827, -1414.35881500.9509176.800411 ) ;
                case 322:
                {
                    set_pos ( playerid, 2460.2515, -2120.606913.5530354.701400 ) ;
                    SetPVarInt ( playerid, "tp_area_used"1 ) ;
                    reset_player_weapon ( playerid ) ;
                    for ( new i = 0 ; i < 12 ; i ++ )
                    {
                        give_weapon ( playerid, duel_guns [ playerid ] [ i ] [ 0 ], duel_guns [ playerid ] [ i ] [ 1 ] ) ;
                    }
                    if ( is_fraction_duty { playerid } == 1 )SetPlayerSkin ( playerid, p_info [ playerid ] [ org_skin ] ), SetPlayerColor ( playerid, f_info [ p_info [ playerid ] [ member ] - 1 ] [ f_radar_color ] ) ;
                    else SetPlayerSkin ( playerid, p_info [ playerid ] [ skin ] ) ;

                }
            }

            DeletePVar ( playerid, "p_dead" ) ;
            return 1 ;
        }
        else if ( GetPVarInt ( playerid, "p_dead") == 4 )
        {
            set_pos ( playerid, 1868.86611348.53062211.609486.088011 ) ;
            set_health ( playerid, 35.0 ) ;
            SendClientMessage ( playerid, col_gray, ""c_orange_red"* "c_grey"Вы попали в военный госпиталь, ожидайте полного восстановления здоровья, чтобы его покинуть." ) ;
            return 1 ;
        }
        new random_h_pos = random ( 2 ) ;
        set_pos ( playerid, hospital_spawn [ random_h_pos ] [ 0 ],
                            hospital_spawn [ random_h_pos ] [ 1 ],
                            hospital_spawn [ random_h_pos ] [ 2 ],
                            hospital_spawn [ random_h_pos ] [ 3 ],
                            0, p_info [ playerid ] [ hospital ] ) ;

        set_health ( playerid, 15.0 ) ;

        if ( is_fraction_duty { playerid } == 1 )SetPlayerSkin ( playerid, p_info [ playerid ] [ org_skin ] ), SetPlayerColor ( playerid, f_info [ p_info [ playerid ] [ member ] - 1 ] [ f_radar_color ] ) ;
        else SetPlayerSkin ( playerid, p_info [ playerid ] [ skin ] ) ;

        SendClientMessage ( playerid, col_gray, ""c_orange_red"* "c_grey"Вам придется пройти курс лечения или вылечиться у медика. Займите койку в палате для более эффективного лечения.");
        return 1 ;
    }
    if ( GetPVarInt ( playerid, "police_camid" ) ||  GetPVarInt ( playerid, "stop_comp" ) )
    {
        if ( is_fraction_duty { playerid } == 1 )SetPlayerSkin ( playerid, p_info [ playerid ] [ org_skin ] ), SetPlayerColor ( playerid, f_info [ p_info [ playerid ] [ member ] - 1 ] [ f_radar_color ] ) ;
        else SetPlayerSkin ( playerid, p_info [ playerid ] [ skin ] ) ;

        SetCameraBehindPlayer ( playerid ) ;
        set_pos ( playerid, last_coord [ playerid ] [ 0 ], last_coord [ playerid ] [ 1 ], last_coord [ playerid ] [ 2 ], last_coord [ playerid ] [ 3 ], GetPVarInt ( playerid, "last_interior" ), GetPVarInt ( playerid, "last_virtualworld" ) ) ;
        DeletePVar ( playerid, "police_camid" ) ;
        DeletePVar ( playerid, "stop_comp" ) ;
        DeletePVar ( playerid, "last_virtualworld" ) ;
        DeletePVar ( playerid, "last_interior" ) ;
        return 1 ;
    }
    if(p_info[playerid][house] != -1 && p_info[playerid][spawnchange] == 1)
    {
        new h = p_info[playerid][house] - 1;
        new hint = h_info[h][h_int] - 1;

        if(is_fraction_duty{playerid} == 1)
        {
            SetPlayerSkin(playerid, p_info[playerid][org_skin]);
            SetPlayerColor(playerid, f_info[p_info[playerid][member] - 1][f_radar_color]);
        }
        else SetPlayerSkin(playerid, p_info[playerid][skin]);

        set_pos(playerid, house_int[hint][hspawn_position][0], house_int[hint][hspawn_position][1], house_int[hint][hspawn_position][2], house_int[hint][hspawn_position][3], house_int[hint][hint_int], h_info[h][h_id]);
        return SetPVarInt(playerid, !"house_id", p_info[playerid][house]);
    }

    if((p_info[playerid][member] || p_info[playerid][leader]) && p_info[playerid][spawnchange] == 2)
    {
        set_pos(playerid, f_info[p_info[playerid][member] - 1][f_spawn][0], f_info[p_info[playerid][member] - 1][f_spawn][1], f_info[p_info[playerid][member] - 1][f_spawn][2], f_info[p_info[playerid][member] - 1][f_spawn][3], f_info[p_info[playerid][member] - 1][f_spawn_int], f_info[p_info[playerid][member] - 1][f_spawn_virt]);

        if(is_fraction_duty{playerid} == 1)
        {
            SetPlayerSkin(playerid, p_info[playerid][org_skin]);
            SetPlayerColor(playerid, f_info[p_info[playerid][member] - 1][f_radar_color]);
        }
        else SetPlayerSkin(playerid, p_info[playerid][skin]);
        return 1;
    }

    new yacht_id = 0;
    foreach(new veh_id: player_vehicles[playerid])
    {
        if(!v_boat_int(veh_id)) continue;
        yacht_id = veh_id;
        break;
    }

    if(yacht_id && p_info[playerid][spawnchange] == 3)
    {
        is_player_in_boat[playerid] = yacht_id;

        if(is_fraction_duty{playerid} == 1)
        {
            SetPlayerSkin(playerid, p_info[playerid][org_skin]);
            SetPlayerColor(playerid, f_info[p_info[playerid][member] - 1][f_radar_color]);
        }
        else SetPlayerSkin(playerid, p_info[playerid][skin]);

        set_pos(playerid, 1390.1287, -24.99631001.0063182.79415, yacht_id);
        return 1;
    }

    if(p_info[playerid][rent_house] != -1 && p_info[playerid][spawnchange] == 4)
    {
        new h = p_info[playerid][rent_house] - 1;
        new hint = h_info[h][h_int] - 1;

        if(is_fraction_duty{playerid} == 1)
        {
            SetPlayerSkin(playerid, p_info[playerid][org_skin]);
            SetPlayerColor(playerid, f_info[p_info[playerid][member] - 1][f_radar_color]);
        }
        else SetPlayerSkin(playerid, p_info[playerid][skin]);

        set_pos(playerid, house_int[hint][hspawn_position][0], house_int[hint][hspawn_position][1], house_int[hint][hspawn_position][2], house_int[hint][hspawn_position][3], house_int[hint][hint_int], h_info[h][h_id]);
        return SetPVarInt(playerid, "house_id", p_info[playerid][rent_house]);
    }

    if(p_info[playerid][family])
    {
        if(family_info[p_info[playerid][family] - 1][fam_house] != 0 && p_info[playerid][spawnchange] == 5)
        {
            new fi = family_info[p_info[playerid][family] - 1][fam_house] - 1;
            new fint = fi_info[fi][fi_int] - 1;

            if(is_fraction_duty{playerid} == 1)
            {
                SetPlayerSkin(playerid, p_info[playerid][org_skin]);
                SetPlayerColor(playerid, f_info[p_info[playerid][member] - 1][f_radar_color]);
            }
            else SetPlayerSkin(playerid, p_info[playerid][skin]);

            set_pos(playerid, family_int[fint][fspawn_position][0], family_int[fint][fspawn_position][1], family_int[fint][fspawn_position][2], family_int[fint][fspawn_position][3], family_int[fint][fint_int], fi_info[fi][fi_id]);
            return SetPVarInt(playerid, !"island_id", fi + 1);
        }
    }


    if(p_info[playerid][level] < 4)
    {
        new i = random(3), j = random(3);
        if(i == 2)
            set_pos(playerid, newbie_spawn_pos[i][j][0], newbie_spawn_pos[i][j][1], newbie_spawn_pos[i][j][2], newbie_spawn_pos[i][j][3], 01);
        else
            set_pos(playerid, newbie_spawn_pos[i][j][0], newbie_spawn_pos[i][j][1], newbie_spawn_pos[i][j][2], newbie_spawn_pos[i][j][3], 00);

        if(GetPVarInt(playerid, !"faggio_info") == 1)
        {
            SetPlayerRaceCheckpoint(playerid, 1, faggio_spawn[i][0], faggio_spawn[i][1], faggio_spawn[i][2], 0.00.00.02.0);
            SendClientMessage(playerid, col_white, !""scm_info"Метка успешно установлена.");
            is_gps_used{playerid} = 1;
            DeletePVar(playerid, !"faggio_info");
        }
        return 1;
    }

    else if(p_info[playerid][level] < 9)
    {
        set_pos(playerid, 1862.27252251.551015.2740270.000);
        return 1;
    }
    else
    {
        set_pos(playerid, 2724.8281 + random(3), -2446.4385 + random(3), 21.8921269.026800);
        return 1;
    }
}

 

OnPlayerRequestClass

public OnPlayerRequestClass(playerid, classid)
{
    #if defined debug_mode
        printf("[DEBUG][OnPlayerRequestClass]playerid:%d", playerid);
    #endif

    if(p_t_info[playerid][p_logged] == falsereturn false;
    p_t_info[playerid][p_gun_immune_time] = 8;
    set_health(playerid, 100);
    SetSpawnInfo(playerid, 000000000000);
    SpawnPlayer(playerid);
    return 1;
}

 

Share this post


Link to post

0 answers to this question

There have been no answers to this question yet

Guest
This topic is now closed to further replies.
Sign in to follow this  
Followers 0