会修改源码的进cs 1.5 的东西 发钱的

社区服务
高级搜索
猴岛论坛CSGO反恐精英CS个性化修改专区会修改源码的进cs 1.5 的东西 发钱的
发帖 回复
倒序阅读 最近浏览的帖子最近浏览的版块
4个回复

会修改源码的进cs 1.5 的东西 发钱的

楼层直达
safelanding

ZxID:11617637

等级: 列兵
举报 只看楼主 使用道具 楼主   发表于: 2011-07-01 0
  我把源码发上来 会的修改下 QQ联系 1003845537 好了COOL 我  啊



Changelog::
* 2006-09-19: 增加可以踢同队人掉的球功能
* 2006-09-25: 增加可以玩家发钱功能,连按[G]丢木仓键两次

* 2007-01-14: 1:重新设计插件工作流程
              2:自己不可以捡回自己发的钱

v1.0 finish on 04/25/2010, at 12:00 pm
*/

#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <cstrike>
#include <xs>

//#define IN_USE_BUTTON

//#define UNLIMITED_MONEY

#if defined UNLIMITED_MONEY
#include <money_ul>
#endif

#define KILLERID 1
#define VICTIMID 2
#define CLASSNAME "Ent_Money"

//Some file must be loaded
#define BALLMODEL "models/money/ball5.mdl"
#define MONEYMODEL "models/money/money_bag1.mdl"
#define BILLMODEL "models/money/money_us2.mdl"
#define BEAMSPR "sprites/laserbeam.spr"
#define BALLTOUCH "misc/bounce.wav"

//Model size
#define MAXSIZE Float:{15.0, 15.0, 12.0}
#define MINSIZE Float:{-15.0, -15.0, 0.0}

/*Menu*/
#define MENUNUM 3
#define MENUTITLE "\y选择丢钱的数量:"
#define MENUBODY "%d~%d\R\yLv %i"

//Print color text
#define GREY 33

#define SELECTMSG        "^x01* [^x04老友记^x01] ^x03你要丢钱的数量^x04$%d^x03到^x04$%d^x03.^x04换刀后连按^x03G^x04键丢钱^x01."
#define PICKUPMSG        "^x01* [^x04老友记^x01] ^x04发财啦!^x03%s^x01好运捡到^x04$%d."
#define MUCHMONEYMSG        "^x01* [^x04老友记^x01] ^x03地图已经有^x04太多钱了."
#define NOENOUGHMONEYMSG    "^x01* [^x04老友记^x01] ^x03你^x04无法^x03 丢钱了,^x01除非你有超过^x04%d^x01的钱."
#define BALLMSG            "^x01* [^x04老友记^x01] ^x03%s^x01丢了一个足球,^x03价值^x04$%d."

#define IsPlayer(%1) (1 <= %1 <= g_iMaxPlayers)
//the pointer of cvar
new g_pCvarDropBall, g_pCvarBallCount, g_pCvarBillCount, g_pCvarDrop, g_pCvarDropLest, g_pCvarDropMoneyLevel, g_pCvarPickUpDelay

new Float:g_PressTime[33]

new g_BeamSpr,    g_iMaxPlayers, g_BallCount, g_BillCount, iMenu

//Beam of team color
new g_TeamColors[CsTeams][3] = {
    "",
    {255, 10, 10},
    {10, 10, 255},
    ""
}

new g_DropMoneyMax[33], g_DropMoneyMin[33]

new g_pCmoney[64], g_NumMoney[5][7]

new bool:g_bPickUp[33]

public plugin_precache() {
    precache_model(BALLMODEL)
    precache_model(MONEYMODEL)
    precache_model(BILLMODEL)
    precache_sound(BALLTOUCH)
    precache_sound("misc/gotball.wav")
    precache_sound("misc/tips_msg.wav")
    precache_sound("buttons/button9.wav")
    g_BeamSpr = precache_model(BEAMSPR)
}

