Raised This Month: $32 Target: $400
 8% 

Simple Knife Speed*Updated*


Post New Thread Reply   
 
Thread Tools Display Modes
Plugin Info:     Modification:   ALL        Category:   Admin Commands       
dissonantallure
Member
Join Date: Apr 2008
Old 05-04-2008 , 17:41   Simple Knife Speed*Updated*
Reply With Quote #1

Description:
Simple knife speed plugin that allows players faster running speed with a knife.

Cvars:
knife_speed "420"(default)

Modules:
fakemeta

Additional info:
I realize there are other speed plugins already but this version has a lot of bug fixes in it. This version has fixed freeze time, walking sounds, and knife kill bugs. No more pressing "q" every time after a knife kill(including in Gungame). Tested with amxmodx 1.8.0, Condition Zero.


Known Bugs:
suggestions?

To DO:

Get Approved!

Credits:
Thanks to v3x, styles, & atomen

Updates:
-1 compilation warning- FIXED
-Fix the "head start" bug-FIXED

Feel free to help me out with anything you see wrong with this plugin as I am a beginner. This code should work 100% bug free test it out and give me some feedback!
Attached Files
File Type: sma Get Plugin or Get Source (kspeed.sma - 3007 views - 3.1 KB)

Last edited by dissonantallure; 05-15-2008 at 04:34.
dissonantallure is offline
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 05-04-2008 , 18:08   Re: Simple Knife Speed
Reply With Quote #2

I'm 95% sure this has been made already and it's a much more advanced version and has more features.

I know its out there.

Last edited by BOYSplayCS; 05-04-2008 at 18:14.
BOYSplayCS is offline
dissonantallure
Member
Join Date: Apr 2008
Old 05-04-2008 , 18:16   Re: Simple Knife Speed
Reply With Quote #3

Yes I have seen many speed plugins but all that I found had the bugs that i mentioned above. Mine is the first that i have seen that is bug free. Excluding the Known Bugs: mentioned above. However I could be wrong so please post a link of a better version if you find one. Also, if anyone requests that i add more features, awp_speed, c4_speed, speed_glow ect... Id be happy to add them.
dissonantallure is offline
BOYSplayCS
BANNED
Join Date: Apr 2008
Location: Gainesville, FL
Old 05-04-2008 , 18:18   Re: Simple Knife Speed
Reply With Quote #4

If you add the features you just suggested this will most certainly get unapproved due to the fact that it will be completely redundant.

Also, are you going to come up with a solution to solve your bug?

Still a good plugin though.,
BOYSplayCS is offline
dissonantallure
Member
Join Date: Apr 2008
Old 05-04-2008 , 18:24   Re: Simple Knife Speed
Reply With Quote #5

I'm looking into a fix but like I said I am a beginner and I have a busy schedule. I do know that all the other speed plugins I found have the same "head start" bug as me. As well as several others. I am going to look into how regular freeze time works and then try to apply it into my code.
dissonantallure is offline
Old 05-04-2008, 18:34
Styles
This message has been deleted by Styles. Reason: nvm
MPNumB
Veteran Member
Join Date: Feb 2007
Location: Lithuania
Old 05-04-2008 , 18:47   Re: Simple Knife Speed
Reply With Quote #6

Is't it much more easier to make it like this:
PHP Code:
#include <amxmodx>
#include <fakemeta>

#define PLUGIN_NAME "Knife Speed"
#define PLUGIN_VERSION "1.0"
#define PLUGIN_AUTHOR "Author..."

new g_iCvarP_knife_speed;
new 
g_iCvarP_sv_maxspeed;
new 
g_iCvarP_sv_maxvelocity;

public 
plugin_init()
{
    
register_plugin(PLUGIN_NAMEPLUGIN_VERSIONPLUGIN_AUTHOR);
    
    
g_iCvarP_knife_speed    register_cvar("knife_speed""270.0");
    
g_iCvarP_sv_maxspeed    get_cvar_pointer("sv_maxspeed");
    
g_iCvarP_sv_maxvelocity get_cvar_pointer("sv_maxvelocity");
    
    
register_forward(FM_SetClientMaxspeed"FM_SetClientMaxspeed_Post"1);
}

public 
FM_SetClientMaxspeed_Post(idFloat:speed)
{
    if( 
speed==250.0 )
    {
        if( 
is_user_alive(id) )
        {
            static 
s_iTemp;
            if( 
get_user_weapon(ids_iTemps_iTemp)==CSW_KNIFE )
                
engfunc(EngFunc_SetClientMaxspeedidfloatclamp(get_pcvar_float(g_iCvarP_knife_speed), 0.0get_max_allowed_speed()));
        }
    }
}

Float:get_max_allowed_speed()
    return 
floatmax(get_pcvar_float(g_iCvarP_sv_maxspeed), get_max_allowed_velocity());

Float:get_max_allowed_velocity()
    return 
floatmin(get_pcvar_float(g_iCvarP_sv_maxvelocity), 0.0); 
Will have no bugs and will work perfectly (I think). =)
__________________
Skill and no annoying bugs with fixed balance issues is my goal!
My approved plugins what don't show up in Approved List:
* Bomb/Death/CSS Radar
* HotVision
___
Need help? Please check this documentation first.

Last edited by MPNumB; 05-05-2008 at 06:06.
MPNumB is offline
Send a message via Skype™ to MPNumB
dissonantallure
Member
Join Date: Apr 2008
Old 05-04-2008 , 19:06   Re: Simple Knife Speed
Reply With Quote #7

Thanks for the feedback!
Quote:
Originally Posted by MPNumB View Post
Is't it much more easier to make it like this:
As you may have read I am a beginner. So I was unable incorporate your code into mine. Maybe you can give me a little more help? Thanks!
dissonantallure is offline
MPNumB
Veteran Member
Join Date: Feb 2007
Location: Lithuania
Old 05-04-2008 , 19:09   Re: Simple Knife Speed
Reply With Quote #8

My code is a complite plugin - only with not selected author name. =)
__________________
Skill and no annoying bugs with fixed balance issues is my goal!
My approved plugins what don't show up in Approved List:
* Bomb/Death/CSS Radar
* HotVision
___
Need help? Please check this documentation first.
MPNumB is offline
Send a message via Skype™ to MPNumB
dissonantallure
Member
Join Date: Apr 2008
Old 05-04-2008 , 19:33   Re: Simple Knife Speed
Reply With Quote #9

Your plugin does not seem to work for me. I dont think my code needs to be rewritten. I dont know what qualifies code to be rewritten but if its functionality than my code should be fine. If any of you more advanced coders want to help maybe you can help with my compilation warning or my "head start" bug any ideas?

Last edited by dissonantallure; 05-08-2008 at 16:42.
dissonantallure is offline
spawn4071
Junior Member
Join Date: Aug 2007
Old 05-05-2008 , 08:47   Re: Simple Knife Speed
Reply With Quote #10

If to activate a command ' knife_speed ' and it will be switched back on slot1
That speed does not come back back!!!Why???

Last edited by spawn4071; 05-05-2008 at 08:49.
spawn4071 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 20:50.


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