Raised This Month: $62 Target: $400
 15% 

Help! Wrong stats in stats plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
cahervar
Junior Member
Join Date: Mar 2021
Old 03-22-2021 , 15:57   Help! Wrong stats in stats plugin
Reply With Quote #1

plugin saves stats the worng way, not taking into account the number of kills.
Can anyone help me modifying this? Thanks!

PHP Code:
#include <amxmodx>
#include <colorchat>
#include <nvault>
#include <amxmisc>

#define MAXENTRIES 1000

new gKnifeKills[33], gKnifeDeaths[33], gKnifeHeadShots[33], gConnect[33], g_cvarRecDir[64];

public 
plugin_init() {
    
register_plugin"KnifeTop""1.0""Tolsty" );
    
register_event("DeathMsg""eventDeathMsg""a""1>0");
    
g_cvar register_cvar("knifetop_topsave""1");
    
register_clcmd("say fakareset","top_reset",ADMIN_BAN);
    
register_clcmd("say fakarank","kniferank");
    
register_clcmd("say fakatop","topten_show");
    
register_clcmd("say /knife","info");
    new 
DataDir[64];
    
get_datadir(DataDir63);
    
format(RecDir63"%s/vault"DataDir);

}

public 
client_connect(plr) {
    if(!
get_pcvar_num(g_cvar) ) 
        return 
    
gConnect[plr] = true;
    
update(plr)
    
set_task(15.0,"info"plr);
}
public 
client_disconnect(plr) {
    
gConnect[plr] = false;
}
public 
update(plr) {
    if(!
get_pcvar_num(g_cvar) ) 
        return 
PLUGIN_HANDLED
    
static knifetop[128], szid[32];
    
format(knifetop128"%s/knifetop.vault",RecDir);
    if(
get_pcvar_num(g_cvar) == 1)
        
get_user_name(plr,szid,32);
    else if(
get_pcvar_num(g_cvar) == )
        
get_user_ip(plr,szid,32);
    else if(
get_pcvar_num(g_cvar) == )
        
get_user_authid(plr,szid,32);
    if( 
file_exists(knifetop)) {
        new 
szvault[64];
        
format(szvault,64,"knifetop");
        
        new 
vault nvault_open(szvault);
        if(
vault != -1) {
            new 
szkey[4];
            for(new 
i=1;i<=MAXENTRIES;i++) {
                new 
szreturn[128];
                
format(szkey,4,"%d",i);
                
nvault_get(vault,szkey,szreturn,128);
                new 
arg1[16], arg2[16], arg3[8],  arg4[8],  arg5[8];
                if(
parse(szreturnarg116arg216arg38arg48arg58) != && equal(szid,arg1) ) {
                    
gKnifeKills[plr] = str_to_num(arg3)
                    
gKnifeDeaths[plr] = str_to_num(arg4)
                    
gKnifeHeadShots[plr] = str_to_num(arg5)
                    if( !
gConnect[plr] )
                        
ColorChat(plr RED"[AMBA CS] Tu posicion es %s en el FakaTop, con %d cuchilladas !"szkeygKnifeKills[plr]);
                }
            }
            
nvault_close(vault);
        }
    } 
    if(
gConnect[plr])
        
gConnect[plr] = false
    
return PLUGIN_HANDLED

}
public 
info(plr) {
    
ColorChat(plr RED"[AMBA CS] Escribe fakatop y ve el top10 de Fakas, o fakarank para ver tu estadistica");
    
}
public 
kniferank(plr) {
    
update(plr)
}
public 
eventDeathMsg() {
    if(!
get_pcvar_num(g_cvar) ) 
        return 
PLUGIN_HANDLED
    
static killerkiller read_data);
    static 
victimvictim read_data) ;      
    static 
szweapon[5];
    
read_dataszweapon );
      
    if ( ( 
szweapon] == 'k' ) && ( szweapon] == 'f' ) ) {   
        
gKnifeKills[killer]++ 
        
gKnifeDeaths[victim]++ 
        if ( 
read_data) ) {
            
gKnifeHeadShots[killer]++
        }   
        
topten_update(killer)
        
topten_update(victim)        
    } 
    return 
PLUGIN_HANDLED
}