public plugin_init() {
    register_plugin("Drops money", "2.0", "iG_os")
    //Register Events
    register_event("DeathMsg", "EventDeathMsg", "a")
    register_event("CurWeapon", "EventCurWeapon", "be", "1=1")
    register_event("HLTV", "EventNewRound", "a", "1=0", "2=0")
   
    register_touch(CLASSNAME, "player", "TouchEnt")
   
    //from kickball
    register_touch(CLASSNAME, "worldspawn",        "TouchEnt")
    register_touch(CLASSNAME, "func_wall",        "TouchEnt")
    register_touch(CLASSNAME, "func_door",        "TouchEnt")
    register_touch(CLASSNAME, "func_door_rotating",    "TouchEnt")
    register_touch(CLASSNAME, "func_wall_toggle",        "TouchEnt")
    register_touch(CLASSNAME, "func_breakable",        "TouchEnt")
   
    //Register client commands
    register_clcmd("drop", "HookDrop")
    //register_clcmd("say /sm", "ShowMenu")
    //register_clcmd("say_team /sm", "ShowMenu")
    //register_clcmd("say /help", "HelpMotd")
    //register_clcmd("say_team /help", "HelpMotd")
    //register_concmd("amx_sm", "SetMoney", 0, "-- <min num> <max num> set the hand out money num")
   
    g_iMaxPlayers = get_maxplayers()
    g_BallCount = 0
    g_BillCount = 0
   
    //Register Cvars
    g_pCvarDropBall =
    register_cvar("drop_ballmoney", "1000")
    g_pCvarBallCount =
    register_cvar("drop_ballcount", "100")
    g_pCvarBillCount =
    register_cvar("drop_billcount", "100")
    g_pCvarDrop =
    register_cvar("drop_drop", "3000")
    g_pCvarDropLest =
    register_cvar("drop_droplest", "1000")
    g_pCvarDropMoneyLevel =
    register_cvar("drop_dropmoneylevel", "1000 2000 3000 4000 5000")
    g_pCvarPickUpDelay =
    register_cvar("drop_pickupdelay", "2.0")
   
    get_pcvar_string(g_pCvarDropMoneyLevel, g_pCmoney, charsmax(g_pCmoney))
    parse(g_pCmoney, g_NumMoney[0], charsmax(g_NumMoney[]),
            g_NumMoney[1], charsmax(g_NumMoney[]),
            g_NumMoney[2], charsmax(g_NumMoney[]),
            g_NumMoney[3], charsmax(g_NumMoney[]),
            g_NumMoney[4], charsmax(g_NumMoney[]))
}

public HookDrop(id) {
    if (get_user_weapon(id) == CSW_KNIFE && is_user_alive(id)) {
        static Float:fGameTime, iHandMoney, iEnt, iMoney
        static Float:fOrigin[3], Float:fVelocity[3], Float:fVelo[3]
        fGameTime = get_gametime()
        iMoney = cs_get_user_money(id)
       
        if (fGameTime - g_PressTime[id] < get_gametime()) {        //press twice 'G' code made by Connor, and I make a few diffrence here
            g_PressTime[id] = 0.0
            iHandMoney = random_num(g_DropMoneyMin[id], g_DropMoneyMax[id])
           
            if (g_BillCount > get_pcvar_num(g_pCvarBillCount)) {
                print_color(id, GREY, MUCHMONEYMSG)
                        client_cmd(id,"spk misc/tips_msg")
                return PLUGIN_HANDLED
            }
            if (iMoney < g_DropMoneyMin[id]) {
                print_color(id, GREY, NOENOUGHMONEYMSG, g_DropMoneyMin[id])
                        client_cmd(id,"spk misc/tips_msg")
                return PLUGIN_HANDLED
            }
           
            entity_get_vector(id, EV_VEC_origin, fOrigin)
            entity_get_vector(id, EV_VEC_velocity, fVelo)
            velocity_by_aim(id, 450, fVelocity)
            fVelocity[0] += fVelo[0]
            fVelocity[1] += fVelo[1]
            fVelocity[2] = 0.0
           
            fVelocity[0] += random_float(-100.0, 100.0)
            fVelocity[1] += random_float(-100.0, 100.0)
           
            iEnt = create_entity("info_target")
            entity_set_string(iEnt, EV_SZ_classname, CLASSNAME)
            entity_set_vector(iEnt, EV_VEC_origin, fOrigin)
            entity_set_vector(iEnt, EV_VEC_velocity, fVelocity)
            entity_set_model(iEnt, BILLMODEL)
            entity_set_int(iEnt, EV_INT_solid, SOLID_TRIGGER)
            entity_set_int(iEnt, EV_INT_movetype, MOVETYPE_TOSS)
            entity_set_int(iEnt, EV_INT_iuser2, iHandMoney)
            entity_set_float(iEnt, EV_FL_fuser1, get_gametime())
            g_BillCount++
           
            static param[4], iOrigin[3]
            FVecIVec(fOrigin, iOrigin)
            param[0] = iEnt
            param[1] = iOrigin[0]
            param[2] = iOrigin[1]
            param[3] = iOrigin[2]
            set_task(0.2, "ResetSize", _, param, 4)
           
            cs_set_user_money(id, iMoney - iHandMoney)
           
                emit_sound(id,CHAN_STREAM,"misc/gotball.wav", 1.0, ATTN_NORM, 0, PITCH_NORM)
        }else {
            g_PressTime[id] = fGameTime
        }
        return PLUGIN_HANDLED
    }
    return PLUGIN_CONTINUE
}

