Question

Новичок
CMD:car(playerid, params[])
{
    new fmt_text[2640], Cache: result, id;

    mysql_format(mysql, fmt_text, sizeof fmt_text, "SELECT * FROM ownable_cars WHERE owner_id='%d'", GetPlayerAccountID(playerid));
    result = mysql_query(mysql, fmt_text, true);

    new rows = cache_num_rows();

    if(!rows) return SendClientMessage(playerid, 0x999999FF"У Вас нет личного транспорта");

    new model_id, region[10], car_number[10];

    format(fmt_text, sizeof fmt_text, "");

    for(new i = 0; i < rows; i ++)
    {
        id = cache_get_field_content_int(i, "id");
        model_id = cache_get_field_content_int(i, "model_id") - 400;
        cache_get_field_content(i, "number", car_number);
        cache_get_field_content(i, "region", region);
        STRING_GLOBAL[0] = EOS;
        format(STRING_GLOBAL, sizeof STRING_GLOBAL, "{FFFFFF}%d. %s {888888}[%s | %s]\n", i + 1, GetVehicleInfo(model_id, VI_NAME), car_number, region);
        strcat(fmt_text, STRING_GLOBAL);
        SetPlayerListitemValue(playerid, i, id);
    }

    Dialog(playerid, DIALOG_OWNABLE_CAR_LIST, DIALOG_STYLE_LIST,"{0099FF}Выберите транспорт",fmt_text,"Выбрать""Закрыть");

    cache_delete(result);

    return 1;
}

 

Edited by Cawfee
Причина: убрал код в тег "Код".

Share this post


Link to post

0 answers to this question

There have been no answers to this question yet

This topic is now closed to further replies.
Sign in to follow this  
Followers 0
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By OPCODERSSSS
      Прописал уже все инклуды,он мне все равно вот эту дрянь ну емае
       
       
      other.amx
      other.pwn
      hgsystem.amx