24.12.2015, 14:20
(
Последний раз редактировалось Shazwan; 24.12.2015 в 17:30.
)
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;
}
}


