Raised This Month: $ Target: $400
 0% 

cvar - by id


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
spider853
Senior Member
Join Date: Jul 2006
Old 10-23-2006 , 05:32   cvar - by id
Reply With Quote #1

How I Can Set Or Get A cvar On A Specific id.. (User) ?
spider853 is offline
Send a message via ICQ to spider853
MaximusBrood
Veteran Member
Join Date: Sep 2005
Location: The Netherlands
Old 10-23-2006 , 06:49   Re: cvar - by id
Reply With Quote #2

Quote:
Originally Posted by spider853 View Post
How I Can Set Or Get A cvar On A Specific id.. (User) ?
Explain more. I don't understand your post at all.
__________________
Released six formerly private plugins. Not active here since ages.
MaximusBrood is offline
Jordan
Veteran Member
Join Date: Aug 2005
Old 10-23-2006 , 06:57   Re: cvar - by id
Reply With Quote #3

I think he wants to know if you can (for example) like, set friendly fire on to one person using cvars.
Jordan is offline
spider853
Senior Member
Join Date: Jul 2006
Old 10-23-2006 , 06:59   Re: cvar - by id
Reply With Quote #4

I Want To Make A CVAR like private_enable 1 or 0
For Each Person

ex: get_cvar_num(id,"private_enable")

This Problem Can Appear In This Script:
To Make A Script That Collect All Sensitivity Values From All Clients

Last edited by spider853; 10-23-2006 at 07:01.
spider853 is offline
Send a message via ICQ to spider853
spider853
Senior Member
Join Date: Jul 2006
Old 10-23-2006 , 07:13   Re: cvar - by id
Reply With Quote #5

I Search And Found Somthing Like This:
query_client_cvar(id, const cvar[], const resultFunc[], paramlen=0, const params[] = "");

...

Its That I Need??

or function register_cvar() is for globaly cvar??
spider853 is offline
Send a message via ICQ to spider853
spider853
Senior Member
Join Date: Jul 2006
Old 10-24-2006 , 10:28   Re: cvar - by id
Reply With Quote #6

Solved....
I Made A function clcmd and an boolean array with all users .
When a User set The Cvar (function) I read The Parameter And Put it in to array

----Code------

PHP Code:
new bool:UsersED[33]={true,...} //Users That Enable/Disable Private Chat
...
register_clcmd("pm_enable","enabledisable")
...
public 
enabledisable(id) {
 new 
Arg1[1]
 
read_args(Arg1,1)
 if (
Arg1[0]) {
  switch (
str_to_num(Arg1[0])) 
  {
  case 
1: { 
   
UsersED[id] = true
   
}
   case 
0: {
   
UsersED[id] = false
   
}
   default: 
console_print(id,"[PrivateChat] Invalid Parameters, Use <1|0>")
  }
 }
 
console_print(id,"[PrivateChat] Private Chat is %s",(UsersED[id]==true)?"Enabled":"Disabled"
 return 
PLUGIN_HANDLED


Last edited by spider853; 10-24-2006 at 10:31.
spider853 is offline
Send a message via ICQ to spider853
Reply



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 17:04.


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