Raised This Month: $344 Target: $400
 86%   Almost there!

Top Players Menu


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Tripaloski
Member
Join Date: Jul 2017
Old 07-26-2017 , 14:42   Top Players Menu
Reply With Quote #1

I have this top10 in motd.

PHP Code:
format_top15(sBuffer[MAX_BUFFER_LENGTH 1])
{
    new 
istate[4]
    new 
iLen 0

    
new lNick[16], lKills[16], lDeaths[16], lRank[16]
    
format(lNick15"Jogador")
    
format(lKills15"Frags [HS]")
    
format(lDeaths15"Mortes")
    
format(lRank15"Rank")    

    
iLen formatsBufferMAX_BUFFER_LENGTH
                  
"</head><style>body{color:#ffffff;background-color:#191919;margin-top:5}.A{background-color:#7f7d68}.B{background-color:#636151}td{font-size:14px}</style><center><img src=^"https://goo.gl/UU9ZDv^"></center></img><table width=100%% border=0 align=center cellpadding=1 cellspacing=1>" )
    
iLen += formatsBuffer[iLen], MAX_BUFFER_LENGTH iLen,
                  
"<tr bgcolor=#323232><td>%s<td>%s<td>%s<td>%s<td>%s",
                  
"Pos#"lNicklKillslDeathslRank )    
    
    new Array:
aKey ArrayCreate35 )
    new Array:
aData ArrayCreate128 )
    new Array:
aAll ArrayCreateFvaultData )
    
    
fvault_loadg_VaultWarSkillaKeyaData )
    
    new 
iArraySize ArraySizeaKey )
    
    new 
DataFvaultData ]
    
    new 
i
    
for( 0iArraySizei++ )
    {
        
ArrayGetStringaKeyiDataszSteamID ], sizeof DataszSteamID ] - )
        
ArrayGetStringaDataiDataszSkillP_Data ], sizeof DataszSkillP_Data ] - )
        
        
ArrayPushArrayaAllData )
    }
    
    
ArraySortaAll"SortData" )
    new 
szPlayerPoints]
    new 
szPlayerLevel]
    new 
szPlayerKnifeKills]
    new 
szPlayerKnifeDeaths]
    new 
szPlayerGrenadeKills]
    new 
szPlayerGrenadeDeaths]
    new 
szPlayerBombExplosions]
    new 
szPlayerDefusedBombs]
    new 
szPlayerPlantedBombs]
    new 
szPlayerWinRounds]
    new 
szPlayerLoseRounds]
    new 
szPlayerMelhorJogador]
    new 
szPlayerResetScore]
    new 
szPlayerKillStreak]
    new 
szPlayerAssistencias]
    new 
szPlayerShowJogadorRonda]
    new 
szPlayerShowRoundMsg]
    new 
szPlayerReceberPontos]
    new 
szPlayerMP]
    new 
szPlayerConnectMsg]        
    new 
szPlayerKillMsg]
    new 
szPlayerStatusMsg]            
    new 
szPlayerHeads]        
    new 
szPlayerKillsTotal]
    new 
szPlayerDeathsTotal]    
    new 
szPlayertiempo]
    new 
szPlayertiempo1]        
    new 
szPlayertiempo2]
    new 
szPlayertiempo3]
    new 
szPlayerRankPoints]    
    
    new 
szName22 ]
    new 
iSize clampiArraySize010 )
    
    new 
j
    
for( 0iSizej++ )
    {
        
ArrayGetArrayaAlljData )
        
        
fvault_get_datag_VaultWarSkillNomesDataszSteamID ], szNamecharsmaxszName ) )
        
        
replace_allszNamecharsmaxszName ), "<""[" )
        
replace_allszNamecharsmaxszName ), ">""]" )
        
        
parseDataszSkillP_Data ],
        
szPlayerPointscharsmaxszPlayerPoints ),
        
szPlayerLevelcharsmaxszPlayerLevel ),
        
szPlayerKnifeKillscharsmaxszPlayerKnifeKills ),
        
szPlayerKnifeDeathscharsmaxszPlayerKnifeDeaths ),
        
szPlayerGrenadeKillscharsmaxszPlayerGrenadeKills ),
        
szPlayerGrenadeDeathscharsmaxszPlayerGrenadeDeaths ),
        
szPlayerBombExplosionscharsmaxszPlayerBombExplosions ),
        
szPlayerDefusedBombscharsmaxszPlayerDefusedBombs ),
        
szPlayerPlantedBombscharsmaxszPlayerPlantedBombs ),
        
