Dialogs
#1

pawn Код:
new help[2500];
        strcat(help, "{FF0000}______________________________________________{33AA33}|- BEGINNER GUIDE -|{FF0000}______________________________________________  \n", sizeof(help));
        strcat(help, "{33AA33}|- {FF0000}House System {33AA33}-|\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}You Can Find Houses All Over San Andreas Map. Houses Come Variety Of Different Styles,Sizes ,And Prices\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}Server Has Professional Mapper So They Can Create\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/buyh Is To Buy Available House. And /sellh Is TO Sell Your Current House \n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/lockh Is To Lock Your House. And /unlockh is To Unlock Your House \n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/enterh To Enter a Houses. And /exith To Exit To The House {COLOR_RED}[NOTE: Dont Use Doors]\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/gotoh To Teleport To Your House\n", sizeof(help));
        strcat(help, "{33AA33}|- {FF0000}Vehicle Ownership System {33AA33}-|\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}You Can Find Vehicles All Over San Andereas Map. There are 2000 Vehicles Can Buy, 180 Models ,and 15 Max Vehicles \n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}We Have Many Command For Vehicle Ownership System \n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/vbuy To Buy Vehicles. ,and /vsell To Sell Your Vehicles \n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/vcall To call Your Vehicle One By One. and /vpark to Park Your Vehicle \n", sizeof(help));
        strcat(help, "{33AA33}|- {FF0000}Business System {33AA33}-|\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}Your Bussines Will Earn Specific Ammount Of Money per Hour And That Ammount differs From bussines To Bussines\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/buybiz To Buy A Business, /sellbiz To Sell Your Current Business\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/gotobiz To Teleport To Your Business, /cashbox And Your Money Will be sent to your Bank Account \n", sizeof(help));
        strcat(help, "{33AA33}|- {FF0000}Other {33AA33}-|\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/racehelp To See Race Commands\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/bankhelp(l) To See Laws Commands\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/medichelp(l) To See Medics Commands\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/cellhelp(l) To See Cellphone Commands\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/ganghelp(l) To See Gangs Commands\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/telehelp(l) To See Teleports Commands\n", sizeof(help));
        strcat(help, "{FF0000}________________________________________________________________________________________________________________________________  \n", sizeof(help));
        ShowPlayerDialog(playerid, 12345, DIALOG_STYLE_MSGBOX, "NEW-GENERATION HELP", help, "Close","");

I create That Dialog
When I Click Close
The Dialog Appear Again
And I Click Close Again
And The Dialog Appear Again

And So On
How To Make When i Click Close The Dialog Will Close
Reply
#2

Show me your /help code..
Reply
#3

Show your OnDialogResponse for dialogid==12345
Reply
#4

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 12345)
    {
        if(response == 1)
        {
        new help[2500];
        strcat(help, "{FF0000}______________________________________________{33AA33}|- BEGINNER GUIDE -|{FF0000}______________________________________________  \n", sizeof(help));
        strcat(help, "{33AA33}|- {FF0000}House System {33AA33}-|\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}You Can Find Houses All Over San Andreas Map. Houses Come Variety Of Different Styles,Sizes ,And Prices\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}Server Has Professional Mapper So They Can Create\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/buyh Is To Buy Available House. And /sellh Is TO Sell Your Current House \n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/lockh Is To Lock Your House. And /unlockh is To Unlock Your House \n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/enterh To Enter a Houses. And /exith To Exit To The House {COLOR_RED}[NOTE: Dont Use Doors]\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/gotoh To Teleport To Your House\n", sizeof(help));
        strcat(help, "{33AA33}|- {FF0000}Vehicle Ownership System {33AA33}-|\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}You Can Find Vehicles All Over San Andereas Map. There are 2000 Vehicles Can Buy, 180 Models ,and 15 Max Vehicles \n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}We Have Many Command For Vehicle Ownership System \n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/vbuy To Buy Vehicles. ,and /vsell To Sell Your Vehicles \n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/vcall To call Your Vehicle One By One. and /vpark to Park Your Vehicle \n", sizeof(help));
        strcat(help, "{33AA33}|- {FF0000}Business System {33AA33}-|\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}Your Bussines Will Earn Specific Ammount Of Money per Hour And That Ammount differs From bussines To Bussines\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/buybiz To Buy A Business, /sellbiz To Sell Your Current Business\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/gotobiz To Teleport To Your Business, /cashbox And Your Money Will be sent to your Bank Account \n", sizeof(help));
        strcat(help, "{33AA33}|- {FF0000}Other {33AA33}-|\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/racehelp To See Race Commands\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/bankhelp(l) To See Laws Commands\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/medichelp(l) To See Medics Commands\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/cellhelp(l) To See Cellphone Commands\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/ganghelp(l) To See Gangs Commands\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/telehelp(l) To See Teleports Commands\n", sizeof(help));
        strcat(help, "{FF0000}________________________________________________________________________________________________________________________________  \n", sizeof(help));
        ShowPlayerDialog(playerid, 12345, DIALOG_STYLE_MSGBOX, "NEW-GENERATION HELP", help, "Close","");
        SendClientMessage(playerid, red,"Press ESC To Close The Dialog");
        return 1;
        }
        if(response == 2)
        {
       
            return 1;
        }
    }
