Help getting FPS Script
#1



Can anyone get me the download link for a FPS Script?
Reply
#2

Searched GetPlayerFps and got
http://forum.sa-mp.com/showthread.ph...t=getplayerfps
SEARCH next time --'
Reply
#3

Quote:
Originally Posted by FireCat
Посмотреть сообщение
Searched GetPlayerFps and got
http://forum.sa-mp.com/showthread.ph...t=getplayerfps
SEARCH next time --'
I want decent comments
Reply
#4

Hello, Gymmyyy,

Here's the script,
Its a filterscript.

Just copy and paste it on your pawno then compile it.
pawn Код:
#include <a_samp>
 
new Text:FPS[MAX_PLAYERS];
new DLlast[MAX_PLAYERS] = 0;
new FPS2[MAX_PLAYERS] = 0;
 
 
public OnFilterScriptInit()
{
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
        FPS[i] = TextDrawCreate(8.000000, 428.000000, "FPS: 30");
                TextDrawBackgroundColor(FPS[i], 255);
                TextDrawFont(FPS[i], 3);
                TextDrawLetterSize(FPS[i], 0.480000, 2.000000);
                TextDrawColor(FPS[i], -65281);
                TextDrawSetOutline(FPS[i], 1);
                TextDrawSetProportional(FPS[i], 1);
        }
        SetTimer("FPSUP",1203,true);
        return 1;
}
new string[24];
public OnPlayerUpdate(playerid)
{
        new drunk2 = GetPlayerDrunkLevel(playerid);
        if(drunk2 < 100)
        {
            SetPlayerDrunkLevel(playerid,2000);
        }
        else
        {
            if(DLlast[playerid] != drunk2)
            {
                new fps = DLlast[playerid] - drunk2;
               
                if((fps > 0) && (fps < 200))
                        FPS2[playerid] = fps;
                        DLlast[playerid] = drunk2;
                }
        }
}
 
public OnPlayerSpawn(playerid)
{
        TextDrawShowForPlayer(playerid,FPS[playerid]);
        return 1;
}
 
public OnPlayerDisconnect(playerid)
{
        TextDrawDestroy(FPS[playerid]);
        return 1;
}
 
forward FPSUP();
public FPSUP()
{
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                format(string,sizeof(string),"FPS: %d",FPS2[i]-1);
                        TextDrawSetString(FPS[i],string);
                }
                continue;
        }
}
Reply
#5

Quote:
Originally Posted by Alex_Obando
Посмотреть сообщение
Hello, Gymmyyy,

Here's the script,
Its a filterscript.

Just copy and paste it on your pawno then compile it.
pawn Код:
#include <a_samp>
 
new Text:FPS[MAX_PLAYERS];
new DLlast[MAX_PLAYERS] = 0;
new FPS2[MAX_PLAYERS] = 0;
 
 
public OnFilterScriptInit()
{
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
        FPS[i] = TextDrawCreate(8.000000, 428.000000, "FPS: 30");
                TextDrawBackgroundColor(FPS[i], 255);
                TextDrawFont(FPS[i], 3);
                TextDrawLetterSize(FPS[i], 0.480000, 2.000000);
                TextDrawColor(FPS[i], -65281);
                TextDrawSetOutline(FPS[i], 1);
                TextDrawSetProportional(FPS[i], 1);
        }
        SetTimer("FPSUP",1203,true);
        return 1;
}
new string[24];
public OnPlayerUpdate(playerid)
{
        new drunk2 = GetPlayerDrunkLevel(playerid);
        if(drunk2 < 100)
        {
            SetPlayerDrunkLevel(playerid,2000);
        }
        else
        {
            if(DLlast[playerid] != drunk2)
            {
                new fps = DLlast[playerid] - drunk2;
               
                if((fps > 0) && (fps < 200))
                        FPS2[playerid] = fps;
                        DLlast[playerid] = drunk2;
                }
        }
}
 
public OnPlayerSpawn(playerid)
{
        TextDrawShowForPlayer(playerid,FPS[playerid]);
        return 1;
}
 
public OnPlayerDisconnect(playerid)
{
        TextDrawDestroy(FPS[playerid]);
        return 1;
}
 
forward FPSUP();
public FPSUP()
{
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                format(string,sizeof(string),"FPS: %d",FPS2[i]-1);
                        TextDrawSetString(FPS[i],string);
                }
                continue;
        }
}
Is this filter script the one on the print?
Reply
#6

Which print?
Reply
#7

Quote:
Originally Posted by Alex_Obando
Посмотреть сообщение
Which print?
Reply
#8

Quote:
Originally Posted by gymmyyy
Посмотреть сообщение
I want decent comments
pfft haha...
quite funny.. This was a decent comment. He named a link and also gave you a hint how to find out your answers on your own next time...

oh yea and what alex posted is a filterscript. maybe not exactly the one as in the picture, however it is enough for you to get what you need to do...
do one on your own if you want exactly what is shown in the pic
Reply
#9

BUMP
Reply
#10

https://sampforum.blast.hk/showthread.php?tid=172085
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)