public SetMoney(id, level, cid) {
   
    if (!cmd_access(id, level, cid, 3))
        return PLUGIN_HANDLED
    static szMinNum[8], szMaxNum[8]
    read_argv(1, szMinNum, charsmax(szMinNum))
    read_argv(2, szMaxNum, charsmax(szMaxNum))
   
    g_DropMoneyMax[id] = str_to_num(szMaxNum)
    g_DropMoneyMin[id] = str_to_num(szMinNum)
    return PLUGIN_HANDLED
}

public DropMoneyCheck(ammount){
    static iDropControl
    new iDropLest = get_pcvar_num(g_pCvarDropLest)
    if(iDropLest<1000)
    {
        iDropLest = 1000
        set_pcvar_num(g_pCvarDropLest, 1000)
    }
    if(ammount>=iDropLest)
    {
        new iDropMoney = get_pcvar_num(g_pCvarDrop)
        if(iDropMoney<iDropLest+1000)
        {
            iDropMoney = iDropLest
            set_pcvar_num(g_pCvarDrop, iDropMoney)
        }
        iDropControl=random_num(0, iDropMoney)
        if(ammount>=iDropControl)
            return random_num(3,7)*random_num(4,8)*random_num(5,10)
        else
            return 0
    }
    return 0
}

public EventDeathMsg() {
    new iKiller = read_data(KILLERID)
    new iVictim = read_data(VICTIMID)
   
    new iVmoney = cs_get_user_money(iVictim)
    new CsTeams:iVicTeam = cs_get_user_team(iVictim)
    if (!iKiller || iKiller == iVictim)
        return PLUGIN_CONTINUE
   
    if (cs_get_user_team(iKiller) == cs_get_user_team(iVictim))
        return PLUGIN_CONTINUE
    static szName[32]
    get_user_name(iVictim, szName, charsmax(szName))
    static Float:fOrigin[3], Float:fVelocity[3]
    new iDropPrec = DropMoneyCheck(iVmoney)
    if (iDropPrec > 0){
        new iDropMoney = iVmoney*iDropPrec/1000
        new iEntMoney = iDropMoney*80/100
        new iEnt = create_entity("info_target")
       
        cs_set_user_money(iVictim, iVmoney - iDropMoney)
        entity_get_vector(iVictim, EV_VEC_origin, fOrigin)
        entity_get_vector(iVictim, EV_VEC_velocity, fVelocity)
       
        fVelocity[0] += random_float(-100.0, 100.0)
        fVelocity[1] += random_float(-100.0, 100.0)
        fVelocity[2] += random_float(-100.0, 100.0)
       
        entity_set_string(iEnt, EV_SZ_classname, CLASSNAME)
        entity_set_vector(iEnt, EV_VEC_origin, fOrigin)
        entity_set_vector(iEnt, EV_VEC_velocity, fVelocity)
        entity_set_int(iEnt, EV_INT_iuser2, iEntMoney)
        entity_set_float(iEnt, EV_FL_fuser1, get_gametime())
        entity_set_int(iEnt, EV_INT_solid, SOLID_TRIGGER)
        beam(iEnt, g_TeamColors[iVicTeam])
       
        if (iDropMoney > get_pcvar_num(g_pCvarDropBall) && g_BallCount < get_pcvar_num(g_pCvarBallCount)) {
            static Float:fVelo[3], Float:fUserVelo[3]
            entity_set_model(iEnt, BALLMODEL)
            entity_set_int(iEnt, EV_INT_movetype, MOVETYPE_BOUNCE)
            fVelo[0] += fUserVelo[0]
            fVelo[1] += fUserVelo[1]
            fVelo[2] += fUserVelo[2] + 250.0
            entity_set_vector(iEnt, EV_VEC_velocity, fVelo)
            entity_set_int(iEnt,EV_INT_team, _:iVicTeam)
            entity_set_int(iEnt, EV_INT_iuser3, 1)
            entity_set_int(iEnt, EV_INT_sequence, 2) // set ball model movement
            entity_set_float(iEnt, EV_FL_animtime, 1.0) // set ball movement speed
            entity_set_float(iEnt, EV_FL_framerate, 1.0) // set ball frame rate
            g_BallCount++
            switch (iVicTeam) {
                case CS_TEAM_CT:{
                    set_rendering(iEnt, kRenderFxGlowShell, 10, 10, 250, kRenderNormal, 15)
                }case CS_TEAM_T:{
                    set_rendering(iEnt, kRenderFxGlowShell, 250, 10, 10, kRenderNormal, 15)
                }
            }
            print_color(0, iVictim, BALLMSG, szName, iDropMoney)
        }else {
           
            entity_set_int(iEnt, EV_INT_iuser3, 0)
            entity_set_model(iEnt, MONEYMODEL)
            entity_set_int(iEnt, EV_INT_movetype, MOVETYPE_TOSS)
           
            g_BillCount++
        }
       
        static param[4], iOrigin[3]
        FVecIVec(fOrigin, iOrigin)
        param[0] = iEnt
        param[1] = iOrigin[0]
        param[2] = iOrigin[1]
        param[3] = iOrigin[2]
        set_task(0.2, "ResetSize", _, param, 4)
    }
    return PLUGIN_CONTINUE
}

