How to make player invisible?
Game: CSGO
How to make player invisible?
Look into setcolor function of EZSP library: http://forums.sourcepython.com/showthread.php?603-EZSP-Libary-to-easily-access-SP-modules-amp-functions&highlight=alpha
P.S. - http://forums.sourcepython.com/search.php
P.S. - http://forums.sourcepython.com/search.php
- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
In case you are looking for fully invisibility: (solutions from SM forums)
- Hook SetTransmit (read this: http://forums.sourcepython.com/showthread.php?570-Best-way-to-hook-something-on-player)
- Set m_flModelScale player prop to 0.00000001
- Set m_fEffects player prop to 32 (invisible) and m_fEffects to 129 (visible)
- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
Well, I would not recommend hard-coding m_fEffects values. I'd rather suggest you to look at the following code.Hedgehog wrote:
- Set m_fEffects player prop to 32 (invisible) and m_fEffects to 129 (visible)
Syntax: Select all
from constants import EntityEffects
from events import Event
from players.entity import PlayerEntity
from players.helpers import index_from_userid
@Event
def player_jump(game_event):
# Get a PlayerEntity instance of the player...
player = PlayerEntity(index_from_userid(game_event.get_int('userid')))
# Get the current player's effects...
effects = player.get_prop_int('m_fEffects')
# Is the player already visible?
if not effects & EntityEffects.NODRAW:
# Add the NODRAW effect to the player...
player.set_prop_int('m_fEffects', effects | EntityEffects.NODRAW)
# Otherwise...
else:
# Remove the NODRAW effect from the player...
player.set_prop_int('m_fEffects', effects & ~EntityEffects.NODRAW)
Actually, I found this SM plugin during a search last night to try and figure this out:
https://github.com/Zipcore/Hide_And_Seek
I haven't had time to test anything with its method, as of yet, though.
https://github.com/Zipcore/Hide_And_Seek
I haven't had time to test anything with its method, as of yet, though.
- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
I believe this is where it changes the alpha:
https://github.com/Zipcore/Hide_And_Seek/blob/master/addons/sourcemod/scripting/hide_and_seek.sp#L700
It seems that it sets the RenderMode to RENDER_TRANSTEXTURE, which is 2.
https://github.com/Zipcore/Hide_And_Seek/blob/master/addons/sourcemod/scripting/hide_and_seek.sp#L700
It seems that it sets the RenderMode to RENDER_TRANSTEXTURE, which is 2.
- L'In20Cible
- Project Leader
- Posts: 1536
- Joined: Sat Jul 14, 2012 9:29 pm
- Location: Québec
To make an entity completely invisible (even the weapons a player has) I hooked CBaseEntity::SetTransmit() with SPE some years ago. http://forums.eventscripts.com/viewtopic.php?f=90&t=45739&p=399762&hilit=SetTransmit#p399762
I'm pretty sure this will also work with CS:GO. And doing this with SP will be much easier.
I'm pretty sure this will also work with CS:GO. And doing this with SP will be much easier.

Return to “Plugin Development Support”
Who is online
Users browsing this forum: No registered users and 141 guests