管理们进来看看
编译不成功显示错误#include <amxmodx>
#include <cstrike>
new g_kills //每人杀人记数
public plugin_init(){
register_plugin("kills","1.0", "A.MI")
register_event("DeathMsg", "death_kills", "a")
register_logevent("newRound", 2, "0=World triggered", "1=Round_Start") // 回合
register_event("SendAudio","end_round","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw")
}
public client_connect(id){
g_kills = 0
return PLUGIN_CONTINUE
}
public client_disconnect(id){
g_kills = 0
return PLUGIN_CONTINUE
}
public newRound(){
new maxppl = get_maxplayers()
for(new i=0; i<= maxppl; ++i){
if( is_user_connected(i) )g_kills = 0
}
}
public death_kills(){
new killer = read_data(1)
if( is_user_connected(killer) ){
g_kills++
}
return PLUGIN_CONTINUE
}
public end_round(){
new twho = 0, tnub = 0, tkills
new maxppl = get_maxplayers()
for(new i=0; i<= maxppl; ++i){
if( is_user_connected(i)&& get_user_team(i)==1 ){
tkills = g_kills
if( tkills > tnub ){
tnub = tkills
twho = i
}
}
}
if( twho ){
new name, newmony = 1000*tnub
get_user_name(twho,name,31)
cs_set_user_money( twho, (cs_get_user_money(twho) + newmony) );
client_print(0,print_chat,"* 本局徒匪杀人最多者: %s .共 %d 人,奖励 %d .",name,tnub,newmony)
}
set_task(0.5,"REFBXX");
return
}
public REFBXX(){
new ctwho = 0, ctnub = 0, ctkills
new maxppl = get_maxplayers()
for(new i=0; i<= maxppl; ++i){
if( is_user_connected(i)&& get_user_team(i)==2 ){
ctkills = g_kills
if( ctkills > ctnub ){
ctnub = ctkills
ctwho = i
}
}
}
if( ctwho ){
new iname, ctnewmony = 1000*ctnub
get_user_name(ctwho,iname,31)
cs_set_user_money( ctwho, (cs_get_user_money(ctwho) + ctnewmony) );
client_print(0,print_chat,"* 本局警察杀人最多者: %s .共 %d 人,奖励 %d .",iname,ctnub,ctnewmony)
}
return
} #include <amxmodx>
#include <cstrike>
new g_kills //每人杀人记数
public plugin_init()
{
register_plugin("kills","1.0", "A.MI")
register_event("DeathMsg", "death_kills", "a")
register_logevent("newRound", 2, "0=World triggered", "1=Round_Start") // 回合
register_event("SendAudio","end_round","a","2=%!MRAD_terwin","2=%!MRAD_ctwin","2=%!MRAD_rounddraw")
}
public client_connect(id)
{
g_kills = 0
return PLUGIN_CONTINUE
}
public client_disconnect(id)
{
g_kills = 0
return PLUGIN_CONTINUE
}
public newRound()
{
new maxppl = get_maxplayers()
for(new i=1; i<= maxppl; ++i)
{
if( is_user_connected(i))
g_kills = 0
}
}
public death_kills()
{
new killer = read_data(1)
if(is_user_connected(killer))
{
g_kills++
}
return PLUGIN_CONTINUE
}
public end_round()
{
new twho = 0, tnub = 0, tkills
new maxppl = get_maxplayers()
for(new i=0; i<= maxppl; ++i)
{
if(is_user_connected(i)&& get_user_team(i)==1)
{
tkills = g_kills
if( tkills > tnub )
{
tnub = tkills
twho = i
}
}
}
if( twho )
{
new name, newmony = 1000*tnub
get_user_name(twho,name,31)
cs_set_user_money( twho, (cs_get_user_money(twho) + newmony) );
client_print(0,print_chat,"* 本局徒匪杀人最多者: %s .共 %d 人,奖励 %d .",name,tnub,newmony)
}
set_task(0.5,"REFBXX");
return
}
public REFBXX()
{
new ctwho = 0, ctnub = 0, ctkills
new maxppl = get_maxplayers()
for(new i=0; i<= maxppl; ++i)
{
if( is_user_connected(i)&& get_user_team(i)==2 )
{
ctkills = g_kills
if( ctkills > ctnub )
{
ctnub = ctkills
ctwho = i
}
}
}
if( ctwho )
{
new iname, ctnewmony = 1000*ctnub
get_user_name(ctwho,iname,31)
cs_set_user_money( ctwho, (cs_get_user_money(ctwho) + ctnewmony) );
client_print(0,print_chat,"* 本局警察杀人最多者: %s .共 %d 人,奖励 %d .",iname,ctnub,ctnewmony)
}
return
} 龟哥谢了 {:4_139:}
加了表情
加了代码框
{:4_132:}表情还不错! 编译失败,不知道是不是编译版本问题
页:
[1]