|
发表于 2008-9-13 01:20:45
|
显示全部楼层
来自 中国–广东–惠州
回复: 帮改一下放包奖励的插件!有别于论坛的!
[php]
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#include <csx>
#define PLUGIN_NAME "Bomb Game"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "Apocalyptic"
public plugin_init()
{
register_plugin(PLUGIN_NAME, PLUGIN_VERSION, PLUGIN_AUTHOR);
}
//放置炸弹事件
public bomb_planted(planter)
{
new name[32];
get_user_name(planter,name,31);
cs_set_user_money(planter,cs_get_user_money(planter)+5000,1)
set_hudmessage(49,179,113,-1.0,0.65,0, 0.01, 20.0, 0.01, 0.2, 4)
show_hudmessage(0,"%s放包成功,奖励$5000元",name)
}
//拆除炸弹事件
public bomb_defused(defuser)
{
cs_set_user_money(defuser,cs_get_user_money(defuser)+5000,1)
for (new i=1;i<=32;i++)
{
if (is_user_connected(i) && cs_get_user_team(i)==CS_TEAM_CT)
{
cs_set_user_money(i,cs_get_user_money(i)+3000,1)
}
}
new name[32],iLen=0,msg[256];
get_user_name(defuser,name,31);
iLen = format(msg, 255, "%s拆包成功,奖励$5000元^n^n",name)
iLen = format(msg[iLen], 255-iLen, "炸弹被拆除")
iLen += format(msg[iLen], 255-iLen,"========== ============")
iLen += format(msg[iLen], 255-iLen, "^n全体警察额外奖励%d元 全体匪徒扣除金钱%d元", 5000, 5000)
set_hudmessage(49,179,113,-1.0,0.50,0, 0.01, 20.0, 0.01, 0.2, 4)
show_hudmessage(0,msg)
}
//炸弹爆炸事件
public bomb_explode(planter,defuser)
{
for (new i=1;i<=32;i++)
{
if (is_user_connected(i) && cs_get_user_team(i)==CS_TEAM_T)
{
cs_set_user_money(i,cs_get_user_money(i)+3000,1)
}
}
new msg[256]
new iLen = format(msg, 255, "炸弹被引爆")
iLen += format(msg[iLen], 255-iLen,"========== ============")
iLen += format(msg[iLen], 255-iLen, "^n全体匪徒额外奖励%d元 全体警察扣除金钱%d元", 5000,5000)
set_hudmessage(49,179,113,-1.0,0.65,0, 0.01, 20.0, 0.01, 0.2, 4)
show_hudmessage(0,msg)
}
[/php] |
|