|
发表于 2015-5-11 14:37:01
|
显示全部楼层
|阅读模式
来自 中国–吉林–吉林市
我将军衔的插件转换成dod是用的以后,为什么屏幕上面什么反映都没有呢?我编译的时候也没有报错,为什么不好使呢?进入游戏里面以后什么都看不到,还有就是怎么取消li_geoip的模块支持呢?因为我不需要地理的支持。
#include <amxmodx>
#include <dodstats>
#include "li_geoip"
#define STATS_KILLS 0
#define STATS_DEATHS 1
#define STATS_HS 2
#define STATS_TKS 3
#define STATS_SHOTS 4
#define STATS_HITS 5
#define STATS_DAMAGE 6
new g_SpecMode[33]
new rank[32]
new iRankPos
public plugin_init(){
register_event( "StatusValue", "DisplayInfo", "bd", "1=2");
register_event( "TextMsg", "SetSpecMode", "bd", "2&ec_Mod");
}
public SetSpecMode(id){
new arg[12];
read_data( 2, arg, 11);
g_SpecMode[id] = ( arg[10] == '4' );
}
public DisplayInfo(id){
if ( g_SpecMode[id]){
new player = read_data(2);
if ( is_user_connected( player)){
new szName[32];
get_user_name( player, szName, 31);
new szIP[16], szCountry[40], szArea[64];
get_user_ip( player, szIP, 15, 1);
geoip_info( szIP, szCountry, szArea, 39, 63);
new izStats[9], izBody[8];
new iRankMax;
iRankPos = get_user_stats( player, izStats, izBody);
iRankMax = get_statsnum();
new quanxian1[192]
if ( (get_user_flags(player)&ADMIN_LEVEL_A) )
quanxian1 = "OP"
else if ( (get_user_flags(player)&ADMIN_LEVEL_B) )
quanxian1 = "美女"
else if ( (get_user_flags(player)&ADMIN_LEVEL_C) )
quanxian1 = "VIP"
else if ( (get_user_flags(player)&ADMIN_LEVEL_D) )
quanxian1 = "会员"
else if ( (get_user_flags(player)&ADMIN_LEVEL_E) )
quanxian1 = "贵宾"
else
quanxian1 = "普通玩家"
new szMessage[256];
format( szMessage, 255, " %s^n【%s|%s】排名: %d/%d^n 杀敌: %d 死亡: %d 爆头: %d KD: %0.2f ^n 来自: %s%s",
szName,
quanxian1,
iRank(),
iRankPos,
iRankMax,
izStats[STATS_KILLS],
izStats[STATS_DEATHS],
izStats[STATS_HS],
1.0 * float( izStats[STATS_KILLS])/float( izStats[STATS_DEATHS]),
szCountry,
szArea
);
if ( (get_user_flags(player)&ADMIN_LEVEL_A) )
set_hudmessage( 255, 0, 0, 0.53, 0.72, 1, 6.0, 18.0, 0.5, 0.15, 7) ;
else if ( (get_user_flags(player)&ADMIN_LEVEL_B) )
set_hudmessage( 255, 255, 0, 0.53, 0.72, 0, 6.0, 18.0, 0.5, 0.15, 7) ;
else if ( (get_user_flags(player)&ADMIN_LEVEL_C) )
set_hudmessage( 255, 0, 0, 0.53, 0.72, 0, 6.0, 18.0, 0.5, 0.15, 7) ;
else if ( (get_user_flags(player)&ADMIN_LEVEL_D) )
set_hudmessage( 0, 255, 0, 0.53, 0.72, 0, 6.0, 18.0, 0.5, 0.15, 7) ;
else if ( (get_user_flags(player)&ADMIN_LEVEL_E) )
set_hudmessage( 0, 90, 255, 0.53, 0.72, 0, 6.0, 18.0, 0.5, 0.15, 7) ;
else
set_hudmessage( 255, 250, 255, 0.53, 0.72, 0, 6.0, 18.0, 0.5, 0.15, 7) ;
show_hudmessage( id, szMessage);
}
}
}
public iRank(){
if(iRankPos<=1)
rank = "军委主席"
else
{
if(iRankPos<=2)
rank = "副军委主席"
else
{
if(iRankPos<=10)
rank = "无耻之徒"
else
{
if(iRankPos<=20)
rank = "路过的"
else
{
if(iRankPos<=50)
rank = "小混混"
else
{
if(iRankPos<=100)
rank = "地盘工人"
else
{
if(iRankPos<=200)
rank = "上校"
else
{
if(iRankPos<=290)
rank = "上尉"
else
{
if(iRankPos<=370)
rank = "中尉"
else
{
if(iRankPos<=460)
rank = "少尉"
else
rank = "菜鸟"
} } } } } } } } }
return rank
}
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注个册吧
×
|