Skocz do zawartości

Nowy szablon forum

mygo.pl

Stworzyliśmy dla Was nowy wygląd forum. Z pewnością znajdziesz rzeczy, które wg Ciebie mogą zostać zmienione - wspomnij o tym w specjalnym wątku.

Czytaj więcej

Jak założyć własną sieć

serwerów CS

Zastanawiasz się nad prowadzeniem własnej sieci serwerów? Przeczytaj podstawowe informacje, na które należy zwrócić uwagę, przy takim projekcie.

Czytaj więcej

Tworzymy spis sieci

dodaj swoją

Dodaj sieć do której należysz, pozwoli to na promocję i budowę ogólnopolskiej bazy sieci CS.

Czytaj więcej

RSSDisable Rank Bots


MYGO.pl
 Udostępnij

Rekomendowane odpowiedzi

  • RSSy
Hello i have one problem i have plugin fake full and when i see who are in top list i see bots its possible bots cant make rank just player
PHP Code:

#include <amxmodx>
#include <nvault>

#include <nvault_util>
#pragma tabsize 0
#define S_MINUTE 60
#define S_HOUR 3600
#define S_DAY 86400
new vault 
new cv_prune
#define MAX_TOP 10
new Array:Player_NameRank;
#define MAX_BUFFER_LENGTH       1536
new szMotd[MAX_BUFFER_LENGTH+1]
new const 
szVaultName[] = "ls-koha"
static Rank_Array_Count;
new 
bool:IsTopOnline[33];
new 
OnlineTimeRank[33];
new 
OnlineTime[33];
native online_is_top_player(idplayer)
native online_level_player(idplayer)
native online_rank_player(idplayer)
#define DESIGN_STYLE "<meta charset=UTF-8><style>body{background:#112233;font-family:Arial}th{background:#558866;color:#FFF;padding:5px 2px;text-align:left}td{padding:2px 1px}table{background:#EEEECC;font-size:14px;font-family:Arial}h2,h3{color:#FFF;font-family:Verdana}</style>"
public plugin_init() 
{
    
register_plugin("Time Play","0.1","anarkin-cs")
    
cv_prune register_cvar("amx_to_prune""30")
    
register_clcmd("say /lsonline","cmdalltime")
    
register_clcmd("say /online","cmdtime")
    
register_clcmd("say /onlinerank","CmdRank")
    
vault nvault_open(szVaultName)
    
format_top_online()
}
public    
plugin_natives ( )
{
    
register_native("online_level_player""native_online_level_player"1)
    
register_native("online_is_top_player""native_online_is_top_player"1)
    
register_native("online_rank_player""native_online_rank_player"1)
}
public 
native_online_rank_player(idPlayer)
    return 
OnlineTimeRank[idPlayer];
    
public 
native_online_is_top_player(idPlayer)
    return 
IsTopOnline[idPlayer];
    
public 
native_online_level_player(idPlayer)
{
    new 
level get_lvl_player(OnlineTime[idPlayer]);
    return 
level;
}
public 
plugin_precache()
    
Player_NameRank    =    ArrayCreate(641);
    
public 
plugin_cfg()
{
    new 
prune_time=(get_systime()-(get_pcvar_num(cv_prune)*86400))
    
nvault_prune(vault0prune_time)
}
public 
plugin_end()
    
nvault_close(vault)
    
