Raised This Month: $51 Target: $400
 12% 

AdminListen 2.5 (Fakemeta)


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
V I R U S
Senior Member
Join Date: Jul 2004
Location: Russia / Germany
Old 03-02-2008 , 20:48   AdminListen 2.5 (Fakemeta)
Reply With Quote #1

AdminListen 2.5

This is the same plugin as was here before, but i fixed some errors which most ppl had, since the other author dont support this plugin anymore.
Code:
L 05/24/2006 - 04:03:57: [ENGINE] Invalid player 2
L 05/24/2006 - 04:03:57: [AMXX] Displaying debug trace (plugin "adminlisten.amxx")
L 05/24/2006 - 04:03:57: [AMXX] Run time error 10: native error (native "set_speak")
L 05/24/2006 - 04:03:57: [AMXX]    [0] adminlisten.sma::client_infochanged (line 115)

Plugin Info:
Code:
 //ported by Oj@eKiLLzZz & Modded by V I R U S & Edited by Hoboman!
// *******************************************************************************
// Admin Listen 2.3x, Also Copyright 2004, /dev/ urandom. No Warranties, 
// either expressed or implied.
// Props to Maxim for the remake of Luke Sankeys original plugin.
// Props to Luke Sankey for the original AdminMod plugin (SankListen).
// Inspired by PsychoListen by PsychoGuard
//
// Allows administrators (with flag "n") to see all team chats, and dead chats.
//
// Use amx_adminlisten_voice 0|1 to turn off and on the hearing of voicecomms
// In 2.0 the Chat Engine was totally rewritten from ground up,
// a different, more efficent method, was used to pick up say messages,
// also fewer calculations and variables in this version.
//
// 2.1 - VoiceComm rewrite, fixed a few typos in the comments.
//
// 2.2 - Updated for Condition Zero 1.2, Note that while I've attempted to keep
//       backwards compatability with other mods, I cannot vouch for it working
//       in other mods as I only have a CS:CZ server to test it in.
//
// 2.3 - Updated to work with Counter-Strike after steams update June 14, 2004.
// 2.4 - Fixed some errors. 2 March 2008.
// 2.5 - Edited using Fakemeta. Thanx to Hoboman! 11 March 2008.
// *******************************************************************************

Simply add to you server config:
Code:
// Execute the Admin Listen Changes
admin_voice_listen 1

ToDo:
Code:
1. Add possibility to enable/disable the listen future for each admin by command.
You can define access flag in plugin, by default it's flag "n".

Enjoy it!
Attached Files
File Type: sma Get Plugin or Get Source (amx_adminlisten.sma - 3559 views - 4.8 KB)
__________________

Last edited by V I R U S; 03-11-2008 at 05:37.
V I R U S is offline
Send a message via ICQ to V I R U S
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 03-02-2008 , 22:17   Re: AdminListen 2.4
Reply With Quote #2

If I were you, I would make it fakemeta. Similar to the one in the Super. (Which I never had those errors before tho, even when it wasnt strictly fakemeta)

I actually thought this was gonna be some type of re-write, significant enough to possibly update another plugin.

But good job I just think their should possibly be a bit more for a "New Submission" Since their is the capability to
__________________

Last edited by bmann_420; 03-02-2008 at 22:35.
bmann_420 is offline
V I R U S
Senior Member
Join Date: Jul 2004
Location: Russia / Germany
Old 03-02-2008 , 23:22   Re: AdminListen 2.4
Reply With Quote #3

I'm new in Coding, but i did some plugins which maybe i will share in some future. This one, was just a fix, since some ppl get troubles with it and the author gave no support anymore. This plugin works great so as it is, but I'm thinking to rewrite it and add the future to enable and disable the listen future for each admin.
__________________
V I R U S is offline
Send a message via ICQ to V I R U S
hoboman
Senior Member
Join Date: Jul 2007
Old 03-03-2008 , 01:35   Re: AdminListen 2.4
Reply With Quote #4

