help me this dialog sell car
#1

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
Reply
#2

help me please
Reply
#3

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

dialog and format error sell car
Reply
#5

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


_________________
Give me Reputation
Reply
#6

you can help me fix this dialog ?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)