14.06.2016, 19:42
Hey, so I'm currently working on a fishing system but there was an error occurred inside the server.
It's compiling perfect, but inside the server whenever I leave the dialog, it force me to purchase the item I listed.
Here is the code:
Now, when I do the command that performs the purchase, and I won't press anything but only the "ESC" to leave the dialog, its force me to buy the fishing rod.
It's compiling perfect, but inside the server whenever I leave the dialog, it force me to purchase the item I listed.
Here is the code:
Код:
Dialog:fishtools(playerid, response, listitem, inputtext[])
{
if(listitem == 0)
{
if(GetPlayerMoney(playerid) >= FishingToolPrice)
{
SendServerMessage(playerid, "You have purchased a fishing tools, now you are free to /fish in the water, or in the fishing square at your left.");
FishingTool[playerid] = 1;
GiveMoney(playerid, -FishingToolPrice);
}
else
{
SendClientMessage(playerid, COLOR_GREY, "ERROR: You don't have enough money");
}
}
if(listitem == 1)
{
Dialog_Show(playerid, worms, DIALOG_STYLE_INPUT, "Baits", "Enter below how much baits do you want.\n $%d per one","Purchase","Exit" ,BaitPrice);
}
return 1;
}


