Help strcmp
#1

Could someone help me?
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;
                    }
                }
            }
        }
It finds only 1 vehicle whatever id write ,help me please
Reply
#2

Remove
pawn Код:
return 0;
Reply
#3

Thanks man,working xD
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)