SA-MP Forums Archive
/vmenu command bug - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: /vmenu command bug (/showthread.php?tid=178696)



/vmenu command bug - Fab10 - 23.09.2010

if(strcmp(cmd, "/vmenu", true) == 0)
{
new string[1024];
new z=0,vvid=-1;
if(IsPlayerInAnyVehicle(playerid))vvid=GetPlayerVe hicleID(playerid);
for(new vehid=0;vehid<MAX_VEHICLES;vehid++)
{
if(strlen(PlayerName(playerid))==strlen(VehicleInf o[vehid][vowner]) && !strcmp(PlayerName(playerid),VehicleInfo[vehid][vowner],false,MAX_PLAYER_NAME) && VehicleInfo[vehid][visvalid]==1 && !dini_Int(VehicleInfo[vehid][vfile],"IsDestroyed"))
{
if(vehid==0)format(string,sizeof(string),"%s [%s]",GetVehicleModelName(VehicleInfo[vehid][vmodel]),VehicleInfo[vehid][vfuel]);
else format(string,sizeof(string),"%s\n%s [%s]",string,GetVehicleModelName(VehicleInfo[vehid][vmodel]),VehicleInfo[vehid][vfuel]);
if(vehid==vvid) format(string,sizeof(string),"%s (Attuale)",string);

VMenuInfo[playerid][itemvid][z]=vehid;
z++;
}
else VMenuInfo[playerid][itemvid][vehid]=-1;
}
if(z==0) return SendClientMessage(playerid,COLOR_GREY,"Per usare questo comando devi avere almeno un veicolo!");
ShowPlayerDialog(playerid, dialog_VMenu, DIALOG_STYLE_LIST, "Sistema Veicoli", string, "Amministra", "Esci");
return 1;
}

if player have 3 or + vehicles, vehicle 2 was bugged and not shown in the list


Re: /vmenu command bug - Fab10 - 25.09.2010

UP! ----------