19.01.2017, 04:20
First of all change your VehiclePrices declaration to this :
Then use this code:
Quote:
new VehiclePrices[47][2] |
PHP Code:
stock ShowVehicleDialog(playerid)
{
new model = GetVehicleModel(GetPlayerVehicleID(playerid)), found = -1;
for ( new i = 0; i < sizeof(VehiclePrices); i++ )
{
if(model == VehiclePrices[i][0])
{
found = i;
break;
}
}
new str[100];
if(found == -1)str = "Model not found";
//note the difference in format parameters in next line
else format(str, sizeof(str), "%s %d "COL_DGREEN"$%d", VehicleNames[model-400], model, FormatNumber(VehiclePrices[found][1]));
Dialog_Show(playerid, BUYVEHICLE, DIALOG_STYLE_LIST, str,"Test", "Seз", "İptal");
return 1;
}