public 
topten_updateplr ) {
    new 
TopTenVault[64];
    
format(TopTenVault64"knifetop");
    
    new 
vault nvault_open(TopTenVault);

    if(
vault != -1) {

        new 
szkey[8];
        new 
szid[32];
        new 
szname[32];
        new 
cur_place;
        new 
new_place;

        if(
get_pcvar_num(g_cvar) == 1)
            
get_user_name(plr,szid,32);
        else if(
get_pcvar_num(g_cvar) == )
            
get_user_ip(plr,szid,32);
        else if(
get_pcvar_num(g_cvar) == )
            
get_user_authid(plr,szid,32);

        
get_user_name(plr,szname,32);

        for(new 
i=1;i<=MAXENTRIES;i++) {
            new 
szreturn[128], arg1[32] ;
            
format(szkey,8,"%d",i);
            
nvault_get(vault,szkey,szreturn,128);
            if(
parse(szreturnarg132) != && equal(szid,arg1)) {
                
cur_place i;
                break;
            }
        }
        for(new 
i=1;i<=MAXENTRIES;i++) {
            new 
szreturn[256], arg1[32], arg3[32];
            
format(szkey,8,"%d",i);
            
nvault_get(vault,szkey,szreturn,256);
            if (
cur_place == 1) {
                
new_place 1;
                break;
            }
            else if (
cur_place != && cur_place i) {
                
new_place 0;
                break;
            }
            else if(
parse(szreturnarg132) == 0) {
                
new_place i;
                break;
            }
            else if(
gKnifeKills[plr]  > str_to_num(arg3) ) {
                
new_place i;
                break;
            }
        }
        if(
cur_place == && new_place <= 1000 && new_place 0) {
            if(
new_place 1000) {
                new 
sztemp[128], sztempkey[8];
                
                for(new 
i=10;i>new_place;i--) {
                    
format(sztempkey,8,"%d",i-1);
                    
nvault_get(vault,sztempkey,sztemp,128);
                    if(!
equal(sztemp,"")) {
                        
format(sztempkey,8,"%d",i);
                        
nvault_pset(vault,sztempkey,sztemp);
                    }
                }
            }
            
client_print(0print_chat"[AMBA CS] %s esta en el puesto %d del fakatop con %d acuchilladas!"sznamenew_placegKnifeKills[plr]);
            
            new 
sznew[512];
            
format(szkey,8,"%d",new_place);
            
format(sznew,512,"^"%s^" ^"%s^" ^"%d^" ^"%d^" ^"%d^" "szidsznamegKnifeKills[plr], gKnifeDeaths[plr], gKnifeHeadShots[plr]);    
            
nvault_pset(vault,szkey,sznew);
        }
        else if(
cur_place == new_place && cur_place 0) {
                     
                new 
sznew[512], szkey[8];
                new 
szreturn[128], arg1[32], arg3[32], arg5[32];
                
format(szkey,8,"%d",cur_place);
                
nvault_get(vault,szkey,szreturn,128);
                    
                if(
parse(szreturnarg132arg332) != 0) {
                    
format(sznew,512,"^"%s^" ^"%s^" ^"%d^" ^"%d^" ^"%d^" "szidszname,  gKnifeKills[plr] > str_to_num(arg3) ? gKnifeKills[plr] : str_to_num(arg3), gKnifeDeaths[plr], gKnifeHeadShots[plr] > str_to_num(arg5) ? gKnifeHeadShots[plr] : str_to_num(arg5));    
                    
nvault_pset(vault,szkey,sznew);
                }
        }
        else if (
new_place cur_place && new_place 0) {
            new 
sznew[512];
            new 
szreturn[128], arg1[32], arg2[32];
            
format(szkey,8,"%d",cur_place);
            
nvault_get(vault,szkey,szreturn,128);
            if(
parse(szreturn,arg1,32,arg2,32) != 0) {
                
format(sznew,512,"^"%s^" ^"%s^" ^"%d^" ^"%d^" ^"%d^" "szidszname,  gKnifeKills[plr] , gKnifeDeaths[plr], gKnifeHeadShots[plr]);
                for(new 
i=cur_place;i>=new_place;i--) {
                    new 
szreturn[128], arg1[32], arg2[32];
                    
format(szkey,8,"%d",i);
                    
nvault_get(vault,szkey,szreturn,128);
                    
                    if(
parse(szreturn,arg1,32,arg2,32) != 0){
                        new 
sztemp [128], sztempkey[8];
                        
format(sztempkey,8,"%d",i-1);
                        
nvault_get(vault,sztempkey,sztemp,128);
                        
                        if(!
equal(sztemp,"")) {
                            
format(sztempkey,8,"%d",i);
                            
nvault_pset(vault,sztempkey,sztemp);
                        }
                    }
                    else break;
                }
                
                
client_print(0print_chat"............" );
                
nvault_pset(vault,szkey,sznew);
            }
        }
        
nvault_close(vault);
    }
}





