[Help] rank system
#1

Hello, i modified the trank system to suit my Modern Warfare theme server.
however, ingame my score is 485 or something but still my rank remains private.
How do i fix this?

Script:


Quote:
#define FILTERSCRIPT

#include <a_samp>

#if defined FILTERSCRIPT

#define COLOR_GREY 0xAFAFAFAA
#define COLOR_WHITE 0x33AA33AA
#define COLOR_RED 0xF30000AA
#define COLOR_LIGHTBLUE 0x00D0F6AA
#define COLOR_CWHITE 0xE0FFFFAA

#define RANK_PRIVATE 0
#define RANK_PrivateFirstClass 1
#define RANK_Specialist 2
#define RANK_Corporal 3
#define RANK_Sergeant 4
#define RANK_StaffSergeant 5
#define RANK_SergeantFirstClass 6
#define RANK_MasterSergeant 7
#define RANK_FirstSergeant 8
#define RANK_SergeantMajor 9
#define RANK_CommandSergeant 10
#define RANK_SecondLieutenant 11
#define RANK_FirstLieutenant 12
#define RANK_Captain 13
#define RANK_Major 14
#define RANK_LieutenantColonel 15
#define RANK_Colonel 16
#define RANK_BrigadierGeneral 17
#define RANK_MajorGeneral 18
#define RANK_LieutenantGeneral 19
#define RANK_General 20
#define RANK_Commander 21

new Text:Private;
new Text:PrivateFirstClass;
new Text:Specialist;
new Text:Corporal;
new Text:Sergeant;
new Text:StaffSergeant;
new Text:SergeantFirstClass;
new Text:MasterSergeant;
new Text:FirstSergeant;
new Text:SergeantMajor;
new Text:CommandSergeant;
new Text:SecondLieutenant;
new Text:FirstLieutenant;
new Text:Captain;
new Text:Major;
new Text:LieutenantColonel;
new Text:Colonel;
new Text:BrigadierGeneral;
new Text:MajorGeneral;
new Text:LieutenantGeneral;
new Text:General;
new Text:Commander;

new gPlayerLogged[MAX_PLAYERS];
new pRank[MAX_PLAYERS];

//------------------------------------------------------------------------------

public OnFilterScriptInit()
{
print("\n--------------------------------------");
print("[FS] Modern warfare ranks loaded!!");
print("--------------------------------------\n");

//-----------

Private = TextDrawCreate(500, 100, "Private");
TextDrawAlignment(Private, 1);
TextDrawFont(Private, 2);
TextDrawLetterSize(Private, 0.400, 1.000);
TextDrawColor(Private, COLOR_WHITE);
TextDrawSetOutline(Private, 1);

PrivateFirstClass = TextDrawCreate(486, 100, "PrivateFirstClass");
TextDrawAlignment(PrivateFirstClass, 1);
TextDrawFont(PrivateFirstClass, 2);
TextDrawLetterSize(PrivateFirstClass, 0.400, 1.000);
TextDrawColor(PrivateFirstClass, COLOR_WHITE);
TextDrawSetOutline(PrivateFirstClass, 1);

Specialist = TextDrawCreate(500, 100, "Specialist");
TextDrawAlignment(Specialist, 1);
TextDrawFont(Specialist, 2);
TextDrawLetterSize(Specialist, 0.400, 1.000);
TextDrawColor(Specialist, COLOR_WHITE);
TextDrawSetOutline(Specialist, 1);

Corporal = TextDrawCreate(500, 100, "Corporal");
TextDrawAlignment(Corporal, 1);
TextDrawFont(Corporal, 2);
TextDrawLetterSize(Corporal, 0.400, 1.000);
TextDrawColor(Corporal, COLOR_WHITE);
TextDrawSetOutline(Corporal, 1);

Sergeant = TextDrawCreate(483, 100, "Sergeant");
TextDrawAlignment(Sergeant, 1);
TextDrawFont(Sergeant, 2);
TextDrawLetterSize(Sergeant, 0.400, 1.000);
TextDrawColor(Sergeant, COLOR_WHITE);
TextDrawSetOutline(Sergeant, 1);

StaffSergeant = TextDrawCreate(490, 100, "StaffSergeant");
TextDrawAlignment(StaffSergeant, 1);
TextDrawFont(StaffSergeant, 2);
TextDrawLetterSize(StaffSergeant, 0.400, 1.000);
TextDrawColor(StaffSergeant, COLOR_WHITE);
TextDrawSetOutline(StaffSergeant, 1);

SergeantFirstClass = TextDrawCreate(490, 100, "SergeantFirstClass");
TextDrawAlignment(SergeantFirstClass, 1);
TextDrawFont(SergeantFirstClass, 2);
TextDrawLetterSize(SergeantFirstClass, 0.400, 1.000);
TextDrawColor(SergeantFirstClass, COLOR_WHITE);
TextDrawSetOutline(SergeantFirstClass, 1);

MasterSergeant = TextDrawCreate(490, 100, "MasterSergeant");
TextDrawAlignment(MasterSergeant, 1);
TextDrawFont(MasterSergeant, 2);
TextDrawLetterSize(MasterSergeant, 0.400, 1.000);
TextDrawColor(MasterSergeant, COLOR_WHITE);
TextDrawSetOutline(MasterSergeant, 1);

FirstSergeant = TextDrawCreate(490, 100, "FirstSergeant");
TextDrawAlignment(FirstSergeant, 1);
TextDrawFont(FirstSergeant, 2);
TextDrawLetterSize(FirstSergeant, 0.400, 1.000);
TextDrawColor(FirstSergeant, COLOR_WHITE);
TextDrawSetOutline(FirstSergeant, 1);

SergeantMajor = TextDrawCreate(490, 100, "SergeantMajor");
TextDrawAlignment(SergeantMajor, 1);
TextDrawFont(SergeantMajor, 2);
TextDrawLetterSize(SergeantMajor, 0.400, 1.000);
TextDrawColor(SergeantMajor, COLOR_WHITE);
TextDrawSetOutline(SergeantMajor, 1);

CommandSergeant = TextDrawCreate(490, 100, "CommandSergeant");
TextDrawAlignment(CommandSergeant, 1);
TextDrawFont(CommandSergeant, 2);
TextDrawLetterSize(CommandSergeant, 0.400, 1.000);
TextDrawColor(CommandSergeant, COLOR_WHITE);
TextDrawSetOutline(CommandSergeant, 1);

SecondLieutenant = TextDrawCreate(490, 100, "SecondLieutenant");
TextDrawAlignment(SecondLieutenant, 1);
TextDrawFont(SecondLieutenant, 2);
TextDrawLetterSize(SecondLieutenant, 0.400, 1.000);
TextDrawColor(SecondLieutenant, COLOR_WHITE);
TextDrawSetOutline(SecondLieutenant, 1);

FirstLieutenant = TextDrawCreate(490, 100, "FirstLieutenant");
TextDrawAlignment(FirstLieutenant, 1);
TextDrawFont(FirstLieutenant, 2);
TextDrawLetterSize(FirstLieutenant, 0.400, 1.000);
TextDrawColor(FirstLieutenant, COLOR_WHITE);
TextDrawSetOutline(FirstLieutenant, 1);

Captain = TextDrawCreate(490, 100, "Captain");
TextDrawAlignment(Captain, 1);
TextDrawFont(Captain, 2);
TextDrawLetterSize(Captain, 0.400, 1.000);
TextDrawColor(Captain, COLOR_WHITE);
TextDrawSetOutline(Captain, 1);

Major = TextDrawCreate(490, 100, "Major");
TextDrawAlignment(Major, 1);
TextDrawFont(Major, 2);
TextDrawLetterSize(Major, 0.400, 1.000);
TextDrawColor(Major, COLOR_WHITE);
TextDrawSetOutline(Major, 1);

LieutenantColonel = TextDrawCreate(490, 100, "LieutenantColonel");
TextDrawAlignment(LieutenantColonel, 1);
TextDrawFont(LieutenantColonel, 2);
TextDrawLetterSize(LieutenantColonel, 0.400, 1.000);
TextDrawColor(LieutenantColonel, COLOR_WHITE);
TextDrawSetOutline(LieutenantColonel, 1);

Colonel = TextDrawCreate(490, 100, "Colonel");
TextDrawAlignment(Colonel, 1);
TextDrawFont(Colonel, 2);
TextDrawLetterSize(Colonel, 0.400, 1.000);
TextDrawColor(Colonel, COLOR_WHITE);
TextDrawSetOutline(Colonel, 1);

BrigadierGeneral = TextDrawCreate(490, 100, "BrigadierGeneral");
TextDrawAlignment(BrigadierGeneral, 1);
TextDrawFont(BrigadierGeneral, 2);
TextDrawLetterSize(BrigadierGeneral, 0.400, 1.000);
TextDrawColor(BrigadierGeneral, COLOR_WHITE);
TextDrawSetOutline(BrigadierGeneral, 1);

MajorGeneral = TextDrawCreate(490, 100, "MajorGeneral");
TextDrawAlignment(MajorGeneral, 1);
TextDrawFont(MajorGeneral, 2);
TextDrawLetterSize(MajorGeneral, 0.400, 1.000);
TextDrawColor(MajorGeneral, COLOR_WHITE);
TextDrawSetOutline(MajorGeneral, 1);

LieutenantGeneral = TextDrawCreate(490, 100, "*LieutenantGeneral*");
TextDrawAlignment(LieutenantGeneral, 1);
TextDrawFont(LieutenantGeneral, 2);
TextDrawLetterSize(LieutenantGeneral, 0.400, 1.000);
TextDrawColor(LieutenantGeneral, COLOR_WHITE);
TextDrawSetOutline(LieutenantGeneral, 1);

General = TextDrawCreate(490, 100, "**General**");
TextDrawAlignment(General, 1);
TextDrawFont(General, 2);
TextDrawLetterSize(General, 0.400, 1.000);
TextDrawColor(General, COLOR_WHITE);
TextDrawSetOutline(General, 1);

Commander = TextDrawCreate(490, 100, "***Commander***");
TextDrawAlignment(Commander, 1);
TextDrawFont(Commander, 2);
TextDrawLetterSize(Commander, 0.400, 1.000);
TextDrawColor(Commander, COLOR_WHITE);
TextDrawSetOutline(Commander, 1);

return 1;
}

