|
发表于 2007-10-28 06:43:03
|
显示全部楼层
来自 中国–广东–深圳
回复: 求一方队员杀人额外奖励。
没试验过,你自己试下吧.
[php]#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#define PLUGIN_NAME "MAP_addmoney"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "zwfgdlc"
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
register_event("DeathMsg","DeathMsg_event","a")
//在此处添加您的代码...
}
public DeathMsg_event()
{
new killer=read_data(1)
new Victim=read_data(2)
new mapname[16],name[32]
get_mapname(mapname,15)
get_user_name(killer,name,31)
new k_team=get_user_team(killer)
new v_team=get_user_team(Victim)
if(containi(mapname,"de_dust2")!=-1 && k_team==2&&is_user_connected(killer)&&k_team!=v_team&&killer!=Victim)
{
cs_set_user_money(killer,cs_get_user_money(killer)+500)
client_print(0,print_chat,"%s英勇杀敌,奖励500元",name)
}else if(containi(mapname,"de_cbble")!=-1 && k_team==1&&is_user_connected(killer)&&k_team!=v_team&&killer!=Victim)
{
cs_set_user_money(killer,cs_get_user_money(killer)+500)
client_print(0,print_chat,"%s英勇杀敌,奖励500元",name)
}
}[/php] |
|