Добро пожаловать на Pro Pawn - Портал о PAWN-скриптинге.

Реклама


**Как получить V.I.P** (Перейти)
Чтобы заказать рекламу на Pro-Pawn.Ru, обращайтесь в Skype.
Баннерная реклама 200руб/мес, Текстовая 100руб/мес.
Показано с 1 по 9 из 9
  1. #1
    Аватар для #Jason
    Пользователь

    Статус
    Оффлайн
    Регистрация
    18.10.2015
    Сообщений
    38
    Репутация:
    0 ±

    Баг с таймером

    не работает таймер посмотрел весь public с таймером ошибок не нашел вообщем помогите))

    в OnGameModeInit
    PHP код:
    SetTimer("ServerTimer",1000,1); 
    PHP код:
    forward ServerTimer();
    public 
    ServerTimer()
    {
        new 
    string[300];
        new 
    hourminutesecond;
        
    gettime(hourminutesecond);
        
    settime();
        
    FixHour(hour);
        
    //
        
    if ((ShiftHour gHour) || (ShiftHour == && gHour == 23))
        {
            
    gHour ShiftHour;
            
    //SetWorldTime(ShiftHour);
            
    PayDay();
        }
        
    SetName();
        
    AntiCheats();
        
    /*for(new i = GetVehiclePoolSize(); i >= 0; i--)
        {
            if(!GetVehicleModel(i)) continue;
            if(car_ex[i] == true) car_ex[i] = false;
            else if(GetVehicleDistanceFromPoint(i,car_coord[i][0],car_coord[i][1],car_coord[i][2]) > 5 && IsVehicleOccupied(i) == -1) SetVehiclePos(i,car_coord[i][0],car_coord[i][1],car_coord[i][2]), SetVehicleZAngle(i,car_coord[i][3]);
        }*/

        
    for(new 0;MAX_BOMBS++)
        {
            
    BombTimer(i);
        }
        
    Reklam ++;
        if(
    Reklam >= 900)
        {
            
    Reklam 0;
            
    SendClientMessageToAll(COLOR_LIGHTBLUE,"_________________________________________________________________");
            
    SendClientMessageToAll(COLOR_WHITE,"Используйте {FF9900}/report{FFFFFF} для связи с администрацией");
            
    SendClientMessageToAll(COLOR_WHITE,"Список свободных/занятых лидерок: {FF9900}/leaders");
            
    SendClientMessageToAll(COLOR_WHITE,"Ваш верный путеводитель по серверу: {FF9900}/mm");
            
    format(string,155,"Сайт нашего сервера: {FF0000}%s",ServerInfo[srSite]);
            
    SendClientMessageToAll(COLOR_WHITE,string);
            
    format(string,155,"Главный Администратор: {FF0000}%s",ServerInfo[srAdmin]);
            
    SendClientMessageToAll(COLOR_WHITE,string);
            
    SendClientMessageToAll(COLOR_LIGHTBLUE,"_________________________________________________________________");
        }
        if(
    SPCarsView 0)
        {
            
    SPCarsView--;
            
    format(string,sizeof(string),"~r~%d",SPCarsView);
            
    GameTextForAll(string6006);
            if(
    SPCarsView == 0)
            {
                for(new 
    0MAX_VEHICLESc++)
                {
                    if(
    IsVehicleOccupied(c) == -1SetVehicleToRespawn(c);
                }
                
    SendClientMessageToAll(COLOR_WHITE,"{ff0000}[Внимание]: {ffffff}Весь трнаспорт сервера был успешно зареспавнен!");
            }
        }
        if(
    WarStart 0WarStart--;
        for(new 
    020i++)
        {
            if(
    mCD[i] > 1)
            {
                 
    mCD[i] --;
                 if(
    mCD[i] == 300SendFamilyMessage(i,COLOR_LIGHTRED"У вас осталось 5 минут на подготовку!");
                else if(
    mCD[i] == 120SendFamilyMessage(i,COLOR_LIGHTGREEN"Пора решать кому будет пренадлежать бизнес. Осталось 2 минуты");
            }
        }
        if(
    war 0war -=1;
        for(new 
    0MAX_ORGS++)
        {
            switch(
    i)
            {
                case 
    F_BALLAS..F_BLOOD:
                {
                    if(
    RecoveryTime[i] > 0)
                    {
                        
    RecoveryTime[i] --;
                        if(
    RecoveryTime[i] == 0)
                        {
                            
    SendTeamMessage(i,COLOR_YELLOW,"Ваша банда восстановила силы и может захватывать зоны");
                        }
                    }
                }
            }
        }
        if(
    hour == && minute == 00 && second == 00)
        {
            
    SendClientMessageToAll(COLOR_LIGHTRED,"Внимание: {FFFFFF}Авто-Рестарт сервера через 5 минут!");
            
    mysql_function_query(connects,"ANALYZE TABLE `accounts`, `bissnes`, `cars`, `house`, `gangzone`",false,"","");
            
    mysql_function_query(connects,"OPTIMIZE TABLE `accounts`, `bissnes`, `cars`, `house`, `gangzone`",false,"","");
            if(
    mysql_errno() == 0printf("[mySQL] Оптимизация БД выполнена успешно!");
            else 
    printf("[mySQL] Оптимизация БД выполнена с ошибками!");

        }
        if(
    hour == && minute == 05 && second == 00)
        {
            foreach(
    i)
            {
                
    SaveAccount(i);
            }
            
    SaveBuyableCars();
            
    SaveHouses();
            
    SaveBizzs();
            
    SetTimer("ServerRestart"15000);
        }
        foreach(
    playerid)
        {
            if(
    IsPlayerConnected(playerid))
            {
                if(
    PlayerInfo[playerid][pCash] > GetPlayerMoney(playerid))// условие: если у игрока денег выданных сервером больше чем игровых.
                
    {
                    
    ResetPlayerMoney(playerid);
                    
    GivePlayerMoney(playeridPlayerInfo[playerid][pCash]);
                }
                else if(
    PlayerInfo[playerid][pCash] < GetPlayerMoney(playerid))// условие: если игровых денег у игрока больше чем выданных сервером.
                
    {
                    
    ResetPlayerMoney(playerid);
                    
    GivePlayerMoney(playeridPlayerInfo[playerid][pCash]);
                }
                for (new 
    0sizeof(NotAFKZone); i++)
                {
                    new 
    Float:NotAFKZone[i][0],Float:NotAFKZone[i][1],Float:NotAFKZone[i][2];
                    if(
    GetPVarInt(playerid"AFK_Time") > 1200 && !PlayerInfo[playerid][pAdmin] && (IsPlayerInRangeOfPoint(playerid,5.0,xyz)))
                    {
                        
    SendClientMessage(playerid,COLOR_LIGHTRED,"[AFK]: Вы были отсоеденены от сервера");
                        
    KickEx(playerid);
                    }
                }
                new 
    string[300];
                
    SetPVarInt(playerid"FullnessTime"GetPVarInt(playerid"FullnessTime") + 1);
                if(
    GetPVarInt(playerid"FullnessTime") == 120)
                {
                    
    SetPVarInt(playerid"FullnessTime"0);
                    
    PlayerInfo[playerid][pFullness]--;
                    if(
    PlayerInfo[playerid][pFullness] < 1)
                    {
                        
    SendClientMessage(playerid,COLOR_GREY,"Вы попали в больницу от нехватки пищи в организме.");
                        
    SetArmour(playerid,0);
                        
    SetHealth(playerid,0);
                        
    PlayerInfo[playerid][pFullness] = 100;
                    }
                    if(
    PlayerInfo[playerid][pFullness] < 20)
                    {
                        if(
    IsPlayerInAnyVehicle(playerid))
                        {
                            
    RemovePlayerFromVehicleAC(playerid);
                        }
                        new 
    Float:Health;
                        
    GetPlayerHealth(playerid,Health);
                        
    SetHealth(playerid,Health-30);
                        
    UseDrugsTime[playerid] += 121;
                        
    ApplyAnimation(playerid"CRACK""crckdeth2"4.1111101);
                        
    DrugsCrack[playerid] = true;
                        
    SetPlayerWeather(playerid, -68);
                        
    SendClientMessage(playerid,COLOR_GREY,"Вам стало плохо от недоедания");
                        
    GameTextForPlayer(playerid,"~w~~n~~n~~n~~n~~n~~n~~n~BAM CTAћO ЈћOXO",3000,3);
                        
    format(string,sizeof(string),"* %s упал на землю.",cPN(playerid));
                        
    ProxDetector(15,playerid,string,COLOR_PURPLE);

                    }
                }
                if(
    GetPVarInt(playerid"AirBreak") > 0SetPVarInt(playerid"AirBreak"GetPVarInt(playerid"AirBreak") - 1);
                if(
    GetPVarInt(playerid"BusTime") > 0)
                {
                    
    SetPVarInt(playerid"BusTime"GetPVarInt(playerid"BusTime") - 1);
                    
    format(string,10,"~r~%i",GetPVarInt(playerid"BusTime"));
                    
    GameTextForPlayer(playeridstring20006);
                    if(
    GetPVarInt(playerid"BusTime") == 0)
                    {
                        
    format(BigSTR1sizeof(BigSTR1), "Рабочий день завершен. Вами заработано: %i $. За ремонт: -%i $"GetPVarInt(playerid"BusMoney"), GetPVarInt(playerid,"BusRepairMoney"));
                        
    SendClientMessage(playeridCOLOR_LIGHTREDBigSTR1);
                        
    SetVehicleToRespawn(GetPVarInt(playerid"rentcar_job"));
                        
    Delete3DTextLabel(JobText3D[GetPlayerVehicleID(playerid)]);
                        
    PlayerInfo[playerid][pCash] += GetPVarInt(playerid,"BusMoney");
                        
    PlayerInfo[playerid][pCash] -= GetPVarInt(playerid,"BusRepairMoney");
                        
    DeletePVar(playerid"BusTime");
                        
    DeletePVar(playerid"TypeBus");
                        
    DeletePVar(playerid"BusStop");
                        
    DeletePVar(playerid"BusMoney");
                        
    DeletePVar(playerid"BusRepairMoney");
                        
    DeletePVar(playerid"rentcar_job");
                        
    pPressed[playerid] = 0;
                    }
                }
                if(
    GetPVarInt(playerid"TimeBus") > 0)
                {
                    
    SetPVarInt(playerid"TimeBus"GetPVarInt(playerid"TimeBus") - 1);
                    
    format(string,32,"~r~%i",GetPVarInt(playerid"TimeBus"));
                    
    GameTextForPlayer(playeridstring20006);
                    if(
    GetPVarInt(playerid"TimeBus") == 0)
                    {
                        
    DeletePVar(playerid"TimeBus");
                        new 
    type GetPVarInt(playerid"TypeBus"), pPressed[playerid];
                        
    SetPVarInt(playerid"BusStop"1);
                        if(
    type == 1SetPlayerRaceCheckpoint(playerid,0,BusCityLS[p][0],BusCityLS[p][1],BusCityLS[p][2],BusCityLS[p][3],BusCityLS[p][4],BusCityLS[p][5],5.0);
                        if(
    type == 2SetPlayerRaceCheckpoint(playerid,0,BusCitySF[p][0],BusCitySF[p][1],BusCitySF[p][2],BusCitySF[p][3],BusCitySF[p][4],BusCitySF[p][5],5.0);
                        if(
    type == 3SetPlayerRaceCheckpoint(playerid,0,BusCityLV[p][0],BusCityLV[p][1],BusCityLV[p][2],BusCityLV[p+1][0],BusCityLV[p+1][1],BusCityLV[p+1][2],5.0);
                        if(
    type == 4SetPlayerRaceCheckpoint(playerid,0,BusSchool[p][0],BusSchool[p][1],BusSchool[p][2],BusSchool[p][3],BusSchool[p][4],BusSchool[p][5],5.0);
                        if(
    type == 5SetPlayerRaceCheckpoint(playerid,0,BusLSLV[p][0],BusLSLV[p][1],BusLSLV[p][2],BusLSLV[p][3],BusLSLV[p][4],BusLSLV[p][5],5.0);
                        if(
    type == 6SetPlayerRaceCheckpoint(playerid,0,BusLSZavodi[p][0],BusLSZavodi[p][1],BusLSZavodi[p][2],BusLSZavodi[p][3],BusLSZavodi[p][4],BusLSZavodi[p][5],5.0);
                    }
                }
                
    //
                
    if(GetPlayerVehicleID(playerid) <= MAX_BUYABLE_CARS)
                {
                      new 
    Float:probeg = (SpeedVehicle(playerid)/7.5)/500;
                      if(
    probeg 0CarsInfo[GetPlayerVehicleID(playerid)][vProbeg] += probeg;
                }
                
    //
                
    if(onBed[playerid] > 0)
                {
                    
    format(stringsizeof(string), "~r~%d",onBed[playerid]);
                    
    GameTextForPlayer(playeridstring10006);
                    
    onBed[playerid] --;
                    if(!
    onBed[playerid])
                    {
                        
    SetPlayerInterior(playerid0);//Замените на свою функцию
                        
    SetPlayerVirtualWorld(playerid0);//Замените на свою функцию
                        
    SendClientMessage(playerid0xBFC0C2FF,"Вас выпустили из госпиталя, берегите здоровие!");//Замените на свою функцию
                        
    SetPlayerPos(playerid,156.2945,1955.5758,19.6265);//Замените на свою функцию
                        
    SetPlayerFacingAngle(playerid90.0);
                        
    SetCameraBehindPlayer(playerid);
                        
    TogglePlayerControllableEx(playeridtrue);//Замените на свою функцию
                        
    SetHealth(playerid,100);
                    }
                }
                if(
    PlayerInfo[playerid][pHeal] > 0)
                {
                    
    PlayerInfo[playerid][pHealTime] ++;
                    if(
    PlayerInfo[playerid][pHealTime] >= 10)
                    {
                        
    PlayerInfo[playerid][pHealTime] = 0;
                        new 
    Float:Health;
                        
    GetPlayerHealth(playerid,Health);
                        if(!
    PlayerLie[playerid])
                        {
                            
    GameTextForPlayer(playerid"+1 HP"01);
                            
    Health += 1.0;
                        }
                        else
                        {
                            
    GameTextForPlayer(playerid"+5 HP"01);
                            
    Health += 5.0;
                        }
                        
    SetHealth(playerid,Health);
                        if(
    Health >= 99.0)
                        {
                            if(
    PlayerLie[playerid])
                            {
                                new 
    bed PlayerBed[playerid];
                                
    ClearAnims(playerid);
                                
    SetPlayerPos(playerid,HealInfo[bed][hCP][0],HealInfo[bed][hCP][1],HealInfo[bed][hCP][2]);
                                
    SetPlayerFacingAngle(playerid,180.0);
                                
    CheckBed(playerid);
                            }
                            
    PlayerInfo[playerid][pHeal] = 0;
                            
    SetHealth(playerid,100);
                            
    SendClientMessage(playerid,COLOR_LIGHTBLUE,"Вы здоровы и можете покинуть больницу");
                        }
                    }
                }
                
    MaskTimer(playerid);
                if(
    PlayerInfo[playerid][pLevel] == && pRegister[playerid] == 1)
                {
                    if(
    GetPlayerVirtualWorld(playerid) != playerid)
                    {
                        
    SpawnPlayer(playerid);
                    }
                }
                if(
    PlayerInfo[playerid][pJail] == && PlayerInfo[playerid][pAdmin] == 0)
                {
                    if(
    GetPlayerVirtualWorld(playerid) != 999+playerid)
                    {
                        
    SpawnPlayer(playerid);
                    }
                }
                
    //==========================================================================
                
    if(GetPlayerSpeed(playerid) > && Cuffed[playerid] == true)
                {
                    if(!
    IsPlayerInAnyVehicle(playerid))
                    {
                         if(
    AntiFlood[playerid] <= 0)
                        {
                            
    SendClientMessage(playeridCOLOR_WHITE"Вы в наручниках Используйте ALT чтобы идти за полицейским.");
                        }
                        
    TogglePlayerControllableEx(playeridfalse);
                        
    ApplyAnimation(playerid"PED""GETUP_FRONT"4.0011001);
                        
    SetTimerEx("UnFreeze"30000"%d"playerid);
                        
    AntiFlood[playerid] = 30;
                    }
                }
                
    //==========================================================================
                
    if(UseDrugsTime[playerid] > 0)
                {
                    
    UseDrugsTime[playerid] --;
                    if(
    UseDrugsTime[playerid] <= 120)
                    {
                        if(
    DrugsCrack[playerid])
                        {
                            
    DrugsCrack[playerid] = false;
                            
    ClearAnimations(playerid);
                        }
                        if(!
    UseDrugsTime[playerid])
                        {
                            
    SetPlayerWeather(playerid,DefaultWeather);
                        }
                    }
                }
                if(
    DrugsCrack[playerid])
                {
                    if(
    IsPlayerInAnyVehicle(playerid)) RemovePlayerFromVehicleAC(playerid);
                    else 
    ApplyAnimation(playerid"CRACK""crckdeth2"4.1011101);
                }
                
    CheatInfo[playerid][acOnPlayerSpawn] = 0;
                
    CheatInfo[playerid][acOnPlayerDeath] = 0;
                
    //==========================================================================
                
    if(FreezeTime[playerid] > 0)
                {
                    
    FreezeTime[playerid] --;
                    if(!
    FreezeTime[playerid])
                    {
                        
    ShowPlayerDialog(playeridD_NULL0"Вы разморожены""Вы разморожены""Ок""");
                        
    TogglePlayerControllableEx(playeridtrue);
                    }
                    else
                    {
                        
    format(string,sizeof(string),"{FFFFFF}Вы были заморожены на 5 секунд.\nДо разморозки: {FF9900}%d{FFFFFF} секунд.",FreezeTime[playerid]);
                        
    ShowPlayerDialog(playerid950"{FF6347}ДМ запрещён"string"Ок""");
                    }
                }
                if(
    NoPlayerDM[playerid])
                {
                    new 
    team pTeam(playerid);
                    if(
    CapturedGZ[team] == -&& CaptureGZ[team] == -1)
                    {
                        if(
    GetPlayerWeapon(playerid) != 43)
                        {
                            
    SetPlayerArmedWeapon(playerid,0);
                        }
                    }
                }
                if(
    DMCount[playerid] > 0)
                {
                    
    DMCount[playerid] --;
                }
                if(
    CreateMats[playerid] == 4)
                {
                    
    ApplyAnimation(playerid,"CARRY","crry_prtial",4.0,1,0,0,1,1,1);
                }
                if(
    CreateMats[playerid] == 3)
                {
                    
    ApplyAnimation(playerid"OTB""BETSLP_LOOP"4.1111101);
                }
                if(
    RepairTimer[playerid] > 0)
                {
                    
    RepairTimer[playerid] --;
                    
    format(string,sizeof(string),"~g~Repair: ~w~%d",RepairTimer[playerid]);
                    
    GameTextForPlayer(playeridstring6006);
                    if (
    RepairTimer[playerid] == 0RepaircarOut(playerid);
                }
                if(
    PlayerInfo[playerid][pContractTime] > 0PlayerInfo[playerid][pContractTime]--;
                new 
    Speedtimer 0;
                
    Speedtimer++;
                if (
    Speedtimer == 45)
                {
                    
    Speedtimer 0;
                    if(
    SpeedKick[playerid] > 0SpeedKick[playerid] -= 2;
                }
                if(
    PlayerOnJob{playerid} && !PlayerStartJob{playerid} && !IsPlayerInAnyVehicle(playerid))
                {
                    if(
    IsPlayerInRangeOfPoint(playerid1, -1854.7035,-1650.9668,25.7248)
                    || 
    IsPlayerInRangeOfPoint(playerid1, -1803.5344,-1655.2640,25.8294)
                    || 
    IsPlayerInRangeOfPoint(playerid1, -1788.5780,-1640.7179,27.0669))
                    {
                        
    SendClientMessage(playerid, -1"Вы начали добывать обычный металл.");
                        
    SetTimerEx("TimerGiveMiner"5000false"i"playerid);
                        
    ApplyAnimation(playerid"SWORD""sword_4"4.010000);
                        
    PlayerStartJob{playerid} = true;
                    }
                    if(
    IsPlayerInRangeOfPoint(playerid1, -1869.1316,-1634.7915,-58.500)
                    || 
    IsPlayerInRangeOfPoint(playerid1, -1868.9603,-1643.6682,-58.046))
                    {
                        
    SendClientMessage(playerid, -1"Вы начали добывать качественный металл.");
                        
    SetTimerEx("TimerGiveMinerEx"5000false"i"playerid);
                        
    ApplyAnimation(playerid"SWORD""sword_4"4.010000);
                        
    PlayerStartJob{playerid} = true;
                    }
                    return 
    true;
                }
                if(
    FindPlayer[playerid] != INVALID_PLAYER_ID)
                {
                    new 
    find FindPlayer[playerid];
                    if(
    IsPlayerInDynamicArea(playeridPlayerFindZone[find]))
                    {
                        new 
    Float:XFloat:YFloat:Z;
                        
    GetPlayerPos(FindPlayer[playerid], XYZ);
                        
    SetPlayerMapIcon(playerid97XYZ560MAPICON_GLOBAL);
                    }
                    else
                    {
                        
    RemovePlayerMapIcon(playerid97);
                    }
                }
                if(
    LieReset[playerid] > 0)
                {
                    
    LieReset[playerid] --;
                }
                if(
    Clother[playerid] != -1)
                {
                    if(
    PlayerInfo[playerid][pChar] != 0)
                    {
                        if(!
    IsPlayerInRangeOfPoint(playerid1.0199.1063, -128.35741003.5152))
                        {
                            
    Clother[playerid] = -1;
                            
    TogglePlayerControllableEx(playeridtrue);
                            if(
    PlayerInfo[playerid][pMember] > 0SetPlayerSkin(playeridPlayerInfo[playerid][pModel]);
                            else 
    SetPlayerSkin(playeridPlayerInfo[playerid][pChar]);
                            
    TogglePlayerDynamicCP(playeridBinko_CPtrue);
                            
    SetCameraBehindPlayer(playerid);
                        }
                    }
                }
                if(
    PlayerStartJob{playerid})
                {
                    if(
    IsPlayerApplyAnimation(playerid"FALL_back")
                    || 
    IsPlayerApplyAnimation(playerid"FALL_collapse")
                    || 
    IsPlayerApplyAnimation(playerid"FALL_fall")
                    || 
    IsPlayerApplyAnimation(playerid"FALL_front")
                    || 
    IsPlayerApplyAnimation(playerid"FALL_glide")
                    || 
    IsPlayerApplyAnimation(playerid"FALL_land")
                    || 
    IsPlayerApplyAnimation(playerid"FALL_skyDive")
                    || 
    IsPlayerApplyAnimation(playerid"JUMP_glide")
                    || 
    IsPlayerApplyAnimation(playerid"JUMP_land")
                    || 
    IsPlayerApplyAnimation(playerid"JUMP_launch")
                    || 
    IsPlayerApplyAnimation(playerid"JUMP_launch_R"))
                    {
                        if(!
    IsPlayerInRangeOfPoint(playerid3, -1854.7035,-1650.9668,25.7248)
                        && !
    IsPlayerInRangeOfPoint(playerid3, -1803.5344,-1655.2640,25.8294)
                        && !
    IsPlayerInRangeOfPoint(playerid3, -1788.5780,-1640.7179,27.0669)
                        && !
    IsPlayerInRangeOfPoint(playerid3, -1869.1316,-1634.7915,-58.500)
                        && !
    IsPlayerInRangeOfPoint(playerid3, -1868.9603,-1643.6682,-58.046))
                        {
                            
    SendClientMessage(playerid, -1"Вы уронили металл.");
                            
    DisablePlayerCheckpoint(playerid);
                            
    ApplyAnimation(playerid"CARRY""crry_prtial"4.000001);
                            
    PlayerStartJob{playerid} = false;
                            
    RemovePlayerAttachedObject(playerid4);
                            
    SetPlayerAttachedObject(playerid31863460.0782220.0000000.110844298.897308264.126861193.3505551.0000001.0000001.000000);
                            
    GetPlayerMetall[playerid] = 0;
                            
    GetPlayerMetallEx[playerid] = 0;
                            return 
    true;
                        }
                    }
                }
                
    ResetSpec(playerid);
                
    CheckAirBreak(playerid);
                if(
    ReklamCount{playerid} > 0)
                {
                    
    ReklamCount{playerid} --;
                }
                
    UpdateFullness(playerid);

                if(
    TimesShow[playerid] > 0)
                {
                    
    TimesShow[playerid] --;
                    if(
    TimesShow[playerid] == 0)
                    {
                        
    TimesShow[playerid] = 0;
                        
    TextDrawHideForPlayer(playerid,Text:Times);
                        
    Fullness[playerid] = CreateProgressBar(548.0028.0057.503.152147418367100.0);
                    }
                }
                if(
    PlayerInfo[playerid][pJailTime] > 0)
                {
                    
    PlayerInfo[playerid][pJailTime] --;
                    if(!
    PlayerInfo[playerid][pJailTime])
                    {
                        if(
    PlayerInfo[playerid][pMember] > 0SetPlayerSkin(playeridPlayerInfo[playerid][pModel]);
                        else 
    SetPlayerSkin(playeridPlayerInfo[playerid][pChar]);

                        
    SendClientMessage(playerid,COLOR_LIGHTBLUE,"Вы отсидели свой срок и были выпущены");
                        
    SetPlayerInterior(playerid0);
                        
    SetPlayerVirtualWorld(playerid0);
                        
    SetPlayerPos(playerid,1546.7046,-1675.4485,13.5628);
                        
    SetPlayerFacingAngle(playerid86.9815);
                        
    PlayerInfo[playerid][pJail] = 0;
                        
    PlayerInfo[playerid][pBailPrice] = 0;
                        
    SetCameraBehindPlayer(playerid);
                        
    SaveAccount(playerid);
                    }
                }
                if(
    ResetGunsUP[playerid] > 0)
                {
                    
    ResetGunsUP[playerid] --;
                }
                if(
    TimeOfTie[playerid] > 0)
                {
                    if(
    PlayerOfTie[playerid] != INVALID_PLAYER_ID)
                    {
                        new 
    cuffid PlayerOfTie[playerid];
                        if(
    PlayerOfTie[cuffid] == playerid)
                        {
                            if(
    GetPlayerVehicleID(playerid) == GetPlayerVehicleID(cuffid))
                              {
                                  new 
    carid GetPlayerVehicleID(playerid);
                                if(
    Knockout[cuffid])
                                {
                                    if(!
    NoPlayerDM[playerid] && !NoPlayerDM[cuffid])
                                    {
                                        if(
    ProxDetectorS(3.0playeridcuffid1))
                                        {
                                            
    TimeOfTie[playerid] --;
                                            if(
    TimeOfTie[playerid] <= 0)
                                               {
                                                 
    TogglePlayerControllableEx(cuffidfalse);
                                                
    format(stringsizeof(string),"* Игрок %s связал игрока %s!"cPN(playerid), cPN(cuffid));
                                                if(!
    caridProxDetector(15.0playeridstringCOLOR_PURPLE);
                                                else 
    SendVehicleMessage(caridCOLOR_PURPLEstring);
                                                  
    format(stringsizeof(string),"Игрок %s связал вас!"cPN(playerid));
                                                  
    SendClientMessage(cuffidCOLOR_LIGHTREDstring);
                                                  
    format(stringsizeof(string),"Вы связали игрока %s"PN(cuffid));
                                                  
    SendClientMessage(playeridCOLOR_LIGHTREDstring);
                                                
    Knockout[cuffid] = true;
                                            }
                                        }
                                        else 
    CancelTie(playerid);
                                    }
                                    else 
    CancelTie(playerid);
                                }
                                else 
    CancelTie(playerid);
                            }
                            else 
    CancelTie(playerid);
                        }
                        else 
    CancelTie(playerid);
                    }
                }
                if(
    PlayerInfo[playerid][pMuteTime] > 0)
                {
                    
    PlayerInfo[playerid][pMuteTime] --;
                    if(!
    PlayerInfo[playerid][pMuteTime])
                    {
                        
    SendClientMessage(playerid,COLOR_LIGHTGREEN,"[UnMute]: Не нарушайте правила сервера!");
                    }
                }
                if(
    RepairReset[playerid] > 0)
                {
                    
    RepairReset[playerid] --;
                }
                if(
    CuffedTime[playerid] > 0)
                {
                    
    CuffedTime[playerid]--;
                    if(!
    CuffedTime[playerid])
                    {
                        
    Cuffed[playerid] = false;
                    }
                }
                if(
    IznasTime[playerid] > 0)
                {
                    
    IznasTime[playerid] --;
                }
                if(
    TelePort[playerid] > 0)
                {
                    
    TelePort[playerid] --;
                }
                if(
    AntiFlood[playerid] > 0)
                {
                    
    AntiFlood[playerid] --;
                }
                if(
    PlayerInfo[playerid][pAdminTime] > 0)
                {
                    
    PlayerInfo[playerid][pAdminTime] --;
                }
                
    //======================================================================
                
    if(IsPlayerInAnyVehicle(playerid))
                {
                    new 
    carid GetPlayerVehicleID(playerid);
                    new 
    myseat GetPlayerVehicleSeat(playerid);
                       if(
    VehicleSeat[carid][myseat] != playeridVehicleSeat[carid][myseat] = playerid;
                    else if(
    GetPlayerState(playerid) != 2)
                    {
                        if(
    IsATaxi(carid))
                        {
                            new 
    id GetVehicleSeat(carid0);
                            if(
    id != INVALID_PLAYER_ID && PlayerInfo[id][pJob] == J_TAXI//JOB_TAXI
                            
    {
                                if(
    Taxi_GO[playerid] == 2)
                                {
                                    
    TaxiDistance[playerid] += GetPlayerVehicleSpeed(playerid);
                                    if(
    TaxiDistance[playerid] >= 300)
                                    {
                                        
    TaxiDistance[playerid] = 0;
                                        if (
    PlayerInfo[playerid][pCash] > TaxiPrice[playerid])
                                        {
                                            
    TaxiPrice[playerid] += TaxiTarif[id];
                                            
    format(string,sizeof(string),"$%d",TaxiPrice[playerid]);
                                            
    PlayerTextDrawSetString(playeridTaxiDraw[playerid],string);
                                            new 
    money;
                                            for(new 
    14++)
                                            {
                                                new 
    seat GetVehicleSeat(caridk);
                                                if(
    seat != INVALID_PLAYER_IDmoney += TaxiPrice[seat];
                                            }
                                            
    format(string,sizeof(string),"$%d",money);
                                            
    PlayerTextDrawSetString(idTaxiDraw[id],string);
                                        }
                                        else if(
    AntiFlood[id] <= 0)
                                          {
                                              new 
    str[128];
                                              
    format(strsizeof(str), "У пасажира %s недостаточно денег!"PN(playerid));
                                            
    SendClientMessage(id,COLOR_YELLOWstr);
                                            
    SendClientMessage(playerid,COLOR_YELLOW"У вас недостаточно денег!");
                                            
    AntiFlood[id] = 5;
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        return 
    true;


  2. #2
    Аватар для #Jason
    Пользователь

    Статус
    Оффлайн
    Регистрация
    18.10.2015
    Сообщений
    38
    Репутация:
    0 ±
    Помогите с чем это может быть связно я так и не понял, все работало хорошо.

  3. #3
    Аватар для vovandolg
    Пользователь

    Статус
    Оффлайн
    Регистрация
    17.11.2015
    Адрес
    Stavropol
    Сообщений
    1,360
    Репутация:
    113 ±
    PHP код:
    //SetWorldTime(ShiftHour); 
    Я могу ошибаться но зачем тут скобки, если это время или часы настраивает в игре?

  4. #4
    Аватар для untonyst
    Младший сержант

    Статус
    Оффлайн
    Регистрация
    15.03.2015
    Адрес
    Slobodskoy
    Сообщений
    663
    Репутация:
    234 ±
    Код от создателей таких книг как "таймеры - зло", "50 оттенков кода с использованием таймеров" и моя любимая - "все в одну кучу или искусство говнокода".
    Младший сержант Стяжкин | ЧСВ группа в ВКонтакте NEW

  5. Пользователь сказал cпасибо:
    $continue$ (22.12.2015)
  6. #5
    Аватар для Daniel_Cortez
    new fuck_logic[0] = EOS;

    Статус
    Оффлайн
    Регистрация
    06.04.2013
    Адрес
    Novokuznetsk, Russia
    Сообщений
    1,662
    Репутация:
    2145 ±
    Всегда. Всегда, когда ваш код "не подаёт признаков жизни", используйте CrashDetect, чтобы отыскать причину сбоя.
    Индивидуально в PM и Skype по скриптингу не помогаю. Задавайте все свои вопросы здесь (click).
    SA-MP 0.4 is a lie

  7. Пользователь сказал cпасибо:
    #Jason (23.12.2015)
  8. #6
    Аватар для #Jason
    Пользователь

    Статус
    Оффлайн
    Регистрация
    18.10.2015
    Сообщений
    38
    Репутация:
    0 ±
    Цитата Сообщение от Daniel_Cortez Посмотреть сообщение
    Всегда. Всегда, когда ваш код "не подаёт признаков жизни", используйте CrashDetect, чтобы отыскать причину сбоя.
    [17:22:51] [debug] AMX backtrace:
    [17:22:51] [debug] #0 00046f18 in ?? () from new.amx
    [17:22:51] [debug] #1 00148328 in public ServerTimer () from new.amx
    [17:22:52] [debug] Run time error 4: "Array index out of bounds"
    [17:22:52] [debug] Accessing element at negative index -1
    [17:22:52] [debug] AMX backtrace:
    [17:22:52] [debug] #0 00046f18 in ?? () from new.amx
    [17:22:52] [debug] #1 00148328 in public ServerTimer () from new.amx

  9. #7
    Аватар для VVWVV
    Проверенный

    Статус
    Онлайн
    Регистрация
    09.07.2015
    Сообщений
    607
    Репутация:
    289 ±
    Цитата Сообщение от #Jason Посмотреть сообщение
    [17:22:51] [debug] AMX backtrace:
    [17:22:51] [debug] #0 00046f18 in ?? () from new.amx
    [17:22:51] [debug] #1 00148328 in public ServerTimer () from new.amx
    [17:22:52] [debug] Run time error 4: "Array index out of bounds"
    [17:22:52] [debug] Accessing element at negative index -1
    [17:22:52] [debug] AMX backtrace:
    [17:22:52] [debug] #0 00046f18 in ?? () from new.amx
    [17:22:52] [debug] #1 00148328 in public ServerTimer () from new.amx
    У вас очень большой код. Проблема может скрываться в каждой переменной. Вам нужно вспомнить, что вы добавляли до ошибки в паблик.

  10. #8
    Аватар для Londlem
    Модератор

    Статус
    Оффлайн
    Регистрация
    19.10.2013
    Сообщений
    1,360
    Репутация:
    767 ±
    Перекомпилируйте мод с ключом "-d3".
    Как это сделать описано в этой:
    Цитата Сообщение от Daniel_Cortez Посмотреть сообщение
    теме.

    И выложите результат.

  11. #9
    Аватар для #Jason
    Пользователь

    Статус
    Оффлайн
    Регистрация
    18.10.2015
    Сообщений
    38
    Репутация:
    0 ±
    спасибо Cortez), я все решил.

    - - - Добавлено - - -

    Цитата Сообщение от Londlem Посмотреть сообщение
    Перекомпилируйте мод с ключом "-d3".
    Как это сделать описано в этой:

    теме.

    И выложите результат.
    уже решил и вам спасибо.

    - - - Добавлено - - -

    Цитата Сообщение от vovandolg Посмотреть сообщение
    PHP код:
    //SetWorldTime(ShiftHour); 
    Я могу ошибаться но зачем тут скобки, если это время или часы настраивает в игре?
    из за команды /settime убрал её чтобы время не обновляло каждую секунду

 

 

Информация о теме

Пользователи, просматривающие эту тему

Эту тему просматривают: 1 (пользователей: 0 , гостей: 1)

Ваши права

  • Вы не можете создавать новые темы
  • Вы не можете отвечать в темах
  • Вы не можете прикреплять вложения
  • Вы не можете редактировать свои сообщения
  •