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

Solved Fake Dead Client


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Michael Shoe Maker
Senior Member
Join Date: Apr 2016
Old 09-13-2016 , 12:54   Fake Dead Client
Reply With Quote #1

Greetings M'Lords,

I've happened to befall a problem. I have seen a plugin for TTT to make it so that a client who may be alive or dead is always 'alive'. Meaning they are not blacked out on the scoreboard or the alive count is less.

This leads me to believe the alive status of someone can be changed, how would this be done?

Many Thanks.

Last edited by Michael Shoe Maker; 09-14-2016 at 10:13.
Michael Shoe Maker is offline
Marcus101RR
Veteran Member
Join Date: Aug 2009
Location: Tampa, FL
Old 09-13-2016 , 12:59   Re: Fake Dead Client
Reply With Quote #2

Quote:
Originally Posted by Michael Shoe Maker View Post
Greetings M'Lords,

I've happened to befall a problem. I have seen a plugin for TTT to make it so that a client who may be alive or dead is always 'alive'. Meaning they are not blacked out on the scoreboard or the alive count is less.

This leads me to believe the alive status of someone can be changed, how would this be done?

Many Thanks.
When it comes to Left 4 Dead, you can change the number of incap/death status on their netprops. Try to find a netprop that changes during alive/dead status? I am not sure which one it is.
__________________
Marcus101RR is offline
Send a message via AIM to Marcus101RR Send a message via Skype™ to Marcus101RR
Michael Shoe Maker
Senior Member
Join Date: Apr 2016
Old 09-13-2016 , 13:06   Re: Fake Dead Client
Reply With Quote #3

Quote:
Originally Posted by Marcus101RR View Post
When it comes to Left 4 Dead, you can change the number of incap/death status on their netprops. Try to find a netprop that changes during alive/dead status? I am not sure which one it is.
Tried:
PHP Code:
SetEntProp(param1Prop_Send"m_bAlive"0); 
Apparently this isn't a property that's valid even though it's in my netprops dump.
Michael Shoe Maker is offline
Bacardi
Veteran Member
Join Date: Jan 2010
Location: mom's basement
Old 09-13-2016 , 16:17   Re: Fake Dead Client
Reply With Quote #4

Have you try change that property on OnThinkPost or other OnThink* forwards ?
__________________
Do not Private Message @me
Bacardi is offline
Michael Shoe Maker
Senior Member
Join Date: Apr 2016
Old 09-14-2016 , 07:48   Re: Fake Dead Client
Reply With Quote #5

Quote:
Originally Posted by Bacardi View Post
Have you try change that property on OnThinkPost or other OnThink* forwards ?
Nope. It says in console something like "Invalid property", so my guess the same would happen in a think hook.
Michael Shoe Maker is offline
good_live
AlliedModders Donor
Join Date: Oct 2013
Old 09-14-2016 , 08:47   Re: Fake Dead Client
Reply With Quote #6

Why you don't take the relevant part from the TTT plugin?
It is open source.
good_live is offline
Franc1sco
Veteran Member
Join Date: Oct 2010
Location: Spain (Madrid)
Old 09-14-2016 , 09:17   Re: Fake Dead Client
Reply With Quote #7

Quote:
Originally Posted by Michael Shoe Maker View Post
Tried:
PHP Code:
SetEntProp(param1Prop_Send"m_bAlive"0); 
Apparently this isn't a property that's valid even though it's in my netprops dump.
Try with
PHP Code:
SetEntProp(clientProp_Send"m_lifeState"1); 
__________________
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
Michael Shoe Maker
Senior Member
Join Date: Apr 2016
Old 09-14-2016 , 09:43   Re: Fake Dead Client
Reply With Quote #8

Quote:
Originally Posted by Franc1sco View Post
Try with
PHP Code:
SetEntProp(clientProp_Send"m_lifeState"1); 
That does work in a sense, it makes it so I don't count as an alive player on the hud and scoreboard but it makes me invisible. The reason I need this is because I made a little menu that allows players to choose a model to become (like a teapot), but because this is used on a Jailbreak server it interferes with the game since T's would be looking for that remaining player.

EDIT: I saw this before in the plugin but I have no idea what it does and if it's what im looking for:
PHP Code:
public void OnMapStart()
{
    
g_iAlive FindSendPropInfo("CCSPlayerResource""m_bAlive");
    if (
g_iAlive == -1)
        
SetFailState("CCSPlayerResource \"m_bAlive\" offset is invalid");
    
    
g_iKills FindSendPropInfo("CCSPlayerResource""m_iKills");
    if (
g_iKills == -1)
        
SetFailState("CCSPlayerResource \"m_iKills\" offset is invalid");
    
    
g_iDeaths FindSendPropInfo("CCSPlayerResource""m_iDeaths");
    if (
g_iDeaths == -1)
        
SetFailState("CCSPlayerResource \"m_iDeaths\"  offset is invalid");
    
    
g_iAssists FindSendPropInfo("CCSPlayerResource""m_iAssists");
    if (
g_iAssists == -1)
        
SetFailState("CCSPlayerResource \"m_iAssists\"  offset is invalid");
    
    
g_iMVPs FindSendPropInfo("CCSPlayerResource""m_iMVPs");
    if (
g_iMVPs == -1)
        
SetFailState("CCSPlayerResource \"m_iMVPs\"  offset is invalid");
    
    
    
int iPlayerManagerPost FindEntityByClassname(0"cs_player_manager");
    
SDKHook(iPlayerManagerPostSDKHook_ThinkPostThinkPost);
}

