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

[TF2] Addcond


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
MikeJS
Senior Member
Join Date: Nov 2008
Old 07-26-2009 , 12:47   [TF2] Addcond
Reply With Quote #1

PHP Code:
stock TF2_AddCond(clientcond) {
    new 
Handle:cvar FindConVar("sv_cheats"), bool:enabled GetConVarBool(cvar), flags GetConVarFlags(cvar);
    if(!
enabled) {
        
SetConVarFlags(cvarflags^FCVAR_NOTIFY);
        
SetConVarBool(cvartrue);
    }
    
FakeClientCommand(client"addcond %i"cond);
    if(!
enabled) {
        
SetConVarBool(cvarfalse);
        
SetConVarFlags(cvarflags);
    }
}
stock TF2_RemoveCond(clientcond) {
    new 
Handle:cvar FindConVar("sv_cheats"), bool:enabled GetConVarBool(cvar), flags GetConVarFlags(cvar);
    if(!
enabled) {
        
SetConVarFlags(cvarflags^FCVAR_NOTIFY);
        
SetConVarBool(cvartrue);
    }
    
FakeClientCommand(client"removecond %i"cond);
    if(!
enabled) {
        
SetConVarBool(cvarfalse);
        
SetConVarFlags(cvarflags);
    }

TF2_AddCond(client, 5) will ubercharge a player and TF2_AddCond(client, 11) will kritzkrieg them (works with tf_weapon_criticals 0).
__________________
MikeJS is offline
Chris-_-
SourceMod Donor
Join Date: Oct 2008
Old 07-26-2009 , 13:13   Re: [TF2] Addcond
Reply With Quote #2

Brilliant stocks
Chris-_- is offline
J-Factor
Junior Member
Join Date: Jul 2009
Old 07-26-2009 , 13:37   Re: [TF2] Addcond
Reply With Quote #3

Wow.

This is amazing. How did you find the commands?

The possibilities are endless... just after a quick test I've found you can make any class disguise (if you also set the appropriate props).

Great work.

EDIT:

From my quick testing:

0 = Civilian
1 = Sniper Scope (doesn't zoom in)
2 = Start of Disguise sequence
3 = Disguise (set m_nDisguiseTeam, etc. after applying to select the team/class/player/weapon)
4 = Cloak (only seems to work with Spy)
5 = Uber
6 = Glow from recently using a teleporter
7 = Useless (this is used for when you taunt)
8 = Unknown
9 = Unknown (probably useless since it doesn't alter your condition)
10 = Unknown
11 = Kritz (seems to disable when you kill someone)
12 = Unknown
13 = Unknown (probably useless since it doesn't alter your condition)
14 = Bonk'd (only lasts 5 seconds for Scout; interesting note: if you taunt you stay in third person even with sv_cheats 0)
15 = Useless (this is used for when you are slowed after drinking Bonk and when you're stunned)
16 = Unknown
17 = Useless (this is used for when you are ignited, makes you say fire voice response)
18 = Unknown
19 = Jarate

Example code to disguise as your class on the enemy team (after adding condition 3):

Code:
SetEntProp(client, Prop_Send, "m_nDisguiseClass", TF2_GetPlayerClass(client));
SetEntProp(client, Prop_Send, "m_nDisguiseTeam", GetClientTeam(client) == 2 ? 3 : 2);

Last edited by J-Factor; 07-26-2009 at 15:34.
J-Factor is offline
Chris-_-
SourceMod Donor
Join Date: Oct 2008
Old 07-26-2009 , 13:42   Re: [TF2] Addcond
Reply With Quote #4

Please share everything you have on this.
Chris-_- is offline
Chris-_-
SourceMod Donor
Join Date: Oct 2008
Old 07-26-2009 , 13:50   Re: [TF2] Addcond
Reply With Quote #5

/del

Last edited by Chris-_-; 07-26-2009 at 17:27.
Chris-_- is offline
Sexual Harassment Panda
Veteran Member
Join Date: Dec 2008
Location: San Diego, CA
Old 07-26-2009 , 15:48   Re: [TF2] Addcond
Reply With Quote #6

I'm kind of confused as to how to use this, but that's probably just me.
__________________
Sexual Harassment Panda is offline
MikeJS
Senior Member
Join Date: Nov 2008
Old 07-26-2009 , 16:06   Re: [TF2] Addcond
Reply With Quote #7

Quote:
Originally Posted by J-Factor View Post
This is amazing. How did you find the commands?
Some guy named Aron added be on steam and PM'ed me them
__________________
MikeJS is offline
bl4nk
SourceMod Developer
Join Date: Jul 2007
Old 07-26-2009 , 16:17   Re: [TF2] Addcond
Reply With Quote #8

Code:
#define PLAYERCOND_SLOWED (1<<0) //1
#define PLAYERCOND_ZOOMED (1<<1) //2
#define PLAYERCOND_DISGUISING (1<<2) //4
#define PLAYERCOND_DISGUISED (1<<3) //8
#define PLAYERCOND_SPYCLOAK (1<<4) //16
#define PLAYERCOND_UBERED (1<<5) //32
#define PLAYERCOND_TELEPORTTRAIL (1<<6) //64
#define PLAYERCOND_TAUNT (1<<7) //128
// (1<<8) //256
// (1<<9) //512
#define PLAYERCOND_TELEPORTFLASH (1<<10) //1024
#define PLAYERCOND_KRUBER (1<<11) //2048
// (1<<12) //4096
// (1<<13) //8192
#define PLAYERCOND_BONKED (1<<14) //16384 (blame Neph if it doesn't work)
#define PLAYERCOND_BONKEDORDRINKSLOWDOWN (1<<15) //32768
#define PLAYERCOND_HEALING (1<<16) //65536
#define PLAYERCOND_BURNING (1<<17) //131072
#define PLAYERCOND_FULLYCHARGEDBYMEDIC (1<<18) //262144
bl4nk is offline
Chris-_-
SourceMod Donor
Join Date: Oct 2008
Old 07-26-2009 , 17:25   Re: [TF2] Addcond
Reply With Quote #9

Thank you, was looking for that one
Chris-_- is offline
Gachl
BANNED
Join Date: Feb 2009
Old 07-27-2009 , 02:02   Re: [TF2] Addcond
Reply With Quote #10

My hero! +K for you!
Gachl 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 13:09.


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