|
楼主 |
发表于 2008-9-13 18:27:03
|
显示全部楼层
来自 中国–广东–中山
回复: 帮改一下放包奖励的插件!有别于论坛的!
我改了, 有4个错误!
[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(85, 62, 210, 0.03, 0.85, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_hudmessage(0,"%s成功放置炸弹,奖励$5000元",name)
}
//拆除炸弹事件
public bomb_defused(defuser)
{ new name[32];
get_user_name(defuser,name,31);
cs_set_user_money(defuser,cs_get_user_money(defuser)+5000,1)
set_hudmessage(85, 62, 210, 0.03, 0.85, 0, 6.0, 6.0, 0.5, 0.15, 3)
show_hudmessage(0,"%s成功拆除炸弹,奖励$5000元",name)
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 msg[256]
new iLen = format(msg, 255,"炸弹被拆除^================^全体警察额外奖励%d元",3000)
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, "炸弹被引爆^================^全体匪徒额外奖励%d元",3000)
set_hudmessage(49,179,113,-1.0,0.65,0, 0.01, 20.0, 0.01, 0.2, 4)
show_hudmessage(0,msg)
} |
|