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

[CS:GO] SetEntityRenderColor - Only visible to specific players


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Fastmancz
Senior Member
Join Date: Jul 2013
Location: Czech Republic
Old 12-29-2019 , 06:00   [CS:GO] SetEntityRenderColor - Only visible to specific players
Reply With Quote #1

Hello,

Is it possible in some way to make a colored player visible only to specific players? I tried SDKHook_SetTransmit, but it didn't help me. If this is't possible, what would you recommend?

PHP Code:
public Action round_start(Handle event, const char[] namebool Broadcast)
{    
    for (
int i 1<= MaxClientsi++)
    {
        if(
!= && IsClientInGame(i) && (iMatchLobby[iClient[i]] == iMatchLobby[iOpponent[i]]))
        {
            
SDKHook(iSDKHook_SetTransmitOnTransmit);
        }
    }
}

public 
Action OnTransmit(int entityint client)
{    
    if (
iMatchLobby[iClient[client]] == iMatchLobby[iOpponent[client]])
    {
        
SetEntityRenderColor(iClient[client], 255,0,0,255);
        
SetEntityRenderColor(iOpponent[client], 255,0,0,255);
        return 
Plugin_Continue;
    }
    return 
Plugin_Continue;

Thanks for answer and help.
__________________


Main owner of the CMGPORTAL.CZ.
---------------------------------------
My plugins:
[CS:GO] Panorama - Timeleft
[CS:GO] JailBreak - Be quiet, please!
Fastmancz is offline
Ilusion9
Veteran Member
Join Date: Jun 2018
Location: Romania
Old 12-29-2019 , 07:02   Re: [CS:GO] SetEntityRenderColor - Only visible to specific players
Reply With Quote #2

The render thing should be an entity to do like that. SetTransmit works only with entities.
__________________
Ilusion9 is offline
Indarello
Senior Member
Join Date: Nov 2015
Location: Russia
Old 12-30-2019 , 03:41   Re: [CS:GO] SetEntityRenderColor - Only visible to specific players
Reply With Quote #3

return plugin_handled;
to stop transmit and apply color only once at spawn, not each transmit, becauseit executes too often and I think you dont use other colors then red

Last edited by Indarello; 12-30-2019 at 03:42.
Indarello is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 12-30-2019 , 17:16   Re: [CS:GO] SetEntityRenderColor - Only visible to specific players
Reply With Quote #4

You should beable to do it with sendproxy

I dunno if the color send prop is different from l4d2 to csgo.
Below is the color entprop for l4d2 and you would hookit with sendproxy that allows setting different values per client(can get expensive).
PHP Code:
Memberm_clrRender (offset 292) (type integer) (bits 32) (Unsigned
Here is sendproxy that allows sending different values to clients, i'v got no clue if the current binary still works in csgo.
https://github.com/TheByKotik/sendproxy

you would be using this type of callback.
PHP Code:
function Action (const int iEntity, const char[] cPropNameint &iValue, const int iElement, const int iClient); //Prop_Int 
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D
Lux is offline
Dragokas
Veteran Member
Join Date: Nov 2017
Location: Ukraine on fire
Old 01-01-2020 , 15:20   Re: [CS:GO] SetEntityRenderColor - Only visible to specific players
Reply With Quote #5

Perhaps, you can do it with overlay over base model. You can find example in Lux's model changer. Entity "prop_dynamic_ornament".

Set different colors for base and for overlay models.
Set SDKHook_SetTransmit hook to base model filtering visiblity for half players, and set SDKHook_SetTransmit to overlay model filtering other half of players you need.
__________________
Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
[My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]
Dragokas 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 01:22.


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