SA-MP Forums Archive
DIALOG_STYLE_MSGBOX help. - 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)
+--- Thread: DIALOG_STYLE_MSGBOX help. (/showthread.php?tid=596474)



DIALOG_STYLE_MSGBOX help. - N0FeaR - 18.12.2015

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;




Re: DIALOG_STYLE_MSGBOX help. - Sh4d0w2 - 18.12.2015

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


Re: DIALOG_STYLE_MSGBOX help. - N0FeaR - 18.12.2015

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


Re: DIALOG_STYLE_MSGBOX help. - Sh4d0w2 - 18.12.2015

Did you try it?


Re: DIALOG_STYLE_MSGBOX help. - iKarim - 18.12.2015

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""");
        }
    } 



Re: DIALOG_STYLE_MSGBOX help. - SilverStand - 18.12.2015

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", "");
        }
    }



Re: DIALOG_STYLE_MSGBOX help. - Threshold - 18.12.2015

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...


Re: DIALOG_STYLE_MSGBOX help. - ikey07 - 18.12.2015

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", "");


Re: DIALOG_STYLE_MSGBOX help. - Ahmad45123 - 18.12.2015

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.


Re: DIALOG_STYLE_MSGBOX help. - Threshold - 19.12.2015

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