搜索
查看: 2863|回复: 5

求第一局,第2局手枪,第3局正常模式插件

[复制链接]
发表于 2007-5-20 11:53:47 | 显示全部楼层 |阅读模式 来自 中国–广东–揭阳
如题.

我自己手上有段源码,但里面有些地方出错了,第2局本来是手枪局,他自动切换成刀了,请哪位高手帮我编译下...

还有加上提示哪局用什么武器.比如第一局就在屏幕提示本局只能用刀,第2局提示只能用手枪,第3局恢复正常模式...下面是源码.

[html]#include <amxmodx>
#include <amxmisc>
#define PLUGIN "Test"
#define VERSION "1.0"
#define AUTHOR "Jim"
new current_round = 0
new const weapon_banned[7] = {CSW_USP, CSW_GLOCK18, CSW_DEAGLE, CSW_ELITE, CSW_FIVESEVEN, CSW_P228, CSW_HEGRENADE}
public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR)
register_logevent("round_count", 2, "1=Round_Start")
register_event("TextMsg", "round_restart", "a", "2=#Game_Commencing", "2=#Game_will_restart_in")
register_event("CurWeapon", "hook_weapon", "b", "2!29")
}
public round_count()
{
current_round ++
}
public round_restart()
{
current_round = 0
}
public hook_weapon(id)
{
if(current_round >2)
return PLUGIN_CONTINUE
new wpid = read_data(2)
if(current_round == 1)
engclient_cmd(id, "weapon_knife")
//else if(current_round == 2 && wpid != CSW_HEGRENADE)
//engclient_cmd(id, "weapon_knife")
else if(current_round == 2 && !IsValidWeapon(wpid))
engclient_cmd(id, "weapon_knife")
return PLUGIN_CONTINUE
}
bool:IsValidWeapon(wpid)
{
for(new i=0; i<7; i++)
{
if(wpid == weapon_banned)
return true
}
return false
}
[/html]
发表于 2007-5-21 02:32:31 | 显示全部楼层 来自 中国–广西–柳州–柳南区

回复: 求第一局,第2局手枪,第3局正常模式插件

唉,有现成的不会搜。只会在这发贴。:confused:
回复

使用道具 举报

发表于 2007-5-22 16:32:20 | 显示全部楼层 来自 中国–云南–曲靖

回复: 求第一局,第2局手枪,第3局正常模式插件

你可以到论坛http://cschina.uu1001.com去下载啊.这都还要这样..我倒~
回复

使用道具 举报

 楼主| 发表于 2007-6-4 11:19:35 | 显示全部楼层 来自 中国–广东–揭阳

回复: 求第一局,第2局手枪,第3局正常模式插件

这个论坛里面没啊....而且作弊器超多..
回复

使用道具 举报

发表于 2007-6-4 12:31:10 | 显示全部楼层 来自 中国–福建–漳州

回复: 求第一局,第2局手枪,第3局正常模式插件

什么叫没,是你没在论坛里搜。看我的签名:刀、O3、O4、O5、C4及手枪战插件(可自定义)就有。
回复

使用道具 举报

发表于 2007-6-5 01:10:29 | 显示全部楼层 来自 中国–四川–成都

回复: 求第一局,第2局手枪,第3局正常模式插件

老大 迩的那个插件在1.5下用报错
不能读取新的一局设置
回复

使用道具 举报

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

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