08.08.2011, 19:19
Can anyone get me the download link for a FPS Script?
Searched GetPlayerFps and got
http://forum.sa-mp.com/showthread.ph...t=getplayerfps SEARCH next time --' |
#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;
}
}
Hello, Gymmyyy,
Here's the script, Its a filterscript. Just copy and paste it on your pawno then compile it. pawn Код:
|