Raised This Month: $ Target: $400
 0% 

help reading player cvars


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
BloodyNuker
Member
Join Date: Jan 2006
Old 10-07-2006 , 18:20   help reading player cvars
Reply With Quote #1

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
BloodyNuker is offline
jopmako
Senior Member
Join Date: Jul 2006
Location: QQ:331537639
Old 10-08-2006 , 03:42   Re: help reading player cvars
Reply With Quote #2

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")
}
__________________
QQ31537639
jopmako is offline
Send a message via MSN to jopmako
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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