public ResetSize(param[]) {
    new iEnt = param[0]
    if (!is_valid_ent(iEnt))    return
    static iOldOrigin[3], iNewOrigin[3], Float:fNewOrigin[3]
    iOldOrigin[0] = param[1]
    iOldOrigin[1] = param[2]
    iOldOrigin[2] = param[3]
    entity_get_vector(iEnt, EV_VEC_origin, fNewOrigin)
    FVecIVec(fNewOrigin, iNewOrigin)
    if (get_distance(iOldOrigin, iNewOrigin) > 0) {
        param[0] = iEnt
        param[1] = iNewOrigin[0]
        param[2] = iNewOrigin[1]
        param[3] = iNewOrigin[2]
        set_task(0.2, "ResetSize", _, param, 4)
    }else entity_set_size(iEnt, MINSIZE, MAXSIZE)
}

public PickUpDelay(id)    g_bPickUp[id] = true

public TouchEnt(iEnt, iToucher) {
    if (is_valid_ent(iEnt)) {
        static CsTeams:iPlayerTeam, iEntTeam
        iEntTeam = entity_get_int(iEnt, EV_INT_team)
       
        static Float:fDropTime, szName[32], iEntMoney, iPlayerMoney
        fDropTime = entity_get_float(iEnt, EV_FL_fuser1)
        iEntMoney = entity_get_int(iEnt, EV_INT_iuser2)
       
        if (get_gametime() - fDropTime < 0.5)
            return
       
        if ( iEntTeam && entity_get_int(iEnt, EV_INT_iuser3)) {//ball
            static Float:fVelo[3], Float:fUserVelo[3]
            entity_get_vector(iToucher, EV_VEC_velocity, fUserVelo)
           
            if (IsPlayer(iToucher)) {
                iPlayerTeam = cs_get_user_team(iToucher)
                iPlayerMoney = cs_get_user_money(iToucher)
               
                if (iEntTeam == _:iPlayerTeam) {
                    #if defined IN_USE_BUTTON
                    if (entity_get_int(iToucher, EV_INT_button) & IN_USE) {
                    #endif
                        //static Float:fAngle[3]
                        //entity_get_vector(iToucher, EV_VEC_v_angle, fAngle)
                        velocity_by_aim(iToucher, 300, fVelo)
                        fVelo[0] += fUserVelo[0]
                        fVelo[1] += fUserVelo[1]
                        fVelo[2] += fUserVelo[2] + 250.0
                        entity_set_vector(iEnt, EV_VEC_velocity, fVelo)
                        //entity_set_vector(iEnt, EV_VEC_v_angle, fAngle)
                        entity_set_float(iEnt, EV_FL_scale, 0.5)
                        entity_set_int(iEnt, EV_INT_sequence, 2) // set ball model movement
                        entity_set_float(iEnt, EV_FL_animtime, 1.0) // set ball movement speed
                        entity_set_float(iEnt, EV_FL_framerate, 1.0) // set ball frame rate
                        beam(iEnt, g_TeamColors[iPlayerTeam])
                    #if defined IN_USE_BUTTON
                    }
                    #endif
                    //emit_sound(iEnt, CHAN_ITEM, BALLTOUCH, 1.0, ATTN_NORM, 0, PITCH_NORM)
                }
                else {
                    if (g_bPickUp[iToucher]) {
                        get_user_name(iToucher, szName, charsmax(szName))
                        g_bPickUp[iToucher] = false
                        set_task(get_pcvar_float(g_pCvarPickUpDelay), "PickUpDelay", iToucher)//make a few delay
                        cs_set_user_money(iToucher, iPlayerMoney + iEntMoney)
                       
                        print_color(0, iToucher, PICKUPMSG, szName, iEntMoney)
                       
                                client_cmd(iToucher,"spk buttons/button9")
                       
                        remove_entity(iEnt)
                        g_BallCount--
                    }
                }
            }
            else {
                static Float:fEntVelo[3]
                entity_get_vector(iEnt, EV_VEC_velocity, fEntVelo)
                xs_vec_mul_scalar(fEntVelo, 0.85, fEntVelo)
                //client_print(0, print_center, "%i", get_speed(iEnt))
                entity_set_vector(iEnt, EV_VEC_velocity, fEntVelo)
                entity_set_float(iEnt, EV_FL_scale, 0.5)
                entity_set_int(iEnt, EV_INT_sequence, (get_speed(iEnt) <= 30) ? 3:2) // set ball model movement
                entity_set_float(iEnt, EV_FL_animtime, 1.0) // set ball movement speed
                entity_set_float(iEnt, EV_FL_framerate, 1.0) // set ball frame rate
                if (get_speed(iEnt) >= 30)emit_sound(iEnt, CHAN_ITEM, BALLTOUCH, 1.0, ATTN_NORM, 0, PITCH_NORM)
            }
           
        }
        else {
            if (IsPlayer(iToucher)) {
                iPlayerMoney = cs_get_user_money(iToucher)
                if (g_bPickUp[iToucher]) {
                    g_bPickUp[iToucher] = false
                    get_user_name(iToucher, szName, charsmax(szName))
                    set_task(get_pcvar_float(g_pCvarPickUpDelay), "PickUpDelay", iToucher)//make a few delay
                    cs_set_user_money(iToucher, iPlayerMoney + iEntMoney)
                   
                    print_color(0, iToucher, PICKUPMSG, szName, iEntMoney)
                   
                            client_cmd(iToucher,"spk buttons/button9")
                   
                    remove_entity(iEnt)
                    g_BillCount--
                }
            }
        }
    }
}

