30.01.2014, 18:57
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:
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
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");
}
}
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;
}