ShowModelSelectionMenuEx not displaying all in ENUM.
#1

Hi there,

This is showing the first item in the enum but not the second despite it adding a correct second box, although it's displaying a CJ skin and the debugs return the correct model and ID's.

Could you kindly assist?

pawn Код:
CMD:vgetfurni(playerid, params[])
{
    new vehicleid = GetClosestVehicle(playerid);
    if(LoggedIn[playerid] == 0) return SendClientMessage(playerid, COLOUR_GREY, "You must be logged in to use this command.");
        if(VehicleSQLID[vehicleid] < 1) return SendClientMessage(playerid, COLOUR_GREY, "This vehicle cannot hold furniture.");
    new am = 0;
    new engine, lights, alarm, doors, bonnet, boot, objective;
        GetVehicleParamsEx(vehicleid, engine, lights, alarm, doors, bonnet, boot, objective);
    if(boot == 0)return SendClientMessage(playerid, COLOUR_GREY, "You are not near a vehicle with a trunk open.");
    for(new x = 1; x < MAX_FURNI; x++)
        {
               if(VehFurniStored[x] == VehicleSQLID[vehicleid])
               {
                    am++;
            FurniEnum[playerid][am][fid] = x;
            FurniEnum[playerid][am][fmod] = FurniModel[x];
            printf("FurniEnum [%d][%d][%d]",playerid, am, FurniEnum[playerid][am][fid]);
            printf("Model: %d", FurniEnum[playerid][am][fmod]);
            VehOpened[playerid] = vehicleid;
        }
    }
    if(am == 0)return SendClientMessage(playerid, COLOUR_GREY, "There is no furniture stored in this vehicle.");
    ShowModelSelectionMenuEx(playerid, FurniEnum[playerid][am][fmod], am, "Vehicle Furniture", FURNI_MENU, 16.0, 0.0, -55.0);
    return 1;
}
Reply
#2

Hello!

Well, so that I understand the problem better, can you send me the prints?

- Mencent
Reply
#3

Hi there,

Of course,

Код:
[20:10:45] FurniEnum [1][1][1]
[20:10:45] Model: 1760
[20:10:45] FurniEnum [1][2][2]
[20:10:45] Model: 1281
Reply
#4

Doesn't it have to be so?

PHP код:
if(VehFurniStored[x] == VehicleSQLID[vehicleid])
           {
             
am++;
            
FurniEnum[playerid][am][fid] = x;
            
FurniEnum[playerid][am][fmod] = FurniModel[x];
            
printf("FurniEnum [%d][%d][%d]",playeridamFurniEnum[playerid][am][fid]);
            
printf("Model: %d"FurniEnum[playerid][am][fmod]);
            
VehOpened[playerid] = vehicleid;
            
ShowModelSelectionMenuEx(playeridFurniEnum[playerid][am][fmod], am"Vehicle Furniture"FURNI_MENU16.00.0, -55.0);
        } 
- Mencent
Reply
#5

I don't think so.

Why the +400?
Reply
#6

Sorry, that was a mistake from me.

Can you test it, of course without the +400;.


- Mencent
Reply
#7

But it's not changed in that case?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)