public EventNewRound() {
    new iEnt = -1
    while ((iEnt = find_ent_by_class(iEnt, CLASSNAME)) != 0) {
        //remove_entity(iEnt)
        g_BallCount = 0
        g_BillCount = 0
    }
}

//For hand out money code
public EventCurWeapon(id) {
    if (read_data(2) == CSW_KNIFE) {
        g_PressTime[id] = 0.0
    }
    else g_PressTime[id] = get_gametime()
    return PLUGIN_CONTINUE
}

public client_putinserver(id) {
    remove_task(id)
   
    g_DropMoneyMax[id] = str_to_num(g_NumMoney[1])
    g_DropMoneyMin[id] = str_to_num(g_NumMoney[0])
   
    g_bPickUp[id] = true
   
    /*if (is_user_connected(id)) {
        set_task(5.0, "ShowMenu", id)
    }*/
    return PLUGIN_CONTINUE
}

public ShowMenu(id) {
    iMenu = menu_create(MENUTITLE, "SetMoneyMenuHandle")
    static szMenuBody[4][127], x, num[8]
    for (x = 0; x <= MENUNUM; x++)  {
        format(szMenuBody[x], charsmax(szMenuBody[]), MENUBODY, str_to_num(g_NumMoney[x]), str_to_num(g_NumMoney[x+1]), x+1)
        num_to_str(x+1, num, 7)
        menu_additem(iMenu, szMenuBody[x], num)
    }
    menu_setprop(iMenu, MPROP_EXIT, MEXIT_ALL)
    menu_display(id, iMenu)
    return PLUGIN_CONTINUE
}

