|
发表于 2006-6-17 07:25:15
|
显示全部楼层
来自 中国–上海–上海
回复: ahcat 版主能不能将这个完成呀!加个显示彩色信息就行了!谢谢了!
Post by AE86
呵呵,我想没这个必要了,
我今天测试到此插件的一个BUG,希望能修复。
BUG:玩家开局第1个自杀也会当作第一个杀人来奖励奖励:cold: :sweat:
笑死我了。快啊快啊,我急用嘻嘻:D
- #include <amxmodx>
- #include <cstrike>
- new g_round
- public plugin_init(){
- register_plugin("First Shot","1.0","ahcat")
- register_event("DeathMsg", "hook_death", "a")
- register_logevent("hook_roundstart",2,"0=World triggered","1=Round_Start")
- g_round = 0
- }
- public hook_death(){
- if (g_round!=0)
- return PLUGIN_HANDLED
- new Killer = read_data(1)
- new Victim = read_data(2)
- [color="Red"]if(Killer==Victim)
- return PLUGIN_HANDLED[/color]
- cs_set_user_money(Killer,cs_get_user_money (Killer)+2000)
- new p_name[32]
- get_user_name(Killer,p_name,31)
- set_hudmessage(255, 255, 255, -1.0, 0.5, 0, 0.1, 0.1, 0.1, 6.0, 1)
- show_hudmessage(0, "%s 第一局第一个杀人奖励1000000",p_name)
- g_round = 1
- return PLUGIN_HANDLED
- }
- public hook_roundstart(){
- g_round = 0
- }
复制代码 |
|