18.12.2017, 19:51
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
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
Код:
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; }