AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   help reading player cvars (https://forums.alliedmods.net/showthread.php?t=45629)

BloodyNuker 10-07-2006 18:20

help reading player cvars
 
Hello, i have got a 1 question...

Why this plugin donīt work???

Code:
#include <amxmodx> #include <engine> #include <amxmisc> public plugin_init() {     register_plugin("Cvar Client", "1", "Me")     } public client_putinserver(id) { set_task(15.0, "verificacion", id, "b") } public verificacion(id) {     query_client_cvar(id,"fps_max","result2") } public result2(id, const cvar[], const value[]){     new name[32]     get_user_name(id, name, 31) if(equal(value,"100")) { client_print(id,print_chat,"%s ***", value) } else { server_cmd("kick #%d ^"Please set fps_max 100 in^"",get_user_userid(id)) } }


I need read the cvars of the players, this plugin is an example with i need.

If the player havenīt got fps_max 100 the server kick he


This is the error in the players consoleīs


Host_Error: UserMsg: Not Present on Client 58

jopmako 10-08-2006 03:42

Re: help reading player cvars
 
maybe the player was disconnected, but the set_task still running..


public verificacion(id)
{
// add this to check if player is connected.
if ( is_user_connected(id) )
query_client_cvar(id,"fps_max","result2")
}


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

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