Ranks Stars HELPE!!!!! ScreenShot
#1

Hi guys .
guys i need to do,ranks with star

my code:
Код:
forward PlayerStats(playerid);
public PlayerStats(playerid)
{
    if(GetPlayerScore(playerid)>=0)
 	{ Rank[playerid]=1; }
 	if(GetPlayerScore(playerid)>=200)
 	{ Rank[playerid]=2; }
 	if(GetPlayerScore(playerid)>=400)
 	{ Rank[playerid]=3; }
 	if(GetPlayerScore(playerid)>=850)
 	{ Rank[playerid]=4; }
 	if(GetPlayerScore(playerid)>=1500)
 	{ Rank[playerid]=5; }
 	if(GetPlayerScore(playerid)>=2000)
 	{ Rank[playerid]=6; }
 	if(GetPlayerScore(playerid)>=4500)
 	{ Rank[playerid]=7; }
 	if(GetPlayerScore(playerid)>=8000)
 	{ Rank[playerid]=8; }
 	if(GetPlayerScore(playerid)>=10000)
 	{ Rank[playerid]=9; }
 	if(GetPlayerScore(playerid)>=15000)
 	{ Rank[playerid]=10; }
 	if(GetPlayerScore(playerid)>=20000)
 	{ Rank[playerid]=11; }
 	if(GetPlayerScore(playerid)>=30000)
 	{ Rank[playerid]=12; }
 	if(GetPlayerScore(playerid)>=65000)
 	{ Rank[playerid]=13; }
 	if(GetPlayerScore(playerid)>=80000)
 	{ Rank[playerid]=14; }
 	if(GetPlayerScore(playerid)>=100000)
 	{ Rank[playerid]=15; }

 	new String[1000];

	new str_1[100];
	if(Rank[playerid]==1)
	{ str_1="Private"; }
	if(Rank[playerid]==2)
	{ str_1="Corporal"; }
	if(Rank[playerid]==3)
	{ str_1="Sergeant"; }
	if(Rank[playerid]==4)
	{ str_1="Sergeant Major"; }
	if(Rank[playerid]==5)
	{ str_1="Lieutenant"; }
	if(Rank[playerid]==6)
	{ str_1="Lieutenant Major"; }
	if(Rank[playerid]==7)
	{ str_1="Captain"; }
	if(Rank[playerid]==8)
	{ str_1="Major"; }
	if(Rank[playerid]==9)
	{ str_1="Colonial"; }
	if(Rank[playerid]==10)
	{ str_1="General"; }
	if(Rank[playerid]==11)
	{ str_1="General Of The Army"; }
	if(Rank[playerid]==12)
	{ str_1="Master Of War"; }
	if(Rank[playerid]==13)
	{ str_1="Warlord I"; }
	if(Rank[playerid]==14)
	{ str_1="Warlord II"; }
	if(Rank[playerid]==15)
	{ str_1="Warlord III"; }
	new str_2[100];
	if(Team[playerid]==Latino)
	{ format(str_2,sizeof(str_2), "Latino Guerrilla"); }
	if(Team[playerid]==Taliban)
	{ format(str_2,sizeof(str_2), "Taliban"); }
	if(Team[playerid]==Europe)
	{ format(str_2,sizeof(str_2), "Europian Alliance"); }
	if(Team[playerid]==USA)
	{ format(str_2,sizeof(str_2), "United States Of America"); }
	if(Team[playerid]==Souviet)
	{ format(str_2,sizeof(str_2), "Souviet Union"); }
	if(Team[playerid]==MERCENARY)
	{ format(str_2,sizeof(str_2), "Mercenary"); }
	if(Team[playerid]==ADMIN)
	{ format(str_2,sizeof(str_2), "Admin"); }
	new str_3[100];
	if(Class[playerid]==1)
	{ format(str_3,sizeof(str_3), "Soldier"); }
	if(Class[playerid]==2)
	{ format(str_3,sizeof(str_3), "Sniper"); }
	if(Class[playerid]==3)
	{ format(str_3,sizeof(str_3), "Medic"); }
	if(Class[playerid]==4)
	{ format(str_3,sizeof(str_3), "Pyroman"); }
	if(Class[playerid]==5)
	{ format(str_3,sizeof(str_3), "Engineer"); }
	if(Class[playerid]==6)
	{ format(str_3,sizeof(str_3), "Paratrooper"); }
	if(Class[playerid]==7)
	{ format(str_3,sizeof(str_3), "Pilot"); }
	if(Class[playerid]==8)
	{ format(str_3,sizeof(str_3), "JetTrooper"); }
	if(Class[playerid]==9)
	{ format(str_3,sizeof(str_3), "Scout"); }
	if(Class[playerid]==10)
	{ format(str_3,sizeof(str_3), "Spy"); }
	if(Class[playerid]==11)
	{ format(str_3,sizeof(str_3), "Operator"); }
	if(Class[playerid]==12)
	{ format(str_3,sizeof(str_3), "Black Troop"); }
	if(Class[playerid]==13)
	{ format(str_3,sizeof(str_3), "Assasian"); }
	if(Class[playerid]==14)
	{ format(str_3,sizeof(str_3), "Sucider"); }
	if(Class[playerid]==15)
	{ format(str_3,sizeof(str_3), "Rebot"); }
	if(Class[playerid]==16)
	{ format(str_3,sizeof(str_3), "Landminer"); }
	if(Class[playerid]==17)
	{ format(str_3,sizeof(str_3), "Chemist"); }
	if(Team[playerid]==MERCENARY)
	{ format(str_3,sizeof(str_3), "N/A"); }
	if(Team[playerid]==ADMIN)
	{ format(str_3,sizeof(str_3), "N/A"); }
	format(String,sizeof(String),"~p~Rank:~w~ %s %d/15  ~p~Score:~w~ %03d   ~p~Team:~w~ %s  ~p~Class:~w~ %s  ~g~Kills:~w~ %d   ~r~Deaths:~w~ %d", str_1, Rank[playerid], GetPlayerScore(playerid), str_2, str_3,pInfo[playerid][Kills],pInfo[playerid][Deaths]);
	TextDrawSetString(StartTextdraw_[7][playerid], String);
	return 1;
}
Like that :


