回复: 我的插件出问题了
#include <amxmodx>#include <amxmisc>
#define PLUGIN "RoundWeaponRestriction"
#define VERSION "1.0"
#define AUTHOR "Jim"
new current_round = 0
public plugin_init() {
register_plugin(PLUGIN, VERSION, AUTHOR)
register_logevent("round_start", 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_start() {
current_round++
}
public round_restart() {
current_round = 0
}
public hook_weapon(id) {
if(current_round > 3)
return
new wpid = read_data(2)
switch(current_round) {
case 1: if(wpid!=6) engclient_cmd(id,"weapon_knife")
case 2:{
switch(wpid){
case 4,6,9,25: return
default:{
client_print(id,print_center,"You can't use this weapon at this round.")
engclient_cmd(id,"weapon_knife")
}
}
}
case 3:{
switch(wpid){
case 2,4,6,9,10,11,16,17,25,26: return
default:{
client_print(id,print_center,"You can't use this weapon at this round.")
engclient_cmd(id,"weapon_knife")
}
}
}
}
}
弄完了,效果简单测试了一下,基本凑合。因为我的csdm除掉了buyzone和bomb,所以测试起来比较费尽,关键是我懒得改回去,呵呵,不好意思。你可以帮我测试一下,有什么问题告诉我。
回复: 我的插件出问题了
效果是如果出现每局限制的武器。就自动换出刀来。回复: 我的插件出问题了
AMXX编译失败,1.0、1.60、1.70下都试过了,会不会是我编译.SMA格式时出错???要不你传个附件上来啊。急死我了
页:
1
[2]