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

[TF2] (REQUEST) "Panic" Players


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
AkujiTheSniper
Junior Member
Join Date: Feb 2010
Old 03-06-2010 , 21:43   [TF2] (REQUEST) "Panic" Players
Reply With Quote #1

I thought it would be cool if admins could cause someone to go in panic mode (like going near the ghost in harvest_event). If someone is spawn camping, admins could force them into panic mode so they can't hurt anyone, but everyone else on the other team can hurt him. If someone is ruining your nomming party, you have no more fear when the admins are here!

It should work like this:

sm_panic *target name* "*Message(Why they have panic in the first place)*"
sm_unpanic *target name*
AkujiTheSniper is offline
retsam
Veteran Member
Join Date: Aug 2008
Location: so-cal
Old 03-06-2010 , 21:55   Re: [TF2] (REQUEST) "Panic" Players
Reply With Quote #2

Theres no such thing as spawn camping in tf2.

Also, a plugin that prevents players from hurting others already exists. Search forum for evil mirror. It allows admins to put mirror dmg on players so they cant hurt anyone.
retsam is offline
Wazz
SourceMod Donor
Join Date: Mar 2009
Old 03-07-2010 , 12:31   Re: [TF2] (REQUEST) "Panic" Players
Reply With Quote #3

This requires an extension too. Luckily for you I have that extension.
The plugin has one command sm_panic. This commands takes 2 parameters with an optional 3rd parameter. The first parameter is the target, second is the duration of the panic and third is the reason.

To install you only need the following files:
If your server is on windows place ctfplayershared.ext.dll in the extensions folder.
If your server is on linux place ctfplayershared.ext.so in the extensions folder.
Place panicplayer.smx in the plugins folder
Place ctfplayershared.offsets.txt in the gamedata folder
The other files are source files and are not required.

The extension was compiled against MM1.8/SM1.3.
Attached Files
File Type: zip CTFPlayerShared_src.zip (32.9 KB, 154 views)
File Type: dll ctfplayershared.ext.dll (87.5 KB, 239 views)
File Type: so ctfplayershared.ext.so (35.9 KB, 202 views)
File Type: txt ctfplayershared.offsets.txt (1.7 KB, 252 views)
File Type: inc ctfplayershared.inc (3.0 KB, 235 views)
File Type: smx panicplayer.smx (3.5 KB, 213 views)
File Type: sp Get Plugin or Get Source (panicplayer.sp - 229 views - 1.5 KB)

Last edited by Wazz; 03-12-2010 at 20:51.
Wazz is offline
FoxMulder
Senior Member
Join Date: Jan 2009
Location: Orlando, FL
Old 03-11-2010 , 21:27   Re: [TF2] (REQUEST) "Panic" Players
Reply With Quote #4

Thanks a lot Wazz I've been searching for something like this ever since October . Only thing I can't figure out is how to make the players move while they are in panic (stunned).
__________________
FoxMulder is offline
toazron1
Senior Member
Join Date: Oct 2006
Old 03-11-2010 , 22:26   Re: [TF2] (REQUEST) "Panic" Players
Reply With Quote #5

You should put this in the ext section
__________________
toazron1 is offline
Send a message via AIM to toazron1
Wazz
SourceMod Donor
Join Date: Mar 2009
Old 03-12-2010 , 08:44   Re: [TF2] (REQUEST) "Panic" Players
Reply With Quote #6

FoxMulder, if you are familiar with SM scripting, The iStunFlags of CTF_StunPlayer can be set up to allow that to happen. Fuck knows what value you want though so you will just have to trial and error.
Wazz is offline
FoxMulder
Senior Member
Join Date: Jan 2009
Location: Orlando, FL
Old 03-12-2010 , 09:52   Re: [TF2] (REQUEST) "Panic" Players
Reply With Quote #7

Thanks I figured it out, to get the ghost panicky effect do this:
PHP Code:
CTF_StunPlayer(playertime_1930);
new 
m_iMovementStunAmount FindSendPropInfo("CTFPlayer","m_iMovementStunAmount");
SetEntData(playerm_iMovementStunAmount); 
Basically the m_iMovementStunAmount needs to be set to 0 so the player can move
__________________
FoxMulder is offline
Wazz
SourceMod Donor
Join Date: Mar 2009
Old 03-12-2010 , 10:55   Re: [TF2] (REQUEST) "Panic" Players
Reply With Quote #8

Cool, there is a way to do it by using a different value instead of '193'. But if your way works then that's fine.
I would suggest doing
PHP Code:
SetEntProp(playerProp_Data"m_iMovementStunAmount" 0); // Or is it Prop_Send? 
Instead though.
EDIT: Unless you are calling it a lot and therefore you are caching the value returned from FindSendPropInfo(...).
Wazz is offline
FoxMulder
Senior Member
Join Date: Jan 2009
Location: Orlando, FL
Old 03-12-2010 , 12:36   Re: [TF2] (REQUEST) "Panic" Players
Reply With Quote #9

Yeah I'm saving the offset on plugin_start so that's why it's like that.
I checked the stunflag that the ghost in Koth_Harvest_Event sets and it is 193. Well thanks a lot again! I appreciate your work and I think this should be listed in extensions like someone else said.
__________________
FoxMulder is offline
Wazz
SourceMod Donor
Join Date: Mar 2009
Old 03-12-2010 , 12:58   Re: [TF2] (REQUEST) "Panic" Players
Reply With Quote #10

Psychonic stole most of the extension and is working on getting the majority of it merged with SourceMod's default tf2 extension, so wait for that. Once that's out I'll create something to patch in what he missed!

Last edited by Wazz; 03-12-2010 at 13:00.
Wazz 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 12:03.


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