Raised This Month: $ Target: $400
 0% 

register_event prethink


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Silencer123
Veteran Member
Join Date: Jul 2006
Old 04-16-2007 , 09:52   register_event prethink
Reply With Quote #1

Whats the Event for a Client PreThink in register_event called?
Seriously, I cannot find it anywhere. -_-
And if I type "meta game" in game there is nothing with PreThink.
__________________
EAT YOUR VEGGIES
Silencer123 is offline
schnitzelmaker
Senior Member
Join Date: Apr 2006
Location: HERE
Old 04-16-2007 , 10:46   Re: register_event prethink
Reply With Quote #2

It dont exist an event.
__________________
schnitzelmaker is offline
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 04-16-2007 , 11:06   Re: register_event prethink
Reply With Quote #3

Code:
#include <fakemeta>

public Plugin_init()
{
  register_forward(FM_PlayerPreThink, "fm_playerthink", 1)
}

public fm_playerthink(id)
{
  // do your stuff...
  client_print(id, print_chat, "thinking...")
}
greetz regalis
__________________
regalis is offline
Silencer123
Veteran Member
Join Date: Jul 2006
Old 04-16-2007 , 14:58   Re: register_event prethink
Reply With Quote #4

O.o I am very sure there was one. Okay, for the case that there really is none (although I am sure I used it once and then got redirected to use fakemeta - I think it was something via engine - wasn't register_event in engine module before?) I need to know how to do this one throgh fakemeta:
http://www.amxmodx.org/funcwiki.php?go=func&id=398
I tried do find something in pev function but wasn't successful really.
__________________
EAT YOUR VEGGIES
Silencer123 is offline
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 04-16-2007 , 15:11   Re: register_event prethink
Reply With Quote #5

Maybe like this:
Code:
public plugin_init() {
    register_forward( FM_SetModel, "hook_SetModel_post", 1 )
}

public hook_SetModel_post( ent, const szMdl[] ){
 
    if( equali( szMdl, "models/w_grenade.mdl" ) )
    {
         // if HE_grenade do something
    }
}
greetz regalis
__________________
regalis is offline
Silencer123
Veteran Member
Join Date: Jul 2006
Old 04-16-2007 , 16:47   Re: register_event prethink
Reply With Quote #6

So the classname is HE_grenade ? But how would I find out whos grenade it is then?
__________________
EAT YOUR VEGGIES
Silencer123 is offline
Old 04-16-2007, 16:52
organizedKaoS
This message has been deleted by organizedKaoS.
Silencer123
Veteran Member
Join Date: Jul 2006
Old 04-16-2007 , 17:03   Re: register_event prethink
Reply With Quote #7

where can I get fakemeta_util?
Searching the forums gives me this thread as first search result. ^^"
__________________
EAT YOUR VEGGIES
Silencer123 is offline
[X]-RayCat
Senior Member
Join Date: Sep 2006
Old 04-16-2007 , 17:12   Re: register_event prethink
Reply With Quote #8

Quote:
Originally Posted by Silencer123 View Post
where can I get fakemeta_util?
Searching the forums gives me this thread as first search result. ^^"
Check module section sticky
[X]-RayCat is offline
Silencer123
Veteran Member
Join Date: Jul 2006
Old 04-16-2007 , 17:24   Re: register_event prethink
Reply With Quote #9

Cannot find anything there either.
__________________
EAT YOUR VEGGIES
Silencer123 is offline
regalis
Veteran Member
Join Date: Jan 2007
Location: F*cking Germany
Old 04-16-2007 , 17:47   Re: register_event prethink
Reply With Quote #10

there you go: http://forums.alliedmods.net/showthread.php?t=28284 ;)
__________________
regalis is offline
Reply


Thread Tools
Display Modes

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 06:41.


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