/Changename command & /Changepassword
#1

Hello guys i coded a /changename command it works good and change my name ingame and in userpath but the problem is when i try to login it says wrong password this is my code:

PHP код:
CMD:changename(playeridparams[])
{
    new 
idnewname[10], oldname[10], string[128];
    if(
isnull(params)) return SendClientMessage(playerid, -1"Changename [NewName]");
    if(
sscanf(params,"s[10]"newname)) return SendClientMessage(playerid, -"/Changename [NewName]");
    if(
strlen(params) < 4) return SendClientMessage(playerid,-1,"Name shoulkd not be less than 4 characters.");
    if(
strlen(params) > 10) return SendClientMessage(playerid,-1,"Name must be 10 characters max.");
    
GetPlayerName(playeridoldnamesizeof(oldname));
    new 
file[64];
    
format(filesizeof(file), "/Users/%s.ini"newname);
    if (
fexist(file)) return SendClientMessage(playerid, -1"The name you entered is already being used by another player!");
    
fremove(UserPath(id));
    
SetPlayerName(id,newname);
    
format(stringsizeof(string), "%s Name changed to (%s)."oldnamenewname);
    
SendClientMessageToAll( -1,string);
    
Kick(id);
    return 
1;

And here is my useracc informations:

before change name
PHP код:
Password 158794218
Cash 
0
AdminLevel 
0
Kills 
0
Deaths 
0
Score 
11
Minutes 
13
Hours 
5
Seconds 

after changename
PHP код:
Cash 0
AdminLevel 
0
Kills 
0
Deaths 
0
Score 
11
Minutes 
13
Hours 
5
Seconds 

i also have another request i want a /changepassword command i know its pretty same as /changename so i am sure it wont be hard for you guys

PS my password is hashed and i use this system https://sampforum.blast.hk/showthread.php?tid=273088

thanks in advance
Reply


Messages In This Thread
/Changename command & /Changepassword - by SalmaN97 - 19.08.2015, 04:39
Re: /Changename command & /Changepassword - by ThePhenix - 19.08.2015, 04:45
Re: /Changename command & /Changepassword - by SalmaN97 - 19.08.2015, 05:31
Re: /Changename command & /Changepassword - by Mariciuc223 - 19.08.2015, 08:06
Re: /Changename command & /Changepassword - by Evocator - 19.08.2015, 08:23
Re: /Changename command & /Changepassword - by Mariciuc223 - 19.08.2015, 08:29
Re: /Changename command & /Changepassword - by SalmaN97 - 20.08.2015, 05:08
Re: /Changename command & /Changepassword - by Mariciuc223 - 20.08.2015, 06:53

Forum Jump:


Users browsing this thread: 4 Guest(s)