public 
topten_showplr) {
    
    
    static 
knifetop[128];
    
    
format(knifetop128"%s/knifetop.vault",RecDir);
    
    if( 
file_exists(knifetop)) {
        
        new 
motd[2500];
        new 
szvault[64];

        
format(szvault,64,"knifetop");
        
        new 
vault nvault_open(szvault);
        if(
vault != -1) {
        
            
add(motd,2500,"<html><style>");
            
add(motd,2500,"body { background-color:#000000; }");
            
add(motd,2500,".tabel { color:#FFB000; }");
            
add(motd,2500,".header { background-color:#3d3c23; color:#FFB000;}");
            
add(motd,2500,"</style><body>");
            
add(motd,2500,"<br><br><table align=center border=1 width=90% class=tabel>");
            
add(motd,2500,"<tr><td class=header width=5% align=center>#</td><td class=header width=24%>Nombre</td><td class=header width=24%>Fakas Dadas</td><td class=header width=24%>Fakas Recibidas</td><td class=header width=24%>Fakas HeadShots</td></tr>");
            new 
szkey[4];
            for(new 
i=1;i<=10;i++) {
                new 
szreturn[128];
                
format(szkey,4,"%d",i);
                
nvault_get(vault,szkey,szreturn,128);
                
                new 
arg1[16], arg2[16], arg3[8],  arg4[8],  arg5[8];
                if(
parse(szreturnarg115arg215arg37arg47arg57) != 0) {
                    while (
containi(arg2"<") != -1replace(arg263"<""&lt")
                    while (
containi(arg2">") != -1replace(arg263">""&gt")
                    
add(motd,2048,"<tr><td>");
                    
add(motd,2048,szkey);
                    
add(motd,2048,"</td><td>");
                    
add(motd,2500,arg2);
                    
add(motd,2500,"</td><td>");
                    
add(motd,2500,arg3);
                    
add(motd,2500,"</td><td>");
                    
add(motd,2500,arg4);
                    
add(motd,2500,"</td><td>");
                    
add(motd,2500,arg5);
                    
add(motd,2500,"</td><td>");
                    
add(motd,2500,"</td></tr>");
                    
                    
                }
            }
            
            
nvault_close(vault);
            
            
add(motd,2500,"</table></body></html>");
            
show_motd(plr ,motd,"Faka Top");
        }
    } else {
        
ColorChat(plr RED"No tenes datos todavia en el Faka Top");
}
}

public 
top_reset(plr,level,cid) {
    if(!
cmd_access(plr,level,cid,0)) {
        return 
PLUGIN_HANDLED;
    }
    
    new 
name[32];
    
get_user_name(plrname32);
    
    
    static 
knifetop[128];
    
format(knifetop128"%s/knifetop.vault",RecDir);
    if( 
file_exists(knifetop)) {
        
delete_file(knifetop);
        
ColorChat(0GREEN"[AMBA CS] EL ADMIN %s reseteo el Faka Top"name);
        }
    return 
PLUGIN_HANDLED;
    

/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang11274\\ f0\\ fs16 \n\\ par }
*/ 
Attached Images
File Type: jpg faka-min.jpg (68.1 KB, 17 views)

Last edited by cahervar; 03-22-2021 at 18:17.
cahervar is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-22-2021 , 17:21   Re: Help! Wrong stats in stats plugin
Reply With Quote #2

First attach the code properly.
__________________


Dear admins. If somehow you managed to read this, plz fix.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
cahervar
Junior Member
Join Date: Mar 2021
Old 03-22-2021 , 18:18   Re: Help! Wrong stats in stats plugin
Reply With Quote #3

Quote:
Originally Posted by OciXCrom View Post
First attach the code properly.
I already did it
cahervar is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 03-22-2021 , 20:30   Re: Help! Wrong stats in stats plugin
Reply With Quote #4

This can be written more efficiently with much less code. Can you explain ideally how you want it to work?
__________________
Bugsy is offline
cahervar
Junior Member
Join Date: Mar 2021
Old 03-22-2021 , 22:50   Re: Help! Wrong stats in stats plugin
Reply With Quote #5

Quote:
Originally Posted by Bugsy View Post
This can be written more efficiently with much less code. Can you explain ideally how you want it to work?
Thanks for your answer! I`ll try to be as clear as posible

If you take a look at the attached picture, you can see that the column "Fakas Dadas" (which stands for "number of kill using knife" in argentinian slang), player #1 has only 2 points, while players with higher number of kills, are way down the list, thus making the rank useless.

I would need the rank stats to show players in order by amount ok kills, or, to be more clear, by the highest amount of "fakas dadas". If it is not that much trouble, it would be awesome if the stats took into account the ratio between "fakas dadas" and "fakas recibidas" (kills:deaths), but I don`t know if this is way more complicated to achieve.

I would need the plugin to use the same"include nvault" as the original i posted.

Also, i would need it to save data and not reset the ranks when the map changes, and that the admin can reset it with the comand "say fakareset"

The plugin should stay the same, but with the rankings order logically

Again, thanks for the help! Tell me if I need to clarify something
Attached Images
File Type: jpg faka-min.jpg (68.1 KB, 3 views)
cahervar is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 03-22-2021 , 23:25   Re: Help! Wrong stats in stats plugin
Reply With Quote #6

If I do write this, I will use nvault, but your current vault file will not be used as I'd likely use nvault array to simplify it. Meaning, your current data will be lost. Why do you say it must be nvault?
__________________

Last edited by Bugsy; 03-22-2021 at 23:26.
Bugsy is offline
cahervar
Junior Member
Join Date: Mar 2021
Old 03-22-2021 , 23:52   Re: Help! Wrong stats in stats plugin
Reply With Quote #7

Quote:
Originally Posted by Bugsy View Post
If I do write this, I will use nvault, but your current vault file will not be used as I'd likely use nvault array to simplify it. Meaning, your current data will be lost. Why do you say it must be nvault?
That sounds amazing. Thanks! Yes, the existing ranking data Is not relevant! So it Is not a problem. I need nvault because it Is the module that doesn't crash my server, for some reason I don't understand
cahervar is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 03-23-2021 , 08:55   Re: Help! Wrong stats in stats plugin
Reply With Quote #8

Quote:
Originally Posted by cahervar View Post
I need nvault because it Is the module that doesn't crash my server, for some reason I don't understand
And which is the module that's "crashing your server'?
__________________


Dear admins. If somehow you managed to read this, plz fix.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
cahervar
Junior Member
Join Date: Mar 2021
Old 03-23-2021 , 09:56   Re: Help! Wrong stats in stats plugin
Reply With Quote #9

Quote:
Originally Posted by OciXCrom View Post
And which is the module that's "crashing your server'?
adv_vault
cahervar is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 03-23-2021 , 20:49   Re: Help! Wrong stats in stats plugin
Reply With Quote #10

Added rank command and included updates since initial posting.

To-do:
1. Player data only updates when they disconnect, so the topten is not real time

You will need:
nVault Utility
nVault Array

PHP Code:

#include <amxmodx>
#include <amxmisc>
#include <nvault_util>
#include <nvault_array>
#include <colorchat> 

#if AMXX_VERSION_NUM >= 190
#define client_disconnect client_disconnected
#endif

new const Version[] = "0.2";

const 
MaxRanked 1000;

enum PlayerData
{
    
pd_Name33 ],
    
pd_AuthID34 ],
    
pd_Kills,
    
pd_Deaths,
    
pd_Headshots
}

