07.02.2015, 11:05
Hello,
I have a little problem again, mainly when I use the command MASK I should mask a player and his nametag wouldn't be visible, but instead his nametag is only hidden for me, not for everyone else.
I have a little problem again, mainly when I use the command MASK I should mask a player and his nametag wouldn't be visible, but instead his nametag is only hidden for me, not for everyone else.
Код:
CMD:mask ( playerid,params[])
{
if(PlayerInfo[playerid][LoggedIn] == 0) return SendClientMessage(playerid,-1,""RED"ERROR:"GREY" You must logg in!");
if(PlayerInfo[playerid][Admin] < 3) return SendClientMessage( playerid, -1, ""RED"ERROR:"GREY" You are not authorized to use this command.");
new giveid;
if(sscanf(params,"u", giveid)) return SendClientMessage(playerid,USAGE,"{F07F1D}USAGE:{BBFF00} /mask <ID>");
if(PlayerInfo[giveid][inDM] == 1 && 2 && 3) return SendClientMessage(playerid,-1,""RED"ERROR:"GREY" The ID of the player you want to mask iz in DM");
if(PlayerInfo[giveid][Mask] == 0)
{
for(new i = 0; i < MAX_PLAYERS; i++)
{
ShowPlayerNameTagForPlayer(i, giveid, 0);
new string[128];
format(string,sizeof(string),""STEELBLUE"- AS - Administrator {%06x}%s(%d)"STEELBLUE" has masked a player.", (GetPlayerColor(playerid) >>> 8),GetName(playerid),playerid);
SendClientMessageToAll(-1,string);
new str[128];
format(str,sizeof(str),""STEELBLUE"- AS - Administrator {%06x}%s(%d)"STEELBLUE" has masked you.", (GetPlayerColor(playerid) >>> 8),GetName(playerid),playerid);
SendClientMessage(giveid,-1,str);
PlayerInfo[giveid][Mask] = 1;
}
}
if(PlayerInfo[giveid][Mask] == 1)
{
SendClientMessage(playerid,-1,""RED"ERROR:"GREY" That player is masked.");
}
return 1;
}

