OnDialogResponse
#5

Yes, it occurs for all weapons. Also, the ids are corrects. It used to work for me yesterday. And no, i don't lose cash.

pawn Code:
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if(pickupid == WeaponShop[0])
    {
        if(PickupCD[playerid] == 0)
        {
            new subString[64];
            static string[sizeof(WEAPON_SHOP) * sizeof(subString)];

            if (string[0] == EOS)
            {
                for (new i; i < sizeof(WEAPON_SHOP); i++)
                {
                    format(subString, sizeof(subString), "%i\t%s~n~~g~~h~$%i\n", WEAPON_SHOP[i][WEAPON_MODELID], WEAPON_SHOP[i][WEAPON_NAME], WEAPON_SHOP[i][WEAPON_PRICE]);
                    strcat(string, subString);
                }
            }
            PickupCD[playerid] = 3;
            return ShowPlayerDialog(playerid, DIALOG_SHOP, DIALOG_STYLE_PREVIEW_MODEL, "Weapon Shop", string, "Purchase", "Cancel");
        }
    }
    else if(pickupid == WeaponShop[1])
    {
        if(PickupCD[playerid] == 0)
        {
            new subString[64];
            static string[sizeof(WEAPON_SHOP) * sizeof(subString)];

            if (string[0] == EOS)
            {
                for (new i; i < sizeof(WEAPON_SHOP); i++)
                {
                    format(subString, sizeof(subString), "%i\t%s~n~~g~~h~$%i\n", WEAPON_SHOP[i][WEAPON_MODELID], WEAPON_SHOP[i][WEAPON_NAME], WEAPON_SHOP[i][WEAPON_PRICE]);
                    strcat(string, subString);
                }
            }
            PickupCD[playerid] = 3;
            return ShowPlayerDialog(playerid, DIALOG_SHOP, DIALOG_STYLE_PREVIEW_MODEL, "Weapon Shop", string, "Purchase", "Cancel");
        }
    }
    return 1;
}
Reply


Messages In This Thread
OnDialogResponse - by ChandraLouis - 21.05.2020, 12:34
Re: OnDialogResponse - by Skimmer - 21.05.2020, 12:52
Re: OnDialogResponse - by ChandraLouis - 21.05.2020, 14:40
Re: OnDialogResponse - by Skimmer - 21.05.2020, 14:49
Re: OnDialogResponse - by ChandraLouis - 21.05.2020, 14:51
Re: OnDialogResponse - by Skimmer - 21.05.2020, 15:24
Re: OnDialogResponse - by ChandraLouis - 21.05.2020, 15:46
Re: OnDialogResponse - by Skimmer - 21.05.2020, 15:51
Re: OnDialogResponse - by ChandraLouis - 21.05.2020, 15:57
Re: OnDialogResponse - by Skimmer - 21.05.2020, 16:23

Forum Jump:


Users browsing this thread: 1 Guest(s)