SA-MP Forums Archive
[HELP] Menu problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [HELP] Menu problem (/showthread.php?tid=197884)



[HELP] Menu problem - ukraine1594 - 10.12.2010

Well, I've created an pickup for Cops where they can choose their skin. But well, I got a error. I want to do that, if they choose the "Next", they should come a next skin, and again if they do next again a next skin, and so on. I wanted to add 4 skins there. And if they do "accept" should have the skin then as cop.
But by my function its: If I press button next, the menu is going to close. By doing Accept comes nothing, because I dont know how to do that, that they accept the skin.

Please help guys!!




PHP код:
    lspdskinmenu=CreateMenu("Skins"14.000000222.000000100.0100.0);
    
AddMenuItem(lspdskinmenu0"Next Skin");
    
AddMenuItem(lspdskinmenu0"Accept"); 
PHP код:
public OnPlayerSelectedMenuRow(playeridrow)
{
    new 
Menu:CurrentMenulspd GetPlayerMenu(playerid);
    if(
CurrentMenulspd == lspdskinmenu)
    {
         switch(
row)
        {
            case 
0//Case 0 fьr erste Item im Menu
            
{
                if(
GetPlayerTeam(playerid) == 1)
                {
                    
SetPlayerSkin(playerid266);
                }
                else
                {
                    
SendClientMessage(playerid,0xA50000FF"You're not a Cop");
                }
            }
            case 
1:
            {
            
            }
        }
    }