10.11.2015, 18:52
My Dialog not showing whats the problem?
and can you guys tell me if the getting car price method is correct or not?
PHP код:
new string[128], VehPrice;
for(new i = 0; i < MAX_VEHICLES; i++)
{
if(IsPlayerInVehicle(playerid, i)) return VehPrice = GetVehiclePrice(i);
}
format(string,sizeof(string),"sell your vehicle $%d!\n\n?", VehPrice);
ShowPlayerDialog(playerid, DIALOG_VEHICLE_SELL, DIALOG_STYLE_MSGBOX, "Selling", string, "Sell", "Cancel");
stock GetVehiclePrice(vehicleid)
{
new model = GetVehicleModel(vehicleid);
if(model == 400) return price;
else if(model == 401) return price;
else if(model == 402) return price;
else if(model == 403) return price;
else if(model == 404) return price;
else if(model == 405) return price;
else if(model == 406) return price;
else if(model == 408) return price;
else if(model == 409) return price;
else if(model == 410) return price;
else return 0;
}