TF2 setting Cloak Meter value
Does anyone know if it's possible to set the value of the Cloak Meter? I found:
Code:
FindSendPropOffs("CTFPlayer", "m_flCloakMeter"); Code:
public Action:OnClientCommand(client, args) { |
Re: TF2 setting Cloak Meter value
Funny I was playing around with the cloak meter a few days ago. I also keep getting 0.00000. If I tried to send a value to it the server would crash.
Found out what the problem is. Use FindSendPropInfo instead of FindSendPropOffs |
Re: TF2 setting Cloak Meter value
Awesome, that was exactly what I was looking for. Thank you very much.
|
Re: TF2 setting Cloak Meter value
Quote:
There are also bits in m_nPlayerCond Code:
FindSendPropInfo("CTFPlayer","m_nPlayerCond"); if m_nPlayerCond & 32 then the player is ubered. if m_nPlayerCond & 16 then the spy is cloaked. if m_nPlayerCond & 8 then the spy is disguised. if m_nPlayerCond & 1 then the player is slowed (sniper is zoomed or heavy is firing or spinning his barrel) Turning off bit 16 will uncloak a spy. Turning off bit 8 will un-disguise him. |
Re: TF2 setting Cloak Meter value
Quote:
24 is when spy is cloak with disguise. 16 is when spy is cloak without disguise. 4 is when spy is currently disguiseing himself. 3 is sniper zoomed. 1 is heavy spinning barrel. 0 is when spy isn't cloak and isn't disguise. I forget the number when you are being healed. |
Re: TF2 setting Cloak Meter value
Quote:
|
Re: TF2 setting Cloak Meter value
I tested them out the spy ones. You can remove their cloak and disguise, but you can't set it. You can also stop a player from taunting.
|
Re: TF2 setting Cloak Meter value
Quote:
3 == 1 + 2 (1 for slowed + 2 for zoomed?) I think healing might be 64? I'll have to check again. Quote:
At one time I had a bug in my code that would made spys look ubered, I am not sure what it was, but I think it had something to do with m_nPlayerCond. |
Re: TF2 setting Cloak Meter value
As a follow up for this old thread, I have an question...
How can one set the amount of cloak and then force the cloak? Of course, naturally only the spy could self-toggle the cloak. Here is what I have: PHP Code:
Must be something simple that I am missing here, but I just don't know what it is. |
Re: TF2 setting Cloak Meter value
Have you tried different values for m_flCloakMeter? I can't tell you if 1.0 is 100% or 1%.
Edit: Oh, this is bumping an old thread. If you want to force a Spy to cloak, use FakeClientCommand to force them to do +attack2. But be aware if they're already cloaked, this will decloak them... and will have no effect if a DR Spy is uncloaked and doesn't have a full cloak meter. Edit2: btw, SetEntPropFloat(ent, Prop_Send, "m_flCloakMeter", 3.0) is probably safer than FindSendProp*/SetEntData. |
All times are GMT -4. The time now is 20:36. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.