min fps not working
#1

up
PHP код:
new FpsMin 40
onplayerspawn
PHP код:
      SetTimerEx("FpsKicker"10000true"i"playerid); 
PHP код:
forward FpsKicker();
public 
FpsKicker()
{
    for(new 
0;  MAX_PLAYERS++)
    {
          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"2000false"i"i);
    }
    }
    }
    return 
1;

Reply
#2

Quote:
Originally Posted by wallen
Посмотреть сообщение
up
PHP код:
new FpsMin 40
onplayerspawn
PHP код:
      SetTimerEx("FpsKicker"10000true"i"playerid); 
PHP код:
forward FpsKicker();
public 
FpsKicker()
{
    for(new 
0;  MAX_PLAYERS++)
    {
          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"2000false"i"i);
    }
    }
    }
    return 
1;

what... i suggests using emmet's fps function from his new samp callbacks release.
Reply
#3

Any links
Reply
#4

Quote:
Originally Posted by wallen
Посмотреть сообщение
Any links
https://sampforum.blast.hk/showthread.php?tid=490436
Reply
#5

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)