Well guys I have silly question to ask about orpheu as I started playing with it nd i know the basics of orpheu concept but still some doubts are there .
Well suppose I want to block "chooseteam" command.
It can be done in 2 ways as following :
1. register_clcmd()
PHP Code:
register_clcmd( "chooseteam", "Hook_chooseteam")
public Hook_chooseteam(id)
return PLUGIN_HANDLED
2. Orpheu
PHP Code:
public plugin_init()
OrpheuRegisterHook( OrpheuGetFunction("HandleMenu_ChooseTeam"), "HandleMenuTeam" )
public HandleMenuTeam(id, menu_choose)
return OrpheuSupercede
PHP Code:
{
"name" : "HandleMenu_ChooseTeam",
"library" : "mod",
"arguments" :
[
{
"type" : "CBasePlayer *"
},
{
"type" : "int"
}
],
"identifiers":
[
{
"os" : "windows",
"mod" : "cstrike",
"value" : [0x83,0xEC,"*",0x8B,0x0D,"*","*","*","*",0x53,0x55,0x56,0x8B,0x74,0x24]
},
{
"os" : "linux",
"mod" : "cstrike",
"value" : "_Z21HandleMenu_ChooseTeamP11CBasePlayeri"
}
]
}
My question is which of the 2 ways will be faster?
As my prediction is that orpheu will be faster as it is directly hooking the function but still if any1 can guide me please.