28.02.2015, 20:58
Hello everyone who read this topic, i making a system to find a car pos by license plate, Everywork until i arrive to the onDialogResponse, for some reason i cant get the name of the owner of the vehicle, i dont know where is the problem
This is my code
Thanks in advance if someone can help me
This is my code
Код:
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."); }