Raised This Month: $ Target: $400
 0% 

[SOLVED]set_user_maxspeed


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 06-15-2009 , 11:21   Re: set_user_maxspeed
Reply With Quote #7

Quote:
Originally Posted by hleV View Post
Code:
#include <amxmodx> #include <fakemeta>   #define XXX_SPEED 320.0   public plugin_init()         register_forward(FM_CmdStart, "fwdCmdStart");   public fwdCmdStart(iCl, iHandle) {         if (get_uc(iHandle, UC_Buttons) & IN_ATTACK)                 set_pev(iCl, pev_maxspeed, XXX_SPEED);         else                 set_pev(iCl, pev_maxspeed, 250.0); }
Do you really have to check what speed client currently has so you could add some more? IMO it's OK just to set default XXX_SPEED.
Some weapons have different maxspeeds [awp/auto-snipe=210, M249=220, pistols/knife/...=250] so you should cache the current weapons maxspeed at CurWeapon so it can be set appropriately instead of using 250 for everything. I just made this fix in my speed toggle plugin [not yet posted].
__________________

Last edited by Bugsy; 06-15-2009 at 11:26.
Bugsy is offline
 



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 13:56.


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