mSelection Dealerships
#2

1. Yes they do the same thing. The first one looks nicer and easier to understand though.
2. I couldn't find any pre-made scripts but it is fairly easy to do it yourself.
You can use something like this:
Код:
OnGameModeInit:
{
     Vehicles = LoadModelSelectionMenu("Vehicles.txt"); // Where vehicles is a file containing the model IDs of the vehicles you want (1 at a line)
}
In a command for example:
{
     ShowModelSelectionMenu(playerid, Vehicles, "Vehicle Select", 0x007FFF33, COLOR_GREY, COLOR_WHITE);
}
Let's say you placed 2 models in Vehicles.txt 400 and 401

public OnPlayerModelSelection(playerid, response, listid, modelid)
{
    if(listid == Vehicles)
    {
          for(new i; i < 2; i++)
          {
               switch(modelid)
               {
                    case 400:
                    {
                        // Dialog asking if you want to buy vehicle model 400 for $price
                    }
                    case 401:
                    {
                        // Dialog asking if you want to buy vehicle model 401 for $price
                    }
                    // ETC or you can make an array with models and prices to get rid of the cases.
               }
          }
    }
PS: The script in your signature is useless because the variable called REP is local and can not be accessed from outside that function. Which in turn will make the reputation useless.
Reply


Messages In This Thread
mSelection Dealerships - by Lidor124 - 10.01.2015, 20:45
Re: mSelection Dealerships - by mirou123 - 10.01.2015, 21:06

Forum Jump:


Users browsing this thread: 1 Guest(s)