How to hook SetModel using Orpheu
As the title says how do i hook setting entity model or FM_SetModel through Orpheu i tried searching for the signature in cs.so but I've failed.
|
Re: How to hook CBaseEntity SetModel using Orpheu
pfnSetModel is an engine function, not present in cs.so
Also, since this function is exported, you do not need a signature. You can check how it is done here(https://forums.alliedmods.net/showthread.php?t=259880) to hook pfnPrecache* and do the same for pfnSetModel. This is the info you need to build the proper file: https://github.com/alliedmodders/hls.../eiface.h#L111 |
Re: How to hook CBaseEntity SetModel using Orpheu
Thanks alot i didn't know it was an engine function, doesn't engine functions require signatures?
Edit : oh nvm, now i see it needs only function arguments and return definitions Code:
{ |
Re: How to hook CBaseEntity SetModel using Orpheu
Yes, they do not need signatures because they are exported for use. You only need the name(as stated in the link I sent you for eiface.h), arguments and return value.
|
Re: How to hook CBaseEntity SetModel using Orpheu
Quote:
|
Re: How to hook CBaseEntity SetModel using Orpheu
edict_s
|
Re: How to hook CBaseEntity SetModel using Orpheu
Quote:
|
Re: How to hook CBaseEntity SetModel using Orpheu
No difference. edict means entity dictionary, it contains data about entities that are networked to the client.
"s" means structure so "entity dictionary structure". This struct is defined here: https://github.com/alliedmodders/hls...ne/edict.h#L19 (think of it like "enum" in pawn). "t" in edict_t comes from "type". edict_t is an "alias" of "struct edict_s". https://github.com/dreamstalker/rehl...n/const.h#L786 In C, when you declare a structure and want to use it as a data type, you have to specify "struct struct_name" everywhere, which gets annoying. It is a common practice to define a type like "edict_t" which is a synonym of "struct edict_s". It is cleaner and shorter. tl;dr Code:
struct edict_s* my_var; |
Re: How to hook CBaseEntity SetModel using Orpheu
You're amazing thanks for the explanation.
|
| All times are GMT -4. The time now is 11:32. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.