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

Hide weapons plugin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zhell
Member
Join Date: Oct 2016
Location: Sweden
Old 09-22-2017 , 18:01   Hide weapons plugin
Reply With Quote #1

Is there any plugin that you can type for example !hideweapons to hide your weapon viewmodel? With clientprefs of course Thanks in advance
__________________
Community Servers: zhell.nu
Steam: zhell
Discord: zhell#7227

Contact me on Steam for inquiries
zhell is offline
Halt
Senior Member
Join Date: Jan 2015
Location: Black Mesa
Old 09-22-2017 , 18:11   Re: Hide weapons plugin
Reply With Quote #2

Hmm, I'm sure there is an easier way to do this than what I'm about to tell you but just change the way the weapon is rendered.

This is from an old script of mine,

PHP Code:
public Action:SetColor(Handle:Timerany:client//This decides what color to make humans. 
{
    if(
IsClientConnected(client) && IsClientInGame(client))
    {
        if(
TF2_GetPlayerClass(client) == TFClass_Sniper)
        {
            
SetEntityRenderMode(clientRENDER_TRANSCOLOR);
            
SetEntityRenderColor(client10010010075); //<----- Renders client almost invisible. 
            
new index = -1;
            while((
index FindEntityByClassname(index"tf_weapon_compound_bow")) !=-1)
            {
                
SetEntityRenderMode(indexRENDER_TRANSCOLOR);
                
SetEntityRenderColor(index10010010075); //<----- Renders client's weapon almost invisible. 
            
}
        }
        else if (
TF2_GetPlayerClass(client) != TFClass_Sniper)
        {
            
SetEntityRenderColor(client255255255255);
        }
    }

You can render entities completely transparent by using SetEntityRenderColor(entity, R,G,B, THIS IS TRANSPARENCY VALUE) Please excuse my old ugly code shame on me.

Last edited by Halt; 09-22-2017 at 18:14.
Halt 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 21:33.


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