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);
}
}
}
}
format(string,sizeof(string),"XP:%d/100",xp[playerid]);
|
Use
pawn Код:
|
new ys[MAX_PLAYERS];//Change your variable.