My Rank System Is Not Working Properly
#1

My rank System that I got "Zcmd" or w/e has a problem: If I had 301 score and I needed to reach 400 score to become Major, then I wouldn't need 400 score because I would already be Major Once I go anywhere above 300 It automatically promotes the person without even having to reach the next score. It's the same thing on ALL of my Ranks.

Here is what I got:

Код:
//===========================GetPlayerRankInfo Function==================================//
forward GetPlayerRankInfo(playerid);

public GetPlayerRankInfo(playerid)

{
           	new Pname[50];
           	GetPlayerName(playerid, Pname, 50);
            new string[250];
			if(GetPlayerScore(playerid) <= 0)

			{
			
			SendClientMessage(playerid, COLOR_WHITE, "Your Current Rank: "#COL_GREEN#" Private");

			format(string, sizeof(string),"Name:%s [Your Current Score: "#COL_GREEN#"%d]",Pname, GetPlayerScore(playerid));

			SendClientMessage(playerid, COLOR_WHITE, string);

			}
            else if(GetPlayerScore(playerid) <= 30)
            {

			SendClientMessage(playerid, COLOR_WHITE, "Your Current Rank: "#COL_GREEN#" Corporal");

			format(string, sizeof(string),"Name:%s [Your Currect Score: "#COL_GREEN#"%d]",Pname, GetPlayerScore(playerid));

			SendClientMessage(playerid, COLOR_WHITE, string);
            }

			else if(GetPlayerScore(playerid) <= 50)
            {

			SendClientMessage(playerid, COLOR_WHITE, "Your Current Rank Is "#COL_GREEN#" Sergeant");

			format(string, sizeof(string),"Name:%s [Your score is: "#COL_GREEN#"%d]",Pname, GetPlayerScore(playerid));

			SendClientMessage(playerid, COLOR_WHITE, string);
            }

			else if(GetPlayerScore(playerid) <= 85)
            {

			SendClientMessage(playerid, COLOR_WHITE, "Your Current Rank: "#COL_GREEN#" Officer");

   			format(string, sizeof(string),"Name:%s [Your Current Score: "#COL_GREEN#"%d]",Pname, GetPlayerScore(playerid));

			SendClientMessage(playerid, COLOR_WHITE, string);
            }

			else if(GetPlayerScore(playerid) <= 250)
            {

			SendClientMessage(playerid, COLOR_WHITE, "Your Current Rank: "#COL_GREEN#" Lieutenant Major");

			format(string, sizeof(string),"Name:%s [Your Current Score: "#COL_GREEN#"%d]",Pname, GetPlayerScore(playerid));

			SendClientMessage(playerid, COLOR_WHITE, string);
            }

			else if(GetPlayerScore(playerid) <= 300)
            {

			SendClientMessage(playerid, COLOR_WHITE, "Your Current Rank: "#COL_GREEN#" Captain");

			format(string, sizeof(string),"Name:%s [Your Current Score: "#COL_GREEN#"%d]",Pname, GetPlayerScore(playerid));

			SendClientMessage(playerid, COLOR_WHITE, string);

            }

            else if(GetPlayerScore(playerid) <= 400)

            {
			SendClientMessage(playerid, COLOR_WHITE, "Your Current Rank "#COL_GREEN#"Major");

			format(string, sizeof(string),"Name:%s [Your Current Score: "#COL_GREEN#"%d]",Pname, GetPlayerScore(playerid));

			SendClientMessage(playerid, COLOR_WHITE, string);

			}

            else if(GetPlayerScore(playerid) <= 500)

			{

            SendClientMessage(playerid, COLOR_WHITE, "Your Current Rank: "#COL_GREEN#"Colonel");

            format(string, sizeof(string),"Name:%s [Your Current Score: "#COL_GREEN#"%d]",Pname, GetPlayerScore(playerid));

			SendClientMessage(playerid, COLOR_WHITE, string);

            }

            else if(GetPlayerScore(playerid) <= 750)

            {

            SendClientMessage(playerid, COLOR_WHITE, "Your Current Rank: "#COL_GREEN#"General");

            format(string, sizeof(string),"Name:%s [Your Current Score is: "#COL_GREEN#"%d]",Pname, GetPlayerScore(playerid));

            SendClientMessage(playerid, COLOR_WHITE, string);

            }

            else if(GetPlayerScore(playerid) <= 1000)

            {

            SendClientMessage(playerid, COLOR_WHITE, "Your Current Rank: "#COL_GREEN#"Field Marshall");

            format(string, sizeof(string),"Name:%s [Your Current Score: "#COL_GREEN#"%d]",Pname, GetPlayerScore(playerid));

            SendClientMessage(playerid, COLOR_WHITE, string);

            }

            else if(GetPlayerScore(playerid) <= 1500)

            {

            SendClientMessage(playerid, COLOR_WHITE, "Your Current Rank: "#COL_GREEN#"Master Of War");

            format(string, sizeof(string),"Name:%s [Your Current Score: "#COL_GREEN#"%d]",Pname, GetPlayerScore(playerid));

            SendClientMessage(playerid, COLOR_WHITE, string);

            }

        	return 1;

}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 11 Guest(s)