Raised This Month: $ Target: $400
 0% 

Orpheu PM_Move setting angles


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-14-2011 , 00:46   Orpheu PM_Move setting angles
Reply With Quote #1

Code:
#include < amxmodx > #include < orpheu > #include < orpheu_stocks > new Float:g_vecMoveAngles[ 3 ]; public plugin_init( ) {     new OrpheuFunction:funcPM_Move = OrpheuGetDLLFunction( "pfnPM_Move", "PM_Move" );     OrpheuRegisterHook( funcPM_Move, "OnPM_Move" );     OrpheuRegisterHook( funcPM_Move, "OnPM_Move_Post", OrpheuHookPost ); } public OnPM_Move( OrpheuStruct:ppmove, server ) {     OrpheuGetStructMember( ppmove, "angles", g_vecMoveAngles );     OrpheuSetStructMember( ppmove, "angles", Float:{ 0.0, 0.0, 0.0 } ); } public OnPM_Move_Post( OrpheuStruct:ppmove, server ) {     OrpheuSetStructMember( ppmove, "angles", g_vecMoveAngles ); }

The idea is to set angles to 0,0,0 so that the movement is always the same direction for each movement key.
For example, holding +forward key will always go the same direction regardless of player angles.
However, it isn't working.

There are no errors in parsing anything when Orpheu loads, and there are no errors in the plugin.
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 04-14-2011 , 18:15   Re: Orpheu PM_Move setting angles
Reply With Quote #2

Solved setting the forward/right/up vectors instead of the angles.

Code:
#include < amxmodx > #include < orpheu > #include < orpheu_stocks > new OrpheuStruct:g_ppmove; public plugin_init( ) {     OrpheuRegisterHook( OrpheuGetDLLFunction( "pfnPM_Move", "PM_Move" ), "OnPM_Move" );     OrpheuRegisterHook( OrpheuGetFunction( "PM_PlayerMove" ), "OnPM_PlayerMove" ); } public OnPM_Move( OrpheuStruct:ppmove, server ) {     g_ppmove = ppmove; } public OnPM_PlayerMove( ) {     OrpheuSetStructMember( g_ppmove, "forward", Float:{ 1.0, 0.0, 0.0 } );     OrpheuSetStructMember( g_ppmove, "right", Float:{ 0.0, -1.0, 0.0 } );     OrpheuSetStructMember( g_ppmove, "up", Float:{ 0.0, 0.0, 1.0 } ); }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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:13.


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