SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts

Reply
 
Thread Tools Display Modes
Old 28/02/2012, 09:57 AM   #1
Littlehelper
Gangsta
 
Littlehelper's Avatar
 
Join Date: Nov 2011
Location: 420
Posts: 946
Reputation: 178
Default lScore'n'Ping'n'FPS Version 2.0 Released!



Hello,
I'm Back Again With Another Release Which Is Very Basic "Score'n'Ping" System in Text-Draws.

Introduction:
It Is A Very Basic System Which Shows Player Ping And Score In Text-Draw Under The Radar.
Source:
pawn Code:
new Text:scoreandping[MAX_PLAYERS];
new pDrunkLevelLast[MAX_PLAYERS];
new pFPS[MAX_PLAYERS];
new Updater;
// OnGameModeInIt And/Or OnFilterscriptInIt();
Updater = SetTimer("ScorenPing", 1000, 1);
// OnGameModeExit And/Or OnFilterScriptExit();
KillTimer(Updater);
// OnPlayerConnect Stuff.
public OnPlayerConnect(playerid)
{
    SendClientMessage(playerid,-1," This Server Uses lScore'n'Ping System By Littlehelper AKA iKing");
    scoreandping[playerid] = TextDrawCreate(10.000000,430.000000,"Loading Statistics!");
    TextDrawAlignment(scoreandping[playerid],0);
    TextDrawBackgroundColor(scoreandping[playerid],0x000000ff);
    TextDrawFont(scoreandping[playerid],1);
    TextDrawLetterSize(scoreandping[playerid],0.500000,1.5);
    TextDrawColor(scoreandping[playerid],0xffffffff);
    TextDrawSetOutline(scoreandping[playerid],1);
    TextDrawSetProportional(scoreandping[playerid],1);
    TextDrawSetShadow(scoreandping[playerid],1);
    TextDrawShowForPlayer(playerid, scoreandping[playerid]);
     return 1;
}
// OnPlayerDisconnect Stuff.
public OnPlayerDisconnect(playerid, reason)
{
    TextDrawDestroy(scoreandping[playerid]);
    return 1;
}
// Publics.
public OnPlayerUpdate(playerid) {

    // handle fps counters.
    new drunknew;
    drunknew = GetPlayerDrunkLevel(playerid);

    if (drunknew < 100) { // go back up, keep cycling.
        SetPlayerDrunkLevel(playerid, 2000);
    } else {

        if (pDrunkLevelLast[playerid] != drunknew) {

            new wfps = pDrunkLevelLast[playerid] - drunknew;

            if ((wfps > 0) && (wfps < 200))
                pFPS[playerid] = wfps;

            pDrunkLevelLast[playerid] = drunknew;
        }

    }

}
public ScorenPing(playerid)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
            new string[256];
            format(string,sizeof(string),"Score:~b~%d ~w~Ping:~b~%d ~w~FPS:~b~%d",GetPlayerScore(playerid),GetPlayerPing(playerid),GetPlayerFPS(playerid));
            TextDrawSetString(scoreandping[i], string);
        }
    }
}
// Added FPS On Request.
stock GetPlayerFPS(playerid)
{
    SetPVarInt(playerid, "DrunkL", GetPlayerDrunkLevel(playerid));
    if(GetPVarInt(playerid, "DrunkL") < 100)
    {
        SetPlayerDrunkLevel(playerid, 2000);
    }
    else
    {
        if(GetPVarInt(playerid, "LDrunkL") != GetPVarInt(playerid, "DrunkL"))
        {
            SetPVarInt(playerid, "FPS", (GetPVarInt(playerid, "LDrunkL") - GetPVarInt(playerid, "DrunkL")));
            SetPVarInt(playerid, "LDrunkL", GetPVarInt(playerid, "DrunkL"));
            if((GetPVarInt(playerid, "FPS") > 0) && (GetPVarInt(playerid, "FPS") < 256))
            {
                return GetPVarInt(playerid, "FPS") - 1;
            }
        }
    }
    return 0;
}
|| The End ||

Last edited by Littlehelper; 28/06/2012 at 11:38 AM.
Littlehelper is offline   Reply With Quote
Old 28/02/2012, 11:19 AM   #2
System64
Gangsta
 
System64's Avatar
 
Join Date: May 2011
Location: Zadar, Croatia
Posts: 933
Reputation: 143
Default Re: lScore'n'Ping [In TextDraws!]

nice release, also nice textdraw

rep+
__________________
All my works
I left SA:MP! Maybe once I start scripting again but now I'm based on web programming
Soon, I'll buy domain system32.com.hr but for now you can contact me on LogoOff or on my Youtube channel!
System64 is offline   Reply With Quote
Old 28/02/2012, 11:19 AM   #3
Shadow_
Gangsta
 
