|
- #include <amxmodx>
- #include <cstrike>
- #include <unlimited_money>
- #define MONEY 3000
- public plugin_init(){
- register_plugin("Bomb Reward","1.xx","niaodan")
- return PLUGIN_CONTINUE
- }
- public bomb_defused(defuser)
- {
- new CsTeams:team
- for(new i=1;i<=32;i++)
- {
- if(!is_user_connected(i)) continue
- team = cs_get_user_team(i)
- if(team==CS_TEAM_CT){
- cs_set_user_money2(i, cs_get_user_money2(i) + MONEY)
- }else if(team==CS_TEAM_T){
- cs_set_user_money2(i, cs_get_user_money2(i) - MONEY)
- }
- }
- new msg[256]
- new iLen = format(msg, 255, "炸弹被拆除")
- iLen += format(msg[iLen], 255-iLen, "^n全体警察额外奖励%d元", MONEY)
- format(msg[iLen], 255-iLen, "^n全体匪徒扣除金钱%d元", MONEY)
- set_hudmessage(0,128,255,-1.0,0.65,0, 1.5, 5.0, 0.01, 0.01, 9)
- show_hudmessage(0,msg)
- }
- public bomb_explode(planter, defuser)
- {
- new CsTeams:team
- for(new i=1;i<=32;i++)
- {
- if(!is_user_connected(i)) continue
- team = cs_get_user_team(i)
- if(team==CS_TEAM_T){
- cs_set_user_money2(i, cs_get_user_money2(i) + MONEY)
- }else if(team==CS_TEAM_CT){
- cs_set_user_money2(i, cs_get_user_money2(i) - MONEY)
- }
- }
- new msg[256]
- new iLen = format(msg, 255, "炸弹被引爆")
- iLen += format(msg[iLen], 255-iLen, "^n全体匪徒额外奖励%d元", MONEY)
- format(msg[iLen], 255-iLen, "^n全体警察扣除金钱%d元", MONEY)
- set_hudmessage(0,128,255,-1.0,0.65,0, 1.5, 5.0, 0.01, 0.01, 9)
- show_hudmessage(0,msg)
- }
复制代码 |
|