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

Members Online

»
0 Active | 77 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
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:45 pm
Tally writes...
Quote:
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?


If you change the com_maxfps variable in the .exe file of the cod2 mp, you cannot be forced a certain fps, but it will show up as your com_maxfps var is not limited to 1000, and can reach 10000 if the script forces it on you. Thats exactly the way to detect these things.

The way you should do this:

detect fps to be either 125, 250, 333 or none of those.
If 125, force 125,
if 250, force 250,
if 333, force 333,
if none, force 125.

After detection, set it to 10000 for a short time.
Now, detect fps. If its 1000, the player doesnt cheat.
If its 10000, the player cheats and should be kicked/banned/whatever.

If not cheating, continue forcing earlier established fps to force.
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:50 pm
IzNoGoD writes...
Quote:
Tally writes...
Quote:
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?


If you change the com_maxfps variable in the .exe file of the cod2 mp, you cannot be forced a certain fps, but it will show up as your com_maxfps var is not limited to 1000, and can reach 10000 if the script forces it on you. Thats exactly the way to detect these things.

The way you should do this:

detect fps to be either 125, 250, 333 or none of those.
If 125, force 125,
if 250, force 250,
if 333, force 333,
if none, force 125.

After detection, set it to 10000 for a short time.
Now, detect fps. If its 1000, the player doesnt cheat.
If its 10000, the player cheats and should be kicked/banned/whatever.

If not cheating, continue forcing earlier established fps to force.


changing the MP executable? Are you serious? That's like using a sledgehammer to crack an egg.
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:51 pm
could u write me how should that line look like? since now i had to write all fps except 125, 250 and 100
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:52 pm
btw. what about not being able to open chat and teamchat while using those menus?
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:55 pm
maxxis95 writes...
Quote:
btw. what about not being able to open chat and teamchat while using those menus?


the menus are full screen, and so are covering the chat. Just shrink the menus down:

Example:

Code:
#include "ui_mp/menudef.h"

{
	menuDef
	{
		name			"check"
		rect			0 0 1 1
		focuscolor		GLOBAL_FOCUSED_COLOR
		style			WINDOW_STYLE_EMPTY
		onopen
		{
			uiScript openMenuOnDvar com_maxfps "1000" test;
			close check;
		}
	}
}
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:57 pm
and last question i wanna ask is - would so many openings and closings of menus make some lag or something? cuz i got some when i tested it but doesnt really have to be cause of it
Share |
serthy
General Member
Since: Sep 8, 2010
Posts: 482
Last: Jun 28, 2013
[view latest posts]
Level 5
Im a fan of MODSonair
Category: CoD2 Scripting
Posted: Friday, Aug. 31, 2012 02:01 pm
i tested it last year and later i also read that 40 or 42 entries in the onOpen{} func is max, if you add more, your menu is not drawn

another question: is scriptmenuresponse on onOpen{} working? i cannot test it these days
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 02:01 pm
maxxis95 writes...
Quote:
and last question i wanna ask is - would so many openings and closings of menus make some lag or something? cuz i got some when i tested it but doesnt really have to be cause of it


Shouldn't do. I know of mods that do similar things with menus, and they don't cause lag.
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 05:34 pm
changed rect to 0 0 1 1 and still, i cannot open chat neither teamchat, also when i cannot change anything in main menu (changing weapon, team or anything) - it just closes menu
Share |
Tally
General Member
Since: Apr 21, 2005
Posts: 819
Last: Oct 26, 2012
[view latest posts]
Level 7
Category: CoD2 Scripting
Posted: Saturday, Sep. 1, 2012 09:42 am
I played around with this again but couldn't get the menus to stay open It seems that the closeMenu() function cannot be restricted to a specific menu - it closes all open menus. Also, it clears the chat buffer.

I tried using just the close command inside the menu, but it is too slow - the menu stays open for about half a second and stops player movement. I tried using the cl_bypassmouseInput dvar but it only marginally helped.

Sorry, looks like this idea is a non-starter.
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

»