[Tutorial] Rank system
#1

Hello
me and my friend create a rank system... and i want to give to all
The Credits:Me and the ZCMD and my friend.
so i want to tell some thing...
see this Rank system the score and the rank... you can change the score what you want.. and the rank name you can change also... i add just Trucker Rank... only Trucker..
and fast time i post my Tutorial to filterscripts so some guy tell me to i need post here so i am post here.
i am trying to help to all it is so simple if you guys just change to the rank name to which rank you want and the score.

Code:
#include <a_samp>
#include <zcmd>


#define GREEN 0x33AA33AA
#define WHITE 0xFFFFFFAA
#define YELLOW 0xF9FF00FF
#define RED 0xFB0000FF
#if defined FILTERSCRIPT


public OnFilterScriptInit()
{
        print("\n--------------------------------------");
        print("Rank System by Tuntun!!! ");
        print("--------------------------------------\n");
        return 1;
}

main{}

#endif


public OnPlayerSpawn(playerid)
{
    if(GetPlayerScore(playerid) > 0 && GetPlayerScore(playerid) < 10)
    {
        new Text3D:label = Create3DTextLabel("New Trucker",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 50 && GetPlayerScore(playerid) < 50)
    {
        new Text3D:label1 = Create3DTextLabel("Trucker",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label1, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 100 && GetPlayerScore(playerid) < 100)
    {
        new Text3D:label2 = Create3DTextLabel("GoodTrucker",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label2, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 200 && GetPlayerScore(playerid) < 200)
    {
        new Text3D:label3 = Create3DTextLabel("SeniorTrucker",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label3, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 300 && GetPlayerScore(playerid) < 300)
    {
        new Text3D:label4 = Create3DTextLabel("BigTrucker",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label4, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 400 && GetPlayerScore(playerid) < 500)
    {
        new Text3D:label5 = Create3DTextLabel("ProTrucker",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label5, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) > 500 && GetPlayerScore(playerid) < 600)
    {
        new Text3D:label6 = Create3DTextLabel("CommercialTrucker",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label6, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) >= 600)
    {
        new Text3D:label7 = Create3DTextLabel("MesterTrucker",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) >= 700)
    {
        new Text3D:label7 = Create3DTextLabel("Transport Trucker",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) >= 800)
    {
        new Text3D:label7 = Create3DTextLabel("CoolTrucker",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) >= 900)
    {
        new Text3D:label7 = Create3DTextLabel("PPTrucker",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) >= 1000)
    {
        new Text3D:label7 = Create3DTextLabel("Commercial Senior Trucker",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) >= 1500)
    {
        new Text3D:label7 = Create3DTextLabel("TrckerBoss",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) >= 2000)
    {
        new Text3D:label7 = Create3DTextLabel("Trucker",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) >= 2500)
    {
        new Text3D:label7 = Create3DTextLabel("PP Senior Trcker",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) >= 3000)
    {
        new Text3D:label7 = Create3DTextLabel("Trucker",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) >= 4000)
    {
        new Text3D:label7 = Create3DTextLabel("PProTrucker Mester",RED, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) >= 5000)
    {
        new Text3D:label7 = Create3DTextLabel("TruckerLegend",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
    }
    else if(GetPlayerScore(playerid) >= 6000)
    {
        new Text3D:label7 = Create3DTextLabel("Trucker Aviator",WHITE, 30.0, 40.0, 50.0, 40.0, 0);
        Attach3DTextLabelToPlayer(label7, playerid, 0.0, 0.0, 0.4);
    }
    return 1;
}



CMD:ranks(playerid,params[])
{
     SendClientMessage(playerid,YELLOW,"Trucker Officer: 0 Score");
     SendClientMessage(playerid,YELLOW,"Trucker Officer: 50 Score");
     SendClientMessage(playerid,YELLOW,"Trucker Officer: 100 Score");
     SendClientMessage(playerid,YELLOW,"Trucker Officer: 200 Score");
     SendClientMessage(playerid,YELLOW,"Trucker 300 Score");
     SendClientMessage(playerid,YELLOW,"Trucker: 400 Score");
     SendClientMessage(playerid,YELLOW,"Trucker: 500 Score");
     SendClientMessage(playerid,YELLOW,"Trucker: 600 Score");
     SendClientMessage(playerid,YELLOW,"Trucker: 700 Score");
     SendClientMessage(playerid,YELLOW,"Trucker: 800 Score");
     SendClientMessage(playerid,YELLOW,"Trucker: 1000 Score");
     SendClientMessage(playerid,YELLOW,"Trucker: 1500 Score");
     SendClientMessage(playerid,YELLOW,"Trucker: 2000 Score");
     SendClientMessage(playerid,YELLOW,"Trucker: 2500 Score");
     SendClientMessage(playerid,YELLOW,"Trucker: 3000 Score");
     SendClientMessage(playerid,YELLOW,"Trucker: 4000 Score");
     SendClientMessage(playerid,YELLOW,"Trucker: 5000 Score");
     SendClientMessage(playerid,RED,"Trucker:600score");
     return 1;
}
CMD:myrank(playerid,params[])
{
     if(GetPlayerScore(playerid) < 0)
     {
        SendClientMessage(playerid,YELLOW,"Trucker!");
     }
     else if(GetPlayerScore(playerid) < 50)
     {
        SendClientMessage(playerid,YELLOW,"Truckerr!");
     }
     else if(GetPlayerScore(playerid) < 100)
     {
        SendClientMessage(playerid,YELLOW,"Trucker!");
     }
     else if(GetPlayerScore(playerid) < 200)
     {
        SendClientMessage(playerid,YELLOW,"Trucker!");
     }
     else if(GetPlayerScore(playerid) < 300)
     {
        SendClientMessage(playerid,YELLOW,"Trucker!");
     }
     else if(GetPlayerScore(playerid) < 400)
     {
        SendClientMessage(playerid, YELLOW,"Trucker!");
     }
     else if(GetPlayerScore(playerid) < 500)
     {
        SendClientMessage(playerid, YELLOW,"Trucker!");
     }
     else if(GetPlayerScore(playerid) < 600)
     {
        SendClientMessage(playerid, YELLOW,"Trucker!");
     }
     else if(GetPlayerScore(playerid) >= 700)
     {
        SendClientMessage(playerid,YELLOW,"Trucker!");
     }
     else if(GetPlayerScore(playerid) >= 800)
     {
        SendClientMessage(playerid,YELLOW,"Trucker!");
     }
     else if(GetPlayerScore(playerid) >= 900)
     {
        SendClientMessage(playerid,YELLOW,"Trucker!");
     }
     else if(GetPlayerScore(playerid) >= 1000)
     {
        SendClientMessage(playerid,YELLOW,"Trucker");
     }
     else if(GetPlayerScore(playerid) >= 1500)
     {
        SendClientMessage(playerid,YELLOW,"Trucker!");
     }
     else if(GetPlayerScore(playerid) >= 2000)
     {
        SendClientMessage(playerid,YELLOW,"Trucker!");
     }
     else if(GetPlayerScore(playerid) >= 2500)
     {
        SendClientMessage(playerid,YELLOW,"Trucker!");
     }
     else if(GetPlayerScore(playerid) >= 3000)
     {
        SendClientMessage(playerid,YELLOW,"Truckerr!");
     }
     else if(GetPlayerScore(playerid) >= 4000)
     {
        SendClientMessage(playerid,YELLOW,"Trucker!");
     }
     else if(GetPlayerScore(playerid) >= 5000)
     {
        SendClientMessage(playerid,RED,"Trucker !");
     }
     return 1;
}
You Can change the rank name and the score's.
Thanks.
Reply
#2

This is not a tutorial...Sorry 0/10
And you shouldn't post this here
Reply
#3

it is useful and some guy don't know how to create a rank system...
Reply
#4

Not really , that would be Copy/Paste.. you don't learn anything from Copy/Paste..
Reply
#5

what you mean?i am not use copy/paste..
Reply
#6

AAfro gave this to me on PP forums
Reply
#7

Why did you was lazy to make it correct name on scores at commands myrank and ranks
Reply
#8

i am lazy... i add to tucker for.. all gamemode is not same.. so if you use a pilot server so you can edit to pilot rank and the score...
Reply
#9

This is succest tut for ever 0,00001/10
Reply
#10

The command "myrank" gonna spam alot if you has a high level. By the away, how do you expect to increase the amount of score? since this was made for new comers it should explain this.

In my opinion, This is a BAD example of a tutorial.
Reply
#11

Actually to be honest, this is one of the worst tutorials I've ever seen.
What is
pawn Code:
else if(GetPlayerScore(playerid) > 100 && GetPlayerScore(playerid) < 100)
even supposed to accomplish?
How can a player's score be above 100 and below 100 at the same time? Not to mention you have done this kind of thing the whole way through the script. Instead of having an actual code, you should show us how the code is working line by line, and explaining how it works, and what it is actually affecting. Better luck next time hey?
Reply
#12

ok i try to create a new script..
Reply
#13

Hmm....
Reply
#14

Stupid tutorial, bad script
Reply
#15

Quote:
Originally Posted by TRe.
View Post
Hmm....
i dont know it its just me but wouldnt this be seen as spamming/trolling?
Reply
#16

HTML Code:
if(GetPlayerScore(playerid) < 0)
{
 SendClientMessage(playerid,YELLOW,"Trucker!");
}
This is fully wrong code bro!

the code should be like THIS

HTML Code:
if(GetPlayerScore(playerid) < 0) && GetPlayerScore(playerid) <= 50)
{
 SendClientMessage(playerid,YELLOW,"Trucker!");
}
this is because if you use that code 0+ all rank is Trucker but if you use && 50 thing then it defines that up to 50

its Rank TRUCKER so that = not even helping some-one

anyways for if you say to give mark on copy paste its = 10/10

and if for tutorial or helping someone = 0.0000000000000001/10

i am honestly speaking nothing is here except copy paste
Reply
#17

yes... i said all can edit it..
Reply
#18

Good job on this man
Reply
#19

it is not useful? need rank in some server..
Reply
#20

I like it and wil edit/use it, I think u typed ''Trucker!'' on the ''/myrank'' command as variable? So that you have to change with the ranks in the beginnning?
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)