new 
g_pdDataMAX_PLAYERS ][ PlayerData ];
new 
g_szTop101536 ];
new 
g_Vault;
new 
g_pEnabled;

public 
plugin_init() 
{
    
register_plugin"Knife Top" Version "bugsy" );
    
    
register_event"DeathMsg" "DeathMsg" "a" "1>0" "4=knife" );
    
g_pEnabled register_cvar("kt_enabled" "1" );
    
    
register_clcmd"say reset" "ResetRanks" ADMIN_BAN );
    
register_clcmd"say rank" "ShowRank" );
    
register_clcmd"say topten" "TopTen" );
    
register_clcmd"say /info" "ShowInfo" );
    
    if ( ( 
g_Vault nvault_open"KnifeTop" ) ) == INVALID_HANDLE )
        
set_fail_state"Error opening vault." );
}

public 
plugin_end()
{
    
nvault_closeg_Vault );
}

public 
client_authorizedid 
{
    if ( 
get_pcvar_numg_pEnabled ) && !is_user_botid ) ) 
    {    
        
get_user_authidid g_pdDataid ][ pd_AuthID ] , charsmaxg_pdData[][ pd_AuthID ] ) );
        
nvault_get_arrayg_Vault g_pdDataid ][ pd_AuthID ] , g_pdDataid ][ PlayerData:] , sizeofg_pdData[] ) );
        
