[HELP]License problem
#1

Ok i'm having this problem when a cop does /mdc and clicks search vehicle license and they type in the vehicle license plate it is supposed to show the specific vehicle plate info, but it doesn't it doesn't even show the info,and it shows the wrong car.Heres the code
pawn Код:
if(dialogid == DACCT31)

    {
        if (response == 1)

        {
            new giveplayerid;
            new dstring[256];
            new sendername[MAX_PLAYER_NAME];
            giveplayerid = ReturnUser(inputtext);
            GetPlayerName(giveplayerid, sendername, sizeof(sendername));
            GiveNameSpace(sendername);

   new string[256], string2[256];
        for(new i; i<SCRIPT_CARS; i++)
        {
            if(strcmp(CarInfo[i][cLicense], inputtext, true)== 0)
            {
          new name[MAX_PLAYER_NAME];
            strcpy(name,CarInfo[i][cOwner],MAX_PLAYER_NAME);



            format(dstring, sizeof(dstring), "Owner: %s\r\nVehicle Model: %s\r\nInsurances %d\r\nColor1 %d\r\nColor2 %d\r\nTickets(price) $%d", name,
            CarInfo[i][cDescription],CarInfo[i][cInsurances],CarInfo[i][cColorOne],CarInfo[i][cColorTwo],CarInfo[i][cTicket]);
            ShowPlayerDialog(playerid,DACCT31,DIALOG_STYLE_MSGBOX,"MOBILE DATA COMPUTER",dstring,"Ok","Cancel");
             return 1;
            }
        }
        ShowPlayerDialog(playerid,54005,DIALOG_STYLE_MSGBOX,"Unsuccessfull search:","Vehicle Wasn't found !","Ok","");
        }
    }
here are some pics to show what happens

see how the vehicle license plate says Test i type that in and it does this

then i click "Ok" and it doesn't even exit it it does this

Please can someone help me thanks.
Reply
#2

Sorry for really early bump but it will be helpful if someone showed me how to fix it thanks.
Reply
#3

No idea what you did sorry, it confused me lol. I think you set giveplayerid, as the name of the person that the cop types? or the inputtext? then you should be showing the information of giveplayerid, and not i
Reply
#4

Try
pawn Код:
if(dialogid == DACCT31)
{
    if(response)
    {
        new dstring[256],bool:Found;
        for(new i; i<SCRIPT_CARS; i++)
        {
            if(!strcmp(CarInfo[i][cLicense], inputtext, true))
            {
                Found = true;
                format(dstring,sizeof(dstring),"Owner: %s\nVehicle Model: %s\nInsurances %d\nColor1 %d\nColor2 %d\nTickets(price) $%d",CarInfo[i][cOwner],
                CarInfo[i][cDescription],CarInfo[i][cInsurances],CarInfo[i][cColorOne],CarInfo[i][cColorTwo],CarInfo[i][cTicket]);
                break;
            }
        }
        if(Found) ShowPlayerDialog(playerid,DACCT31,DIALOG_STYLE_MSGBOX,"MOBILE DATA COMPUTER",dstring,"Ok","Cancel");
        else ShowPlayerDialog(playerid,54005,DIALOG_STYLE_MSGBOX,"Unsuccessfull search:","Vehicle Wasn't found !","Ok","");
    }
}
Reply
#5

Nope it didn't work still does the same thing
Reply
#6

Can anyone please help thanks i just really need to fix this problem,won't bump it again till tommorow just can someone show me how to fix this problem thanks.
Reply
#7

BUMPED
Reply
#8

3D text draw? You sure it reads from the numberplate?
Reply
#9

i don't actually really know i think it does though.
Reply
#10

Quote:
Originally Posted by Lilcuete
Посмотреть сообщение
BUMPED
..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)