AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   client "get cvar" not working (https://forums.alliedmods.net/showthread.php?t=45626)

firewall 10-07-2006 16:12

client "get cvar" not working
 
i'm tring to get some of the client cvars but not seem to be working.here is the code :
Code:

  #include <amxmodx>
#include <engine>
#include <amxmisc>

public plugin_init() {

    register_plugin("Cvar Client", "1", "Me")
    }

public client_connect(id)

{

    query_client_cvar(id,"max_shells","result1")
    query_client_cvar(id,"fps_max","result2")
    query_client_cvar(id,"cl_updaterate","result3")
}



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

    new name[32]
    get_user_name(id, name, 31)

    log_amx("Client %d(%s)'s maxshells is ^"%s^"", id, name, value)
}

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

    new name[32]
    get_user_name(id, name, 31)

    log_amx("Client %d(%s)'s max fps is ^"%s^"", id, name, value)
}
public result3(id, const cvar[], const value[]){

    new name[32]
    get_user_name(id, name, 31)

    log_amx("Client %d(%s)'s updaterate is ^"%s^"", id, name, value)
}

i do not understand whereis is the problem i do not have anything logged i enable debugging but no errors .

teame06 10-07-2006 16:40

Re: client "get cvar" not working
 
The forward client_connect is too early. Use client_putinserver

firewall 10-07-2006 16:49

Re: client "get cvar" not working
 
same thing

k007 10-08-2006 00:44

Re: client "get cvar" not working
 
use ResetHUD and u don't need engine u could just use get_user_info..


All times are GMT -4. The time now is 04:59.

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