Raised This Month: $51 Target: $400
 12% 

Orpheu: Engine PM Functions


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Lt.RAT
Member
Join Date: Sep 2008
Location: Russia Yekaterinburg
Old 05-07-2010 , 13:16   Re: Orpheu: Engine PM Functions
Reply With Quote #11

Need to block any player "key" movement, but save movetype_walk, did test plugin, and wonder why it`s not working

PHP Code:
#include <amxmodx> 
#include <fakemeta> 

#include <orpheu> 
#include <orpheu_memory> 
#include <orpheu_advanced> 

public plugin_init() 

    
register_plugin("cmd_test""0.1""Lt.RAT"
     
    
OrpheuRegisterHook(OrpheuGetFunction("PM_Move"),"OnPM_move"); 


public 
OnPM_move(move,server

//    new id = OrpheuGetParamStructMember( 1 , "player_index" ) + 1; 

    
new OrpheuStruct:cmd OrpheuStruct:OrpheuGetParamStructMember"cmd" ); 

    
//set_uc(_:cmd, UC_Msec, 2); //working (like plugin slow-mo) 

    
static Float:d0,Float:d1,Float:d2
    
d0 OrpheuGetStructMember(cmd"forwardmove"); //ret correct value 
    
d1 OrpheuGetStructMember(cmd"sidemove"); //ret correct value 
    
d2 OrpheuGetStructMember(cmd"upmove"); //ret correct value 

    
set_uc(_:cmdUC_ForwardMove0); //not working 
    
set_uc(_:cmdUC_SideMove0); //not working 
    
set_uc(_:cmdUC_UpMove0); //not working 

    
OrpheuSetStructMember(cmd"forwardmove"0); //not working 
    
OrpheuSetStructMember(cmd"sidemove"0); //not working 
    
OrpheuSetStructMember(cmd"upmove"0); //not working 
    
OrpheuSetStructMember(cmd"buttons"0); //not working 

"not working" means no effect in PM_Move and other PM_ functions (you can run in any direction you want).

ADD:
Right, it works Something happened and before full server restart it wont work

Shooting and punchangle calculated with cmd from DLLFunc_CmdStart as i know.

Last edited by Lt.RAT; 05-07-2010 at 16:34.
Lt.RAT is offline
Send a message via ICQ to Lt.RAT
 



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 18:28.


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