AlliedModders

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

pepe_thugs 10-24-2013 15:05

New cvar
 
Hello guys.
It is possible to create one new cvar in client (ex: abc_cvar) and check the value and do something ?

I try this:

PHP Code:

public client_connect(id){

    if (!
is_user_bot(id))
        
query_client_cvar(id"abc_cvar""cvar_result_func");


public 
cvar_result_func(id, const cvar[], const value[]){

    new 
name[32];
    
get_user_name(idname31);
    
    new 
fValue str_to_num(value)

    if (
fValue 1)
    {
        
log_amx("Client %d(%s) connect with abc_cvar ^"%s^""idnamevalue);
        
//do something
    
}



YamiKaitou 10-24-2013 16:00

Re: New cvar
 
Nope

pepe_thugs 10-24-2013 16:24

Re: New cvar
 
Quote:

Originally Posted by YamiKaitou (Post 2052513)
Nope

And if i create the cvar manually ??
The query_client_cvar dont check him ??

YamiKaitou 10-24-2013 16:39

Re: New cvar
 
You cannot create cvars on the client at all

Black Rose 10-25-2013 12:57

Re: New cvar
 
https://forums.alliedmods.net/showthread.php?t=154538


All times are GMT -4. The time now is 23:22.

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