Raised This Month: $51 Target: $400
 12% 

Solved HAM hook grenade throwing


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Natsheh
Veteran Member
Join Date: Sep 2012
Old 10-26-2019 , 13:16   HAM hook grenade throwing
Reply With Quote #1

Is there anyway in ham module could detect grenade throwing I tried ham_spawn and entity grenade but it's too early for the checks..
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 10-31-2019 at 16:46.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 10-31-2019 , 13:09   Re: HAM hook grenade throwing
Reply With Quote #2

FM_SetModel.
__________________








CrazY. is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 10-31-2019 , 16:45   Re: HAM hook grenade throwing
Reply With Quote #3

i can see you're not familiar with the caption >> Ham module << or atleast better way to hook grenade throw, i think best way will be using register_message and hooking the fire in the hole thing.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-31-2019 , 18:25   Re: HAM hook grenade throwing
Reply With Quote #4

Why not use grenade_throw() in cstrike module?

Edit: I thought it was more intelligent, but it's just using SetModel
Code:
void SetModel_Post(edict_t *e, const char *m){

	if ( !isModuleActive() )
	{
		RETURN_META(MRES_IGNORED);
	}

	if ( e->v.owner && m[7]=='w' && m[8]=='_' ){
		int w_id = 0;
		CPlayer *pPlayer = GET_PLAYER_POINTER(e->v.owner);
		switch(m[9]){
		case 'h':
			w_id = CSW_HEGRENADE;
			g_grenades.put(e, 2.0, 4, pPlayer);
			pPlayer->saveShot(CSW_HEGRENADE);
			break;
		case 'f':
			if (m[10]=='l') w_id = CSW_FLASHBANG;
			break;
		case 's':
			if (m[10]=='m') w_id = CSW_SMOKEGRENADE;
			break;
		}
		if ( w_id )	
			MF_ExecuteForward( iFGrenade, static_cast<cell>(pPlayer->index), 
			static_cast<cell>(ENTINDEX(e)), static_cast<cell>(w_id));
	}

	RETURN_META(MRES_IGNORED);
}
__________________

Last edited by Bugsy; 10-31-2019 at 18:29.
Bugsy is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 10-31-2019 , 18:29   Re: HAM hook grenade throwing
Reply With Quote #5

Because I want to be able to disable the forward call
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !

Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
E1_531G
Senior Member
Join Date: Dec 2017
Old 10-31-2019 , 20:11   Re: HAM hook grenade throwing
Reply With Quote #6

Quote:
Originally Posted by Natsheh View Post
Because I want to be able to disable the forward call
You can disable FM_SetModel.
__________________
My English is A0
E1_531G is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 10-31-2019 , 22:47   Re: HAM hook grenade throwing
Reply With Quote #7

Yeah, what are you trying to block exactly, the throw or the set model?
__________________
Bugsy is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-01-2019 , 03:22   Re: HAM hook grenade throwing
Reply With Quote #8

Quote:
Originally Posted by Natsheh View Post
Because I want to be able to disable the forward call
You mean block the grenade from being thrown?
__________________
HamletEagle is offline
LearninG
Senior Member
Join Date: Apr 2019
Location: Iran
Old 11-01-2019 , 03:26   Re: HAM hook grenade throwing
Reply With Quote #9

he meant to use DisableHamForward() , i think.
LearninG is offline
RaZ_HU
Senior Member
Join Date: May 2015
Location: Hungary
Old 11-01-2019 , 04:28   Re: HAM hook grenade throwing
Reply With Quote #10

Check this one, could be useful.
RaZ_HU 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 07:19.


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