Login x
User Name:
Password:
Social Links Facebook Twitter YouTube Steam RSS News Feeds

Members Online

»
0 Active | 62 Guests
Online:

LATEST FORUM THREADS

»
CoD: Battle Royale
CoD+UO Map + Mod Releases
Damaged .pk3's
CoD Mapping
heli to attack ai
CoD4 SP Mapping

Forums

»

Welcome to the MODSonline.com forums. Looking for Frequently Asked Questions? Check out our FAQs section or search it out using the SEARCH link below. If you are new here, you may want to check out our rules and this great user's guide to the forums and the website.
For more mapping and modding information, see our Wiki: MODSonWiki.com

Jump To:
Forum: All Forums : Call of Duty 2
Category: CoD2 Scripting
Scripting and coding with Call of Duty 2.
Moderators: foyleman, Foxhound, Mystic, StrYdeR, batistablr, Welshy, DrBiggzz, supersword, playername
Latest Posts
Subscribed Posts
Search
Restricted Access Topic is Locked
Page
Previous Page Next Page
subscribe
Author Topic: Forcing FPS
Tally
General Member
Since: Apr 21, 2005
Posts: 819
Last: Oct 26, 2012
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Thursday, Aug. 30, 2012 03:59 pm
maxxis95 writes...
Quote:
thanks!!! could u just tell me how should this line supposed to look with more disallowed fps?

Code:
uiScript openMenuOnDvar com_maxfps "1000" test;


and would it be possible instead of
Code:
setdvar com_maxfps "125";
, it opens some .gsc file? and how would that line look like=


To add more checks on different settings for com_maxfps, just do this:

Code:
uiScript openMenuOnDvar com_maxfps "1000" test;
uiScript openMenuOnDvar com_maxfps "500" test;
uiScript openMenuOnDvar com_maxfps "200" test;


A menu cannot open a GSC file. They can only open (or close) other menus.

It is possible to run scripts once a menu is opened, but a response from a player also has to be made before you can detect what menu has been opened. As there is no response from a player here, you cannot detect when or if it has been opened. So, in this case, you are pretty much forced to do everything you want inside the menu.
Share |
maxxis95
General Member
Since: Aug 28, 2012
Posts: 55
Last: Sep 17, 2012
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Thursday, Aug. 30, 2012 04:03 pm
thanks a lot mate, i owe you a beer or bear :D
Share |
maxxis95
General Member
Since: Aug 28, 2012
Posts: 55
Last: Sep 17, 2012
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Friday, Aug. 31, 2012 09:19 am
there's a problem, it works only for first 17
Code:
uiScript openMenuOnDvar com_maxfps 5 test;


after 17th, it stops working, any ideas? - it doesn't change fps anymore, just keep the one u typed

Share |
maxxis95
General Member
Since: Aug 28, 2012
Posts: 55
Last: Sep 17, 2012
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Friday, Aug. 31, 2012 12:57 pm
any1?
Share |
Tally
General Member
Since: Apr 21, 2005
Posts: 819
Last: Oct 26, 2012
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Friday, Aug. 31, 2012 01:14 pm
Why on earth are you checking every conceivable configuration for com_maxfps? If you don't like all those settings, just force one setting on everyone and have done with it!

But if you are really going to insist on doing it, just create a second check menu with the next sequence of checks, and run that on the client as well.
Share |
maxxis95
General Member
Since: Aug 28, 2012
Posts: 55
Last: Sep 17, 2012
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Friday, Aug. 31, 2012 01:23 pm
yeah but isnt there any other way? also, wouldnt so many menus make some lag or something?
Share |
Tally
General Member
Since: Apr 21, 2005
Posts: 819
Last: Oct 26, 2012
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Friday, Aug. 31, 2012 01:35 pm
maxxis95 writes...
Quote:
yeah but isnt there any other way? also, wouldnt so many menus make some lag or something?


Again, why do you need to check so many configurations? If there are so many settings which you don't like, force ONE setting on all clients via script:

Code:
self setClientCvar( "com_maxfps", 125 );


That method is far preferable to trying to check 40 odd settings and then force 125 on them anyway.
Share |
IzNoGoD
General Member
Since: Nov 29, 2008
Posts: 694
Last: Nov 10, 2012
[view latest posts]
Level 6
Category: CoD2 Scripting
Posted: Friday, Aug. 31, 2012 01:35 pm
Just check the fps to be either 250, 125 or 333.
If any of those, just keep forcing that one.

If none of those, just force one of above fps.

Also, after initially determining the above fps, set the fps to 10000, above the reach of normal com_maxfps. This to determine who has changed their cod2mp_s.exe file to have the com_maxfps value name changed. Kick the players that have 10000 fps, just like masterthomy did in the mod you copy pasted in the first post.
Share |
Tally
General Member
Since: Apr 21, 2005
Posts: 819
Last: Oct 26, 2012
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Friday, Aug. 31, 2012 01:37 pm
IzNoGoD writes...
Quote:
Just check the fps to be either 250, 125 or 333.
If any of those, just keep forcing that one.

If none of those, just force one of above fps.

Also, after initially determining the above fps, set the fps to 10000, above the reach of normal com_maxfps. This to determine who has changed their cod2mp_s.exe file to have the com_maxfps value name changed. Kick the players that have 10000 fps, just like masterthomy did in the mod you copy pasted in the first post.


How can you set com_maxfps above its maximum range? It's 0 to 1000. Go above that and the dvar stays unchanged.

Or am I misunderstanding you?
Share |
maxxis95
General Member
Since: Aug 28, 2012
Posts: 55
Last: Sep 17, 2012
[view latest posts]
Level 3
Category: CoD2 Scripting
Posted: Friday, Aug. 31, 2012 01:41 pm
tally, i just want to make it that way.

iznogod, how would that look like(checking if fps are correct and if they arent, change to some 'default value)? cuz atm i did it this way:

if fps 0-112 -> force 100
if fps 113-187 -> force 125
if fps 188-1000 -> force 250

also, what i've noticed is that i cant open chat neither teamchat cause of that menu, any idea how to fix that?
Share |
Restricted Access Topic is Locked
Page
Previous Page Next Page
subscribe
MODSonline.com Forums : Call of Duty 2 : CoD2 Scripting

Latest Syndicated News

»
Codutility.com up and runn...
Nice, and there still using the logo and template for the screenshots, which...
Codutility.com up and runn...
dundy writes...Quote:Call of Duty modding and mapping is barly alive only a ...
Codutility.com up and runn...
Mystic writes...Quote:It seems to me the like the site is completely dead? ...
Codutility.com up and runn...
It seems to me the like the site is completely dead?

Partners & Friends

»