Raised This Month: $ Target: $400
 0% 

[CS:GO] How do I use SetTransmit Hook?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Pyro_
Senior Member
Join Date: Oct 2013
Old 10-08-2013 , 02:10   [CS:GO] How do I use SetTransmit Hook?
Reply With Quote #1

How can I make a player invisible (including sounds and everything) using SetTransmit Hook? (I read somewhere you could).
I tried:

PHP Code:
public Event_Player_Spawn(Handle:event, const String:name[], bool:dontBroadcast)
{
    new 
client GetClientOfUserId(GetEventInt(event"userid"));
    
SDKHook(clientSDKHook_SetTransmitHook_SetTransmit);

PHP Code:
public Action:Hook_SetTransmit(entityclient)
{
    if(
invis[entity])
    {
        return 
Plugin_Handled;
    }
    return 
Plugin_Continue;

But I was unable move while "invisible".

(Please note that I don't know how it works, so the below solution will probably look stupid)

Then I tried:
PHP Code:
public Action:Hook_SetTransmit(entityclient)
{
    if(
invis[entity] && entity != client)
    {
        return 
Plugin_Handled;
    }
    return 
Plugin_Continue;

Thinking that it went through all the clients to see if they received the information; and the reason I couldn't move was because my client wasn't receiving the information.

Please help!

EDIT: Sorry it works! I just did a bad test

Last edited by Pyro_; 10-08-2013 at 04:05. Reason: Formatting
Pyro_ is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 10-08-2013 , 08:32   Re: [CS:GO] How do I use SetTransmit Hook?
Reply With Quote #2

Settransmit may not be ideal for clients, since you cannot force an update on them afaik.. Not really sure when a snapshot will be sent again to make them visible once you allow transmit, but it may be a long while.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram 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 05:55.


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