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

Force player to Duck


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 01-10-2015 , 05:50   Force player to Duck
Reply With Quote #1

I need to force the player to be always crouched.
here is my code, but it doesn't work:
PHP Code:
public Action:OnPlayerRunCmd(client, &buttons){

    
//buttons |= IN_DUCK; //disables duck
    
FakeClientCommand(client"+duck"); //spams console: Unknown command: +duck
    
    
return Plugin_Continue;

kadet.89 is offline
Send a message via Skype™ to kadet.89
blaacky
Senior Member
Join Date: Oct 2012
Old 01-10-2015 , 07:52   Re: Force player to Duck
Reply With Quote #2

This should work:

PHP Code:
public Action:OnPlayerRunCmd(client, &buttons, &impulseFloat:vel[3], Float:angles[3], &weapon)
{
    
buttons |= IN_DUCK;
    
    return 
Plugin_Changed;

EDIT: Fixed

Last edited by blaacky; 01-10-2015 at 10:04.
blaacky is offline
kadet.89
Veteran Member
Join Date: Nov 2012
Location: Serbia
Old 01-10-2015 , 15:21   Re: Force player to Duck
Reply With Quote #3

thanks, it works, but for other players he stands. I need that the player looks ducked for all the other players, even if he stands

Last edited by kadet.89; 01-10-2015 at 15:34.
kadet.89 is offline
Send a message via Skype™ to kadet.89
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 16:05.


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