Raised This Month: $ Target: $400
 0% 

[TUT] Custom Weapon Hud Sprites + Slot Redirection


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 08-27-2018 , 12:33   Re: [TUT] Custom Weapon Hud Sprites + Slot Redirection
Reply With Quote #32

Quote:
Originally Posted by ElijahDD View Post
Do you know any plugin where I can see granade throw logic?
Look at this thread: https://forums.alliedmods.net/showthread.php?t=270408, especially https://forums.alliedmods.net/showpo...7&postcount=55
You don't have to use okapi if you don't want to. Instead of calling CGrenade_ShootTimed2/CGrenade_ShootTimed/CGrenade_ShootSmokeGrenade you can create a fake grenade entity, set it's origin(vecSrc) and velocity(vecThrow) and then recode the explosion effects/damage, but this is not very smart/efficient.
Another way would be to simply recode CGrenade_ShootTimed2 in pawn(I assume you want to throw hegrenades), it's not hard, I did that before.

https://github.com/s1lentq/ReGameDLL...enade.cpp#L876
The only tricky part is this:
PHP Code:
pGrenade->SetTouch(&CGrenade::BounceTouch);
pGrenade->SetThink(&CGrenade::TumbleThink); 
But this can be done either with orpheu or doing what connor does here: https://forums.alliedmods.net/showthread.php?p=1920279 to retrieve BounceTouch and TumbleThink address. Then you simply set it to m_pfnThink and m_pfnTouch offsets(set_pdata_int).
__________________

Last edited by HamletEagle; 08-27-2018 at 12:34.
HamletEagle is offline
 



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 21:22.


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