OnDialogResponse -.-
#1

PHP код:
}
        }
        case 
10:
        {
            switch(
listitem)
            {
                case 
0// Asjad
                
{
                       
SendClientMessage(playerid,0xFFFFFFAA" Sa vastasid {AA3333}VALESTI! ");
                    
Kick(playerid);
                }
                case 
1:
                {
                      
SendClientMessage(playerid,0xFFFFFFAA" Sa vastasid {33AA33}ХIETI! ");
                      
SendClientMessage(playerid,0xFFFFFFAA" Sa lдbisid edukalt meie serveri Rollimдngu testi. ");
                      
ShowPlayerDialog(playerid,999,DIALOG_STYLE_PASSWORD,"Tдhelepanu!","Serverisse sisse logimiseks kirjuta parool {33AA33}siia lahtrisse:","Logi Sisse","Lahku");
                }
                case 
2:
                {
                    
SendClientMessage(playerid,0xFFFFFFAA" Sa vastasid {AA3333}VALESTI! ");
                    
Kick(playerid);
                }
                case 
3:
                {
                    
SendClientMessage(playerid,0xFFFFFFAA" Sa vastasid {AA3333}VALESTI! ");
                    
Kick(playerid);
                 }
            }
        }
        case 
11:
        {
            switch(
listitem)
            {
                case 
0// Asjad
                
{
                       
SendClientMessage(playerid,0xFFFFFFAA" Sa soovisid tankida 25 liitrit bensiini.  ");
                       
GivePlayerMoney(playerid,-50);
                }
                case 
1:
                {
                    
SendClientMessage(playerid,0xFFFFFFAA" Sa soovisid tankida 50 liitrit bensiini. ");
                    
GivePlayerMoney(playerid,-100);
                }
                 case 
2:
                {
                    
SendClientMessage(playerid,0xFFFFFFAA" Sa soovisid tankida 75 liitrit bensiini. ");
                    
GivePlayerMoney(playerid,-150);
                }
                 case 
3:
                {
                    
SendClientMessage(playerid,0xFFFFFFAA" Sa soovisid tankida 100 liitrit bensiini. ");    
                    }
                   }
             }
        case 
12:
        {
            switch(
999)
            {
                case 
0// Asjad
                
{
                       
SendClientMessage(playerid,0xFFFFFFAA" Meeldivat mдnguelamust Eestimaa Rollimдngu serveris!  ");
                       
SetPlayerPos(playerid1743.0470,-1862.8025,13.5758);
                }
                case 
1:
                {
                    
SendClientMessage(playerid,0xAA3333AA" Sa tьhistasid registreerimise. ");
                    
Kick(playerid);
                } 
Why does that case 12 wont work?
Can somebody please help me?
Thanks
Reply
#2

o_O why is your cases on random positions on your script,

should be something like this

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    if(
dialogid==*yourdialogidhere)
    {
        if(
response)
            {
             if(
listitem) == 0//or you could use cases
                
{
                     
//stuffstuff
                
}
            }
           return 
1;
     }    
    return 
0;

and why is there a colon on the end of cases?
Reply
#3

1) Its Estonian
2) No errors, but it wont work in game.
Reply
#4

pawn Код:
case 10:
        {
            switch(listitem)
            {
                case 0: // Asjad
                {
                       SendClientMessage(playerid,0xFFFFFFAA, " Sa vastasid {AA3333}VALESTI! ");
                    Kick(playerid);
                }
                case 1:
                {
                      SendClientMessage(playerid,0xFFFFFFAA, " Sa vastasid {33AA33}ХIETI! ");
                      SendClientMessage(playerid,0xFFFFFFAA, " Sa lдbisid edukalt meie serveri Rollimдngu testi. ");
                      ShowPlayerDialog(playerid,999,DIALOG_STYLE_PASSWORD,"Tдhelepanu!","Serverisse sisse logimiseks kirjuta parool {33AA33}siia lahtrisse:","Logi Sisse","Lahku");
                }
                case 2:
                {
                    SendClientMessage(playerid,0xFFFFFFAA, " Sa vastasid {AA3333}VALESTI! ");
                    Kick(playerid);
                }
                case 3:
                {
                    SendClientMessage(playerid,0xFFFFFFAA, " Sa vastasid {AA3333}VALESTI! ");
                    Kick(playerid);
                 }
            }
        }
        case 11:
        {
            switch(listitem)
            {
                case 0: // Asjad
                {
                       SendClientMessage(playerid,0xFFFFFFAA, " Sa soovisid tankida 25 liitrit bensiini.  ");
                       GivePlayerMoney(playerid,-50);
                }
                case 1:
                {
                    SendClientMessage(playerid,0xFFFFFFAA, " Sa soovisid tankida 50 liitrit bensiini. ");
                    GivePlayerMoney(playerid,-100);
                }
                 case 2:
                {
                    SendClientMessage(playerid,0xFFFFFFAA, " Sa soovisid tankida 75 liitrit bensiini. ");
                    GivePlayerMoney(playerid,-150);
                }
                 case 3:
                {
                    SendClientMessage(playerid,0xFFFFFFAA, " Sa soovisid tankida 100 liitrit bensiini. ");    
                    }
                   }
             }
        }//THIS BRACE ?!?!?!?!
        case 12:
        {
Maybe this was wrong? I didn't read the whole code
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)