Auto Replacer string character to asterisk or "x"
#1

Explanation:
Im about to make passhash for some reason, it will auto replace/convert the characters of a string into "*" or "x" it depends how many characters are in the string
For Example:
When i type "ToiletDuck" and it will auto replace to "*******" 1 Character = 1 "*" , Characters,Numbers will be auto replace to asterisk or convert should say,
Any Help Guys? Thanks in Advance!
Reply
#2

Maybe this is help your problem
https://sampforum.blast.hk/showthread.php?tid=174046
Reply
#3

Quote:
Originally Posted by LMaxCo
Посмотреть сообщение
Im sorry not that :3 A Function mate, i dont know what to start with :/
Reply
#4

I'm confused. What exactly do you want?
Reply
#5

See this include -> https://sampforum.blast.hk/showthread.php?tid=362764
Reply
#6

This is just a quick one that I'm typing up now, it's nothing special and it's pretty average code.
pawn Код:
for(new i = 0; i < strlen(string); i++) if(string[i] != ' ') string[i] = '*';
Example:
pawn Код:
new hstr[20] = "Big Fat Black Woman";
for(new i = 0; i < strlen(hstr); i++) if(hstr[i] != ' ') hstr[i] = '*';
printf("%s", hstr);
Output:
Код:
Big Fat Black Woman
*** *** ***** *****
Reply
#7

And them how you will read that?
Reply
#8

OP wants to replace the player's password with asterisks. Maybe to show in a textdraw or something..

The best, most efficient way to do this is:

pawn Код:
for (new i = 0, l = strlen(password); i != l; i ++)
{
    password[i] = '*';
}
Reply
#9

Thanks Guys sorry i've been late replied, been inactive for days
Gotta try your code and need to understand :'D Thanks Guys

Quote:
Originally Posted by Emmet_
Посмотреть сообщение
OP wants to replace the player's password with asterisks. Maybe to show in a textdraw or something..

The best, most efficient way to do this is:

pawn Код:
for (new i = 0, l = strlen(password); i != l; i ++)
{
    password[i] = '*';
}
Yes Emmet you're right im doing this for TextDraw thingy Thanks alot (y)

@EDIT: Emmet does this code of yours everything string to be input automatically converts to asterisk?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)