Menu Row Help
#1

Hi
i Want Help in Menu Row This First Time To Use it
i Want Change My System House the old dialog To The Write with *numbers*
i done made all textdraw for it
PHP код:
    public OnPlayerEnterDynamicCP(playeridcheckpointid)
{
            if(!
strcmp(hInfo[h][HouseOwner], INVALID_HOWNER_NAMECASE_SENSETIVE) && hInfo[h][HouseValue] > && GetPVarInt(playerid"JustCreatedHouse") == 0)
                {
                    
format(stringsizeof(string), HMENU_BUY_HOUSEhInfo[h][HouseValue]);
                    
ShowPlayerDialog(playeridHOUSEMENU+4DIALOG_STYLE_MSGBOXINFORMATION_HEADERstring"Buy""Cancel");
                    break;
                }
            } 
how to make
Buy = 1
Cancel Buy = 2
in Write ? to appeal to buy or cancel order
and this my textdraw i know how to add it this not my problem any way the top code the problems to make it with numbers i can add it Buy and Cancel buy with number now or ?
my TextDraw Here i made it but still need helping in Write Numbers
Reply
#2

Help Please
Reply
#3

Somone can help me please!
Reply
#4

Make it with Selectable textdraw ?
Reply
#5

Quote:
Originally Posted by LazzyBoy
Посмотреть сообщение
Make it with Selectable textdraw ?
i like to make it with numbers
but need help please!
Reply
#6

at OnDialogResponse
Код:
if(dialogid == dialogid && response == 1)
    {
     if(inputtext[0] == '1')
       {
          // do what you want
       }
     else if(inputtext[0] == '2')
      {
        // do what you want
       }
    return 1;
    }
Make sure the dialog style is DIALOG_STYLE_INPUT
Reply
#7

I think you want this:
PHP код:

public OnPlayerText(playeridtext[])
{
    if(
IsPlayerUsingTextDraw[playerid] = true)  //You have to create this bool yourself and assign value when appropriate
    
{
          if(
strcmp(text"1"false)) //Here we are checking if " 1 " and text are equal.
          
{
                  
//do here what you want.
          
}
    
          return 
0// prevent the text to be put in the chat
    
}

Reply
#8

there any esey way to change it like dialog ? with out problem and error!!!
Quote:

public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
{
new string[256], tmpstring[50];
foreach(Houses, h)
{
if(checkpointid == HouseCPOut[h])
{
SetPVarInt(playerid, "LastHouseCP", h);
if(!strcmp(hInfo[h][HouseOwner], pNick(playerid), CASE_SENSETIVE))
{
SetPlayerHouseInterior(playerid, h);
ShowInfoBoxEx(playerid, COLOUR_INFO, I_HMENU);
break;
}
format(tmpstring, sizeof(tmpstring), "HouseKeys_%d", h);
if(GetPVarInt(playerid, tmpstring) == 1)
{
SetPlayerHouseInterior(playerid, h);
break;
}
if(strcmp(hInfo[h][HouseOwner], pNick(playerid), CASE_SENSETIVE) && strcmp(hInfo[h][HouseOwner], INVALID_HOWNER_NAME, CASE_SENSETIVE))
{
if(hInfo[h][HousePassword] == udb_hash("INVALID_HOUSE_PASSWORD"))
{
switch(hInfo[h][ForSale])
{
case 0: ShowInfoBox(playerid, LABELTEXT2, hInfo[h][HouseName], hInfo[h][HouseOwner], hInfo[h][HouseValue], h);
case 1:
{
switch(hInfo[h][HousePrivacy])
{
case 0: ShowPlayerDialog(playerid, HOUSEMENU+23, DIALOG_STYLE_LIST, INFORMATION_HEADER, "Buy House (Step 1)\nBreak In", "Select", "Cancel");
case 1: ShowPlayerDialog(playerid, HOUSEMENU+23, DIALOG_STYLE_LIST, INFORMATION_HEADER, "Buy House (Step 1)\nBreak In\nEnter House", "Select", "Cancel");
}
}
}
break;
}
if(hInfo[h][HousePassword] != udb_hash("INVALID_HOUSE_PASSWORD"))
{
switch(hInfo[h][ForSale])
{
case 0:
{
switch(hInfo[h][HousePrivacy])
{
case 0: ShowPlayerDialog(playerid, HOUSEMENU+28, DIALOG_STYLE_LIST, INFORMATION_HEADER, "Enter House Using Password\nBreak In", "Select", "Cancel");
case 1: ShowPlayerDialog(playerid, HOUSEMENU+28, DIALOG_STYLE_LIST, INFORMATION_HEADER, "Enter House Using Password\nBreak In\nEnter House", "Select", "Cancel");
}
}
case 1: ShowPlayerDialog(playerid, HOUSEMENU+23, DIALOG_STYLE_LIST, INFORMATION_HEADER, "Buy House (Step 1)\nBreak In\nEnter House", "Select", "Cancel");
}
break;
}
}
if(!strcmp(hInfo[h][HouseOwner], INVALID_HOWNER_NAME, CASE_SENSETIVE) && hInfo[h][HouseValue] > 0 && GetPVarInt(playerid, "JustCreatedHouse") == 0)
{
format(string, sizeof(string), HMENU_BUY_HOUSE, hInfo[h][HouseValue]);
ShowPlayerDialog(playerid, HOUSEMENU+4, DIALOG_STYLE_MSGBOX, INFORMATION_HEADER, string, "Buy", "Cancel");
break;
}
}
if(checkpointid == HouseCPInt[h])
{
switch(GetPVarInt(playerid, "HousePreview"))
{
case 0: ExitHouse(playerid, h);
#if GH_HINTERIOR_UPGRADE == true
case 1:
{
GetPVarString(playerid, "HousePrevName", tmpstring, 50);
format(string, sizeof(string), HMENU_BUY_HINTERIOR, tmpstring, GetPVarInt(playerid, "HousePrevValue"));
ShowPlayerDialog(playerid, HOUSEMENU+17, DIALOG_STYLE_MSGBOX, INFORMATION_HEADER, string, "Buy", "Cancel");
}
#endif
}
break;
}
}
}
return 1;
}

Quote:

function HouseVisiting(playerid)
{
new string[200], tmpstring[50];
GetPVarString(playerid, "HousePrevName", tmpstring, 50);
format(string, sizeof(string), I_HINT_VISIT_OVER, tmpstring, GetPVarInt(playerid, "HousePrevValue"));
ShowPlayerDialog(playerid, HOUSEMENU+17, DIALOG_STYLE_MSGBOX, INFORMATION_HEADER, string, "Buy", "Cancel");
return 1;
}

Reply
#9

Quote:
Originally Posted by sas10
Посмотреть сообщение
there any esey way to change it like dialog ? with out problem and error!!!
It is already dialoged.
Reply
#10

Quote:
Originally Posted by coool
Посмотреть сообщение
It is already dialoged.
i know but i need esey way to change it fast to menu row
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)