Help getting FPS Script - 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)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help getting FPS Script (
/showthread.php?tid=275201)
Help getting FPS Script -
gymmyyy - 08.08.2011
Can anyone get me the download link for a FPS Script?
Re: Help getting FPS Script -
FireCat - 08.08.2011
Searched GetPlayerFps and got
http://forum.sa-mp.com/showthread.ph...t=getplayerfps
SEARCH next time --'
Re: Help getting FPS Script -
gymmyyy - 08.08.2011
Quote:
Originally Posted by FireCat
|
I want decent comments
Respuesta: Help getting FPS Script -
Alex_Obando - 08.08.2011
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;
}
}
Re: Respuesta: Help getting FPS Script -
gymmyyy - 08.08.2011
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?
Respuesta: Help getting FPS Script -
Alex_Obando - 08.08.2011
Which print?
Re: Respuesta: Help getting FPS Script -
gymmyyy - 08.08.2011
Quote:
Originally Posted by Alex_Obando
Which print?
|
Re: Help getting FPS Script -
Sascha - 08.08.2011
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
Re: Help getting FPS Script -
gymmyyy - 23.08.2011
BUMP
Re: Help getting FPS Script -
Whitetiger - 23.08.2011
https://sampforum.blast.hk/showthread.php?tid=172085