Auto Replacer string character to asterisk or "x" -
ToiletDuck - 08.05.2015
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!
Re: Auto Replacer string character to asterisk or "x" -
LMaxCo - 08.05.2015
Maybe this is help your problem
https://sampforum.blast.hk/showthread.php?tid=174046
Re: Auto Replacer string character to asterisk or "x" -
ToiletDuck - 08.05.2015
Quote:
Originally Posted by LMaxCo
|
Im sorry not that :3 A Function mate, i dont know what to start with :/
Re: Auto Replacer string character to asterisk or "x" -
MP2 - 08.05.2015
I'm confused. What exactly do you want?
Re: Auto Replacer string character to asterisk or "x" -
J4Rr3x - 08.05.2015
See this include ->
https://sampforum.blast.hk/showthread.php?tid=362764
Re: Auto Replacer string character to asterisk or "x" -
Threshold - 09.05.2015
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
*** *** ***** *****
Re: Auto Replacer string character to asterisk or "x" -
PT - 09.05.2015
And them how you will read that?
Re: Auto Replacer string character to asterisk or "x" - Emmet_ - 09.05.2015
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] = '*';
}
Re: Auto Replacer string character to asterisk or "x" -
ToiletDuck - 10.05.2015
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?