|
发表于 2007-2-15 18:34:41
|
显示全部楼层
来自 中国–云南–西双版纳傣族自治州–景洪市
回复: 谁有这样的插件或则说说叫什么名字
- public ShowSpecStatus // 显示命中部位和受伤部位
- public ShowRatio // 显示观看对象的命中率
- public ShowMoney // 显示观看者的钱
- public ShowIp // 显示观看者的IP地址
- public EndRoundTop5 // 每局结束的时候显示TOP5
-
- new g_menuchose[3][] = {"鏄剧ず缁熻","鏄剧ず鎺掑悕","鏄剧ず鍛戒腑鐜?}
-
- server_cmd(g_addStast,"鐜╁鐘舵€?,"ShowSpecStatus")
- server_cmd(g_addStast,"鐜╁鍛戒腑鐜?,"ShowRatio")
- server_cmd(g_addStast,"鐜╁鐨勯噾閽?,"ShowMoney")
- server_cmd(g_addStast,"姣忓眬缁撴潫鏃舵樉绀篢OP5","EndRoundTop5")
- server_cmd(g_addStast,"鏄剧ず鐜╁鐨処P","ShowIp")
-
- Float:getratio( temp[8],x,all ) {
- if( all == 0 ) return ( 0.0 );
- return ( 100.0 * float( temp[x] ) / float( all ) );
- }
-
- //-鍒楄鐪嬬殑璧勬枡
- getspecstatus(id) {
- new pos,stats[8],bodyhits[8],bodysum
- if ( ShowSpecStatus ){
- new name[32]
- get_user_name(id,name,31)
- new health = get_user_health(id)
- new armor = get_user_armor(id)
- new data[8]
- new rank = get_user_stats(id,data,data)
- pos += format(g_Buffer[pos],2047-pos,"鍚嶅瓧 : %s^n琛€ : %d^n鐢?: %d^n鎺掑悕 : %d^n",name,health,armor,rank )
- }
- if ( ShowMoney ){
- new money = get_user_money(id)
- pos += format(g_Buffer[pos],2047-pos,"閲戦挶 : $ %d^n",money )
- }
- if ( ShowRatio ){
- get_user_stats(id,stats,bodyhits)
- for( new x=1; x<8; ++x )
- bodysum += bodyhits[x]
- new float:bodyratio[8]
- for( new x=1; x<8; ++x )
- bodyratio[x] = getratio( bodyhits, x, bodysum )
- if ( stats[1]==0 )
- bodyratio[0] = 0
- else
- bodyratio[0] = ( float (stats[0]) / float (stats[1]) )
- pos += format(g_Buffer[pos],2047-pos,"鍛戒腑鐜?:^n")
- for ( new i = 1; i<8; ++i )
- pos += format(g_Buffer[pos],2047-pos,"->%s : %.2f%%%%^n",g_bodyParts[i],bodyratio[i])
- pos += format(g_Buffer[pos],2047-pos,"鏉€浜?姝讳骸 : %.2f^n",bodyratio[0])
- }
- if ( ShowIp ){
- new ipaddress[16]
- get_user_ip(id,ipaddress,16,1)
- pos += format(g_Buffer[pos],2047-pos,"IP :%s^n",ipaddress)
- }
- }
- //-鍒楀墠5鍚?
- gettop5(){
- new pos = 0,name[32],stats[8],bodyhits[8]
- pos += format(g_Buffer[pos],2047-pos,"鐩墠鐨勫墠5鍚?:^n_________________________________")
- new imax = get_statsnum()
- if (imax > 5) imax = 5
- for(new a = 0; a < imax; ++a){
- get_stats(a, stats, bodyhits, name, 31)
- pos += format(g_Buffer[pos],2047-pos,"^n%d. %s",a+1,name )
- }
- }
-
- public showRank(id)
- if ( SpecRankInfo && g_specMode[id] ){
- new a = read_data(2)
- if ( is_user_connected( a ) ){
- //new name[32], data[8]
- //get_user_name( a ,name,31)
- //new pos = get_user_stats( a ,data,data)
- //set_hudmessage(255,255,255,0.02,0.85,2, 0.05, 0.1, 0.01, 3.0, 1)
- //show_hudmessage(id,"%s's rank is %d of %d",name,pos,get_statsnum())
- getspecstatus(a)
- if ( ShowRatio ){
- set_hudmessage( 150, 50, 255, 0.03, 0.31, 0, 6.0, 10.0, 0.1, 0.2, 9)
- //set_hudmessage(random_num(0,255),random_num(0,255),random_num(0,255), 0.03, 0.31, 0, 6.0, 10.0, 0.1, 0.2, 2)
- }else{
- set_hudmessage( 150, 50, 255, 0.03, 0.50, 0, 6.0, 10.0, 0.1, 0.2, 9)
- //set_hudmessage(random_num(0,255),random_num(0,255),random_num(0,255), 0.03, 0.50, 0, 6.0, 10.0, 0.1, 0.2, 2)
- }
- show_hudmessage(id,g_Buffer)
- }
- }
-
- public eRoundEndTask() {
- if ( EndRoundTop5 ){
- gettop5()
- set_hudmessage(0,150,0,-1.0, 0.07, 2, 0.01, 12.0, 0.01, 0.01, 5)
- show_hudmessage( 0 ,g_Buffer)
- }
- if ( ShowVictims || ShowAttackers ) {
- new players[32], pnum
- get_players( players , pnum, "a" )
- for(new i = 0; i < pnum; ++i ) {
- if ( ShowVictims &&getVictims( players[ i ] )){
- set_hudmessage(0,80,220,0.55,0.60,0, 6.0, 12.0, 1.0, 2.0, 4)
- show_hudmessage( players[ i ] ,g_Buffer)
- }
- if ( ShowAttackers && getAttackers( players[ i ] ) ){
- set_hudmessage(220,80,0,0.55,0.35,0, 6.0, 12.0, 1.0, 2.0, 3)
- show_hudmessage( players[ i ] ,g_Buffer)
- }
- }
- }
- if ( EndMostKills || EndTeamScore || EndMostDamage ){
- new players[32], pnum, stats[8],bodyhits[8], len = 0
- get_players( players , pnum )
- g_Buffer[0] = 0
- if ( EndMostKills ){
- new kills = 0, who = 0, hs = 0
- for(new i = 0; i < pnum; ++i){
- get_user_rstats( players[i],stats, bodyhits )
- if ( stats[0] > kills ){
- who = players[i]
- kills = stats[0]
- hs = stats[2]
- }
- }
- if ( is_user_connected(who) ) {
- new name[32]
- get_user_name( who, name, 31 )
- len += format(g_Buffer[len] , 1024 - len ,
- "%s 鏉€浜烘渶澶歗n鍏辨潃浜?%d 涓?/ 鍏朵腑鐖嗗ご %d 涓猑n", name , kills , hs )
- }
- }
- if ( EndMostDamage ){
- new damage = 0, who = 0, hits = 0
- for(new i = 0; i < pnum; ++i){
- get_user_rstats( players[i],stats, bodyhits )
- if ( stats[6] > damage ){
- who = players[i]
- hits = stats[5]
- damage = stats[6]
- }
- }
- if ( is_user_connected(who) ) {
- new name[32]
- get_user_name( who, name, 31 )
- len += format(g_Buffer[len] , 1024 - len ,
- "_________________________________^n%s 浼ゅ鏈€澶歗n浼ゅ鎬昏 %d / 鏈夋晥涓脊鏁?%d^n", name , damage , hits )
- }
- }
- if ( ShowMoney ){
- new who = 0, temp = 0, money = 0
- new name[32]
- for(new i = 0; i < pnum; ++i){
- money = get_user_money(players[i])
- if ( money > temp ){
- who = players[i]
- temp = get_user_money(players[i])
- }
- }
- if ( is_user_connected(who) ) {
- get_user_name( who,name,31 )
- len += format(g_Buffer[len] , 1024 - len , "_________________________________^n%s 閲戦挶鏈€澶?-- $: %d^n",name, get_user_money(who) )
- }
- }
- if ( EndTeamScore )
- format(g_Buffer[len] , 1024 - len , "_________________________________^n鎭愭€栧垎瀛?%d -- %d 鍙嶆亹绮捐嫳^n", g_teamScore[0] , g_teamScore[1] )
- set_hudmessage(128,128,255,-1.0,0.70,2, 0.01, 5.0, 0.01, 0.01, 3 )
- show_hudmessage( 0 , g_Buffer )
- }
- }
复制代码
帮你分离出来了.自己复制到你的stats里面.需要重新转换下格式 |
|