PDA

View Full Version : Menu Row Help


sas10
19/03/2017, 06:31 AM
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
public OnPlayerEnterDynamicCP(playerid, checkpointid)
{
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;
}
}
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 :D
http://store6.up-00.com/2017-03/148990506757541.png

sas10
19/03/2017, 05:35 PM
Help Please

sas10
20/03/2017, 01:16 PM
Somone can help me please!

LazzyBoy
20/03/2017, 01:20 PM
Make it with Selectable textdraw ?

sas10
20/03/2017, 01:23 PM
Make it with Selectable textdraw ?

i like to make it with numbers :D
but need help please!

LazzyBoy
20/03/2017, 01:54 PM
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

coool
20/03/2017, 04:03 PM
I think you want this:


public OnPlayerText(playerid, text[])
{
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
}
}

sas10
20/03/2017, 09:02 PM
there any esey way to change it like dialog ? with out problem and error!!!
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;
}
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;
}

sas10
21/03/2017, 07:34 PM
pls help!!!

coool
22/03/2017, 06:20 AM
there any esey way to change it like dialog ? with out problem and error!!!
It is already dialoged.

sas10
22/03/2017, 06:28 AM
It is already dialoged.

i know but i need esey way to change it fast to menu row