Dialog keeps changing back
#1

I'm having this problem lately, that when i try to buy a vehicle at the dealership, it gives me a confirmation screen but it disappears after 1/2 second(s).

This is the dialog:
pawn Код:
if(dialogid == dealership1)
    {
        if(response)
        {
            new VehName[80], priceshit[20], string[250],price[20];
            sscanf(inputtext, "p<(>s[80]s[20]", VehName,priceshit);
            print(VehName);
            DealerShipModel[playerid] = ReturnVehicleID(VehName);
            for(new i; i < sizeof(DealerShipVehicles); i++)
            {
                if(DealerShipVehicles[i][VModel] == DealerShipModel[playerid])
                {
                    format(price,sizeof(price),"$%d",DealerShipVehicles[i][VPrice]);
                }
            }
            format(string,sizeof(string),"{FF0000}Are you sure you want to buy the following?\n\n{FFFFFF}Vehicle: \t\t{1B8AE4}%s\n{FFFFFF}Price: \t\t\t{1B8AE4}%s",VehicleFriendlyNames[DealerShipModel[playerid]-400],price);
            ShowPlayerDialog(playerid, dealership2, DIALOG_STYLE_MSGBOX, "Are you sure?", string, "Buy","Cancel");
        }
    }
Same to where i can select the vehicle, when i scroll down, after 1/2 second(s) it puts me on top of the list again.
It's a pretty annoying bug where i can't find the problem about it myself, i hope one of you can.

This is the stock i use to load my dealerships, it's based on pickups
pawn Код:
stock LoadDealerships()
{
    for(new i; i < sizeof(DealerShips); i++)
    {
        new string[128];
        DealerShips[i][PickupID] = CreateDynamicPickup(1239,23,DealerShips[i][LocX],DealerShips[i][LocY],DealerShips[i][LocZ],0);
        format(string, sizeof(string), "{FFFF00}%s", DealerShips[i][DealershipName]);
        DealerShips[i][labeltext] = Create3DTextLabel(string,0xFFFFFFFF,DealerShips[i][LocX],DealerShips[i][LocY],DealerShips[i][LocZ],15.0,0,0);
    }
    print("Dealerships has been loaded");

    return 1;
}
Reply
#2

Use: CreateDynamicPickup(1239,2,DealerShips[i][LocX],DealerShips[i][LocY],DealerShips[i][LocZ],0);

Your pickup id was 23. That aint a real id. Use id 2. The pickup will respawn later on.
May i also suggest dynamic checkpoints. As they would be easier imo. Incognito's would be the best.
Reply
#3

Quote:
Originally Posted by AaronFarley
Посмотреть сообщение
Use: CreateDynamicPickup(1239,2,DealerShips[i][LocX],DealerShips[i][LocY],DealerShips[i][LocZ],0);

Your pickup id was 23. That aint a real id. Use id 2. The pickup will respawn later on.
May i also suggest dynamic checkpoints. As they would be easier imo. Incognito's would be the best.
Thanks, eh.
-solved-.
Reply
#4

Quote:
Originally Posted by Jimmy0wns
Посмотреть сообщение
Thanks, eh.
-solved-.
No problem
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)