Raised This Month: $ Target: $400
 0% 

Solved Get max array of X flags in the loop


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Supremache
Veteran Member
Join Date: Sep 2019
Location: Egypt
Old 01-29-2022 , 09:30   Re: Get max array of X flags in the loop
Reply With Quote #19

Quote:
Originally Posted by Natsheh View Post
The 2nd code in your post will output the last vip in the players array, test it with two vips and you will see what is happening.
Sorry, after testing it i found i was wrong but i tried to optimize for the code by using strlen native
Is there any problem with this ? or another way is faster than this ?
PHP Code:
@OnVipsOnlineid )
{
    new 
szBufferMAX_TEXT_LENGTH ], szPlayersMAX_PLAYERS ], iNum;

    
get_playersszPlayersiNum)//, "ch" );

    
for( new iIndexiiNumi++ )
    {
        if( 
g_iPlayer[ ( iIndex szPlayers] ) ][ VIP ] & g_iSettingsAccess_OnlineList ] )
        {
            
formatexszBufferstrlenszBuffer ) ], charsmaxszBuffer ), "%s, "g_iPlayeriIndex ][ Name ] )
        }
    }
    
    if( 
szBuffer] != EOS )
    {
        
szBufferstrlenszBuffer ) - ] = '.'
        
CC_SendMessageidszBuffer );
    }
    else
    {
        
CC_SendMessageid"There are no vip's online." );
    }

__________________
Youtube.com/Supremache

Bank System [Nvault - SQL Support]
VIP System
  • If you think it's that simple, then do it yourself.

Last edited by Supremache; 01-29-2022 at 10:15.
Supremache 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 02:10.


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