AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [TF2] tMedicRubber v0.2.0 (2011-11-19) (https://forums.alliedmods.net/showthread.php?t=138016)

Thrawn2 09-12-2010 04:41

[TF2] tMedicRubber v0.2.0 (2011-11-19)
 
2 Attachment(s)
This requires SDKHooks.

It is an extraction of the Flying Doctor ability from the RMF Ability Pack.
I borrowed large parts of its code, so all credit goes to RIKUSYO for creating his awesome plugin. :3 Including some rather useful stocks :]

How it works:
  1. Be a Medic
  2. Fill your charge to 25% (kritz or uber doesnt matter)
  3. Stick to a Soldier or Demo. Wait till they rocket/stickyjump.
  4. Jump and hold the jump button down.
  5. Fly.

Cvars:
  • sm_medicrubber_enabled, enable/disable the plugin
  • sm_medicrubber_mincharge, required amount of charge, defaults to 25.
The config plugin.tMedicRubber.cfg will be auto generated.
To limit access to a certain flag use the admin overrides and override "sm_tmedicrubber".

Changelog:
  • v0.2.0:
    Changed access check to use CheckCommandAccess as suggested by psychonic.

MisterNine 12-10-2010 12:13

Re: [TF2] tMedicRubber (2010-09-12)
 
I can't believe I haven't noticed this until now! I did the same thing you've done here with the Flying Medic plugin from RMF but I lost the source a long time ago and never really published it (because I have no idea how to write plugins, only perform small edits). I just wanted to thank you because people used to LOVE the wacked out version of this we used to run on our servers and I really appreciate you bringing it back.

psychonic 01-31-2011 10:13

Re: [TF2] tMedicRubber (2010-09-12)
 
Code:
for(new i = 1; i <= MaxClients; i++) {     if(IsClientInGame(i) && !IsFakeClient(i)) {         SDKHook(i, SDKHook_PreThink, OnPreThink);     } }

Does this work? I would think it would infinite loop on non-late load since MaxClients is 0 before the map starts (i starting at 1, looping until i <= 0).

Thrawn2 01-31-2011 12:49

Re: [TF2] tMedicRubber (2010-09-12)
 
oddly enough it does
PHP Code:

[...]
    
/* Account for late loading */
    
LogMessage("MaxClients: %i"MaxClients);
    for(new 
1<= MaxClientsi++) {
        
LogMessage("Latehooking %i"i);
        if(
IsClientInGame(i) && !IsFakeClient(i)) {
            
SDKHook(iSDKHook_PreThinkOnPreThink);
        }
    }
[...]
public 
OnClientPutInServer(client) {
    
LogMessage("You have been hooked");
    
SDKHook(clientSDKHook_PreThinkOnPreThink);


results in

Code:

L 01/31/2011 - 18:38:18: -------- Mapchange to dm_store --------
L 01/31/2011 - 18:38:18: [TF2ITEMS] "GiveNamedItem" offset = 456
L 01/31/2011 - 18:38:18: [tMedicRubber.smx] MaxClients: 0
Executing dedicated server config file
Server logging enabled.
Server logging data to file logs\L0131000.log
L 01/31/2011 - 18:38:45: Log file started (file "logs\L0131000.log")
Connection to Steam servers successful.
  VAC secure mode is activated.
Client "thrAAAwn" connected (192.168.1.1:27006).
L 01/31/2011 - 18:41:36: [tMedicRubber.smx] You have been hooked


psychonic 01-31-2011 13:26

Re: [TF2] tMedicRubber (2010-09-12)
 
Wow, I totally failed on that one. It makes sense that it just doesn't enter the loop at all due to the condition not being met.

psychonic 11-18-2011 10:23

Re: [TF2] tMedicRubber (2010-09-12)
 
Thrawn, could you please change the access check to use CheckCommandAccess so that overrides work?

You can cache the result globally per client if you want after OnClientPostAdminCheck since prethink is called every frame.

Thrawn2 11-19-2011 07:40

Re: [TF2] tMedicRubber (2010-09-12)
 
Quote:

Originally Posted by psychonic (Post 1598575)
Thrawn, could you please change the access check to use CheckCommandAccess so that overrides work?
You can cache the result globally per client if you want after OnClientPostAdminCheck since prethink is called every frame.

Done and done. Thanks for the suggestion.

liv3d 05-29-2012 06:26

Re: [TF2] tMedicRubber v0.2.0 (2011-11-19)
 
Just FYI this requires loghelper so you can compile it. You can get this @ http://forums.alliedmods.net/showthread.php?t=100084

Edit: Sorry for huge bump, just adding this incase anyone else comes across it.

nergal 11-18-2012 19:14

Re: [TF2] tMedicRubber v0.2.0 (2011-11-19)
 
will this be updated/improved using Valve's Quick-Fix mechanic?

Thrawn2 11-19-2012 08:48

Re: [TF2] tMedicRubber v0.2.0 (2011-11-19)
 
Quote:

Originally Posted by nergal (Post 1840251)
will this be updated/improved using Valve's Quick-Fix mechanic?

please elaborate. no idea what you're talking about.

does this not work with the quickfix?


All times are GMT -4. The time now is 05:45.

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