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