Raised This Month: $32 Target: $400
 8% 

RegisterHookChain vs RegisterHam


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Vieni
Member
Join Date: Apr 2018
Old 07-03-2020 , 11:22   RegisterHookChain vs RegisterHam
Reply With Quote #1

My question is, which is the better to use? The RegisterHookChain of reapi or RegisterHam of hamsandwich?
Vieni is offline
alferd
Veteran Member
Join Date: Dec 2019
Location: Iran is Always Eternal
Old 07-03-2020 , 11:25   Re: RegisterHookChain vs RegisterHam
Reply With Quote #2

RegisterHam
__________________
Jailbreak AD 2.0

The greatest civilization of 🇮🇷IRAN🇮🇷
alferd is offline
Vieni
Member
Join Date: Apr 2018
Old 07-03-2020 , 11:26   Re: RegisterHookChain vs RegisterHam
Reply With Quote #3

Could you give me a reason, why?
Vieni is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 07-03-2020 , 12:02   Re: RegisterHookChain vs RegisterHam
Reply With Quote #4

If you're using ReHLDS stick with ReAPI other than that there're no difference.
__________________
@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
iceeedr
Veteran Member
Join Date: Apr 2017
Location: Brazil
Old 07-03-2020 , 12:17   Re: RegisterHookChain vs RegisterHam
Reply With Quote #5

Quote:
Originally Posted by alferd View Post
RegisterHam
Source: Voices from my head.
__________________


Quote:
Originally Posted by fysiks View Post
Please stop trying to help. You appear to just be posting random stuff. Wait until you actually understand more about AMX Mod X and how the game works.
https://iceeedr.com.br/
iceeedr is offline
Send a message via Skype™ to iceeedr
Vieni
Member
Join Date: Apr 2018
Old 07-03-2020 , 15:23   Re: RegisterHookChain vs RegisterHam
Reply With Quote #6

Quote:
Originally Posted by Natsheh View Post
If you're using ReHLDS stick with ReAPI other than that there're no difference.
Is it faster this way?
Vieni is offline
Shadows Adi
AlliedModders Donor
Join Date: Aug 2019
Location: Romania
Old 07-03-2020 , 15:37   Re: RegisterHookChain vs RegisterHam
Reply With Quote #7

Quote:
Originally Posted by Vieni View Post
Is it faster this way?
Theoretical, no. The function goes to reapi module first, then to metamod, and finally to engine, same with hamsandwich. I think in reAPI there are more functions and more optimized. But I will recommend you to use reAPI, because it's newer ) and gets updates.
__________________


Accepting Paid Requests, contact PM.

MVP Of The Round View project on GITHUB / AlliedModders
CSGO REMAKE ~ CSGO MOD [STABLE + SOURCE CODE]

Last edited by Shadows Adi; 07-03-2020 at 15:38.
Shadows Adi is offline
CrazY.
Veteran Member
Join Date: May 2015
Location: SP, Brazil
Old 07-03-2020 , 15:39   Re: RegisterHookChain vs RegisterHam
Reply With Quote #8

There are some functions you can hook with reapi but not with hamsandwich and vice-versa, so it's situational. That is the only difference.
The answer to your question is: use the one that fits what you are working on.
__________________









Last edited by CrazY.; 07-03-2020 at 15:40.
CrazY. is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 07-04-2020 , 00:20   Re: RegisterHookChain vs RegisterHam
Reply With Quote #9

Quote:
Originally Posted by Shadows Adi View Post
because it's newer
is never the correct answer to any question ever.
__________________

Last edited by fysiks; 07-04-2020 at 00:20.
fysiks is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 07-04-2020 , 02:45   Re: RegisterHookChain vs RegisterHam
Reply With Quote #10

Some of the posts in this topic are complete BS.
If you want your plugin to be usable by as many people are possible(if you want to post it here) then you should always use Ham when possible. Hamsandwich works in both regular hlds and rehlds.
If you start using reapi then you restrict your plugin to rehlds for no reason and no gain.

You really should not be thinking about speed when it comes to a line of code that's literally executed once per map. You should instead think about things that actually matter: how to design your plugin, writing your algorithms correctly and making them efficient, making sure there are no bugs etc.
Even if the internals workings of hamsandwich were slower than reapi this would not be a reason to switch to rehlds/regamedll and reapi. Speed is not everything, and if the speed difference is exteremely small is it worth losint all the other benefits for a 0.0001 ms gain in speed?
If one thing is slower than another it doesn't mean it is automatically bad. The important part is how slow. Is that part of the code performance critical?

Also, as fysiks said being newer means nothing. Usually the newer stuff is what you should be "afraid" of. Ham has been around for ages, it is tried and tested.
__________________

Last edited by HamletEagle; 07-04-2020 at 02:52.
HamletEagle is offline
Reply


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 11:18.


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