Raised This Month: $ Target: $400
 0% 

svc_bad unleashed


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Voi
Veteran Member
Join Date: Sep 2006
Location: Gdansk, Poland
Old 03-06-2008 , 13:22   svc_bad unleashed
Reply With Quote #1

hi, help me to develop a plugin that will stop many unnessesary messages that client gets on the new round

as my 1.5yrs running home server experience, most causes of svc_bad is overflow of messages, and its mainly caused in the start of new round

first of all, locking doors sound...


Code:
/*
This plugin should help in some cases, to prevent svc_bad error.
*/

#include <amxmodx>
#include <fakemeta>

#define PLUGIN "SVC_BAD Unleashed"
#define VERSION "0.1"
#define AUTHOR "Voi"

new bool:blocker

public plugin_init() {
    register_plugin(PLUGIN, VERSION, AUTHOR)
    register_logevent("roundEnd", 2, "1=Round_End")  
    register_logevent("newRound", 2, "1=Round_Start")
}
public roundEnd()
    blocker = true
    
public newRound()
    set_task(1.0, "postNewRound")

public postNewRound()
    blocker = false
    
public fw_emitsound(entity,channel,const sample[],Float:volume,Float:attenuation,fFlags,pitch)
{
    if(!containi(sample,"doorstop") && !blocker)
        return FMRES_IGNORED
        
    return FMRES_OVERRIDE
}
hope you guys get some more ideas

edit:

hmm what i did wrong here, this is supposed to work, but the sounds are still played :F
Attached Files
File Type: sma Get Plugin or Get Source (voi_svc_bad_unleashed.sma - 686 views - 733 Bytes)
__________________

Last edited by Voi; 03-06-2008 at 15:52.
Voi is offline
 



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 08:34.


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