FPS Limit

Hey all,

I tried searching but to no avail. I know that we can use a script to find out what the counted FPS of a player is, but is there a setting or script function to limit FPS?

Thanks in advanced for any assistance.

I have one.

I know that we can use a script to find out what the counted FPS of a playe

Is there one? Would change

Are you willing to share? You can DM me if you prefer.

player getCountedFPS(); Is shown in the docs to return the player’s FPS.

_fpswatch.gsx script

This was what I was looking for. Thank you!

1 Like
#include duffman\_common; //check for any mood from rs that contains _common and use that

init( modVersion )
{
	addSpawnThread(::maxfps);
}

maxfps() 
{
	self endon("disconnect");
	
	if ( isDefined(self.pers["isBot"]) )
		return;
	
	for(;;)
	{
		self.currentfps = self getfps();
		if( self.currentfps>300)
		{
			self iPrintlnbold("^1Fps Warn. Max ^1[250]^7 Your Current Fps "+ self.currentfps );
			self iprintln("detected fps: "+ self.currentfps);
			self iPrintlnbold("^1 change Fps below 250");
			self freezecontrols(true);
			while(self.currentfps>300)
			{
				wait 1;
				self.currentfps = self getfps();
				self iPrintlnbold("^1 change Fps below 250");
			}
			self freezecontrols(false);
			self iPrintlnbold("^1Thank you");
		}
		wait 0.05;
	}
	wait 5;
}

----- Server Shutdown -----

With the reason: Server fatal crashed: script compile error
bad syntax
self.currentfps = self getfps();
(see console for details)

https://old.cod4x.ovh/index.php?/forums/topic/411-anitcheat/page/2/