create an account.
#1

Hello. Basicly I need help to create a command so it creates an account on the server, example /createaccount name_name password.

I would appreciate it very much if someone could do this for me.

This is the dialog you get when you wanna register an account.

switch( dialogid )
{
case DIALOG_REGISTER:
{
if (!response) return SendClientMessage(playerid, COLOR_RED, "You aborted! Password was never changed.");
if(response)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""COL_WHITE"Change your password!",""COL_RED"You have entered an invalid password.\n"COL_WHITE"Change your password! DO NOT USE SAME AS ON LS-RP","Register","Quit");
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Cash",0);
INI_WriteInt(File,"Admin",0);
INI_WriteInt(File,"Kills",0);
INI_WriteInt(File,"Deaths",0);
INI_Close(File);

Rep to who ever helps me. Thanks.
Reply


Messages In This Thread
create an account. - by lean1337 - 02.02.2013, 16:31
Re: create an account. - by Roach_ - 02.02.2013, 16:39
Re: create an account. - by lean1337 - 02.02.2013, 16:40
Re: create an account. - by Roach_ - 02.02.2013, 16:50
Re: create an account. - by lean1337 - 02.02.2013, 17:00
Re: create an account. - by Roach_ - 02.02.2013, 17:17
Re: create an account. - by lean1337 - 02.02.2013, 20:58
Re: create an account. - by lean1337 - 04.02.2013, 12:06

Forum Jump:


Users browsing this thread: 4 Guest(s)