Raised This Month: $51 Target: $400
 12% 

Options Hideme Plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
tumtum
Senior Member
Join Date: Aug 2012
Old 01-22-2014 , 11:11   Options Hideme Plugin
Reply With Quote #1

I found this plugin:
Code:
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#include <sdkhooks>
#include <cstrike>

#define PLUGIN_VERSION "1.0.0"

new bool:g_bHideMe[MAXPLAYERS+1] = {false,...};

new g_iPlayerManager;
new g_iConnectedOffset;
new g_iAliveOffset;
new g_iTeamOffset;
new g_iPingOffset;
new g_iScoreOffset;
new g_iDeathsOffset;
new g_iHealthOffset;

public Plugin:myinfo = 
{
	name = "HideMe",
	author = "fluxX", /*Thx to Peace-Maker*/
	description = "Hide admins from scoreboard.",
	version = PLUGIN_VERSION,
	url = "http://wcfan.de"
}

public OnPluginStart()
{
	new Handle:hVersion = CreateConVar("sm_hideme_version", PLUGIN_VERSION, "HideMe Version", FCVAR_PLUGIN|FCVAR_NOTIFY|FCVAR_REPLICATED|FCVAR_DONTRECORD);
	if(hVersion != INVALID_HANDLE)
	{
		SetConVarString(hVersion, PLUGIN_VERSION);
		HookConVarChange(hVersion, OnConVarVersionChange);
	}
	
	AddCommandListener(CmdLstnr_JoinTeam, "jointeam");
	
	HookEvent("player_team", Event_OnPlayerTeam, EventHookMode_Pre);
	
	RegAdminCmd("sm_hideme", Cmd_HideMe, ADMFLAG_GENERIC);
	
	g_iConnectedOffset = FindSendPropOffs("CCSPlayerResource", "m_bConnected");
	g_iAliveOffset = FindSendPropOffs("CCSPlayerResource", "m_bAlive");
	g_iTeamOffset = FindSendPropOffs("CCSPlayerResource", "m_iTeam");
	g_iPingOffset = FindSendPropOffs("CCSPlayerResource", "m_iPing");
	g_iScoreOffset = FindSendPropOffs("CCSPlayerResource", "m_iScore");
	g_iDeathsOffset = FindSendPropOffs("CCSPlayerResource", "m_iDeaths");
	g_iHealthOffset = FindSendPropOffs("CCSPlayerResource", "m_iHealth");
}

public OnConVarVersionChange(Handle:convar, const String:oldValue[], const String:newValue[])
{
	SetConVarString(convar, PLUGIN_VERSION);
}

public OnMapStart()
{
	g_iPlayerManager = FindEntityByClassname(-1, "cs_player_manager");
	if(g_iPlayerManager != -1)
	{
		SDKHook(g_iPlayerManager, SDKHook_ThinkPost, Hook_PMThink);
	}
}

public OnClientDisconnect(client)
{
	g_bHideMe[client] = false;
}

public Action:Cmd_HideMe(client, args)
{
	if(!client)
		ReplyToCommand(client, "[SM] command in-game only");
	
	if(!g_bHideMe[client])
	{
		decl String:sName[MAX_NAME_LENGTH];
		
		GetClientName(client, sName, sizeof(sName));
		g_bHideMe[client] = true;
		
		if(GetClientTeam(client) != CS_TEAM_SPECTATOR)
			ChangeClientTeam(client, CS_TEAM_SPECTATOR);
		
		PrintToChatAll("Spieler %s hat das Spiel verlassen (Disconnect by user.).", sName);
	}
	else
		g_bHideMe[client] = false;
}

public Action:CmdLstnr_JoinTeam(client, const String:command[], argc)
{
	if(g_bHideMe[client])
		return Plugin_Handled;
	
	return Plugin_Continue;
}

public Action:Event_OnPlayerTeam(Handle:event, const String:name[], bool:dontBroadcast)
{
	new client = GetClientOfUserId(GetEventInt(event, "userid"));
	if(g_bHideMe[client])
	{
		// Don't show teamchange message in chat
		dontBroadcast = true;
		return Plugin_Changed;
	}
	return Plugin_Continue;
}