it is definitely a good idea to make it fakemeta ( althought it probably won't make a difference for 99% of the ppl )...all u gotta do is change the set_speaks

also you can remove these lines:
Code:
public plugin_modules(){
   require_module("engine") 
}
__________________
hoboman is offline
XiXiX
Junior Member
Join Date: Feb 2008
Location: Lithuania
Old 03-10-2008 , 11:21   Re: AdminListen 2.4
Reply With Quote #5

The idea is nice and works, but is not really original...
http://forums.alliedmods.net/showthread.php?t=63610
This plugin has the same thing, the key difference is the fact that the other plugin is more about chat colour, not admin listen.
XiXiX is offline
V I R U S
Senior Member
Join Date: Jul 2004
Location: Russia / Germany
Old 03-10-2008 , 11:29   Re: AdminListen 2.4
Reply With Quote #6

Sometime people just need a simple plugin, instead of a bunch. =)
Already at start i say that it's not new thing, just a edited version. Fixed better to say.
__________________
V I R U S is offline
Send a message via ICQ to V I R U S
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 03-10-2008 , 22:10   Re: AdminListen 2.4
Reply With Quote #7

But you should change those things we were talkin about earlier, it would make this plugin somewhat worth an Updated version. Just fixing a runtime error, i dont see the logic in a new submission. Change to fakemeta, is a start.
__________________
bmann_420 is offline
hoboman
Senior Member
Join Date: Jul 2007
Old 03-10-2008 , 22:37   Re: AdminListen 2.4
Reply With Quote #8

here is a 5 sec fix that I shamelessly ripped from amx_super, lol

errrr...i think it should work although I am not entirely sure how FM_SetListen is called

Code:
//ported by Oj@eKiLLzZz & Modded by V I R U S
// *******************************************************************************
// Admin Listen 2.3x, Also Copyright 2004, /dev/ urandom. No Warranties, 
// either expressed or implied.
// Props to Maxim for the remake of Luke Sankeys original plugin.
// Props to Luke Sankey for the original AdminMod plugin (SankListen).
// Inspired by PsychoListen by PsychoGuard
//
// Allows administrators (with flag "n") to see all team chats, and dead chats.
//
// Use amx_adminlisten_voice 0|1 to turn off and on the hearing of voicecomms

// In 2.0 the Chat Engine was totally rewritten from ground up,
// a different, more efficent method, was used to pick up say messages,
// also fewer calculations and variables in this version.
//
// 2.1 - VoiceComm rewrite, fixed a few typos in the comments.
//
// 2.2 - Updated for Condition Zero 1.2, Note that while I've attempted to keep
//       backwards compatability with other mods, I cannot vouch for it working
//       in other mods as I only have a CS:CZ server to test it in.
//
// 2.3 - Updated to work with Counter-Strike after steams update June 14, 2004.
// 2.4 - Fixed some errors. 2 March 2008.
// *******************************************************************************

#include <amxmodx>
#include <amxmisc>
#include <fakemeta>

#define ADMIN_ACCESS ADMIN_LEVEL_B   // Flag "n". Define here.

#define SPEAK_NORMAL    0
#define SPEAK_MUTED    1
#define SPEAK_ALL        2
#define SPEAK_LISTENALL    4

new fm_plinfo[33]

public FM_SetListen(iReceiver, iSender, bListen)
{
    if( (fm_plinfo[iSender] & SPEAK_MUTED) != 0) 
    {
        engfunc(EngFunc_SetClientListening, iReceiver, iSender, 0)

        forward_return(FMV_CELL,0)
        return FMRES_SUPERCEDE;
    }

    if( (fm_plinfo[iSender] & SPEAK_ALL) != 0) 
    {
        engfunc(EngFunc_SetClientListening, iReceiver, iSender, 1)

        forward_return(FMV_CELL,1)
        return FMRES_SUPERCEDE;
    }

    if( (fm_plinfo[iReceiver] & SPEAK_LISTENALL) != 0) 
    {
        engfunc(EngFunc_SetClientListening, iReceiver, iSender, 1)

        forward_return(FMV_CELL,1)
        return FMRES_SUPERCEDE;
    }

    return FMRES_IGNORED
}
stock fm_set_speak(id,tmp) (fm_plinfo[id] = tmp)