#endif

public OnPlayerSpawn(playerid)
{
if(gPlayerLogged[playerid] == 0) { // If not logged in
TextDrawHideForPlayer(playerid, Private);
TextDrawHideForPlayer(playerid, PrivateFirstClass);
TextDrawHideForPlayer(playerid, Specialist);
TextDrawHideForPlayer(playerid, Corporal);
TextDrawHideForPlayer(playerid, Sergeant);
TextDrawHideForPlayer(playerid, StaffSergeant);
TextDrawHideForPlayer(playerid, SergeantFirstClass);
TextDrawHideForPlayer(playerid, MasterSergeant);
TextDrawHideForPlayer(playerid, FirstSergeant);
TextDrawHideForPlayer(playerid, SergeantMajor);
TextDrawHideForPlayer(playerid, CommandSergeant);
TextDrawHideForPlayer(playerid, SecondLieutenant);
TextDrawHideForPlayer(playerid, FirstLieutenant);
TextDrawHideForPlayer(playerid, Captain);
TextDrawHideForPlayer(playerid, Major);
TextDrawHideForPlayer(playerid, LieutenantColonel);
TextDrawHideForPlayer(playerid, Colonel);
TextDrawHideForPlayer(playerid, BrigadierGeneral);
TextDrawHideForPlayer(playerid, MajorGeneral);
TextDrawHideForPlayer(playerid, LieutenantGeneral);
TextDrawHideForPlayer(playerid, General);
TextDrawHideForPlayer(playerid, Commander);
}

if(GetPlayerScore(playerid) >0) { // Private
SetPlayerHealth(playerid, 50.0);
TextDrawShowForPlayer(playerid, Private);
TextDrawHideForPlayer(playerid, PrivateFirstClass);
TextDrawHideForPlayer(playerid, Specialist);
TextDrawHideForPlayer(playerid, Corporal);
TextDrawHideForPlayer(playerid, Sergeant);
TextDrawHideForPlayer(playerid, StaffSergeant);
TextDrawHideForPlayer(playerid, SergeantFirstClass);
TextDrawHideForPlayer(playerid, MasterSergeant);
TextDrawHideForPlayer(playerid, FirstSergeant);
TextDrawHideForPlayer(playerid, SergeantMajor);
TextDrawHideForPlayer(playerid, CommandSergeant);
TextDrawHideForPlayer(playerid, SecondLieutenant);
TextDrawHideForPlayer(playerid, FirstLieutenant);
TextDrawHideForPlayer(playerid, Captain);
TextDrawHideForPlayer(playerid, Major);
TextDrawHideForPlayer(playerid, LieutenantColonel);
TextDrawHideForPlayer(playerid, Colonel);
TextDrawHideForPlayer(playerid, BrigadierGeneral);
TextDrawHideForPlayer(playerid, MajorGeneral);
TextDrawHideForPlayer(playerid, LieutenantGeneral);
TextDrawHideForPlayer(playerid, General);
TextDrawHideForPlayer(playerid, Commander);
}

else if(GetPlayerScore(playerid) >2) { // PrivateFirstClass
SetPlayerHealth(playerid, 50.0);
SetPlayerArmour(playerid, 10.0);
TextDrawHideForPlayer(playerid, Private);
TextDrawShowForPlayer(playerid, PrivateFirstClass);
TextDrawHideForPlayer(playerid, Specialist);
TextDrawHideForPlayer(playerid, Corporal);
TextDrawHideForPlayer(playerid, Sergeant);
TextDrawHideForPlayer(playerid, StaffSergeant);
TextDrawHideForPlayer(playerid, SergeantFirstClass);
TextDrawHideForPlayer(playerid, MasterSergeant);
TextDrawHideForPlayer(playerid, FirstSergeant);
TextDrawHideForPlayer(playerid, SergeantMajor);
TextDrawHideForPlayer(playerid, CommandSergeant);
TextDrawHideForPlayer(playerid, SecondLieutenant);
TextDrawHideForPlayer(playerid, FirstLieutenant);
TextDrawHideForPlayer(playerid, Captain);
TextDrawHideForPlayer(playerid, Major);
TextDrawHideForPlayer(playerid, LieutenantColonel);
TextDrawHideForPlayer(playerid, Colonel);
TextDrawHideForPlayer(playerid, BrigadierGeneral);
TextDrawHideForPlayer(playerid, MajorGeneral);
TextDrawHideForPlayer(playerid, LieutenantGeneral);
TextDrawHideForPlayer(playerid, General);
TextDrawHideForPlayer(playerid, Commander);
}

else if(GetPlayerScore(playerid) >7) { // Specialist
SetPlayerHealth(playerid, 60.0);
SetPlayerArmour(playerid, 10.0);
TextDrawHideForPlayer(playerid, PrivateFirstClass);
TextDrawHideForPlayer(playerid, Private);
TextDrawShowForPlayer(playerid, Specialist);
TextDrawHideForPlayer(playerid, Corporal);
TextDrawHideForPlayer(playerid, Sergeant);
TextDrawHideForPlayer(playerid, StaffSergeant);
TextDrawHideForPlayer(playerid, SergeantFirstClass);
TextDrawHideForPlayer(playerid, MasterSergeant);
TextDrawHideForPlayer(playerid, FirstSergeant);
TextDrawHideForPlayer(playerid, SergeantMajor);
TextDrawHideForPlayer(playerid, CommandSergeant);
TextDrawHideForPlayer(playerid, SecondLieutenant);
TextDrawHideForPlayer(playerid, FirstLieutenant);
TextDrawHideForPlayer(playerid, Captain);
TextDrawHideForPlayer(playerid, Major);
TextDrawHideForPlayer(playerid, LieutenantColonel);
TextDrawHideForPlayer(playerid, Colonel);
TextDrawHideForPlayer(playerid, BrigadierGeneral);
TextDrawHideForPlayer(playerid, MajorGeneral);
TextDrawHideForPlayer(playerid, LieutenantGeneral);
TextDrawHideForPlayer(playerid, General);
TextDrawHideForPlayer(playerid, Commander);
}

else if(GetPlayerScore(playerid) >14) { // Corporal
SetPlayerHealth(playerid, 60.0);
SetPlayerArmour(playerid, 20.0);
TextDrawHideForPlayer(playerid, PrivateFirstClass);
TextDrawHideForPlayer(playerid, Specialist);
TextDrawHideForPlayer(playerid, Private);
TextDrawShowForPlayer(playerid, Corporal);
TextDrawHideForPlayer(playerid, Sergeant);
TextDrawHideForPlayer(playerid, StaffSergeant);
TextDrawHideForPlayer(playerid, SergeantFirstClass);
TextDrawHideForPlayer(playerid, MasterSergeant);
TextDrawHideForPlayer(playerid, FirstSergeant);
TextDrawHideForPlayer(playerid, SergeantMajor);
TextDrawHideForPlayer(playerid, CommandSergeant);
TextDrawHideForPlayer(playerid, SecondLieutenant);
TextDrawHideForPlayer(playerid, FirstLieutenant);
TextDrawHideForPlayer(playerid, Captain);
TextDrawHideForPlayer(playerid, Major);
TextDrawHideForPlayer(playerid, LieutenantColonel);
TextDrawHideForPlayer(playerid, Colonel);
TextDrawHideForPlayer(playerid, BrigadierGeneral);
TextDrawHideForPlayer(playerid, MajorGeneral);
TextDrawHideForPlayer(playerid, LieutenantGeneral);
TextDrawHideForPlayer(playerid, General);
TextDrawHideForPlayer(playerid, Commander);
}

else if(GetPlayerScore(playerid) >24) { // Sergeant
SetPlayerHealth(playerid, 70.0);
SetPlayerArmour(playerid, 20.0);
TextDrawHideForPlayer(playerid, PrivateFirstClass);
TextDrawHideForPlayer(playerid, Specialist);
TextDrawHideForPlayer(playerid, Corporal);
TextDrawHideForPlayer(playerid, Private);
TextDrawShowForPlayer(playerid, Sergeant);
TextDrawHideForPlayer(playerid, StaffSergeant);
TextDrawHideForPlayer(playerid, SergeantFirstClass);
TextDrawHideForPlayer(playerid, MasterSergeant);
TextDrawHideForPlayer(playerid, FirstSergeant);
TextDrawHideForPlayer(playerid, SergeantMajor);
TextDrawHideForPlayer(playerid, CommandSergeant);
TextDrawHideForPlayer(playerid, SecondLieutenant);
TextDrawHideForPlayer(playerid, FirstLieutenant);
TextDrawHideForPlayer(playerid, Captain);
TextDrawHideForPlayer(playerid, Major);
TextDrawHideForPlayer(playerid, LieutenantColonel);
TextDrawHideForPlayer(playerid, Colonel);
TextDrawHideForPlayer(playerid, BrigadierGeneral);
TextDrawHideForPlayer(playerid, MajorGeneral);
TextDrawHideForPlayer(playerid, LieutenantGeneral);
TextDrawHideForPlayer(playerid, General);
TextDrawHideForPlayer(playerid, Commander);
}

else if(GetPlayerScore(playerid) >39) { // StaffSergeant
SetPlayerHealth(playerid, 70);
SetPlayerArmour(playerid, 30);
TextDrawHideForPlayer(playerid, PrivateFirstClass);
TextDrawHideForPlayer(playerid, Specialist);
TextDrawHideForPlayer(playerid, Corporal);
TextDrawHideForPlayer(playerid, Sergeant);
TextDrawShowForPlayer(playerid, StaffSergeant);
TextDrawHideForPlayer(playerid, Private);
TextDrawHideForPlayer(playerid, SergeantFirstClass);
TextDrawHideForPlayer(playerid, MasterSergeant);
TextDrawHideForPlayer(playerid, FirstSergeant);
TextDrawHideForPlayer(playerid, SergeantMajor);
TextDrawHideForPlayer(playerid, CommandSergeant);
TextDrawHideForPlayer(playerid, SecondLieutenant);
TextDrawHideForPlayer(playerid, FirstLieutenant);
TextDrawHideForPlayer(playerid, Captain);
TextDrawHideForPlayer(playerid, Major);
TextDrawHideForPlayer(playerid, LieutenantColonel);
TextDrawHideForPlayer(playerid, Colonel);
TextDrawHideForPlayer(playerid, BrigadierGeneral);
TextDrawHideForPlayer(playerid, MajorGeneral);
TextDrawHideForPlayer(playerid, LieutenantGeneral);
TextDrawHideForPlayer(playerid, General);
TextDrawHideForPlayer(playerid, Commander);
}
else if(GetPlayerScore(playerid) >59) { // SergeantFirstClass
SetPlayerHealth(playerid, 80);
SetPlayerArmour(playerid, 30);
TextDrawHideForPlayer(playerid, PrivateFirstClass);
TextDrawHideForPlayer(playerid, Specialist);
TextDrawHideForPlayer(playerid, Corporal);
TextDrawHideForPlayer(playerid, Sergeant);
TextDrawHideForPlayer(playerid, Private);
TextDrawHideForPlayer(playerid, StaffSergeant);
TextDrawShowForPlayer(playerid, SergeantFirstClass);
TextDrawHideForPlayer(playerid, MasterSergeant);
TextDrawHideForPlayer(playerid, FirstSergeant);
TextDrawHideForPlayer(playerid, SergeantMajor);
TextDrawHideForPlayer(playerid, CommandSergeant);
TextDrawHideForPlayer(playerid, SecondLieutenant);
TextDrawHideForPlayer(playerid, FirstLieutenant);
TextDrawHideForPlayer(playerid, Captain);
TextDrawHideForPlayer(playerid, Major);
TextDrawHideForPlayer(playerid, LieutenantColonel);
TextDrawHideForPlayer(playerid, Colonel);
TextDrawHideForPlayer(playerid, BrigadierGeneral);
TextDrawHideForPlayer(playerid, MajorGeneral);
TextDrawHideForPlayer(playerid, LieutenantGeneral);
TextDrawHideForPlayer(playerid, General);
TextDrawHideForPlayer(playerid, Commander);
}
else if(GetPlayerScore(playerid) >84) { // MasterSergeant
SetPlayerHealth(playerid, 80);
SetPlayerArmour(playerid, 40);
TextDrawHideForPlayer(playerid, PrivateFirstClass);
TextDrawHideForPlayer(playerid, Specialist);
TextDrawHideForPlayer(playerid, Corporal);
TextDrawHideForPlayer(playerid, Sergeant);
TextDrawHideForPlayer(playerid, Private);
TextDrawHideForPlayer(playerid, StaffSergeant);
TextDrawHideForPlayer(playerid, SergeantFirstClass);
TextDrawShowForPlayer(playerid, MasterSergeant);
TextDrawHideForPlayer(playerid, FirstSergeant);
TextDrawHideForPlayer(playerid, SergeantMajor);
TextDrawHideForPlayer(playerid, CommandSergeant);
TextDrawHideForPlayer(playerid, SecondLieutenant);
TextDrawHideForPlayer(playerid, FirstLieutenant);
TextDrawHideForPlayer(playerid, Captain);
TextDrawHideForPlayer(playerid, Major);
TextDrawHideForPlayer(playerid, LieutenantColonel);
TextDrawHideForPlayer(playerid, Colonel);
TextDrawHideForPlayer(playerid, BrigadierGeneral);
TextDrawHideForPlayer(playerid, MajorGeneral);
TextDrawHideForPlayer(playerid, LieutenantGeneral);
TextDrawHideForPlayer(playerid, General);
TextDrawHideForPlayer(playerid, Commander);
}
else if(GetPlayerScore(playerid) >114) { // FirstSergeant
SetPlayerHealth(playerid, 90);
SetPlayerArmour(playerid, 40);
TextDrawHideForPlayer(playerid, PrivateFirstClass);
TextDrawHideForPlayer(playerid, Specialist);
TextDrawHideForPlayer(playerid, Corporal);
TextDrawHideForPlayer(playerid, Sergeant);
TextDrawHideForPlayer(playerid, Private);
TextDrawHideForPlayer(playerid, StaffSergeant);
TextDrawHideForPlayer(playerid, SergeantFirstClass);
TextDrawHideForPlayer(playerid, MasterSergeant);
TextDrawShowForPlayer(playerid, FirstSergeant);
TextDrawHideForPlayer(playerid, SergeantMajor);
TextDrawHideForPlayer(playerid, CommandSergeant);
TextDrawHideForPlayer(playerid, SecondLieutenant);
TextDrawHideForPlayer(playerid, FirstLieutenant);
TextDrawHideForPlayer(playerid, Captain);
TextDrawHideForPlayer(playerid, Major);
TextDrawHideForPlayer(playerid, LieutenantColonel);
TextDrawHideForPlayer(playerid, Colonel);
TextDrawHideForPlayer(playerid, BrigadierGeneral);
TextDrawHideForPlayer(playerid, MajorGeneral);
TextDrawHideForPlayer(playerid, LieutenantGeneral);
TextDrawHideForPlayer(playerid, General);
TextDrawHideForPlayer(playerid, Commander);
}
else if(GetPlayerScore(playerid) >149) { // SergeantMajor
SetPlayerHealth(playerid, 90);
SetPlayerArmour(playerid, 50);
TextDrawHideForPlayer(playerid, PrivateFirstClass);
TextDrawHideForPlayer(playerid, Specialist);
TextDrawHideForPlayer(playerid, Corporal);
TextDrawHideForPlayer(playerid, Sergeant);
TextDrawHideForPlayer(playerid, Private);
TextDrawHideForPlayer(playerid, StaffSergeant);
TextDrawHideForPlayer(playerid, SergeantFirstClass);
TextDrawHideForPlayer(playerid, MasterSergeant);
TextDrawHideForPlayer(playerid, FirstSergeant);
TextDrawShowForPlayer(playerid, SergeantMajor);
TextDrawHideForPlayer(playerid, CommandSergeant);
TextDrawHideForPlayer(playerid, SecondLieutenant);
TextDrawHideForPlayer(playerid, FirstLieutenant);
TextDrawHideForPlayer(playerid, Captain);
TextDrawHideForPlayer(playerid, Major);
TextDrawHideForPlayer(playerid, LieutenantColonel);
TextDrawHideForPlayer(playerid, Colonel);
TextDrawHideForPlayer(playerid, BrigadierGeneral);
TextDrawHideForPlayer(playerid, MajorGeneral);
TextDrawHideForPlayer(playerid, LieutenantGeneral);
TextDrawHideForPlayer(playerid, General);
TextDrawHideForPlayer(playerid, Commander);
}
else if(GetPlayerScore(playerid) >189) { // CommandSergeant
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 50);
TextDrawHideForPlayer(playerid, PrivateFirstClass);
TextDrawHideForPlayer(playerid, Specialist);
TextDrawHideForPlayer(playerid, Corporal);
TextDrawHideForPlayer(playerid, Sergeant);
TextDrawHideForPlayer(playerid, Private);
TextDrawHideForPlayer(playerid, StaffSergeant);
TextDrawHideForPlayer(playerid, SergeantFirstClass);
TextDrawHideForPlayer(playerid, MasterSergeant);
TextDrawHideForPlayer(playerid, FirstSergeant);
TextDrawHideForPlayer(playerid, SergeantMajor);
TextDrawShowForPlayer(playerid, CommandSergeant);
TextDrawHideForPlayer(playerid, SecondLieutenant);
TextDrawHideForPlayer(playerid, FirstLieutenant);
TextDrawHideForPlayer(playerid, Captain);
TextDrawHideForPlayer(playerid, Major);
TextDrawHideForPlayer(playerid, LieutenantColonel);
TextDrawHideForPlayer(playerid, Colonel);
TextDrawHideForPlayer(playerid, BrigadierGeneral);
TextDrawHideForPlayer(playerid, MajorGeneral);
TextDrawHideForPlayer(playerid, LieutenantGeneral);
TextDrawHideForPlayer(playerid, General);
TextDrawHideForPlayer(playerid, Commander);
}
else if(GetPlayerScore(playerid) >239) { // SecondLieutenant
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 60);
TextDrawHideForPlayer(playerid, PrivateFirstClass);
TextDrawHideForPlayer(playerid, Specialist);
TextDrawHideForPlayer(playerid, Corporal);
TextDrawHideForPlayer(playerid, Sergeant);
TextDrawHideForPlayer(playerid, Private);
TextDrawHideForPlayer(playerid, StaffSergeant);
TextDrawHideForPlayer(playerid, SergeantFirstClass);
TextDrawHideForPlayer(playerid, MasterSergeant);
TextDrawHideForPlayer(playerid, FirstSergeant);
TextDrawHideForPlayer(playerid, SergeantMajor);
TextDrawHideForPlayer(playerid, CommandSergeant);
TextDrawShowForPlayer(playerid, SecondLieutenant);
TextDrawHideForPlayer(playerid, FirstLieutenant);
TextDrawHideForPlayer(playerid, Captain);
TextDrawHideForPlayer(playerid, Major);
TextDrawHideForPlayer(playerid, LieutenantColonel);
TextDrawHideForPlayer(playerid, Colonel);
TextDrawHideForPlayer(playerid, BrigadierGeneral);
TextDrawHideForPlayer(playerid, MajorGeneral);
TextDrawHideForPlayer(playerid, LieutenantGeneral);
TextDrawHideForPlayer(playerid, General);
TextDrawHideForPlayer(playerid, Commander);
}
else if(GetPlayerScore(playerid) >299) { // FirstLieutenant
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 70);
TextDrawHideForPlayer(playerid, PrivateFirstClass);
TextDrawHideForPlayer(playerid, Specialist);
TextDrawHideForPlayer(playerid, Corporal);
TextDrawHideForPlayer(playerid, Sergeant);
TextDrawHideForPlayer(playerid, Private);
TextDrawHideForPlayer(playerid, StaffSergeant);
TextDrawHideForPlayer(playerid, SergeantFirstClass);
TextDrawHideForPlayer(playerid, MasterSergeant);
TextDrawHideForPlayer(playerid, FirstSergeant);
TextDrawHideForPlayer(playerid, SergeantMajor);
TextDrawHideForPlayer(playerid, CommandSergeant);
TextDrawHideForPlayer(playerid, SecondLieutenant);
TextDrawShowForPlayer(playerid, FirstLieutenant);
TextDrawHideForPlayer(playerid, Captain);
TextDrawHideForPlayer(playerid, Major);
TextDrawHideForPlayer(playerid, LieutenantColonel);
TextDrawHideForPlayer(playerid, Colonel);
TextDrawHideForPlayer(playerid, BrigadierGeneral);
TextDrawHideForPlayer(playerid, MajorGeneral);
TextDrawHideForPlayer(playerid, LieutenantGeneral);
TextDrawHideForPlayer(playerid, General);
TextDrawHideForPlayer(playerid, Commander);
}
else if(GetPlayerScore(playerid) >369) { // Captain
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 80);
TextDrawHideForPlayer(playerid, PrivateFirstClass);
TextDrawHideForPlayer(playerid, Specialist);
TextDrawHideForPlayer(playerid, Corporal);
TextDrawHideForPlayer(playerid, Sergeant);
TextDrawHideForPlayer(playerid, Private);
TextDrawHideForPlayer(playerid, StaffSergeant);
TextDrawHideForPlayer(playerid, SergeantFirstClass);
TextDrawHideForPlayer(playerid, MasterSergeant);
TextDrawHideForPlayer(playerid, FirstSergeant);
TextDrawHideForPlayer(playerid, SergeantMajor);
TextDrawHideForPlayer(playerid, CommandSergeant);
TextDrawHideForPlayer(playerid, SecondLieutenant);
TextDrawHideForPlayer(playerid, FirstLieutenant);
TextDrawShowForPlayer(playerid, Captain);
TextDrawHideForPlayer(playerid, Major);
TextDrawHideForPlayer(playerid, LieutenantColonel);
TextDrawHideForPlayer(playerid, Colonel);
TextDrawHideForPlayer(playerid, BrigadierGeneral);
TextDrawHideForPlayer(playerid, MajorGeneral);
TextDrawHideForPlayer(playerid, LieutenantGeneral);
TextDrawHideForPlayer(playerid, General);
TextDrawHideForPlayer(playerid, Commander);
}
else if(GetPlayerScore(playerid) >439) { // Major
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 90);
TextDrawHideForPlayer(playerid, PrivateFirstClass);
TextDrawHideForPlayer(playerid, Specialist);
TextDrawHideForPlayer(playerid, Corporal);
TextDrawHideForPlayer(playerid, Sergeant);
TextDrawHideForPlayer(playerid, Private);
TextDrawHideForPlayer(playerid, StaffSergeant);
TextDrawHideForPlayer(playerid, SergeantFirstClass);
TextDrawHideForPlayer(playerid, MasterSergeant);
TextDrawHideForPlayer(playerid, FirstSergeant);
TextDrawHideForPlayer(playerid, SergeantMajor);
TextDrawHideForPlayer(playerid, CommandSergeant);
TextDrawHideForPlayer(playerid, SecondLieutenant);
TextDrawHideForPlayer(playerid, FirstLieutenant);
TextDrawHideForPlayer(playerid, Captain);
TextDrawShowForPlayer(playerid, Major);
TextDrawHideForPlayer(playerid, LieutenantColonel);
TextDrawHideForPlayer(playerid, Colonel);
TextDrawHideForPlayer(playerid, BrigadierGeneral);
TextDrawHideForPlayer(playerid, MajorGeneral);
TextDrawHideForPlayer(playerid, LieutenantGeneral);
TextDrawHideForPlayer(playerid, General);
TextDrawHideForPlayer(playerid, Commander);
}
else if(GetPlayerScore(playerid) >499) { // LieutenantColonel
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
TextDrawHideForPlayer(playerid, PrivateFirstClass);
TextDrawHideForPlayer(playerid, Specialist);
TextDrawHideForPlayer(playerid, Corporal);
TextDrawHideForPlayer(playerid, Sergeant);
TextDrawHideForPlayer(playerid, Private);
TextDrawHideForPlayer(playerid, StaffSergeant);
TextDrawHideForPlayer(playerid, SergeantFirstClass);
TextDrawHideForPlayer(playerid, MasterSergeant);
TextDrawHideForPlayer(playerid, FirstSergeant);
TextDrawHideForPlayer(playerid, SergeantMajor);
TextDrawHideForPlayer(playerid, CommandSergeant);
TextDrawHideForPlayer(playerid, SecondLieutenant);
TextDrawHideForPlayer(playerid, FirstLieutenant);
TextDrawHideForPlayer(playerid, Captain);
TextDrawHideForPlayer(playerid, Major);
TextDrawShowForPlayer(playerid, LieutenantColonel);
TextDrawHideForPlayer(playerid, Colonel);
TextDrawHideForPlayer(playerid, BrigadierGeneral);
TextDrawHideForPlayer(playerid, MajorGeneral);
TextDrawHideForPlayer(playerid, LieutenantGeneral);
TextDrawHideForPlayer(playerid, General);
TextDrawHideForPlayer(playerid, Commander);
}
else if(GetPlayerScore(playerid) >579) { // Colonel
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
GivePlayerWeapon(playerid, 35, 20);
TextDrawHideForPlayer(playerid, PrivateFirstClass);
TextDrawHideForPlayer(playerid, Specialist);
TextDrawHideForPlayer(playerid, Corporal);
TextDrawHideForPlayer(playerid, Sergeant);
TextDrawHideForPlayer(playerid, Private);
TextDrawHideForPlayer(playerid, StaffSergeant);
TextDrawHideForPlayer(playerid, SergeantFirstClass);
TextDrawHideForPlayer(playerid, MasterSergeant);
TextDrawHideForPlayer(playerid, FirstSergeant);
TextDrawHideForPlayer(playerid, SergeantMajor);
TextDrawHideForPlayer(playerid, CommandSergeant);
TextDrawHideForPlayer(playerid, SecondLieutenant);
TextDrawHideForPlayer(playerid, FirstLieutenant);
TextDrawHideForPlayer(playerid, Captain);
TextDrawHideForPlayer(playerid, Major);
TextDrawHideForPlayer(playerid, LieutenantColonel);
TextDrawShowForPlayer(playerid, Colonel);
TextDrawHideForPlayer(playerid, BrigadierGeneral);
TextDrawHideForPlayer(playerid, MajorGeneral);
TextDrawHideForPlayer(playerid, LieutenantGeneral);
TextDrawHideForPlayer(playerid, General);
TextDrawHideForPlayer(playerid, Commander);
}
else if(GetPlayerScore(playerid) >659) { // BrigadierGeneral
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
GivePlayerWeapon(playerid, 30, 9999);
GivePlayerWeapon(playerid, 31, 9999);
GivePlayerWeapon(playerid, 35, 20);
TextDrawHideForPlayer(playerid, PrivateFirstClass);
TextDrawHideForPlayer(playerid, Specialist);
TextDrawHideForPlayer(playerid, Corporal);
TextDrawHideForPlayer(playerid, Sergeant);
TextDrawHideForPlayer(playerid, Private);
TextDrawHideForPlayer(playerid, StaffSergeant);
TextDrawHideForPlayer(playerid, SergeantFirstClass);
TextDrawHideForPlayer(playerid, MasterSergeant);
TextDrawHideForPlayer(playerid, FirstSergeant);
TextDrawHideForPlayer(playerid, SergeantMajor);
TextDrawHideForPlayer(playerid, CommandSergeant);
TextDrawHideForPlayer(playerid, SecondLieutenant);
TextDrawHideForPlayer(playerid, FirstLieutenant);
TextDrawHideForPlayer(playerid, Captain);
TextDrawHideForPlayer(playerid, Major);
TextDrawHideForPlayer(playerid, LieutenantColonel);
TextDrawHideForPlayer(playerid, Colonel);
TextDrawShowForPlayer(playerid, BrigadierGeneral);
TextDrawHideForPlayer(playerid, MajorGeneral);
TextDrawHideForPlayer(playerid, LieutenantGeneral);
TextDrawHideForPlayer(playerid, General);
TextDrawHideForPlayer(playerid, Commander);
}
else if(GetPlayerScore(playerid) >749) { // MajorGeneral
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
GivePlayerWeapon(playerid, 30, 9999);
GivePlayerWeapon(playerid, 31, 9999);
GivePlayerWeapon(playerid, 35, 20);
TextDrawHideForPlayer(playerid, PrivateFirstClass);
TextDrawHideForPlayer(playerid, Specialist);
TextDrawHideForPlayer(playerid, Corporal);
TextDrawHideForPlayer(playerid, Sergeant);
TextDrawHideForPlayer(playerid, Private);
TextDrawHideForPlayer(playerid, StaffSergeant);
TextDrawHideForPlayer(playerid, SergeantFirstClass);
TextDrawHideForPlayer(playerid, MasterSergeant);
TextDrawHideForPlayer(playerid, FirstSergeant);
TextDrawHideForPlayer(playerid, SergeantMajor);
TextDrawHideForPlayer(playerid, CommandSergeant);
TextDrawHideForPlayer(playerid, SecondLieutenant);
TextDrawHideForPlayer(playerid, FirstLieutenant);
TextDrawHideForPlayer(playerid, Captain);
TextDrawHideForPlayer(playerid, Major);
TextDrawHideForPlayer(playerid, LieutenantColonel);
TextDrawHideForPlayer(playerid, Colonel);
TextDrawHideForPlayer(playerid, BrigadierGeneral);
TextDrawShowForPlayer(playerid, MajorGeneral);
TextDrawHideForPlayer(playerid, LieutenantGeneral);
TextDrawHideForPlayer(playerid, General);
TextDrawHideForPlayer(playerid, Commander);
}
else if(GetPlayerScore(playerid) >869) { // LieutenantGeneral
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
GivePlayerWeapon(playerid, 30, 9999);
GivePlayerWeapon(playerid, 31, 9999);
GivePlayerWeapon(playerid, 35, 20);
TextDrawHideForPlayer(playerid, PrivateFirstClass);
TextDrawHideForPlayer(playerid, Specialist);
TextDrawHideForPlayer(playerid, Corporal);
TextDrawHideForPlayer(playerid, Sergeant);
TextDrawHideForPlayer(playerid, Private);
TextDrawHideForPlayer(playerid, StaffSergeant);
TextDrawHideForPlayer(playerid, SergeantFirstClass);
TextDrawHideForPlayer(playerid, MasterSergeant);
TextDrawHideForPlayer(playerid, FirstSergeant);
TextDrawHideForPlayer(playerid, SergeantMajor);
TextDrawHideForPlayer(playerid, CommandSergeant);
TextDrawHideForPlayer(playerid, SecondLieutenant);
TextDrawHideForPlayer(playerid, FirstLieutenant);
TextDrawHideForPlayer(playerid, Captain);
TextDrawHideForPlayer(playerid, Major);
TextDrawHideForPlayer(playerid, LieutenantColonel);
TextDrawHideForPlayer(playerid, Colonel);
TextDrawHideForPlayer(playerid, BrigadierGeneral);
TextDrawHideForPlayer(playerid, MajorGeneral);
TextDrawShowForPlayer(playerid, LieutenantGeneral);
TextDrawHideForPlayer(playerid, General);
TextDrawHideForPlayer(playerid, Commander);
}
else if(GetPlayerScore(playerid) >919) { // General
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
GivePlayerWeapon(playerid, 30, 9999);
GivePlayerWeapon(playerid, 31, 9999);
GivePlayerWeapon(playerid, 35, 20);
TextDrawHideForPlayer(playerid, PrivateFirstClass);
TextDrawHideForPlayer(playerid, Specialist);
TextDrawHideForPlayer(playerid, Corporal);
TextDrawHideForPlayer(playerid, Sergeant);
TextDrawHideForPlayer(playerid, Private);
TextDrawHideForPlayer(playerid, StaffSergeant);
TextDrawHideForPlayer(playerid, SergeantFirstClass);
TextDrawHideForPlayer(playerid, MasterSergeant);
TextDrawHideForPlayer(playerid, FirstSergeant);
TextDrawHideForPlayer(playerid, SergeantMajor);
TextDrawHideForPlayer(playerid, CommandSergeant);
TextDrawHideForPlayer(playerid, SecondLieutenant);
TextDrawHideForPlayer(playerid, FirstLieutenant);
TextDrawHideForPlayer(playerid, Captain);
TextDrawHideForPlayer(playerid, Major);
TextDrawHideForPlayer(playerid, LieutenantColonel);
TextDrawHideForPlayer(playerid, Colonel);
TextDrawHideForPlayer(playerid, BrigadierGeneral);
TextDrawHideForPlayer(playerid, MajorGeneral);
TextDrawHideForPlayer(playerid, LieutenantGeneral);
TextDrawShowForPlayer(playerid, General);
TextDrawHideForPlayer(playerid, Commander);
}
else if(GetPlayerScore(playerid) >999) { // Commander
SetPlayerHealth(playerid, 100);
SetPlayerArmour(playerid, 100);
GivePlayerWeapon(playerid, 30, 9999);
GivePlayerWeapon(playerid, 31, 9999);
GivePlayerWeapon(playerid, 35, 20);
TextDrawHideForPlayer(playerid, PrivateFirstClass);
TextDrawHideForPlayer(playerid, Specialist);
TextDrawHideForPlayer(playerid, Corporal);
TextDrawHideForPlayer(playerid, Sergeant);
TextDrawHideForPlayer(playerid, Private);
TextDrawHideForPlayer(playerid, StaffSergeant);
TextDrawHideForPlayer(playerid, SergeantFirstClass);
TextDrawHideForPlayer(playerid, MasterSergeant);
TextDrawHideForPlayer(playerid, FirstSergeant);
TextDrawHideForPlayer(playerid, SergeantMajor);
TextDrawHideForPlayer(playerid, CommandSergeant);
TextDrawHideForPlayer(playerid, SecondLieutenant);
TextDrawHideForPlayer(playerid, FirstLieutenant);
TextDrawHideForPlayer(playerid, Captain);
TextDrawHideForPlayer(playerid, Major);
TextDrawHideForPlayer(playerid, LieutenantColonel);
TextDrawHideForPlayer(playerid, Colonel);
TextDrawHideForPlayer(playerid, BrigadierGeneral);
TextDrawHideForPlayer(playerid, MajorGeneral);
TextDrawHideForPlayer(playerid, LieutenantGeneral);
TextDrawHideForPlayer(playerid, General);
TextDrawShowForPlayer(playerid, Commander);
}
return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
new string[256];

