/vmenu command bug
#1

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
Reply
#2

UP! ----------
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)