AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   knife speed plugin (https://forums.alliedmods.net/showthread.php?t=19901)

kirDave 10-27-2005 23:47

knife speed plugin
 
can someone tell me what to change in this to make it work with only the knife? Please dont flame me if I am requesting in the wrong area.


Quote:

#include <amxmodx>
#include <fun>

#define PLUGIN "Faster with knife"
#define VERSION "0.1"
#define AUTHOR "v3x"

#define MAX_SPEED 420.0

public plugin_init()
{
register_plugin(PLUGIN, VERSION, AUTHOR);
register_event("CurWeapon","Event_CurWeapon", "be","2=29");
}

public Event_CurWeapon( id )
{
set_user_maxspeed(id, MAX_SPEED);
}
Thanks

XxAvalanchexX 10-28-2005 00:09

As far as I can tell it should work with only the knife as it is.

kirDave 10-28-2005 00:13

when i compile that, and add it to my plugins.ini... no matter what weapon, the player runs faster.

without the plugin, everything is slowed again.

XxAvalanchexX 10-28-2005 00:39

Try this then.

Code:
#include <amxmodx>  #include <fun>  #define PLUGIN "Faster with knife"  #define VERSION "0.1"  #define AUTHOR "v3x"  #define MAX_SPEED 420.0  public plugin_init()  {     register_plugin(PLUGIN, VERSION, AUTHOR);     register_event("CurWeapon","Event_CurWeapon","b");  }  public Event_CurWeapon( id )  {     new clip, ammo, weapon = get_user_weapon(id,clip,ammo);     if(weapon == CSW_KNIFE)        set_user_maxspeed(id, MAX_SPEED);  }

kirDave 10-28-2005 01:35

thanks, that worked.

v3x 10-28-2005 07:25

I was a little skeptical about that.


All times are GMT -4. The time now is 23:44.

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