Jump to content
  • 0

Nu merg dialogurile


Question

6 answers to this question

Recommended Posts

Posted

[pawn]public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])

{

new string[400], _tmpstring[256], INI:file, filename[HOUSEFILE_LENGTH], h = GetPVarInt(playerid, "LastHouseCP"), amount = floatround(strval(inputtext));

    format(filename, sizeof(filename), FILEPATH, h);

if(dialogid == HOUSEMENU && response)

{

    switch(listitem)

{

    case 0: ShowPlayerDialog(playerid, HOUSEMENU+19, DIALOG_STYLE_LIST, INFORMATION_HEADER, "Set House For Sale\nCancel Active House Sale\nSell House", "Select", "Cancel");

    case 1:

{

#if GH_USE_HOUSESTORAGE == false

ShowInfoBoxEx(playerid, COLOUR_INFO, E_NO_HOUSESTORAGE);

#else

#if GH_USE_WEAPONSTORAGE == true

ShowPlayerDialog(playerid, HOUSEMENU+18, DIALOG_STYLE_LIST, INFORMATION_HEADER, "Money Storage\nWeapon Storage", "Select", "Cancel");

#else

ShowPlayerDialog(playerid, HOUSEMENU+10, DIALOG_STYLE_LIST, INFORMATION_HEADER, "Deposit Money\nWithdraw Money\nCheck Balance", "Select", "Cancel");

#endif

#endif

}

case 2: ShowPlayerDialog(playerid, HOUSEMENU+14, DIALOG_STYLE_INPUT, INFORMATION_HEADER, "Type In The New House Name Below:\n\nPress 'Cancel' To Cancel", "Done", "Cancel");

    case 3: ShowPlayerDialog(playerid, HOUSEMENU+13, DIALOG_STYLE_INPUT, INFORMATION_HEADER, "Type In The New House Password Below:\nLeave The Box Empty If You Want To Keep Your Current House Password.\nPress 'Remove' To Remove The House Password.", "Done", "Remove");

case 4:

{

#if GH_HINTERIOR_UPGRADE == true

ShowPlayerDialog(playerid, HOUSEMENU+16, DIALOG_STYLE_LIST, INFORMATION_HEADER, "Preview House Interior\nBuy House Interior", "Select", "Cancel");

#else

                ShowPlayerDialog(playerid, HOUSEMENU+24, DIALOG_STYLE_LIST, INFORMATION_HEADER, "Open House For Visitors\nClose House For Visitors", "Select", "Cancel");

#endif

}

case 5:

{

    #if GH_HINTERIOR_UPGRADE == true

ShowPlayerDialog(playerid, HOUSEMENU+24, DIALOG_STYLE_LIST, INFORMATION_HEADER, "Open House For Visitors\nClose House For Visitors", "Select", "Cancel");

#else

new tmpcount = 1, total = (CountPlayersInHouse(h) - 1);

if(CountPlayersInHouse(h) == 0) return ShowInfoBoxEx(playerid, COLOUR_SYSTEM, E_NONE_IN_HOUSE);

CMDSString = "";

foreach(Player, i)

{

    if(!IsPlayerInHouse(i, h)) continue;

    if(playerid == i) continue;

if(tmpcount == total)

{

    format(_tmpstring, sizeof(_tmpstring), "{00BC00}%d.\t{FFFF2A}%s in %s", tmpcount, pNick(i), i);

}

else format(_tmpstring, sizeof(_tmpstring), "{00BC00}%d.\t{FFFF2A}%s (%d)\n", tmpcount, pNick(i), i);

strcat(CMDSString, _tmpstring);

tmpcount++;

}

ShowPlayerDialog(playerid, HOUSEMENU+25, DIALOG_STYLE_LIST, INFORMATION_HEADER, CMDSString, "Select", "Cancel");

#endif

}

case 6:

{

    #if GH_HINTERIOR_UPGRADE == true

new tmpcount = 1, total = (CountPlayersInHouse(h) - 1);

if(CountPlayersInHouse(h) == 0) return ShowInfoBoxEx(playerid, COLOUR_SYSTEM, E_NONE_IN_HOUSE);

CMDSString = "";

foreach(Player, i)

{

    if(!IsPlayerInHouse(i, h)) continue;

    if(playerid == i) continue;

if(tmpcount == total)

{

    format(_tmpstring, sizeof(_tmpstring), "{00BC00}%d.\t{FFFF2A}%s in %s", tmpcount, pNick(i), i);

}

else format(_tmpstring, sizeof(_tmpstring), "{00BC00}%d.\t{FFFF2A}%s (%d)\n", tmpcount, pNick(i), i);

strcat(CMDSString, _tmpstring);

tmpcount++;

}

ShowPlayerDialog(playerid, HOUSEMENU+25, DIALOG_STYLE_LIST, INFORMATION_HEADER, CMDSString, "Select", "Cancel");

#else

                ShowPlayerDialog(playerid, HOUSEMENU+27, DIALOG_STYLE_LIST, INFORMATION_HEADER, "Buy House Alarm\t\t$"#HUPGRADE_ALARM"\nBuy Security Camera\t\t$"#HUPGRADE_CAMERA"\nBuy House Security Dog\t$"#HUPGRADE_DOG"\nBuy Better Houselock\t\t$"#HUPGRADE_UPGRADED_HLOCK"", "Select", "Cancel");

#endif

}

case 7: ShowPlayerDialog(playerid, HOUSEMENU+27, DIALOG_STYLE_LIST, INFORMATION_HEADER, "Buy House Alarm\t\t$"#HUPGRADE_ALARM"\nBuy Security Camera\t\t$"#HUPGRADE_CAMERA"\nBuy House Security Dog\t$"#HUPGRADE_DOG"\nBuy Better Houselock\t\t$"#HUPGRADE_UPGRADED_HLOCK"", "Select", "Cancel");

}

return 1;

}

[/pawn]

Eu am sters alea cu melodiile. Inainte cand erau acele melodii cand apasam de exemplu pe la a patra optiune din ExitHouse imi aparea ca ascult X melodie.

[email protected] - Orice mapa doriti , add me !

Posted

Ai la sfarsit la OnDialogResponse return 0 dupa acel return 1?

Daca nu pune.

Asa trebuie sa arate.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.