Unknown command
#1

pawn Код:
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
    {
        for(new i = 0; i < MAX_OWNABLE_VEH; i++)
        {
            new string[128], vehstring[128], count = 0;
            format(vehstring, sizeof(vehstring), "%s\n%s", VehicleNames[GetVehicleModel(VehicleInfo[ VehicleInfo[i][pVehOwner] ][pVehModel]) - 400], vehstring);
            count += 1;
            format(string, sizeof(string), "%s", vehstring);
            ShowInfo(playerid, "Pojazdy - lista", string);
        }
    }
There's a problem with first format line.. exactly with VehicleNames.. How to set properly those things?

GetVehicleModel(vehicleid) but i need to check vehicle names that players owns and show him in Dialog box.
Reply
#2

Bump.
Reply
#3

Explain it a bit more please.
I can't understand what you are trying to do.
Reply
#4

Try:

pawn Код:
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
    {
        for(new i = 0; i < MAX_OWNABLE_VEH; i++)
        {
            new string[128], vehstring[128], count = 0;
            format(vehstring, sizeof(vehstring), "%s\n%s", VehicleNames[GetVehicleModel(VehicleInfo[ VehicleInfo[i][pVehOwner] ][pVehModel]) - 400], vehstring);
            SendClientMessage(playerid, COLOR_GREEN, string);
            count += 1;
            format(string, sizeof(string), "%s", vehstring);
            ShowInfo(playerid, "Pojazdy - lista", string);
        }
    }
Reply
#5

There's no difference in the code between yours and mine.. What do you wan't to me to test?
Reply
#6

There is a difference, read through your code, read through my code
Reply
#7

You just added a SendClientMessage function. Still error "Unknown command".

@Shetch, i just wondering how to show player a list of his vehicles that he already owns..
Reply
#8

Still trying to do.. anyone got an idea?

pawn Код:
if(GetPlayerState(playerid) == PLAYER_STATE_ONFOOT)
        {
            for(new i = 1; i < MAX_BUYABLE_VEH; i++)
            {
                if(strmatch(VehicleInfo[i][vVehOwner], PlayerName(playerid)))
                {
                    new string[128], vehstring[128], count = 0;
                    format(vehstring, sizeof(vehstring), "%s\n%s", VehicleNames[GetVehicleModel(VehicleInfo[i][vVehModel]) - 400], vehstring);
                    count += 1;
                    format(string, sizeof(string), "%s", vehstring);
                    ShowPlayerDialog(playerid, DIALOG_VEHICLE_LIST, DIALOG_STYLE_LIST, "Lista pojazdуw", string, "Okey", "");
                }
            }
        }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)