Blockland Forums > Suggestions & Requests
An add-on to hide all player names?
Pages: (1/1)
Kevso:
Like when you press f5 and you can't see player names. I need it for slayer. A simple that hides player names. PLEASE
Edit: found one that doesn't work.
Here's the script if you can fix it:
--- Code: ---package HideNames{
function serverCmdToggleNames(%client){
if(%client.isSuperAdmin){
if($HidePlayerNames){
messageClient(%client, '', 'Player names ON.');
$HidePlayerNames = 0;
for(%i=0;%i<ClientGroup.getCount();%i++){
%cl = ClientGroup.getObject(%i);
if(isObject(%cl.player)){
%cl.player.setShapeName(%cl.name);
}
}
} else {
messageClient(%client, '', 'Player names OFF.');
$HidePlayerNames = 1;
for(%i=0;%i<ClientGroup.getCount();%i++){
%cl = ClientGroup.getObject(%i);
if(isObject(%cl.player)){
%cl.player.setShapeName("");
}
}
}
}
}
function GameConnection::spawnPlayer(%this){
Parent::spawnPlayer(%this);
if($HidePlayerNames){
%this.player.setShapeName("");
}
}
};
ActivatePackage(HideNames);
--- End code ---
Advanced Bot:
Belongs in coding help. And setShapeName cannot be used because it needs a fancy password. Use setShapeNameDistance
function serverCmdToggleNames(%this)
{
if(!%this.isSuperAdmin)
return;
$HideNames = !$HideNames;
messageAll('',%this.getPlayerName() @ " > \c7Hiding names is now \c4" @ $HideNames);
for(%i=0;%i<clientGroup.getCount();%i++)
{
%client = clientGroup.getObject(%i);
if(isObject(%player = %client.player))
if($HideNames)
%player.setShapeNameDistance(100);
else
%player.setShapeNameDistance(0);
}
}
package HideNames
{
function GameConnection::SpawnPlayer(%this)
{
Parent::SpawnPlayer(%this);
if(isObject(%this.player) && $HideNames)
%this.player.setShapeNameDistance(0);
}
};
activatepackage(HideNames);
Wrapperup:
or you could
just
set slayer name distance to 0 in slayer gui
NEkram:
--- Quote from: Wrapperup on March 25, 2014, 11:41:28 PM ---or you could
just
set slayer name distance to 0 in slayer gui
--- End quote ---
lmao
Kevso:
--- Quote from: Wrapperup on March 25, 2014, 11:41:28 PM ---or you could
just
set slayer name distance to 0 in slayer gui
--- End quote ---
Got it thanks.
Pages: (1/1)