26.04.2011, 16:22
Could someone help me?
I have a MDC System that should find a Vehicle by its plate using a dialog
Here is the code:
It finds only 1 vehicle whatever id write ,help me please
I have a MDC System that should find a Vehicle by its plate using a dialog
Here is the code:
pawn Код:
if(dialogid == 6)
{
for(new i=1; i<MAX_VEHICLES; i++)
{
if(IsAnOwnableCar(i))
{
if(CarInfo[i][cOwned] == 1)
{
if(!strcmp(inputtext, CarInfo[i][cPlate], true, strlen(CarInfo[i][cPlate])))
{
SendClientMessage(playerid,COLOR_GREEN,"|_________Vehicle Information(plate)________|");
format(string,sizeof(string),"Vehicle Owner:%s Ticket:%d",CarInfo[i][cOwner],CarInfo[i][cParkTicket]);
SendClientMessage(playerid, COLOR_GRAD2,string);
format(string, sizeof(string), "Vehicle Ticket Value : $%d Ticket Officer:%s",CarInfo[i][cParkTicket], CarInfo[i][cTicketer]);
SendClientMessage(playerid, COLOR_GRAD2,string);
return 0;
}
}
}
}