This site is a testing version, but all data is shared with the live forum.


Raised This Month: $ Target: $400
 0% 

how to detect using func_tank


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Voi
Veteran Member
Join Date: Sep 2006
Location: Gdansk, Poland
Old 03-19-2011 , 19:17   how to detect using func_tank
Reply With Quote #1

Im asking for the most efficient(in cpu usage) way to detect client starting to use func_tank and stopping using it.
Metamod prints something like "start using tank" and "stopped using tank" on listen server.
__________________
Voi is offline
matsi
Thinkosaur
Join Date: Sep 2006
Old 03-19-2011 , 20:50   Re: how to detect using func_tank
Reply With Quote #2

Code:
#include <amxmodx> #include <hamsandwich> #define PLUGIN  "func_tank test" #define AUTHOR  "matsi" #define VERSION "1.0" public plugin_init() {     register_plugin( PLUGIN, VERSION, AUTHOR )     RegisterHam( Ham_Use, "func_tank", "UseTank" ); } public UseTank( this, idcaller, idactivator, use_type ) {     if( !use_type )     {         client_print( idactivator, print_center, "stopped using tank" );     }     else     {         client_print( idactivator, print_center, "started using tank" );     } }
Don't know about efficiency thought.

Last edited by matsi; 03-19-2011 at 21:02.
matsi is offline
Elusive138
Senior Member
Join Date: Dec 2010
Old 03-21-2011 , 00:11   Re: how to detect using func_tank
Reply With Quote #3

If you want to stop it, just return HAM_SUPERCEDE.
Elusive138 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 12:53.


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