Insert text per line
#1

Hello, I would like to put text on a line that will be randomly assigned. For example: new line = 5 .. and I should have done the lines, and only on line 5 give that text .. Do not understand, I know

Код:
new line[MAX_PLAYERS];

CMD:coin(playerid, params[])
{
  new sString[259];
  for(new i; i < MAX_LINES; i++) {

	   strins(sString, "%i)", i);
	}
  ShowPlayerDialog(playerid, 1562, DIALOG_STYLE_LIST, "Clicker - EvoLve.",  sString, "Select", "Close");
  return 1;
}
// This is generated dialog.. ye ? And put text 'Coins + 1' on random generated line..

line[playerid] = random(MAX_LINES); // Random generate line

//Set name of line.. And insert the text on the line that is specified in varriable line[playerid]..

stock ClickerGenerate(playerid)
{
  new generated[100];
  if(line[playerid] == 0) generated = "\n";
  else if(line[playerid] > 0) generated = "Coins + 1\n";
  return generated;
}
Or when I have bad code, please fix it to me .. I want it to give me a random number, and in the command / coins on that line will be 'Coins + 1' .. Thank you
Reply


Messages In This Thread
Insert text per line - by James585 - 18.12.2017, 19:51
Re: Insert text per line - by 0x88 - 19.12.2017, 09:14
Re: Insert text per line - by James585 - 20.12.2017, 16:42

Forum Jump:


Users browsing this thread: 1 Guest(s)