Raised This Month: $51 Target: $400
 12% 

Change line after each player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
ecca
Sexy Santa
Join Date: Jan 2011
Old 05-26-2012 , 08:34   Change line after each player
Reply With Quote #1

Ye, ive tried many ways and i cant get it working xD


PHP Code:
for(new 1<= MaxClientsi++) 
    {
        if(
IsClientInGame(i))
        {
            
GetClientName(iAdminNamessizeof(AdminNames));
            
Format(szTextsizeof(szText), "Hello:\n\n \n%s"AdminNames);

            
BfWriteByte(hBuffer1);
            
BfWriteString(hBufferszText);
            
EndMessage(); 
        }
    } 
ecca is offline
ecca
Sexy Santa
Join Date: Jan 2011
Old 05-26-2012 , 08:39   Re: Change line after each player
Reply With Quote #2

Sorry if i didnt wrote enough information.

I want to change to a new line after each player in the loop, like

Quote:
Hello

ecca
Silvers
ecca is offline
mcpan313
Senior Member
Join Date: Mar 2010
Old 05-26-2012 , 09:01   Re: Change line after each player
Reply With Quote #3

this?

PHP Code:
    new String:szText[192] = "Hello:\n\n \n";
    for(new 
1<= MaxClientsi++) 
    {
        if(
IsClientInGame(i))
        {
            
Format(szTextsizeof(szText), "%s%N\n"szTexti);

            
BfWriteByte(hBuffer1);
            
BfWriteString(hBufferszText);
            
EndMessage();
        }
    } 
edit: try again.
Code:
Format(szText, sizeof(szText), "%s%N\n", szText, i);
__________________
sorry, for my poor english.

Last edited by mcpan313; 05-26-2012 at 10:59. Reason: my bad
mcpan313 is offline
Send a message via MSN to mcpan313
ecca
Sexy Santa
Join Date: Jan 2011
Old 05-26-2012 , 09:22   Re: Change line after each player
Reply With Quote #4

Didnt work, it only prints out one name, when i use my command so my name disappear the other guys name comes there :S
ecca is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 05-26-2012 , 09:39   Re: Change line after each player
Reply With Quote #5

What kind usermessage you are trying send ?
Bacardi is offline
ecca
Sexy Santa
Join Date: Jan 2011
Old 05-26-2012 , 09:41   Re: Change line after each player
Reply With Quote #6

I'm doing a ready up system and i want to list all players that hasen't a bool on them and print them out to all and when they type ready the will disappear from the list because of the bool is set.
ecca is offline
mcpan313
Senior Member
Join Date: Mar 2010
Old 05-26-2012 , 10:54   Re: Change line after each player
Reply With Quote #7

Quote:
Originally Posted by ecca View Post
Didnt work, it only prints out one name, when i use my command so my name disappear the other guys name comes there :S
try again.
__________________
sorry, for my poor english.
mcpan313 is offline
Send a message via MSN to mcpan313
ecca
Sexy Santa
Join Date: Jan 2011
Old 05-26-2012 , 11:09   Re: Change line after each player
Reply With Quote #8

Hmm iv'e tryed again after the code you changed and it still only appear one name xD, ive tryed implodestring and so one but i cant get it working hmm
ecca is offline
11530
Veteran Member
Join Date: Sep 2011
Location: Underworld
Old 05-27-2012 , 02:37   Re: Change line after each player
Reply With Quote #9

What's wrong with:

PHP Code:
PrintToChatAll("Hello:%c%c"1313)
for(new 
1<= MaxClientsi++) 
{
    if(
IsClientInGame(i) && !IsFakeClient(i) && !eccasarray[i])
    {
        
PrintToChatAll("%N"i)
    }

That'll print every name who doesn't have the bool in the array, eccasarray, set.
__________________

Last edited by 11530; 05-27-2012 at 02:43.
11530 is offline
Leonardo
Veteran Member
Join Date: Feb 2010
Location: 90's
Old 05-27-2012 , 03:26   Re: Change line after each player
Reply With Quote #10

\r\n
Leonardo is offline
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 10:32.


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