|
发表于 2009-5-5 06:05:23
|
显示全部楼层
来自 中国–广西–百色
本帖最后由 野*人 于 2009-5-5 06:07 编辑
以下代码应该加入玩家进入服务器的欢迎信息提示才是!
再与玩家连接提示合成~ 10点通币,我买下!- public EventJoinedTeam(){
-
- new id=read_data(1);
- if( g_JoinedTeam[id] == 0){
- g_JoinedTeam[id]=1;
- get_user_name( id, szName, 31);
- new szIP[16], szCountry[40], szArea[64];
- get_user_ip( id, szIP, 15, 1);
- get_ipinfo( szIP, szCountry, szArea, 39, 63);
- //new iRankMax
- new izStats[8], izBody[8];
- new szMessage[192];
- iRankPos = get_user_stats( id, izStats, izBody);
- //iRankMax = get_statsnum();
- new msg[221]
- format( msg, 220, "", szName, szCountry,szArea);
- display_chat( szMessage);
- //client_color(0,id,msg);
- new szSignature[96];
- if( dt_getsign( szName, szSignature, 95)){
- format( szMessage, 191, "", szSignature);
- display_chat( szMessage);
- }
-
- }
- }
- public client_disconnect(id){
- get_user_name( id, szName, 31);
- new szMessage[128];
- // client_cmd(0,"spk q3/exit")
- format( szMessage, 128,"^x03%s^x01 离开了服务器,欢迎下次再来.", szName);
- //display_chat( szMessage);
- queue_remove(id, -1)
- g_nLastServer[id - 1] = -1
- }
- 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);
- get_ipinfo( szIP, szCountry, szArea, 39, 63);
-
- new izStats[8], izBody[8];
- new iRankMax;
- iRankPos = get_user_stats( player, izStats, izBody);
- iRankMax = get_statsnum();
-
- new szSignature[96],HasSignature;
- HasSignature = dt_getsign( szName, szSignature, 95);
- new money = cs_get_user_money2(player)
- new szMessage[256];
- if ( (get_user_flags(player)&ADMIN_IMMUNITY) )
- format( szMessage, 255, "〖战队OP|%s〗%s 排名: %d/%d^n 杀敌: %d 死亡: %d 爆头: %d 金钱: %d^n 来自: %s%s^n〖个性签名〗%s",
- iRank(),
- szName,
- iRankPos,
- iRankMax,
- izStats[STATS_KILLS],
- izStats[STATS_DEATHS],
- izStats[STATS_HS],
- money,
- szCountry,
- szArea,
- (HasSignature == 0)?"欢迎来到本服务器":szSignature
- );
- else if ( (get_user_flags(player)&ADMIN_LEVEL_C) )
- format( szMessage, 255, "〖战队MM|%s〗%s 排名: %d/%d^n 杀敌: %d 死亡: %d 爆头: %d 金钱: %d^n 来自: %s%s^n〖个性签名〗%s",
- iRank(),
- szName,
- iRankPos,
- iRankMax,
- izStats[STATS_KILLS],
- izStats[STATS_DEATHS],
- izStats[STATS_HS],
- money,
- szCountry,
- szArea,
- (HasSignature == 0)?"欢迎来到本服务器":szSignature
- );
- else if ( (get_user_flags(player)&ADMIN_LEVEL_B) )
- format( szMessage, 255, "〖战队VIP|%s〗%s 排名: %d/%d^n 杀敌: %d 死亡: %d 爆头: %d 金钱: %d^n 来自: %s%s^n〖个性签名〗%s",
- iRank(),
- szName,
- iRankPos,
- iRankMax,
- izStats[STATS_KILLS],
- izStats[STATS_DEATHS],
- izStats[STATS_HS],
- money,
- szCountry,
- szArea,
- (HasSignature == 0)?"欢迎来到本服务器":szSignature
- );
- else if ( (get_user_flags(player)&ADMIN_LEVEL_D) )
- format( szMessage, 255, "〖战队成员|%s〗%s 排名: %d/%d^n 杀敌: %d 死亡: %d 爆头: %d 金钱: %d^n 来自: %s%s^n〖个性签名〗%s",
- iRank(),
- szName,
- iRankPos,
- iRankMax,
- izStats[STATS_KILLS],
- izStats[STATS_DEATHS],
- izStats[STATS_HS],
- money,
- szCountry,
- szArea,
- (HasSignature == 0)?"欢迎来到本服务器":szSignature
- );
- else if ( (get_user_flags(player)&ADMIN_LEVEL_E) )
- format( szMessage, 255, "〖战队贵宾|%s〗%s 排名: %d/%d^n 杀敌: %d 死亡: %d 爆头: %d 金钱: %d^n 来自: %s%s^n〖个性签名〗%s",
- iRank(),
- szName,
- iRankPos,
- iRankMax,
- izStats[STATS_KILLS],
- izStats[STATS_DEATHS],
- izStats[STATS_HS],
- money,
- szCountry,
- szArea,
- (HasSignature == 0)?"欢迎来到本服务器":szSignature
- );
- else if ( (get_user_flags(player)&ADMIN_LEVEL_F) )
- format( szMessage, 255, "〖预备队员|%s〗%s 排名: %d/%d^n 杀敌: %d 死亡: %d 爆头: %d 金钱: %d^n 来自: %s%s^n〖个性签名〗%s",
- iRank(),
- szName,
- iRankPos,
- iRankMax,
- izStats[STATS_KILLS],
- izStats[STATS_DEATHS],
- izStats[STATS_HS],
- money,
- szCountry,
- szArea,
- (HasSignature == 0)?"欢迎来到本服务器":szSignature
- );
- else
- format( szMessage, 255, "〖普通玩家|%s〗%s 排名: %d/%d^n 杀敌: %d 死亡: %d 爆头: %d 金钱: %d^n 来自: %s%s^n〖个性签名〗%s",
- iRank(),
- szName,
- iRankPos,
- iRankMax,
- izStats[STATS_KILLS],
- izStats[STATS_DEATHS],
- izStats[STATS_HS],
- money,
- szCountry,
- szArea,
- (HasSignature == 0)?"谁要是作弊就是婊子养的":szSignature
- );
- if ( (get_user_flags(player)&ADMIN_IMMUNITY) )
- set_hudmessage( 255, 0, 0, 0.53, 0.75, 1, 6.0, 18.0, 0.5, 0.15, 5) ;
- else if ( (get_user_flags(player)&ADMIN_LEVEL_A) )
- set_hudmessage( 255, 255, 0, 0.53, 0.75, 0, 6.0, 18.0, 0.5, 0.15, 5) ;
- else if ( (get_user_flags(player)&ADMIN_LEVEL_B) )
- set_hudmessage( 255, 0, 0, 0.53, 0.75, 1, 6.0, 18.0, 0.5, 0.15, 5) ;
- else if ( (get_user_flags(player)&ADMIN_LEVEL_C) )
- set_hudmessage( 0, 255, 0, 0.53, 0.75, 0, 6.0, 18.0, 0.5, 0.15, 5) ;
- else if ( (get_user_flags(player)&ADMIN_LEVEL_D) )
- set_hudmessage( 0, 90, 255, 0.53, 0.75, 0, 6.0, 18.0, 0.5, 0.15, 5) ;
- else if ( (get_user_flags(player)&ADMIN_LEVEL_E) )
- set_hudmessage( 128, 255, 255, 0.53, 0.75, 0, 6.0, 18.0, 0.5, 0.15, 5) ;
- else
- set_hudmessage( 255, 250, 255, 0.53, 0.75, 0, 6.0, 18.0, 0.5, 0.15, 5) ;
- show_hudmessage( id, szMessage);
- }
- }
- }
- get_ipinfo(szIP[],szCountry[],szArea[],clen,alen){
- geoip_info(szIP,szCountry,szArea,clen,alen);
- }
- display_chat( szMessage[]){
- message_begin(MSG_ALL,g_msgid);
- write_byte(1);
- write_string(szMessage);
- message_end();
- }
- public iRank(){
- if(iRankPos<=10)
- rank = "特级统帅"
- else
- {
- if(iRankPos<=20)
- rank = "三军统帅"
- else
- {
- if(iRankPos<=30)
- rank = "五星上将"
- else
- {
- if(iRankPos<=50)
- 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
- }
复制代码- if ( get_user_flags(id) & ADMIN_IMMUNITY || (equali(ips,g_amx_netbarip)) || (contain(ips,g_amx_netbarip)==0))
- format( szMsg,191,"^x04战队OP ^x01%s 正在连接服务器...",name);
- else if ( get_user_flags(id) & ADMIN_LEVEL_C )
- format( szMsg,191,"^x04战队MM ^x01%s 正在连接服务器...",name);
- else if ( get_user_flags(id) & ADMIN_LEVEL_B )
- format( szMsg,191,"^x04战队VIP ^x01%s 正在连接服务器...",name);
- else if ( get_user_flags(id) & ADMIN_LEVEL_D )
- format( szMsg,191,"^x04战队队员 ^x01%s 正在连接服务器...",name);
- else if ( get_user_flags(id) & ADMIN_LEVEL_E )
- format( szMsg,191,"^x04贵宾 ^x01%s 正在连接服务器...",name);
- else
- format( szMsg,191,"^x01玩家 ^x04%s ^x01正在连接服务器...",name);
- client_color( 0, id, szMsg)
复制代码 |
|