SA-MP Forums Archive
Dialogs not works.. - 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: Dialogs not works.. (/showthread.php?tid=625819)



Dialogs not works.. - RedRex - 06.01.2017

Hello, the dialogs are not working Why? Can you helping me? Im not gotting any ERROR/WARRING But when i typen /hmenu its work but when i try to Edit price or something not work

NOTE: Im using Jake's House system

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
	new hid = h_ID[playerid];

	if(dialogid == DIALOG_HMENU)
	{
	    if(response)
	    {
	        switch(listitem)
	        {
	            case 0:
	            {
	                ShowPlayerDialog(playerid, DIALOG_HNAME, DIALOG_STYLE_INPUT, ""green"House Name",\
	                ""white"You are now editing the name of your house.\nPut the name of your house below (E.G. Jake's House)\n\nMaximum Length for the house name: 100", "Configure", "Back");
	            }
	            case 1:
	            {
	                ShowPlayerDialog(playerid, DIALOG_HPRICE, DIALOG_STYLE_INPUT, ""green"House Price ($)",\
	                ""white"You are now editing the price of your house.\nPut the price of your house below (E.G. 500)", "Configure", "Back");
	            }
	            case 2:
	            {
	                ShowPlayerDialog(playerid, DIALOG_HSTOREC, DIALOG_STYLE_INPUT, ""green"Store Cash ($)",\
	                ""white"You are now storing your money into your house safe.\nPut the amount of cash you want to store into your house. (E.G. 500)", "Configure", "Back");
				}
				case 3:
				{
	                ShowPlayerDialog(playerid, DIALOG_WCASH, DIALOG_STYLE_INPUT, ""green"Withdraw Cash ($)",\
	                ""white"You are now withdrawing a money from your house safe.\nPut the amount of cash you want to withdraw from your house safe. (E.G. 500)", "Configure", "Back");
				}
				case 4:
				{
				    new string[1000];
				    format(string, sizeof(string), ""white"Your house safe status:\n\nCash Stored: "green"$%d\n"white"Notes:\n"red"%s", hInfo[hid][MoneyStore], hInfo[hid][hNotes]);
				    ShowPlayerDialog(playerid, DIALOG_HSTORE, DIALOG_STYLE_MSGBOX, ""green"Storage Info",\
				    string, "Back", "");
				}
				case 5:
				{
	                ShowPlayerDialog(playerid, DIALOG_HWORLD, DIALOG_STYLE_INPUT, ""green"Virtual World",\
	                ""white"You are now editing the virtual world of your house (inside).\nPut the virtual world you want to set to your house. (E.G. 1)", "Configure", "Back");
				}
				case 6:
				{
				    new string[1200];
				
				    for(new a=0; a<sizeof(intInfo); a++)
				    {
				        format(string, sizeof(string), "%s%s - $%d\n", string, intInfo[a][Name], intInfo[a][i_Price]);
				    }
					ShowPlayerDialog(playerid, DIALOG_HINTERIOR, DIALOG_STYLE_LIST, ""green"Interior", string, "Preview", "Back");
				}
				case 7:
				{
				    if(jpInfo[playerid][p_Spawn] == 0)
				    {
				        ShowPlayerDialog(playerid, DIALOG_HSPAWN, DIALOG_STYLE_MSGBOX, ""yellow"Spawn at Home, Are you sure?",\
				        ""white"Are you sure you want to spawn at your house everytime you die?", "Yes", "No");
				    }
				    else
				    {
				        ShowPlayerDialog(playerid, DIALOG_HSPAWN, DIALOG_STYLE_MSGBOX, ""yellow"Are you sure?",\
				        ""white"Are you sure you will no longer spawn at your house everytime you die?", "Yes", "No");
				    }
				}
	        }
	    }
	}
	if(dialogid == DIALOG_HSPAWN)
	{
	    if(response)
	    {
	        if(jpInfo[playerid][p_Spawn] == 0)
	        {
				jpInfo[playerid][p_Spawn] = 1;
				SendClientMessage(playerid, -1, "<!> You will now spawn at your house, everytime you die.");
	        }
	        else if(jpInfo[playerid][p_Spawn] == 1)
	        {
				jpInfo[playerid][p_Spawn] = 0;
				SendClientMessage(playerid, -1, "<!> You will no longer spawn at your house, everytime you die.");
	        }
	    }
	    else
	    {
	        cmd_hmenu(playerid, "");
	    }
	}
	if(dialogid == DIALOG_HINTERIOR)
	{
	    if(response)
	    {
	        new hi = listitem;
	        h_Selected[playerid] = hi;

			TogglePlayerControllable(playerid, 0);
			SetCameraBehindPlayer(playerid);
			
			h_Selection[playerid] = 1;

			new Float:x_Pos[3];
			GetPlayerPos(playerid, x_Pos[0], x_Pos[1], x_Pos[2]);
			SetPVarInt(playerid, "h_Interior", GetPlayerInterior(playerid));
			SetPVarInt(playerid, "h_World", GetPlayerVirtualWorld(playerid));
			SetPVarFloat(playerid, "h_X", x_Pos[0]);
			SetPVarFloat(playerid, "h_Y", x_Pos[1]);
			SetPVarFloat(playerid, "h_Z", x_Pos[2]);

	        SetPlayerPos(playerid, intInfo[hi][SpawnPointX], intInfo[hi][SpawnPointY], intInfo[hi][SpawnPointZ]);
			SetPlayerInterior(playerid, intInfo[hi][i_Int]);
			SetPlayerFacingAngle(playerid, intInfo[hi][SpawnPointA]);
			SetPlayerVirtualWorld(playerid, 271569); //So in that way, no one can see you during the preview.

			new string[250];
			format(string, sizeof(string), "~w~You are now viewing: ~g~%s~n~/buyint to buy the interior~n~~r~/cancelint to cancel buying it.", intInfo[hi][Name]);
			GameTextForPlayer(playerid, string, 15000, 3);
			
			format(string, sizeof(string), "You are now viewing the house '%s' - /buyint to buy the interior, /cancelint to cancel buying it.", intInfo[hi][Name]);
			SendClientMessage(playerid, COLOR_YELLOW, string);
			format(string, sizeof(string), "The house interior costs "green"$%d, "white"Notes left in the interior: "red"'%s'", intInfo[hi][i_Price], intInfo[hi][Notes]);
			SendClientMessage(playerid, -1, string);
		}
	    else
	    {
	        cmd_hmenu(playerid, "");
	    }
	}
	if(dialogid == DIALOG_HSTORE)
	{
	    if(response || !response)
	    {
	        cmd_hmenu(playerid, "");
	    }
	}
	if(dialogid == DIALOG_HNAME)
	{
	    if(response)
	    {
	        if(!strlen(inputtext))
	        {
                ShowPlayerDialog(playerid, DIALOG_HNAME, DIALOG_STYLE_INPUT, ""green"House Name",\
                ""white"You are now editing the name of your house.\nPut the name of your house below (E.G. Jake's House)\n\nMaximum Length for the house name: 100\n"red"Invalid House Name Length.", "Configure", "Back");
	            return 1;
	        }
	        
			new string[128];
			format(string, 128, "You have changed the name of your house to '%s'", inputtext);
			SendClientMessage(playerid, -1, string);
			
			format(hInfo[hid][hName], 256, "%s", inputtext);
			
			SaveHouse(hid);

		    DestroyDynamicCP(hInfo[hid][hCP]);
		    DestroyDynamicPickup(hInfo[hid][hPickup]);
		    DestroyDynamicMapIcon(hInfo[hid][hMapIcon]);
		    DestroyDynamic3DTextLabel(hInfo[hid][hLabel]);

		    LoadHouse(hid);
		    
			cmd_hmenu(playerid, "");
	    }
	    else
	    {
	        cmd_hmenu(playerid, "");
	    }
	}
	if(dialogid == DIALOG_HPRICE)
	{
	    if(response)
	    {
	        if(!strlen(inputtext))
	        {
                ShowPlayerDialog(playerid, DIALOG_HPRICE, DIALOG_STYLE_INPUT, ""green"House Price ($)",\
                ""white"You are now editing the price of your house.\nPut the price of your house below (E.G. 500)", "Configure", "Back");
	            return 1;
	        }
	        if(!isnumeric(inputtext))
	        {
                ShowPlayerDialog(playerid, DIALOG_HPRICE, DIALOG_STYLE_INPUT, ""green"House Price ($)",\
                ""white"You are now editing the price of your house.\nPut the price of your house below (E.G. 500)\n\n"red"Invalid Integer.", "Configure", "Back");
	            return 1;
	        }

			new string[128];
			format(string, 128, "You have changed the price of your house to $%d.", strval(inputtext));
			SendClientMessage(playerid, -1, string);

			hInfo[hid][hPrice] = strval(inputtext);

			SaveHouse(hid);

		    DestroyDynamicCP(hInfo[hid][hCP]);
		    DestroyDynamicPickup(hInfo[hid][hPickup]);
		    DestroyDynamicMapIcon(hInfo[hid][hMapIcon]);
		    DestroyDynamic3DTextLabel(hInfo[hid][hLabel]);

		    LoadHouse(hid);

			cmd_hmenu(playerid, "");
	    }
	    else
	    {
	        cmd_hmenu(playerid, "");
	    }
	}
	if(dialogid == DIALOG_HSTOREC)
	{
	    if(response)
	    {
	        if(!strlen(inputtext))
	        {
                ShowPlayerDialog(playerid, DIALOG_HSTOREC, DIALOG_STYLE_INPUT, ""green"Store Cash ($)",\
                ""white"You are now storing your money into your house safe.\nPut the amount of cash you want to store into your house. (E.G. 500)", "Configure", "Back");
	            return 1;
	        }
	        if(!isnumeric(inputtext))
	        {
                ShowPlayerDialog(playerid, DIALOG_HSTOREC, DIALOG_STYLE_INPUT, ""green"Store Cash ($)",\
                ""white"You are now storing your money into your house safe.\nPut the amount of cash you want to store into your house. (E.G. 500)\n\n"red"Invalid Integer", "Configure", "Back");
	            return 1;
	        }

			GivePlayerMoney(playerid, -strval(inputtext));
			hInfo[hid][MoneyStore] = hInfo[hid][MoneyStore] + strval(inputtext);

			new string[128];
			format(string, 128, "You have store your $%d into your house safe. ($%d over all in your safe)", strval(inputtext), hInfo[hid][MoneyStore]);
			SendClientMessage(playerid, -1, string);

			SaveHouse(hid);

		    DestroyDynamicCP(hInfo[hid][hCP]);
		    DestroyDynamicPickup(hInfo[hid][hPickup]);
		    DestroyDynamicMapIcon(hInfo[hid][hMapIcon]);
		    DestroyDynamic3DTextLabel(hInfo[hid][hLabel]);

		    LoadHouse(hid);

			cmd_hmenu(playerid, "");
	    }
	    else
	    {
	        cmd_hmenu(playerid, "");
	    }
	}
	if(dialogid == DIALOG_HWORLD)
	{
	    if(response)
	    {
	        if(!strlen(inputtext))
	        {
	            ShowPlayerDialog(playerid, DIALOG_HWORLD, DIALOG_STYLE_INPUT, ""green"Virtual World",\
	            ""white"You are now editing the virtual world of your house (inside).\nPut the virtual world you want to set to your house. (E.G. 1)", "Configure", "Back");
	            return 1;
	        }
	        if(!isnumeric(inputtext))
	        {
	            ShowPlayerDialog(playerid, DIALOG_HWORLD, DIALOG_STYLE_INPUT, ""green"Virtual World",\
	            ""white"You are now editing the virtual world of your house (inside).\nPut the virtual world you want to set to your house. (E.G. 1)\n\n"red"Invalid Integer.", "Configure", "Back");
	            return 1;
	        }

			hInfo[hid][hWorld] = strval(inputtext);

			new string[128];
			format(string, 128, "You have change your inside house virtual world to %d.", strval(inputtext));
			SendClientMessage(playerid, -1, string);

			SaveHouse(hid);

		    DestroyDynamicCP(hInfo[hid][hCP]);
		    DestroyDynamicPickup(hInfo[hid][hPickup]);
		    DestroyDynamicMapIcon(hInfo[hid][hMapIcon]);
		    DestroyDynamic3DTextLabel(hInfo[hid][hLabel]);

		    LoadHouse(hid);

			cmd_hmenu(playerid, "");
	    }
	    else
	    {
	        cmd_hmenu(playerid, "");
	    }
	}
	if(dialogid == DIALOG_WCASH)
	{
	    if(response)
	    {
	        if(!strlen(inputtext))
	        {
                ShowPlayerDialog(playerid, DIALOG_WCASH, DIALOG_STYLE_INPUT, ""green"Withdraw Cash ($)",\
                ""white"You are now withdrawing a money from your house safe.\nPut the amount of cash you want to withdraw from your house safe. (E.G. 500)", "Configure", "Back");
	            return 1;
	        }
	        if(!isnumeric(inputtext))
	        {
	            ShowPlayerDialog(playerid, DIALOG_WCASH, DIALOG_STYLE_INPUT, ""green"Withdraw Cash ($)",\
	            ""white"You are now withdrawing a money from your house safe.\nPut the amount of cash you want to withdraw from your house safe. (E.G. 500)\n\n"red"Invalid Integer.", "Configure", "Back");
	            return 1;
	        }
            if(strval(inputtext) > hInfo[hid][MoneyStore])
            {
	            ShowPlayerDialog(playerid, DIALOG_WCASH, DIALOG_STYLE_INPUT, ""green"Withdraw Cash ($)",\
	            ""white"You are now withdrawing a money from your house safe.\nPut the amount of cash you want to withdraw from your house safe. (E.G. 500)\n\n"red"You do not have that amount of cash on your safe.", "Configure", "Back");
                return 1;
            }

			GivePlayerMoney(playerid, strval(inputtext));
			hInfo[hid][MoneyStore] = hInfo[hid][MoneyStore] - strval(inputtext);

			new string[128];
			format(string, 128, "You have withdrawn a $%d from your house safe. ($%d over all in your safe)", strval(inputtext), hInfo[hid][MoneyStore]);
			SendClientMessage(playerid, -1, string);

			SaveHouse(hid);

		    DestroyDynamicCP(hInfo[hid][hCP]);
		    DestroyDynamicPickup(hInfo[hid][hPickup]);
		    DestroyDynamicMapIcon(hInfo[hid][hMapIcon]);
		    DestroyDynamic3DTextLabel(hInfo[hid][hLabel]);

		    LoadHouse(hid);

			cmd_hmenu(playerid, "");
	    }
	    else
	    {
	        cmd_hmenu(playerid, "");
	    }
	}
	return 1;
}
Jake's Saying at her system if Dialogs are not working just change Return 0 to return 1; Try both