public 
CmdRank(id)
{
    new 
szMsg[128];
    
formatex(szMsg,charsmax(szMsg),"!g[LS ONLINE] !tRank Juaj: !g%d !tprej !g%d !tLojtareve",OnlineTimeRank[id],Rank_Array_Count)
    
ColoredPrint(idszMsg); 
    return 
PLUGIN_HANDLED;
}
public 
client_putinserver(id)
{
    new 
name[64],key[64],vaultdata[31]
    
get_user_name(id,name,charsmax(name))
    
OnlineTime[id] = 0;
    
OnlineTimeRank[id] = 0;
    
IsTopOnline[id] = false;
    
formatex(key,63,"%s",name)
    
nvault_touch(vault,key)
    
nvault_get(vaultkeyvaultdata30);
    
OnlineTime[id] = str_to_num(vaultdata);    
    for (new 
iRank_Array_Counti++)
    {
        new 
Name[64];
        
ArrayGetString(Player_NameRank,iNamecharsmax(Name));
        if(
equali(Name,name))
        {
            
OnlineTimeRank[id] = 1;
            if(
i+1<=MAX_TOP)IsTopOnline[id] = true;
            break;
        }
    }
}
public 
client_disconnected(id)
{
    new 
key[64],data[128]
    new 
name[64]
    
get_user_name(id,name,charsmax(name))
    
formatex(key,63,"%s",name)
    
nvault_get(vault,key,data,127)
    new 
alltime str_to_num(data)
    
formatex(data,127,"%d",alltime+(get_user_time(id)))
    
nvault_set(vaultkeydata
}
public 
cmdtime(id)
{
    new 
thetime[64],szMsg[128],level;
    new 
time OnlineTime[id] + get_user_time(id)
    
get_human_time(time,thetime,sizeof(thetime)-1)
    
level get_lvl_player(time)    
    
formatex(szMsg,charsmax(szMsg),"!g[LS ONLINE] !tKoha !g%s !tLeveli juaj !g%d",thetime,level)
    
ColoredPrint(idszMsg); 
    return 
PLUGIN_HANDLED;
}
public 
cmdalltime(id)
{
    new 
szMotdTitle[126];
    
formatex(szMotdTitlecharsmax(szMotdTitle),"[LS] Top Aktivet");
    
show_motd(idszMotdszMotdTitle);    
    return 
PLUGIN_CONTINUE
}
format_top_online()
{
        new 
iLen
        
new lPlace[60], lTime[30], lNick[30],lLevel[30];
        
format(lPlace59"TOP Online")
        
format(lNick29"Emri")
        
replace_all(lNick29" ""&nbsp")
        
format(lTime29"Koha")
        
replace_all(lTime29" ""&nbsp")
        
format(lLevel29"Level")
        
replace_all(lLevel29" ""&nbsp")
        
iLen format_all_themes(szMotdiLen)
        
iLen += format(szMotd[iLen], MAX_BUFFER_LENGTH iLen"<body><h2>%s</h2> <table width=100%% border=0 align=center cellpadding=0 cellspacing=1>"lPlace)
        
iLen += format(szMotd[iLen], MAX_BUFFER_LENGTH iLen"<tr><th>%s<th>%s<th>%s<th>%s</tr>""Vendi"lNicklTime,lLevel)
        new Array:
aNames  ArrayCreate(64)
        new Array:
aNum1 ArrayCreate(1)
        new 
iPosiCountiTime
        
new g_Vault nvault_util_open(szVaultName)
        
iCount nvault_util_countg_Vault )
        new 
szName[64], szData[20],szParseNum1[32];
        for(new 
iiCounti++)
        {
                
iPos nvault_util_read(g_VaultiPosszNamecharsmaxszName ), szDatacharsmaxszData ), iTime)
                
parse(szDataszParseNum1charsmaxszParseNum1 ))
                new 
len;
                
len strlen(szName)
                if(
len <=2)
                    
format(szName,charsmax(szName),"Emri nuk u gjet")
                    
                
ArrayPushString(aNamesszName)
                
ArrayPushCell(aNum1str_to_numszParseNum1 ))
        }
        
nvault_util_closeg_Vault )
        new 
iCheckNum 
        
for(new i,  j< ( iCount ); i++)
        {
                
iCheckNum ArrayGetCell(aNum1i)
                for( 
1iCountj++ )
                {
                        if(
iCheckNum ArrayGetCell(aNum1j))
                        {
                                
ArraySwap(aNamesi,  j)
                                
ArraySwap(aNum1i,  j)
                                
i--
                                break
                        }
                }
        }
        new 
szParseName[64]
        new 
iParseNum[3]
        new 
iMax
        
if(iCount 10)
                
iMax iCount
        
else
            
iMax 10

        
for(new iiMaxi++)
        {
                
ArrayGetString(aNamesiszParseNamecharsmaxszParseName ))
                
