Raised This Month: $ Target: $400
 0% 

callfunc_begin vs Multiforward which is better?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Celena Luna
Veteran Member
Join Date: Aug 2013
Location: Nagazora
Old 05-26-2021 , 04:08   callfunc_begin vs Multiforward which is better?
Reply With Quote #1

I used MultiForward for my Weapon Menu System and notice some time it cause crash on server or really huge lag spike if a lot of player try to buy weapons at the same time.

I thought it was because of it have to go though 20+ plugins using that forward and executed too many time (3 execute per player in < 1 second + chance of 10+ players press buy and execute at short period of time)

So did some research and found callfunc_begin function which directly call function from specific plugins. With PluginID and FunctionID can be sent via "Weapon Register Native"(like ZP Class Register), in theory, it would be great for Weapon Menu System.

But still, it is my own assumption. I am not sure which one is better to use in this situation so I want to hear veteran opinion on this.

P/S: Some said that callfunc_begin is basically native so why not use native?
- Between replacing 2 parameters getting from Info Param of the menu item and have to create a .inc file, register_native, making a switch between menu item that lead to each native for each specific weapon? the first one definitely cleaner.
__________________
My plugin:
Celena Luna 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 02:35.


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