public 
void ThinkPost(int entity)
{
    
int isAlive[65];
    
    
GetEntDataArray(entityg_iAliveisAlive65);
    
LoopValidClients(i)
        
isAlive[i] = (!g_bFound[i]);
    
    if (
g_iConfig[b_kadRemover])
    {
        
int iZero[MAXPLAYERS 1] =  { 0, ... };
        
        
SetEntDataArray(entityg_iKillsiZeroMaxClients 1);
        
SetEntDataArray(entityg_iDeathsiZeroMaxClients 1);
        
SetEntDataArray(entityg_iAssistsiZeroMaxClients 1);
        
SetEntDataArray(entityg_iMVPsiZeroMaxClients 1);
    }
    
    
SetEntDataArray(entityg_iAliveisAlive65);


Last edited by Michael Shoe Maker; 09-14-2016 at 10:01.
Michael Shoe Maker is offline
Michael Shoe Maker
Senior Member
Join Date: Apr 2016
Old 09-14-2016 , 10:12   Re: Fake Dead Client
Reply With Quote #9

Solved:

PHP Code:
public void Hook_ThinkPost(int entity)
{
    
int IsAlive[MAXPLAYERS 1];
    
    
GetEntDataArray(entityg_iAliveIsAlivesizeof(IsAlive));
    
    for(
int i 1<= MaxClientsi++)
    {
        if(
IsValidClient(i))
        {
            
IsAlive[i] = view_as<int>(!g_bProp[i]);
        }
    }
    
    
SetEntDataArray(entityg_iAliveIsAlivesizeof(IsAlive));

Michael Shoe Maker is offline
shavit
AlliedModders Donor
Join Date: Dec 2011
Location: Israel
Old 09-14-2016 , 10:13   Re: Fake Dead Client
Reply With Quote #10

Quote:
Originally Posted by Michael Shoe Maker View Post
That does work in a sense, it makes it so I don't count as an alive player on the hud and scoreboard but it makes me invisible. The reason I need this is because I made a little menu that allows players to choose a model to become (like a teapot), but because this is used on a Jailbreak server it interferes with the game since T's would be looking for that remaining player.

EDIT: I saw this before in the plugin but I have no idea what it does and if it's what im looking for:
PHP Code:
public void OnMapStart()
{
    
g_iAlive FindSendPropInfo("CCSPlayerResource""m_bAlive");
    if (
g_iAlive == -1)
        
SetFailState("CCSPlayerResource \"m_bAlive\" offset is invalid");
    
    
g_iKills FindSendPropInfo("CCSPlayerResource""m_iKills");
    if (
g_iKills == -1)
        
SetFailState("CCSPlayerResource \"m_iKills\" offset is invalid");
    
    
g_iDeaths FindSendPropInfo("CCSPlayerResource""m_iDeaths");
    if (
g_iDeaths == -1)
        
SetFailState("CCSPlayerResource \"m_iDeaths\"  offset is invalid");
    
    
g_iAssists FindSendPropInfo("CCSPlayerResource""m_iAssists");
    if (
g_iAssists == -1)
        
SetFailState("CCSPlayerResource \"m_iAssists\"  offset is invalid");
    
    
g_iMVPs FindSendPropInfo("CCSPlayerResource""m_iMVPs");
    if (
g_iMVPs == -1)
        
SetFailState("CCSPlayerResource \"m_iMVPs\"  offset is invalid");
    
    
    
int iPlayerManagerPost FindEntityByClassname(0"cs_player_manager");
    
SDKHook(iPlayerManagerPostSDKHook_ThinkPostThinkPost);
}

public 
void ThinkPost(int entity)
{
    
int isAlive[65];
    
    
GetEntDataArray(entityg_iAliveisAlive65);
    
LoopValidClients(i)
        
isAlive[i] = (!g_bFound[i]);
    
    if (
g_iConfig[b_kadRemover])
    {
        
int iZero[MAXPLAYERS 1] =  { 0, ... };
        
        
SetEntDataArray(entityg_iKillsiZeroMaxClients 1);
        
SetEntDataArray(entityg_iDeathsiZeroMaxClients 1);
        
SetEntDataArray(entityg_iAssistsiZeroMaxClients 1);
        
SetEntDataArray(entityg_iMVPsiZeroMaxClients 1);
    }
    
    
SetEntDataArray(entityg_iAliveisAlive65);

it makes zero sense to set entity data to all player at ThinkPost instead of just to the one that ThinkPost is hooked to
__________________
retired
shavit 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 17:47.


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