/changepass yini help
#1

Trying make a cmd to change password but the cmd doesn't change the password, maybe you guys can help me, thanks in advance!


PHP код:
CMD:changepass(playeridparams[])
{
    new 
string[256], hashpass[129], PlayerName2[MAX_PLAYER_NAME];
    if(
sscanf(params"s[256]"params))return SendSyntaxMessage(playerid" Usage: /changepass [password]");
    
format(string256"/Users/%s.ini"PlayerName2);
    new 
INI:file INI_Open(string);
    
INI_SetTag(file,"data");
    
INI_WriteInt(file,"Password",udb_hash(params));
    
INI_Close(file);
    
SendServerMessage(playerid"You change password to %s"params);
    return 
1;

Reply
#2

Change your pass or of the other player?
Код:
GetPlayerName(playerid, PlayerName2, sizeof PlayerName2);
Reply
#3

Quote:
Originally Posted by F1N4L
Посмотреть сообщение
Change your pass or of the other player?
Код:
GetPlayerName(playerid, PlayerName2, sizeof PlayerName2);
I just realize that was missing thanks mate, rep!
Reply
#4

Why do you use sscanf if you only want to use a string?
256 cells are gone to waste.

Just use params since it's already a string.
Use the function isnull to check if the player didn't enter anything.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)