Cargar carros
#3

Quote:
Originally Posted by Zume-Zero
Посмотреть сообщение
pawn Код:
LoadPlayerCars(playerid)
{
    new query[120],
        name[MAX_PLAYER_NAME];

    GetPlayerName(playerid,name,sizeof(name));
    mysql_format(mysql,query,sizeof(query),"SELECT * FROM `cars` WHERE `Owner` = '%s'",name);
    mysql_tquery(mysql,query);
    printf("%s",query);

    for (new i = 0; i < rows; i ++)  // Ejemplo
    {
        CarInfo[i][cID] = cache_get_field_content_int(0, "ID");
        CarInfo[i][cOwner] = cache_get_field_content(0, "Owner", CarInfo[i][cOwner]);
        CarInfo[i][cModel] = cache_get_field_content_int(0, "Model");
        CarInfo[i][cColor1] = cache_get_field_content_int(0, "VehicleColor1");
        CarInfo[i][cColor2] = cache_get_field_content_int(0, "VehicleColor2");
        CarInfo[i][cXPos] = cache_get_field_content_float(0, "XCoord");
        CarInfo[i][cYPos] = cache_get_field_content_float(0, "YCoord");
        CarInfo[i][cZPos] = cache_get_field_content_float(0, "ZCoord");
        CarInfo[i][cPlate] = cache_get_field_content(0, "VehiclePlate", CarInfo[i][cPlate]);
    }
}
Dentro.
Zume una pregunta, al hacer la consulta con SELECT * їque estбn seleccionando de la tabla cars? їTodo?o que
Reply


Messages In This Thread
Cargar carros - by [CG]Milito - 01.12.2014, 02:28
Respuesta: Cargar carros - by Zume - 01.12.2014, 03:08
Respuesta: Cargar carros - by jotajeda - 01.12.2014, 14:26
Respuesta: Cargar carros - by Zume - 01.12.2014, 14:33
Respuesta: Cargar carros - by jotajeda - 01.12.2014, 15:07
Respuesta: Cargar carros - by [CG]Milito - 01.12.2014, 15:45
Respuesta: Cargar carros - by [CG]Milito - 01.12.2014, 16:26
Respuesta: Cargar carros - by jotajeda - 01.12.2014, 16:31
Respuesta: Cargar carros - by [CG]Milito - 01.12.2014, 16:35
Respuesta: Cargar carros - by jotajeda - 01.12.2014, 16:39

Forum Jump:


Users browsing this thread: 2 Guest(s)