dialog_style_msgbox..
#1

Hello everyone, I am having a little problem which I don't seem to know how to fix, this is how it looks like:



Once, I click "Refill" nothing happens...
I don't know why, anyways here's the code:

pawn Код:
if(dialogid == hp)
    {
        if(response)
        {
            if(GetPlayerMoney(playerid) < 1500)
            return SendClientMessage(playerid, COLOR_LIGHTBLUE, "**[Weapon-shop]** {FFFFFF}- You don't have enough money to purchase a health refill.");
            SetPlayerHealth(playerid, 100);
            SendClientMessage(playerid, COLOR_LIGHTBLUE, "**[Weapon-shop]** {FFFFFF}- You have successfully purchased a Health-Refill.");
        }
        return 1;
    }
Thanks in advance.
Reply
#2

Make sure the dialogid of hp is not an id is used by another dialog and that OnDialogResponse returns 0 at the end.
Reply
#3

Could you post the ShowPlayerDialog code aswell?
Reply
#4

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
Make sure the dialogid of hp is not an id is used by another dialog and that OnDialogResponse returns 0 at the end.
I didn't really understand what you mean.

Quote:
Originally Posted by King Ace
Посмотреть сообщение
Could you post the ShowPlayerDialog code aswell?
Sure, here it is:

pawn Код:
OnPlayerPickupPickup(playerid, pickupid)
{
if(pickupid == hp)
{
ShowPlayerDialog(playerid, 558, DIALOG_STYLE_MSGBOX, "{FF0000}Health-Refill", "{FFFFFF}Are you sure that you wish to refill your {FF0000}health{FFFFFF} to 100, for 1,500$?", "Refill", "");
}
return 1;
}
Reply
#5

pawn Код:
if(pickupid == hp)
{
    // ShowPlayerDialog(playerid, 558 <--
pawn Код:
if(dialogid == hp)
It should be:
pawn Код:
if(dialogid == 558)
Reply
#6

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
pawn Код:
if(pickupid == hp)
{
    // ShowPlayerDialog(playerid, 558 <--
pawn Код:
if(dialogid == hp)
It should be:
pawn Код:
if(dialogid == 558)
Fooly me, thank you..again lol.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)