min fps not working - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: min fps not working (
/showthread.php?tid=650097)
min fps not working -
wallen - 20.02.2018
up
PHP код:
new FpsMin = 40;
onplayerspawn
PHP код:
SetTimerEx("FpsKicker", 10000, true, "i", playerid);
PHP код:
forward FpsKicker();
public FpsKicker()
{
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
if(GetPlayerDrunkLevel(i) < FpsMin)
{
new string[100];
format(string,sizeof(string),"{c3c3c3}(INFO) You have been kicked from the server because of having low fps (%d min %d)",GetPlayerDrunkLevel(i),FpsMin);
SendClientMessage(playerid, -1,string);
SetTimerEx("KickTimer", 2000, false, "i", i);
}
}
}
return 1;
}
Re: min fps not working -
RogueDrifter - 20.02.2018
Quote:
Originally Posted by wallen
up
PHP код:
new FpsMin = 40;
onplayerspawn
PHP код:
SetTimerEx("FpsKicker", 10000, true, "i", playerid);
PHP код:
forward FpsKicker();
public FpsKicker()
{
for(new i = 0; i < MAX_PLAYERS; i ++)
{
if(IsPlayerConnected(i))
{
if(GetPlayerDrunkLevel(i) < FpsMin)
{
new string[100];
format(string,sizeof(string),"{c3c3c3}(INFO) You have been kicked from the server because of having low fps (%d min %d)",GetPlayerDrunkLevel(i),FpsMin);
SendClientMessage(playerid, -1,string);
SetTimerEx("KickTimer", 2000, false, "i", i);
}
}
}
return 1;
}
|
what... i suggests using emmet's fps function from his new samp callbacks release.
Re: min fps not working -
wallen - 20.02.2018
Any links
Re: min fps not working -
RogueDrifter - 20.02.2018
Quote:
Originally Posted by wallen
Any links
|
https://sampforum.blast.hk/showthread.php?tid=490436
Re: min fps not working -
RedFusion - 20.02.2018
replace
pawn Код:
SetTimerEx("FpsKicker", 10000, true, "i", playerid);
with
pawn Код:
SetTimer("FpsKicker", 10000, true);
And also remember to move it from OnPlayerSpawn to OnGameModeInit / OnFilterScriptInit