
if(dialogid == DIALOG_ENCONTRAR_VEHICULO)
{
if(response && strlen(inputtext) > 0)
{
for(new i; i < sizeof(cInfo); i++)
{
//I check if the car have a license and the license is == to the inputtext
if(strcmp(cInfo[i][matricula], "Without License", false) == 0 && strcmp(cInfo[i][matricula], inputtext, true) == 0 && cInfo[i][id_x] != INVALID_VEHICLE_ID)
{
new string[160], Float:x, Float:y, Float:z, name[MAX_PLAYER_NAME];
GetPlayerName(cInfo[i][ownerID], name, MAX_PLAYER_NAME);
GetVehiclePos(cInfo[i][id_x], x, y, z);
format(string, sizeof(string), "Found Vehicle | Owner: %s | License Plate: %s", name, inputtext); // <-
SendClientMessage(playerid, -1, string);
SendClientMessage(playerid, COLOR_YELLOW, "We find the car, check the map.");
printf("DEBUG OUTFOR: Encontrado - Pos: %f,%f,%f, %s", x, y, z, name);
return 0;
}
}
SendClientMessage(playerid, -1, "Not vehicle found.");
}
else SendClientMessage(playerid, -1, "Panel closed.");
}
|
cInfo[i][ownerID]
Is it the SQLID or the id in the "tab list" ? Because I don't know your script and I need this element to try to help you. |
|
Is the SQL ID, omg xD.. i think that was all xD let me check Thanks for ur reply Etolas
|

stock GetPlayerTabId(mysql_player_id)
{
foreach(new x: Player)
{
if(pInfo[x][id_db] == mysql_player_id)
{
return pInfo[x][pID];
}
}
return INVALID_PLAYER_ID;
}
|
public MySQLGetName(result[], sqlid) { new query[128]; format(query, sizeof(query), "SELECT `Name` FROM `players_stats` WHERE ID=%d", sqlid); mysql_query(query); mysql_store_result(); if(mysql_num_rows()==0) {return format(result, 32, "None");} else { new strid[32]; if(mysql_fetch_row(strid)==1) { return format(result, 32, "%s", strid); } } return 1; } |