Raised This Month: $ Target: $400
 0% 

remake adminlisten plugin with on off option...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Qlim4X
Member
Join Date: Jun 2007
Old 07-25-2007 , 08:51   remake adminlisten plugin with on off option...
Reply With Quote #1

hi i want to change the amdinlisten plugin so to have a command that turns on the adminlisten

orininal link http://forums.alliedmods.net/showthread.php?t=12728

my litle try was to create the function to change options from a command and to register the cvars but i thing that it will work for all admins if someone turn its off or on

Code:
public set_adminchat(id, level, cid)
{
    if(!cmd_access(id, level, cid, 2))
        return PLUGIN_HANDLED
    
    new set_chat[4]
    read_argv(1, set_chat, 3)
    server_cmd("amx_chat The Admin Spectate chat is ^"%s^"", set_chat)

    set_cvar_string("amx_chat_admin", set_chat)
    
    server_exec()
    
    return PLUGIN_CONTINUE

}

public plugin_init(){
   register_plugin("AdminListen","2.3x","/dev/ urandom")
   register_srvcmd("amx_adminlisten_voice","voice_status")
   register_event("SayText","catch_say","b")
   register_concmd("pro_chat", "set_adminchat", ADMIN_IMMUNITY, "<1/0>")
   register_cvar("amx_chat_admin","0",FCVAR_ARCHIVE|FCVAR_PROTECTED) 
   return PLUGIN_CONTINUE
}
can i change it as it is in theadmin esp plug in that any admin haves his ownes optios???

Last edited by Qlim4X; 07-25-2007 at 23:02.
Qlim4X is offline
Old 07-26-2007, 03:32
Lee
This message has been deleted by Lee.
Lee
AlliedModders Donor
Join Date: Feb 2006
Old 07-27-2007 , 23:15   Re: remake adminlisten plugin with on off option...
Reply With Quote #3

You can be my guinea pig. Let me know if there are any error messages in your logs. Support for differentiating between team chat is to come. This is completely untested.

Set amx_adminlistenauth to:

0: Plugin is off
1: All administrators (or whichever flag you choose by editing ADMIN_LEVEL) can see all chat
2: Use amx_adminlisten to grant users the ability to see all chat
3: A combination of 1 and 2
4: All users can see all chat

[code removed]

Last edited by Lee; 08-09-2007 at 14:48.
Lee is offline
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 21:25.


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