DIALOG_STYLE_MSGBOX help.
#1

Nothing show up, thanks in advance!

PHP код:
if(dialogid == DIALOG_HELP)
    {
        switch(
response)
          {
            case 
1:
              {
                switch(
listitem)
                  {
                    case 
1:
                    {
                         new 
szString[128];
                          
format(szStringsizeof(szString),"/rules /faq /(net)stats /inventory /quickstats /myguns /buylevel /upgrade /changepass /killcheckpoint /resetupgrades(100k)");
                         
format(szStringsizeof(szString),"\n/w(hisper) /o(oc) /s(hout) /l(ow) /b /ad(vertisement)s /f(amily) /me /togooc /tognews /togfam /togwhisper /do /cancelcall");
                         
format(szStringsizeof(szString),"\n/balance /withdraw /deposit /wiretransfer /abalance /awithdraw /adeposit /awiretransfer");
                         
format(szStringsizeof(szString),"\n/pay /writecheck /cashchecks /charity /time /buy /(check)id /music /showlicenses /clothes /mywarrants");
                          
format(szStringsizeof(szString),"\n/apply /skill /stopani /kill /buyclothes /droplicense /calculate /refuel /car /seatbelt /checkbelt, /defendtime");
                          
format(szStringsizeof(szString),"\n/cancel /accept /eject /usepot /usecrack /contract /service /families /joinevent /checkplant /nextpaycheck, /nextgift, /pointtime");
                          
format(szStringsizeof(szString),"\n/speedo /speedopos /viewmotd");
                          
ShowPlayerDialog(playerid,DIALOG_HELP,DIALOG_STYLE_MSGBOX,"Basic commands",szString,"Ok""");
                      } 
PHP код:
CMD:help(playeridparams[])
{
    
ShowPlayerDialog(playerid,DIALOG_HELP,DIALOG_STYLE_LIST,"Help Menu","{33FF66}Basic Commands","Continue""Cancel");
    return 
1;

Reply
#2

PHP код:
new szString[256] , sString[256];
format(szStringsizeof(szString),"/rules /faq /(net)stats /inventory /quickstats /myguns /buylevel /upgrade /changepass /killcheckpoint /resetupgrades(100k)");
strcat(sString,szString);
format(szStringsizeof(szString),"\n/w(hisper) /o(oc) /s(hout) /l(ow) /b /ad(vertisement)s /f(amily) /me /togooc /tognews /togfam /togwhisper /do /cancelcall");
strcat(sString,szString);
format(szStringsizeof(szString),"\n/balance /withdraw /deposit /wiretransfer /abalance /awithdraw /adeposit /awiretransfer");
strcat(sString,szString);
format(szStringsizeof(szString),"\n/pay /writecheck /cashchecks /charity /time /buy /(check)id /music /showlicenses /clothes /mywarrants");
strcat(sString,szString);
format(szStringsizeof(szString),"\n/apply /skill /stopani /kill /buyclothes /droplicense /calculate /refuel /car /seatbelt /checkbelt, /defendtime");
strcat(sString,szString);
format(szStringsizeof(szString),"\n/cancel /accept /eject /usepot /usecrack /contract /service /families /joinevent /checkplant /nextpaycheck, /nextgift, /pointtime");
strcat(sString,szString);
format(szStringsizeof(szString),"\n/speedo /speedopos /viewmotd");
strcat(sString,szString);
ShowPlayerDialog(playerid,DIALOG_HELP,DIALOG_STYLE_MSGBOX,"Basic commands",sString,"Ok"""); 
Try it
Reply
#3

Quote:
Originally Posted by Sh4d0w2
Посмотреть сообщение
PHP код:
new szString[256] , sString[256];
format(szStringsizeof(szString),"/rules /faq /(net)stats /inventory /quickstats /myguns /buylevel /upgrade /changepass /killcheckpoint /resetupgrades(100k)");
strcat(sString,szString);
format(szStringsizeof(szString),"\n/w(hisper) /o(oc) /s(hout) /l(ow) /b /ad(vertisement)s /f(amily) /me /togooc /tognews /togfam /togwhisper /do /cancelcall");
strcat(sString,szString);
format(szStringsizeof(szString),"\n/balance /withdraw /deposit /wiretransfer /abalance /awithdraw /adeposit /awiretransfer");
strcat(sString,szString);
format(szStringsizeof(szString),"\n/pay /writecheck /cashchecks /charity /time /buy /(check)id /music /showlicenses /clothes /mywarrants");
strcat(sString,szString);
format(szStringsizeof(szString),"\n/apply /skill /stopani /kill /buyclothes /droplicense /calculate /refuel /car /seatbelt /checkbelt, /defendtime");
strcat(sString,szString);
format(szStringsizeof(szString),"\n/cancel /accept /eject /usepot /usecrack /contract /service /families /joinevent /checkplant /nextpaycheck, /nextgift, /pointtime");
strcat(sString,szString);
format(szStringsizeof(szString),"\n/speedo /speedopos /viewmotd");
strcat(sString,szString);
ShowPlayerDialog(playerid,DIALOG_HELP,DIALOG_STYLE_MSGBOX,"Basic commands",sString,"Ok"""); 
Try it
That would change nothing i guess :P
Reply
#4

Did you try it?
Reply
#5

This should work. Theres no listitem param while using MSGBOX style.
replace your whole " if(dialogid == DIALOG_HELP) { ..... } "
with this.
PHP код:
    if(dialogid == DIALOG_HELP)
    {
        if(
response)
        {
            new 
szString[128];
            
format(szStringsizeof(szString),"/rules /faq /(net)stats /inventory /quickstats /myguns /buylevel /upgrade /changepass /killcheckpoint /resetupgrades(100k)");
            
format(szStringsizeof(szString),"\n/w(hisper) /o(oc) /s(hout) /l(ow) /b /ad(vertisement)s /f(amily) /me /togooc /tognews /togfam /togwhisper /do /cancelcall");
            
format(szStringsizeof(szString),"\n/balance /withdraw /deposit /wiretransfer /abalance /awithdraw /adeposit /awiretransfer");
            
format(szStringsizeof(szString),"\n/pay /writecheck /cashchecks /charity /time /buy /(check)id /music /showlicenses /clothes /mywarrants");
            
format(szStringsizeof(szString),"\n/apply /skill /stopani /kill /buyclothes /droplicense /calculate /refuel /car /seatbelt /checkbelt, /defendtime");
            
format(szStringsizeof(szString),"\n/cancel /accept /eject /usepot /usecrack /contract /service /families /joinevent /checkplant /nextpaycheck, /nextgift, /pointtime");
            
format(szStringsizeof(szString),"\n/speedo /speedopos /viewmotd");
            
ShowPlayerDialog(playerid,DIALOG_HELP,DIALOG_STYLE_MSGBOX,"Basic commands",szString,"Ok""");
        }
    } 
Reply
#6

Try this

Код:
    if(dialogid == DIALOG_HELP)
    {
        if(response)
        {
            new szString[1200];
            format(szString, sizeof(szString),"%s /rules /faq /(net)stats /inventory /quickstats /myguns /buylevel /upgrade /changepass /killcheckpoint /resetupgrades(100k)", szString);
            format(szString, sizeof(szString),"%s \n/w(hisper) /o(oc) /s(hout) /l(ow) /b /ad(vertisement)s /f(amily) /me /togooc /tognews /togfam /togwhisper /do /cancelcall", szString);
            format(szString, sizeof(szString),"%s \n/balance /withdraw /deposit /wiretransfer /abalance /awithdraw /adeposit /awiretransfer", szString);
            format(szString, sizeof(szString),"%s \n/pay /writecheck /cashchecks /charity /time /buy /(check)id /music /showlicenses /clothes /mywarrants", szString);
            format(szString, sizeof(szString),"%s \n/apply /skill /stopani /kill /buyclothes /droplicense /calculate /refuel /car /seatbelt /checkbelt, /defendtime", szString);
            format(szString, sizeof(szString),"%s \n/cancel /accept /eject /usepot /usecrack /contract /service /families /joinevent /checkplant /nextpaycheck, /nextgift, /pointtime", szString);
            format(szString, sizeof(szString),"%s \n/speedo /speedopos /viewmotd", szString);
            ShowPlayerDialog(playerid,DIALOG_HELP,DIALOG_STYLE_MSGBOX,"Basic commands",szString,"Ok", "");
        }
    }
Reply
#7

Do you guys even know how format works? You should avoid it if it's unnecessary... especially in an extremely obvious case like this...

pawn Код:
new szString[700];
strcat(szString, "/rules /faq /(net)stats /inventory /quickstats /myguns /buylevel /upgrade /changepass /killcheckpoint /resetupgrades(100k)");
strcat(szString, "\n/w(hisper) /o(oc) /s(hout) /l(ow) /b /ad(vertisement)s /f(amily) /me /togooc /tognews /togfam /togwhisper /do /cancelcall");
strcat(szString, "\n/balance /withdraw /deposit /wiretransfer /abalance /awithdraw /adeposit /awiretransfer");
strcat(szString, "\n/pay /writecheck /cashchecks /charity /time /buy /(check)id /music /showlicenses /clothes /mywarrants");
strcat(szString, "\n/apply /skill /stopani /kill /buyclothes /droplicense /calculate /refuel /car /seatbelt /checkbelt, /defendtime");
strcat(szString, "\n/cancel /accept /eject /usepot /usecrack /contract /service /families /joinevent /checkplant /nextpaycheck, /nextgift, /pointtime");
strcat(szString, "\n/speedo /speedopos /viewmotd");
ShowPlayerDialog(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "Basic commands", szString, "Ok", "");
Read the goddamn wiki before posting shit like this...
Reply
#8

This is a help forum @Threshold, just help if you can, or be quiet.


@ N0FeaR use strcat

new szString[1024];
strcat(szString,"CMD.....\n");
strcat(szString,"CMD More.....\n");
strcat(szString,"CMD More and More.....");

ShowPlayerDialog(playerid,DIALOG_HELP,DIALOG_STYLE _MSGBOX,"Basic commands",szString,"Ok", "");
Reply
#9

Quote:
Originally Posted by Threshold
Посмотреть сообщение
Do you guys even know how format works? You should avoid it if it's unnecessary... especially in an extremely obvious case like this...

pawn Код:
new szString[700];
strcat(szString, "/rules /faq /(net)stats /inventory /quickstats /myguns /buylevel /upgrade /changepass /killcheckpoint /resetupgrades(100k)");
strcat(szString, "\n/w(hisper) /o(oc) /s(hout) /l(ow) /b /ad(vertisement)s /f(amily) /me /togooc /tognews /togfam /togwhisper /do /cancelcall");
strcat(szString, "\n/balance /withdraw /deposit /wiretransfer /abalance /awithdraw /adeposit /awiretransfer");
strcat(szString, "\n/pay /writecheck /cashchecks /charity /time /buy /(check)id /music /showlicenses /clothes /mywarrants");
strcat(szString, "\n/apply /skill /stopani /kill /buyclothes /droplicense /calculate /refuel /car /seatbelt /checkbelt, /defendtime");
strcat(szString, "\n/cancel /accept /eject /usepot /usecrack /contract /service /families /joinevent /checkplant /nextpaycheck, /nextgift, /pointtime");
strcat(szString, "\n/speedo /speedopos /viewmotd");
ShowPlayerDialog(playerid, DIALOG_HELP, DIALOG_STYLE_MSGBOX, "Basic commands", szString, "Ok", "");
Read the goddamn wiki before posting shit like this...
You should have said what to use in replacement and not just yell out that it's wrong..

To OP, use strcat, it does just as you want.
Reply
#10

Unless he has trouble actually reading code, I think he can understand my post... it's how I learned, he can do it too.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)