VirusCuzX

333fps check unstable

Recommended Posts

I want to kick users who use 333fps in our promod server , so i've check the forum and i wrote this

init()
{
    for(;;)
    {
        level waittill("connected", player);
        player thread fpswatch2();
    }
}

fpsWatch2()
{
warntime = 6;
    for (;;)
    {
        self endon( "disconnect" );
        fps = self GetCountedFPS();
        if (fps > 330)
        {
		warnTime--;
		self iPrintLnBold( "^1Client Violation : ^7333 FPS is not allowed.You will be kicked after " + warnTime + " times warning" );
		self.lastWarnTime = getTime();
	}
		
		else if( warnTime < 6 && isDefined( self.lastWarnTime ) && getTime() - self.lastWarnTime > 300000  ) 
{
		warnTime = 6;
}
		if( warnTime == 0 )
		{
		exec( "kick " + self getEntityNumber() + " 333 FPS is not allowed" );
		IprintLnBold(self," ^1is using 333fps! ^7Kicking...");
		}	
		wait 1;
	}
}

but sometimes players have fps like 250 still got the message, especially when they have a sightly packets lost,i'am wondering maybe there's problem in this function:

self GetCountedFPS()

There's any way to fix it? or anyway to kick con_maxfps 333?

Some players use their mouse wheel change fps between 333 fps and 250 fps , so update their fps to 250 per second is useless,they can still roll their mouse wheel when running or jumping, so there's any solution?

Share this post


Link to post
Share on other sites

I am using mousewheel to chane fps as well. Why do you want to ban 333 fps? No jump? 

Share this post


Link to post
Share on other sites

Less fall damage, difference between sounds that the player makes when moving in certain directions, probably fire rate is also affected a bit. It also allows you to access some roofs that you can't with only 250 FPS. It's blocked for many reasons, and if it's blocked then people shouldn't bypass it (= cheat). Same goes for fullbright and the rest of the commands - they were originally blocked for a reason.

Share this post


Link to post
Share on other sites

 

12 minutes ago, AlexC said:

I am using mousewheel to chane fps as well. Why do you want to ban 333 fps? No jump? 

We are promod match server , 333 fps is originally prohibited in promod . it will considered as a cheat . But these variables can changed by notepad++ , also known as "notepad cheat".In offical lan match server , it will be banned by punkbuster.

Share this post


Link to post
Share on other sites

If you keep the script in server side, you will be fine as an original promod protection has. 

Share this post


Link to post
Share on other sites

Get all players to record demos in matches, if a player is suspected of using 333 watch their demo, it will be really obvious. I had a similar script to yours and players got warned even when they locked their fps to 250.

 

You can try the below, however players can easily get around this but changing it to cox_maxfps etc... I don't think there is a perfect solution for this atm sadly.

    self setClientDvar( "com_maxfps", 250 );

    self setClientDvar( "con_maxfps", 250 );

 

Share this post


Link to post
Share on other sites

Promod has built in FPS check so scripting it makes little sense. If you really want to do something else, you can invoke a scriptmenu response when that check is triggered and from there kick/kill/whatever the player.

 

And fyi. It is no longer as simple as editing the exe file with notepad. You can try it yourself and see what happens.

Share this post


Link to post
Share on other sites
Posted (edited)
On 4/18/2019 at 1:20 AM, fonix said:

Get all players to record demos in matches, if a player is suspected of using 333 watch their demo, it will be really obvious. I had a similar script to yours and players got warned even when they locked their fps to 250.

 

You can try the below, however players can easily get around this but changing it to cox_maxfps etc... I don't think there is a perfect solution for this atm sadly.

    self setClientDvar( "com_maxfps", 250 );

    self setClientDvar( "con_maxfps", 250 );

 

Thanks mate, I think I've found a better way to solve this problem. Obviously, the function self GetCountedFPS() reads worng fps value from player, I made a small test. When I use 250fps:

1645137536_QQ20190419204114.thumb.png.ee49df931cff6167930cfcf5bdf074c2.png
You can see it not my true fps, even some times it reads my fps more than what I have, like 300, I think maybe it's just a engine bug.When I use 333fps, you can mention that it reads my fps beyond 333fps, like 400fps:

