3dTextLabel
#1

Anyone know how to make 3dtextlabel for Admins with Level? This is what I mean

If Admin Level 1 - Can add 2 labels and edit his own label 3dtextlabel
If Admin Level 2 - Can add 3 labels and edit his own label " "
If Admin Level 3 - Can add 4 labels and edit his own label " "
If Admin Level 4 - Can add 5 labels and edit his own label " "
Up to Admin Level 7.
Reply
#2

I dont think you can do it with numbers. Every admin must have same command but with different limitations I guess.
Reply
#3

pawn Код:
stock AdminLevelToName(playerid)
{
    new admin[128];
    switch(playerVariables[playerid][pAdminLevel])
    {

        case 1:
        {
            admin = "Junior Administrator";
        }
        case 2:
        {
            admin = "Senior Administrator";
        }
        case 3:
        {
            admin = "Head Administrator";
        }
        case 4:
        {
            admin = "Community Advisor";
        }
        case 5:
        {
            admin = "Elite Administrators";
        }
        case 1337:
        {
            admin = "Server Co-Owner";
        }
        case 1338:
        {
            admin = "Server Owner";
        }
    }
    return admin;
}
pawn Код:
format(string, sizeof(string), "%s %s \n "EMBED_WHITE" ..-rp Administrator.", AdminLevelToName(playerid), szPlayerName);
                    label[playerid] = Create3DTextLabel(string, COLOR_RED, 30.0, 40.0, 50.0, 40.0, 0, 0);
                    Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
pawn Код:
new Text3D:label[MAX_PLAYERS];
Reply
#4

Quote:
Originally Posted by ikbenremco
Посмотреть сообщение
pawn Код:
stock AdminLevelToName(playerid)
{
    new admin[128];
    switch(playerVariables[playerid][pAdminLevel])
    {

        case 1:
        {
            admin = "Junior Administrator";
        }
        case 2:
        {
            admin = "Senior Administrator";
        }
        case 3:
        {
            admin = "Head Administrator";
        }
        case 4:
        {
            admin = "Community Advisor";
        }
        case 5:
        {
            admin = "Elite Administrators";
        }
        case 1337:
        {
            admin = "Server Co-Owner";
        }
        case 1338:
        {
            admin = "Server Owner";
        }
    }
    return admin;
}
pawn Код:
format(string, sizeof(string), "%s %s \n "EMBED_WHITE" ..-rp Administrator.", AdminLevelToName(playerid), szPlayerName);
                    label[playerid] = Create3DTextLabel(string, COLOR_RED, 30.0, 40.0, 50.0, 40.0, 0, 0);
                    Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
pawn Код:
new Text3D:label[MAX_PLAYERS];
Wowow! I'm sorry but I don't get it
Reply
#5

Post a command like kick or ban
Reply
#6

Quote:
Originally Posted by ikbenremco
Посмотреть сообщение
Post a command like kick or ban
Thanks for trying to help me here is a kick command

pawn Код:
COMMAND:kick(playerid,params[])
{
    if(PlayerInfo[playerid][AdminLevel] >= LEVEL_kick)
    {
        new player, reason[128];
        if(sscanf(params, "rs[128]", player, reason))
        {
            SendClientMessage(playerid, WHITE,"{FFFF00}Usage: /kick [PlayerID/PartOfName] [Reason]");
            return 1;
        }
        if(PlayerInfo[player][AdminLevel] == MAX_ADMIN_LEVEL)
        {
            SendClientMessage(playerid, WHITE,"{FF0000}>> You cannot use this command on this admin");
            return 1;
        }
        if(player == playerid)
        {
            SendClientMessage(playerid, WHITE, "{FF0000}>> You cannot kick yourself");
            return 1;
        }
        if(IsPlayerConnected(player) && player != INVALID_PLAYER_ID && player != playerid && PlayerInfo[player][AdminLevel] != MAX_ADMIN_LEVEL)
        {
            new string[128];
            format(string,sizeof(string),"** %s has been kicked from the server [Reason: %s]",GetName(player),reason);
            SendClientMessageToAll(GREY,string);
            print(string);
            PlayerInfo[player][KickCount]++;
            #if PRINT_BYKICK == true
            printf("[KICK]: %s has been kicked", GetName(playerid));
            #endif
            Kick(player);
        }
        else
        {
            SendClientMessage(playerid, WHITE, "{FF0000}>> Player is not connected or is yourself or is the highest level admin");
        }
    }
    else
    {
        SendClientMessage(playerid, WHITE, NO_PERM);
    }
    return 1;
}
Reply
#7

okay at the top of your script :

pawn Код:
new Text3D:label[MAX_PLAYERS];
then CTRL + F for a stock if you find one post this under it :
pawn Код:
stock AdminLevelToName(playerid)
{
    new admin[128];
    switch(playerInfo[playerid][pAdminLevel])
    {

        case 1:
        {
            admin = "Junior Administrator";
        }
        case 2:
        {
            admin = "Senior Administrator";
        }
        case 3:
        {
            admin = "Head Administrator";
        }
        case 4:
        {
            admin = "Community Advisor";
        }
        case 5:
        {
            admin = "Elite Administrators";
        }
        case 1337:
        {
            admin = "Server Co-Owner";
        }
        case 1338:
        {
            admin = "Server Owner";
        }
    }
    return admin;
}
And now

pawn Код:
COMMAND:admintag(playerid,params[])
{
format(string, sizeof(string), "%s %s \n "EMBED_WHITE" ..-rp Administrator.", AdminLevelToName(playerid), szPlayerName);
label[playerid] = Create3DTextLabel(string, COLOR_RED, 30.0, 40.0, 50.0, 40.0, 0, 0);
Attach3DTextLabelToPlayer(label[playerid], playerid, 0.0, 0.0, 0.7);
return 1;
}
if it's still not working pm me your teamviewer shit.
Reply
#8

Oops not that. I mean like this the Label. But + Rep thanks for the effort.

https://sampforum.blast.hk/showthread.php?tid=357796

https://sampforum.blast.hk/showthread.php?tid=191820
Reply
#9

ikbenremco, what .v means is that an admin, depends on his level, can create 3dlabel but with number limit. For example a level 1 admin can only create 2 labels and not more than that.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)