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");
}
}
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;
}
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. |