PDA

View Full Version : Unknown command


Riddick94
08/08/2012, 09:41 PM
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.

Riddick94
09/08/2012, 10:14 AM
Bump.

Shetch
09/08/2012, 10:22 AM
Explain it a bit more please.
I can't understand what you are trying to do.

Syntax
09/08/2012, 10:22 AM
Try:

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);
}
}

Riddick94
09/08/2012, 10:50 AM
There's no difference in the code between yours and mine.. What do you wan't to me to test?

Syntax
09/08/2012, 10:52 AM
There is a difference, read through your code, read through my code

Riddick94
09/08/2012, 11:07 AM
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..

Riddick94
10/08/2012, 07:15 PM
Still trying to do.. anyone got an idea?

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", "");
}
}
}