16.04.2013, 19:59
Can I use the function ShowNameTags in an admin command to show/hide everyones name tag's? Or will it not work as a command?
This is what I mean (will this work fine?):
&
This is what I mean (will this work fine?):
pawn Код:
if(strcmp(cmd, "/hidealltags", true) == 0)
{
ShowNameTags(0);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
PlayerInfo[i][pMaskuse] = 1;
KillTimer(MaskOnTimer[i]);
SendClientMessage(i, COLOR_WHITE, "Your mask has been turned off by an admin. If you own a mask you may turn it back off.");
}
pawn Код:
if(strcmp(cmd, "/showalltags", true) == 0)
{
ShowNameTags(1);
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
KillTimer(MaskOnTimer[i]);
PlayerInfo[i][pMaskuse] = 0;
SendClientMessage(i, COLOR_WHITE, "Your name has been unhidden by an admin. If you own a mask you may turn it back on now.");
}
}