ChangeName Lux
#1

Hi,

I'm using Lux Admin, ( I know it's outated but it's nice ). Whatever, I don't know how to make change name command, this is an example of changepass. If anyone got it +rep

Im using dini,dudb

Код:
dcmd_CMD_CHANGEPASS(playerid,params[])
{
	if(AccInfo[playerid][LoggedIn] == 1)
	{
		if(!strlen(params)) return
		SendClientMessage(playerid, LIGHTBLUE2, "Usage: /"#ChangePassCommand" [NewPassword]")
		&& SendClientMessage(playerid, orange, "Function: Will modify your account password");
		if(strlen(params) < 4) return SendClientMessage(playerid,red,"ERROR: Incorrect password length!");
		new string[128];
		new file[128], Pass[256];
    	format(file,sizeof(file),"/LuxAdmin/Accounts/%s.sav",udb_encode(PlayerName2(playerid)) );
  		new buf[145];
        WP_Hash(buf, sizeof(buf), params);
		Pass = dini_Get(file, "Password");
		dini_Set(file, "Password", buf);
		PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
        format(string, sizeof(string),"|- You have successfully changed your account Password to \"%s\" -|",params);
		return SendClientMessage(playerid,yellow,string);
	} else return SendClientMessage(playerid,red, "ERROR: You must have an account to use this command");
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)