Raised This Month: $ Target: $400
 0% 

why use get_user_info to get string is NULL ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
wangningyu
Member
Join Date: Dec 2011
Location: China.GuangDong
Old 02-27-2012 , 07:17   why use get_user_info to get string is NULL ?
Reply With Quote #1

I write the config like this:

config.cfg :

PHP Code:
exec happy.cfg 
happy.cfg

PHP Code:
setinfo _username_ "I'm MT"
setinfo _password_ "d714474be9d618540000447b7478aaaa"
bind "U" sayteam
bind 
"y" sayall 

the plugin source code :

PHP Code:
// global varialbe
new const PASSWORD_FIELD[] = "_password_"
new const USERNAME_FIELD[] = "_username_" 
PHP Code:
new client_password[32];
new 
client_username[32];

get_user_info(idUSERNAME_FIELDclient_usernamecharsmax(client_username)) 
get_user_info(idPASSWORD_FIELDclient_passwordcharsmax(client_password))

client_print(id,print_console,"name = %s ,pass = %s .",client_username,client_password
the _username_ is get success, but the _password_ is NULL !

why ?
__________________
One Code , One Dream !
wangningyu is offline
Neeeeeeeeeel.-
Some Guy Yellin'
Join Date: Jul 2010
Location: Argentina
Old 02-27-2012 , 12:34   Re: why use get_user_info to get string is NULL ?
Reply With Quote #2

Because setinfo has a limit.

What I do in my own login is...
PHP Code:
new password32 ]; // this is the clients password
new md5string34 ], md5short];

md5passwordmd5string );
copymd5shortcharsmaxmd5short ), md5string ); 
So now you have the md5, but just with 5 characters... So you could save into a setinfo.
__________________
Neeeeeeeeeel.- is offline
Send a message via Skype™ to Neeeeeeeeeel.-
wangningyu
Member
Join Date: Dec 2011
Location: China.GuangDong
Old 02-27-2012 , 23:47   Re: why use get_user_info to get string is NULL ?
Reply With Quote #3

Quote:
Originally Posted by Neeeeeeeeeel.- View Post
Because setinfo has a limit.

What I do in my own login is...
PHP Code:
new password32 ]; // this is the clients password
new md5string34 ], md5short];

md5passwordmd5string );
copymd5shortcharsmaxmd5short ), md5string ); 
So now you have the md5, but just with 5 characters... So you could save into a setinfo.
Thanks for you reply !

this is the auto login plugin. so player isn't putin the password again.

(Because the username and password like "setinfo" write in the config.)

then I read it to the plugin to check it in mysql.

and how to fix this problem ?
__________________
One Code , One Dream !
wangningyu is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 21:18.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode