Добро пожаловать на Pro Pawn - Портал о PAWN-скриптинге.
Страница 2 из 2 ПерваяПервая 1 2
Показано с 11 по 19 из 19
  1. #11
    Аватар для Shayba
    Пользователь

    Статус
    Оффлайн
    Регистрация
    11.10.2014
    Сообщений
    195
    Репутация:
    23 ±
    Цитата Сообщение от Londlem Посмотреть сообщение
    Нет. Там где либо
    PHP код:
    case 2289
    либо
    PHP код:
    if(dialogid == 2289
    Ну да,конечно.
    Вот он.

     Тык:
    PHP код:
            case 2289:
            {
                new 
    sendername[MAX_PLAYER_NAME];
                
    GetPlayerName(playeridsendernamesizeof(sendername));
                for(new 
    0sizeof(BizzInfo); h++)
                {
                    new 
    cena BizzInfo[h][bPrice];
                    new 
    cena2 BizzInfo[h][bPrice] *2;
                    new 
    cena3 BizzInfo[h][bPrice] *3;
                    new 
    cena4 BizzInfo[h][bPrice] *4;
                    new 
    cena5 BizzInfo[h][bPrice] *5;
                    new 
    cena6 BizzInfo[h][bPrice] *6;
                    if(
    response)
                    {
                        if(
    listitem == 0)
                        {
                            new 
    Float:health;
                            
    GetPlayerHealth(playerid,health);
                            if (
    PlayerToPoint(3playerid,BizzInfo[h][bBarX], BizzInfo[h][bBarY], BizzInfo[h][bBarZ]))
                            {
                                if(
    BizzInfo[h][bProducts] <= 0) return SendClientMessage(playeridCOLOR_GREY"? ???? ??? ????????");
                                if(
    PlayerInfo[playerid][pCash] < cena) return SendClientMessage(playeridCOLOR_GREY"? ??? ??? ??????? ?????");
                                
    PlayerInfo[playerid][pSatiety] += 30;
                                
    BizzInfo[h][b2Till] += cena;
                                
    BizzInfo[h][bProducts]-= 2;
                                
    PlayerInfo[playerid][pCash] -= cena;
                                if(
    PlayerInfo[playerid][pSatiety] > 100)
                                {
                                    
    PlayerInfo[playerid][pSatiety] = 100;
                                }
                                
    format(string,128"«???????» ????????? ?? %d",PlayerInfo[playerid][pSatiety]);
                                
    SendClientMessage(playerid,COLOR_WHITE,string);
                                
    GetPlayerName(playeridsendernamesizeof(sendername));
                                
    format(string,sizeof(string), "?????(?) ????");
                                
    SetPlayerChatBubble(playerid,string,COLOR_PURPLE,30.0,10000);
                                
    ApplyAnimation(playerid"BAR""dnk_stndF_loop",4.1,0,0,0,0,0,1);
                                return 
    true;
                            }
                        }
                        else if(
    listitem == 1)
                        {
                            new 
    Float:health;
                            
    GetPlayerHealth(playerid,health);
                            if(
    PlayerToPoint(3playerid,BizzInfo[h][bBarX], BizzInfo[h][bBarY], BizzInfo[h][bBarZ]))
                            {
                                if(
    BizzInfo[h][bProducts] <= 0) return SendClientMessage(playeridCOLOR_GREY"? ???? ??? ????????");
                                if(
    PlayerInfo[playerid][pCash] < cena2) return SendClientMessage(playeridCOLOR_GREY"? ??? ??? ??????? ?????");
                                
    PlayerInfo[playerid][pSatiety] += 40;
                                
    BizzInfo[h][b2Till] += cena2;
                                
    BizzInfo[h][bProducts]-= 2;
                                
    PlayerInfo[playerid][pCash] -= cena2;
                                if(
    PlayerInfo[playerid][pSatiety] > 100)
                                {
                                    
    PlayerInfo[playerid][pSatiety] = 100;
                                }
                                
    format(string,128"«???????» ????????? ?? %d",PlayerInfo[playerid][pSatiety]);
                                
    SendClientMessage(playerid,COLOR_WHITE,string);
                                
    GetPlayerName(playeridsendernamesizeof(sendername));
                                
    format(string,sizeof(string), "?????(?) ????");
                                
    SetPlayerChatBubble(playerid,string,COLOR_PURPLE,30.0,10000);
                                
    ApplyAnimation(playerid"BAR""dnk_stndF_loop",4.1,0,0,0,0,0,1);
                                return 
    true;
                            }
                        }
                        else if(
    listitem == 2)
                        {
                            new 
    Float:health;
                            
    GetPlayerHealth(playerid,health);
                            if(
    PlayerToPoint(3playerid,BizzInfo[h][bBarX], BizzInfo[h][bBarY], BizzInfo[h][bBarZ]))
                            {
                                if(
    BizzInfo[h][bProducts] <= 0) return SendClientMessage(playeridCOLOR_GREY"? ???? ??? ????????");
                                if(
    PlayerInfo[playerid][pCash] < cena3) return SendClientMessage(playeridCOLOR_GREY"? ??? ??? ??????? ?????");
                                
    BizzInfo[h][b2Till] += cena3;
                                
    PlayerInfo[playerid][pSatiety] += 50;
                                
    BizzInfo[h][bProducts]-= 2;
                                
    PlayerInfo[playerid][pCash] -= cena3;
                                if(
    PlayerInfo[playerid][pSatiety] > 100)
                                {
                                    
    PlayerInfo[playerid][pSatiety] = 100;
                                }
                                
    format(string,128"«???????» ????????? ?? %d",PlayerInfo[playerid][pSatiety]);
                                
    SendClientMessage(playerid,COLOR_WHITE,string);
                                
    GetPlayerName(playeridsendernamesizeof(sendername));
                                
    format(string,sizeof(string), "?????(?) ???? - ????",sendername);
                                
    SetPlayerChatBubble(playerid,string,COLOR_PURPLE,30.0,10000);
                                
    ApplyAnimation(playerid"BAR""dnk_stndF_loop",4.1,0,0,0,0,0,1);
                                return 
    true;
                            }
                        }
                        else if(
    listitem == 3)
                        {
                            new 
    Float:health;
                            
    GetPlayerHealth(playerid,health);
                            if(
    PlayerToPoint(3playerid,BizzInfo[h][bBarX], BizzInfo[h][bBarY], BizzInfo[h][bBarZ]))
                            {
                                if(
    BizzInfo[h][bProducts] <= 0) return SendClientMessage(playeridCOLOR_GREY"? ???? ??? ????????");
                                if(
    PlayerInfo[playerid][pCash] < cena4) return SendClientMessage(playeridCOLOR_GREY"? ??? ??? ??????? ?????");
                                
    PlayerDrunk[playerid] += 2;
                                if(
    GetPlayerHealth(playeridhealth) < 100)
                                {
                                    if(
    GetPlayerDrunkLevel(playerid) < 20000)
                                    {
                                        
    SetPlayerDrunkLevel(playerid,GetPlayerDrunkLevel(playerid)+2000);
                                    }
                                }
                                
    PlayerInfo[playerid][pSatiety] += 60;
                                
    BizzInfo[h][b2Till] += cena4;
                                
    BizzInfo[h][bProducts] -= 2;
                                
    PlayerInfo[playerid][pCash] -= cena4;
                                if(
    PlayerInfo[playerid][pSatiety] > 100)
                                {
                                    
    PlayerInfo[playerid][pSatiety] = 100;
                                }
                                
    format(string,128"«???????» ????????? ?? %d",PlayerInfo[playerid][pSatiety]);
                                
    SendClientMessage(playerid,COLOR_WHITE,string);
                                
    format(string,sizeof(string), "?????(?) ??????? ????",sendername);
                                
    SetPlayerChatBubble(playerid,string,COLOR_PURPLE,30.0,10000);
                                
    ApplyAnimation(playerid"BAR""dnk_stndF_loop",4.1,0,0,0,0,0,1);
                                return 
    true;
                            }
                        }
                        else if(
    listitem == 4)
                        {
                            new 
    Float:health;
                            
    GetPlayerHealth(playerid,health);
                            if(
    PlayerToPoint(3playerid,BizzInfo[h][bBarX], BizzInfo[h][bBarY], BizzInfo[h][bBarZ]))
                            {
                                if(
    BizzInfo[h][bProducts] <= 0) return SendClientMessage(playeridCOLOR_GREY"? ???? ??? ????????");
                                if(
    PlayerInfo[playerid][pCash] < cena5) return SendClientMessage(playeridCOLOR_GREY"? ??? ??? ??????? ?????");
                                
    PlayerDrunk[playerid] += 2;
                                if(
    GetPlayerHealth(playeridhealth) < 100)
                                {
                                    if(
    GetPlayerDrunkLevel(playerid) < 20000)
                                    {
                                        
    SetPlayerDrunkLevel(playerid,GetPlayerDrunkLevel(playerid)+2000);
                                    }
                                }
                                
    PlayerInfo[playerid][pSatiety] += 70;
                                
    BizzInfo[h][b2Till] += cena5;
                                
    BizzInfo[h][bProducts] -= 2;
                                
    PlayerInfo[playerid][pCash] -= cena5;
                                if(
    PlayerInfo[playerid][pSatiety] > 100)
                                {
                                    
    PlayerInfo[playerid][pSatiety] = 100;
                                }
                                
    format(string,128"«???????» ????????? ?? %d",PlayerInfo[playerid][pSatiety]);
                                
    SendClientMessage(playerid,COLOR_WHITE,string);
                                
    format(string,sizeof(string), "?????(?) ????? ????",sendername);
                                
    SetPlayerChatBubble(playerid,string,COLOR_PURPLE,30.0,10000);
                                
    ApplyAnimation(playerid"BAR""dnk_stndF_loop",4.1,0,0,0,0,0,1);
                                return 
    true;
                            }
                        }
                        else if(
    listitem == 5)
                        {
                            new 
    Float:health;
                            
    GetPlayerHealth(playerid,health);
                            if(
    PlayerToPoint(3playerid,BizzInfo[h][bBarX], BizzInfo[h][bBarY], BizzInfo[h][bBarZ]))
                            {
                                if(
    BizzInfo[h][bProducts] <= 0) return SendClientMessage(playeridCOLOR_GREY"? ???? ??? ????????");
                                if(
    PlayerInfo[playerid][pCash] < cena6) return SendClientMessage(playeridCOLOR_GREY"? ??? ??? ??????? ?????");
                                
    PlayerDrunk[playerid] += 2;
                                if(
    GetPlayerHealth(playeridhealth) < 100)
                                {
                                    if(
    GetPlayerDrunkLevel(playerid) < 20000)
                                    {
                                        
    SetPlayerDrunkLevel(playerid,GetPlayerDrunkLevel(playerid)+2000);
                                    }
                                }
                                
    BizzInfo[h][b2Till] += cena6;
                                
    PlayerInfo[playerid][pSatiety] += 80;
                                
    BizzInfo[h][bProducts] -= 2;
                                
    PlayerInfo[playerid][pCash] -= cena6;
                                
    GetPlayerName(playeridsendernamesizeof(sendername));
                                if(
    PlayerInfo[playerid][pSatiety] > 100)
                                {
                                    
    PlayerInfo[playerid][pSatiety] = 100;
                                }
                                
    format(string,128"«???????» ????????? ?? %d",PlayerInfo[playerid][pSatiety]);
                                
    SendClientMessage(playerid,COLOR_WHITE,string);
                                
    format(string,sizeof(string), "?????(?) ??????",sendername);
                                
    SetPlayerChatBubble(playerid,string,COLOR_PURPLE,30.0,10000);
                                
    ApplyAnimation(playerid"BAR""dnk_stndF_loop",4.1,0,0,0,0,0,1);
                                return 
    true;
                            }
                        }
                    }
                    else
                    {
                        return 
    true;
                    }
                }
            } 

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

    Статус
    Оффлайн
    Регистрация
    19.10.2013
    Адрес
    Ярославль
    Сообщений
    1,366
    Репутация:
    774 ±
    После
    PHP код:
    if(response)

    мой код вставьте.

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

    Статус
    Оффлайн
    Регистрация
    11.10.2014
    Сообщений
    195
    Репутация:
    23 ±
    Цитата Сообщение от Londlem Посмотреть сообщение
    После
    PHP код:
    if(response)

    мой код вставьте.
    Очень хотелось бы,только где я могу его взять?

  4. #14
    Аватар для L0ndl3m
    Пользователь

    Статус
    Оффлайн
    Регистрация
    19.10.2013
    Адрес
    Ярославль
    Сообщений
    1,366
    Репутация:
    774 ±

  5. #15
    Аватар для Shayba
    Пользователь

    Статус
    Оффлайн
    Регистрация
    11.10.2014
    Сообщений
    195
    Репутация:
    23 ±
    Цитата Сообщение от Londlem Посмотреть сообщение
    Появился Warning

    Код HTML:
    C:\Users\Барабашка\Desktop\ИваN\1 СерВ\gamemodes\Fuliox-Rp.pwn(12444) : warning 217: loose indentation
    C:\Users\Барабашка\Desktop\ИваN\1 СерВ\gamemodes\Fuliox-Rp.pwn(12446) : warning 217: loose indentation
    Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase
    
    
    2 Warnings.
    Я выровнял строку (12444)
    Она касалась вашего кода.
    А строку (12446) не получается выровнять.
    Она относится к диалогу 2289,только вот я не понял,почему она стала вдруг не "ровной"
    Удаляю ваш код,компилируется на отлично.

    PHP код:
            case 2289:
            {
                new 
    sendername[MAX_PLAYER_NAME];
                
    GetPlayerName(playeridsendernamesizeof(sendername));
                for(new 
    0sizeof(BizzInfo); h++)
                {
                    new 
    cena BizzInfo[h][bPrice];
                    new 
    cena2 BizzInfo[h][bPrice] *2;
                    new 
    cena3 BizzInfo[h][bPrice] *3;
                    new 
    cena4 BizzInfo[h][bPrice] *4;
                    new 
    cena5 BizzInfo[h][bPrice] *5;
                    new 
    cena6 BizzInfo[h][bPrice] *6;
                    if(
    response)
                    {
                        if(
    listitem == 0// Та самая строка 12446
                        
    {
                            new 
    Float:health;
                            
    GetPlayerHealth(playerid,health);
                            if (
    PlayerToPoint(3playerid,BizzInfo[h][bBarX], BizzInfo[h][bBarY], BizzInfo[h][bBarZ]))
                            {
                                if(
    BizzInfo[h][bProducts] <= 0) return SendClientMessage(playeridCOLOR_GREY"? ???? ??? ????????");
                                if(
    PlayerInfo[playerid][pCash] < cena) return SendClientMessage(playeridCOLOR_GREY"? ??? ??? ??????? ?????");
                                
    PlayerInfo[playerid][pSatiety] += 30;
                                
    BizzInfo[h][b2Till] += cena;
                                
    BizzInfo[h][bProducts]-= 2;
                                
    PlayerInfo[playerid][pCash] -= cena;
                                if(
    PlayerInfo[playerid][pSatiety] > 100)
                                {
                                    
    PlayerInfo[playerid][pSatiety] = 100;
                                }
                                
    format(string,128"«???????» ????????? ?? %d",PlayerInfo[playerid][pSatiety]);
                                
    SendClientMessage(playerid,COLOR_WHITE,string);
                                
    GetPlayerName(playeridsendernamesizeof(sendername));
                                
    format(string,sizeof(string), "?????(?) ????");
                                
    SetPlayerChatBubble(playerid,string,COLOR_PURPLE,30.0,10000);
                                
    ApplyAnimation(playerid"BAR""dnk_stndF_loop",4.1,0,0,0,0,0,1);
                                return 
    true;
                            }
                        }
                        else if(
    listitem == 1)
                        {
                            new 
    Float:health;
                            
    GetPlayerHealth(playerid,health);
                            if(
    PlayerToPoint(3playerid,BizzInfo[h][bBarX], BizzInfo[h][bBarY], BizzInfo[h][bBarZ]))
                            {
                                if(
    BizzInfo[h][bProducts] <= 0) return SendClientMessage(playeridCOLOR_GREY"? ???? ??? ????????");
                                if(
    PlayerInfo[playerid][pCash] < cena2) return SendClientMessage(playeridCOLOR_GREY"? ??? ??? ??????? ?????");
                                
    PlayerInfo[playerid][pSatiety] += 40;
                                
    BizzInfo[h][b2Till] += cena2;
                                
    BizzInfo[h][bProducts]-= 2;
                                
    PlayerInfo[playerid][pCash] -= cena2;
                                if(
    PlayerInfo[playerid][pSatiety] > 100)
                                {
                                    
    PlayerInfo[playerid][pSatiety] = 100;
                                }
                                
    format(string,128"«???????» ????????? ?? %d",PlayerInfo[playerid][pSatiety]);
                                
    SendClientMessage(playerid,COLOR_WHITE,string);
                                
    GetPlayerName(playeridsendernamesizeof(sendername));
                                
    format(string,sizeof(string), "?????(?) ????");
                                
    SetPlayerChatBubble(playerid,string,COLOR_PURPLE,30.0,10000);
                                
    ApplyAnimation(playerid"BAR""dnk_stndF_loop",4.1,0,0,0,0,0,1);
                                return 
    true;
                            }
                        }
                        else if(
    listitem == 2)
                        {
                            new 
    Float:health;
                            
    GetPlayerHealth(playerid,health);
                            if(
    PlayerToPoint(3playerid,BizzInfo[h][bBarX], BizzInfo[h][bBarY], BizzInfo[h][bBarZ]))
                            {
                                if(
    BizzInfo[h][bProducts] <= 0) return SendClientMessage(playeridCOLOR_GREY"? ???? ??? ????????");
                                if(
    PlayerInfo[playerid][pCash] < cena3) return SendClientMessage(playeridCOLOR_GREY"? ??? ??? ??????? ?????");
                                
    BizzInfo[h][b2Till] += cena3;
                                
    PlayerInfo[playerid][pSatiety] += 50;
                                
    BizzInfo[h][bProducts]-= 2;
                                
    PlayerInfo[playerid][pCash] -= cena3;
                                if(
    PlayerInfo[playerid][pSatiety] > 100)
                                {
                                    
    PlayerInfo[playerid][pSatiety] = 100;
                                }
                                
    format(string,128"«???????» ????????? ?? %d",PlayerInfo[playerid][pSatiety]);
                                
    SendClientMessage(playerid,COLOR_WHITE,string);
                                
    GetPlayerName(playeridsendernamesizeof(sendername));
                                
    format(string,sizeof(string), "?????(?) ???? - ????",sendername);
                                
    SetPlayerChatBubble(playerid,string,COLOR_PURPLE,30.0,10000);
                                
    ApplyAnimation(playerid"BAR""dnk_stndF_loop",4.1,0,0,0,0,0,1);
                                return 
    true;
                            }
                        }
                        else if(
    listitem == 3)
                        {
                            new 
    Float:health;
                            
    GetPlayerHealth(playerid,health);
                            if(
    PlayerToPoint(3playerid,BizzInfo[h][bBarX], BizzInfo[h][bBarY], BizzInfo[h][bBarZ]))
                            {
                                if(
    BizzInfo[h][bProducts] <= 0) return SendClientMessage(playeridCOLOR_GREY"? ???? ??? ????????");
                                if(
    PlayerInfo[playerid][pCash] < cena4) return SendClientMessage(playeridCOLOR_GREY"? ??? ??? ??????? ?????");
                                
    PlayerDrunk[playerid] += 2;
                                if(
    GetPlayerHealth(playeridhealth) < 100)
                                {
                                    if(
    GetPlayerDrunkLevel(playerid) < 20000)
                                    {
                                        
    SetPlayerDrunkLevel(playerid,GetPlayerDrunkLevel(playerid)+2000);
                                    }
                                }
                                
    PlayerInfo[playerid][pSatiety] += 60;
                                
    BizzInfo[h][b2Till] += cena4;
                                
    BizzInfo[h][bProducts] -= 2;
                                
    PlayerInfo[playerid][pCash] -= cena4;
                                if(
    PlayerInfo[playerid][pSatiety] > 100)
                                {
                                    
    PlayerInfo[playerid][pSatiety] = 100;
                                }
                                
    format(string,128"«???????» ????????? ?? %d",PlayerInfo[playerid][pSatiety]);
                                
    SendClientMessage(playerid,COLOR_WHITE,string);
                                
    format(string,sizeof(string), "?????(?) ??????? ????",sendername);
                                
    SetPlayerChatBubble(playerid,string,COLOR_PURPLE,30.0,10000);
                                
    ApplyAnimation(playerid"BAR""dnk_stndF_loop",4.1,0,0,0,0,0,1);
                                return 
    true;
                            }
                        }
                        else if(
    listitem == 4)
                        {
                            new 
    Float:health;
                            
    GetPlayerHealth(playerid,health);
                            if(
    PlayerToPoint(3playerid,BizzInfo[h][bBarX], BizzInfo[h][bBarY], BizzInfo[h][bBarZ]))
                            {
                                if(
    BizzInfo[h][bProducts] <= 0) return SendClientMessage(playeridCOLOR_GREY"? ???? ??? ????????");
                                if(
    PlayerInfo[playerid][pCash] < cena5) return SendClientMessage(playeridCOLOR_GREY"? ??? ??? ??????? ?????");
                                
    PlayerDrunk[playerid] += 2;
                                if(
    GetPlayerHealth(playeridhealth) < 100)
                                {
                                    if(
    GetPlayerDrunkLevel(playerid) < 20000)
                                    {
                                        
    SetPlayerDrunkLevel(playerid,GetPlayerDrunkLevel(playerid)+2000);
                                    }
                                }
                                
    PlayerInfo[playerid][pSatiety] += 70;
                                
    BizzInfo[h][b2Till] += cena5;
                                
    BizzInfo[h][bProducts] -= 2;
                                
    PlayerInfo[playerid][pCash] -= cena5;
                                if(
    PlayerInfo[playerid][pSatiety] > 100)
                                {
                                    
    PlayerInfo[playerid][pSatiety] = 100;
                                }
                                
    format(string,128"«???????» ????????? ?? %d",PlayerInfo[playerid][pSatiety]);
                                
    SendClientMessage(playerid,COLOR_WHITE,string);
                                
    format(string,sizeof(string), "?????(?) ????? ????",sendername);
                                
    SetPlayerChatBubble(playerid,string,COLOR_PURPLE,30.0,10000);
                                
    ApplyAnimation(playerid"BAR""dnk_stndF_loop",4.1,0,0,0,0,0,1);
                                return 
    true;
                            }
                        }
                        else if(
    listitem == 5)
                        {
                            new 
    Float:health;
                            
    GetPlayerHealth(playerid,health);
                            if(
    PlayerToPoint(3playerid,BizzInfo[h][bBarX], BizzInfo[h][bBarY], BizzInfo[h][bBarZ]))
                            {
                                if(
    BizzInfo[h][bProducts] <= 0) return SendClientMessage(playeridCOLOR_GREY"? ???? ??? ????????");
                                if(
    PlayerInfo[playerid][pCash] < cena6) return SendClientMessage(playeridCOLOR_GREY"? ??? ??? ??????? ?????");
                                
    PlayerDrunk[playerid] += 2;
                                if(
    GetPlayerHealth(playeridhealth) < 100)
                                {
                                    if(
    GetPlayerDrunkLevel(playerid) < 20000)
                                    {
                                        
    SetPlayerDrunkLevel(playerid,GetPlayerDrunkLevel(playerid)+2000);
                                    }
                                }
                                
    BizzInfo[h][b2Till] += cena6;
                                
    PlayerInfo[playerid][pSatiety] += 80;
                                
    BizzInfo[h][bProducts] -= 2;
                                
    PlayerInfo[playerid][pCash] -= cena6;
                                
    GetPlayerName(playeridsendernamesizeof(sendername));
                                if(
    PlayerInfo[playerid][pSatiety] > 100)
                                {
                                    
    PlayerInfo[playerid][pSatiety] = 100;
                                }
                                
    format(string,128"«???????» ????????? ?? %d",PlayerInfo[playerid][pSatiety]);
                                
    SendClientMessage(playerid,COLOR_WHITE,string);
                                
    format(string,sizeof(string), "?????(?) ??????",sendername);
                                
    SetPlayerChatBubble(playerid,string,COLOR_PURPLE,30.0,10000);
                                
    ApplyAnimation(playerid"BAR""dnk_stndF_loop",4.1,0,0,0,0,0,1);
                                return 
    true;
                            }
                        }
                    }
                    else
                    {
                        return 
    true;
                    }
                }
            } 
    Последний раз редактировалось Shayba; 05.01.2015 в 18:02. Причина: Ошибка!

  6. #16
    Аватар для L0ndl3m
    Пользователь

    Статус
    Оффлайн
    Регистрация
    19.10.2013
    Адрес
    Ярославль
    Сообщений
    1,366
    Репутация:
    774 ±
    Мой код тут не причём, вы неверно вставили просто. А в вашем коде так и нет изменений.

  7. #17
    Аватар для Mazzilla
    Пользователь

    Статус
    Оффлайн
    Регистрация
    27.11.2013
    Адрес
    Нижневартовск
    Сообщений
    256
    Репутация:
    63 ±
    Попробуйте так:
    PHP код:
    case 2289:
    {
        if(!
    response) return true;
        new 
    FloatHealth;
        
    GetPlayerHealth(playeridHealth);
        new 
    sendername[MAX_PLAYER_NAME];
           
    GetPlayerName(playeridsendernamesizeof(sendername));
           switch(
    listitem)
           {
            case 
    0:
            {
                for(new 
    0sizeof(BizzInfo); h++)
                {
                    if(
    PlayerToPoint(3playerid,BizzInfo[h][bBarX], BizzInfo[h][bBarY], BizzInfo[h][bBarZ]))
                    {
                        new 
    cena BizzInfo[h][bPrice] * (listitem+1);
                        if(
    BizzInfo[h][bProducts] <= 0) return SendClientMessage(playeridCOLOR_GREY"? ???? ??? ????????");
                        if(
    PlayerInfo[playerid][pCash] < cena) return SendClientMessage(playeridCOLOR_GREY"? ??? ??? ??????? ?????");
                        
    PlayerInfo[playerid][pSatiety] += 30;
                        
    BizzInfo[h][b2Till] += cena;
                        
    BizzInfo[h][bProducts]-= 2;
                        
    PlayerInfo[playerid][pCash] -= cena;
                           if(
    PlayerInfo[playerid][pSatiety] > 100PlayerInfo[playerid][pSatiety] = 100;
                        
    format(string,128"«???????» ????????? ?? %d",PlayerInfo[playerid][pSatiety]);
                        
    SendClientMessage(playerid,COLOR_WHITE,string);
                        
    GetPlayerName(playeridsendernamesizeof(sendername));
                        
    format(string,sizeof(string), "?????(?) ????");
                        
    SetPlayerChatBubble(playerid,string,COLOR_PURPLE,30.0,10000);
                        
    ApplyAnimation(playerid"BAR""dnk_stndF_loop",4.1,0,0,0,0,0,1);
                        return 
    true;
                    }
                }
            }
            case 
    1:
            {
                
    //...
            
    }
            case 
    2:
            {
                
    //...
            
    }
            case 
    3:
            {
                
    //...
            
    }
            case 
    4:
            {
                
    //...
            
    }
            case 
    5:
            {
                
    //...
            
    }
           }

    PHP код:
    if(strcmp(cmd"/drink"true) == 0)
        {
            if(!
    IsPlayerConnected(playerid)) return true;
               for(new 
    0sizeof(BizzInfo); i++)
            {
                if(
    PlayerToPoint(3playerid,BizzInfo[i][bBarX], BizzInfo[i][bBarY], BizzInfo[i][bBarZ]))
                {
                    new 
    bizinfo[400];
                     new 
    cena BizzInfo[i][bPrice];
                    new 
    cena2 BizzInfo[i][bPrice] * 2;
                    new 
    cena3 BizzInfo[i][bPrice] * 3;
                    new 
    cena4 BizzInfo[i][bPrice] * 4;
                    new 
    cena5 BizzInfo[i][bPrice] * 5;
                    new 
    cena6 BizzInfo[i][bPrice] * 6;
                    
    format(bizinfo,sizeof(bizinfo), "Вода\t\t[%d вирт]\nСода\t\t[%d вирт]\nКока-кола\t[%d вирт]\nПиво\t\t[%d вирт]\nВино\t\t[%d вирт]\nАбсент\t\t[%d вирт]",cena,cena2,cena3,cena4,cena5,cena6);
                    
    ShowPlayerDialog(playerid2289DIALOG_STYLE_LIST"Меню Бара"bizinfo"Выбрать""Отмена");
                    return 
    true;
                   }
            }
            return 
    true;
        } 

  8. #18
    Аватар для Shayba
    Пользователь

    Статус
    Оффлайн
    Регистрация
    11.10.2014
    Сообщений
    195
    Репутация:
    23 ±
    Mazzilla
    К сожалению тоже не помогло.

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

    Цитата Сообщение от Londlem Посмотреть сообщение
    Мой код тут не причём, вы неверно вставили просто. А в вашем коде так и нет изменений.
    Вот тот самый диалог с вашим кодом,при котором появились Варнинги!

     Тык:
    PHP код:
            case 2289:
            {
                new 
    sendername[MAX_PLAYER_NAME];
                
    GetPlayerName(playeridsendernamesizeof(sendername));
                for(new 
    0sizeof(BizzInfo); h++)
                {
                    new 
    cena BizzInfo[h][bPrice];
                    new 
    cena2 BizzInfo[h][bPrice] *2;
                    new 
    cena3 BizzInfo[h][bPrice] *3;
                    new 
    cena4 BizzInfo[h][bPrice] *4;
                    new 
    cena5 BizzInfo[h][bPrice] *5;
                    new 
    cena6 BizzInfo[h][bPrice] *6;
                    if(
    response)
                    {
                    new
                        
    Floatx,
                        
    Floaty,
                        
    Floatz;

                       
    GetPlayerPos(playeridxyz);
                       
    SetPlayerPos(playerid2.02.0z); // Варнинг этой строки,я его исправил
                        
    if(listitem == 0// Та самая строка 12446// Варнинг этой строки не получается исправить
                        
    {
                            new 
    Float:health;
                            
    GetPlayerHealth(playerid,health);
                            if (
    PlayerToPoint(3playerid,BizzInfo[h][bBarX], BizzInfo[h][bBarY], BizzInfo[h][bBarZ]))
                            {
                                if(
    BizzInfo[h][bProducts] <= 0) return SendClientMessage(playeridCOLOR_GREY"? ???? ??? ????????");
                                if(
    PlayerInfo[playerid][pCash] < cena) return SendClientMessage(playeridCOLOR_GREY"? ??? ??? ??????? ?????");
                                
    PlayerInfo[playerid][pSatiety] += 30;
                                
    BizzInfo[h][b2Till] += cena;
                                
    BizzInfo[h][bProducts]-= 2;
                                
    PlayerInfo[playerid][pCash] -= cena;
                                if(
    PlayerInfo[playerid][pSatiety] > 100)
                                {
                                    
    PlayerInfo[playerid][pSatiety] = 100;
                                }
                                
    format(string,128"«???????» ????????? ?? %d",PlayerInfo[playerid][pSatiety]);
                                
    SendClientMessage(playerid,COLOR_WHITE,string);
                                
    GetPlayerName(playeridsendernamesizeof(sendername));
                                
    format(string,sizeof(string), "?????(?) ????");
                                
    SetPlayerChatBubble(playerid,string,COLOR_PURPLE,30.0,10000);
                                
    ApplyAnimation(playerid"BAR""dnk_stndF_loop",4.1,0,0,0,0,0,1);
                                return 
    true;
                            }
                        }
                        else if(
    listitem == 1)
                        {
                            new 
    Float:health;
                            
    GetPlayerHealth(playerid,health);
                            if(
    PlayerToPoint(3playerid,BizzInfo[h][bBarX], BizzInfo[h][bBarY], BizzInfo[h][bBarZ]))
                            {
                                if(
    BizzInfo[h][bProducts] <= 0) return SendClientMessage(playeridCOLOR_GREY"? ???? ??? ????????");
                                if(
    PlayerInfo[playerid][pCash] < cena2) return SendClientMessage(playeridCOLOR_GREY"? ??? ??? ??????? ?????");
                                
    PlayerInfo[playerid][pSatiety] += 40;
                                
    BizzInfo[h][b2Till] += cena2;
                                
    BizzInfo[h][bProducts]-= 2;
                                
    PlayerInfo[playerid][pCash] -= cena2;
                                if(
    PlayerInfo[playerid][pSatiety] > 100)
                                {
                                    
    PlayerInfo[playerid][pSatiety] = 100;
                                }
                                
    format(string,128"«???????» ????????? ?? %d",PlayerInfo[playerid][pSatiety]);
                                
    SendClientMessage(playerid,COLOR_WHITE,string);
                                
    GetPlayerName(playeridsendernamesizeof(sendername));
                                
    format(string,sizeof(string), "?????(?) ????");
                                
    SetPlayerChatBubble(playerid,string,COLOR_PURPLE,30.0,10000);
                                
    ApplyAnimation(playerid"BAR""dnk_stndF_loop",4.1,0,0,0,0,0,1);
                                return 
    true;
                            }
                        }
                        else if(
    listitem == 2)
                        {
                            new 
    Float:health;
                            
    GetPlayerHealth(playerid,health);
                            if(
    PlayerToPoint(3playerid,BizzInfo[h][bBarX], BizzInfo[h][bBarY], BizzInfo[h][bBarZ]))
                            {
                                if(
    BizzInfo[h][bProducts] <= 0) return SendClientMessage(playeridCOLOR_GREY"? ???? ??? ????????");
                                if(
    PlayerInfo[playerid][pCash] < cena3) return SendClientMessage(playeridCOLOR_GREY"? ??? ??? ??????? ?????");
                                
    BizzInfo[h][b2Till] += cena3;
                                
    PlayerInfo[playerid][pSatiety] += 50;
                                
    BizzInfo[h][bProducts]-= 2;
                                
    PlayerInfo[playerid][pCash] -= cena3;
                                if(
    PlayerInfo[playerid][pSatiety] > 100)
                                {
                                    
    PlayerInfo[playerid][pSatiety] = 100;
                                }
                                
    format(string,128"«???????» ????????? ?? %d",PlayerInfo[playerid][pSatiety]);
                                
    SendClientMessage(playerid,COLOR_WHITE,string);
                                
    GetPlayerName(playeridsendernamesizeof(sendername));
                                
    format(string,sizeof(string), "?????(?) ???? - ????",sendername);
                                
    SetPlayerChatBubble(playerid,string,COLOR_PURPLE,30.0,10000);
                                
    ApplyAnimation(playerid"BAR""dnk_stndF_loop",4.1,0,0,0,0,0,1);
                                return 
    true;
                            }
                        }
                        else if(
    listitem == 3)
                        {
                            new 
    Float:health;
                            
    GetPlayerHealth(playerid,health);
                            if(
    PlayerToPoint(3playerid,BizzInfo[h][bBarX], BizzInfo[h][bBarY], BizzInfo[h][bBarZ]))
                            {
                                if(
    BizzInfo[h][bProducts] <= 0) return SendClientMessage(playeridCOLOR_GREY"? ???? ??? ????????");
                                if(
    PlayerInfo[playerid][pCash] < cena4) return SendClientMessage(playeridCOLOR_GREY"? ??? ??? ??????? ?????");
                                
    PlayerDrunk[playerid] += 2;
                                if(
    GetPlayerHealth(playeridhealth) < 100)
                                {
                                    if(
    GetPlayerDrunkLevel(playerid) < 20000)
                                    {
                                        
    SetPlayerDrunkLevel(playerid,GetPlayerDrunkLevel(playerid)+2000);
                                    }
                                }
                                
    PlayerInfo[playerid][pSatiety] += 60;
                                
    BizzInfo[h][b2Till] += cena4;
                                
    BizzInfo[h][bProducts] -= 2;
                                
    PlayerInfo[playerid][pCash] -= cena4;
                                if(
    PlayerInfo[playerid][pSatiety] > 100)
                                {
                                    
    PlayerInfo[playerid][pSatiety] = 100;
                                }
                                
    format(string,128"«???????» ????????? ?? %d",PlayerInfo[playerid][pSatiety]);
                                
    SendClientMessage(playerid,COLOR_WHITE,string);
                                
    format(string,sizeof(string), "?????(?) ??????? ????",sendername);
                                
    SetPlayerChatBubble(playerid,string,COLOR_PURPLE,30.0,10000);
                                
    ApplyAnimation(playerid"BAR""dnk_stndF_loop",4.1,0,0,0,0,0,1);
                                return 
    true;
                            }
                        }
                        else if(
    listitem == 4)
                        {
                            new 
    Float:health;
                            
    GetPlayerHealth(playerid,health);
                            if(
    PlayerToPoint(3playerid,BizzInfo[h][bBarX], BizzInfo[h][bBarY], BizzInfo[h][bBarZ]))
                            {
                                if(
    BizzInfo[h][bProducts] <= 0) return SendClientMessage(playeridCOLOR_GREY"? ???? ??? ????????");
                                if(
    PlayerInfo[playerid][pCash] < cena5) return SendClientMessage(playeridCOLOR_GREY"? ??? ??? ??????? ?????");
                                
    PlayerDrunk[playerid] += 2;
                                if(
    GetPlayerHealth(playeridhealth) < 100)
                                {
                                    if(
    GetPlayerDrunkLevel(playerid) < 20000)
                                    {
                                        
    SetPlayerDrunkLevel(playerid,GetPlayerDrunkLevel(playerid)+2000);
                                    }
                                }
                                
    PlayerInfo[playerid][pSatiety] += 70;
                                
    BizzInfo[h][b2Till] += cena5;
                                
    BizzInfo[h][bProducts] -= 2;
                                
    PlayerInfo[playerid][pCash] -= cena5;
                                if(
    PlayerInfo[playerid][pSatiety] > 100)
                                {
                                    
    PlayerInfo[playerid][pSatiety] = 100;
                                }
                                
    format(string,128"«???????» ????????? ?? %d",PlayerInfo[playerid][pSatiety]);
                                
    SendClientMessage(playerid,COLOR_WHITE,string);
                                
    format(string,sizeof(string), "?????(?) ????? ????",sendername);
                                
    SetPlayerChatBubble(playerid,string,COLOR_PURPLE,30.0,10000);
                                
    ApplyAnimation(playerid"BAR""dnk_stndF_loop",4.1,0,0,0,0,0,1);
                                return 
    true;
                            }
                        }
                        else if(
    listitem == 5)
                        {
                            new 
    Float:health;
                            
    GetPlayerHealth(playerid,health);
                            if(
    PlayerToPoint(3playerid,BizzInfo[h][bBarX], BizzInfo[h][bBarY], BizzInfo[h][bBarZ]))
                            {
                                if(
    BizzInfo[h][bProducts] <= 0) return SendClientMessage(playeridCOLOR_GREY"? ???? ??? ????????");
                                if(
    PlayerInfo[playerid][pCash] < cena6) return SendClientMessage(playeridCOLOR_GREY"? ??? ??? ??????? ?????");
                                
    PlayerDrunk[playerid] += 2;
                                if(
    GetPlayerHealth(playeridhealth) < 100)
                                {
                                    if(
    GetPlayerDrunkLevel(playerid) < 20000)
                                    {
                                        
    SetPlayerDrunkLevel(playerid,GetPlayerDrunkLevel(playerid)+2000);
                                    }
                                }
                                
    BizzInfo[h][b2Till] += cena6;
                                
    PlayerInfo[playerid][pSatiety] += 80;
                                
    BizzInfo[h][bProducts] -= 2;
                                
    PlayerInfo[playerid][pCash] -= cena6;
                                
    GetPlayerName(playeridsendernamesizeof(sendername));
                                if(
    PlayerInfo[playerid][pSatiety] > 100)
                                {
                                    
    PlayerInfo[playerid][pSatiety] = 100;
                                }
                                
    format(string,128"«???????» ????????? ?? %d",PlayerInfo[playerid][pSatiety]);
                                
    SendClientMessage(playerid,COLOR_WHITE,string);
                                
    format(string,sizeof(string), "?????(?) ??????",sendername);
                                
    SetPlayerChatBubble(playerid,string,COLOR_PURPLE,30.0,10000);
                                
    ApplyAnimation(playerid"BAR""dnk_stndF_loop",4.1,0,0,0,0,0,1);
                                return 
    true;
                            }
                        }
                    }
                    else
                    {
                        return 
    true;
                    }
                }
            } 


    Варнинг 217 (не выровненные строки)

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

    Статус
    Оффлайн
    Регистрация
    11.10.2014
    Сообщений
    195
    Репутация:
    23 ±
    Закрывайте тему.

 

 
Страница 2 из 2 ПерваяПервая 1 2

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

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

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

Ваши права

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