AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Get setinfo (https://forums.alliedmods.net/showthread.php?t=197005)

CsIosefin 09-27-2012 19:42

Get setinfo
 
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)


fysiks 09-27-2012 19:57

Re: Get setinfo
 
Nothing in your post is correct. What are you trying to do?

CsIosefin 09-27-2012 21:11

Re: Get setinfo
 
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)

YamiKaitou 09-27-2012 21:24

Re: Get setinfo
 
Yeah, that isn't how either of those commands work

fysiks 09-27-2012 23:42

Re: Get setinfo
 
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).

CsIosefin 09-28-2012 07:32

Re: Get setinfo
 
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.

Backstabnoob 09-28-2012 07:33

Re: Get setinfo
 
Simply, what do you even want to do? I don't understand a bit in this thread.

CsIosefin 09-28-2012 07:54

Re: Get setinfo
 
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!

fysiks 09-28-2012 19:34

Re: Get setinfo
 
Quote:

Originally Posted by CsIosefin (Post 1808103)
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.


All times are GMT -4. The time now is 08:10.

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