Raised This Month: $ Target: $400
 0% 

Showing Not Ready


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Diegorkable
Veteran Member
Join Date: Jun 2011
Old 07-23-2011 , 10:56   Re: Showing Not Ready
Reply With Quote #1

It gets if the player is not ready (if g_bIsReady is false) then it copies his name into a variable (playername) and adds to it a ^n, so if my name would be "Diego" then it adds it to it "Diego^n", The reason I wanted to do this is that the Not Ready will be a column, list.

Can't hudmessage be a column?
Diegorkable is offline
nikhilgupta345
Veteran Member
Join Date: Aug 2009
Location: Virginia
Old 07-23-2011 , 11:27   Re: Showing Not Ready
Reply With Quote #2

Are you not getting index out of bounds errors?

The first thing I can see is that this:

new bool:g_bIsReady[11]


needs to be

new bool:g_bIsReady[33]


because you need to hold every player index (1-32).

Try this:

PHP Code:
if (playersleft != 0
    { 
        new 
players[32], pnumtempid;  
      
        
get_players(playerspnum"ch");  
      
        new 
szPlayerName32 ];
        
        for( new 
ii<pnumi++ )  
        {  
            
tempid players[i];  
            if (
g_bIsReady[tempid] == false
            { 
                
get_user_name(tempidplayername31)
                
                
addnotrdycharsmaxnotrdy ), playername );
                
addnotrdycharsmaxnotrdy ), "^n" );
            } 
             
        }  
             
        if (
equali(notrdy"Not Ready:^n")) 
        { 
            
notrdy "Not Ready:^n^nNone." 
        

         
        
set_hudmessage(1272552550.030.0506.012.0
        
show_hudmessage(0notrdy
         
        
notrdy "Not Ready:^n" 
        
set_task(1.0"ShowLeft"
    } 
__________________
Quote:
Originally Posted by DarkGod View Post
nikhilgupta generates his plugins using sheer awesome.
If you like my work, please

Last edited by nikhilgupta345; 07-23-2011 at 11:29.
nikhilgupta345 is offline
Send a message via ICQ to nikhilgupta345 Send a message via Yahoo to nikhilgupta345
Reply



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 00:46.


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