Denumire: Top15 cu acest Motd exemplu (<b>You have to register to ba able to see this link</b>)
Certinte:
1. Distanta dintre coloane sa fie aranjata (nu ca in poza), adica dupa un nume maxim de 30 de litere sa urmeze kills, deaths, hs (cu aceeasi lungime a casutei ). Eventual se poate extinde skill level pentru a compensa latimea tabelului.
2. In loc de top10 sa fie top15.
3. La partea superioara (unde in poza scrie top10 players) sa fie trecut banner-ul cu titlul CSFUN WARGODS TOP15 (<b>You have to register to ba able to see this link</b>).
4. Suplimentar se pot pune cupe/medalii locurilor 1,2,3 in locul numerelor.
Va multumesc in avans!
Belphegor
31-12-2015, 02:31 PM
Download :
.sma (<b>You have to register to ba able to see this link</b>)
.amxx (<b>You have to register to ba able to see this link</b>)
<b>You have to register to ba able to see this link</b>
Cam asa arata ce am facut eu. Inca nu sunt sigur cum se face bara, insa o sa vin mai tarziu cu un update. Daca vrei sa modific ceva, doar spune-mi. Codul este aici :
/* Plugin generated by AMXX-Studio */
#include <amxmodx>
#include <amxmisc>
#include <csx>
#define PLUGIN "Custom Top15"
#define VERSION "1.0"
#define AUTHOR "Belphegor"
#pragma semicolon 1
public plugin_init()
{
register_plugin( PLUGIN, VERSION, AUTHOR );
register_clcmd( "say /top15", "TopFunc" );
register_clcmd( "say_team /top15", "TopFunc" );
}
public TopFunc( id )
{
//kills deaths hs ?? shots hits ?? ??
new l_szTop[ 2048 ] = "<body bgcolor=#001933><img style=^"-webkit-user-select: none; cursor: zoom-in;^" src=^"<b>You have to register to ba able to see this link</b>^" width=^"450^" height=^"72^"><br><table border=^"1^" style=^"width:100%;background-color:#eee;border-width: thin;border-spacing: 2px;^"><font color=#FFFFFF><tr><td>#</td><td>Nume</td><td>Kills</td><td>Deaths</td><td>HS</td><td>Skill Level (%)</td></tr>";
new l_stCount = get_statsnum();
if( l_stCount > 15 )
l_stCount = 15;
new l_plStats[ 8 ], l_plBodyHits[ 8 ], l_szName[ 32 ], l_skillPerc;
for( new i = 0 ; i < l_stCount ; i++ )
{
get_stats( i, l_plStats, l_plBodyHits, l_szName, 31 );
l_skillPerc = floatround( 100 * float( l_plStats[ 5 ] ) / float( l_plStats[ 4 ] ) );
if( l_skillPerc < 0 )
l_skillPerc = 0;
//divide and modulo error fix
format( l_szTop, 2047, "%s<tr><td>%i</td><td>%s</td><td>%i</td><td>%i</td><td>%i</td><td>%i.%s</td></tr>", l_szTop, i + 1, l_szName, l_plStats[ 0 ], l_plStats[ 1 ], l_plStats[ 2 ], l_skillPerc, "%" );
}
format( l_szTop, 2047, "%s</table>", l_szTop );
show_motd( id, l_szTop, "Top 15 players" );
return PLUGIN_HANDLED;
}
Powered by WarGods Community™ 2006-2014 ©. All rights reserved.