[FilterScript] Easy Rank system - 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: Filterscripts (
https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [FilterScript] Easy Rank system (
/showthread.php?tid=388641)
Easy Rank system -
Private200 - 29.10.2012
I was boured so i made a rank system for trucking / roleplay servers .
Some credits goes to : [HiC]TheKiller for his textdraw tutorial
It is really easy to use
Hope you like it
Here codes are :
pawn Код:
/* Don't remove credits !!
Made by Private200
Hope it helps you!!
*/
#include <a_samp>
new Text:Textdraw2;
new rank[ MAX_PLAYERS ];
new TRank[150];
public OnFilterScriptInit()
{
Textdraw2 = TextDrawCreate(390.000000, 0.000000, "Rank:~r~");
TextDrawBackgroundColor(Textdraw2, 16711935);
TextDrawFont(Textdraw2, 1);
TextDrawLetterSize(Textdraw2, 0.570000, 2.700000);
TextDrawColor(Textdraw2, 65535);
TextDrawSetOutline(Textdraw2, 1);
TextDrawSetProportional(Textdraw2, 1);
return 1;
}
public OnPlayerSpawn( playerid )
{
TextDrawShowForPlayer( playerid, Textdraw2 );
return 1;
}
public OnPlayerUpdate( playerid )
{
new string[ 128 ];
if(GetPlayerScore(playerid) >= 1000)
{
rank[ playerid ] = 6;
TRank = " "; /// The rank name
}
else if(GetPlayerScore(playerid) >= 700)
{
rank[ playerid ] = 5;
TRank = " "; /// The rank name
}
else if(GetPlayerScore(playerid) >= 500)
{
rank[ playerid ] = 4;
TRank = " "; /// The rank name
}
else if(GetPlayerScore(playerid) >= 200)
{
rank[ playerid ] = 3;
TRank = " "; /// The rank name
}
else if(GetPlayerScore(playerid) >= 100)
{
rank[ playerid ] = 2;
TRank = " "; /// The rank name
}
else if(GetPlayerScore(playerid) >= 50)
{
rank[ playerid ] = 1;
TRank = " "; /// The rank name
}
else if(GetPlayerScore(playerid) >= 0)
{
rank[ playerid ] = 0;
TRank = " "; /// The rank name
}
format( string, sizeof string, "Rank:~r~ %d ~y~Rank:~w~ %s", rank[ playerid ],TRank);
TextDrawSetString( Textdraw2, string );
return 1;
}
PasteBin code :
After the update of the script in the forum , i was unable to update it on PasteBin . will update it soon!
Advanced Rank system has been relased . Here link is for all who wanna check it out
Thanks
Re: Easy Rank system -
Skillet` - 29.10.2012
Код:
format( string, sizeof string, "~y~Rank:~w~ %s", rank[ playerid ],TRank);
you put two parameters and 1 format string ?
Re: Easy Rank system -
Private200 - 29.10.2012
It is used better for the rank . Example i made it with the 0 and rank name
Mean of :
If you are a newbie (just joined server , 0 score) you are rank 0 . And you got the Newbie title . Based on title you got rank

rank 0 = newbie
rank 1 = good
rank 2 = pro
etc like this
There is no problem , i think , if there is , tell me so i fix it
Thanks
Re: Easy Rank system -
AnGeL_KRAMER - 30.10.2012
PHP код:
public OnPlayerUpdate( playerid )
{
switch(GetPlayerScore(playerid))
{
case 0...49: rank[playerid] = 0,TRank = "Put your the rank you like here";
case 50...99: rank[playerid] = 1,TRank = "Put your the rank you like here";
case 100...199: rank[playerid] = 2,TRank = "Put your the rank you like here";
case 200...499: rank[playerid] = 3,TRank = "Put your the rank you like here";
case 500...799: rank[playerid] = 4,TRank = "Put your the rank you like here";
case 800...8000: rank[playerid] = 5,TRank = "Put your the rank you like here";
}
format( string, sizeof string, "~y~Rank:~w~ %s", rank[ playerid ],TRank);
TextDrawSetString( Textdraw0, string );
Can not you have done so?
Re: Easy Rank system -
Private200 - 30.10.2012
Quote:
Originally Posted by AnGeL_KRAMER
PHP код:
public OnPlayerUpdate( playerid )
{
switch(GetPlayerScore(playerid))
{
case 0...49: rank[playerid] = 0,TRank = "Put your the rank you like here";
case 50...99: rank[playerid] = 1,TRank = "Put your the rank you like here";
case 100...199: rank[playerid] = 2,TRank = "Put your the rank you like here";
case 200...499: rank[playerid] = 3,TRank = "Put your the rank you like here";
case 500...799: rank[playerid] = 4,TRank = "Put your the rank you like here";
case 800...8000: rank[playerid] = 5,TRank = "Put your the rank you like here";
}
format( string, sizeof string, "~y~Rank:~w~ %s", rank[ playerid ],TRank);
TextDrawSetString( Textdraw0, string );
Can not you have done so?
|
Nope you cannot do it like that because it will mess up
Re: Easy Rank system -
DeTix - 30.10.2012
Big shit with trojans :// He is copy it from another script! COPY SCRIPTER! We dont like copy scripters!
Re: Easy Rank system -
Private200 - 30.10.2012
trolollol . -.-''
STFU Detix . Post me scripter of this here .
It is not copy
Re: Easy Rank system -
DeTix - 30.10.2012
HAH GAY ! WITH ERRORS XD MY ANNOUNCE IS 0 ERRORS :P
Re: Easy Rank system -
DarkyTheAngel - 30.10.2012
Quote:
Originally Posted by DeTix
HAH GAY ! WITH ERRORS XD MY ANNOUNCE IS 0 ERRORS :P
|
Shut the fu*k up !
ON : Good job !
Re: Easy Rank system -
Private200 - 31.10.2012
Quote:
Originally Posted by DarkyTheAngel
Shut the fu*k up !
ON : Good job !
|
Thx for your support man
Quote:
Originally Posted by Jordan98
Very good the Ranking Filescript , congratulations, good job.
|
Thanks .
Advanced Rank system coming soon