[FilterScript] JR's Rank System [SIMPLE]
#1

JR's Rank System [SIMPLE]

-Features of Rank System
-Counts Score not Kills
-10 Ranks.
-To the Rank 9 its Easy, R10 is hard "Chuck Norris Rank" is R10

How to install
-Either you can add into Your FS or just add this to your gamemode! Under OnPlayerCommandText.



pawn Код:
if (strcmp("/myrank", cmdtext, true, 10) == 0)
    {
    if (GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) <= 100)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Private!");
    }
    if (GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) <= 200)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Private 2!");
    }
    if (GetPlayerScore(playerid) >= 200 && GetPlayerScore(playerid) <= 500)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Pilot!");
    }
    if (GetPlayerScore(playerid) >= 500 && GetPlayerScore(playerid) <= 1000)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Sergeant!");
    }
    if (GetPlayerScore(playerid) >= 1000 && GetPlayerScore(playerid) <= 2000)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Commander!");
    }
    if (GetPlayerScore(playerid) >= 2000 && GetPlayerScore(playerid) <= 3000)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Lieutenant!!");
    }
    if (GetPlayerScore(playerid) >= 3000 && GetPlayerScore(playerid) <= 4000)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Captain!");
    }
    if (GetPlayerScore(playerid) >= 4000 && GetPlayerScore(playerid) <= 5000)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Mayor!");
    }
    if (GetPlayerScore(playerid) >= 5000 && GetPlayerScore(playerid) <= 6500)
    {
    SendClientMessage(playerid, COLOR_RED,"You are General!");
    }
    if (GetPlayerScore(playerid) >= 6500 && GetPlayerScore(playerid) <= 50000)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Unstopable Chuck Norris!");
    }
    return 1;

    }
    if (strcmp("/ranks", cmdtext, true, 10) == 0)
    {
    SendClientMessage(playerid, COLOR_BLUE, "====All Ranks (By zohartrejx)=====");
    SendClientMessage(playerid, COLOR_RED, "Private 0-100 Score. Private 2 100-200 Score.");
    SendClientMessage(playerid, COLOR_RED, "Pilot 200-500 Score. Sergeant 500-1000 Score.");
    SendClientMessage(playerid, COLOR_RED, "Commander 1000-2000 Score. Lieutenant 2000-3000 Score.");
    SendClientMessage(playerid, COLOR_RED, "Captain 3000-4000 Score. Mayor 4000-5000 Score.");
    SendClientMessage(playerid, COLOR_RED, "General 5000-6500 Score. Chuck Norris 6500-50000 Score.");
    }
    return 1;

This is pretty simple FS. i just made it for fun in less than 10 minutes!

Thanks
Bye
Reply
#2

this is a codesniple , is very bad coding methode.
Reply
#3

This is FS?? Boring.And btw add some 3D Labe lof ranks on head and add some stuff in onplayerconnect and onplayerspawn
Reply
#4

Quote:
Originally Posted by Gamer_007
Посмотреть сообщение
This is FS?? Boring.And btw add some 3D Labe lof ranks on head and add some stuff in onplayerconnect and onplayerspawn
+1
add extra things
Reply
#5

And btw Your whole code is messy.You need to correct it really..Let me correct it

pawn Код:
if (strcmp("/myrank", cmdtext, true, 10) == 0)
    {
    if (GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) <= 100)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Private!");
    }
    if (GetPlayerScore(playerid) > 100 && GetPlayerScore(playerid) <= 200)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Private 2!");
    }
    if (GetPlayerScore(playerid) > 200 && GetPlayerScore(playerid) <= 500)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Pilot!");
    }
    if (GetPlayerScore(playerid) > 500 && GetPlayerScore(playerid) <= 1000)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Sergeant!");
    }
    if (GetPlayerScore(playerid) > 1000 && GetPlayerScore(playerid) <= 2000)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Commander!");
    }
    if (GetPlayerScore(playerid) > 2000 && GetPlayerScore(playerid) <= 3000)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Lieutenant!!");
    }
    if (GetPlayerScore(playerid) > 3000 && GetPlayerScore(playerid) <= 4000)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Captain!");
    }
    if (GetPlayerScore(playerid) > 4000 && GetPlayerScore(playerid) <= 5000)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Mayor!");
    }
    if (GetPlayerScore(playerid) > 5000 && GetPlayerScore(playerid) <= 6500)
    {
    SendClientMessage(playerid, COLOR_RED,"You are General!");
    }
    if (GetPlayerScore(playerid) > 6500 && GetPlayerScore(playerid) <= 50000)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Unstopable Chuck Norris!");
    }
    return 1;

    }
    if (strcmp("/ranks", cmdtext, true, 10) == 0)
    {
    SendClientMessage(playerid, COLOR_BLUE, "====All Ranks (By zohartrejx)=====");
    SendClientMessage(playerid, COLOR_RED, "Private 0-100 Score. Private 2 100-200 Score.");
    SendClientMessage(playerid, COLOR_RED, "Pilot 200-500 Score. Sergeant 500-1000 Score.");
    SendClientMessage(playerid, COLOR_RED, "Commander 1000-2000 Score. Lieutenant 2000-3000 Score.");
    SendClientMessage(playerid, COLOR_RED, "Captain 3000-4000 Score. Mayor 4000-5000 Score.");
    SendClientMessage(playerid, COLOR_RED, "General 5000-6500 Score. Chuck Norris 6500-50000 Score.");
    }
    return 1;
    }
