Raised This Month: $ Target: $400
 0% 

Get setinfo


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CsIosefin
Senior Member
Join Date: Aug 2009
Old 09-27-2012 , 19:42   Get setinfo
Reply With Quote #1

Greeting, I've got a question, why not put setinfo directly but only through a cvar?
Why this method is not good?
Code:
get_user_info(id, "setinfo ^"_pw^"", passfield, 31) or get_user_info(id, "setinfo _pw", password, 31)
get_user_info(id, passfield, password, 31)
Also what method works only
Code:
get_pcvar_string(cvarpassfield, passfield, 31)
get_user_info(id, passfield, password, 31)

Last edited by CsIosefin; 09-27-2012 at 19:42.
CsIosefin is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-27-2012 , 19:57   Re: Get setinfo
Reply With Quote #2

Nothing in your post is correct. What are you trying to do?
__________________
fysiks is offline
CsIosefin
Senior Member
Join Date: Aug 2009
Old 09-27-2012 , 21:11   Re: Get setinfo
Reply With Quote #3

I want to take the password for that player and I really need a key.
Code:
usage: setinfo [ <key> <value> ]
I put the key without resorting to cvar. That:
Code:
get_user_info(id, "setinfo ^"_pw^"", passfield, 31) or get_user_info(id, "setinfo _pw", password, 31)
To replace cvar:
Code:
get_pcvar_string(cvarpassfield, passfield, 31)

Last edited by CsIosefin; 09-27-2012 at 21:11.
CsIosefin is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 09-27-2012 , 21:24   Re: Get setinfo
Reply With Quote #4

Yeah, that isn't how either of those commands work
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-27-2012 , 23:42   Re: Get setinfo
Reply With Quote #5

It seems you need to take more time to study the code in admin.sma (where you copied some of this stuff) to see what is actually going on there. Once you figure out exactly what is going on then you should be able to figure it out (assuming I have any clue what in the world you are trying to do).
__________________
fysiks is offline
CsIosefin
Senior Member
Join Date: Aug 2009
Old 09-28-2012 , 07:32   Re: Get setinfo
Reply With Quote #6

I can not breathe in admin.sma because it has all the key cvar. I wish I could draw from somewhere, to understand how a cvar setinfo without the key.
CsIosefin is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 09-28-2012 , 07:33   Re: Get setinfo
Reply With Quote #7

Simply, what do you even want to do? I don't understand a bit in this thread.
Backstabnoob is offline
CsIosefin
Senior Member
Join Date: Aug 2009
Old 09-28-2012 , 07:54   Re: Get setinfo
Reply With Quote #8

I want to do is an authentication system for vip. All I want to say here is that I no longer include cvar for key.
Normal looks like this:
Code:
cvarpassfield=register_cvar("amx_vip_password", "_vip")
get_pcvar_string(cvarpassfield, passfield, 31)
get_user_info(id, passfield, password, 31)
I want to do it like this:
Code:
get_user_info(id, "_vip", passfield, 31)
get_user_info(id, passfield, password, 31)
EDIT: I solved, thanks!

Last edited by CsIosefin; 09-28-2012 at 11:47. Reason: I solved!
CsIosefin is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 09-28-2012 , 19:34   Re: Get setinfo
Reply With Quote #9

Quote:
Originally Posted by CsIosefin View Post
I want to do it like this:
Code:
get_user_info(id, "_vip", passfield, 31)
get_user_info(id, passfield, password, 31)
EDIT: I solved, thanks!
You shouldn't do it like this. There is a limited amount of space available for user info and if there is enough for one of them but not both then it won't work.
__________________
fysiks 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 08:10.


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