Raised This Month: $ Target: $400
 0% 

Help buffer max string length on advanced valut by Destro


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
@LeX
Junior Member
Join Date: Nov 2018
Old 11-07-2022 , 05:22   Help buffer max string length on advanced valut by Destro
Reply With Quote #1

Hi, i recently started working with advanced vault system made by Destro and version 1.5

the plugin i want to make is ranktop, something like that.
i will try to explain, i have the following function:
PHP Code:
public ShowTop(idNum)
{
    new 
g_sort adv_vault_sort_create(g_vaultORDER_DESC602000CS_Stats[STATS_KILLS])

    new 
mvpkeyindexPlayer[32]
    
    new 
toploop min(adv_vault_sort_numresult(g_vaultg_sort), Num)

    
console_print(id,"")
    
console_print(id,"================ Top MVP ================")
    for(new 
position=Num-15 position <= toploopposition++)
    {

        if(
position >= Num+1)
            break

        
keyindex adv_vault_sort_position(g_vaultg_sortposition)
        
        if(!
adv_vault_get_prepare(g_vaultkeyindex)) continue
        
        
mvp adv_vault_get_field(g_vaultCS_Stats[STATS_MvP])
        
        
adv_vault_get_keyname(g_vaultkeyindexPlayer31)

        
console_print(id"#%d Player: %s - Total Kills: %d"positionPlayermvp)
    }
    
console_print(id,"===========================================")
    
console_print(id,"")
    
adv_vault_sort_destroy(g_vaultg_sort)

this is just an example
i want these values to be displayed in motd
just that... if i want that when... let's say a player write "/topmvp 300" in chat
to display the entire top from 1 to 300 in motd format

you already know what the problem would be, the maximum size of the buffer
i can't display elements in motd larger than... i don't know exactly... 3072?
sorry, i don't know exactly anymore

both the html code and the values from the advanced vault are stored in that buffer
and... you will realize that it will exceed the maximum size very quickly

my question is, is there any possibility to display exorbitantly large elements in that motd ?

and i mean by "exorbitant" in the pure sense.
when i specified a top from 1 to 300 it was an example
the initial value can easily exceed 2000 positions

this method will not only help me with this "ranktop" but it will also help me with other projects that i haven't finished yet and have the same problem with max buffer size.

if i'm not mistaken, someone else wanted something similar here, but the answers didn't give me a conclusive solution

Last edited by @LeX; 11-07-2022 at 05:23.
@LeX is offline
 



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 20:22.


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