29.01.2016, 21:25
Hello! I created a textdraw for login and after the player types his password, I want to show the textdraw with those characters, like in the DIALOG_STYLE_PASSWORD.Is it possible?
new final[30];
new first[30];
new x[20] = "just test";
new character[3];
format(character, 3, "*");
new y = strlen(x);
for(new i = 0; i < y; i++)
{
format(first, 30, "%s", character);
strcat(final, first);
}
printf("Number of symbols hidden: %d", y);
printf("This shall be final result: %s", final);
[23:45:13] Number of symbols hidden: 9 [23:45:13] This shall be final result: *********
Well, you can just set a fake textdraw with • as characters (you can just copy-paste that but can also create it with Alt+7) or you can make a simple script to count the dialog input and set the characters count, like example:
pawn Код:
Код:
[23:45:13] Number of symbols hidden: 9 [23:45:13] This shall be final result: ********* |
for(new i, j = strlen(pass); i < j; i++)
pass[i] = '*';