30.10.2012, 19:51
Hi, im trying to make a kind of security password type sistem in my GM..
I'll explain.. When the player tipes the password it apears "Black Balls" instead of the real password..
Is it possible?
Here's the Dialog
If you know how to do, please explain.. Don't just paste de code :P
I'll explain.. When the player tipes the password it apears "Black Balls" instead of the real password..
Is it possible?
Here's the Dialog
pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch(dialogid)
{
case DIALOG_REGISTER:
{
if(response)
{
new
strText[179], naslov2[128];
if(strlen(inputtext) >= 4 && strlen(inputtext) <= 35)
{
OnPlayerRegister(playerid, inputtext);
format(strText, 125, "You have registered with name {FFFFFF}'%s' {FFFF00}and password {FFFFFF}'%s'{FFFF00}, you are automatic logged in!", GetName(playerid), inputtext);
SendClientMessage(playerid, 0xFF8000AA, strText);
}
else
{
format(naslov2, sizeof(naslov2), " Welcome %s!", GetName(playerid));
format(strText, 179, "______________________________\n\nName %s isn't registered!\n\nPassword must be between 4 and 35 characters!", GetName(playerid));
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, naslov2, strText, "Register", "Exit");
}
}
else Kick(playerid);
}
case DIALOG_LOGIN:
{
if(response)
{
new
strText[179], naslov2[128];
if(strlen(inputtext) >= 4 && strlen(inputtext) <= 35)
{
OnPlayerLogin(playerid, inputtext);
}
else
{
format(naslov2, sizeof(naslov2), " Welcome %s!", GetName(playerid));
format(strText, 179, "______________________________\n\nName %s is registered!\n\n{F81414}You typed wrong password!", GetName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, naslov2, strText, "Login", "Exit");
}
}
else Kick(playerid);
}
}
return 1;
}