SA-MP Forums

Go Back   SA-MP Forums > Non-English > Languages > Русский/Russian

Reply
 
Thread Tools Display Modes
Old 29/12/2017, 11:33 AM   #1
nateand
Little Clucker
 
Join Date: May 2015
Posts: 2
Reputation: 0
Default Проблема с SAMP 0.3.8

Столкнулся с проблемой выбора скина в версии 0.3.8. На 0.3.7 всё как положено работает, но на 0.3.8 начинаются непонятные проблемы. Почему-то меню просто перестаёт работать, оно как бы есть, но если нажимать на кнопки нечего происходить не будет и вместо скинов которые я указал, появился скин CJ. НО, если полностью отключить загрузку моделей в server.cfg, то всё будет работать как и на 0.3.7.
nateand is offline   Reply With Quote
Old 29/12/2017, 11:45 AM   #2
Eims
Huge Clucker
 
Eims's Avatar
 
Join Date: May 2013
Location: Восточный Мордор
Posts: 403
Reputation: 11
Default Re: Проблема с SAMP 0.3.8

Хммм, я, конечно, не уверен, но вполне возможно, что, вероятно, проблема, скорее всего, в коде. Но это не точно.
__________________
- How many IT Engineers does it take to fix a broken light bulb?
- None, the light bulb works fine in my office, I cannot replicate the issue.

Last edited by Eims; 29/12/2017 at 02:56 PM.
Eims is offline   Reply With Quote
Old 29/12/2017, 01:14 PM   #3
nateand
Little Clucker
 
Join Date: May 2015
Posts: 2
Reputation: 0
Default Re: Проблема с SAMP 0.3.8

Code:
stock Menu()
{
    bomj_menu[0] = CreateMenu("Victim", 1, 50.0, 160.0, 100.0);
        SetMenuColumnHeader(bomj_menu[0], 0, "Choose Skin");
        AddMenuItem(bomj_menu[0], 0, "Next");
        AddMenuItem(bomj_menu[0], 0, "Previous");
        AddMenuItem(bomj_menu[0], 0, "Save");
        bomj_menu[1] = CreateMenu("Victim", 1, 50.0, 160.0, 100.0);
        SetMenuColumnHeader(bomj_menu[1], 0, "Choose Skin");
        AddMenuItem(bomj_menu[1], 0, "Next");
        AddMenuItem(bomj_menu[1], 0, "Previous");
        AddMenuItem(bomj_menu[1], 0, "Save");
}
Code:
public OnPlayerSelectedMenuRow(playerid, row)
{
        if(GetPlayerMenu(playerid) == bomj_menu[0])
        {
            switch(row)
            {
                case 0:
                {
                    switch(select_skin[playerid])
                    {
                        case 1: player[playerid][pskin] = 79;
                        case 2: player[playerid][pskin] = 134;
                        case 3: player[playerid][pskin] = 135;
                        case 4: player[playerid][pskin] = 137;
                        case 5: player[playerid][pskin] = 200;
                        case 6: player[playerid][pskin] = 230;
                        case 7: player[playerid][pskin] = 78;
                    }
                    SetPlayerSkin(playerid, player[playerid][pskin]);
                    select_skin[playerid] ++;
                                if(select_skin[playerid] == 8) select_skin[playerid] = 1;
                                ShowMenuForPlayer(bomj_menu[0], playerid);
                }
                case 1:
                {
                    switch(select_skin[playerid])
                    {
                        case 3: player[playerid][pskin] = 79;
                        case 4: player[playerid][pskin] = 134;
                        case 5: player[playerid][pskin] = 135;
                        case 6: player[playerid][pskin] = 137;
                        case 7: player[playerid][pskin] = 200;
                        case 1: player[playerid][pskin] = 230;
                        case 2: player[playerid][pskin] = 78;
                    }
                    SetPlayerSkin(playerid, player[playerid][pskin]);
                    select_skin[playerid] --;
                                if(select_skin[playerid] == 0) select_skin[playerid] = 7;
                                ShowMenuForPlayer(bomj_menu[0], playerid);
                }
                case 2: CreateAccount(playerid);
            }
        }
        else if(GetPlayerMenu(playerid) == bomj_menu[1])
        {
            switch(row)
            {
                case 0:
                {
                    switch(select_skin[playerid])
                    {
                        case 8: player[playerid][pskin] = 39;
                        case 9: player[playerid][pskin] = 54;
                        case 10: player[playerid][pskin] = 10;
                        case 11: player[playerid][pskin] = 77;
                    }
                    SetPlayerSkin(playerid, player[playerid][pskin]);
                    select_skin[playerid] ++;
                                if(select_skin[playerid] == 12) select_skin[playerid] = 8;
                                ShowMenuForPlayer(bomj_menu[1], playerid);
                }
                case 1:
                {
                    switch(select_skin[playerid])
                    {
                        case 10: player[playerid][pskin] = 39;
                        case 11: player[playerid][pskin] = 54;
                        case 8: player[playerid][pskin] = 10;
                        case 9: player[playerid][pskin] = 77;
                    }
                    SetPlayerSkin(playerid, player[playerid][pskin]);
                    select_skin[playerid] --;
                                if(select_skin[playerid] == 7) select_skin[playerid] = 11;
                                ShowMenuForPlayer(bomj_menu[1], playerid);
                }
                case 2: CreateAccount(playerid);
            }
        }
        return true;
}
nateand is offline   Reply With Quote
Old 03/01/2018, 06:20 AM   #4
Jasno
Little Clucker
 
