Create_named_entity()
I'm trying to create entites by calling CREATE_NAMED_ENTITY, due to the old story with dll optimizations and the hash list not being updated when creating an entity with amxx.
So, I managed to properly hook(orpheu config shows "FOUND") that function: Code:
I'm a bit confused because in IDA I see that this function has a singe param and that's an int, but the classname should be a string. Also the game code didn't solved my questions: Code:
|
Re: Create_named_entity()
It doesn't expect a string, but an integer, which is basically a kind of offset.
You have to call EngFunc_AllocString on the concerned string and use its return in CREATE_NAMED_ENTITY. To get a string from such kind of offset you can use EngFunc_SzFromIndex or glb_pStringBase. Note: on constants strings, game does such trick, code copied from HLDSK: Code:
// Use this instead of ALLOC_STRING on constant strings |
Re: Create_named_entity()
Oh, I was thinking about that because I saw it needs an integer but was too lazy to actually try it. Thx Arkshine, you save the day again.
|
| All times are GMT -4. The time now is 15:28. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.