02.11.2013, 17:44
hello everyone,
As I'm trying to create something Like that so When a User registers it should send a Message to everyone regarding that
Derp has registered making the server have total 9 players
But i'm not quite sure on how can i make one like this :3
I'm willing to give you Any Piece of code you want Relating to my Registration System
Here's the part where registration takes place
As I'm trying to create something Like that so When a User registers it should send a Message to everyone regarding that
Derp has registered making the server have total 9 players
But i'm not quite sure on how can i make one like this :3
I'm willing to give you Any Piece of code you want Relating to my Registration System
Here's the part where registration takes place
pawn Код:
if ( dialogid == Register2 )
{
if ( response )
{
new
String[ 245 ]
;
if ( strlen( inputtext ) == 0)
return ShowDialog( playerid, Register2, DIALOG_STYLE_PASSWORD, "{FFFFFF}Enter Password", ""#COL_RED"No password entered!\n{FFFFFF}Please enter your desired password:", "Enter", "");
if ( strlen( inputtext ) < 4 || strlen( inputtext ) > 20)
return ShowDialog( playerid, Register2, DIALOG_STYLE_PASSWORD, "{FFFFFF}Enter Password", ""#COL_RED"Minimum password length is 4 and maximum is 20!\n{FFFFFF}Please enter your desired password:", "Enter", "");
if ( BUD::RegisterName( PlayerName2( playerid ), inputtext ) )
{
new Date[5],DateStr[ 50 ];
getdate( Date[ 0 ], Date[ 1 ], Date[ 2 ] );
gettime( Date[ 3 ], Date[ 4 ]);
format( DateStr, 50, "%i/%i/%i %d:%d", Date[ 2 ], Date[ 1 ], Date[ 0 ], Date[ 3 ], Date[ 4 ] );
new iUID = BUD::GetNameUID( PlayerName2( playerid ) );
BUD::MultiSet( iUID, "ss", "Password", inputtext, "Registered", DateStr );
format( String, sizeof( String ), ""#COL_GREEN"Account succesfully created!\n\n\
"#COL_LIGHTBLUE"Account: {FFFFFF}%s\n\
"#COL_LIGHTBLUE"Password: {FFFFFF}%s\n\
"#COL_LIGHTBLUE"Account id: {FFFFFF}%d\n\
Remember! Don't give your password to anyone!\n\n\
{FFFFFF}Would you like to login?",PlayerName2( playerid ),inputtext,iUID+2 );
ShowDialog( playerid, Register3, BOX, "{FFFFFF}Account created!", String, "Login", "");
foreach(Player, Admin)
{
if ( P_DATA[ Admin ][ P_Level ] > 2 )
{
FormMessage( Admin, -1, "> "COL_ORANGE"%s{FFFFFF} registered an account!", PlayerName2( playerid ) );
}
}
}
else
{
foreach(Player, Admin)
{
if ( P_DATA[ Admin ][ P_Level ] > 2 )
{
FormMessage( Admin, -1, "> "COL_ORANGE"%s{FFFFFF} failed to register an account!", PlayerName2( playerid ) );
}
}
}
}
}