Raised This Month: $ Target: $400
 0% 

Get client duck


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Toster v2.1
Senior Member
Join Date: Oct 2006
Location: Latvia, Riga
Old 06-08-2007 , 01:02   Get client duck
Reply With Quote #1

Why doesn't this work????

Code:
register_clcmd("+duck","doit")
register_clcmd("-duck","back")
__________________
I am 52% addicted to Counterstrike. What about you?
Toster v2.1 is offline
Send a message via Skype™ to Toster v2.1
djmd378
Senior Member
Join Date: Sep 2004
Old 06-08-2007 , 01:55   Re: Get client duck
Reply With Quote #2

It's because you can't catch those commands like that...

Code:
#include <amxmodx> #include <engine> public plugin_init() {     register_plugin("Catch Duck", "0.1", "MysticDeath.com") } public client_PreThink(id) {     new iButton = get_user_button(id)     if (iButton & IN_DUCK) {         // function here     } }
__________________
djmd378 is offline
Old 06-08-2007, 01:58
organizedKaoS
This message has been deleted by organizedKaoS.
Toster v2.1
Senior Member
Join Date: Oct 2006
Location: Latvia, Riga
Old 06-08-2007 , 02:05   Re: Get client duck
Reply With Quote #3

Thx!
__________________
I am 52% addicted to Counterstrike. What about you?
Toster v2.1 is offline
Send a message via Skype™ to Toster v2.1
kmal2t
BANNED
Join Date: Apr 2006
Old 06-08-2007 , 04:11   Re: Get client duck
Reply With Quote #4

I think you're supposed to put a return FMRES_HANDLED or whatnot at the end of an FM forward otherwise it returns errors in meta or something.
kmal2t is offline
Old 06-08-2007, 04:19
organizedKaoS
This message has been deleted by organizedKaoS.
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 06-08-2007 , 06:45   Re: Get client duck
Reply With Quote #5

Quote:
Originally Posted by kmal2t View Post
I think you're supposed to put a return FMRES_HANDLED or whatnot at the end of an FM forward otherwise it returns errors in meta or something.
Why would that return errors?
AFAIK there are no errors when you return nothing..0o

greetz regalis
__________________
regalis is offline
_Master_
Senior Member
Join Date: Dec 2006
Old 06-08-2007 , 08:27   Re: Get client duck
Reply With Quote #6

I would hook FM_CmdStart for "instant" detection.
_Master_ is offline
VEN
Veteran Member
Join Date: Jan 2005
Old 06-08-2007 , 12:33   Re: Get client duck
Reply With Quote #7

Button way are incorrect. For example you can be in duck even without any button. Correct way would be:
Quote:
if (pev(id, pev_flags) & FL_DUCKING)
VEN is offline
kmal2t
BANNED
Join Date: Apr 2006
Old 06-08-2007 , 17:32   Re: Get client duck
Reply With Quote #8

my bad, he doesn't have any other returns in there. nvmm
kmal2t 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 10:33.


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