Reply
#5

Try this :
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 12345)
    {
        if (!response) return 1;
        if(response == 1)
        {
        new help[2500];
        strcat(help, "{FF0000}______________________________________________{33AA33}|- BEGINNER GUIDE -|{FF0000}______________________________________________  \n", sizeof(help));
        strcat(help, "{33AA33}|- {FF0000}House System {33AA33}-|\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}You Can Find Houses All Over San Andreas Map. Houses Come Variety Of Different Styles,Sizes ,And Prices\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}Server Has Professional Mapper So They Can Create\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/buyh Is To Buy Available House. And /sellh Is TO Sell Your Current House \n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/lockh Is To Lock Your House. And /unlockh is To Unlock Your House \n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/enterh To Enter a Houses. And /exith To Exit To The House {COLOR_RED}[NOTE: Dont Use Doors]\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/gotoh To Teleport To Your House\n", sizeof(help));
        strcat(help, "{33AA33}|- {FF0000}Vehicle Ownership System {33AA33}-|\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}You Can Find Vehicles All Over San Andereas Map. There are 2000 Vehicles Can Buy, 180 Models ,and 15 Max Vehicles \n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}We Have Many Command For Vehicle Ownership System \n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/vbuy To Buy Vehicles. ,and /vsell To Sell Your Vehicles \n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/vcall To call Your Vehicle One By One. and /vpark to Park Your Vehicle \n", sizeof(help));
        strcat(help, "{33AA33}|- {FF0000}Business System {33AA33}-|\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}Your Bussines Will Earn Specific Ammount Of Money per Hour And That Ammount differs From bussines To Bussines\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/buybiz To Buy A Business, /sellbiz To Sell Your Current Business\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/gotobiz To Teleport To Your Business, /cashbox And Your Money Will be sent to your Bank Account \n", sizeof(help));
        strcat(help, "{33AA33}|- {FF0000}Other {33AA33}-|\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/racehelp To See Race Commands\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/bankhelp(l) To See Laws Commands\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/medichelp(l) To See Medics Commands\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/cellhelp(l) To See Cellphone Commands\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/ganghelp(l) To See Gangs Commands\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/telehelp(l) To See Teleports Commands\n", sizeof(help));
        strcat(help, "{FF0000}________________________________________________________________________________________________________________________________  \n", sizeof(help));
        ShowPlayerDialog(playerid, 12345, DIALOG_STYLE_MSGBOX, "NEW-GENERATION HELP", help, "Close","");
        SendClientMessage(playerid, red,"Press ESC To Close The Dialog");
        return 1;
        }
        if(response == 2)
        {
       
            return 1;
        }
    }
Reply
#6