new count[32][32]     
new g_voice_status[2]


public plugin_init()
{
   register_plugin("AdminListen","2.5","/dev/ urandom V I R U S")
   register_srvcmd("amx_adminlisten_voice","voice_status")
   register_event("SayText","catch_say","b")
   register_forward(FM_Voice_SetClientListening,"FM_SetListen");
   return PLUGIN_CONTINUE
}

public catch_say(id)
{
    new reciever = read_data(0)
    new sender = read_data(1)
    new message[151]
    new channel[151]
    new sender_name[32]

    if (is_running("czero")||is_running("cstrike"))
    {
           read_data(2,channel,150)
           read_data(4,message,150)
           get_user_name(sender, sender_name, 31)
    } else {
            read_data(2,message,150)
    }
       count[sender][reciever] = 1          
       if (sender == reciever)
    {      
              new player_count = get_playersnum()
              new players[32]
              get_players(players, player_count, "c")

              for (new i = 0; i < player_count; i++) 
        {
                 if (get_user_flags(players[i]) & ADMIN_ACCESS)
            {     
                        if (count[sender][players[i]] != 1)
                {              
                               message_begin(MSG_ONE, get_user_msgid("SayText"),{0,0,0},players[i])
                               write_byte(sender)
                    if (is_running("czero")||is_running("cstrike"))
                           {
                           write_string(channel)
                               write_string(sender_name)
                           }
                               write_string(message)
                               message_end()
                        }
                 }
                 count[sender][players[i]] = 0
              }
       }
    
       return PLUGIN_CONTINUE
}


public client_infochanged(id)
{
   if ((get_user_flags(id) & ADMIN_ACCESS) && equal(g_voice_status,"1") && is_user_connected(id)) fm_set_speak(id, SPEAK_LISTENALL)
}

public client_connect(id)
{
   if ((get_user_flags(id) & ADMIN_ACCESS) && equal(g_voice_status,"1") && is_user_connected(id)) fm_set_speak(id, SPEAK_LISTENALL)
}

public voice_status(id){
   read_argv(1,g_voice_status,1)
   new player_count = get_playersnum()
   new players[32]
   get_players(players, player_count, "c")
   for (new i = 0; i < player_count; i++) {
      if ((get_user_flags(players[i]) & ADMIN_ACCESS)) {         
         if (equal(g_voice_status,"0")) {
     fm_set_speak(players[i], SPEAK_NORMAL)
     }
         if (equal(g_voice_status,"1")) {
     fm_set_speak(players[i], SPEAK_LISTENALL)
     }
      }
   }
}
__________________

Last edited by hoboman; 03-10-2008 at 22:42.
hoboman is offline
bmann_420
AMX_Super Pooper
Join Date: Jan 2005
Location: [SuperCentral.co]
Old 03-10-2008 , 22:50   Re: AdminListen 2.4
Reply With Quote #9

lol

THEIF!! "Shamelessly" why TY



(In the fm stocks at the top(of the super that is))

And he was supposed to do it. To earn his New Submission, Otherwise I woulda posted it a while ago, you nice guy u

I mean serious, all you have to do is rip it from the super, and bam...(althought its all split up, so its that much funner) lol as hobo realized or finally decided to do. And i havnt done a complete check but I believe some of the code was changed, im not sure, but mayyyybe
__________________

Last edited by bmann_420; 03-10-2008 at 22:59.
bmann_420 is offline
V I R U S
Senior Member
Join Date: Jul 2004
Location: Russia / Germany
Old 03-11-2008 , 05:35   Re: AdminListen 2.5 (Fakemeta)
Reply With Quote #10

Hoboman, +karma! Thx!
__________________
V I R U S is offline
Send a message via ICQ to V I R U S
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 06:45.


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