[FilterScript] Easy Rank system
#1

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
Reply
#2

Код:
format( string, sizeof string, "~y~Rank:~w~ %s", rank[ playerid ],TRank);
you put two parameters and 1 format string ?
Reply
#3

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
Reply
#4

PHP код:
public OnPlayerUpdateplayerid )
{
switch(
GetPlayerScore(playerid))
{
 case 
0...49rank[playerid] = 0,TRank "Put your the rank you like here";
 case 
50...99rank[playerid] = 1,TRank "Put your the rank you like here";
 case 
100...199rank[playerid] = 2,TRank "Put your the rank you like here";
 case 
200...499rank[playerid] = 3,TRank "Put your the rank you like here";
 case 
500...799rank[playerid] = 4,TRank "Put your the rank you like here";
 case 
800...8000rank[playerid] = 5,TRank "Put your the rank you like here";
}
formatstringsizeof string"~y~Rank:~w~ %s"rankplayerid ],TRank);
TextDrawSetStringTextdraw0string ); 
Can not you have done so?
Reply
#5

Quote:
Originally Posted by AnGeL_KRAMER
Посмотреть сообщение
PHP код:
public OnPlayerUpdateplayerid )
{
switch(
GetPlayerScore(playerid))
{
 case 
0...49rank[playerid] = 0,TRank "Put your the rank you like here";
 case 
50...99rank[playerid] = 1,TRank "Put your the rank you like here";
 case 
100...199rank[playerid] = 2,TRank "Put your the rank you like here";
 case 
200...499rank[playerid] = 3,TRank "Put your the rank you like here";
 case 
500...799rank[playerid] = 4,TRank "Put your the rank you like here";
 case 
800...8000rank[playerid] = 5,TRank "Put your the rank you like here";
}
formatstringsizeof string"~y~Rank:~w~ %s"rankplayerid ],TRank);
TextDrawSetStringTextdraw0string ); 
Can not you have done so?
Nope you cannot do it like that because it will mess up
Reply
#6

Big shit with trojans :// He is copy it from another script! COPY SCRIPTER! We dont like copy scripters!
Reply
#7

trolollol . -.-''

STFU Detix . Post me scripter of this here .
It is not copy
Reply
#8

HAH GAY ! WITH ERRORS XD MY ANNOUNCE IS 0 ERRORS :P
Reply
#9

Quote:
Originally Posted by DeTix
Посмотреть сообщение
HAH GAY ! WITH ERRORS XD MY ANNOUNCE IS 0 ERRORS :P
Shut the fu*k up !

ON : Good job !
Reply
#10

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
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)