搜索
查看: 1606|回复: 0

[求助]求一个显示金钱的插件,斑竹们不能不管啊

[复制链接]
发表于 2007-12-1 18:41:42 | 显示全部楼层 |阅读模式 来自 中国–江苏–南京
求一个可以显示队友金钱的插件
这东西都是代码 我不会编 这不才麻烦你们
我只会修改一些最最最简单的东西
我想这个和显示IP的插件一样 其他功能不需要
对你们来说应该不会太复杂
而且这东西也是比较有”用武之地“的
还能帮助编写一个
其他人可以不问 斑竹一定要帮忙啊

这是人家给我的一个插件原码 和我说的差不多
不过还有些差距  而且我编译过 显示错误 搞不懂


1) Bind a key to "amx_teammate_money"
2) Target a teammate (they must be in your crosshair) and press your bind
3) You will be reported how much money they have. Only you see this




#include <amxmodx>
#include <cstrike>
#include <engine>

#define PLUGIN "See Teammate Money"
#define VERSION "1.0"
#define AUTHOR "M249-M4A1"

public plugin_init
()
{
   
register_plugin(PLUGIN, VERSION, AUTHOR
)
   
register_concmd("amx_teammate_money", "checkMoney", 0, "- check how much money your teammate has"
)
}

public
checkMoney(id
)
{
   
// Make some stuff
   
new victim,
body
   
// Get where the user is aiming at
   
get_user_aiming(id, victim, body, 9999
)
     
   
// Check if the target is a valid entity
   
if(is_valid_ent(victim
))
    {
        
// Make more stuff
        
new class[33
]
        
// Get the classname of the entity
        
entity_get_string(victim, EV_SZ_classname, class, 32
)
         
        
// Check if the entity is a player, alive, and on the same team as the user
        
if(equal(class, "player") && is_user_alive(victim) && get_user_team(id) == get_user_team(victim
))
        {
            
// Get the teammate's name and money, and display it to the user
            
new name[32
]
            
get_user_name(victim, name, 31
)
            new
money = cs_get_user_money(victim
)
            
client_print(id, print_chat, "[AMXX] %s has $%i", name, money
)
        }
    }
    return
PLUGIN_HANDLED
}  
游客
回复
您需要登录后才可以回帖 登录 | 注个册吧

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