Reply
#6

Quote:
Originally Posted by Gamer_007
Посмотреть сообщение
And btw Your whole code is messy.You need to correct it really..Let me correct it

pawn Код:
if (strcmp("/myrank", cmdtext, true, 10) == 0)
    {
    if (GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) <= 100)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Private!");
    }
    if (GetPlayerScore(playerid) > 100 && GetPlayerScore(playerid) <= 200)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Private 2!");
    }
    if (GetPlayerScore(playerid) > 200 && GetPlayerScore(playerid) <= 500)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Pilot!");
    }
    if (GetPlayerScore(playerid) > 500 && GetPlayerScore(playerid) <= 1000)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Sergeant!");
    }
    if (GetPlayerScore(playerid) > 1000 && GetPlayerScore(playerid) <= 2000)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Commander!");
    }
    if (GetPlayerScore(playerid) > 2000 && GetPlayerScore(playerid) <= 3000)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Lieutenant!!");
    }
    if (GetPlayerScore(playerid) > 3000 && GetPlayerScore(playerid) <= 4000)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Captain!");
    }
    if (GetPlayerScore(playerid) > 4000 && GetPlayerScore(playerid) <= 5000)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Mayor!");
    }
    if (GetPlayerScore(playerid) > 5000 && GetPlayerScore(playerid) <= 6500)
    {
    SendClientMessage(playerid, COLOR_RED,"You are General!");
    }
    if (GetPlayerScore(playerid) > 6500 && GetPlayerScore(playerid) <= 50000)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Unstopable Chuck Norris!");
    }
    return 1;

    }
    if (strcmp("/ranks", cmdtext, true, 10) == 0)
    {
    SendClientMessage(playerid, COLOR_BLUE, "====All Ranks (By zohartrejx)=====");
    SendClientMessage(playerid, COLOR_RED, "Private 0-100 Score. Private 2 100-200 Score.");
    SendClientMessage(playerid, COLOR_RED, "Pilot 200-500 Score. Sergeant 500-1000 Score.");
    SendClientMessage(playerid, COLOR_RED, "Commander 1000-2000 Score. Lieutenant 2000-3000 Score.");
    SendClientMessage(playerid, COLOR_RED, "Captain 3000-4000 Score. Mayor 4000-5000 Score.");
    SendClientMessage(playerid, COLOR_RED, "General 5000-6500 Score. Chuck Norris 6500-50000 Score.");
    }
    return 1;
    }
So you just added a brace and it's not messed up anymore?
The indentation is messed up, script is alright tho .
Reply
#7

really? "Chuck Norris" you maked me laugh , anyway 3/5....
Reply
#8

Quote:
Originally Posted by [MM]Eminem
Посмотреть сообщение
So you just added a brace and it's not messed up anymore?
The indentation is messed up, script is alright tho .
Check his code man -_-.he uses this

pawn Код:
if (GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) <= 100)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Private!");
    }
    if (GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) <= 200)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Private 2!");
    }
So,when a players score updates,the rank will not be updated because in first case its <= and in next there is >=.so it will not update ur Rank at all.Thats what i changed to this

pawn Код:
if (GetPlayerScore(playerid) > 0 && GetPlayerScore(playerid) <= 100)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Private!");
    }
    if (GetPlayerScore(playerid) > 100 && GetPlayerScore(playerid) <= 200)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Private 2!");
    }
Reply
#9

Quote:
Originally Posted by Gamer_007
Посмотреть сообщение
Check his code man -_-.he uses this

pawn Код:
if (GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) <= 100)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Private!");
    }
    if (GetPlayerScore(playerid) >= 100 && GetPlayerScore(playerid) <= 200)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Private 2!");
    }
So,when a players score updates,the rank will not be updated because in first case its <= and in next there is >=.so it will not update ur Rank at all.Thats what i changed to this

pawn Код:
if (GetPlayerScore(playerid) > 0 && GetPlayerScore(playerid) <= 100)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Private!");
    }
    if (GetPlayerScore(playerid) > 100 && GetPlayerScore(playerid) <= 200)
    {
    SendClientMessage(playerid, COLOR_RED,"You are Private 2!");
    }
A'ight, didn't see that. But you don't call that "messed up".
The indentation is messed tho.
Reply
#10

this is not fs..
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)