源代码
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <cstrike>
#define ADMIN_LEVEL ADMIN_BAN
public plugin_init()
{
register_plugin("MatchR3","0.3","KIN")
console_print(0,"[== auto_say_money ==]");
register_concmd("amx_r3","amx_start_go")
register_clcmd("say /r3","amx_start_go", ADMIN_LEVEL_A, "amx_start_go")
register_concmd("amx_knifestart","amx_knifestart_go",ADMIN_LEVEL_A,"knife to start")
register_clcmd("say /dao","amx_knifestart_go", ADMIN_LEVEL_A, "amx_knifestart_go")
register_event("SendAudio", "end_round", "a", "2&%!MRAD_terwin", "2&%!MRAD_ctwin", "2&%!MRAD_rounddraw")
register_clcmd("say $","show_money")
register_event("ResetHUD", "new_round", "be")
register_forward(FM_GetGameDescription,"GameDesc");
register_cvar("amx_gamename","Couter-Strike match");
}
public amx_start_go(id,level)
{
if (!access(id,level))
{
new playername[32], msg[512]
get_user_name(id, playername, 31)
format(msg, 511, "^x03* %s ^x04你没有权限使用该命令!", playername)
client_color(id, id, msg)
console_print(id,"* 你没有权限使用该命令!")
}
if (access(id,level))
{
set_task(0.0,"cfiles")
set_task(4.0,"restart_01")
set_task(7.0,"restart_02")
set_task(10.0,"restart_03")
set_task(14.0,"restart_04")
console_print(id,"* 准备就绪,载入比赛!")
}
}
public amx_knifestart_go(id,level)
{
if (!access(id,level))
{
new playername[32], msg[512]
get_user_name(id, playername, 31)
format(msg, 511, "^x03* %s ^x04你没有权限使用该命令!", playername)
client_color(id, id, msg)
console_print(id,"* 你没有权限使用该命令!")
}
if (access(id,level))
{
set_task(0.0,"cfiles")
set_task(4.0,"restart_01")
set_task(7.0,"restart_02")
set_task(10.0,"restart_03")
set_task(14.0,"restart_05")
console_print(id,"* 准备就绪,载入刀战!")
}
}
public restart_01()
{
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Server is restart on 1 second.")
server_cmd ("sv_restartround 1")
}
public restart_02()
{
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Server is restart on 2 second.")
server_cmd ("sv_restartround 2")
}
public restart_03()
{
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Server is restart on 3 second.")
server_cmd ("sv_restartround 3")
}
public restart_04()
{
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Good luck & have fun.")
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Good luck & have fun.")
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Good luck & have fun.")
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Good luck & have fun.")
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Good luck & have fun.")
remove_task(0)
}
public restart_05(id)
{
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Good luck & have fun.")
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Good luck & have fun.")
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Good luck & have fun.")
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Good luck & have fun.")
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Good luck & have fun.")
client_print( id,print_center,"* 本局拼刀选边,请自觉使用刀!")
set_task(0.01, "on_knife",id,_,_,"b")
}
public on_knife(id)
{
new Weaponname = read_data(2)
if (Weaponname!=CSW_KNIFE)
{
engclient_cmd(id,"weapon_knife")
}
}
public end_round()
{
remove_task(0)
return PLUGIN_CONTINUE
}
public cfiles()
{
new customdir[64]
get_customdir(customdir, 63)
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Loading Match Config.")
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Match will begin in few second.")
server_cmd("exec ^"%s/match.cfg^"", customdir)
}
public GameDesc()
{
new gamename[32];
get_cvar_string("amx_gamename",gamename,31);
forward_return(FMV_STRING,gamename);
return FMRES_SUPERCEDE;
}
public show_money (id)
{
new iMoney;
new money_Buffer[100+1];
iMoney = cs_get_user_money(id);
format( money_Buffer, 100, "%d", iMoney );
engclient_cmd( id, "say_team", money_Buffer );
}
stock client_color(playerid, colorid, msg[])
{
message_begin(playerid?MSG_ONE:MSG_ALL,get_user_msgid("SayText"),_,playerid)
write_byte(colorid)
write_string(msg)
message_end()
}
public new_round()
{
new maxppl = get_maxplayers()
for(new i = 1; i <= maxppl; ++i)
{
if(is_user_alive(i))
client_cmd(i, "say $ 淫民币","淫民币")
}
}
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
一个二把刀朋友改成
#include <amxmodx>
#include <amxmisc>
#include <fakemeta>
#include <cstrike>
#define ADMIN_LEVEL ADMIN_BAN
public plugin_init()
{
register_plugin("MatchR3","0.3","KIN")
console_print(0,"[== auto_say_money ==]");
register_concmd("amx_r3","amx_start_go")
register_clcmd("say /r3","amx_start_go", ADMIN_LEVEL_A, "amx_start_go")
register_concmd("amx_ada","amx_start_01")
register_clcmd("say /ada","amx_start_01", ADMIN_LEVEL_A, "amx_start_02")
register_concmd("amx_pk","amx_start_02")
register_clcmd("say /pk","amx_start_02", ADMIN_LEVEL_A, "amx_start_02")
register_concmd("amx_knifestart","amx_knifestart_go",ADMIN_LEVEL_A,"knife to start")
register_clcmd("say /dao","amx_knifestart_go", ADMIN_LEVEL_A, "amx_knifestart_go")
register_event("SendAudio", "end_round", "a", "2&%!MRAD_terwin", "2&%!MRAD_ctwin", "2&%!MRAD_rounddraw")
register_clcmd("say $","show_money")
register_event("ResetHUD", "new_round", "be")
register_forward(FM_GetGameDescription,"GameDesc");
register_cvar("amx_gamename","Couter-Strike match");
}
public amx_start_go(id,level)
{
if (!access(id,level))
{
new playername[32], msg[512]
get_user_name(id, playername, 31)
format(msg, 511, "^x03* %s ^x04你没有权限使用该命令!", playername)
client_color(id, id, msg)
console_print(id,"* 你没有权限使用该命令!")
}
if (access(id,level))
{
set_task(0.0,"cfiles_01")
set_task(4.0,"restart_01")
set_task(7.0,"restart_02")
set_task(10.0,"restart_03")
set_task(14.0,"restart_04")
console_print(id,"* 准备就绪,载入比赛!")
}
}
public amx_start_01(id,level)
{
if (!access(id,level))
{
new playername[32], msg[512]
get_user_name(id, playername, 31)
format(msg, 511, "^x03* %s ^x04你没有权限使用该命令!", playername)
client_color(id, id, msg)
console_print(id,"* 你没有权限使用该命令!")
}
if (access(id,level))
{
set_task(0.0,"cfiles_02")
set_task(4.0,"restart_01")
set_task(7.0,"restart_02")
set_task(10.0,"restart_03")
set_task(14.0,"restart_04")
console_print(id,"* 准备就绪,载入比赛!")
}
}
public amx_start_02(id,level)
{
if (!access(id,level))
{
new playername[32], msg[512]
get_user_name(id, playername, 31)
format(msg, 511, "^x03* %s ^x04你没有权限使用该命令!", playername)
client_color(id, id, msg)
console_print(id,"* 你没有权限使用该命令!")
}
if (access(id,level))
{
set_task(0.0,"cfiles_03")
set_task(4.0,"restart_01")
set_task(7.0,"restart_02")
set_task(10.0,"restart_03")
set_task(14.0,"restart_04")
console_print(id,"* 准备就绪,载入比赛!")
}
}
public amx_knifestart_go(id,level)
{
if (!access(id,level))
{
new playername[32], msg[512]
get_user_name(id, playername, 31)
format(msg, 511, "^x03* %s ^x04你没有权限使用该命令!", playername)
client_color(id, id, msg)
console_print(id,"* 你没有权限使用该命令!")
}
if (access(id,level))
{
set_task(0.0,"restart_01")
set_task(4.0,"restart_05")
console_print(id,"* 准备就绪,载入刀战!")
}
}
public restart_01()
{
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Server is restart on 1 second.")
server_cmd ("sv_restartround 1")
}
public restart_02()
{
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Server is restart on 2 second.")
server_cmd ("sv_restartround 2")
}
public restart_03()
{
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Server is restart on 3 second.")
server_cmd ("sv_restartround 3")
}
public restart_04()
{
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Good luck & have fun.")
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Good luck & have fun.")
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Good luck & have fun.")
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Good luck & have fun.")
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Good luck & have fun.")
remove_task(0)
}
public restart_05(id)
{
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Good luck & have fun.")
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Good luck & have fun.")
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Good luck & have fun.")
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Good luck & have fun.")
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Good luck & have fun.")
client_print( id,print_center,"* 本局拼刀选边,请自觉使用刀!")
set_task(0.01, "on_knife",id,_,_,"b")
}
public on_knife(id)
{
new Weaponname = read_data(2)
if (Weaponname!=CSW_KNIFE)
{
engclient_cmd(id,"weapon_knife")
}
}
public end_round()
{
remove_task(0)
return PLUGIN_CONTINUE
}
public cfiles_01()
{
new customdir[64]
get_customdir(customdir, 63)
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Loading Match Config.")
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Match will begin in few second.")
server_cmd("exec ^"%s/match1.cfg^"", customdir)
}
public cfiles_02()
{
new customdir[64]
get_customdir(customdir, 63)
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Loading Match Config.")
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Match will begin in few second.")
server_cmd("exec ^"%s/match2.cfg^"", customdir)
}
public cfiles_03()
{
new customdir[64]
get_customdir(customdir, 63)
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Loading Match Config.")
client_color( 0, print_chat, "^x04[ 超级纯净比赛插件 ] ^x03Match will begin in few second.")
server_cmd("exec ^"%s/match3.cfg^"", customdir)
}
public GameDesc()
{
new gamename[32];
get_cvar_string("amx_gamename",gamename,31);
forward_return(FMV_STRING,gamename);
return FMRES_SUPERCEDE;
}
public show_money (id)
{
new iMoney;
new money_Buffer[100+1];
iMoney = cs_get_user_money(id);
format( money_Buffer, 100, "%d", iMoney );
engclient_cmd( id, "say_team", money_Buffer );
}
stock client_color(playerid, colorid, msg[])
{
message_begin(playerid?MSG_ONE:MSG_ALL,get_user_msgid("SayText"),_,playerid)
write_byte(colorid)
write_string(msg)
message_end()
}
public new_round()
{
new maxppl = get_maxplayers()
for(new i = 1; i <= maxppl; ++i)
{
if(is_user_alive(i))
client_cmd(i, "say $ 淫民币","淫民币")
}
}
编译不了了 我不会改这个 有帮忙看看啊