Command Help
#1

I need help how to make command changepassword I use y_ini system for save data
Reply
#2

help me please rep +
Reply
#3

what dialog or just /changepassword <pass> ?
Reply
#4

just /changepassword [New Pass]
Reply
#5

I do it with ZCMD and sscanf:

pawn Код:
CMD:changepassword(playerid, params[])
{
new pass[24];
if(sscanf(params, "s[24]", pass)) return SendClientMessage(playerid, -1, "USAGE: /changepassword <pass>");
new file[128], pName[24];
GetPlayerName(playerid, 24, pName);
format(file, 128, "folder/%s.ini", pName); // Insert the utents' folder. Example: Utents/%s.ini.
new File:INI_Open(file);
INI_WriteString(File, "Password", pass);
INI_Close(File);
SendClientMessage(playerid, -1, "Your password has been changed.");
return 1;
}
Reply
#6

Код:
CMD:changepassword(playerid, params[])
{
	new passtring[24];
	if(sscanf(params, "s[24]", passtring)) return SendClientMessage(playerid, -1, "USAGE: /changepassword <pass>");
	
	new
		File:INI_Open(UserPath);
	INI_WriteString(File, "Password", udb_hash(passtring));
	INI_Close(File);
	
	SendClientMessage(playerid, -1, "Your password has been changed.");
	return 1;
}
it's ok?
Reply
#7

help me please
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)