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

help ! [ l4d2 ] where is GetKeyState ?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
dabaicai
Junior Member
Join Date: May 2011
Old 07-04-2013 , 05:56   help ! [ l4d2 ] where is GetKeyState ?
Reply With Quote #1

how get a key's state ?
state: down , always down, up.

save me ! brothers...................
dabaicai is offline
spumer
Senior Member
Join Date: Aug 2011
Old 07-04-2013 , 08:40   Re: help ! [ l4d2 ] where is GetKeyState ?
Reply With Quote #2

You mean GetClientButtons() ?
GetClientButtons(client) & IN_LEFT etc...

Or OnPlayerRunCmd() ?

This two ways to get some buttons state.
__________________
spumer is offline
dabaicai
Junior Member
Join Date: May 2011
Old 07-05-2013 , 01:45   Re: help ! [ l4d2 ] where is GetKeyState ?
Reply With Quote #3

Quote:
Originally Posted by spumer View Post
You mean GetClientButtons() ?
GetClientButtons(client) & IN_LEFT etc...

Or OnPlayerRunCmd() ?

This two ways to get some buttons state.

can it get mouse's l_key or r_key state?

i don't need a button's name,
i need a button's state.

Last edited by dabaicai; 07-05-2013 at 03:24.
dabaicai is offline
Chaosxk
Veteran Member
Join Date: Aug 2010
Location: Westeros
Old 07-05-2013 , 03:25   Re: help ! [ l4d2 ] where is GetKeyState ?
Reply With Quote #4

IN_ATTACK for left, IN_ATTACK2 for right mouse click
__________________
Chaosxk is offline
spumer
Senior Member
Join Date: Aug 2011
Old 07-05-2013 , 03:30   Re: help ! [ l4d2 ] where is GetKeyState ?
Reply With Quote #5

dabaicai,
Quote:
if(GetClientButtons(client) & IN_LEFT) {
// Player push LEFT button
}
else {
// LEFT button not pushed
}
You can see this checks in Engine Fix plugin.
__________________

Last edited by spumer; 07-05-2013 at 03:31.
spumer is offline
dabaicai
Junior Member
Join Date: May 2011
Old 07-05-2013 , 09:18   Re: help ! [ l4d2 ] where is GetKeyState ?
Reply With Quote #6

3q,
if i bind "enter" "attack", the 'IN_ATTACK ' is 'enter' ? is 'mouse left' ?

i need know a key is pushed ? is pushing ? is up ? 3 state,


for example :

i= getkeystate(attack_key)

if i =0 then mouse_left(or bind's attack key) is nothing;
if i=1 then mouse_left is pushed; //and after it's up
if i= 2 then mouse_left is pushing; // not up
==================
i don't speak english ,so ,this :

Quelque boutons que cette fonction peu récupérer :
//IN_ATTACK2 // clique droit
//IN_ATTACK // clique gauche
//IN_RELOAD // recharger
//IN_SPEED // avancer
//IN_DUCK // s'accroupir
//IN_USE // touche utiliser

.......is not understand *~*!

Last edited by dabaicai; 07-05-2013 at 11:18.
dabaicai 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 13:05.


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