/changepassword cmd - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: /changepassword cmd (
/showthread.php?tid=307008)
/changepassword cmd -
Face9000 - 28.12.2011
Hello,i've created a registration/login system and i need the /changepassword cmd just for admins.
I use dini/dudb to save users accounts,how to make it?Tell me if you need some variables or functions.Thanks.
Re: /changepassword cmd -
Skidmarks - 28.12.2011
id need to see your script to help you bud.
Re: /changepassword cmd -
fordawinzz - 28.12.2011
is the password of the players hashed?
Re: /changepassword cmd -
Face9000 - 28.12.2011
Quote:
Originally Posted by fordawinzz
is the password of the players hashed?
|
Yes,in MD5
Quote:
Originally Posted by Skidmarks
id need to see your script to help you bud.
|
What part?
Re: /changepassword cmd -
Face9000 - 29.12.2011
BUMP
Re: /changepassword cmd -
FarSe. - 29.12.2011
pawn Код:
if(strcmp(cmd,"/changepassword",true) == 0)
{
if(PlayerInfo[playerid][Admin] <5) return 1;
new id = -1;
id = strval(strtok(cmdtext,idx));
new password[256];
password = strtok(cmdtext,idx);
if(!IsPlayerConnected(id) || strval(password) == 0)return SendClientMessage(playerid,~0,"Use: /changepassword [playerid] [newpass]");
new playername[40];GetPlayerName(id,playername,40);
format(playername, 40, "Users/%s.ini",playername);
dini_Set(playername,"Password",MD5(password));
SendClientMessage(playerid,~0,"Password successeful changed!");
return 1;
}