|
发表于 2012-6-18 02:57:45
|
显示全部楼层
来自 中国–香港
本帖最后由 biscuit628 于 2012-6-18 19:24 编辑
#include <amxmodx>
#include <amxmisc>
#include <cstrike>
#define HUDS_DELAY 7.0
#define HUD_COLOR_RED 220
#define HUD_COLOR_GREEN 80
#define HUD_COLOR_BLUE 0
#define HUD_LOC_X 1.0
#define HUD_LOC_Y 0.30
new MONEY,p_immunity_level
public plugin_init()
{
register_plugin("MONEYFRIST","1.0","KIN")
/* 为金钱创建一个变量 */
MONEY = register_cvar("round_money","16000")
/* 语言类型选择文本 */
register_dictionary("money.txt")
/* 局数限定 */
register_logevent("new_round", 2, "1=Round_Start")
p_immunity_level = register_cvar("immunity_level","c")//kick權限
}
public new_round()
{
new players[32], playerCount, i, player, pMoney;
pMoney = get_pcvar_num(MONEY)
get_players(players,playerCount);
for(i=0;i<playerCount;i++)
{
player = players;
if(get_user_flags(player) & get_immunity_level_flag() &&cs_get_user_money(player) < pMoney)
{
cs_set_user_money(player, pMoney);
/* 给予玩家金钱时提示玩家 */
set_hudmessage(HUD_COLOR_RED, HUD_COLOR_GREEN, HUD_COLOR_BLUE, HUD_LOC_X, HUD_LOC_Y, 1, 3.0, HUDS_DELAY, 0.0, 1.0, 5)
show_hudmessage(player,"%L",LANG_PLAYER,"MONEY_FRIST",pMoney)
}
}
}
public get_immunity_level_flag()
{
new flags[24]
get_pcvar_string(p_immunity_level, flags, 23)
return(read_flags(flags))
} |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注个册吧
×
|