get_user_nameid g_pdDataid ][ pd_Name ] , charsmaxg_pdData[][ pd_Name ] ) );
    }
}

public 
client_disconnectid )
{
    if ( 
get_pcvar_numg_pEnabled ) && !is_user_botid ) ) 
    {
        
nvault_set_arrayg_Vault g_pdDataid ][ pd_AuthID ] , g_pdDataid ][ PlayerData:] , sizeofg_pdData[] ) );
    }
}

public 
ShowInfoid 
{
    if ( 
get_pcvar_numg_pEnabled ) ) 
    {
        
ColorChatid RED "[AMBA CS] Escribe fakatop y ve el top10 de Fakas, o fakarank para ver tu estadistica" ); 
    }
    
    return 
PLUGIN_HANDLED;
}

public 
DeathMsg() 
{
    if ( 
get_pcvar_numg_pEnabled ) ) 
    {    
        new 
iKiller read_data); 
        
        
g_pdDataiKiller ][ pd_Kills ]++;
        
g_pdDataread_data) ][ pd_Deaths ]++;
        
g_pdDataiKiller ][ pd_Headshots ] += read_data);
    }
}

public 
TopTenid )
{
    if ( 
get_pcvar_numg_pEnabled ) ) 
    {
        
UpdateTop10();
        
show_motdid g_szTop10  "TOP FAKA" );
    }
    
    return 
PLUGIN_HANDLED;
}

public 
UpdateTop10()
{
    
enum _:Top10Data
    
{
        
nVault_Offset,
        
Rank_Value
    
}
    
    static 
iRankDataMaxRanked ][ Top10Data ];
    new 
pdDataPlayerData ] , iCurrentOffset iNextOffset;
    new 
iVault iCount iPos iAvailablePlayers;
    
    
nvault_closeg_Vault );
    if ( ( 
g_Vault nvault_open"KnifeTop" ) ) == INVALID_HANDLE )
        
set_fail_state"Error opening vault." );
    
    
iVault nvault_util_open"KnifeTop" );
    
iCount nvault_util_countiVault );
    
    if ( !
iCount )
    {
        
copyg_szTop10 charsmaxg_szTop10 ) , "<html>No players are ranked yet</html>" );
        return;
    }
    
    for ( new 
iRow iRow iCount && iRow MaxRanked iRow++ )
    {
        
iNextOffset nvault_util_read_arrayiVault iNextOffset "" pdDataPlayerData:] , sizeofpdData ) );
        
        
iRankDataiRow ][ nVault_Offset ] = iCurrentOffset;
        
iRankDataiRow ][ Rank_Value ] = ( pdDatapd_Kills ] - pdDatapd_Deaths ] );

        
iCurrentOffset iNextOffset;
    }
    
    
SortCustom2DiRankData miniCount MaxRanked ) , "SortCompare" );
    
    
iPos += copyg_szTop10iPos ] , charsmaxg_szTop10 ) - iPos "<html><style>body { background-color:#000000; }.tabel { color:#FFB000; }.header { background-color:#3d3c23; color:#FFB000;}</style><body>");
    
iPos += copyg_szTop10iPos ] , charsmaxg_szTop10 ) - iPos "<br><br><table align=center border=1 width=90% class=tabel>");
    
iPos += copyg_szTop10iPos ] , charsmaxg_szTop10 ) - iPos "<tr><td class=header width=5% align=center>#</td><td class=header width=24%>Nombre</td><td class=header width=24%>Fakas Dadas</td>" );
    
