24.10.2012, 20:34
Hello, i created admin names based on level and added a textlabel to show it:
OnPlayerSpawn:
And the stock:
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.
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);
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;
}