Problem with label
#1

Hello, i created admin names based on level and added a textlabel to show it:

OnPlayerSpawn:

pawn Код:
new ok[128];
    format(ok, sizeof(ok), "%s\n", AdminLevelToName(playerid));
    AdminLabel[playerid] = Create3DTextLabel(ok, 0x008040FF, 30.0, 40.0, 50.0, 40.0, 0, 0);
    Attach3DTextLabelToPlayer(AdminLabel[playerid], playerid, 0.0, 0.0, 0.7);
And the stock:

pawn Код:
stock AdminLevelToName(playerid)
{
    new admin[128];
    switch(PlayerInfo[playerid][pAdmin])
    {
        case 0:
        {
            admin = "Normal Player";
        }
        case 1:
        {
            admin = "Trustee";
        }
        case 2:
        {
            admin = "Moderator";
        }
        case 3:
        {
            admin = "Admin";
        }
        case 4:
        {
            admin = "Head Admin";
        }
        case 5:
        {
            admin = "Owner";
        }
    }
    return admin;
}
But it shows only "Owner",i've the /setlevel command so if i try to set someone to level 2-3 (for example),it doesn't update the text label. Thanks.
Reply
#2

Try add Update3DTextLabelText in the command /setlevel
Reply
#3

Already done:

pawn Код:
Update3DTextLabelText(AdminLabel[playerid], 0x008040FF,AdminLevelToName(playerid));
but nothing.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)