Problem with MySQL/dialog.
#1

Hello.

I have a command to list the player vehicles.

pawn Код:
mysql_format(MySQLConnect, query, 256, "SELECT * FROM vehs WHERE Proprio = '%s'", NameRequete[playerid]);
mysql_tquery(MySQLConnect, query, "CarTaxi", "i", playerid);
Then the player can choose the vehicle he wants to turn it into a taxi.

But if I have 3 vehicles I select the second, it will be the third to be transformed ...

pawn Код:
forward CarTaxi(playerid);
public CarTaxi(playerid)
{
    new rows = cache_num_rows(),
        string_total[256],
        stringveh[50];

    for(new i = 1; i < rows+1; i++)
    {
        if(!IsABike(i))
        {
            format(stringveh, sizeof(stringveh), "%s\n", GetVehicleName(i));
            strins(string_total, stringveh, strlen(string_total));
            IdVehTaxi[playerid] = i;
        }
    }
    return ShowPlayerDialog(playerid, 11, DIALOG_STYLE_LIST, "Taxi:", string_total, "Ok", "Quit");
}
Reply


Messages In This Thread
Problem with MySQL/dialog. - by Baltimore - 13.12.2014, 15:34
Re : Problem with MySQL/dialog. - by Baltimore - 13.12.2014, 20:19
Re : Problem with MySQL/dialog. - by Baltimore - 14.12.2014, 09:08
Re : Problem with MySQL/dialog. - by Baltimore - 19.12.2014, 19:09
Re: Problem with MySQL/dialog. - by Sawalha - 19.12.2014, 20:32

Forum Jump:


Users browsing this thread: 1 Guest(s)