But when i trying make all return 0; First time its not work when i try Return 1; its not work so This my Problem..

Can you helping me ? Please


Re: Dialogs not works.. - Yaa - 06.01.2017

PHP код:
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
    new 
hid h_ID[playerid];
    if(
dialogid == DIALOG_HMENU)
    {
        if(
response)
        {
            switch(
listitem)
            {
                case 
0:
                {
                    
ShowPlayerDialog(playeridDIALOG_HNAMEDIALOG_STYLE_INPUT""green"House Name",\
                    
""white"You are now editing the name of your house.\nPut the name of your house below (E.G. Jake's House)\n\nMaximum Length for the house name: 100""Configure""Back");
                }
                case 
1:
                {
                    
ShowPlayerDialog(playeridDIALOG_HPRICEDIALOG_STYLE_INPUT""green"House Price ($)",\
                    
""white"You are now editing the price of your house.\nPut the price of your house below (E.G. 500)""Configure""Back");
                }
                case 
2:
                {
                    
ShowPlayerDialog(playeridDIALOG_HSTORECDIALOG_STYLE_INPUT""green"Store Cash ($)",\
                    
""white"You are now storing your money into your house safe.\nPut the amount of cash you want to store into your house. (E.G. 500)""Configure""Back");
                }
                case 
3:
                {
                    
ShowPlayerDialog(playeridDIALOG_WCASHDIALOG_STYLE_INPUT""green"Withdraw Cash ($)",\
                    
""white"You are now withdrawing a money from your house safe.\nPut the amount of cash you want to withdraw from your house safe. (E.G. 500)""Configure""Back");
                }
                case 
4:
                {
                    new 
string[1000];
                    
format(stringsizeof(string), ""white"Your house safe status:\n\nCash Stored: "green"$%d\n"white"Notes:\n"red"%s"hInfo[hid][MoneyStore], hInfo[hid][hNotes]);
                    
ShowPlayerDialog(playeridDIALOG_HSTOREDIALOG_STYLE_MSGBOX""green"Storage Info",\
                    
string"Back""");
                }
                case 
5:
                {
                    
ShowPlayerDialog(playeridDIALOG_HWORLDDIALOG_STYLE_INPUT""green"Virtual World",\
                    
""white"You are now editing the virtual world of your house (inside).\nPut the virtual world you want to set to your house. (E.G. 1)""Configure""Back");
                }
                case 
6:
                {
                    new 
string[1200];
                
                    for(new 
a=0a<sizeof(intInfo); a++)
                    {
                        
format(stringsizeof(string), "%s%s - $%d\n"stringintInfo[a][Name], intInfo[a][i_Price]);
                    }
                    
ShowPlayerDialog(playeridDIALOG_HINTERIORDIALOG_STYLE_LIST""green"Interior"string"Preview""Back");
                }
                case 
7:
                {
                    if(
jpInfo[playerid][p_Spawn] == 0)
                    {
                        
ShowPlayerDialog(playeridDIALOG_HSPAWNDIALOG_STYLE_MSGBOX""yellow"Spawn at Home, Are you sure?",\
                        
""white"Are you sure you want to spawn at your house everytime you die?""Yes""No");
                    }
                    else
                    {
                        
ShowPlayerDialog(playeridDIALOG_HSPAWNDIALOG_STYLE_MSGBOX""yellow"Are you sure?",\
                        
""white"Are you sure you will no longer spawn at your house everytime you die?""Yes""No");
                    }
                }
            }
        }
    }
    if(
dialogid == DIALOG_HSPAWN)
    {
        if(
response)
        {
            if(
jpInfo[playerid][p_Spawn] == 0)
            {
                
jpInfo[playerid][p_Spawn] = 1;
                
SendClientMessage(playerid, -1"<!> You will now spawn at your house, everytime you die.");
            }
            else if(
jpInfo[playerid][p_Spawn] == 1)
            {
                
jpInfo[playerid][p_Spawn] = 0;
                
SendClientMessage(playerid, -1"<!> You will no longer spawn at your house, everytime you die.");
            }
        }
        else
        {
            
cmd_hmenu(playerid"");
        }
    }
    if(
dialogid == DIALOG_HINTERIOR)
    {
        if(
response)
        {
            new 
hi listitem;
            
h_Selected[playerid] = hi;
            
TogglePlayerControllable(playerid0);
            
SetCameraBehindPlayer(playerid);
            
            
h_Selection[playerid] = 1;
            new 
Float:x_Pos[3];
            
GetPlayerPos(playeridx_Pos[0], x_Pos[1], x_Pos[2]);
            
SetPVarInt(playerid"h_Interior"GetPlayerInterior(playerid));
            
SetPVarInt(playerid"h_World"GetPlayerVirtualWorld(playerid));
            
SetPVarFloat(playerid"h_X"x_Pos[0]);
            
SetPVarFloat(playerid"h_Y"x_Pos[1]);
            
SetPVarFloat(playerid"h_Z"x_Pos[2]);
            
SetPlayerPos(playeridintInfo[hi][SpawnPointX], intInfo[hi][SpawnPointY], intInfo[hi][SpawnPointZ]);
            
SetPlayerInterior(playeridintInfo[hi][i_Int]);
            
SetPlayerFacingAngle(playeridintInfo[hi][SpawnPointA]);
            
SetPlayerVirtualWorld(playerid271569); //So in that way, no one can see you during the preview.
            
new string[250];
            
format(stringsizeof(string), "~w~You are now viewing: ~g~%s~n~/buyint to buy the interior~n~~r~/cancelint to cancel buying it."intInfo[hi][Name]);
            
GameTextForPlayer(playeridstring150003);
            
            
format(stringsizeof(string), "You are now viewing the house '%s' - /buyint to buy the interior, /cancelint to cancel buying it."intInfo[hi][Name]);
            
SendClientMessage(playeridCOLOR_YELLOWstring);
            
format(stringsizeof(string), "The house interior costs "green"$%d, "white"Notes left in the interior: "red"'%s'"intInfo[hi][i_Price], intInfo[hi][Notes]);
            
SendClientMessage(playerid, -1string);
        }
        else
        {
            
cmd_hmenu(playerid"");
        }
    }
    if(
dialogid == DIALOG_HSTORE)
    {
        if(
response || !response)
        {
            
cmd_hmenu(playerid"");
        }
    }
    if(
dialogid == DIALOG_HNAME)
    {
        if(
response)
        {
            if(!
strlen(inputtext))
            {
                
ShowPlayerDialog(playeridDIALOG_HNAMEDIALOG_STYLE_INPUT""green"House Name",\
                
""white"You are now editing the name of your house.\nPut the name of your house below (E.G. Jake's House)\n\nMaximum Length for the house name: 100\n"red"Invalid House Name Length.""Configure""Back");
                return 
1;
            }
            
            new 
string[128];
            
format(string128"You have changed the name of your house to '%s'"inputtext);
            
SendClientMessage(playerid, -1string);
            
            
format(hInfo[hid][hName], 256"%s"inputtext);
            
            
SaveHouse(hid);
            
DestroyDynamicCP(hInfo[hid][hCP]);
            
DestroyDynamicPickup(hInfo[hid][hPickup]);
            
DestroyDynamicMapIcon(hInfo[hid][hMapIcon]);
            
DestroyDynamic3DTextLabel(hInfo[hid][hLabel]);
            
LoadHouse(hid);
            
            
cmd_hmenu(playerid"");
        }
        else
        {
            
cmd_hmenu(playerid"");
        }
    }
    if(
dialogid == DIALOG_HPRICE)
    {
        if(
response)
        {
            if(!
strlen(inputtext))
            {
                
ShowPlayerDialog(playeridDIALOG_HPRICEDIALOG_STYLE_INPUT""green"House Price ($)",\
                
""white"You are now editing the price of your house.\nPut the price of your house below (E.G. 500)""Configure""Back");
                return 
1;
            }
            if(!
isnumeric(inputtext))
            {
                
ShowPlayerDialog(playeridDIALOG_HPRICEDIALOG_STYLE_INPUT""green"House Price ($)",\
                
""white"You are now editing the price of your house.\nPut the price of your house below (E.G. 500)\n\n"red"Invalid Integer.""Configure""Back");
                return 
1;
            }
            new 
string[128];
            
format(string128"You have changed the price of your house to $%d."strval(inputtext));
            
SendClientMessage(playerid, -1string);
            
hInfo[hid][hPrice] = strval(inputtext);
            
SaveHouse(hid);
            
DestroyDynamicCP(hInfo[hid][hCP]);
            
DestroyDynamicPickup(hInfo[hid][hPickup]);
            
DestroyDynamicMapIcon(hInfo[hid][hMapIcon]);
            
DestroyDynamic3DTextLabel(hInfo[hid][hLabel]);
            
LoadHouse(hid);
            
cmd_hmenu(playerid"");
        }
        else
        {
            
cmd_hmenu(playerid"");
        }
    }
    if(
dialogid == DIALOG_HSTOREC)
    {
        if(
response)
        {
            if(!
strlen(inputtext))
            {
                
ShowPlayerDialog(playeridDIALOG_HSTORECDIALOG_STYLE_INPUT""green"Store Cash ($)",\
                
""white"You are now storing your money into your house safe.\nPut the amount of cash you want to store into your house. (E.G. 500)""Configure""Back");
                return 
1;
            }
            if(!
isnumeric(inputtext))
            {
                
ShowPlayerDialog(playeridDIALOG_HSTORECDIALOG_STYLE_INPUT""green"Store Cash ($)",\
                
""white"You are now storing your money into your house safe.\nPut the amount of cash you want to store into your house. (E.G. 500)\n\n"red"Invalid Integer""Configure""Back");
                return 
1;
            }
            
GivePlayerMoney(playerid, -strval(inputtext));
            
hInfo[hid][MoneyStore] = hInfo[hid][MoneyStore] + strval(inputtext);
            new 
string[128];
            
format(string128"You have store your $%d into your house safe. ($%d over all in your safe)"strval(inputtext), hInfo[hid][MoneyStore]);
            
SendClientMessage(playerid, -1string);
            
SaveHouse(hid);
            
DestroyDynamicCP(hInfo[hid][hCP]);
            
DestroyDynamicPickup(hInfo[hid][hPickup]);
            
DestroyDynamicMapIcon(hInfo[hid][hMapIcon]);
            
DestroyDynamic3DTextLabel(hInfo[hid][hLabel]);
            
LoadHouse(hid);
            
cmd_hmenu(playerid"");
        }
        else
        {
            
cmd_hmenu(playerid"");
        }
    }
    if(
dialogid == DIALOG_HWORLD)
    {
        if(
response)
        {
            if(!
strlen(inputtext))
            {
                
ShowPlayerDialog(playeridDIALOG_HWORLDDIALOG_STYLE_INPUT""green"Virtual World",\
                
""white"You are now editing the virtual world of your house (inside).\nPut the virtual world you want to set to your house. (E.G. 1)""Configure""Back");
                return 
1;
            }
            if(!
isnumeric(inputtext))
            {
                
ShowPlayerDialog(playeridDIALOG_HWORLDDIALOG_STYLE_INPUT""green"Virtual World",\
                
""white"You are now editing the virtual world of your house (inside).\nPut the virtual world you want to set to your house. (E.G. 1)\n\n"red"Invalid Integer.""Configure""Back");
                return 
1;
            }
            
hInfo[hid][hWorld] = strval(inputtext);
            new 
string[128];
            
format(string128"You have change your inside house virtual world to %d."strval(inputtext));
            
SendClientMessage(playerid, -1string);
            
SaveHouse(hid);
            
DestroyDynamicCP(hInfo[hid][hCP]);
            
DestroyDynamicPickup(hInfo[hid][hPickup]);
            
DestroyDynamicMapIcon(hInfo[hid][hMapIcon]);
            
DestroyDynamic3DTextLabel(hInfo[hid][hLabel]);
            
LoadHouse(hid);
            
cmd_hmenu(playerid"");
        }
        else
        {
            
cmd_hmenu(playerid"");
        }
    }
    if(
dialogid == DIALOG_WCASH)
    {
        if(
response)
        {
            if(!
strlen(inputtext))
            {
                
ShowPlayerDialog(playeridDIALOG_WCASHDIALOG_STYLE_INPUT""green"Withdraw Cash ($)",\
                
""white"You are now withdrawing a money from your house safe.\nPut the amount of cash you want to withdraw from your house safe. (E.G. 500)""Configure""Back");
                return 
1;
            }
            if(!
isnumeric(inputtext))
            {
                
ShowPlayerDialog(playeridDIALOG_WCASHDIALOG_STYLE_INPUT""green"Withdraw Cash ($)",\
                
""white"You are now withdrawing a money from your house safe.\nPut the amount of cash you want to withdraw from your house safe. (E.G. 500)\n\n"red"Invalid Integer.""Configure""Back");
                return 
1;
            }
            if(
strval(inputtext) > hInfo[hid][MoneyStore])
            {
                
ShowPlayerDialog(playeridDIALOG_WCASHDIALOG_STYLE_INPUT""green"Withdraw Cash ($)",\
                
""white"You are now withdrawing a money from your house safe.\nPut the amount of cash you want to withdraw from your house safe. (E.G. 500)\n\n"red"You do not have that amount of cash on your safe.""Configure""Back");
                return 
1;
            }
            
GivePlayerMoney(playeridstrval(inputtext));
            
hInfo[hid][MoneyStore] = hInfo[hid][MoneyStore] - strval(inputtext);
            new 
string[128];
            
format(string128"You have withdrawn a $%d from your house safe. ($%d over all in your safe)"strval(inputtext), hInfo[hid][MoneyStore]);
            
SendClientMessage(playerid, -1string);
            
SaveHouse(hid);
            
DestroyDynamicCP(hInfo[hid][hCP]);
            
DestroyDynamicPickup(hInfo[hid][hPickup]);
            
DestroyDynamicMapIcon(hInfo[hid][hMapIcon]);
            
DestroyDynamic3DTextLabel(hInfo[hid][hLabel]);
            
LoadHouse(hid);
            
cmd_hmenu(playerid"");
        }
        else
        {
            
cmd_hmenu(playerid"");
        }
    }
    return 
