外国人写的给弹药袋的插件,我不会用教教我

社区服务
高级搜索
猴岛论坛CSGO反恐精英CS个性化修改专区外国人写的给弹药袋的插件,我不会用教教我
发帖 回复
倒序阅读 最近浏览的帖子最近浏览的版块
0个回复

外国人写的给弹药袋的插件,我不会用教教我

楼层直达
luoyunfeng2

ZxID:6440411

等级: 新兵
举报 只看楼主 使用道具 楼主   发表于: 2009-05-20 0
#include <amxmodx>
    #include <amxmisc>
    #include <zombieplague>
    
    public plugin_init ()
    {
        register_plugin ( "ZP: Give Ammo", "1.0.0", "Arkshine" );
        register_clcmd ( "zp_giveap", "CmdGiveAP", ADMIN_RCON, "- zp_giveap <name> <amount> : Give Ammo Packs" );
    }
    
    public CmdGiveAP ( id, level, cid )
    {
        if ( !cmd_access ( id, level, cid, 3 ) )
        {
            return PLUGIN_HANDLED;
        }
        
        new s_Name[ 32 ], s_Amount[ 4 ];
        
        read_argv ( 1, s_Name, charsmax ( s_Name ) );
        read_argv ( 2, s_Amount, charsmax ( s_Amount ) );
        
        new i_Target = cmd_target ( id, s_Name, 2 );
        
        if ( !i_Target )
        {
            client_print ( id, print_console, "(!) Player not found" );
            return PLUGIN_HANDLED;
        }
        
        zp_set_user_ammo_packs ( i_Target, max ( 1, str_to_num ( s_Amount ) ) );
        
        return PLUGIN_HANDLED;
    }
« 返回列表
发帖 回复