Unknown command - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Unknown command (
/showthread.php?tid=367148)
Unknown command -
Riddick94 - 08.08.2012
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.
Re: Unknown command -
Riddick94 - 09.08.2012
Bump.
Re: Unknown command -
Shetch - 09.08.2012
Explain it a bit more please.
I can't understand what you are trying to do.
Re: Unknown command -
Syntax - 09.08.2012
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);
}
}
Re: Unknown command -
Riddick94 - 09.08.2012
There's no difference in the code between yours and mine.. What do you wan't to me to test?
Re: Unknown command -
Syntax - 09.08.2012
There is a difference, read through your code, read through my code
Re: Unknown command -
Riddick94 - 09.08.2012
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..
Re: Unknown command -
Riddick94 - 10.08.2012
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", "");
}
}
}