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

[TUT] Custom Weapon Hud Sprites + Slot Redirection


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ElijahDD
Junior Member
Join Date: Aug 2018
Old 08-27-2018 , 12:52   Re: [TUT] Custom Weapon Hud Sprites + Slot Redirection
Reply With Quote #33

Quote:
Originally Posted by HamletEagle View Post
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).
Thank you, i'll try
but, i replace m249 by my grenade(something like heal greneade), can i use it for throw my grenade, not flash, HE, smoke?
--
Another question (sorry for oftop), maybe u know method how to detect that player stop send packets to server?

Last edited by ElijahDD; 08-27-2018 at 12:59.
ElijahDD 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 11:39.


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