Code isn't responding, why?
#1

Hello,

I got a problem with my code for a database system for cops. It's not responding. But the code that i use seems to be valid ...
Anyone know the problem?

Код:
if(dialogid == 301)
	{
		for(new c=0; c<MAX_VEHICLES; c++)
 		{
			if(!strcmp(inputtext, vPlate[c], false, 20))
			{
			    if(strlen(inputtext) != 0)
			    {
			        CloseAnyOpenPDialog(playerid);
                	GetPlayerName(GetVehicleOwner©, iname, sizeof(iname));
	    	    	format(str, sizeof str,"Vehicle Name: %s\nVehicle Plate: %s\nOwner: %s",GetVehicleName©,vPlate[c],iname);
					ShowPlayerDialog(playerid, 387, DIALOG_STYLE_MSGBOX, "Trace licenseplate", str, "Close", "_");
					return 1;
				}
			}
   			SendClientMessage(playerid, COLOR_RED,"DATABASE: The entered licenseplate is not found.");
		    return 1;
		}
	}
EDIT: GetVehicleOwner code:

Код:
public GetVehicleOwner(vehicleid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
	{
	    if(vehicleid == pVeh[i]) return i;
	}
	return -1;
}
Thanks,
Danny
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)