SA-MP Forums Archive
dialog_style_msgbox.. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: dialog_style_msgbox.. (/showthread.php?tid=465474)



dialog_style_msgbox.. - CesarLT - 22.09.2013

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.


Re: dialog_style_msgbox.. - Konstantinos - 22.09.2013

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


Re: dialog_style_msgbox.. - King Ace - 22.09.2013

Could you post the ShowPlayerDialog code aswell?


Re: dialog_style_msgbox.. - CesarLT - 22.09.2013

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;
}



Re: dialog_style_msgbox.. - Konstantinos - 22.09.2013

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



Re: dialog_style_msgbox.. - CesarLT - 22.09.2013

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.