Monthly Target: $400 Donations: $298
 74% 

panel nav_progress [Cs:s]


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Bacardi
Veteran Member
Join Date: Jan 2010
Old 04-30-2012 , 17:54   panel nav_progress [Cs:s]
Reply With Quote #1

UserMessage "VGUIMenu" "nav_progress"

Some of you sure recognize this. Especially when have add one bot in game and server start generate nav file if it not exist.
And that time you almost can't do anything, you see your mouse cursor on screen and this panel what show server progress.
You can close this panel ALT+F4 or go your menu with ESC.

Lets create this.

*tip
Can quick test in game, type in console
showpanel nav_progress
hidepanel nav_progress




Simple way, using ShowVGUIPanel, we get it appear in player screen.
PHP Code:
ShowVGUIPanel(client"nav_progress"); 
At this point if you get already some message and different load bar status, it's because there have been remaining some data last time when player seen this panel and have not been erased.
Yeah, this data are store in players.
As you can see my picture, it have not message and loading bar full (data empty).


Start customize our panel!

Need build proper keyvalue structure to get it work. (I peek from sourcecode2007)
It looks like this!

You build like this
PHP Code:
    new Handle:kv CreateKeyValues("data");
    
KvSetString(kv"msg",     "My own message");
    
KvSetNum(kv,    "total",    100);
    
KvSetNum(kv,    "current",  33); 
Then send it to player and close handel just make sure no leak appears.
PHP Code:
    ShowVGUIPanel(client"nav_progress"kv);
    
CloseHandle(kv); 


Here example plugin, if you want test for fun


When use UserMsg to send "nav_progress"
UserMessage

Last edited by Bacardi; 06-06-2012 at 10:05. Reason: update title :P NOT WORK in TF2
Bacardi is offline
TnTSCS
SourceMod Donor
Join Date: Oct 2010
Location: Undisclosed...
Old 04-30-2012 , 18:16   Re: panel nav_progress
Reply With Quote #2

nice... this would be good for a plugin or two of mine
__________________
View my Plugins | Donate
TnTSCS is offline
ReFlexPoison
☠☠☠
Join Date: Jul 2011
Old 04-30-2012 , 21:44   Re: panel nav_progress
Reply With Quote #3

What games would this support?
__________________
ReFlexPoison is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Old 05-01-2012 , 01:40   Re: panel nav_progress
Reply With Quote #4

Quote:
Originally Posted by ReFlexPoison View Post
What games would this support?
Not sure,
- Cs:s show it center of screen.
- HL2MP & Dod:s show it little box upper left corner.

I assume, in those games where bots use nav files, have better panel layout to see server progress when generate it.

It could depend players HUD/clientschemes files what kind panel it will create...

*edit
found, from <mod>/Resource/UI/NavProgress.res
*edit
Yep, I copy this file from Cs:s to HL2MP and it created same panel.

Last edited by Bacardi; 05-01-2012 at 02:06.
Bacardi is offline
ReFlexPoison
☠☠☠
Join Date: Jul 2011
Old 05-02-2012 , 12:45   Re: panel nav_progress
Reply With Quote #5

Well, seeing that it will be supported in DoD and HL2:MP, I'm assuming it will work in TF2 aswell.
Only reason I say that is I've noticed that TF2 has many similar resources that DoD wand HL2:MP have. (Including Hud Text)
__________________
ReFlexPoison is offline
Blowst
Member
Join Date: Feb 2011
Location: Korea, Republic of
Old 05-04-2012 , 14:03   Re: panel nav_progress
Reply With Quote #6

Wow... Great!
__________________
Sorry about my poor English


Blowst is offline
Ixel
Senior Member
Join Date: Jul 2005
Old 05-13-2012 , 08:54   Re: panel nav_progress
Reply With Quote #7

Nicely done but sadly doesn't work in Team Fortress 2.
Ixel is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 05-14-2012 , 18:07   Re: panel nav_progress
Reply With Quote #8

Quote:
Originally Posted by Ixel View Post
Nicely done but sadly doesn't work in Team Fortress 2.
Did you try copying the above mentioned file over? I noticed it wasn't included in the tf2 gcf files, so you could probably just download it to clients.
bl4nk is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Old 05-15-2012 , 07:55   Re: panel nav_progress
Reply With Quote #9

Quote:
Originally Posted by bl4nk View Post
Quote:
Originally Posted by Ixel View Post
Nicely done but sadly doesn't work in Team Fortress 2.
Did you try copying the above mentioned file over? I noticed it wasn't included in the tf2 gcf files, so you could probably just download it to clients.
I tested in TF2, with and without this NavProgress.res file.
I executed nav_generate to start creating nav file and there not appear any panel to show this "progress", in console it print output text.
Player can move during this progress but lags like hell...
Bacardi is offline
NameUser
Senior Member
Join Date: Apr 2012
Location: Bay Area, California
Old 06-06-2012 , 01:15   Re: panel nav_progress
Reply With Quote #10

Quote:
Originally Posted by Bacardi View Post
I tested in TF2, with and without this NavProgress.res file.
I executed nav_generate to start creating nav file and there not appear any panel to show this "progress", in console it print output text.
Player can move during this progress but lags like hell...
Maybe you're not supposed to (normally) move whilst a progress bar like that is happening?
__________________
NameUser is offline
Send a message via Skype™ to NameUser
Reply


Thread Tools
Display Modes

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 01:45.


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