Fishing Dialog Problem
#1

When I compile my scipt it doesn't show me any errors but when I type the command where it show me the fishing dialog it doesn't work. Will give Rep to man who help me with this bug.

Код:
#define FISHINGMENU 43891
PHP код:
if(dialogid == FISHINGMENU)
    {
        if(
listitem == 0)
        {
            if(
GetPlayerMoney(playerid) >= FishingToolPrice)
            {
                
PlayerInfo[playerid][pFishingrod] += 1;
                
SendClientMessageEx(playeridCOLOR_GRAD4"Fishing Rod purchased.");
                
SendClientMessageEx(playeridCOLOR_WHITE"HINT: Now you can do /fish to fishing.");
                
GivePlayerMoney(playerid, -FishingToolPrice);
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GREY"You don't have enough money");
            }
        }
        if(
listitem == 1)
        {
            
format(string,sizeof(string),"Enter below how much baits do you want.\n$%d per one",BaitPrice);
            
ShowPlayerDialog(playerid2DIALOG_STYLE_INPUT"Baits",string,"Purchase","Exit");
        }
    }
    if(
dialogid == 43892 && response)
    {
         new 
price BaitPrice;
        new 
baits strval(inputtext);
          if(
baits 0)
          {
            new 
price1 price*baits;
            if(
GetPlayerMoney(playerid) >= price1)
            {
                
GivePlayerMoney(playerid, -price1);
                
format(string,sizeof(string),"You just purchased %d worms for $%d"baitsprice1);
                
SendClientMessage(playeridCOLOR_GREENstring);
                
PlayerInfo[playerid][pBite] += baits;
                return 
1;
            }
            else
            {
                
SendClientMessage(playeridCOLOR_GREY"You don't have that much money.");
            }
        }
        else
        {
            
SendClientMessage(playeridCOLOR_GREY"You can't buy baits less than 0");
        }
    } 
PHP код:
CMD:fishshop(playeridparams[])
{
    if(
PlayerInfo[playerid][pMember] == 14 || PlayerInfo[playerid][pLeader] == 14)
    {
        
SendClientMessageEx(playeridCOLOR_GREY"Fuuuuuu");
        
ShowPlayerDialog(playeridFISHINGMENUDIALOG_STYLE_LIST"Fish shop""Fishing Rod (150$)\nFishing Bait(15$ each)""Buy""Cancel");
    }
    return 
1;

Reply
#2

Код:
#define FISHINGMENU 43891
Make it lower, maximum dialog id is: 32767.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)