这个插件编译完成后在屏幕中间显示埋包者奖励XX元,但是只有安包者才能看到?能不能实现所有人看到信息" XXX埋包成功,奖励XX元" 最好显示在屏幕左下用蓝色字体!只奖励埋包者指定金钱不奖励其它队友也不扣CT金钱!
[PHP]/* AMX MOD X Script
* Author: Hydralisk
* Date: 7.25.2005
* The plugin will give money to the player who plant or defuse the bomb.
* Cvars:
* hy_prize 0/1 Turn off/on the plugin.
* hy_prize_defuse <money> Set the prize for defusing the bomb.
* hy_prize_plant <money> Set the prize for planting the bomb.
* life-rest required
* Credits:
* War3FT (For the logevent)
*/
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
public plugin_init(){
register_plugin("Plant Defuse Prize","0.1","Hydralisk")
register_cvar("hy_prize_defuse","1000")
register_cvar("hy_prize_plant","1000")
register_logevent("det_plant",3,"1=triggered")
return PLUGIN_CONTINUE
}
public det_plant(){
new sArg[64], sAction[64]
new sName[64]
new id, iUserId
read_logargv(0,sArg,64)
read_logargv(2,sAction,64)
parse_loguser(sArg,sName,64,iUserId)
id = find_player("k",iUserId)
if (!id) return PLUGIN_CONTINUE
new money = cs_get_user_money(id)
if (equal(sAction,"Planted_The_Bomb")) {
money += get_cvar_num("hy_prize_plant")
cs_set_user_money(id,money <= 16000 ? money : 16000)
set_hudmessage(255,0,0,-1.0,-0.45,1,6.0,10.0,1.3,0.7,11)
show_hudmessage(id," *** 玩家放包成功,奖励金钱: %d***",get_cvar_num("hy_prize_plant"))
}
else if (equal(sAction,"Defused_The_Bomb")) {
money += get_cvar_num("hy_prize_defuse")
cs_set_user_money(id,money <= 16000 ? money : 16000)
set_hudmessage(255,0,0,-1.0,-0.45,1,6.0,10.0,1.3,0.7,11)
show_hudmessage(id," *** 玩家拆包成功,奖励金钱: %d***",get_cvar_num("hy_prize_defuse"))
}
return PLUGIN_CONTINUE
}[/PHP] |