Raised This Month: $ Target: $400
 0% 

hook consol command to my plugin


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
tinlab
Member
Join Date: Oct 2006
Location: malaysia
Old 12-01-2006 , 23:32   hook consol command to my plugin
Reply With Quote #1

ok i need some help with this. i can some one please tell me how to hook the consol command to my code? i want to hook this
Code:
register_concmd("amx_setHE","function_called",ADMIN_ALL,"describe the command")
to my code which is this.
Code:
for( new j = 0 ; j < 10 ; ++j)
	{
		new iEntWeapon=create_entity( "info_target" ) ;

		entity_set_string( iEntWeapon, EV_SZ_classname, "weaponbox" );

		entity_set_int( iEntWeapon, EV_INT_movetype, MOVETYPE_FOLLOW );

		entity_set_int( iEntWeapon, EV_INT_solid, SOLID_NOT );

		entity_set_edict( iEntWeapon, EV_ENT_aiment, iEntOwner );

		entity_set_model( iEntWeapon, "models/p_hegrenade.mdl" );

	}
after i hook that i need to get something that connects the entities touch damage to the rest of the code.
Code:
plugin_init()
 
register_touch("my_ent" , "player","function_called_from");
 
public function_called_from()
{
	do 69.75
}
can anyone help me out here? +karma to the people that helps out!
__________________
TehCeaser - Two - Thee slashes then a stab? Or 2 stabs, or perhaps all slashes? You decide.
The Specialist -Be the first one to stab , then the 2nd stab comes easy
TehCeaser - What if you can't pull the first stab off o.O
The Specialist - Then you shoot him in the head .
TehCeaser - word
tinlab is offline
Send a message via AIM to tinlab Send a message via MSN to tinlab
 


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:49.


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