Dialog that grows automatically
#3

make a command /races [n] (n= 1, 2, 3...)

Код:
dcmd_races(playerid, params[])
{
     if (params[0] == '1' && params[1] == '\0' )
     {
          // show your first dialog (races 1 to 8)
          return 1;
     }
     else if ( params[0] == '2' && params[1] == '\0' )
     {
          // show your second dialog (races 9 to 16)
          return 1;
     }
     ...
     ...
     else if ( params[0] == 'n' && params[1] == '\0' )
     {
          // show your n dialog  (races 8*(n-1) to last)
          return 1;
     }
     else return SendUsage( playerid, "/races [1 to n]" );
}
n depends of the total races. In your case you need 7 dialogs, the last with only two races (8*6)+2 = 50 races, so n=7.

This solution is not very good because you need to edit the script everytime you add a new race.
Reply


Messages In This Thread
Dialog that grows automatically - by Derexi - 23.03.2015, 14:34
Re: Dialog that grows automatically - by Vince - 23.03.2015, 15:01
Respuesta: Dialog that grows automatically - by alexus - 23.03.2015, 15:13
Re: Dialog that grows automatically - by Derexi - 23.03.2015, 16:01

Forum Jump:


Users browsing this thread: 2 Guest(s)