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

xREDIRECT - server redirect menu


Post New Thread Closed Thread   
 
Thread Tools Display Modes
Armymen
Junior Member
Join Date: Apr 2007
Old 11-18-2008 , 17:16   Re: xREDIRECT - server redirect menu
#1241

Hello. I wanted to say that your plugin is awesome!
Ok, now to the point.
Recently, server admins came up with a wish to not to see the advertisment because it makes harder to spectate someone (to spectate some suspicious player).
Is there a possibility that in upcoming future you could add this new CVAR?
Thanks for this great plugin anyway.
GL!
Armymen is offline
xOR
Veteran Member
Join Date: Jun 2006
Location: x-base.info
Old 11-18-2008 , 17:56   Re: xREDIRECT - server redirect menu
#1242

Quote:
Originally Posted by Armymen View Post
Hello. I wanted to say that your plugin is awesome!
Ok, now to the point.
Recently, server admins came up with a wish to not to see the advertisment because it makes harder to spectate someone (to spectate some suspicious player).
Is there a possibility that in upcoming future you could add this new CVAR?
Thanks for this great plugin anyway.
GL!
other people may proof me wrong but for now i think there are not so many admins who want that quite specific feature. i don't think i will implement it by default, this is way i will just give you instructions on how you can do it yourself. i decided to do it like this instead of just giving you a modified file because then for later plug-in versions you will be able to do that "patch" again:

download the source code and open it with a text editor.
search for this line:
Code:
get_players(naPlayers, nPlayerNum, "ac")    // alive players
simply doing a text search for "// alive" should find the line. now a little below that line you will find the header of a "for" loop:
Code:
for (nPlayerCount = 0; nPlayerCount < nPlayerNum; nPlayerCount++)
followed by a bracket on a line by itself. directly after that bracket insert a new line:
Code:
if (is_user_admin(naPlayers[nPlayerCount])) continue
do the same some lines below in the "// dead players" section.
make sure the new line has TABs in front of it so that it is on the same level with the line that follows it.

so here is an excerpt of how the first section would look like after the change:
Code:
                        get_players(naPlayers, nPlayerNum, "ac")    // alive players                         set_hudmessage(000, 100, 255, get_pcvar_float(cvar_announce_alivepos_x), get_pcvar_float(cvar_announce_alivepos_y), 0, 0.0, 10.0, 0.5, 0.10, 1)                         for (nPlayerCount = 0; nPlayerCount < nPlayerNum; nPlayerCount++)                         {                             if (is_user_admin(naPlayers[nPlayerCount])) continue                             if (get_pcvar_num(cvar_manual) >= 1)

after you made the changes compile the code and see if it works. i didn't test that code myself but if you need help with that change or got any problems i am here to support you.
__________________
Got more than one HL1 (CS, DoD, NS, TS, TFC, HLDM...) server? Check:
xOR is offline
Armymen
Junior Member
Join Date: Apr 2007
Old 11-18-2008 , 18:43   Re: xREDIRECT - server redirect menu
#1243

Thanks for giving an advice, but this do not work.
I hope you have more possible solutions for this
P.s. I`m going to sleep now, hope you will come up with great idea how to help me
And thanks for helping.

Last edited by Armymen; 11-18-2008 at 18:51.
Armymen is offline
xOR
Veteran Member
Join Date: Jun 2006
Location: x-base.info
Old 11-18-2008 , 19:06   Re: xREDIRECT - server redirect menu
#1244

Quote:
Originally Posted by Armymen View Post
Thanks for giving an advice, but this do not work.
I hope you have more possible solutions for this
P.s. I`m going to sleep now, hope you will come up with great idea how to help me
And thanks for helping.
"does not work" is not an error description.

i wrote a step-by-step guide. at which step are you stuck? don't you find the text sections? doesn't it compile? did it compile but admins can still see announcements? did it compile but not load? did your house burn down while you tried to install it? did your cat get asthma from looking at the code?
__________________
Got more than one HL1 (CS, DoD, NS, TS, TFC, HLDM...) server? Check:

Last edited by xOR; 11-18-2008 at 19:12.
xOR is offline
Armymen
Junior Member
Join Date: Apr 2007
Old 11-19-2008 , 04:02   Re: xREDIRECT - server redirect menu
#1245

Sorry for giving such a bad explanation.
Plugin does compile fine and server gives no error about it either.
All servers loads just as usually.
But the advertisment still can see everyone.

Last edited by Armymen; 11-19-2008 at 14:22.
Armymen is offline
xOR
Veteran Member
Join Date: Jun 2006
Location: x-base.info
Old 11-21-2008 , 09:38   Re: xREDIRECT - server redirect menu
#1246

then probably something went wrong when you made the changes to the file. please post your xredirect.sma after you made your modifications so i can search where the problem is.
__________________
Got more than one HL1 (CS, DoD, NS, TS, TFC, HLDM...) server? Check:
xOR is offline
Armymen
Junior Member
Join Date: Apr 2007
Old 11-21-2008 , 10:03   Re: xREDIRECT - server redirect menu
#1247

Here you go.
Attached Files
File Type: sma Get Plugin or Get Source (xredirect.sma - 893 views - 77.7 KB)
Armymen is offline
xOR
Veteran Member
Join Date: Jun 2006
Location: x-base.info
Old 11-21-2008 , 13:34   Re: xREDIRECT - server redirect menu
#1248

you didn't add the second (and in your case: more important) line for the "// dead players" section.

you said it would disturb admins who are spectating. while they are spectating, they are obviously not alive. so you gotta add the line for the other section too, then it should work.

so the excerpt looks like this:
Code:
                        get_players(naPlayers, nPlayerNum, "bc") // dead players                         set_hudmessage(000, 100, 255, get_pcvar_float(cvar_announce_deadpos_x), get_pcvar_float(cvar_announce_deadpos_y), 0, 0.0, 10.0, 0.5, 0.10, 1)   // show list at lower position for them so it is not covered by the "spectator bars"                         for (nPlayerCount = 0; nPlayerCount < nPlayerNum; nPlayerCount++)                         {                             if (is_user_admin(naPlayers[nPlayerCount])) continue                             if (get_pcvar_num(cvar_manual) >= 1)
__________________
Got more than one HL1 (CS, DoD, NS, TS, TFC, HLDM...) server? Check:
xOR is offline
imran
Junior Member
Join Date: Nov 2008
Old 11-21-2008 , 19:48   Re: xREDIRECT - server redirect menu
#1249

man i did what u told me

MY settings

redirect_external_address "123.123.123.123:27015
redirect_active 1
redirect_manual 3
redirect_announce 120
redirect_announce_mode 3
redirect_check_method 2
redirect_show 1
redirect_follow 1
redirect_retry 1

Not working :S
imran is offline
Mordekay
Squirrel of Fortune
Join Date: Apr 2006
Location: Germany
Old 11-22-2008 , 04:35   Re: xREDIRECT - server redirect menu
#1250

That's not really much informations you give here, but from what i see you are issing one quoteationmark at the end:
redirect_external_address "123.123.123.123:27015"
__________________

Mordekay is offline
Closed Thread



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 16:41.


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