3d label problem
#1

pawn Код:
new Text3D:levellabel[MAX_PLAYERS];
OnPlayerDisconnect
pawn Код:
Delete3DTextLabel(levellabel[playerid]);
OnPlayerSpawn
pawn Код:
levellabel[playerid] = Create3DTextLabel("Player level", GetPlayerColor(playerid), 30.0, 40.0, 50.0, 10.0, 0);
        Attach3DTextLabelToPlayer(levellabel[playerid], playerid, 0.0, 0.0, 0.7);
Then i have a timer which occurs every 1 minnute.

public lvltimer(playerid)
pawn Код:
new level[64], statsSTRING[128];
        if(GetPlayerScore(playerid) >= 0 && GetPlayerScore(playerid) <= 499 ){level="1 level - Telatabie";}
        else if(GetPlayerScore(playerid) >= 500 && GetPlayerScore(playerid) <= 2499 ){level="2 level - Newbie";}
        else if(GetPlayerScore(playerid) >= 2500 && GetPlayerScore(playerid) <= 4999 ){level="3 level - PRO";}
        format(statsSTRING,sizeof(statsSTRING),"%s\n\t%dXP",level,GetPlayerScore(playerid));
        Update3DTextLabelText(levellabel[playerid], GetPlayerColor(playerid), statsSTRING);

As you maybe understand it's a level system with 3d labels, but the problem is that it does not show label on every player.
Reply
#2

I have the same problem, it removes it from the already-connected-player and changes it and puts it on the newly-connected-player..

I'm trying to find away to get around it too.
Reply
#3

Not sure if works,tell me if not:

pawn Код:
for(new i; i<MAX_PLAYERS; i++) //checks through all players
{
new level[64], statsSTRING[128];
if(GetPlayerScore(i) >= 0 && GetPlayerScore(i) <= 499 ){level="1 level - Telatabie";}
else if(GetPlayerScore(i) >= 500 && GetPlayerScore(i) <= 2499 ){level="2 level - Newbie";}
else if(GetPlayerScore(i) >= 2500 && GetPlayerScore(i) <= 4999 ){level="3 level - PRO";}
format(statsSTRING,sizeof(statsSTRING),"%s\n\t%dXP",level,GetPlayerScore(i));
Update3DTextLabelText(levellabel[i], GetPlayerColor(i), statsSTRING);
}
Reply
#4

Ill find out if your code works when my friend comes online..I know this isn't my thread, but i have the same problem.
Reply
#5

No, that code didnt work for some reason.

Wont let me edit last post
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)