if(strcmp(cmdtext, "/rankinfo", true)==0)
{
SendClientMessage(playerid,COLOR_WHITE, ".: GTA Modern Warfare Rank System :.");
SendClientMessage(playerid,COLOR_WHITE, "Rank 0 - *Private* (0 kills required)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 1 - *PrivateFirstClass'* (3 kills required)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 2 - *Specialist* (8 kills required)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 3 - *Corporal* (15 kills required)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 4 - *Sergeant* (25 kills required)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 5 - *StaffSergeant* (40 kills required)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 6 - *SergeantFirstClass* (60 kills required)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 7 - *MasterSergeant* (85 kills required)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 8 - *FirstSergeant* (115 kills required)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 9 - *SergeantMajor* (150 kills required)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 10 - *CommandSergeant* (190 kills required)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 11 - *SecondLieutenant* (240 kills required)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 12 - *FirstLieutenant* (300 kills required)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 13 - *Captain* (370 kills required)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 14 - *Major* (440 kills required)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 15 - *LieutenantColonel* (500 kills required)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 16 - *Colonel* (580 kills required)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 17 - *BrigadierGeneral* (660 kills required)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 18 - *MajorGeneral* (750 kills required)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 19 - *LieutenantGeneral* (870 kills required)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 20 - *General* (920 kills required)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 21 - *Commander* (1000 kills required)");
return 1;
}
if(strcmp(cmdtext, "/rankunlocks", true)==0)
{
SendClientMessage(playerid,COLOR_WHITE, ".........:::: Rank Unlocks ::::........");
SendClientMessage(playerid,COLOR_WHITE, "Rank 0 - *Private* (50hp)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 1 - *PrivateFirstClass'* (+10 armor)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 2 - *Specialist* (+10 hp)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 3 - *Corporal* (+10 armor)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 4 - *Sergeant* (+10 hp)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 5 - *StaffSergeant* (+10 armor)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 6 - *SergeantFirstClass* (+10 hp)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 7 - *MasterSergeant* (+10 armor)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 8 - *FirstSergeant* (+10 hp)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 9 - *SergeantMajor* (+10 armor)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 10 - *CommandSergeant* (100 hp, 50 armor)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 11 - *SecondLieutenant* (+10 armor)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 12 - *FirstLieutenant* (+10 armor)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 13 - *Captain* (+10 armor)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 14 - *Major* (+10 armor)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 15 - *LieutenantColonel* (100 hp, 100 armor)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 16 - *Colonel* (+20 rpg ammo on spawn)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 17 - *BrigadierGeneral* (infinite ak47/m4 ammo)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 18 - *MajorGeneral* (anny idea, tell me)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 19 - *LieutenantGeneral* (anny idea, tell me)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 20 - *General* (any idea, tell me)");
SendClientMessage(playerid,COLOR_WHITE, "Rank 21 - *Commander* (any idea, tell me)");
SendClientMessage(playerid,COLOR_WHITE, "any ideas for the server? tell GOD");
return 1;
}

