Raised This Month: $ Target: $400
 0% 

Client_prethink - buttons


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Vertricus
Junior Member
Join Date: Aug 2009
Location: Poland>Śląs
Old 10-26-2009 , 19:05   Client_prethink - buttons
Reply With Quote #1

Can we detect which button's player press without use client_prethink?
If yes how?
Vertricus is offline
Send a message via Skype™ to Vertricus
minimiller
Veteran Member
Join Date: Aug 2007
Location: United Kingdom
Old 10-26-2009 , 19:09   Re: Client_prethink - buttons
Reply With Quote #2

which buttons do u need?
__________________
minimiller is offline
Send a message via MSN to minimiller
Xellath
Veteran Member
Join Date: Dec 2007
Location: Sweden
Old 10-26-2009 , 19:35   Re: Client_prethink - buttons
Reply With Quote #3

You could use FM_CmdStart and get_uc(), with UC_Buttons.

Example:

Code:
#include < amxmodx > #include < fakemeta > const IN_ALL = ( IN_JUMP | IN_DUCK | IN_ATTACK | IN_ATTACK2 | IN_USE | IN_RELOAD ); // You may add more public plugin_init( ) {     register_plugin( "CmdStart Example", "0.1.0", "Xellath" );         register_forward( FM_CmdStart, "Forward_CmdStart" ); } public Forward_CmdStart( iClient, ucHandle ) {     if ( !is_user_alive( iClient ) )         return;         new iButton = get_uc( ucHandle, UC_Buttons );     if ( iButton & IN_ALL )     {         client_print( iClient, print_chat, "You used a button!" );     } }
__________________
Achievements API - a simple way for you to create your OWN custom achievements!
Xellath is offline
Vertricus
Junior Member
Join Date: Aug 2009
Location: Poland>Śląs
Old 10-26-2009 , 19:22   Re: Client_prethink - buttons
Reply With Quote #4

Duck, Jump, Use, Reload, Attack2, Attack.
That's all ;)
Vertricus is offline
Send a message via Skype™ to Vertricus
Vertricus
Junior Member
Join Date: Aug 2009
Location: Poland>Śląs
Old 10-26-2009 , 20:00   Re: Client_prethink - buttons
Reply With Quote #5

Thanks a lot Tomorrow I'll test it
And one more question
Can I without prethink something like:
Quote:
(floatround(halflife_time())-time[id] >= 2.0)
Vertricus is offline
Send a message via Skype™ to Vertricus
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 10-26-2009 , 20:09   Re: Client_prethink - buttons
Reply With Quote #6

Why don't you want to use PreThink?
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Vertricus
Junior Member
Join Date: Aug 2009
Location: Poland>Śląs
Old 10-26-2009 , 20:22   Re: Client_prethink - buttons
Reply With Quote #7

Because I have a large piece of code in it and plugin which I'm using take a lot of "processor".
Vertricus is offline
Send a message via Skype™ to Vertricus
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 17:41.


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