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

TF2: Make razorback invisible?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
retsam
Veteran Member
Join Date: Aug 2008
Location: so-cal
Old 05-29-2009 , 05:47   TF2: Make razorback invisible?
Reply With Quote #1

Having a little issue. It looks like one of the rtd rolls got broken in a manner of speaking in last tf2 update.

Does anyone know how to fix this so it also includes the razorback and possibly jarette(which I dont have yet to test)?

This is the invis code by spazman0 that makes players invis. The razorback does NOT get the invis applied to it. The entire player and other weapons are invis, but not the shield. I tried fiddling with the code, but I couldnt get it to work. It looks like it reads it as entity -1. In regards to this, ive had some sm errors related to "[SM] Native "GetEntDataEnt2" reported: Entity 11 is invalid, 9 invalid, 32 invalid, etc". The line it points to is "weapon = GetEntDataEnt2(client, m_hMyWeapons + i);"

Code:
// Invisiablilty brought to you by Spazman0
CreateInvis(target)    
{
    SetAlpha(target,0);
}

SetAlpha(target, alpha)
{        
    SetWeaponsAlpha(target,alpha);
    SetEntityRenderMode(target, RENDER_TRANSCOLOR);
    SetEntityRenderColor(target, 255, 255, 255, alpha);    
}

SetWeaponsAlpha(target, alpha)
{
        if(IsPlayerAlive(target))
        {
            new m_hMyWeapons = FindSendPropOffs("CBasePlayer", "m_hMyWeapons");    
        
            for(new i = 0, weapon; i < 47; i += 4)
            {
                weapon = GetEntDataEnt2(target, m_hMyWeapons + i);
            
                if(weapon > -1 )
                {
                    SetEntityRenderMode(weapon, RENDER_TRANSCOLOR);
                    SetEntityRenderColor(weapon, 255, 255, 255, alpha);
                }
            }
        }
}

DoColorize(client)
{
        SetWeaponsColor(client);
    SetEntityRenderMode(client, RENDER_NORMAL);
    SetEntityRenderColor(client, 255, 255, 255, 255);
    
    SetAlpha(client, 255);
}


SetWeaponsColor(client)
{
    new m_hMyWeapons = FindSendPropOffs("CBasePlayer", "m_hMyWeapons");    

    for(new i = 0, weapon; i < 47; i += 4)
    {
        weapon = GetEntDataEnt2(client, m_hMyWeapons + i);
    
        if(weapon > -1 )
        {
            SetEntityRenderMode(weapon, RENDER_NORMAL);
            SetEntityRenderColor(weapon, 255, 255, 255, 255);
        }
    }
}
retsam is offline
CrimsonGT
Veteran Member
Join Date: Oct 2007
Location: Gainesville, FL
Old 05-29-2009 , 07:01   Re: TF2: Make razorback invisible?
Reply With Quote #2

Have you tried GetPlayerWeaponSlot() to get the index?
__________________
CrimsonGT is offline
Muridias
Member
Join Date: Feb 2008
Old 05-31-2009 , 05:08   Re: TF2: Make razorback invisible?
Reply With Quote #3

I believe spy's watches and sniper razorback doesn't appear in the slots. I don't know how to check for them either.
Muridias is offline
Spazman0
Member
Join Date: Jul 2008
Old 06-01-2009 , 01:28   Re: TF2: Make razorback invisible?
Reply With Quote #4

I believe this is caused as Razorback doesn't actually have it's own slot, and therefore isn't included. You'd have to find a way to add a seperate check for Razorback and make it invisible.
Spazman0 is offline
retsam
Veteran Member
Join Date: Aug 2008
Location: so-cal
Old 06-01-2009 , 01:34   Re: TF2: Make razorback invisible?
Reply With Quote #5

I know thats the problem. Since razorback is more of a player item, or whatever you wanna call it(i dont have a clue how the game reads it) and no longer a player slot, I dont know how youd do that.

If you think of anything, let me know. Cause snipers with razorbacks cannot be invisible now, or I should say, they are invisible with the shield floating around. heh.
retsam is offline
NeoDement
Member
Join Date: Mar 2009
Old 06-02-2009 , 15:03   Re: TF2: Make razorback invisible?
Reply With Quote #6

I bet hats do the same problem
__________________
I'm not being funny but guys, I'm a bit fit, y'know?
NeoDement is offline
MikeJS
Senior Member
Join Date: Nov 2008
Old 06-02-2009 , 16:28   Re: TF2: Make razorback invisible?
Reply With Quote #7

report_entities shows it's a tf_wearable_item.
__________________
MikeJS is offline
soulnothing
New Member
Join Date: Jun 2009
Old 06-10-2009 , 04:03   Re: TF2: Make razorback invisible?
Reply With Quote #8

Edited cause i wasnt thinking properly. Ive removed model references in the past from items.txt, but i forgot its borked now, sorry.

Last edited by soulnothing; 06-10-2009 at 05:21.
soulnothing is offline
retsam
Veteran Member
Join Date: Aug 2008
Location: so-cal
Old 06-10-2009 , 04:54   Re: TF2: Make razorback invisible?
Reply With Quote #9

Not exactly sure what youre suggesting, but that is most definitely not how you make the razorback invisible.

I already got the help and code to do it anyways, so I no longer need help. Thx though.
retsam 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 00:08.


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