ShowModelSelectionMenuEx not displaying all in ENUM. -
Dokins - 19.07.2015
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;
}
AW: ShowModelSelectionMenuEx not displaying all in ENUM. -
Mencent - 19.07.2015
Hello!
Well, so that I understand the problem better, can you send me the prints?
- Mencent
Re: ShowModelSelectionMenuEx not displaying all in ENUM. -
Dokins - 19.07.2015
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
AW: ShowModelSelectionMenuEx not displaying all in ENUM. -
Mencent - 19.07.2015
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]",playerid, am, FurniEnum[playerid][am][fid]);
printf("Model: %d", FurniEnum[playerid][am][fmod]);
VehOpened[playerid] = vehicleid;
ShowModelSelectionMenuEx(playerid, FurniEnum[playerid][am][fmod], am, "Vehicle Furniture", FURNI_MENU, 16.0, 0.0, -55.0);
}
- Mencent
Re: ShowModelSelectionMenuEx not displaying all in ENUM. -
Dokins - 19.07.2015
I don't think so.
Why the +400?
AW: ShowModelSelectionMenuEx not displaying all in ENUM. -
Mencent - 19.07.2015
Sorry, that was a mistake from me.
Can you test it, of course without the +400;.
- Mencent
Re: ShowModelSelectionMenuEx not displaying all in ENUM. -
Dokins - 19.07.2015
But it's not changed in that case?