Name tags
#1

Hi!

I have an RP mode (No, its not GF. ) and I have a little problem with name tags.

The first thing is to hide each player's name tag. I don't know which function I should use.

The second thing is a command for admins ( /showname ). If an (rcon) admin type that command, he will be able to see the name tags. And if he type that command again, the name tags will be again in hide.

I can't solve these problems, so please help me.
Thank you.
Reply
#2


To hide all player's nametags:
https://sampwiki.blast.hk/wiki/ShowNameTags

The command for admins:
https://sampwiki.blast.hk/wiki/ShowPlayerNameTagForPlayer
(add IsPlayerAdmin) to that for RCON admins.

I think if you disable ShowNameTags under OnGameModeInit, then ShowPlayerNameTagForPlayer function will not work, not sure.
Reply
#3

Quote:
Originally Posted by [B2K
Hustler ]

To hide all player's nametags:
https://sampwiki.blast.hk/wiki/ShowNameTags

The command for admins:
https://sampwiki.blast.hk/wiki/ShowPlayerNameTagForPlayer
(add IsPlayerAdmin) to that for RCON admins.

I think if you disable ShowNameTags under OnGameModeInit, then ShowPlayerNameTagForPlayer function will not work, not sure.
Where did say it's just for RCON ADMINS , ROFL !?
Reply
#4

Sorry for double posting.
Reply
#5

I made this command, but if I type it, the name tag become hidden for a second, but after it will be the same again.

This is the command:

Код:
new ShowNames[MAX_PLAYERS];

if(strcmp(cmd, "/showname", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(ShowNames[playerid] == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(playerid, i, true);
}
ShowNames[playerid] = 1;
SendClientMessage(playerid, COLOR_GRAD1, "Name tags enabled.");
}
else if(ShowNames[playerid] == 1)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(playerid, i, false);
}
ShowNames[playerid] = 0;
SendClientMessage(playerid, COLOR_GRAD1, "Name tags disabled.");
}
}
return 1;
}
Please help!
Reply
#6

Nobody can help?
Reply
#7

...
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)