Getting the item (not model) a player selects in OnPlayerModelSelectionEx?
#1

To explain this easily.

When I say item, I mean ID. Like if they select the first picture (model) how do I check that?

Imagine there is a garage and you put your car in there, and to get it back a Model selection menu displays with your car and you click it, how can I get all the variables relevant to that vehicle back? and say there was more than one vehicle in the garage?

Is this possible?
Reply
#2

I would create an array which would contain last saved vehicles. Something simillar to this:
pawn Код:
new GarageVehicles[MAX_PLAYERS][10];
// when player leaves the garage:
GarageVehicle[playerid][0] = model; // something like this, you'll probably have to loop through the array to get empty slot
Reply
#3

Yeah, but what if there was more than one model of the same kind?

Edit:

Will this do it, do you think?

It's not actually a garage, it's for getting furniture from a vehicle.

pawn Код:
for(new x = 1; x < slots; x++)
            {
                if(modelid == FurniModel[playerid][x][fmod])
                {
                    new furni = FurniModel[playerid][x][fid];
                    VehFurniStored[furni] = 0;
                    HoldingFurni[playerid] = furni;
                    SetPlayerAttachedObject(playerid, 2, FurniModel[furni], 14);
                    printf("MODEL %d", FurniModel[furni]);
                    SetPlayerSpecialAction(playerid, 25);
                    VehOpened[playerid] = 0;
                    format(string, sizeof(string), "* %s has taken an item of furniture from the %s *", GetNameEx(playerid), VehicleNames[GetVehicleModel(vehid) - 400]);
                    ProxDetector(30.0, playerid, string, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE, COLOUR_PURPLE);
                }
            }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)