Raised This Month: $ Target: $400
 0% 

clcmd, and keypress.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Rolnaaba
Veteran Member
Join Date: May 2006
Old 07-13-2007 , 13:46   Re: clcmd, and keypress.
Reply With Quote #1

1) client_prethink is a forward (engine?) that is called before every frame.
2) IN_ATTACk is the ID of the button they are pressing, which is +attack.

fakemeta way:
Code:
#include <amxmodx> #include <fakemeta> //... register_forward(FM_PlayerPreThink, "fwdPlayerPreThink"); //... public fwdPlayerPreThink(ent) {     if(pev(id, pev_button) & IN_ATTACK) {         client_print(id, print_chat, "YOUR ATTACKING!!")     } }
__________________
DO NOT PM me about avp mod.
Rolnaaba is offline
draft
Senior Member
Join Date: Jul 2007
Location: Russia, Saint-Petersburg
Old 07-13-2007 , 14:21   Re: clcmd, and keypress.
Reply With Quote #2

Doesn't work. Compiles but i don't see "YOUR ATTACKING!!"

Last edited by draft; 07-13-2007 at 14:52.
draft is offline
hlstriker
Green Gaben
Join Date: Mar 2006
Location: OH-IO!
Old 07-13-2007 , 16:34   Re: clcmd, and keypress.
Reply With Quote #3

Quote:
Originally Posted by Rolnaaba View Post
fakemeta way:
Code:
#include <amxmodx> #include <fakemeta> //... register_forward(FM_PlayerPreThink, "fwdPlayerPreThink"); //... public fwdPlayerPreThink(ent) {     if(pev(id, pev_button) & IN_ATTACK) {         client_print(id, print_chat, "YOUR ATTACKING!!")     } }
You used...
public fwdPlayerPreThink(ent)

Should it not be...
public fwdPlayerPreThink(id)

Since you used id in the function ;D?
hlstriker 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 21:29.


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