My Dialog not showing whats the problem? - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: My Dialog not showing whats the problem? (
/showthread.php?tid=593865)
My Dialog not showing whats the problem? -
SalmaN97 - 10.11.2015
My Dialog not showing whats the problem?
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;
}
and can you guys tell me if the getting car price method is correct or not?
Re: My Dialog not showing whats the problem? -
iShawn - 10.11.2015
PHP код:
new string[128];
format(string,sizeof(string),"sell your vehicle $%d!\n\n?", GetVehiclePrice(GetPlayerVehicleID(playerid));
ShowPlayerDialog(playerid, DIALOG_VEHICLE_SELL, DIALOG_STYLE_MSGBOX, "Selling", string, "Sell", "Cancel");
stock GetVehiclePrice(vehicleid)
{
new model = GetVehicleModel(vehicleid);
if(model == 400) return 30000;
else if(model == 401) return 20000;
else if(model == 402) return 15000;
else return 0;
}