03.08.2016, 14:23
Alguйm poderia me ajudar a fazer esse cуdigo abaixo puxar outra funзгo da tabela cars por favor? a funзгo й carModel, й para falar qual o modelo do carro, eu nгo consegui fazer.
REP+ pra quem ajudar.
Код:
Dialog:MDCVehicle(playerid, response, listitem, inputtext[]) { if (GetFactionType(playerid) != FACTION_POLICE || !IsACruiser(GetPlayerVehicleID(playerid))) return 0; if(response) { new plate[64]; new string[152]; if(sscanf(inputtext, "s[64]", plate)) return Dialog_Show(playerid, MDCVehicle, DIALOG_STYLE_INPUT, "Mobile Data Computer - Procura de Placa", "PROCURA DE PLACA\n\nInsira a informaзгo da placa:", "Prosseguir", "Cancelar"); new Query[150]; mysql_format(g_iHandle, Query, sizeof(Query), "SELECT `character` FROM `characters` WHERE `ID` = (SELECT `carOwner` FROM cars WHERE carPlaca='%s' LIMIT 1)", plate); new Cache:handle = mysql_query(g_iHandle, Query); if(cache_get_row_count(g_iHandle)){ new user[25]; cache_get_field_content(0, "character", user, g_iHandle); cache_delete(handle, g_iHandle); format(string, sizeof(string), "RESULTADO DE BUSCA\n\nPlaca do Veнculo: %s\nModelo do Veнculo: %s\nDono do Veнculo: %s", plate,"", user); Dialog_Show(playerid, MDCResult, DIALOG_STYLE_MSGBOX, "Procurar Placa", string, "Cancelar", ""); } else{ SendErrorMessage(playerid, "PLACA NГO ENCONTRADA!"); } } return 1; }