Raised This Month: $ Target: $400
 0% 

Table Align in MOTD


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 10-17-2009 , 10:18   Table Align in MOTD
Reply With Quote #1

I'm working on some in-game ranking system for other games like HLDM, ESF, etc. and I need help with aligning stuff in MOTD. The MOTD doesn't support HTML so I have to play with text formatting.

PHP Code:
stock fnUpdateTop15()
{
        
g_szTop15[0] = 0;
 
        new 
iSize ArraySize(g_aSteamID), szSteamID[32], szName[32], iKillsiLen;
        
iSize iSize 15 15 iSize;
        
iLen formatex(g_szTop152047"%6s%22s%s^n^n""Rank""Name""Kills");
 
        for (new 
iRankiRank iSizeiRank++)
        {
                
ArrayGetString(g_aSteamIDiRankszSteamID31);
                
TrieGetString(g_tNameszSteamIDszName31);
                
TrieGetCell(g_tKillsszSteamIDiKills);
 
                
iLen += formatex(g_szTop15[iLen], 2047 iLen"%-7.2d%22s%6d^n"iRank 1szNameiKills);
        }

As you can see I've already made something about text formatting, but that doesn't fit my needs yet.

This is what I get:
Attached Thumbnails
Click image for larger version

Name:	motd.jpg
Views:	371
Size:	80.5 KB
ID:	51808  
__________________
hleV is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-17-2009 , 10:33   Re: Table Align in MOTD
Reply With Quote #2

Try : "%6s %-22.22s %6s^n^n"
__________________

Last edited by Arkshine; 10-17-2009 at 10:35.
Arkshine is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 10-17-2009 , 16:45   Re: Table Align in MOTD
Reply With Quote #3

The description line is fine. The problem is with players' kills being displayed in different places, as you can see in the image attached.
__________________
hleV is offline
OneMoreLevel
Senior Member
Join Date: Aug 2009
Location: Look behind you... Very
Old 10-17-2009 , 16:46   Re: Table Align in MOTD
Reply With Quote #4

Quote:
Originally Posted by hleV View Post
I'm working on some in-game ranking system for other games like HLDM, ESF, etc. and I need help with aligning stuff in MOTD. The MOTD doesn't support HTML so I have to play with text formatting.

PHP Code:
stock fnUpdateTop15()
{
        
g_szTop15[0] = 0;
 
        new 
iSize ArraySize(g_aSteamID), szSteamID[32], szName[32], iKillsiLen;
        
iSize iSize 15 15 iSize;
        
iLen formatex(g_szTop152047"%6s%22s%s^n^n""Rank""Name""Kills");
 
        for (new 
iRankiRank iSizeiRank++)
        {
                
ArrayGetString(g_aSteamIDiRankszSteamID31);
                
TrieGetString(g_tNameszSteamIDszName31);
                
TrieGetCell(g_tKillsszSteamIDiKills);
 
                
iLen += formatex(g_szTop15[iLen], 2047 iLen"%-7.2d%22s%6d^n"iRank 1szNameiKills);
        }

As you can see I've already made something about text formatting, but that doesn't fit my needs yet.

This is what I get:
Are you sure HL1 doesnt work with HTML, i tried it and it works fine. You just need to read from a file.
__________________
60/100 60%
[||||||||||||||||||||]
Project: Warfighter mod
Blog:
http://sites.google.com/site/dailymultitasker/
PHP Code:
   if ( i_help_you "Yes" ) == )
    
set_user_karma(onemorelevel,add,+1
OneMoreLevel is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-17-2009 , 17:08   Re: Table Align in MOTD
Reply With Quote #5

I was meant something : "%-7.2d %-22.22s %6d^n"
__________________
Arkshine is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 10-17-2009 , 17:13   Re: Table Align in MOTD
Reply With Quote #6

Quote:
Originally Posted by OneMoreLevel View Post
Are you sure HL1 doesnt work with HTML, i tried it and it works fine. You just need to read from a file.
Yes I am sure. In CS it works, but in HL it doesn't. I have no idea how did it work for you.
Quote:
Originally Posted by Arkshine View Post
I was meant something : "%-7.2d %-22.22s %6d^n"
Same thing. Everything is flawless except for the kills.
__________________
hleV is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-17-2009 , 17:37   Re: Table Align in MOTD
Reply With Quote #7

Did you try %-6.6d ?
__________________
Arkshine is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 10-17-2009 , 18:27   Re: Table Align in MOTD
Reply With Quote #8

Still nothing.
__________________
hleV is offline
Old 10-18-2009, 02:43
bwin.reebok
This message has been deleted by Exolent[jNr]. Reason: Not your thread.
Old 10-18-2009, 05:38
hleV
This message has been deleted by Exolent[jNr]. Reason: Not your thread.
Old 10-18-2009, 08:15
bwin.reebok
This message has been deleted by Exolent[jNr]. Reason: Not your thread.
Old 10-18-2009, 12:46
fysiks
This message has been deleted by Exolent[jNr]. Reason: Not your thread.
OneMoreLevel
Senior Member
Join Date: Aug 2009
Location: Look behind you... Very
Old 10-18-2009 , 15:12   Re: Table Align in MOTD
Reply With Quote #9

Quote:
Originally Posted by hleV View Post
Yes I am sure. In CS it works, but in HL it doesn't. I have no idea how did it work for you.

Same thing. Everything is flawless except for the kills.

I think I know what your problem is. You are probably using Old VGUI tables, you need to use new ones, go to:

~ > Options > MultiPlayer > Menu type (something similar)

Change that to the one that doesnt say old style.

If it isnt on old style try reinstalling
__________________
60/100 60%
[||||||||||||||||||||]
Project: Warfighter mod
Blog:
http://sites.google.com/site/dailymultitasker/
PHP Code:
   if ( i_help_you "Yes" ) == )
    
set_user_karma(onemorelevel,add,+1
OneMoreLevel is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 10-18-2009 , 16:46   Re: Table Align in MOTD
Reply With Quote #10

What does it have to do with VGUI Menus? In HL options there's no such thing as setting old and new style of it.
__________________
hleV 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 22:32.


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