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

how to use ProcessUserCmds


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
labelmaker
Member
Join Date: Mar 2009
Location: Kentucky USA
Old 03-13-2009 , 16:00   how to use ProcessUserCmds
Reply With Quote #1

how exactly do i use this and does it work for TF2

i want to disable firing for my freeze rune and it would be extra nice if i could stop the players animation as well.
labelmaker is offline
Send a message via Skype™ to labelmaker
MikeJS
Senior Member
Join Date: Nov 2008
Old 03-13-2009 , 16:13   Re: how to use ProcessUserCmds
Reply With Quote #2

DukeHacks
PHP Code:
public OnPluginStart() {
    
dhAddClientHook(CHK_PreThinkPreThinkHook);
}
public 
Action:PreThinkHook(client) {
    if(
frozen[client]) {
        new 
buttons GetEntProp(clientProp_Data"m_nButtons"buttons); 
        
buttons &= ~(IN_ATTACK);
        
SetEntProp(clientProp_Data"m_nButtons"buttons);
    }
    return 
Plugin_Continue;

Then look at sourcemod/scripting/funcommands/ice.sp for actually freezing someone.
__________________
MikeJS is offline
labelmaker
Member
Join Date: Mar 2009
Location: Kentucky USA
Old 03-13-2009 , 16:42   Re: how to use ProcessUserCmds
Reply With Quote #3

Quote:
Originally Posted by MikeJS View Post
Then look at sourcemod/scripting/funcommands/ice.sp for actually freezing someone.
Ive got that far already, but the funcommands does not remove weapon fire and disable player animation.

Thanks for the prethink snippit that should get me in the right direction as far as disabling the weapons.
labelmaker is offline
Send a message via Skype™ to labelmaker
labelmaker
Member
Join Date: Mar 2009
Location: Kentucky USA
Old 03-13-2009 , 17:44   Re: how to use ProcessUserCmds
Reply With Quote #4

Thanx that works great, now to work on turning the animations off for the client that is frozen and to stop the player from turning left and right and up and down.
labelmaker is offline
Send a message via Skype™ to labelmaker
MikeJS
Senior Member
Join Date: Nov 2008
Old 03-13-2009 , 18:25   Re: how to use ProcessUserCmds
Reply With Quote #5

For stopping them from looking around you'll probably need to reset their angles every frame, which won't look nice.
__________________
MikeJS is offline
labelmaker
Member
Join Date: Mar 2009
Location: Kentucky USA
Old 03-13-2009 , 20:02   Re: how to use ProcessUserCmds
Reply With Quote #6

Do you think theres a way to put the client in a third person view controlling the camera instead of the character possibly. I'm looking into one of these 3rd person mods and seeing what i can do.
labelmaker is offline
Send a message via Skype™ to labelmaker
SAMURAI16
BANNED
Join Date: Sep 2006
Old 03-14-2009 , 02:15   Re: how to use ProcessUserCmds
Reply With Quote #7

from my SDKTools_Util api (player sasmodel way)
Code:
stock UTIL_3dView(client, bool:set = true) {     if(set)     {         SetEntPropEnt(client,Prop_Send, "m_hObserverTarget", 0);         SetEntProp(client,Prop_Send, "m_iObserverMode",   1);         SetEntProp(client,Prop_Send, "m_bDrawViewmodel"0);         SetEntProp(client,Prop_Send, "m_iFOV",            120);     }         else     {         SetEntPropEnt(client,Prop_Send, "m_hObserverTarget", -1);         SetEntProp(client,Prop_Send, "m_iObserverMode",   0);         SetEntProp(client,Prop_Send, "m_bDrawViewmodel"1);         SetEntProp(client,Prop_Send, "m_iFOV",            90);     } }
SAMURAI16 is offline
Send a message via MSN to SAMURAI16
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 03:08.


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