Shadow_'s Avatar
 
Join Date: Nov 2008
Location: Vatican City
Posts: 539
Reputation: 56
Default Re: lScore'n'Ping [In TextDraws!]

Its nice You should add FPS aswell.
__________________
Shadow_ is offline   Reply With Quote
Old 28/02/2012, 11:29 AM   #4
Littlehelper
Gangsta
 
Littlehelper's Avatar
 
Join Date: Nov 2011
Location: 420
Posts: 946
Reputation: 178
Default Re: lScore'n'Ping [In TextDraws!]

Thanks.
Littlehelper is offline   Reply With Quote
Old 28/02/2012, 12:37 PM   #5
XenXack
Little Clucker
 
XenXack's Avatar
 
Join Date: Feb 2012
Posts: 5
Reputation: 1
Default Re: lScore'n'Ping [In TextDraws!]

Awesome i Agree With Him You should Add FPS Aswell
__________________
$$$$$$$Scripting And Mapping For MoneY$$$$$$$
XenXack is offline   Reply With Quote
Old 28/02/2012, 12:43 PM   #6
Rockstαr
Little Clucker
 
Rockstαr's Avatar
 
Join Date: Feb 2012
Posts: 19
Reputation: 5
Default Re: lScore'n'Ping [In TextDraws!]

Cool textdraws but can you tell where the TD is placed i mean the position? i'm Lazy..
__________________
leave all sexy sexy tomorrow is my French exam wish my Luck!
Code:

Mortal Stuntages : 176.31.142.90:7777
Stunter's God : 208.77.22.65:7777
Ultimate Stunts World : 66.85.149.4:7777
Crash 'n Burn Destruction Derby : 184.106.199.225:7777
GTX' : under Construction [Home host]
Other games that i play are Forsaken world , Drakensang online , My own custom addition game..
I know scripting,HTML,xHTML,HTML5,Python,SQL-Injection,C#[A little] and I really Sux at Photoshop..
Rockstαr is offline   Reply With Quote
Old 28/02/2012, 01:05 PM   #7
Littlehelper
Gangsta
 
Littlehelper's Avatar
 
Join Date: Nov 2011
Location: 420
Posts: 946
Reputation: 178
Default Re: lScore'n'Ping [In TextDraws!]

To The Guy Above Me ^
Quote:
Under The Radar.
Littlehelper is offline   Reply With Quote
Old 28/02/2012, 06:10 PM   #8
aco_SRBIJA
Big Clucker
 
Join Date: Apr 2010
Posts: 178
Reputation: 4
Default Re: lScore'n'Ping [In TextDraws!]

Cool Script:

Littlehelper[MDZ], Do I have your permission to release here a pastebin filterscript with new featurs:

Kill in a row
FPS?

Cool Script, you own! +1 rep.
__________________
Scripting,mapping&setting servers up for $$$

Feel free to PM.

We HATE the audio stream message!
Together we are strong.
Together we can change Kalcor's mind.
Copy & paste if you agree!
aco_SRBIJA is offline   Reply With Quote
Old 28/02/2012, 06:22 PM   #9
Littlehelper
Gangsta
 
Littlehelper's Avatar
 
Join Date: Nov 2011
Location: 420
Posts: 946
Reputation: 178
Default Re: lScore'n'Ping [In TextDraws!]

Quote:
Originally Posted by aco_SRBIJA View Post
Cool Script:

Littlehelper[MDZ], Do I have your permission to release here a pastebin filterscript with new featurs:

Kill in a row
FPS?

Cool Script, you own! +1 rep.
Yes Go Ahead,
It'll be a pleasure, but leave the credits.
Thank You.
Littlehelper is offline   Reply With Quote
Old 28/02/2012, 06:46 PM   #10
willzyyy
Banned
 
Join Date: Feb 2012
Location: mta
Posts: 135
Reputation: 11
Default Re: lScore'n'Ping [In TextDraws!]

Hi,Please make 'FPS' after ping. Would be awesome!!
@ aco,please make fps too. And post here.
willzyyy is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Textdraws Arcanize Help Archive 6 09/08/2011 09:18 AM
help textdraws Ivica_Razor Help Archive 1 25/04/2011 05:43 PM
[HELP] TextDraws Box psoftware Help Archive 1 07/01/2011 02:21 PM
[TEXTDRAWS] Textdraws mixed up KnooL Help Archive 22 23/06/2010 02:52 PM
HELP - Textdraws Blokk Help Archive 1 07/03/2010 04:09 PM


All times are GMT. The time now is 08:09 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.