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-28-2022 , 07:15   Re: Get max array of X flags in the loop
Reply With Quote #5

Quote:
Originally Posted by jimaway View Post
that's exactly what it does
Yes, i was think adding strlen out the loop will do bug but it's work
Thanks you

PHP Code:
@OnVipsOnlineid )
{
    new 
szBufferMAX_TEXT_LENGTH ], szPlayersMAX_PLAYERS ], iPlayeriNum;
    
formatexszBuffercharsmaxszBuffer ), "&x04Online:&x01 " );
    
    
get_playersszPlayersiNum "ch" );

    for( new 
iIndexiiNumi++ )
    {
        if( 
g_iPlayer[ ( iIndex szPlayers] ) ][ VIP ] & g_iSettingsAccess_OnlineList ] )
        {  
// ( iPlayer = iIndex ) is see this way is better than using this iPlayer++ 
            
formatszBuffercharsmaxszBuffer ), "%s%s, "szBufferg_iPlayer[ ( iPlayer iIndex ) ][ Name ] );
        }
    }

    if( 
iPlayer )
    {
        
szBufferstrlenszBuffer ) - ] = '.' // Changed the strlen form -1 to -2 because i added a space 
    
}
    else
    {
        
addszBuffercharsmaxszBuffer ), "There are no vip's online." );
    }
    
    
CC_SendMessageidszBuffer );

__________________
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-28-2022 at 07:28.
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 11:40.


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