|
楼主 |
发表于 2008-6-12 20:20:54
|
显示全部楼层
来自 中国–广东–深圳
回复: 请求帮忙
Post by OMG
可以了,我用LANDYHSU发的AMXX可以了,我给金钱插件又重新编译了一次,但源码我的编译器编译不了,再次谢谢你们!
下面这个插件也是一样加上#include <unlimited_money>
将插件里的函数改成cs_get_user_money2也是不行
/* 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>
#include <unlimited_money>
public plugin_init(){
register_plugin("Plant Defuse Prize","0.1","Hydralisk")
register_cvar("hy_prize_defuse","5000")
register_cvar("hy_prize_plant","5000")
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_money2(id)
if (equal(sAction,"Planted_The_Bomb")) {
money += get_cvar_num("hy_prize_plant")
cs_set_user_money2(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_money2(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
} |
|