AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Approved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=8)
-   -   No Radio Flood v1.1 (https://forums.alliedmods.net/showthread.php?t=94588)

Starsailor 06-12-2009 22:57

No Radio Flood v1.1
 
1 Attachment(s)
Description:

With this plugin, the people can't annoy with radio messages every two seconds

Cvars:

nrf_block_fith (0|1) Blocks 'Fire In The Hole' Sound, Default 1
nrf_time (Time in seconds 0 - Disabled) Time which people will have to wait to send another message radio, Default 5 seconds

Changelog:

v1.1:
-Removed Engine
-Added all commands Thanks hleV.
-Added cvar to block 'Fire In The Hole' Sound
v1.0: First release

Important:

Not Compatible with:

Custom Radio Commands by kaloszyfer
Teamplay Helper v1.2 by me

Servers with this plugin:
[Here]

algoasi 06-12-2009 23:13

Re: Stop Radio Flood v1.0
 
Oh Goo job

Work!

meTaLiCroSS 06-12-2009 23:45

Re: Stop Radio Flood v1.0
 
WOOOOW

You Rocks (again) !!

biscuit628 06-12-2009 23:58

Re: Stop Radio Flood v1.0
 
good job!

kushy_mang 06-13-2009 02:03

Re: Stop Radio Flood v1.0
 
Oh my god.. I will have to test this.. nice idea. Also if we set the cvar to block messages for 5 seconds.. does this include the usual "fire in the hole!" or is just radio commands

ConnorMcLeod 06-13-2009 02:35

Re: Stop Radio Flood v1.0
 
You don't need to use engine if you use get_gametime.
Also, you should register like 23 radios cmds aliases.

You also have to know that there are existing offset to set the next time a player can use the radio and how many times a player can use it (reset to 60 when a player spawns).

hleV 06-13-2009 03:37

Re: Stop Radio Flood v1.0
 
v1.1 (I wonder if setting a task after each radio cmd usage is faster than gametime):
Code:
#include <amxmodx> #include <engine>   #define PLUGIN "Stop Radio Flood" #define VERSION "1.1" #define AUTHOR "Starsailor"   new g_szRadio[][] = {         "radio1", "coverme", "takepoint", "holdpos", "regroup", "followme", "takingfire",         "radio2", "go", "fallback", "sticktog", "getinpos", "stormfront", "report",         "radio3", "roger", "enemyspot", "needbackup", "sectorclear", "inposition", "reportingin", "getout", "negative", "enemydown" };   new Float:gRadio[33],pTime,pEnabled   public plugin_init() {                 register_plugin(PLUGIN, VERSION, AUTHOR)           for (new i = 0; i < sizeof(g_szRadio); i++)                 register_clcmd(g_szRadio[i], "cmdRadio");           pTime = register_cvar("srf_time","5")         pEnabled = register_cvar("srf_enabled","1")           register_cvar("srf_version",VERSION,FCVAR_SERVER|FCVAR_SPONLY) } public cmdRadio(id){           if(get_pcvar_num(pEnabled)){                           new Float:fTime = halflife_time()                   if(fTime - gRadio[id] < get_pcvar_num(pTime)){                                   client_print(id,print_center,"** Stop flooding with radio **")                           return 1                 }                   gRadio[id] = fTime         }           return PLUGIN_CONTINUE }

ConnorMcLeod 06-13-2009 04:01

Re: Stop Radio Flood v1.0
 
tasks should not be used for cmds cooldown.

Removed engine and use only 1 cvar :

PHP Code:

#include <amxmodx>
 
#define PLUGIN "Stop Radio Flood"
#define VERSION "1.2"
#define AUTHOR "Starsailor"
 
new g_szRadio[][] =
{
    
"radio1""coverme""takepoint""holdpos""regroup""followme""takingfire",
    
"radio2""go""fallback""sticktog""getinpos""stormfront""report",
    
"radio3""roger""enemyspot""needbackup""sectorclear""inposition""reportingin""getout""negative""enemydown"
}
 
new 
Float:g_fNextRadio[33]
new 
g_pTime
 
public plugin_init()
{
    
register_plugin(PLUGINVERSIONAUTHOR)

    for(new 
0sizeof(g_szRadio); i++)
    {
        
register_clcmd(g_szRadio[i], "cmdRadio")
    }

    
g_pTime register_cvar("srf_time","5"
}

public 
cmdRadio(id)
{
    new 
Float:fDelay get_pcvar_float(g_pTime)
    if( 
fDelay )
    {
        new 
Float:fTime get_gametime()

        if(
g_fNextRadio[id] > fTime)
        {
            
client_print(id,print_center,"** Stop flooding with radio **")
            return 
PLUGIN_HANDLED_MAIN
        
}
        
g_fNextRadio[id] = fTime fDelay
    
}
    return 
PLUGIN_CONTINUE



crazyeffect 06-13-2009 04:16

Re: Stop Radio Flood v1.0
 
Love it!

xPaw 06-13-2009 04:31

Re: Stop Radio Flood v1.0
 
Will never play on servers where its running :mrgreen:


All times are GMT -4. The time now is 09:55.

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