Raised This Month: $89 Target: $400
 22% 

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


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Thrawn2
Veteran Member
Join Date: Apr 2009
Plugin ID:
1947
Plugin Version:
0.2.0
Plugin Category:
Gameplay
Plugin Game:
Team Fortress 2
Plugin Dependencies:
    Servers with this Plugin:
    60 
    Plugin Description:
    Gives Medics the ability to fly with their rocket/sticky-jumping patients.
    Old 09-12-2010 , 04:41   [TF2] tMedicRubber v0.2.0 (2011-11-19)
    Reply With Quote #1

    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. 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.
    Attached Files
    File Type: sp Get Plugin or Get Source (tMedicRubber.sp - 429 views - 5.6 KB)
    File Type: smx tMedicRubber.smx (8.0 KB, 691 views)
    __________________
    einmal mit profis arbeiten. einmal.

    Last edited by psychonic; 11-19-2011 at 11:36. Reason: changed cvar in plugin post data to match cvar in plugin code
    Thrawn2 is offline
    MisterNine
    Member
    Join Date: Jan 2010
    Old 12-10-2010 , 12:13   Re: [TF2] tMedicRubber (2010-09-12)
    Reply With Quote #2

    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.
    MisterNine is offline
    psychonic

    BAFFLED
    Join Date: May 2008
    Old 01-31-2011 , 10:13   Re: [TF2] tMedicRubber (2010-09-12)
    Reply With Quote #3

    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).
    psychonic is offline
    Thrawn2
    Veteran Member
    Join Date: Apr 2009
    Old 01-31-2011 , 12:49   Re: [TF2] tMedicRubber (2010-09-12)
    Reply With Quote #4

    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
    __________________
    einmal mit profis arbeiten. einmal.
    Thrawn2 is offline
    psychonic

    BAFFLED
    Join Date: May 2008
    Old 01-31-2011 , 13:26   Re: [TF2] tMedicRubber (2010-09-12)
    Reply With Quote #5

    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 is offline
    psychonic

    BAFFLED
    Join Date: May 2008
    Old 11-18-2011 , 10:23   Re: [TF2] tMedicRubber (2010-09-12)
    Reply With Quote #6

    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.
    psychonic is offline
    Thrawn2
    Veteran Member
    Join Date: Apr 2009
    Old 11-19-2011 , 07:40   Re: [TF2] tMedicRubber (2010-09-12)
    Reply With Quote #7

    Quote:
    Originally Posted by psychonic View Post
    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.
    __________________
    einmal mit profis arbeiten. einmal.
    Thrawn2 is offline
    liv3d
    SourceMod Donor
    Join Date: Oct 2006
    Old 05-29-2012 , 06:26   Re: [TF2] tMedicRubber v0.2.0 (2011-11-19)
    Reply With Quote #8

    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.

    Last edited by liv3d; 05-29-2012 at 06:26.
    liv3d is offline
    nergal
    Veteran Member
    Join Date: Apr 2012
    Old 11-18-2012 , 19:14   Re: [TF2] tMedicRubber v0.2.0 (2011-11-19)
    Reply With Quote #9

    will this be updated/improved using Valve's Quick-Fix mechanic?
    __________________
    nergal is offline
    Thrawn2
    Veteran Member
    Join Date: Apr 2009
    Old 11-19-2012 , 08:48   Re: [TF2] tMedicRubber v0.2.0 (2011-11-19)
    Reply With Quote #10

    Quote:
    Originally Posted by nergal View Post
    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?
    __________________
    einmal mit profis arbeiten. einmal.
    Thrawn2 is offline
    Reply


    Thread Tools
    Display Modes

    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 15:36.


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