Raised This Month: $ Target: $400
 0% 

[SOLVED] client_PreThink doesn't work?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Ywa*NL
Senior Member
Join Date: Apr 2005
Location: The Netherlands
Old 12-18-2006 , 11:03   [SOLVED] client_PreThink doesn't work?
Reply With Quote #1

Hello guys,

I've a problem with client_PreThink. When I aim at someone nothing happens. I have this code:

Code:
public client_PreThink(id) {         new player,body,name[256]         get_user_aiming(id,player,body)         if(is_user_alive(player) && is_user_alive(id) && !is_user_bot(id))         {             new health = get_user_health(player) // Get health             get_user_name(player,name,255) // Get player name             new weaponid = cs_get_weapon_id(player)             if (cs_get_user_team(player) == CS_TEAM_T)             { // Terrorist                 set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 6.0, 12.0)                 show_hudmessage(id, "%s - Team: Terrorist - Health: %i^nWeapon holding: %s",name,health,weaponid)             } else { // Counter-Terrorist                 set_hudmessage(0, 0, 255, -1.0, -1.0, 0, 6.0, 12.0)                 show_hudmessage(id, "%s - Team: Counter-Terrorist - Health: %i^nWeapon holding: %s",name,health,weaponid)             }         } }

Thanks in advance!
__________________

Last edited by Ywa*NL; 12-18-2006 at 14:50. Reason: Solved
Ywa*NL is offline
Send a message via MSN to Ywa*NL
Basic-Master
Veteran Member
Join Date: Apr 2005
Location: hello pm
Old 12-18-2006 , 11:49   Re: client_PreThink doesn't work?
Reply With Quote #2

did you include engine? and god, take these nasty news away, use static instead
Basic-Master is offline
Send a message via ICQ to Basic-Master Send a message via MSN to Basic-Master
Ywa*NL
Senior Member
Join Date: Apr 2005
Location: The Netherlands
Old 12-18-2006 , 11:55   Re: client_PreThink doesn't work?
Reply With Quote #3

No, changed it now but still doesn't work :S .
__________________
Ywa*NL is offline
Send a message via MSN to Ywa*NL
mateo10
Veteran Member
Join Date: Jan 2006
Old 12-18-2006 , 13:03   Re: client_PreThink doesn't work?
Reply With Quote #4

Include fakemeta instead and do:
plugin_init()
Code:
register_forward(FM_PlayerPreThink, "PreThink")
change client_PreThink to PreThink when you've done the steps above.
mateo10 is offline
Ywa*NL
Senior Member
Join Date: Apr 2005
Location: The Netherlands
Old 12-18-2006 , 14:20   Re: client_PreThink doesn't work?
Reply With Quote #5

It's still not working .

Edit
I don't know how but it works . Thanks guys!
__________________

Last edited by Ywa*NL; 12-18-2006 at 14:50.
Ywa*NL is offline
Send a message via MSN to Ywa*NL
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 07:00.


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