Join Date: Nov 2017
Posts: 7
Reputation: 0
Default Re: Проблема с SAMP 0.3.8

Скорее всего код, но 038 в RC ещё, советую подождать до релиза и пробовать.
Jasno is offline   Reply With Quote
Old 04/01/2018, 11:16 AM   #5
Bren
Big Clucker
 
Bren's Avatar
 
Join Date: Jul 2014
Location: Russia
Posts: 71
Reputation: 0
Flowers Re: Проблема с SAMP 0.3.8

Quote:
Originally Posted by nateand View Post
Code:
stock Menu()
{
    bomj_menu[0] = CreateMenu("Victim", 1, 50.0, 160.0, 100.0);
        SetMenuColumnHeader(bomj_menu[0], 0, "Choose Skin");
        AddMenuItem(bomj_menu[0], 0, "Next");
        AddMenuItem(bomj_menu[0], 0, "Previous");
        AddMenuItem(bomj_menu[0], 0, "Save");
        bomj_menu[1] = CreateMenu("Victim", 1, 50.0, 160.0, 100.0);
        SetMenuColumnHeader(bomj_menu[1], 0, "Choose Skin");
        AddMenuItem(bomj_menu[1], 0, "Next");
        AddMenuItem(bomj_menu[1], 0, "Previous");
        AddMenuItem(bomj_menu[1], 0, "Save");
}
Code:
public OnPlayerSelectedMenuRow(playerid, row)
{
        if(GetPlayerMenu(playerid) == bomj_menu[0])
        {
            switch(row)
            {
                case 0:
                {
                    switch(select_skin[playerid])
                    {
                        case 1: player[playerid][pskin] = 79;
                        case 2: player[playerid][pskin] = 134;
                        case 3: player[playerid][pskin] = 135;
                        case 4: player[playerid][pskin] = 137;
                        case 5: player[playerid][pskin] = 200;
                        case 6: player[playerid][pskin] = 230;
                        case 7: player[playerid][pskin] = 78;
                    }
                    SetPlayerSkin(playerid, player[playerid][pskin]);
                    select_skin[playerid] ++;
                                if(select_skin[playerid] == 8) select_skin[playerid] = 1;
                                ShowMenuForPlayer(bomj_menu[0], playerid);
                }
                case 1:
                {
                    switch(select_skin[playerid])
                    {
                        case 3: player[playerid][pskin] = 79;
                        case 4: player[playerid][pskin] = 134;
                        case 5: player[playerid][pskin] = 135;
                        case 6: player[playerid][pskin] = 137;
                        case 7: player[playerid][pskin] = 200;
                        case 1: player[playerid][pskin] = 230;
                        case 2: player[playerid][pskin] = 78;
                    }
                    SetPlayerSkin(playerid, player[playerid][pskin]);
                    select_skin[playerid] --;
                                if(select_skin[playerid] == 0) select_skin[playerid] = 7;
                                ShowMenuForPlayer(bomj_menu[0], playerid);
                }
                case 2: CreateAccount(playerid);
            }
        }
        else if(GetPlayerMenu(playerid) == bomj_menu[1])
        {
            switch(row)
            {
                case 0:
                {
                    switch(select_skin[playerid])
                    {
                        case 8: player[playerid][pskin] = 39;
                        case 9: player[playerid][pskin] = 54;
                        case 10: player[playerid][pskin] = 10;
                        case 11: player[playerid][pskin] = 77;
                    }
                    SetPlayerSkin(playerid, player[playerid][pskin]);
                    select_skin[playerid] ++;
                                if(select_skin[playerid] == 12) select_skin[playerid] = 8;
                                ShowMenuForPlayer(bomj_menu[1], playerid);
                }
                case 1:
                {
                    switch(select_skin[playerid])
                    {
                        case 10: player[playerid][pskin] = 39;
                        case 11: player[playerid][pskin] = 54;
                        case 8: player[playerid][pskin] = 10;
                        case 9: player[playerid][pskin] = 77;
                    }
                    SetPlayerSkin(playerid, player[playerid][pskin]);
                    select_skin[playerid] --;
                                if(select_skin[playerid] == 7) select_skin[playerid] = 11;
                                ShowMenuForPlayer(bomj_menu[1], playerid);
                }
                case 2: CreateAccount(playerid);
            }
        }
        return true;
}
Может тебе будет лучше сделать так

