Raised This Month: $ Target: $400
 0% 

How to get invisible .. #2 ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
noxuu
Member
Join Date: Dec 2015
Old 12-06-2015 , 16:24   How to get invisible .. #2 ?
Reply With Quote #1

Hello !. I am trying to add invisibility for the player. Previous topic, unfortunately, had not helped me.
Anyone have any idea?
Thank you so much.

## Sorry for my bad english :/

Last edited by noxuu; 12-06-2015 at 16:25.
noxuu is offline
Smith_EG
Member
Join Date: Nov 2014
Old 12-06-2015 , 16:27   Re: How to get invisible .. #2 ?
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?t=75520
Smith_EG is offline
thecount
Veteran Member
Join Date: Jul 2013
Old 12-06-2015 , 16:31   Re: How to get invisible .. #2 ?
Reply With Quote #3

!invisible

PHP Code:
#include <sourcemod>

public OnPluginStart(){ RegAdminCmd("sm_invisible"InvisiADMFLAG_GENERIC""); }

public 
Action:Invisi(clientargs){
    if(
GetEntityRenderMode(client) == RENDER_NONE){
        
SetEntityRenderMode(clientRENDER_NORMAL);
    }else{
        
SetEntityRenderMode(clientRENDER_NONE);
    }

http://sourcemod.net/compiler.php
thecount is offline
noxuu
Member
Join Date: Dec 2015
Old 12-06-2015 , 16:33   Re: How to get invisible .. #2 ?
Reply With Quote #4

Thank you a lot !
noxuu is offline
noxuu
Member
Join Date: Dec 2015
Old 12-11-2015 , 05:00   Re: How to get invisible .. #2 ?
Reply With Quote #5

I have one more question.
How to set 50% visibility using alpha?
noxuu is offline
thecount
Veteran Member
Join Date: Jul 2013
Old 12-11-2015 , 16:16   Re: How to get invisible .. #2 ?
Reply With Quote #6

Quote:
Originally Posted by noxuu View Post
How to set 50% visibility using alpha?
The server would need to have the alpha convar set if this is CSGO. It can be done like
PHP Code:
public OnMapStart(){
    
ServerCommand("sv_disable_immunity_alpha 1");

And then the opacity can be set with these functions replacing the RENDER_NONE method:
PHP Code:
SetEntityRenderMode(clientRENDER_TRANSCOLOR);
SetEntityRenderColor(client255255255127);//Last argument is a number 0 to 255 for transparency 
If you have no idea how to script and can't use these then see below
Spoiler

Last edited by thecount; 12-12-2015 at 13:05.
thecount is offline
noxuu
Member
Join Date: Dec 2015
Old 12-12-2015 , 07:32   Re: How to get invisible .. #2 ?
Reply With Quote #7

I know that code, but I didn't know about convars . Thanks again .
noxuu 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 03:27.


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