public Hook_PMThink(entity)
{
	for(new i=1;i<=MaxClients;i++)
	{
		if(IsClientInGame(i) && g_bHideMe[i])
		{
			SetEntData(g_iPlayerManager, g_iAliveOffset + (i * 4), false, 4, true);
			SetEntData(g_iPlayerManager, g_iConnectedOffset + (i * 4), false, 4, true);
			SetEntData(g_iPlayerManager, g_iTeamOffset + (i * 4), 0, 4, true);
			SetEntData(g_iPlayerManager, g_iPingOffset + (i * 4), 0, 4, true);
			SetEntData(g_iPlayerManager, g_iScoreOffset + (i * 4), 0, 4, true);
			SetEntData(g_iPlayerManager, g_iDeathsOffset + (i * 4), 0, 4, true);
			SetEntData(g_iPlayerManager, g_iHealthOffset + (i * 4), 0, 4, true);
		}
	}
}

public OnGameFrame()
{
	for(new i=1;i<=MaxClients;i++)
	{
		if(IsClientInGame(i) && g_bHideMe[i])
		{
			SetEntData(g_iPlayerManager, g_iAliveOffset + (i * 4), false, 4, true);
			SetEntData(g_iPlayerManager, g_iConnectedOffset + (i * 4), false, 4, true);
			SetEntData(g_iPlayerManager, g_iTeamOffset + (i * 4), 0, 4, true);
			SetEntData(g_iPlayerManager, g_iPingOffset + (i * 4), 0, 4, true);
			SetEntData(g_iPlayerManager, g_iScoreOffset + (i * 4), 0, 4, true);
			SetEntData(g_iPlayerManager, g_iDeathsOffset + (i * 4), 0, 4, true);
			SetEntData(g_iPlayerManager, g_iHealthOffset + (i * 4), 0, 4, true);
		}
	}
}
It will be nice if someone can hide a team in the spectateboard.

With this plugin /hideme you will be hidden for everyone.
Maybe this is possible with part of names? to hide some words. Like prefixes or blacklisted words.
Or Hide players/bots from T or CT in the spectateboard.

Can someone do this? It will be usefull

Last edited by tumtum; 01-22-2014 at 11:12.
tumtum is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 01-22-2014 , 11:32   Re: Options Hideme Plugin
Reply With Quote #2

as far as i know you cant edit the names of the player on the scoreboard, it would make more sense to just rename the player.
Mitchell is offline
tumtum
Senior Member
Join Date: Aug 2012
Old 01-22-2014 , 12:05   Re: Options Hideme Plugin
Reply With Quote #3

Quote:
Originally Posted by Mitchell View Post
as far as i know you cant edit the names of the player on the scoreboard, it would make more sense to just rename the player.
Just ask for hiding, this is possible i think so. But don't know how.
If this plugin can hide everything, it is possible to hide parts of the name? or to hide all teamplayers in T or CT in specboard.

Last edited by tumtum; 01-22-2014 at 12:06.
tumtum is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 01-22-2014 , 12:44   Re: Options Hideme Plugin
Reply With Quote #4

Quote:
Originally Posted by tumtum View Post
Just ask for hiding, this is possible i think so. But don't know how.
If this plugin can hide everything, it is possible to hide parts of the name? or to hide all teamplayers in T or CT in specboard.
It's possible to hide players yes, but to hide parts of the name you would need to rename the player.
Mitchell is offline
tumtum
Senior Member
Join Date: Aug 2012
Old 01-22-2014 , 18:30   Re: Options Hideme Plugin
Reply With Quote #5

Quote:
Originally Posted by Mitchell View Post
It's possible to hide players yes, but to hide parts of the name you would need to rename the player.
Not sure about this. Also renaming with SM is not working the most times in cs:go.
Maybe there is a way to rename a player if used word blabla as ex. in name it will hide this or rename it.

Is there a plugin working for renames?
Is there a plugin to hide players from T or CT in specboard cs:go?
tumtum is offline
tumtum
Senior Member
Join Date: Aug 2012
Old 01-23-2014 , 10:45   Re: Options Hideme Plugin
Reply With Quote #6

No one with experience?
tumtum is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:14.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode