[HELP] NAMETAGS
#1

Hello , I need our help

Do anyone know how can i make a command that can make anyone hide his nametags himself
... not the other nametags like ShowNameTags

I need to use it for one of the Government's Secret team ....
and it need to input this function too

.... Thank you ^^
Reply
#2

Try it:

pawn Код:
if(strcmp(cmd, "/mycommand", true) == 0)
{
    if(IsPlayerConnected(playerid)){for(new i = 0; i < MAX_PLAYERS; i++){if(IsPlayerConnected(i)){ShowPlayerNameTagForPlayer(playerid, i, 0);}}}
    return 1;
}
or:

pawn Код:
if(strcmp(cmd, "/mycommand", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                ShowPlayerNameTagForPlayer(playerid, i, 0);
            }
        }
    }
    return 1;
}
ShowPlayerNameTagForPlayer - SAMP WIKI
Reply
#3

https://sampwiki.blast.hk/wiki/ShowPlayerNameTagForPlayer

Might help you :P
Reply
#4

ShowPlayerNameTagForPlayer is "The player who typed the command will not be able to see any other players nametag". ...... but the one i need is "The player who typed the command will have no one can see his nametag."
Reply
#5

Then use: ShowPlayerNameTagForPlayer(i, playerid, 0); with the code supplied above.
Reply
#6

Thank you for your help ^^
Reply
#7

Wait a minute ..........................

When i inputed the code ............. It is only work for a second ......

Why is it?

And How can i fix it?

Thank you
Reply
#8

Quote:
Originally Posted by suwithy04
Посмотреть сообщение
Wait a minute ..........................

When i inputed the code ............. It is only work for a second ......

Why is it?

And How can i fix it?

Thank you
pawn Код:
new NameTags[MAX_PLAYERS] = 0;

if(strcmp(cmd, "/mycommand", true) == 0)
{
    if(IsPlayerConnected(playerid))
    {
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnected(i))
            {
                ShowPlayerNameTagForPlayer(playerid, i, 0);
NameTags[playerid] = 1;
            }
        }
    }
    return 1;
}

public OnPlayerStreamIn(playerid, forplayerid)
{
if(NameTags[playerid] == 1) {
ShowPlayerNameTagForPlayer(forplayerid, playerid, 0);
}
    return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)