public SetMoneyMenuHandle(id, iMenu, item) {
    static iData[6], szName[32], iAccess, iCallBack, iKey
    if (item == MENU_EXIT) {
        menu_destroy(iMenu)
        return PLUGIN_HANDLED
    }
    menu_item_getinfo(iMenu, item, iAccess, iData, charsmax(iData), szName, charsmax(szName), iCallBack)
    iKey = str_to_num(iData)
   
    switch (iKey) {
        case 1:{
            g_DropMoneyMax[id] = str_to_num(g_NumMoney[1])
            g_DropMoneyMin[id] = str_to_num(g_NumMoney[0])
            print_color(id, GREY, SELECTMSG, g_DropMoneyMin[id], g_DropMoneyMax[id])
            return PLUGIN_HANDLED
        }
        case 2:{
            g_DropMoneyMax[id] = str_to_num(g_NumMoney[2])
            g_DropMoneyMin[id] = str_to_num(g_NumMoney[1])
            print_color(id, GREY, SELECTMSG, g_DropMoneyMin[id], g_DropMoneyMax[id])
            return PLUGIN_HANDLED
        }
        case 3:{
            g_DropMoneyMax[id] = str_to_num(g_NumMoney[3])
            g_DropMoneyMin[id] = str_to_num(g_NumMoney[2])
            print_color(id, GREY, SELECTMSG, g_DropMoneyMin[id], g_DropMoneyMax[id])
            return PLUGIN_HANDLED
        }
        case 4:{
            g_DropMoneyMax[id] = str_to_num(g_NumMoney[4])
            g_DropMoneyMin[id] = str_to_num(g_NumMoney[3])
            print_color(id, GREY, SELECTMSG, g_DropMoneyMin[id], g_DropMoneyMax[id])
            return PLUGIN_HANDLED
        }
    }
    menu_destroy(iMenu)
    return PLUGIN_HANDLED
}

