搜索
楼主: guoxiangwei

今天我做的爆头插件,有问题请提一下!for amxx0.16

[复制链接]
发表于 2005-2-11 15:43:02 | 显示全部楼层 来自 北京
Post by wkloveaoss
我说的也是源码啊,RAR里包括了一个插件和一个源码嘛。。。是不是?
晕死
headshot1.rar里的源码:

#include <amxmod>
#include <amxmodx>
#include <amxmisc>

public plugin_init()
{
register_plugin("headshot", "0.1", "guoxiangwei");
register_cvar("sv_headshot", "1")
register_concmd("amx_headshot", "headshot",ADMIN_RCON," 0,1")        
     return PLUGIN_CONTINUE
}
public headshot()
{
new arg[3]
read_argv(1,arg,2)
new inum = str_to_num(arg)
new players = get_maxplayers ( )
if ( !get_cvar_num("sv_headshot") )
        return PLUGIN_CONTINUE
else
{   
new n
for (n=1;n <= players;n++)
   {
if (inum == 1)
{
set_user_hitzones(0, n, 2) ---应该是(0, 0, 2)
client_print(0,print_center,"现在是爆头模式!!!")
}
else if(inum == 0)
{
set_user_hitzones(0, n, 255)---应该是(0, 0, 2)
client_print(0,print_center,"爆头模式已经关闭!!!")
}
}
}
return PLUGIN_HANDLED
}
回复

使用道具 举报

发表于 2005-2-11 17:08:49 | 显示全部楼层 来自 福建福州
可是我下载的RAR里带的源码怎么是
#include <amxmod>
#include <amxmodx>
#include <amxmisc>


public plugin_init()
{
        register_plugin("headshot", "0.1", "guoxiangwei");
        register_cvar("sv_headshot", "1")
        register_concmd("amx_headshot", "headshot",ADMIN_RCON," 0,1")                            
            return PLUGIN_CONTINUE
}

public headshot()
{
        new arg[3]
        read_argv(1,arg,2)
        new inum = str_to_num(arg)
       
if ( !get_cvar_num("sv_headshot") )
        return PLUGIN_CONTINUE
else
{                         
        if (inum == 1)
        {
        set_user_hitzones(0, 0, 2)
        client_print(0,print_center,"现在是爆头模式!!!")
        }
        else if(inum == 0)
        {       
        set_user_hitzones(0, 0, 255)
        client_print(0,print_center,"爆头模式已经关闭!!!")
       
        }
}
        return PLUGIN_HANDLED
}
回复

使用道具 举报

发表于 2005-2-11 17:09:43 | 显示全部楼层 来自 福建福州
我把你的源码复制下来编译看看。
回复

使用道具 举报

发表于 2005-2-11 17:18:28 | 显示全部楼层 来自 福建福州
Post by BoeZombie
我说的是headshot1.rar里的源码


不好意思哦  我看错了。 是HEADSHOT1。。
回复

使用道具 举报

发表于 2005-2-11 18:57:46 | 显示全部楼层 来自 福建福州
不过我编译了HEADSHOT里的源码,放在服务器里运行还是不行?为什么。。。。5555555555
回复

使用道具 举报

发表于 2005-2-11 19:51:36 | 显示全部楼层 来自 广东汕头
我到现在都不知道怎么用这个插件,我在游戏里查询已开启的插件,明明暴头插件显示的是运行,可是没有效果///

和平时一个样。。
回复

使用道具 举报

发表于 2005-2-11 20:06:19 | 显示全部楼层 来自 福建福州
我把amx_headshot 1写在AMXX。CFG里了,这样行不?
回复

使用道具 举报

发表于 2005-2-12 01:48:37 | 显示全部楼层 来自 福建福州
可以使用了,但是每次有新人加入或者换地图后都要在打一次命令?能不能把命令写在什么地方就可以?求教
回复

使用道具 举报

发表于 2005-2-13 13:37:30 | 显示全部楼层 来自 香港
好东西!!!!
支持!!
回复

使用道具 举报

发表于 2005-2-14 12:54:11 | 显示全部楼层 来自 广西南宁
爆头模式是什么意思啊
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表