can some one add to my script the stars please and sorry for my bead english
Reply
#2

[pawn]new Text:Stars[20];[/code]
pawn Код:
Stars[0] = TextDrawCreate(485.000000, 100.000000, "]");
    TextDrawLetterSize(Stars[0], 0.449999, 1.600000);
    TextDrawAlignment(Stars[0], 1);
    TextDrawColor(Stars[0], -5963521);
    TextDrawSetShadow(Stars[0], 0);
    TextDrawSetOutline(Stars[0], 1);
    TextDrawBackgroundColor(Stars[0], 51);
    TextDrawFont(Stars[0], 2);
    TextDrawSetProportional(Stars[0], 1);

    Stars[1] = TextDrawCreate(496.000000, 100.000000, "]");
    TextDrawLetterSize(Stars[1], 0.449999, 1.600000);
    TextDrawAlignment(Stars[1], 1);
    TextDrawColor(Stars[1], -5963521);
    TextDrawSetShadow(Stars[1], 0);
    TextDrawSetOutline(Stars[1], 1);
    TextDrawBackgroundColor(Stars[1], 51);
    TextDrawFont(Stars[1], 2);
    TextDrawSetProportional(Stars[1], 1);

    Stars[2] = TextDrawCreate(507.000000, 100.000000, "]");
    TextDrawLetterSize(Stars[2], 0.449999, 1.600000);
    TextDrawAlignment(Stars[2], 1);
    TextDrawColor(Stars[2], -5963521);
    TextDrawSetShadow(Stars[2], 0);
    TextDrawSetOutline(Stars[2], 1);
    TextDrawBackgroundColor(Stars[2], 51);
    TextDrawFont(Stars[2], 2);
    TextDrawSetProportional(Stars[2], 1);

    Stars[3] = TextDrawCreate(518.000000, 100.000000, "]");
    TextDrawLetterSize(Stars[3], 0.449999, 1.600000);
    TextDrawAlignment(Stars[3], 1);
    TextDrawColor(Stars[3], -5963521);
    TextDrawSetShadow(Stars[3], 0);
    TextDrawSetOutline(Stars[3], 1);
    TextDrawBackgroundColor(Stars[3], 51);
    TextDrawFont(Stars[3], 2);
    TextDrawSetProportional(Stars[3], 1);

    Stars[4] = TextDrawCreate(529.000000, 100.000000, "]");
    TextDrawLetterSize(Stars[4], 0.449999, 1.600000);
    TextDrawAlignment(Stars[4], 1);
    TextDrawColor(Stars[4], -5963521);
    TextDrawSetShadow(Stars[4], 0);
    TextDrawSetOutline(Stars[4], 1);
    TextDrawBackgroundColor(Stars[4], 51);
    TextDrawFont(Stars[4], 2);
    TextDrawSetProportional(Stars[4], 1);

    Stars[5] = TextDrawCreate(540.000000, 100.000000, "]");
    TextDrawLetterSize(Stars[5], 0.449999, 1.600000);
    TextDrawAlignment(Stars[5], 1);
    TextDrawColor(Stars[5], -5963521);
    TextDrawSetShadow(Stars[5], 0);
    TextDrawSetOutline(Stars[5], 1);
    TextDrawBackgroundColor(Stars[5], 51);
    TextDrawFont(Stars[5], 2);
    TextDrawSetProportional(Stars[5], 1);

    Stars[6] = TextDrawCreate(551.000000, 100.000000, "]");
    TextDrawLetterSize(Stars[6], 0.449999, 1.600000);
    TextDrawAlignment(Stars[6], 1);
    TextDrawColor(Stars[6], -5963521);
    TextDrawSetShadow(Stars[6], 0);
    TextDrawSetOutline(Stars[6], 1);
    TextDrawBackgroundColor(Stars[6], 51);
    TextDrawFont(Stars[6], 2);
    TextDrawSetProportional(Stars[6], 1);

    Stars[7] = TextDrawCreate(562.000000, 100.000000, "]");
    TextDrawLetterSize(Stars[7], 0.449999, 1.600000);
    TextDrawAlignment(Stars[7], 1);
    TextDrawColor(Stars[7], -5963521);
    TextDrawSetShadow(Stars[7], 0);
    TextDrawSetOutline(Stars[7], 1);
    TextDrawBackgroundColor(Stars[7], 51);
    TextDrawFont(Stars[7], 2);
    TextDrawSetProportional(Stars[7], 1);

    Stars[8] = TextDrawCreate(573.000000, 100.000000, "]");
    TextDrawLetterSize(Stars[8], 0.449999, 1.600000);
    TextDrawAlignment(Stars[8], 1);
    TextDrawColor(Stars[8], -5963521);
    TextDrawSetShadow(Stars[8], 0);
    TextDrawSetOutline(Stars[8], 1);
    TextDrawBackgroundColor(Stars[8], 51);
    TextDrawFont(Stars[8], 2);
    TextDrawSetProportional(Stars[8], 1);

    Stars[9] = TextDrawCreate(584.000000, 100.000000, "]");
    TextDrawLetterSize(Stars[9], 0.449999, 1.600000);
    TextDrawAlignment(Stars[9], 1);
    TextDrawColor(Stars[9], -5963521);
    TextDrawSetShadow(Stars[9], 0);
    TextDrawSetOutline(Stars[9], 1);
    TextDrawBackgroundColor(Stars[9], 51);
    TextDrawFont(Stars[9], 2);
    TextDrawSetProportional(Stars[9], 1);
   
    Stars[10] = TextDrawCreate(595.000000, 100.000000, "]");
    TextDrawLetterSize(Stars[10], 0.449999, 1.600000);
    TextDrawAlignment(Stars[10], 1);
    TextDrawColor(Stars[10], -5963521);
    TextDrawSetShadow(Stars[10], 0);
    TextDrawSetOutline(Stars[10], 1);
    TextDrawBackgroundColor(Stars[10], 51);
    TextDrawFont(Stars[10], 2);
    TextDrawSetProportional(Stars[10], 1);
   
    Stars[11] = TextDrawCreate(502.000000, 112.000000, "]");
    TextDrawLetterSize(Stars[11], 0.449999, 1.600000);
    TextDrawAlignment(Stars[11], 1);
    TextDrawColor(Stars[11], -5963521);
    TextDrawSetShadow(Stars[11], 0);
    TextDrawSetOutline(Stars[11], 1);
    TextDrawBackgroundColor(Stars[11], 51);
    TextDrawFont(Stars[11], 2);
    TextDrawSetProportional(Stars[11], 1);
   
    Stars[12] = TextDrawCreate(513.000000, 112.000000, "]");
    TextDrawLetterSize(Stars[12], 0.449999, 1.600000);
    TextDrawAlignment(Stars[12], 1);
    TextDrawColor(Stars[12], -5963521);
    TextDrawSetShadow(Stars[12], 0);
    TextDrawSetOutline(Stars[12], 1);
    TextDrawBackgroundColor(Stars[12], 51);
    TextDrawFont(Stars[12], 2);
    TextDrawSetProportional(Stars[12], 1);
   
    Stars[13] = TextDrawCreate(524.000000, 112.000000, "]");
    TextDrawLetterSize(Stars[13], 0.449999, 1.600000);
    TextDrawAlignment(Stars[13], 1);
    TextDrawColor(Stars[13], -5963521);
    TextDrawSetShadow(Stars[13], 0);
    TextDrawSetOutline(Stars[13], 1);
    TextDrawBackgroundColor(Stars[13], 51);
    TextDrawFont(Stars[13], 2);
    TextDrawSetProportional(Stars[13], 1);
   
    Stars[14] = TextDrawCreate(535.000000, 112.000000, "]");
    TextDrawLetterSize(Stars[14], 0.449999, 1.600000);
    TextDrawAlignment(Stars[14], 1);
    TextDrawColor(Stars[14], -5963521);
    TextDrawSetShadow(Stars[14], 0);
    TextDrawSetOutline(Stars[14], 1);
    TextDrawBackgroundColor(Stars[14], 51);
    TextDrawFont(Stars[14], 2);
    TextDrawSetProportional(Stars[14], 1);
   
    Stars[15] = TextDrawCreate(546.000000, 112.000000, "]");
    TextDrawLetterSize(Stars[15], 0.449999, 1.600000);
    TextDrawAlignment(Stars[15], 1);
    TextDrawColor(Stars[15], -5963521);
    TextDrawSetShadow(Stars[15], 0);
    TextDrawSetOutline(Stars[15], 1);
    TextDrawBackgroundColor(Stars[15], 51);
    TextDrawFont(Stars[15], 2);
    TextDrawSetProportional(Stars[15], 1);
   
    Stars[16] = TextDrawCreate(557.000000, 112.000000, "]");
    TextDrawLetterSize(Stars[16], 0.449999, 1.600000);
    TextDrawAlignment(Stars[16], 1);
    TextDrawColor(Stars[16], -5963521);
    TextDrawSetShadow(Stars[16], 0);
    TextDrawSetOutline(Stars[16], 1);
    TextDrawBackgroundColor(Stars[16], 51);
    TextDrawFont(Stars[16], 2);
    TextDrawSetProportional(Stars[16], 1);
   
    Stars[17] = TextDrawCreate(568.000000, 112.000000, "]");
    TextDrawLetterSize(Stars[17], 0.449999, 1.600000);
    TextDrawAlignment(Stars[17], 1);
    TextDrawColor(Stars[17], -5963521);
    TextDrawSetShadow(Stars[17], 0);
    TextDrawSetOutline(Stars[17], 1);
    TextDrawBackgroundColor(Stars[17], 51);
    TextDrawFont(Stars[17], 2);
    TextDrawSetProportional(Stars[17], 1);
   
    Stars[18] = TextDrawCreate(579.000000, 112.000000, "]");
    TextDrawLetterSize(Stars[18], 0.449999, 1.600000);
    TextDrawAlignment(Stars[18], 1);
    TextDrawColor(Stars[18], -5963521);
    TextDrawSetShadow(Stars[18], 0);
    TextDrawSetOutline(Stars[18], 1);
    TextDrawBackgroundColor(Stars[18], 51);
    TextDrawFont(Stars[18], 2);
    TextDrawSetProportional(Stars[18], 1);
   
    Stars[19] = TextDrawCreate(590.000000, 112.000000, "]");
    TextDrawLetterSize(Stars[19], 0.449999, 1.600000);
    TextDrawAlignment(Stars[19], 1);
    TextDrawColor(Stars[19], -5963521);
    TextDrawSetShadow(Stars[19], 0);
    TextDrawSetOutline(Stars[19], 1);
    TextDrawBackgroundColor(Stars[19], 51);
    TextDrawFont(Stars[19], 2);
    TextDrawSetProportional(Stars[19], 1);

    TextDrawLetterSize(Stars[19], 0.449999, 1.600000);
    TextDrawAlignment(Stars[19], 1);
    TextDrawColor(Stars[19], -5963521);
    TextDrawSetShadow(Stars[19], 0);
    TextDrawSetOutline(Stars[19], 1);
    TextDrawBackgroundColor(Stars[19], 51);
    TextDrawFont(Stars[19], 2);
    TextDrawSetProportional(Stars[19], 1);
There's 19 stars, you can use
Код:
ShowPlayerTextDraw(playerid,Stars[1]
ShowPlayerTextDraw(playerid,Stars[2]
++The star n.0 is bugged.
Reply
#3

wher i put this :
Quote:

ShowPlayerTextDraw(playerid,Stars[1]
ShowPlayerTextDraw(playerid,Stars[2]

Reply
#4

OnPlayerSpawn Or OnPlayerConnect
Reply
#5

You must tell us what are you ranks so we can add 1 star per rank
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)