Not working
#1

Everything set and arrange look work, no error but when function in game doesnt work, please help

Код:
    
    if(dialogid == BPDRUGP)
    {
	new str[300], druggy = strval(inputtext);
	if(!response)
	{
	}
	else
	{
            switch(listitem)
            {
                case 0:
                {
                    if(!PlayerInfo[playerid][pPot]) return SendClientMessage(playerid, COLOR_GRAD2,"You don't have any pot left!");
                    if(druggy < 1 || druggy > 80)
    		    {
		    if( PlayerInfo[playerid][pBpot] == 80)
                    {
			    SendClientMessageEx(playerid, COLOR_WHITE, "Your backpack has reach the limit amount of pot!");
                            format(str, sizeof(str), "Pot {3BB9FF}(%d gram){FFFFFF}\nCrack: {3BB9FF}(%d gram){FFFFFF}", PlayerInfo[playerid][pBpot], PlayerInfo[playerid][pBcrack]);
                            ShowPlayerDialog(playerid, BPDRUG, DIALOG_STYLE_LIST, "My Narcotic", str, "Take", "Cancel");
                            return 1;
			    }
                 	    ShowPlayerDialog( playerid, BPDRUGP, DIALOG_STYLE_INPUT, "Pot Storage","Please enter amount of pot to Deposit.", "Deposit", "Cancel" );
        	    }
     		    else
        	    {
        		    SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have deposited some pot in your Backpack.");
  	     	            format(string,sizeof(string), "* %s has deposited some pot in their Backpack.", GetPlayerNameEx(playerid));
       		            ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  	     	            PlayerInfo[playerid][pBpot] += druggy;
        	            PlayerInfo[playerid][pPot] -= druggy;
                            format(str, sizeof(str), "Pot {3BB9FF}(%d gram){FFFFFF}\nCrack: {3BB9FF}(%d gram){FFFFFF}", PlayerInfo[playerid][pBpot], PlayerInfo[playerid][pBcrack]);
                            ShowPlayerDialog(playerid, BPDRUG, DIALOG_STYLE_LIST, "My Narcotic", str, "Take", "Cancel");
	            }
		}
		case 1:
                {
                        if(!PlayerInfo[playerid][pBpot]) return SendClientMessage(playerid, COLOR_GRAD2,"You don't have any pot left or choose other section to withdraw.");
			if(druggy < 1 || druggy > 80)
		    	{
                 		ShowPlayerDialog( playerid, BPDRUGP, DIALOG_STYLE_INPUT, "Pot Storage","Please enter amount of pot to Withdraw.", "Withdraw", "Cancel" );
    	    		}
    		    	else
    		    	{
		                SendClientMessageEx(playerid, COLOR_LIGHTBLUE, "You have withdraw some pot from your Backpack.");
        	        	format(string,sizeof(string), "* %s has withdraw some pot from their Backpack.", GetPlayerNameEx(playerid));
        	        	ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
       		        	PlayerInfo[playerid][pPot] += druggy;
       		        	PlayerInfo[playerid][pBpot] -= druggy;
                                format(str, sizeof(str), "Pot {3BB9FF}(%d gram){FFFFFF}\nCrack: {3BB9FF}(%d gram){FFFFFF}", PlayerInfo[playerid][pBpot], PlayerInfo[playerid][pBcrack]);
                                ShowPlayerDialog(playerid, BPDRUG, DIALOG_STYLE_LIST, "My Narcotic", str, "Take", "Cancel");
	        	}
		}
            }
            return 1;
 	}
    }
Reply
#2

What's the problem? The dialog vanishes away? Tell me more bout the issue.
Reply
#3

Reply your error
Reply
#4

Dialog when compile it works fine but when in game the cmd function for this dialog isnt working
Reply
#5

What not work CMD or DialogResponse
Like this ? Ex:CMD Can be use but Dialog response not responding ?
Reply
#6

its dialog response i think ye
Reply
#7

Check for more wiki samp Dialog response
and Wiki samp show playerdialog

I never experienced anything like it ! But i confused to fix this problem
Reply
#8

Quote:
Originally Posted by Amunra
Посмотреть сообщение
Check for more wiki samp Dialog response
and Wiki samp show playerdialog

I never experienced anything like it ! But i confused to fix this problem
Stop spamming the forums with stupid stuff. If you cannot help them dont give them link to Wiki pages.

First of all
PHP код:
if(!response) return true
Whats this supposted to represent?
PHP код:
if(druggy || druggy 80
What is druggy supposted to be?

Also show us the command that you execute to show the dialog to the player
Reply
#9

druggy is represent the input text amount in the dialog

this

Код:
druggy = strval(inputtext);
and this is the main for it to response

Код:
	
if(dialogid == BPDRUG)
{
    if(response)
    {
        switch(listitem)
        {
            case 0:
            {
                ShowPlayerDialog(playerid, BPDRUGP, DIALOG_STYLE_LIST, "Pot", "Deposit\nWithdraw", "Choose", "Cancel");
	    }
            case 1:
            {
                ShowPlayerDialog(playerid, BPDRUGC, DIALOG_STYLE_LIST, "Crack", "Deposit\nWithdraw", "Choose", "Cancel");

            }
        }
        return 1;
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)