Vehicle list won't show
#1

Hey all,

So I was working on a /vehicles command which shows you all the vehicles you own, but when I had bought the vehicle and used the command it said that my character doesn't own any vehicles, yet I'm sure I did everything right, someone mind showing me what I did wrong and why I did it wrong?

Code:
pawn Код:
CMD:vehicles(playerid, params[])
{
    new bool:found = false, list[512];
    list = "ID\tVehicle\tNumber Plate\n";
   
    for (new i = 0; i < MAX_VEHICLES; i++)
    {
        if(PlayerVehicle[v][pvStatus] == 1)
        {
            if (!strcmp(PlayerVehicle[i][pvOwner], owner, true)) {
                found = true;
                format(list, sizeof(list), "%s%d\t%s\t%s\n", list, v, GetVehicleName(v), PlayerVehicle[v][pvPlate]);
            }
        }
    }
    if(found == true) return ShowPlayerDialog(playerid, DIALOG_MYVEHICLES, DIALOG_STYLE_TABLIST_HEADERS, "Vehicles", list, "Select", "Close");
    else return ShowPlayerDialog(playerid, 9999, DIALOG_STYLE_MSGBOX, "Vehicles", "{FF0000}No vehicles found!", "Close", "");
}
Reply


Messages In This Thread
Vehicle list won't show - by McGuiness - 14.05.2017, 19:32
Re: Vehicle list won't show - by Hansrutger - 14.05.2017, 19:57
Re: Vehicle list won't show - by McGuiness - 14.05.2017, 20:02
Re: Vehicle list won't show - by Hansrutger - 14.05.2017, 20:03
Re: Vehicle list won't show - by McGuiness - 14.05.2017, 20:07
Re: Vehicle list won't show - by Hansrutger - 14.05.2017, 20:09
Re: Vehicle list won't show - by McGuiness - 14.05.2017, 20:19
Re: Vehicle list won't show - by Hansrutger - 14.05.2017, 20:26
Re: Vehicle list won't show - by McGuiness - 14.05.2017, 20:38
Re: Vehicle list won't show - by Hansrutger - 14.05.2017, 20:42

Forum Jump:


Users browsing this thread: 4 Guest(s)