Well, you are saying: If you respond 'Close' to your dialog, show it again.
Remove your code from OnDialogResponse for 12345 and your dialog will dissapear when you press 'Close'

Your 'showplayerdialog' function should only be called on your /help command
Reply
#7

I think he's using it as a list, I mean he does /help >> list opens with options like " Guide to server " .. etc..
If not, then do what Siralos said.
Reply
#8

Then it should be DIALOG_STYLE_LIST, not MSGBOX
Reply
#9

No, Actually Its like this :
pawn Код:
CMD:help(playerid, params[])
{
    ShowPlayerDialog(playerid, DIALOG_FAQ, DIALOG_STYLE_LIST, ".:: Frequently Asked Questions ::."," Guide to server? "," Select "," Cancel");
    return 1;
}
Then OnDialogResponse.. that code ^^...
Reply
#10

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == 12345)
    {
        if (!response) return 1;
        if(response == 1)
        {
        new help[2500];
        strcat(help, "{FF0000}______________________________________________{33AA33}|- BEGINNER GUIDE -|{FF0000}______________________________________________  \n", sizeof(help));
        strcat(help, "{33AA33}|- {FF0000}House System {33AA33}-|\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}You Can Find Houses All Over San Andreas Map. Houses Come Variety Of Different Styles,Sizes ,And Prices\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}Server Has Professional Mapper So They Can Create\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/buyh Is To Buy Available House. And /sellh Is TO Sell Your Current House \n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/lockh Is To Lock Your House. And /unlockh is To Unlock Your House \n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/enterh To Enter a Houses. And /exith To Exit To The House {COLOR_RED}[NOTE: Dont Use Doors]\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/gotoh To Teleport To Your House\n", sizeof(help));
        strcat(help, "{33AA33}|- {FF0000}Vehicle Ownership System {33AA33}-|\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}You Can Find Vehicles All Over San Andereas Map. There are 2000 Vehicles Can Buy, 180 Models ,and 15 Max Vehicles \n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}We Have Many Command For Vehicle Ownership System \n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/vbuy To Buy Vehicles. ,and /vsell To Sell Your Vehicles \n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/vcall To call Your Vehicle One By One. and /vpark to Park Your Vehicle \n", sizeof(help));
        strcat(help, "{33AA33}|- {FF0000}Business System {33AA33}-|\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}Your Bussines Will Earn Specific Ammount Of Money per Hour And That Ammount differs From bussines To Bussines\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/buybiz To Buy A Business, /sellbiz To Sell Your Current Business\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/gotobiz To Teleport To Your Business, /cashbox And Your Money Will be sent to your Bank Account \n", sizeof(help));
        strcat(help, "{33AA33}|- {FF0000}Other {33AA33}-|\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/racehelp To See Race Commands\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/bankhelp(l) To See Laws Commands\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/medichelp(l) To See Medics Commands\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/cellhelp(l) To See Cellphone Commands\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/ganghelp(l) To See Gangs Commands\n", sizeof(help));
        strcat(help, "{FFFF00}- {FFFFFF}/telehelp(l) To See Teleports Commands\n", sizeof(help));
        strcat(help, "{FF0000}________________________________________________________________________________________________________________________________  \n", sizeof(help));
        ShowPlayerDialog(playerid, 12345, DIALOG_STYLE_MSGBOX, "NEW-GENERATION HELP", help, "Close","");
        SendClientMessage(playerid, red,"Press ESC To Close The Dialog");
        return 1;
        }
        if(response == 2)
        {

            return 1;
        }
    }
