SA-MP Forums Archive
help me this dialog sell car - 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: help me this dialog sell car (/showthread.php?tid=496917)



help me this dialog sell car - cuchipkg - 24.02.2014

sorry my english bad, this my dialog sell car
Quote:

if(strcmp(cmd, "/banxe", true) == 0)
{
new vehicle1;
vehicle1 = GetVehicleModel(PlayerInfo[playerid][CarLinkID]);
new vehicle2;
vehicle2 = GetVehicleModel(PlayerInfo[playerid][Car2LinkID]);
new vehicle3;
vehicle3 = GetVehicleModel(PlayerInfo[playerid][Car3LinkID]);
new vehicle4;
vehicle4 = GetVehicleModel(PlayerInfo[playerid][Car4LinkID]);
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][CarLinkID] == 0 && PlayerInfo[playerid][Car2LinkID] == 0 && PlayerInfo[playerid][Car3LinkID] == 0 && PlayerInfo[playerid][Car4LinkID] == 0)
{
SendClientMessage(playerid, COLOR_GREY, "Ban khong so huu chiec xe nao!");
return 1;
}
else
{
if(PlayerInfo[playerid][CarLinkID] > 0)
{
format(string, sizeof(string), "Vehicle\t(1): %s\n", VehicleNames[vehicle1-400]);
ShowPlayerDialog(playerid, 8171, DIALOG_STYLE_LIST, "Sell Vehicle", string, "Sell", "Cancel");
}
if(PlayerInfo[playerid][Car2LinkID] > 0)
{
format(string, sizeof(string), "Vehicle\t(2): %s\n", VehicleNames[vehicle2-400]);
ShowPlayerDialog(playerid, 8172, DIALOG_STYLE_LIST, "Sell Vehicle", string, "Sell", "Cancel");
}
if(PlayerInfo[playerid][Car3LinkID] > 0)
{
format(string, sizeof(string), "Vehicle\t(3): %s\n", VehicleNames[vehicle3-400]);
ShowPlayerDialog(playerid, 8173, DIALOG_STYLE_LIST, "Sell Vehicle", string, "Sell", "Cancel");
}
if(PlayerInfo[playerid][Car4LinkID] > 0)
{
format(string, sizeof(string), "Vehicle\t(4): %s\n", VehicleNames[vehicle4-400]);
ShowPlayerDialog(playerid, 8178, DIALOG_STYLE_LIST, "Sell Vehicle", string, "Sell", "Cancel");
}
if(PlayerInfo[playerid][CarLinkID] > 0 && PlayerInfo[playerid][Car2LinkID] > 0 && PlayerInfo[playerid][Car4LinkID] > 0)
{
format(string, sizeof(string), "Vehicle\t(1): %s\nVehicle\t(2): %s\nVehicle\t(4): %s", VehicleNames[vehicle1-400], VehicleNames[vehicle2-400], VehicleNames[vehicle4-400]);
ShowPlayerDialog(playerid, 8174, DIALOG_STYLE_LIST, "Sell Vehicle", string, "Sell", "Cancel");
}
if(PlayerInfo[playerid][CarLinkID] > 0 && PlayerInfo[playerid][Car3LinkID] > 0 && PlayerInfo[playerid][Car4LinkID] > 0)
{
format(string, sizeof(string), "Vehicle\t(1): %s\nVehicle\t(3): %s\nVehicle\t(4): %s", VehicleNames[vehicle1-400], VehicleNames[vehicle3-400], VehicleNames[vehicle4-400]);
ShowPlayerDialog(playerid, 8175, DIALOG_STYLE_LIST, "Sell Vehicle", string, "Sell", "Cancel");
}
if(PlayerInfo[playerid][Car2LinkID] > 0 && PlayerInfo[playerid][Car3LinkID] > 0 && PlayerInfo[playerid][Car4LinkID] > 0)
{
format(string, sizeof(string), "Vehicle\t(2): %s\nVehicle\t(3): %s\nVehicle\t(4): %s", VehicleNames[vehicle2-400], VehicleNames[vehicle3-400], VehicleNames[vehicle4-400]);
ShowPlayerDialog(playerid, 8176, DIALOG_STYLE_LIST, "Sell Vehicle", string, "Sell", "Cancel");
}
if(PlayerInfo[playerid][CarLinkID] > 0 && PlayerInfo[playerid][Car2LinkID] > 0 && PlayerInfo[playerid][Car3LinkID] > 0)
{
format(string, sizeof(string), "Vehicle\t(1): %s\nVehicle\t(2): %s\nVehicle\t(3): %s", VehicleNames[vehicle1-400], VehicleNames[vehicle2-400], VehicleNames[vehicle3-400]);
ShowPlayerDialog(playerid, 8179, DIALOG_STYLE_LIST, "Sell Vehicle", string, "Sell", "Cancel");
}
if(PlayerInfo[playerid][CarLinkID] > 0 && PlayerInfo[playerid][Car2LinkID] > 0 && PlayerInfo[playerid][Car3LinkID] > 0 && PlayerInfo[playerid][Car4LinkID] > 0)
{
format(string, sizeof(string), "Vehicle\t(1): %s\nVehicle\t(2): %s\nVehicle\t(3): %s\nVehicle\t(4): %s\n", VehicleNames[vehicle1-400], VehicleNames[vehicle2-400], VehicleNames[vehicle3-400], VehicleNames[vehicle4-400]);
ShowPlayerDialog(playerid, 8177, DIALOG_STYLE_LIST, "Sell Vehicle", string, "Sell", "Cancel");
}
}
}
return 1;
}

4 slot car no error

add this error i sell car slot 4 and "server:unknow commads"

noo see slot 1,3


Re: help me this dialog sell car - cuchipkg - 25.02.2014

help me please


Re: help me this dialog sell car - Aerotactics - 25.02.2014

This might be redundant, but why use "format" for dialogs?


Re: help me this dialog sell car - cuchipkg - 26.02.2014

dialog and format error sell car


Re: help me this dialog sell car - Lloyde - 26.02.2014

You have a Dialog error and there's a lot of error of this script


_________________
Give me Reputation


Re: help me this dialog sell car - cuchipkg - 27.02.2014

you can help me fix this dialog ?