Raised This Month: $168 Target: $400
 42% 

Double Jump


Post New Thread Reply   
 
Thread Tools Display Modes
Author
paegus
Senior Member
Join Date: Nov 2004
Location: Extreme low earth orbit
Plugin ID:
1080
Plugin Version:
1.0.1
Plugin Category:
Gameplay
Plugin Game:
Any
Plugin Dependencies:
    Servers with this Plugin:
    258 
    Plugin Description:
    Allows players to jump again while airborne from a previous jump.
    Old 08-10-2009 , 08:50   Double Jump
    Reply With Quote #1

    Code:
    /*
     * Double Jump
     *
     * Description:
     *  Allows players to double-jump
     *  Original idea: NcB_Sav
     *
     * Convars:
     *  sm_doublejump_enabled [bool] : Enables or disable double-jumping. Default: 1
     *  sm_doublejump_boost [amount] : Amount to boost the player. Default: 250
     *  sm_doublejump_max [jumps]    : Maximum number of re-jumps while airborne. Default: 1
     *
     * Changelog:
     *  v1.0.1
     *   Minor code optimization.
     *  v1.0.0
     *   Initial release.
     *
     * Known issues:
     *  Doesn't register all mouse-wheel triggered +jumps
     *
     * Todo:
     *  Employ upcoming OnPlayerRunCmd function to remove excess OnGameFrame-age.
     *
     * Contact:
     *  Paegus: paegus(at)gmail(dot)com
     *  SourceMod: http://www.sourcemod.net
     *  NcB_Sav: http://forums.alliedmods.net/showthread.php?t=99228
     */
    Original Thread
    Attached Files
    File Type: sp Get Plugin or Get Source (sm_doublejump.sp - 12333 views - 4.6 KB)
    __________________
    Live and learn or die and teach by example.
    Plugins Mine | Hidden:SourceMod

    Last edited by paegus; 08-12-2009 at 05:00.
    paegus is offline
    almcaeobtac
    Senior Member
    Join Date: Nov 2008
    Location: Florida
    Old 08-10-2009 , 13:04   Re: Double Jump
    Reply With Quote #2

    Where is it?
    __________________
    almcaeobtac is offline
    Doc-Holiday
    SourceMod Donor
    Join Date: Jul 2007
    Old 08-10-2009 , 14:34   Re: Double Jump
    Reply With Quote #3

    Kind of assanying since i asked if you would mind if i release my version with your teleport fucntion....

    Thanks though for putting it out there now i can link to it on my surviovr mod
    __________________
    Doc-Holiday is offline
    retsam
    Veteran Member
    Join Date: Aug 2008
    Location: so-cal
    Old 08-10-2009 , 14:39   Re: Double Jump
    Reply With Quote #4

    Yeah bud, you kinda forgot to attach the plugin.
    retsam is offline
    paegus
    Senior Member
    Join Date: Nov 2004
    Location: Extreme low earth orbit
    Old 08-10-2009 , 14:47   Re: Double Jump
    Reply With Quote #5

    oops

    Quote:
    Originally Posted by NcB_Sav View Post
    Kind of assanying since i asked if you would mind if i release my version with your teleport fucntion....

    Thanks though for putting it out there now i can link to it on my surviovr mod
    sorry... wasn't thinking. thought you were working on a combo plugin as oppose to this specifically. if you want i'll take it down since it's essentially your idea.
    __________________
    Live and learn or die and teach by example.
    Plugins Mine | Hidden:SourceMod
    paegus is offline
    almcaeobtac
    Senior Member
    Join Date: Nov 2008
    Location: Florida
    Old 08-10-2009 , 15:17   Re: Double Jump
    Reply With Quote #6

    Can't wait to try it
    __________________
    almcaeobtac is offline
    Doc-Holiday
    SourceMod Donor
    Join Date: Jul 2007
    Old 08-10-2009 , 15:19   Re: Double Jump
    Reply With Quote #7

    naw man its all good its already up i dont mind just add me for th idea

    Used it mainly on my bones server *survivor mod*


    Like this more then hook
    __________________
    Doc-Holiday is offline
    bl4nk
    SourceMod Developer
    Join Date: Jul 2007
    Old 08-10-2009 , 16:18   Re: Double Jump
    Reply With Quote #8

    Once 1.3 lands, you could rewrite this to use OnPlayerRunCmd, making it so you're not having to constantly check every player inside of OnGameFrame.
    bl4nk is offline
    Doc-Holiday
    SourceMod Donor
    Join Date: Jul 2007
    Old 08-10-2009 , 16:59   Re: Double Jump
    Reply With Quote #9

    Quote:
    Originally Posted by bl4nk View Post
    Once 1.3 lands, you could rewrite this to use OnPlayerRunCmd, making it so you're not having to constantly check every player inside of OnGameFrame.

    That i will no know how to do heheh
    __________________
    Doc-Holiday is offline
    paegus
    Senior Member
    Join Date: Nov 2004
    Location: Extreme low earth orbit
    Old 08-10-2009 , 17:48   Re: Double Jump
    Reply With Quote #10

    Quote:
    Originally Posted by bl4nk View Post
    Once 1.3 lands, you could rewrite this to use OnPlayerRunCmd, making it so you're not having to constantly check every player inside of OnGameFrame.
    is there a similar function (OnPlayerStateChange?) to catch flag changes for say FL_ONGROUND?

    otherwise there would need to be a scan to find when that state changes to catch the 1st jump. even if OnPlayerRunCmd() fires before the player's flags change you still need to detect the landing again to reset the jump count properly.
    __________________
    Live and learn or die and teach by example.
    Plugins Mine | Hidden:SourceMod

    Last edited by paegus; 08-10-2009 at 17:58.
    paegus 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 21:27.


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