iPos += copyg_szTop10iPos ] , charsmaxg_szTop10 ) - iPos "<td class=header width=24%>Fakas Recibidas</td><td class=header width=24%>Fakas HeadShots</td></tr>");
    
    
iAvailablePlayers miniCount 10 );
    
    for ( new 
iAvailablePlayers i++ ) 
    {
        
nvault_util_read_arrayiVault iRankData][ nVault_Offset ] , "" pdDataPlayerData:] , sizeofpdData ) );
        
iPos += formatexg_szTop10iPos ] , charsmaxg_szTop10 ) - iPos "<tr><td>%d</td><td>%s</td><td>%d</td><td>%d</td><td>%d</td></tr>" i+pdDatapd_Name ] , pdDatapd_Kills ] , pdDatapd_Deaths ] , pdDatapd_Headshots ] );
    }
    
    
iPos += copyg_szTop10iPos ] , charsmaxg_szTop10 ) - iPos "</table></body></html>" );
    
    
nvault_util_closeiVault );
}

public 
ShowRankid )
{
    if ( 
get_pcvar_numg_pEnabled ) ) 
    {
        
enum _:RankData
        
{
            
AuthID34 ],
            
Rank_Value
        
}
        
        static 
iRankDataMaxRanked ][ RankData ];
        new 
pdDataPlayerData ] , iOffset;
        new 
iVault iCount iRow iRank;
        
        
nvault_closeg_Vault );
        if ( ( 
g_Vault nvault_open"KnifeTop" ) ) == INVALID_HANDLE )
            
set_fail_state"Error opening vault." );
        
        
iVault nvault_util_open"KnifeTop" );
        
iCount nvault_util_countiVault );
        
        if ( !
iCount )
        {
            
client_printid print_chat "* No players are ranked yet." );
            return 
PLUGIN_HANDLED;
        }
        
        for ( 
iRow iRow iCount && iRow MaxRanked iRow++ )
        {
            
iOffset nvault_util_read_arrayiVault iOffset "" pdDataPlayerData:] , sizeofpdData ) );
            
            
copyiRankDataiRow ][ AuthID ] , charsmaxiRankData[][ AuthID ] ) , pdDatapd_AuthID ] );
            
iRankDataiRow ][ Rank_Value ] = ( pdDatapd_Kills ] - pdDatapd_Deaths ] );
        }
        
nvault_util_closeiVault );
        
        
SortCustom2D_:iRankData miniCount MaxRanked ) , "SortCompare" );
        
        for ( 
iRow iRow iCount && iRow MaxRanked iRow++ )
        {
            if ( 
equaliRankDataiRow ][ AuthID ] , g_pdDataid ][ pd_AuthID ] ) )
            {
                
iRank = ( iRow );
                break;
            }
        }
                
        if ( 
iRank == )
        {
            
client_printid print_chat "* You are not yet ranked." );    
        }
        else
        {
            
nvault_get_arrayg_Vault iRankDataiRow ][ AuthID ] , pdDataPlayerData:] , sizeofpdData ) );
            
client_printid print_chat "* %s, your rank is %d, with %d kills, %d deaths, and %d headshots" pdDatapd_Name ] , iRank pdDatapd_Kills ] , pdDatapd_Deaths ] , pdDatapd_Headshots ] );
            
//ColorChat( id , RED, "[AMBA CS] Tu posicion es %s en el FakaTop, con %d cuchilladas" , g_pdData[ id ][ pd_Name ] , g_pdData[ id ][ pd_Kills ] );
        
}
    }
    
    return 
PLUGIN_HANDLED;
}

public 
SortCompareelem1[] , elem2[] ) 

    if ( 
elem1] > elem2] ) 
        return -
1
    else if(
elem1] < elem2] ) 
        return 
1
    else
        return 
0


public 
ResetRanksid level cid 
{
    if ( 
cmd_accessid level cid ) ) 
    {
        
nvault_pruneg_Vault get_systime() );
        
ColorChatGREEN "[AMBA CS] EL ADMIN %s reseteo el Faka Top" g_pdDataid ][ pd_Name ] );
        
        for ( new 
<= MAX_PLAYERS i++ )
        {
            
g_pdData][ pd_Kills ] = 0;
            
g_pdData][ pd_Deaths ] = 0;
            
g_pdData][ pd_Headshots ] = 0;
        }
    }

__________________

Last edited by Bugsy; 03-24-2021 at 21:47.
Bugsy is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:47.


Powered by vBulletin®
Copyright ©2000 - 2021, vBulletin Solutions, Inc.
Theme made by Freecode