1029336952_QQ20190419204049.thumb.jpg.26ec861904e934b966fb0a451b22c1e3.jpg
So I can just set the fps > 399 , it can solve that problem , and kick player who uses fps > 333.

(Bad English grammer cuz im Chinese, hope it can helps you)

Edited by VirusCuzX
  • Like 1

Share this post


Link to post
Share on other sites
On 4/18/2019 at 1:51 AM, leiizko said:

Promod has built in FPS check so scripting it makes little sense. If you really want to do something else, you can invoke a scriptmenu response when that check is triggered and from there kick/kill/whatever the player.

 

And fyi. It is no longer as simple as editing the exe file with notepad. You can try it yourself and see what happens.

Editing the iw3mp.exe is still simple enough , even you can just follow tutorials uploaded about 10 years ago :[ . I can easily make a script check con_maxfps ,but you know, it can be modified in any name, like coa_maxfps, cob_maxfps etc. So it's improtant to read player's true fps value.

Share this post


Link to post
Share on other sites
13 minutes ago, VirusCuzX said:

Editing the iw3mp.exe is still simple enough , even you can just follow tutorials uploaded about 10 years ago :[ . I can easily make a script check con_maxfps ,but you know, it can be modified in any name, like coa_maxfps, cob_maxfps etc. So it's improtant to read player's true fps value.

Editing it like that will make the file impure and it will redownload the original exe file. You can actually find quite a lot of people crying why they can't rename cvars as easily as before.

Share this post


Link to post
Share on other sites
8 hours ago, leiizko said:

Editing it like that will make the file impure and it will redownload the original exe file

only on steam

Share this post


Link to post
Share on other sites
29 minutes ago, dpj said:

only on steam

Don't have a steam cod4, still does exactly what I described.

Share this post


Link to post
Share on other sites
8 hours ago, leiizko said:

Don't have a steam cod4, still does exactly what I described.

so why I can use 333fps in promod :blush:. and I'am using the latest verison of cod4x client.

Share this post


Link to post
Share on other sites

We have had a problem with reading FPS values before, players who are lagging returned false FPS values to our script. Is your script accurate in finding people who use 333?

Share this post


Link to post
Share on other sites
On 4/19/2019 at 2:54 PM, VirusCuzX said:

Thanks mate, I think I've found a better way to solve this problem. Obviously, the function self GetCountedFPS() reads worng fps value from player, I made a small test. When I use 250fps:

1645137536_QQ20190419204114.thumb.png.ee49df931cff6167930cfcf5bdf074c2.png
You can see it not my true fps, even some times it reads my fps more than what I have, like 300, I think maybe it's just a engine bug.When I use 333fps, you can mention that it reads my fps beyond 333fps, like 400fps:

1029336952_QQ20190419204049.thumb.jpg.26ec861904e934b966fb0a451b22c1e3.jpg
So I can just set the fps > 399 , it can solve that problem , and kick player who uses fps > 333.

(Bad English grammer cuz im Chinese, hope it can helps you)

This does not work btw.

Share this post


Link to post
Share on other sites

We have been using the following script for a few months, although it does not catch everyone using 333, it does kick the ones that use it for a whole match. This might still need some tweaking as i'm just an amateur scripter playing around with code ^^

//Script by |RS|PowahRanger
//Discord PowahRanger#0001
//Royal-Soldiers.com


init()
{
    for(;;)
    {
        level waittill("connected", player);
        player thread fpswatch2();
    }
}

fpsWatch2()
{
wait 5;
Violations = 0;
 
self endon( "disconnect" );

fps1 = self GetCountedFPS();
	if (fps1 > 399)
	{
	Violations++;
	wait 5;
	}
	else
	{
	wait 5;
	}
fps2 = self GetCountedFPS();
	if (fps2 > 399)
	{
	Violations++;
		wait 5;
	}
	else
	{
	wait 5;
	}
fps3 = self GetCountedFPS();
	if (fps3 > 399)
	{
	Violations++;
	wait 5;
	}
	else
	{
	wait 5;
	}
fps4 = self GetCountedFPS();
	if (fps4 > 399)
	{
	Violations++;
	wait 5;
	}
	else
	{
	wait 5;
	}
fps5 = self GetCountedFPS();
	if (fps5 > 399)
	{
	Violations++;
	wait 5;
	}
	else
	{
	wait 5;
	}
fps6 = self GetCountedFPS();
	if (fps6 > 399)
	{
	Violations++;
	wait 5;
	}
	else
	{
	wait 5;
	}
fps7 = self GetCountedFPS();
	if (fps7 > 399)
	{
	Violations++;
	wait 5;
	}
	else
	{
	wait 5;
	}

	if( Violations > 5 )
	{
//	exec ( "say" + self + "^1is Using 333FPS! ^7Kicking...");
	exec( "kick " + self getEntityNumber() + " 333 FPS is not allowed" );
	wait 1;
	Violations = 0;
	return;
	}	
	else
	{
	exec ( "say" + self + "^1is Using 333FPS! ^7Kicking...");
	Violations = 0;
	return;
	}
	
}



 

Share this post


Link to post
Share on other sites

Simplified from above. Not tested

init()
{
level.maxAllowedFPS = 399;
for(;;)
{
level waittill("connected", player);
player thread playerWatchFPS();
}
}

playerWatchFPS()
{
self endon( "disconnect" );

wait 5;
violations = 0;

while(1)
{
if( self GetCountedFPS() > level.maxAllowedFPS )
violations++;

if( violations > 5 )
self giveMeTheBoot();

wait 5;
}
}

giveMeTheBoot()
{
iprintln(self.name + " FPS is 333+! Kicking! );
exec( "kick " + self getEntityNumber() + " 333 FPS is not allowed" );
}

Share this post


Link to post
Share on other sites
Posted (edited)
16 hours ago, Sheryl said:

Simplified from above. Not tested

init()
{
level.maxAllowedFPS = 399;
for(;;)
{
level waittill("connected", player);
player thread playerWatchFPS();
}
}

playerWatchFPS()
{
self endon( "disconnect" );

wait 5;
violations = 0;

while(1)
{
if( self GetCountedFPS() > level.maxAllowedFPS )
violations++;

if( violations > 5 )
self giveMeTheBoot();

wait 5;
}
}

giveMeTheBoot()
{
iprintln(self.name + " FPS is 333+! Kicking! );
exec( "kick " + self getEntityNumber() + " 333 FPS is not allowed" );
}

The reason I take a specific amount of samples is because GetCountedFPS() is unreliable. the samples reset after it has been checked 7 times. if you have a continues loop to check whenever 333 occurs everyone will get kicked eventually due to the unreliability and players their lag. A loop wont work, I tested this ^^

Edited by PowahRanger

Share this post


Link to post
Share on other sites

I have a question is

self GetCountedFPS();

 

specific to the server running or the players fps? if its specific to the server will each server have a different value?

reason I ask is in reading self getcountedfps() on my server the results with my fps set at  333 fps are coming back showing between 320 and 400 fps.

 

Share this post


Link to post
Share on other sites

Then it looks like yours is only meant to work once on player connect. Otherwise, you can do a loop within a loop. The first continuously, the second for seven times. And then, when that one is over, run the loop again maybe 5 minutes later after resetting the checks back to zero.

playerWatchFPS()
{
self endon( "disconnect" );

wait 5;

while(1)
{
violations = 0;
for(i=0; i<7; i++)
{
if( self GetCountedFPS() > level.maxAllowedFPS )
violations++;

if( violations > 5 )
self giveMeTheBoot();

wait 5;
}

//Player passed this loop check. Wait 5 minutes then reset and run it again.
wait 300;
}
}

Share this post


Link to post
Share on other sites
2 hours ago, wkuzma said:

I have a question is


self GetCountedFPS();

 

specific to the server running or the players fps? if its specific to the server will each server have a different value?

reason I ask is in reading self getcountedfps() on my server the results with my fps set at  333 fps are coming back showing between 320 and 400 fps.

 

I answered my own question  -its the players computer that determins the fps. Now looking at the above scripts if a player goes over  the level.maxAllowedFPS = 399;

no matter what his fps setting is at  he will still be kicked which will cause false kicks.

I am working on a script that will reset the count to 0 if he lowers his or her fps setting to below 333

I am testing it at 73.150.32.154:28961

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.