Litte help in dialog
#1

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

Код:
	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.");
	}
Thanks in advance if someone can help me
Reply


Messages In This Thread
Litte help in dialog - by N3cromancer - 28.02.2015, 20:58
Re : Litte help in dialog - by Etolas - 28.02.2015, 21:06
Re: Re : Litte help in dialog - by N3cromancer - 28.02.2015, 21:12
Re : Re: Re : Litte help in dialog - by Etolas - 28.02.2015, 21:13
Re: Litte help in dialog - by N3cromancer - 28.02.2015, 21:18
Re: Litte help in dialog - by Etolas - 28.02.2015, 21:26
Re: Litte help in dialog - by N3cromancer - 28.02.2015, 21:43
Re: Litte help in dialog - by Etolas - 28.02.2015, 22:02

Forum Jump:


Users browsing this thread: 2 Guest(s)