AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   custom cvar? (https://forums.alliedmods.net/showthread.php?t=325596)

RaidoNek 06-28-2020 13:59

custom cvar?
 
Hello, is there anyway to set client his customcvar? You know like set_user_info(id,"is_good_guy", "1"); ?

alferd 06-28-2020 14:05

Re: custom cvar?
 
PHP Code:

client_cmd(id"is_good_guy 1"


RaidoNek 06-28-2020 14:14

Re: custom cvar?
 
Will it work? :D

RaidoNek 06-28-2020 14:15

Re: custom cvar?
 
Unknown command: -grab
] setinfo
_csgopass heslo

Because i have got this in setinfo and i couldnt do this same thing at my server

alferd 06-28-2020 14:17

Re: custom cvar?
 
I did not understand what you mean

RaidoNek 06-28-2020 14:26

Re: custom cvar?
 
I would like to create custom client-sided cvar and control/set another value to/delete it, i give you an example :D I will ban him for cheating and create client-sided cvar "was-been-banned" to 1 and if he connects again after ban expires, plugin recognize him with this cvar and do whatever programmer set him to do.

alferd 06-28-2020 14:30

Re: custom cvar?
 
Slow hack = NO SUPPORT

RaidoNek 06-28-2020 14:32

Re: custom cvar?
 
It's not meant to be slowhack, i wanted to make auto-login system with this :D But okay,thank u

HamletEagle 06-28-2020 15:24

Re: custom cvar?
 
Quote:

Originally Posted by RaidoNek (Post 2707695)
It's not meant to be slowhack, i wanted to make auto-login system with this :D But okay,thank u

You don't need a login system if all your saving is done by steamid since only one person can have that steamid.

fysiks 06-28-2020 22:08

Re: custom cvar?
 
Quote:

Originally Posted by supertrio17 (Post 2707742)
Well, you can always make a clcmd and read parameters, so the first parameter would be his name, and the second one would be "value".

Then you could use nVault to store that parameter with users id. I think this is what you want?

Edit:

Easier would be to make a player menu.

Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.

supertrio17 06-29-2020 03:48

Re: custom cvar?
 
Sorry, I just saw what I did, I didn't see his reply on post #6

condoriano90 06-30-2020 07:12

Re: custom cvar?
 
This smells like nonsteam to me but I'll give him the benefit of the doubt. As for slowhacking, I'd argue that this isn't really changing client settings, but more like cookies on websites. But if this is against the rules, please delete this post.

As for the practicality of it, I advice you not to use this method because it is unreliable and easily edited by the client.

But, if you still want it, here the code:

PHP Code:

client_cmd(id"setinfo _blah 1"


OciXCrom 06-30-2020 07:44

Re: custom cvar?
 
Quote:

Originally Posted by condoriano90 (Post 2707952)
This smells like nonsteam to me but I'll give him the benefit of the doubt. As for slowhacking, I'd argue that this isn't really changing client settings, but more like cookies on websites. But if this is against the rules, please delete this post.

As for the practicality of it, I advice you not to use this method because it is unreliable and easily edited by the client.

But, if you still want it, here the code:

PHP Code:

client_cmd(id"setinfo _blah 1"


"set_user_info" exists. There's no reason to use "client_cmd" here. Also, this is not going to help because users can either have read-only configuration which cannot be modified by the server or they can simply remove the modified value themselves.

In short, no Steam = no support.

CrazY. 06-30-2020 08:44

Re: custom cvar?
 
Quote:

Originally Posted by fysiks (Post 2707743)
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.


supertrio17 06-30-2020 11:12

Re: custom cvar?
 
Quote:

Originally Posted by OciXCrom (Post 2707956)
"set_user_info" exists. There's no reason to use "client_cmd" here. Also, this is not going to help because users can either have read-only configuration which cannot be modified by the server or they can simply remove the modified value themselves.

In short, no Steam = no support.

I thought of that too, but it didn't work (probably because of the reason you already stated). But if you need this only on one server, you can always use nVault to store is_good_guy and read it on client_authorized.

fysiks 06-30-2020 23:26

Re: custom cvar?
 
I don't even think that setinfo writes (or attempts to write) anything to any file so as soon as you close the game, that info is gone.

supertrio17 07-01-2020 01:53

Re: custom cvar?
 
It doesn't work like that, but it just can't be writen by client_cmd, if you try that command in-game it will stay there even if you relog, try it for yourself.

Natsheh 07-01-2020 04:42

Re: custom cvar?
 
The question answers it self, you already said the answer in post #1 what else do you need?


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

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