PHP Code:
new SkinChoice[2][7] =
{
    {
7913413513720023078}, //- Мужики
    
{39541077//- Женщины 
};


public 
OnPlayerSelectedMenuRow(playeridrow)
{
        if(
GetPlayerMenu(playerid) == bomj_menu[0])
        {
            switch(
row)
            {
                case 
0:
                {
                    
select_skin[playerid] ++;
                    if(
select_skin[playerid] >= 8select_skin[playerid] = 0;
                    
SetPlayerSkin(playeridSkinChoice[0][player[playerid][pskin]]);
                    
ShowMenuForPlayer(bomj_menu[0], playerid);
                }
                case 
1:
                {
                    
select_skin[playerid] --;
                    if(
select_skin[playerid] < 0select_skin[playerid] = 6;
                    
SetPlayerSkin(playeridSkinChoice[0][player[playerid][pskin]]);
                    
ShowMenuForPlayer(bomj_menu[0], playerid);
                }
                case 
2CreateAccount(playerid);
            }
        }
        else if(
GetPlayerMenu(playerid) == bomj_menu[1])
        {
            switch(
row)
            {
                case 
0:
                {
                    
select_skin[playerid] ++;
                    if(
select_skin[playerid] >= 4select_skin[playerid] = 0;
                    
SetPlayerSkin(playeridSkinChoice[1][player[playerid][pskin]]);
                    
ShowMenuForPlayer(bomj_menu[1], playerid);

                }
                case 
1:
                {
                    
select_skin[playerid] --;
                    if(
select_skin[playerid] < 0select_skin[playerid] = 3;
                    
SetPlayerSkin(playeridSkinChoice[1][player[playerid][pskin]]);
                    
ShowMenuForPlayer(bomj_menu[1], playerid);
                }
                case 
2CreateAccount(playerid);
            }
        }
        return 
true;
}

Замени где используется 

SetPlayerSkin
(playeridplayer[playerid][pskin]);

на

SetPlayerSkin
(playeridSkinChoice[0/*Пол*/][player[playerid][pskin]]); 
Bren is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Проблема с клиентом SAMP Johurt Русский/Russian 1 05/06/2017 03:59 AM
Влияние samp.ban на сервер(проблема) mariocarver Русский/Russian 14 17/01/2016 02:30 PM
проблема с кодировкой samp.ban 26_RUSSS Русский/Russian 7 11/07/2013 07:24 AM
Kick. Проблема samp 0.3х. DANGER1979 Русский/Russian 21 12/03/2013 10:47 PM
MXini проблема с ini_getFloat (проблема с чтением файла) krik Русский/Russian 0 26/06/2011 02:56 PM


All times are GMT. The time now is 03:32 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.