Author Topic: CS:GO invis solution?  (Read 1710 times)

Remy Lebeau

  • Sr. Member
  • ****
  • Posts: 497
    • View Profile
CS:GO invis solution?
« on: February 14, 2015, 01:13:37 AM »
Anyone seen this:

https://forums.alliedmods.net/showthread.php?t=190363

I haven't look in depth, but do they have a solution for the CS:GO invis?

Necavi

  • Sr. Member
  • ****
  • Posts: 499
    • View Profile
Re: CS:GO invis solution?
« Reply #1 on: February 14, 2015, 03:18:04 AM »
I don't have it installed locally, but here is the code that actually does it, it definitely seems promising...

Code: [Select]
FadeClient(client, r, g, b, a)
{
new Handle:hFadeClient = StartMessageOne("Fade",client)
if (GetUserMessageType() == UM_Protobuf)
{
new color[4]
color[0] = r
color[1] = g
color[2] = b
color[3] = a
PbSetInt(hFadeClient, "duration", 0)
PbSetInt(hFadeClient, "hold_time", 0)
PbSetInt(hFadeClient, "flags", (FFADE_PURGE|FFADE_STAYOUT))
PbSetColor(hFadeClient, "clr", color)
}
else
{
BfWriteShort(hFadeClient, 0)
BfWriteShort(hFadeClient, 0)
BfWriteShort(hFadeClient, (FFADE_PURGE|FFADE_STAYOUT))
BfWriteByte(hFadeClient, r)
BfWriteByte(hFadeClient, g)
BfWriteByte(hFadeClient, b)
BfWriteByte(hFadeClient, a)
}
EndMessage()
}

joshtrav

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: CS:GO invis solution?
« Reply #2 on: February 14, 2015, 11:14:37 AM »
I don't have it installed locally, but here is the code that actually does it, it definitely seems promising...

Code: [Select]
FadeClient(client, r, g, b, a)
{
new Handle:hFadeClient = StartMessageOne("Fade",client)
if (GetUserMessageType() == UM_Protobuf)
{
new color[4]
color[0] = r
color[1] = g
color[2] = b
color[3] = a
PbSetInt(hFadeClient, "duration", 0)
PbSetInt(hFadeClient, "hold_time", 0)
PbSetInt(hFadeClient, "flags", (FFADE_PURGE|FFADE_STAYOUT))
PbSetColor(hFadeClient, "clr", color)
}
else
{
BfWriteShort(hFadeClient, 0)
BfWriteShort(hFadeClient, 0)
BfWriteShort(hFadeClient, (FFADE_PURGE|FFADE_STAYOUT))
BfWriteByte(hFadeClient, r)
BfWriteByte(hFadeClient, g)
BfWriteByte(hFadeClient, b)
BfWriteByte(hFadeClient, a)
}
EndMessage()
}

That looks like its fading the players screen, not the player itself.

I believe he is using SDKHook_SetTransmit for CSGO. 


Revan

  • Hero Member
  • *****
  • Posts: 513
    • View Profile
Re: CS:GO invis solution?
« Reply #3 on: February 14, 2015, 11:45:13 AM »
...
Yeah that look's like the code that is used to fade the screen.
This should the relevant code:
Code: [Select]
public Action:Hook_SetTransmit(entity, client)
{
if (client != entity
&& IsAliveCT(client)
&& !IsPlayerVisible[entity])
{
return Plugin_Handled;
}
return Plugin_Continue;
}


SetEntityVisibility(entity, bool:visible)
{

SetEntityRenderMode(entity, RENDER_TRANSCOLOR);
if (visible)
{
SetEntityRenderColor(entity, 255, 255, 255, 255);
}
else
{
SetEntityRenderColor(entity, 0, 0, 0, 127);
}
}

SetEntityInvisible(entity)
{
SetEntityVisibility(entity, false);
}

SetClientInvisible(client)
{
SetEntityInvisible(client);
SetClientWeaponsVisibility(client, false);
IsPlayerVisible[client] = false;
FadeClient(client, 64, 0, 64, 64)
}
#war3source on gamesurge

Necavi

  • Sr. Member
  • ****
  • Posts: 499
    • View Profile
Re: CS:GO invis solution?
« Reply #4 on: February 14, 2015, 11:48:16 AM »
Heh, that's what I get for looking at it at 3AM, sorry.

mentaldepth

  • Newbie
  • *
  • Posts: 32
    • View Profile
    • Email
Re: CS:GO invis solution?
« Reply #5 on: February 15, 2015, 04:07:25 AM »
Does this mean you amazing coder people could get invisibility to work with war3source now? please say yes :D please say someone is working on it. I don't like the sounds of the last post though... :( wish I was better at all this...