ShowPlayerNameTag
#1

Any know how to make simple ShowPlayerNameTag only on his screen.
Lets say if I do /nameon - show name tag of players then if I do /nameoff - then all player name tag should hide.
Reply
#2

Research about the mask systems already made.
Reply
#3

You can use ShowNameTags
Reply
#4

pawn Код:
// Somewhere in your script
new NameTag[MAX_PLAYERS];


if (strcmp("/nameoff", cmdtext, true) == 0)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
        ShowPlayerNameTagForPlayer(i, playerid, false);
       
    NameTag[playerid] = 0;
    GameTextForPlayer(playerid, "~W~Nametags ~R~off", 5000, 5);
    return 1;
}
if (strcmp("/nameon", cmdtext, true) == 0)
{
    for(new i = 0; i < MAX_PLAYERS; i++)
        ShowPlayerNameTagForPlayer(i, playerid, true);
       
    NameTag[playerid] = 1;
    GameTextForPlayer(playerid, "~W~Nametags ~G~ON", 5000, 5);
    return 1;
}

public OnPlayerConnect(playerid)
{
    NameTag[playerid] = 1;
    for(new i = 0; i < MAX_PLAYERS; i++)
        if(NameTag[i] == 0)
            ShowPlayerNameTagForPlayer(playerid, i, false);

    return 1;
}
Remember, this only disables / enables name tag for online players. If you want to hide names to players who joins the server, you have to create a variables
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)