02.02.2013, 16:31
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.
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.