public HelpMotd(id) {
    static szMessage[2048], iLen
    iLen = format(szMessage, charsmax(szMessage),"<body bgcolor=#000000><font color=#87cefa><pre>");
   
    iLen += format(szMessage[iLen], charsmax(szMessage)-iLen, "<center><h2><font color=^"red^"> Kill Money Ball help </font></h2></center>")
    iLen += format(szMessage[iLen], charsmax(szMessage)-iLen, "<left><font color=^"white^"><B>Type /sm can get the menu of hand out money level. </B></color></left>^n")
    iLen += format(szMessage[iLen], charsmax(szMessage)-iLen, "<left><font color=^"white^"><B>Use 'amx_sm' in the console can set the level of hand out money as you like. </B></color></left>^n")
   
    iLen += format(szMessage[iLen], charsmax(szMessage)-iLen, "<center><h2><font color=^"red^"> Plugin Description: </font></h2></center>")
    iLen += format(szMessage[iLen], charsmax(szMessage)-iLen, "<left><h4><font color=^"blue^"> Ball Part: </font></h4></left>")
    iLen += format(szMessage[iLen], charsmax(szMessage)-iLen, "<left><font color=^"white^"><B>With this plugin, will spawn a ball when some one was killed. </B></color></left>^n")
    iLen += format(szMessage[iLen], charsmax(szMessage)-iLen, "<left><font color=^"white^"><B>And the ball will set few money and team index from the victim in it. </B></color></left>^n")
    iLen += format(szMessage[iLen], charsmax(szMessage)-iLen, "<left><font color=^"white^"><B>When player who team index is equali the balls touch the ball, </B></color></left>^n")
    iLen += format(szMessage[iLen], charsmax(szMessage)-iLen, "<left><font color=^"white^"><B>and then he(her) can press the 'E' to kick the ball. </B></color></left>^n")
    iLen += format(szMessage[iLen], charsmax(szMessage)-iLen, "<left><font color=^"white^"><B>If the team of the ball is not equali the player, </B></color></left>^n")
    iLen += format(szMessage[iLen], charsmax(szMessage)-iLen, "<left><font color=^"white^"><B>player can pick up the ball, and get few money from the ball. </B></color></left>^n")
    iLen += format(szMessage[iLen], charsmax(szMessage)-iLen, "<left><h4><font color=^"blue^"> Drop Money Part: </font></h4></left>")
    iLen += format(szMessage[iLen], charsmax(szMessage)-iLen, "<left><font color=^"white^"><B>Press twice 'G' key can hand money out as the current weapon is knife. </B></color></left>^n")
    iLen += format(szMessage[iLen], charsmax(szMessage)-iLen, "<left><font color=^"white^"><B>the hand out money level can be set as you like, the default value is 1000~3000 </B></color></left>^n^n")
   
    iLen += format(szMessage[iLen], charsmax(szMessage)-iLen, "<center><h1><font color=^"yellow^"> Made by iG_os </font></h1></center>")
    show_motd(id, szMessage, "Kill Money Ball help")
    return PLUGIN_CONTINUE
}

public get_user_money(id) {
    #if defined UNLIMITED_MONEY
    return cs_get_user_money_ul(id)
    #else
    return cs_get_user_money(id)
    #endif
}

public set_user_money(id, money) {
    #if defined UNLIMITED_MONEY
    cs_set_user_money_ul(id, money, 1)
    #else
    cs_set_user_money(id, money, 1)
    #endif
}

public beam(iEnt, iColors[]) {
   
    if (!is_valid_ent(iEnt))    return
   
   
    message_begin(MSG_BROADCAST, SVC_TEMPENTITY)
    write_byte(22) // TE_BEAMFOLLOW
    write_short(iEnt) // entity
    write_short(g_BeamSpr) // laserbeam
    write_byte(10) // life
    write_byte(5) // width
    write_byte(iColors[0]) // R
    write_byte(iColors[1]) // G
    write_byte(iColors[2]) // B
    write_byte(255) // brightness
    message_end()
}

stock print_color(index, color, const msg[], any:...) {
    static szMessage[192]
    szMessage[0] = 0x04
    vformat(szMessage[1], charsmax(szMessage)-1, msg, 4)
   
    static iSayText
    if (iSayText || (iSayText = get_user_msgid("SayText"))) {
        message_begin(index ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, iSayText, _, index)
        {
            write_byte(color)
            write_string(szMessage)
        }
        message_end()
    }
}
yimmanfai

ZxID:15177654

等级: 列兵
举报 只看该作者 沙发   发表于: 2011-07-02 0
还是说下怎么使用吧~
yimmanfai

ZxID:15177654

等级: 列兵
举报 只看该作者 板凳   发表于: 2011-07-02 0
还是说下怎么使用吧~
~~~~~~
1046005787

ZxID:15271165

等级: 列兵
举报 只看该作者 地板   发表于: 2011-07-02 0
。。。D啊
zpf101218

ZxID:16332693

等级: 新兵
举报 只看该作者 4楼  发表于: 2011-09-27 0

说下载资源
« 返回列表
发帖 回复