How to make a players name go invisible/disappear at a command? -
theshigbat - 26.01.2008
I have no idea how to make it so when a player types /namesoff or /nameson or even /names to toggle names every player's name turns transparent/totally invisible.
I heard that it can only be done upon a gamemode start.. anyone know how to make it so when people type a command they can make names disappear? (Make sure they can turn back on! :P)
Thanks
Re: How to make a players name go invisible/disappear at a command? -
yom - 26.01.2008
Using
ShowPlayerNameTagForPlayer(playerid, showplayerid, show) and loops, easy
Re: How to make a players name go invisible/disappear at a command? -
theshigbat - 26.01.2008
Quote:
Originally Posted by yom
Using ShowPlayerNameTagForPlayer(playerid, showplayerid, show) and loops, easy
|
I'm guessing the
show variable is between 1 and 0 yes?
But how would I manage to do it with everyone's id?
Re: How to make a players name go invisible/disappear at a command? -
LarzI - 26.01.2008
pawn Код:
for(new i=0; i<MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(i, showplayerid, show);
}
This will disable/enable all player names (i think.. UNTESTED)
Re: How to make a players name go invisible/disappear at a command? -
Nero_3D - 26.01.2008
I think he wanted it for the player who type the command also should playerid stay and the showplayerid must be everyone
Код:
for(new a=0; a<MAX_PLAYERS; a++) {
ShowPlayerNameTagForPlayer(playerid,a,true/false);
}
Re: How to make a players name go invisible/disappear at a command? -
Rozzie - 26.01.2008
a have question about how to hide playermarker...
is theres a function? :S
Re: How to make a players name go invisible/disappear at a command? -
yom - 26.01.2008
SetPlayerMarkerForPlayer(playerid, showplayerid, color)
Aren't functions names clear enough?
Re: How to make a players name go invisible/disappear at a command? -
Rozzie - 26.01.2008
forget what i said,i finded out how to do..
ShowPlayerMarkers(0) is my answer xD
Re: How to make a players name go invisible/disappear at a command? -
IA015 - 27.01.2008
Quote:
Originally Posted by Nero_3D
I think he wanted it for the player who type the command also should playerid stay and the showplayerid must be everyone
Код:
for(new a=0; a<MAX_PLAYERS; a++) {
ShowPlayerNameTagForPlayer(playerid,a,true/false);
}
|
were do i place this?
Re: How to make a players name go invisible/disappear at a command? -
Antironix - 27.01.2008
On the place where you want it to execute.
Re: How to make a players name go invisible/disappear at a command? -
IA015 - 27.01.2008
but how do i do it to a command ? i dont understand the script
Re: How to make a players name go invisible/disappear at a command? -
theshigbat - 27.01.2008
Yeah I'm struggling aswell, I don't understand where it's meant to go.
Re: How to make a players name go invisible/disappear at a command? -
IA015 - 27.01.2008
Код:
if(strcmp(cmdtext, "/invisible", true) == 0)
{
for(new a=0; a<MAX_PLAYERS; a++)
{
ShowPlayerNameTagForPlayer(playerid,a,false)
}
return 1;
}
maybe. no errors but i haven't test yet
Re: How to make a players name go invisible/disappear at a command? -
theshigbat - 27.01.2008
When I put that in, it says 'Invalid function or declaration' in the errors list.
Have you spelled/put something in wrong?
Re: How to make a players name go invisible/disappear at a command? -
Nero_3D - 27.01.2008
he forgot the ";" after showplayer...
Код:
if(strcmp(cmdtext, "/invisible", true) == 0)
{
for(new a=0; a<MAX_PLAYERS; a++)
{
ShowPlayerNameTagForPlayer(playerid,a,false);
}
return 1;
}
Re: How to make a players name go invisible/disappear at a command? -
IA015 - 27.01.2008
Quote:
Originally Posted by Nero_3D
he forgot the ";" after showplayer...
Код:
if(strcmp(cmdtext, "/invisible", true) == 0)
{
for(new a=0; a<MAX_PLAYERS; a++)
{
ShowPlayerNameTagForPlayer(playerid,a,false);
}
return 1;
}
|
ops
Re: How to make a players name go invisible/disappear at a command? -
LethaL - 27.01.2008
Noobish question
![Shocked](images/smilies/surprised.gif)
but will players who connect 2 the server be able to see the invisible player's name tag
![smiley](images/smilies/question.gif)
I have always ran the loop continuously in the past, to make sure.
Re: How to make a players name go invisible/disappear at a command? -
yom - 27.01.2008
Quote:
Originally Posted by LethaL
Noobish question ![Shocked](images/smilies/surprised.gif) but will players who connect 2 the server be able to see the invisible player's name tag ![smiley](images/smilies/question.gif)
I have always ran the loop continuously in the past, to make sure.
|
Do it under OnPlayerConnect(playerid)
Re: How to make a players name go invisible/disappear at a command? -
Snoop.Dogg - 08.09.2009
my question is how to make players visible on the minimap... i tryed with ShowPlayerMark (1) but still cant see marks... help please