szPlayerWinRoundscharsmaxszPlayerWinRounds ),
        
szPlayerLoseRoundscharsmaxszPlayerLoseRounds ),
        
szPlayerMelhorJogadorcharsmaxszPlayerMelhorJogador ),
        
szPlayerResetScorecharsmaxszPlayerResetScore ),
        
szPlayerKillStreakcharsmaxszPlayerKillStreak ),
        
szPlayerAssistenciascharsmaxszPlayerAssistencias ),
        
szPlayerShowJogadorRondacharsmaxszPlayerShowJogadorRonda ),
        
szPlayerShowRoundMsgcharsmaxszPlayerShowRoundMsg ),
        
szPlayerReceberPontoscharsmaxszPlayerReceberPontos ),
        
szPlayerMPcharsmaxszPlayerMP ),        
        
szPlayerConnectMsgcharsmaxszPlayerConnectMsg ),
        
szPlayerKillMsgcharsmaxszPlayerKillMsg ),
        
szPlayerStatusMsgcharsmaxszPlayerStatusMsg ),
        
szPlayerHeadscharsmaxszPlayerHeads ),
        
szPlayerKillsTotalcharsmaxszPlayerKillsTotal ),
        
szPlayerDeathsTotalcharsmaxszPlayerDeathsTotal ),
        
szPlayertiempocharsmaxszPlayertiempo ),
        
szPlayertiempo1charsmaxszPlayertiempo1 ),
        
szPlayertiempo2charsmaxszPlayertiempo2 ),
        
szPlayertiempo3charsmaxszPlayertiempo3 ),
        
szPlayerRankPointscharsmaxszPlayerRankPoints ))    
        
        new 
g_iLevel str_to_numszPlayerLevel )    
        new 
g_iHSS str_to_numszPlayerHeads )    
        new 
g_iKSS str_to_numszPlayerKillsTotal )    
        new 
g_iMSS str_to_numszPlayerDeathsTotal )    
        
        
iLen += format(sBuffer[iLen], MAX_BUFFER_LENGTH iLen"<tr class=%s><td>%d<td>%s<td>%d [%d]<td>%d<td>%s <IMG src=^"%s^">",istate1szNameg_iKSS,
                        
g_iHSSg_iMSSCLASSESg_iLevel ],IMAGEMg_iLevel ] )
    }
    
copy(sBuffer[iLen],MAX_BUFFER_LENGTH iLen,"</table></font><hr size=1 color=blue><b><font size=2>Developed by: MonSter '|RUCA| <3*</b>"

I wanted to make a menu where it appears in order to rank all players.

Last edited by Tripaloski; 07-26-2017 at 14:43.
Tripaloski is offline
leonardo121
Member
Join Date: Sep 2013
Old 07-26-2017 , 16:38   Re: Top Players Menu
Reply With Quote #2

Few information.
PHP Code:
for( 0iSizej++ ) 
change to
PHP Code:
for( iSize>= 0j-- ) 
i guess

Last edited by leonardo121; 07-26-2017 at 16:38.
leonardo121 is offline
Tripaloski
Member
Join Date: Jul 2017
Old 07-26-2017 , 16:51   Re: Top Players Menu
Reply With Quote #3

I wanted something like this

https://amxmodx-es.com/Thread-Top-Ra...rags-y-muertes

Last edited by Tripaloski; 07-26-2017 at 17:01.
Tripaloski is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-27-2017 , 08:30   Re: Top Players Menu
Reply With Quote #4

Quote:
Originally Posted by leonardo121 View Post
Few information.
PHP Code:
for( 0iSizej++ ) 
change to
PHP Code:
for( iSize>= 0j-- ) 
i guess
This is 100% wrong...
__________________
@Jailbreak Main Mod v2.6.6 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
leonardo121
Member
Join Date: Sep 2013
Old 07-27-2017 , 08:54   Re: Top Players Menu
Reply With Quote #5

Quote:
Originally Posted by Natsheh View Post
This is 100% wrong...
Why is wrong ?
is a decrement for i guess

Last edited by leonardo121; 07-27-2017 at 08:55.
leonardo121 is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-27-2017 , 14:04   Re: Top Players Menu
Reply With Quote #6

Quote:
Originally Posted by leonardo121 View Post
Why is wrong ?
is a decrement for i guess
First it will get the array out of index and reverseing the loop wont solve the problem.

To reach his goal he have to make adouble loop.
__________________
@Jailbreak Main Mod v2.6.6 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
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 06:49.


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