Raised This Month: $ Target: $400
 0% 

CSGO scoreboard change


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
rsdtt
Senior Member
Join Date: Oct 2009
Old 10-24-2014 , 12:58   CSGO scoreboard change
Reply With Quote #1

cant we make someone dead show in scoreboard when he is alive,

or he is dead but show alive in scoreboard.

I want hide in scoreboard so that I can record hacker that he doesnt know that I am watching and recording him.
__________________
I am learning sm now
rsdtt is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 10-24-2014 , 18:50   Re: CSGO scoreboard change
Reply With Quote #2

Use something like this

PHP Code:
public OnMapStart()
{
    
g_iIsAliveOffset FindSendPropOffs("CCSPlayerResource""m_bAlive");
    if (
g_iIsAliveOffset == -1)
        
SetFailState("CCSPlayerResource.m_bAlive offset is invalid");
    
    new 
CSPlayerManagerIndex FindEntityByClassname(0"cs_player_manager"); 
    
SDKHook(CSPlayerManagerIndexSDKHook_ThinkPostOnThinkPost);
}

public 
OnThinkPost(entity
{
    
decl isAlive[65];
    
    
GetEntDataArray(entityg_iIsAliveOffsetisAlive65);
    for (new 
1<= MaxClients; ++i)
    {
        if (
IsClientInGame(i))
        {
            if(
IsPlayerAlive(i) || fakealive[i]) isAlive[i] = true// change to live state always
            
else isAlive[i] = false// change to no alive state always
        
}
    }
    
SetEntDataArray(entityg_iIsAliveOffsetisAlive65);

__________________
Veteran Coder -> Activity channel
Coding on CS2 and taking paid and free jobs.

Contact: Steam, Telegram or discord ( franug ).

You like my work? +Rep in my steam profile comments or donate.

Franc1sco is offline
Send a message via MSN to Franc1sco
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 10-24-2014 , 18:51   Re: CSGO scoreboard change
Reply With Quote #3

Here's something I created that makes it so when you type "sm_hiddenspectate" it puts up a message in chat saying that you disconnected from the game, silently switches you to spectator, and removes you from the scoreboard.

PHP Code:
#pragma semicolon 1

#include <sourcemod>
#include <cstrike>
#include <sdkhooks>
#include <sdktools>

new bool:g_bIsHiding[MAXPLAYERS+1];

public 
Plugin:myinfo = {
    
name "Hidden Spectate",
    
author "bl4nk",
    
description "Command to go to spectator and appear to no longer be in the game",
    
version "1.0.0",
    
url "http://forums.alliedmods.net/"
};

public 
OnPluginStart() {
    
RegAdminCmd("sm_hiddenspectate"Command_HiddenSpectateADMFLAG_SLAY"sm_hiddenspectate - Sticks you into spectator and makes it appear as if you left the game");
    
    
HookEvent("player_team"Event_PlayerTeamEventHookMode_Pre);
}

public 
OnMapStart() {
    new 
iIndex FindEntityByClassname(MaxClients+1"cs_player_manager");
    if (
iIndex == -1) {
        
SetFailState("Unable to find tf_player_manager entity");
    }
    
    
SDKHook(iIndexSDKHook_ThinkPostHook_OnThinkPost);
}

public 
OnClientPutInServer(iClient) {
    
g_bIsHiding[iClient] = false;
}

public 
OnClientDisconnect(iClient) {
    
g_bIsHiding[iClient] = false;
}

public 
Action:Command_HiddenSpectate(iClientiArgs) {
    if (
g_bIsHiding[iClient]) {
        
ReplyToCommand(iClient"[SM] You are already hiding.");
        return 
Plugin_Handled;
    }
    
    
g_bIsHiding[iClient] = true;
    
    if (
GetClientTeam(iClient) != CS_TEAM_SPECTATOR) {
        
ChangeClientTeam(iClientCS_TEAM_SPECTATOR);
    }
    
    
PrintToChatAll("Player %N left the game (Disconnect by user.)"iClient);
    
ReplyToCommand(iClient"[SM] You are now hiding.");
    
    
LogAction(iClient, -1"%L used the hidden spectate command."iClient);

    return 
Plugin_Handled;
}

public 
Action:Event_PlayerTeam(Handle:hEvent, const String:szEventName[], bool:bDontBroadcast) {
    new 
iClient GetClientOfUserId(GetEventInt(hEvent"userid"));
    if (
g_bIsHiding[iClient]) {
        if (
GetEventInt(hEvent"team") == CS_TEAM_SPECTATOR) {
            return 
Plugin_Handled;
        } else {
            
g_bIsHiding[iClient] = false;
            
ReplyToCommand(iClient"[SM] You are no longer hiding.");
        }
    }
    
    return 
Plugin_Continue;
}

public 
Hook_OnThinkPost(iEnt) {
    static 
iConnectedOffset = -1;
    if (
iConnectedOffset == -1) {
        
iConnectedOffset FindSendPropInfo("CCSPlayerResource""m_bConnected");
    }
    
    new 
iConnected[65];
    
GetEntDataArray(iEntiConnectedOffsetiConnectedMaxClients+1);
    
    for (new 
1<= MaxClientsi++) {
        if (
g_bIsHiding[i]) {
            
iConnected[i] = 0;
        }
    }
    
    
SetEntDataArray(iEntiConnectedOffsetiConnectedMaxClients+1);


Last edited by bl4nk; 10-24-2014 at 18:52. Reason: Beaten by Franc1sco
bl4nk is offline
rsdtt
Senior Member
Join Date: Oct 2009
Old 10-25-2014 , 01:24   Re: CSGO scoreboard change
Reply With Quote #4

Thank you!!!And I still have one problem, how to open X ray for spectator?
Maybe the best is srcds can record demo so that I can watch every
__________________
I am learning sm now
rsdtt is offline
rsdtt
Senior Member
Join Date: Oct 2009
Old 10-25-2014 , 02:14   Re: CSGO scoreboard change
Reply With Quote #5

OK I know the X ray convar
__________________
I am learning sm now
rsdtt 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 10:39.


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