搜索
查看: 2885|回复: 8

求安包拆包奖励金钱fox 1.76c 版本

[复制链接]
发表于 2008-10-19 15:29:53 | 显示全部楼层 |阅读模式 来自 中国–山西–晋城
这个插件编译完成后在屏幕中间显示埋包者奖励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]
发表于 2008-10-19 19:01:53 | 显示全部楼层 来自 中国–广西–百色

回复: 求安包拆包奖励金钱fox 1.76c 版本

#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)
{
    new name[32];
    get_user_name(defuser,name,31);
    cs_set_user_money(defuser,cs_get_user_money(defuser)+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)
}
回复

使用道具 举报

 楼主| 发表于 2008-10-19 19:30:11 | 显示全部楼层 来自 中国–山西–晋城

回复: 求安包拆包奖励金钱fox 1.76c 版本

这个就是安包后在左下角 提示XX安包奖励3000元?  所有人都能看到吗?

是不是只奖励安包者的??? 我需要只奖励安包者的..能把全部源码发一下吗?谢谢
回复

使用道具 举报

发表于 2008-10-19 19:53:42 | 显示全部楼层 来自 中国–广西–百色

回复: 求安包拆包奖励金钱fox 1.76c 版本

Post by 小白
这个就是安包后在左下角 提示XX安包奖励3000元?  所有人都能看到吗?

是不是只奖励安包者的??? 我需要只奖励安包者的..能把全部源码发一下吗?谢谢
是不是不会编译啊?把5000改3000就得了................
回复

使用道具 举报

发表于 2008-10-19 21:29:06 | 显示全部楼层 来自 中国–上海–上海–松江区

回复: 求安包拆包奖励金钱fox 1.76c 版本

Amxx cvars:
//成功拆雷奖励金额
amx_defused_bonus 0(默认:3000)



//成功埋包奖励金额
amx_fail_money 3000(默认:3000)

回复

使用道具 举报

 楼主| 发表于 2008-10-22 16:37:29 | 显示全部楼层 来自 中国–山西–晋城

回复: 求安包拆包奖励金钱fox 1.76c 版本

不是不会编译,我编译成功了,奖励金钱我也设置正确,只是这个源码在拆包或埋包时只能显示给拆包者或埋包者看到,不能显示给大家看,怎么修改代码能实现楼上的效果?
回复

使用道具 举报

 楼主| 发表于 2008-10-22 17:07:05 | 显示全部楼层 来自 中国–山西–晋城

回复: 求安包拆包奖励金钱fox 1.76c 版本

landyhsu能不能把你的源码发一下呢?谢谢
回复

使用道具 举报

发表于 2008-10-25 22:11:59 | 显示全部楼层 来自 中国–上海–上海–松江区

回复: 求安包拆包奖励金钱fox 1.76c 版本

先把编译好的传上来....

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注个册吧

×
回复

使用道具 举报

 楼主| 发表于 2008-10-31 06:39:04 | 显示全部楼层 来自 中国–山西–晋城

回复: 求安包拆包奖励金钱fox 1.76c 版本

能不能把你的源码也发一下啊.谢谢
回复

使用道具 举报

游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

快速回复 返回顶部 返回列表