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;
}
}
|
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 |
if(!response) return true;
if(druggy < 1 || druggy > 80)
druggy = strval(inputtext);
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;
}
}