SA-MP Forums Archive
3dTextLabel - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: 3dTextLabel (/showthread.php?tid=380956)



3dTextLabel - .v - 27.09.2012

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.


Re: 3dTextLabel - Mr.Anonymous - 27.09.2012

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


Re: 3dTextLabel - ikbenremco - 27.09.2012

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];



Re: 3dTextLabel - .v - 27.09.2012

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


Re: 3dTextLabel - ikbenremco - 27.09.2012

Post a command like kick or ban


Re: 3dTextLabel - .v - 27.09.2012

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;
}



Re: 3dTextLabel - ikbenremco - 27.09.2012

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.


Re: 3dTextLabel - .v - 27.09.2012

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


Re: 3dTextLabel - Mr.Anonymous - 28.09.2012

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.