Raised This Month: $ Target: $400
 0% 

cvar - by id


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
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
 



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:58.


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