comparing strings
#3

I used, but still doesnt work.
pawn Код:
if(!strcmp(PlayerInfo[playerid][pCarKey1], PlayerInfo[playerid][pCarSel]))
        {
            format(globalcar1,sizeof(globalcar1),"{00FF00}%s\t\t (UID: %d)",aVehicleNames[ model1 - 400 ],PlayerInfo[playerid][pCarKey1]);
        }
        else
        {
            format(globalcar1,sizeof(globalcar1),"%s\t\t (UID: %d)",aVehicleNames[ model1 - 400 ],PlayerInfo[playerid][pCarKey1]);
        }
        if(!strcmp(PlayerInfo[playerid][pCarKey2], PlayerInfo[playerid][pCarSel]))
        {
            format(globalcar2,sizeof(globalcar2),"{00FF00}%s\t\t (UID: %d)",aVehicleNames[ model2 - 400 ],PlayerInfo[playerid][pCarKey2]);
        }
        else
        {
            format(globalcar2,sizeof(globalcar2),"%s\t\t (UID: %d)",aVehicleNames[ model2 - 400 ],PlayerInfo[playerid][pCarKey2]);
        }
Basically when you choose car1 it sets pCarSel to pCarKey1
if you choose car2 it sets pCarSel to pCarKey2

And what I want is, the selected car to be green in the dialgo. But they are all the time, colour doesnt change.
Reply


Messages In This Thread
comparing strings - by HondaCBR - 02.01.2012, 13:47
AW: comparing strings - by BigETI - 02.01.2012, 13:58
Re: comparing strings - by HondaCBR - 02.01.2012, 14:15

Forum Jump:


Users browsing this thread: 1 Guest(s)