Changing name without changing password
#1

I made a change name command but whenever they login again,it says the password is incorrect.
Because,if you made new account,the pass will be hashed and it will only apply for that single player.Now,if they change name,the hashed pass won't recognize the user so it will return nothing.

I have another option,that if I use the change name cmd to a player,it will prompt them a new password(and you can't press CANCEL)

Help! TIA!
Reply
#2

Just make a command based on SetPlayerName function: https://sampwiki.blast.hk/wiki/SetPlayerName
They won't have to relog in order to get a new name.
Reply
#3

ofc I know how to make a changename CMD just as I told in my post.
I will tell you a scenario so we could all understand it.

TheSimpleGuy [1]: Hey, dude, I will change your name.
TheSimpleGuy(1)'s name has been changed to TheSimpleGuy(2)!
TheSimpleGuy(2) [0]: Wow! You changed my name! Let me relog, okay?
TheSimpleGuy [1]: Sure!
TheSimpleGuy(2) left the server.
TheSimpleGuy(2) joined the server.
TheSimpleGuy [1]: WB Bro!
TheSimpleGuy(2) [0]: Dude I can't log in it says I have a wrong password!
Reply
#4

Which saving system do you use in your script?
Reply
#5

You forgot to save his new nickname.
Reply
#6

If you change the name, the password shouldn't change. What are you doing to change the name and how are you checking for the password? One of both is going wrong.
Reply
#7

Show us the code, please.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)