if (strcmp("/myrank", cmdtext, true) == 0)
{
if(IsPlayerConnected(playerid))
{
new rankid = pRank[playerid];
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
new rank[20];
if(GetPlayerScore(playerid) >=0) { rank = "Private"; }
else if(GetPlayerScore(playerid) >=3) { rank = "PrivateFirstClass'"; }
else if(GetPlayerScore(playerid) >=8) { rank = "Specialist"; }
else if(GetPlayerScore(playerid) >=15) { rank = "Corporal"; }
else if(GetPlayerScore(playerid) >=25) { rank = "Sergeant"; }
else if(GetPlayerScore(playerid) >=40) { rank = "StaffSergeant"; }
else if(GetPlayerScore(playerid) >=60) { rank = "SergeantFirstClass"; }
else if(GetPlayerScore(playerid) >=85) { rank = "MasterSergeant"; }
else if(GetPlayerScore(playerid) >=115) { rank = "FirstSergeant"; }
else if(GetPlayerScore(playerid) >=150) { rank = "SergeantMajor"; }
else if(GetPlayerScore(playerid) >=190) { rank = "CommandSergeant"; }
else if(GetPlayerScore(playerid) >=240) { rank = "SecondLieutenant"; }
else if(GetPlayerScore(playerid) >=300) { rank = "FirstLieutenant"; }
else if(GetPlayerScore(playerid) >=370) { rank = "Captain"; }
else if(GetPlayerScore(playerid) >=440) { rank = "Major"; }
else if(GetPlayerScore(playerid) >=500) { rank = "LieutenantColonel"; }
else if(GetPlayerScore(playerid) >=580) { rank = "Colonel"; }
else if(GetPlayerScore(playerid) >=660) { rank = "BrigadierGeneral"; }
else if(GetPlayerScore(playerid) >=750) { rank = "MajorGeneral"; }
else if(GetPlayerScore(playerid) >=870) { rank = "LieutenantGeneral"; }
else if(GetPlayerScore(playerid) >=920) { rank = "General"; }
else if(GetPlayerScore(playerid) >=1000) { rank = "Commander"; }


format(string, sizeof(string), "*** %s's Rank Info ***",pName);
SendClientMessage(playerid, COLOR_WHITE,string);
format(string, sizeof(string), "Your curent rank is %d (%s) with %d score",rankid,rank,GetPlayerScore(playerid));
SendClientMessage(playerid, COLOR_CWHITE,string);
}
return 1;
}
return 0;
}

Reply


Messages In This Thread
[Help] rank system - by klotebandit - 20.09.2010, 13:23

Forum Jump:


Users browsing this thread: 1 Guest(s)