Max FPS

hola a todos, saben estoy tratando de habilitar una regla que no se use mas de 250 fps enel servidor. pero me dicen que usan 200 fps y el servidro los expulsa. me pueden ayudar, para ver cual es el problema.


init()
{
for(;:wink:
{
level waittill(“connected”, player);
player thread fpsWatch2();
}
}

fpsWatch2()
{
for (;:wink:
{
self endon( “disconnect” );
wait 10;
fps = self GetCountedFPS();
if (fps > 300)
{
exec( “kick " + self getEntityNumber() + " 333 FPS no esta permitido” );
wait 1;
}
}
}

@MAD_DAD , can you help me with this script please

@MAD_DAD , can you help me with this script please

Sorry can’t, don’t know much about the fps command as I don’t use it

have you tried the kick command?

kick(self getEntityNumber(),"333 FPS no esta permitido");
instead of
exec( “kick " + self getEntityNumber() + " 333 FPS no esta permitido” );

I thought that you wasn’t able to kick until I translated your message so you can ignore what I put about the kick command

You really must try to post in English :grin:

As far as I know your fps fluctuates so they will at some point get more than 250 fps and it only needs to be once and for a millisecond then the script will kick them…

I assume you have now upped it from 250 to 300 with: if (fps > 300)

Hello friend, I left it like that and eliminated wait 1 as you indicated.

You know why I’m wearing these. According to an article, some users used cheats and their fps rose above 333 and some reached over 600 fps, and this gave them an advantage over others. Is this true oh I’m wrong

init()
{
for(;:wink:
{
level waittill(“connected”, player);
player thread fpsWatch2();
}
}

fpsWatch2()
{
for (;:wink:
{
self endon( “disconnect” );
wait 10;
fps = self GetCountedFPS();
if (fps > 333)
{
exec( “kick " + self getEntityNumber() + " 333 FPS no esta permitido” );
}
}
}

To be honest I don’t bother about player’s FPS.

I have seen players with high FPS do rubbish against players with low fps.

I wouldn’t get hung up on it if I was you.

I suppose limiting the maxfps could work.
A script like this could work:

#include maps\mp\_utility;
#include maps\mp\gametypes\_hud_util;
#include common_scripts\utility;

init()
{
	level onPlayerConnecting();
}
 
onPlayerConnecting()
{
		for( ;; )
		{
		level waittill( "connected", player );
		player thread onPlayerConnected();
 		}
}
 
onPlayerConnected()
{
	
	self endon("disconnect");
	while( 1 )
	{
	self setClientDvar( "com_maxfps", "85");
	}
}

You change the “85” to what ever you need

worth a try.

1 Like

^3Warning: script runtime warning: potential infinite loop in script.

(file ‘maps/mp/gametypes/_fpskick.gsx’, line 23)

while( 1 )

self waittill( “spawned_player” );

onPlayerConnected()
{

self endon("disconnect");
while( 1 )
{
self waittill( "spawned_player" );
    self setClientDvar( "com_maxfps", "85");
}

}

That should stop the infinite loop