0;

also that can be error when there duplicate id of dialogs


Re: Dialogs not works.. - RedRex - 06.01.2017

Hi Yaa. Its still not working man.... You just change return 0; in the last man.... i try that its not work.... Any help plesae.

EDIT: Here the dialogs

Oh shits.. i forgot this Dialogs for you know

Код:
Dialogs

#define             DIALOG_HMENU                6000
#define             DIALOG_NULL                 DIALOG_HMENU-1
#define             DIALOG_HNAME                DIALOG_HMENU+1
#define             DIALOG_HPRICE               DIALOG_HMENU+2
#define             DIALOG_HSTOREC              DIALOG_HMENU+3
#define             DIALOG_WCASH                DIALOG_HMENU+4
#define             DIALOG_HSTORE               DIALOG_HMENU+5
#define             DIALOG_HWORLD               DIALOG_HMENU+6
#define             DIALOG_HINTERIOR            DIALOG_HMENU+7
#define             DIALOG_HSPAWN               DIALOG_HMENU+8



Respuesta: Dialogs not works.. - Whillyrez - 06.01.2017

Maybe in other FS or in ur gamemode, u have the same ID as those dialogs.


Re: Respuesta: Dialogs not works.. - RedRex - 06.01.2017

Quote:
Originally Posted by Whillyrez
Посмотреть сообщение
Maybe in other FS or in ur gamemode, u have the same ID as those dialogs.
no man, The /hmenu is work but when i clicking to any of Dialogs its didn't given me anything Hmenu closing


Respuesta: Dialogs not works.. - Whillyrez - 06.01.2017

Watch this.
In every script u have, in "OnDialogResponse" u should return 0, IN EVERY SCRIPT YOU HAVE xd.


Re: Dialogs not works.. - RedRex - 06.01.2017

Wait Wait Wait, All Filterscirpts i have? OMG!!! Or only the House system OnDialogResponse?


Re: Dialogs not works.. - RedRex - 07.01.2017

help me guyz... i did it still not work...