29.01.2012, 02:36
Hello everyone ,
I was thinking to code a command for Admins Level 6+ which can hide everyone's NameTag For Everyone!
The Command will : Hide the playerid's NameTag For All as well as will hide Everyone's NameTag for the playerid also. This can be done by using a loop i guess maybe two.
But as far as i know Maybe ill need two loop's! First area will hide Player's nametag for everyone [i in the loop]
Second will Hide nametag for playerid of i.
How to hide nametag of other's for others? I guess Good Scripters will be able to get me.
This is what ive coded just now! Hope it helps
Now Consider only 10 people in the server playerid 0 -10. So the output will be like
This is not what i want to do! What i want is that will Hide NameTag of 0 for everyone, then of playerid 1 for everyone then playerid 2's nametag hidden for everyone. and so on!
If you can give me the correct loop or something. Please help me. Im pretty confused with this!
I was thinking to code a command for Admins Level 6+ which can hide everyone's NameTag For Everyone!
The Command will : Hide the playerid's NameTag For All as well as will hide Everyone's NameTag for the playerid also. This can be done by using a loop i guess maybe two.
But as far as i know Maybe ill need two loop's! First area will hide Player's nametag for everyone [i in the loop]
Second will Hide nametag for playerid of i.
How to hide nametag of other's for others? I guess Good Scripters will be able to get me.
This is what ive coded just now! Hope it helps
pawn Код:
if (strcmp(cmd, "/nametag", true)==0)
{
if(PlayerInfo[playerid][pAdmin] >= 6)
{
if(HideNameTag == 0)
{
for(new i = 0; i <= MAX_PLAYERS; i++)
{
for(new x = MAX_PLAYERS; x <= MAX_PLAYERS; x--)
{
ShowPlayerNameTagForPlayer(x, i, false);
}
}
GameTextForPlayer(playerid, "~W~Nametags ~R~off", 5000, 5);
HideNameTag = 1;
}
else
{
for(new i = 0; i <= MAX_PLAYERS; i++)
{
for(new x = MAX_PLAYERS; x <= MAX_PLAYERS; x--)
{
ShowPlayerNameTagForPlayer(x, i, true);
}
}
HideNameTag = 0;
}
}
else return SendClientMessage(playerid,COLOR_GRAD2,"Your not Ballu Miaa who can do anything he want's! Get the fuck off Dude!.");
return 1;
}
Код:
0 - 10 - HIdes 10's Nametag for 0 1 - 9 - HIdes 9's Nametag for 1 2 - 8 - HIdes 8's Nametag for 2 3 - 7 - HIdes 7's Nametag for 3 4 - 6 - HIdes 6's Nametag for 4 5 - 5 - HIdes 5's Nametag for 5 6 - 4 - HIdes 4's Nametag for 6 7 - 3 - HIdes 3's Nametag for 7 8 - 2 - HIdes 2's Nametag for 8 9 - 1 - HIdes 1's Nametag for 9 10 - 0 - HIdes 0's Nametag for 10
If you can give me the correct loop or something. Please help me. Im pretty confused with this!