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(client, SDKHook_SetTransmit, Hook_SetTransmit);
}
PHP Code:
public Action:Hook_SetTransmit(entity, client)
{
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(entity, client)
{
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