iParseNum[1] = ArrayGetCell(aNum1i)
                new 
thetime[64],Level;
                new 
time iParseNum[1]
                
Level get_lvl_player(time)
                
get_human_time(time,thetime,sizeof(thetime)-1)
                if(
== 1iLen += formatex(szMotd[iLen], charsmaxszMotd ) - iLen"<tr><td><img src=^"https://i.imgur.com/2mx4qZD.png^" alt=^"top1^" width=^"48^" height=^"48^"></td><td>%s</td><td>%s</td><td>%d</td></td></tr>", szParseName, thetime,Level) //Создаем строки в топе
                
else iLen += formatex(szMotd[iLen], charsmaxszMotd ) - iLen"<tr><td>%d</td><td>%s</td><td>%s</td><td>%d</td></td></tr>", (1), szParseNamethetime,Level//Создаем строки в топе
        
}
        
//Для rank
        
for(new iiCounti++)
        {    
                
ArrayGetString(aNamesiszParseNamecharsmaxszParseName ))
                
ArrayPushString(Player_NameRankszParseName)    
        }
        
Rank_Array_Count ArraySize(Player_NameRank)
        
ArrayDestroy(aNames)
        
ArrayDestroy(aNum1)
}
get_lvl_player(time)
{
    new 
level,h;
    
h=time/S_HOUR;
    
level 2    
    
return level;
}
get_human_time(time,output[],len)
{
    new 
m,h,d
    
if(time)formatex(output,len,"%d sek",time// gg
    
if(time/S_MINUTE)
    {
        
m=time/S_MINUTE
        formatex
(output,len,"%d min.",m)
    }
    if(
time/S_HOUR)
    {
        
h=time/S_HOUR
        m
=(time-(h*S_HOUR))/S_MINUTE 
        
new szHour[16];
        switch(
h)
        {
            case 
1,21:format(szHour,charsmax(szHour),"ore")
            case 
2..4,22..24:format(szHour,charsmax(szHour),"ore")
            case 
5..20:format(szHour,charsmax(szHour),"ore")
        }
        
formatex(output,len,"%d %s dhe %d min",h,szHour,m)
    }
    if(
time/S_DAY)
    {
        
d=time/S_DAY
        h
=(time-(d*S_DAY))/S_HOUR
        
new szHour[16],szDay[16];
        switch(
h)
        {
            case 
1,21:format(szHour,charsmax(szHour),"ore")
            case 
2..4,22..24:format(szHour,charsmax(szHour),"ore")
            case 
5..20:format(szHour,charsmax(szHour),"ore")
        }
        switch(
d)
        {
            case 
1,21,31:format(szDay,charsmax(szDay),"dite")
            case 
2..4,22..24:format(szDay,charsmax(szDay),"dite")
            case 
5..20,25..30:format(szDay,charsmax(szDay),"dite")
        }
        
formatex(output,len,"%d %s %d %s %d min."d,szDay,h,szHour,m)
    }    
}
format_all_themes(sBuffer[MAX_BUFFER_LENGTH 1], iLen)
{
    
//switch
    //{
    
iLen format(sBufferMAX_BUFFER_LENGTHDESIGN_STYLE)    
    return 
iLen
    
//}
}
//stock
//ColorChat
stock ColoredPrint(const id, const input[], any:...)
{
    new 
count 1players[32]
    static 
msg[512]
    
vformat(msg512input3)
    
    
replace_all(msg512"!g""^x04")
    
replace_all(msg512"!y""^x01")
    
replace_all(msg512"!t""^x03")
    
    if (
idplayers[0] = id; else get_players(playerscount"ch")
    {
        for (new 
0counti++)
        {
            if (
is_user_connected(players[i]))
            {
                
message_begin(MSG_ONE_UNRELIABLEget_user_msgid("SayText"), _players[i]);
                
write_byte(players[i]);
                
write_string(msg);
                
message_end();
            }
        }
    }


Przeczytaj cały wpis

Odnośnik do komentarza
Udostępnij na innych stronach

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
 Udostępnij

  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...