Rank system
#1

Heey guys,

I made a rank system but when there are more players online you see the score of the other player.
I made it in a textdraw:
Код:
forward sc(playerid);
public sc(playerid)
{
	for(new i=0; i<MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i))
        {
			if(rank0[playerid]==1)
			{
			new xp;
			xp=GetPlayerScore(i);
			new string[50];
			format(string,sizeof(string),"XP:%d/100",xp);
			TextDrawSetString(ys,string);
			}
			if(rank1[playerid]==1)
			{
			new xp;
			xp=GetPlayerScore(i);
			new string[50];
			format(string,sizeof(string),"XP:%d/225",xp);
			TextDrawSetString(ys,string);
			}
			if(rank2[playerid]==1)
			{
			new xp;
			xp=GetPlayerScore(i);
			new string[50];
			format(string,sizeof(string),"XP:%d/400",xp);
			TextDrawSetString(ys,string);
			}
		}

	}
}
I added time so the rank stays updating.
Reply
#2

Use
pawn Код:
format(string,sizeof(string),"XP:%d/100",xp[playerid]);
Reply
#3

Quote:
Originally Posted by antonio112
Посмотреть сообщение
Use
pawn Код:
format(string,sizeof(string),"XP:%d/100",xp[playerid]);
now everybody has same Textdraw;s
Reply
#4

pawn Код:
new ys[MAX_PLAYERS];//Change your variable.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)