Raised This Month: $ Target: $400
 0% 

How to register a bool variable to catch flashlight on


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Smatify
Senior Member
Join Date: Nov 2012
Location: Where ever you want
Old 06-09-2013 , 13:22   Re: How to register a bool variable to catch flashlight on
Reply With Quote #1

PHP Code:
public plugin_init()
{
    
register_impulse(100"your_function")
}

public 
your_function(id)
{    
    
client_cmd (id,"impulse 100"

__________________
Selling Hosting stuff such as Webspace and Game- & VoiceServer

I'm also selling Steam Keys.
For more informations, contact me.

(Homepage is under development)

Last edited by Smatify; 06-09-2013 at 13:24.
Smatify is offline
Moody92
Veteran Member
Join Date: May 2011
Location: Oman
Old 06-09-2013 , 13:25   Re: How to register a bool variable to catch flashlight on
Reply With Quote #2

Quote:
Originally Posted by Smatify View Post
PHP Code:
public plugin_init()
{
    
register_impulse(100"your_function")
}

public 
your_function()
{    
    
client_cmd (31,"impulse 100"

So this is going to close the flashlight once it's ON.

Thanks alot. but the thing is no such a thing called register_impulse..

EDIT: Nvm, didn't include engine

Last edited by Moody92; 06-09-2013 at 13:32.
Moody92 is offline
President
Member
Join Date: May 2013
Old 06-09-2013 , 13:29   Re: How to register a bool variable to catch flashlight on
Reply With Quote #3

Quote:
Originally Posted by Smatify View Post
PHP Code:
public plugin_init()
{
    
register_impulse(100"your_function")
}

public 
your_function(id)
{    
    
client_cmd (id,"impulse 100"

-->
PHP Code:
#include <amxmodx>
#include <engine>

public plugin_cfg() register_impulse(100"HookFlashlight");
public 
HookFlashlight(id) return PLUGIN_HANDLED

Last edited by President; 06-09-2013 at 13:31.
President is offline
Moody92
Veteran Member
Join Date: May 2011
Location: Oman
Old 06-09-2013 , 13:32   Re: How to register a bool variable to catch flashlight on
Reply With Quote #4

Quote:
Originally Posted by President View Post
-->
PHP Code:
#include <amxmodx>
#include <engine>

public plugin_cfg() register_impulse(100"HookFlashlight");
public 
HookFlashlight(id) return PLUGIN_HANDLED
I get it now. thanks
Moody92 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 16:21.


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