Raised This Month: $ Target: $400
 0% 

Why didn't work ?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Kiske
Veteran Member
Join Date: May 2009
Old 06-22-2012 , 23:38   Re: Why didn't work ?
Reply With Quote #9

Only block IN_DUCK, but IN_JUMP didn't work.
PHP Code:
#include <orpheu>
#include <orpheu_stocks>

new OrpheuStruct:g_ppmove;

OrpheuRegisterHook(OrpheuGetDLLFunction("pfnPM_Move""PM_Move"), "PM_Move");
OrpheuRegisterHook(OrpheuGetFunction("PM_Jump"), "PM_Jump");
OrpheuRegisterHook(OrpheuGetFunction("PM_Duck"), "PM_Duck");

public 
PM_Move(OrpheuStruct:ppmoveserver)
    
g_ppmove ppmove;

public 
PM_Duck()
{
    new 
id OrpheuGetStructMember(g_ppmove"player_index") + 1;
    
    if(
is_user_alive(id) && g_charm[id] && g_charm_nil[id])
    {
        new 
OrpheuStruct:cmd OrpheuStruct:OrpheuGetStructMember(g_ppmove"cmd");
        
OrpheuSetStructMember(cmd"buttons"OrpheuGetStructMember(cmd"buttons" ) & ~IN_DUCK);
    }
}

public 
PM_Jump()
{
    new 
id OrpheuGetStructMember(g_ppmove"player_index") + 1;
    
    if(
is_user_alive(id) && g_charm[id] && g_charm_nil[id])
    {
        new 
OrpheuStruct:cmd OrpheuStruct:OrpheuGetStructMember(g_ppmove"cmd");
        
OrpheuSetStructMember(cmd"buttons"OrpheuGetStructMember(cmd"buttons" ) & ~IN_JUMP);
    }

How do i block the movements ?
+forward
+back
+moveleft
+moveright
+left
+right


Thanks in advanced!

Last edited by Kiske; 06-22-2012 at 23:38.
Kiske is offline
Send a message via Skype™ to Kiske
 



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 06:19.


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