kbalor
17/09/2012, 10:00 PM
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.
SmithyComp
17/09/2012, 10:13 PM
Research about the mask systems already made.
ViniBorn
17/09/2012, 10:13 PM
You can use ShowNameTags (http://wiki.sa-mp.com/wiki/ShowNameTags)
antonio112
17/09/2012, 10:14 PM
// 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
vBulletin® v3.8.6, Copyright ©2000-2019, Jelsoft Enterprises Ltd.