pawn Код:
public OnPlayerCommandPerformed(playerid, cmdtext[], success)
{
    if(success == 0)
    ShowPlayerDialog(playerid, 12345, DIALOG_STYLE_MSGBOX, "Warning!", "{FF0000} This Command Doesn't Exist, Want To Know The Commands? ","Yes","Cancel");
    return 1;
}
pawn Код:
CMD:help(playerid,params[])
{
    new help[2500];
    strcat(help, "{FF0000}______________________________________________{33AA33}|- BEGINNER GUIDE -|{FF0000}______________________________________________  \n", sizeof(help));
    strcat(help, "{33AA33}|- {FF0000}House System {33AA33}-|\n", sizeof(help));
    strcat(help, "{FFFF00}- {FFFFFF}You Can Find Houses All Over San Andreas Map. Houses Come Variety Of Different Styles,Sizes ,And Prices\n", sizeof(help));
    strcat(help, "{FFFF00}- {FFFFFF}Server Has Professional Mapper So They Can Create\n", sizeof(help));
    strcat(help, "{FFFF00}- {FFFFFF}/buyh Is To Buy Available House. And /sellh Is TO Sell Your Current House \n", sizeof(help));
    strcat(help, "{FFFF00}- {FFFFFF}/lockh Is To Lock Your House. And /unlockh is To Unlock Your House \n", sizeof(help));
    strcat(help, "{FFFF00}- {FFFFFF}/enterh To Enter a Houses. And /exith To Exit To The House {COLOR_RED}[NOTE: Dont Use Doors]\n", sizeof(help));
    strcat(help, "{FFFF00}- {FFFFFF}/gotoh To Teleport To Your House\n", sizeof(help));
    strcat(help, "{33AA33}|- {FF0000}Vehicle Ownership System {33AA33}-|\n", sizeof(help));
    strcat(help, "{FFFF00}- {FFFFFF}You Can Find Vehicles All Over San Andereas Map. There are 2000 Vehicles Can Buy, 180 Models ,and 15 Max Vehicles \n", sizeof(help));
    strcat(help, "{FFFF00}- {FFFFFF}We Have Many Command For Vehicle Ownership System \n", sizeof(help));
    strcat(help, "{FFFF00}- {FFFFFF}/vbuy To Buy Vehicles. ,and /vsell To Sell Your Vehicles \n", sizeof(help));
    strcat(help, "{FFFF00}- {FFFFFF}/vcall To call Your Vehicle One By One. and /vpark to Park Your Vehicle \n", sizeof(help));
    strcat(help, "{33AA33}|- {FF0000}Business System {33AA33}-|\n", sizeof(help));
    strcat(help, "{FFFF00}- {FFFFFF}Your Bussines Will Earn Specific Ammount Of Money per Hour And That Ammount differs From bussines To Bussines\n", sizeof(help));
    strcat(help, "{FFFF00}- {FFFFFF}/buybiz To Buy A Business, /sellbiz To Sell Your Current Business\n", sizeof(help));
    strcat(help, "{FFFF00}- {FFFFFF}/gotobiz To Teleport To Your Business, /cashbox And Your Money Will be sent to your Bank Account \n", sizeof(help));
    strcat(help, "{33AA33}|- {FF0000}Other {33AA33}-|\n", sizeof(help));
    strcat(help, "{FFFF00}- {FFFFFF}/racehelp To See Race Commands\n", sizeof(help));
    strcat(help, "{FFFF00}- {FFFFFF}/bankhelp(l) To See Laws Commands\n", sizeof(help));
    strcat(help, "{FFFF00}- {FFFFFF}/medichelp(l) To See Medics Commands\n", sizeof(help));
    strcat(help, "{FFFF00}- {FFFFFF}/cellhelp(l) To See Cellphone Commands\n", sizeof(help));
    strcat(help, "{FFFF00}- {FFFFFF}/ganghelp(l) To See Gangs Commands\n", sizeof(help));
    strcat(help, "{FFFF00}- {FFFFFF}/telehelp(l) To See Teleports Commands\n", sizeof(help));
    strcat(help, "{FF0000}________________________________________________________________________________________________________________________________  \n", sizeof(help));
    ShowPlayerDialog(playerid, 12345, DIALOG_STYLE_MSGBOX, "NEW-GENERATION HELP", help, "Close","");
    SendClientMessage(playerid, red,"Press ESC To Close The Dialog");
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)