13.12.2014, 15:30
Hello.
I have a command to list the player vehicles.
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 ...
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);
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");
}