19.07.2015, 19:12
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?
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;
}