Raised This Month: $ Target: $400
 0% 

svc_bad unleashed


Post New Thread Reply   
 
Thread Tools Display Modes
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
kp_uparrow
Penalized Member
Join Date: Jun 2006
Location: 192.168.0.1
Old 03-06-2008 , 22:35   Re: svc_bad unleashed
Reply With Quote #2

fun allinone hey?
__________________
I USED A SECOND ACCOUNT TO DO MORE KARMA UPS AND DOWNS UNTIL GREENTRYST CAUGHT ME
kp_uparrow is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 03-07-2008 , 01:18   Re: svc_bad unleashed
Reply With Quote #3

return FMRES_SUPERCEDE

For fun_alinone i'm using this :
PHP Code:
/* AMX Mod Plugin

* (c) Copyright 2007, DokTor 
* This file is provided as is (no warranties). 

*/ 

#include <amxmodx>
#include <fakemeta>

#define TASKID1    1346876341
#define VOL_LOW    0.2

public plugin_init() {
    
register_plugin("fun allione sounds""0.2""DokTor")

    new 
szMapname[13]
    
get_mapname(szMapname12)
    if(!
equali(szMapname,"fun_allinone") && !equali(szMapname,"fun_allione"))
        
pause("ae")

    
register_forward(FM_EmitSound"fw_EmitSound")
    
register_forward(FM_EmitAmbientSound"fw_EmitAmbientSound")

    
register_clcmd("say""check_say")
    
set_task(5.0"Task_StopEcho"TASKID1__"b")
}

public 
plugin_end() {
    
client_cmd(0"room_type 0")
}

public 
fw_EmitSound(entchan, const sample[], Float:volFloat:attnflagspitch)
{
    
// doors/doormove8.wav doors/doorstop8.wav
    
if(sample[0] != 'd' || sample[6] != 'd' || sample[14] != '8')
        return 
FMRES_IGNORED

    engfunc
(EngFunc_EmitSoundentchansampleVOL_LOWattnflagspitch)
    return 
FMRES_SUPERCEDE
}

public 
fw_EmitAmbientSound(entFloat:pos[3], const sample[], Float:volFloat:attnflagspitch)
{
    
// debris/beamstart10.wav    
    
if(sample[0] != 'd' || sample[7] != 'b' || sample[17] != '0')
        return 
FMRES_IGNORED

    engfunc
(EngFunc_EmitAmbientSoundentpossampleVOL_LOWattnflagspitch)
    return 
PLUGIN_HANDLED
}

public 
Task_StopEcho()
{
    static const 
szCmd[] = "room_type 0"
    
client_cmd(0szCmd)
}

public 
check_say(id)
{
    new 
text[192]
    
read_args(text,192)
    
remove_quotes(text)
    if(
containi(text"echo") != -1)
        
client_cmd(id"room_type 0")

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Reply


Thread Tools
Display Modes

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


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