AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Unprecaching radio sounds (https://forums.alliedmods.net/showthread.php?t=209421)

being noob 02-25-2013 07:26

Unprecaching radio sounds
 
hey guys i want to unprecache radio sounds as no 1 uses them and it uses lots of precaches and any way to block showing radio command list after pressing z,x,c ?:3

yokomo 02-25-2013 07:37

Re: Unprecaching radio sounds
 
PHP Code:

#include <amxmodx>
#include <fakemeta>

new FwPrecacheSound

public plugin_precache()
{
    
FwPrecacheSound register_forward(FM_PrecacheSound"OnFwPrecacheSound")
}

public 
plugin_init()
{
    
unregister_forward(FM_PrecacheSoundFwPrecacheSound)
    
register_plugin("No Radio""0.0.1""wbyokomo")
    
register_clcmd("radio1""CmdBlocked")
    
register_clcmd("radio2""CmdBlocked")
    
register_clcmd("radio3""CmdBlocked")
    
register_clcmd("radio4""CmdBlocked"//For custom radio
}

public 
OnFwPrecacheSound(const sound[])
{
    if(
equal(sound"radio"5)) return FMRES_SUPERCEDE;
    
    return 
FMRES_IGNORED;
}

public 
CmdBlocked(id) return PLUGIN_HANDLED

Should work fine.

being noob 02-25-2013 07:49

Re: Unprecaching radio sounds
 
will it unprecache the sound filesin sound/radio folder?

yokomo 02-25-2013 07:54

Re: Unprecaching radio sounds
 
It unprecache all files from "sound/radio".

being noob 02-25-2013 08:03

Re: Unprecaching radio sounds
 
oooOOhyeah XD thanX


All times are GMT -4. The time now is 21:43.

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