查看: 2345|回复: 26

[源码]No Raaio flood插件

[复制链接]
发表于 2014-1-18 01:10:29 | 显示全部楼层 |阅读模式
#include <amxmodx>

#define PLUGIN "No Radio Flood"
#define VERSION "1.1"
#define AUTHOR "Starsailor"

new Float:gRadio[33]
new pTime,pBlock

new szRadioCommands[][] = {
        "radio1", "coverme", "takepoint", "holdpos", "regroup", "followme", "takingfire",
        "radio2", "go", "fallback", "sticktog", "getinpos", "stormfront", "report",
        "radio3", "roger", "enemyspot", "needbackup", "sectorclear", "inposition", "reportingin", "getout", "negative", "enemydown"
}


public plugin_init() {
       
        register_plugin(PLUGIN, VERSION, AUTHOR)
       
        for (new i=0; i<sizeof szRadioCommands; i++)
                register_clcmd(szRadioCommands[i], "cmdRadio")
       
        pTime = register_cvar("nrf_time","5")  //0 Disabled
        pBlock = register_cvar("nrf_block_fith","1")
       
        register_message(get_user_msgid("SendAudio"),"FireInTheHole")
        register_cvar("srf_version",VERSION,FCVAR_SERVER|FCVAR_SPONLY) //Srf = Stop Radio Flooding , Last Plugin name
       
}

public cmdRadio(id){
       
        new iTime = get_pcvar_num(pTime)
       
        if(iTime > 0){ //Emp'
               
                new Float:fTime = get_gametime()
               
                if(fTime - gRadio[id] < iTime){
                       
                        client_print(id,print_center,"Sorry, but you cannot abuse this command!")
                       
                        return PLUGIN_HANDLED_MAIN
                }
               
                gRadio[id] = fTime
        }
       
        return PLUGIN_CONTINUE
}

public FireInTheHole(msgid,msg_dest,msg_entity) {
       
        if(get_msg_args() < 3 || get_msg_argtype(2) != ARG_STRING)
                return PLUGIN_HANDLED
       
        new szArg[32]
       
        get_msg_arg_string(2,szArg,31)
       
        if(equal(szArg ,"%!MRAD_FIREINHOLE") && get_pcvar_num(pBlock))
                return PLUGIN_HANDLED;
       
        return PLUGIN_CONTINUE;
}
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang3082\\ f0\\ fs16 \n\\ par }
*/


No Raaio flood.rar

4.85 KB, 下载次数: 1

售价: 2 金钱  [记录]

发表于 2014-1-18 17:39:13 | 显示全部楼层
加油啊!偶一定会追随你左右,偶坚定此贴必然会起到抛砖引玉的作用~  
发表于 2014-1-18 20:02:23 | 显示全部楼层
老大,我好崇拜你哟  
发表于 2014-1-19 00:21:07 | 显示全部楼层
不错,支持下  
发表于 2014-1-19 09:41:23 | 显示全部楼层
有空一起交流一下  
发表于 2014-1-19 10:49:50 | 显示全部楼层
做对的事情比把事情做对重要。  
发表于 2014-1-19 22:04:20 | 显示全部楼层
支持你就顶你  
发表于 2014-1-20 02:16:45 | 显示全部楼层
回贴赚学识,不错了  
发表于 2014-1-20 04:36:31 | 显示全部楼层
我起来了 哈哈 刚才迷了会  
发表于 2014-1-21 13:45:42 | 显示全部楼层
抢座位来了  
您需要登录后才可以回帖 登录 | 中文注册

本版积分规则