Raised This Month: $ Target: $400
 0% 

Speed in duck


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-09-2016 , 12:55   Re: Speed in duck
Reply With Quote #8

Give this a try. I'm not sure if it is working perfectly, but it appears to from a client perspective. Hopefully someone with more orpheu experience will chime in.

Place the files in the attached archive in: amxmodx\configs\orpheu\functions
PHP Code:
#include <amxmodx>
#include <orpheu>
#include <orpheu_stocks>
#include <engine>

new const Version[] = "0.1";

new 
OrpheuStruct:g_ppmove

public plugin_init()
{       
    
register_plugin"Fast Duck" Version "bugsy" );
    
    
OrpheuRegisterHookOrpheuGetDLLFunction"pfnPM_Move" "PM_Move" ) , "PM_Move" );
    
OrpheuRegisterHookOrpheuGetFunction"PM_Duck" ) , "PM_Duck" );
}

public 
OrpheuHookReturn:PM_MoveOrpheuStruct:ppmove server )
{    
    
g_ppmove ppmove;
}

public 
OrpheuHookReturn:PM_Duck()
{
    
//If you need player id for anything
    //new id = OrpheuGetStructMember( g_ppmove , "player_index" ) + 1;
    
    
if ( OrpheuGetStructMemberg_ppmove "flags" ) & FL_DUCKING )
    {
        new 
iCmd OrpheuGetStructMemberg_ppmove "cmd" );
        
        
OrpheuSetStructMemberOrpheuStruct:iCmd "forwardmove" OrpheuGetStructMemberOrpheuStruct:iCmd "forwardmove" ) * 3.0 );
        
OrpheuSetStructMemberOrpheuStruct:iCmd "sidemove" OrpheuGetStructMemberOrpheuStruct:iCmd "sidemove" ) * 3.0 );
        
OrpheuSetStructMemberOrpheuStruct:iCmd "upmove" OrpheuGetStructMemberOrpheuStruct:iCmd "upmove" ) * 3.0 );
    }
    
    return 
OrpheuIgnored;

Attached Files
File Type: zip functions.zip (598 Bytes, 96 views)
__________________

Last edited by Bugsy; 01-09-2016 at 12:57.
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 09:30.


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