Orpheu & WeaponBox
Hi,
I'm trying to create a custom made entity, such as in fy_ maps, no, I'm not going with armoury_entity. I decided to use Orpheu and learn in the meantime, but after all I'm still a beginner with it. Why does this code give me an AK47? I'm trying to make it spawn an AK47 in my origin not give me it.. What am I missing? PHP Code:
|
Re: Orpheu & WeaponBox
I'm on phone so I can't properly check but maybe it's because you set it on player origin and touch is instantly triggered.
|
Re: Orpheu & WeaponBox
Quote:
I could swear it was giving me an AK47 before when I'd say /create now it does nothing, no errors :shock: I'll try again tomorrow, maybe I'm too tired |
Re: Orpheu & WeaponBox
Here you have a working code(you weren't far from the truth, just some small mistakes)
PHP Code:
PHP Code:
call_think works because m_pfnThink is set by the game with the address of CWeaponBox::Kill functions. If you remove the set_pdata_int and use call_think you will see it does nothing. So if you want to be able to properly remove the box you need to set m_pfnThink to the correct value. Now, what was wrong with your code? When you create the weapon_ak47 entity you never spawned it meaning this offsets were never set: https://github.com/s1lentq/ReGameDLL...pn_ak47.cpp#L5 You tried to do something, but it's wrong: PHP Code:
Now here: PHP Code:
|
Re: Orpheu & WeaponBox
Quote:
Basically I need to start using other sources such as ReGameDLL to see what actually happens with the entities that I work with. All is left for me to do now is add ammo for the weapons that I create by using PackAmmo function from Orpheu. All I'm struggling with is knowing signature's location, I'm still confused about whether a signature should go in functions, virtualFunctions, types, or memory. Is there any way without using the IDA? It's such a messy app. You mentioned to me Asherkin's vtable dumper but that's just for SourceMod files. |
Re: Orpheu & WeaponBox
Quote:
Quote:
Unfortunately you need to get used to working with IDA if you want to make signatures. The vtable dumper will only provide you with the offsets for the virtual functions. If it's not virtual you need to use IDA and create a signature. In virtualFunctions you put any function that's virtual. To properly understand what a virtual function is you would need knowledge of object oriented programming. Without that, what you can do is use the vtable dumper and see if you find a certain function. If you do, it's virtual. If you don't it's a regular function. Another way is to check RegameDLL in *.h files. For example if you want to know the virtual functions for CBasePlayer you would look in player.h https://github.com/s1lentq/ReGameDLL.../player.h#L329 inside CBasePlayer class. If it has "virtual" in front then it's virtual. For example: PHP Code:
PHP Code:
Don't bother with types and memory folders for now. |
Re: Orpheu & WeaponBox
Quote:
And that's a lot easier, I'm not thinking of making signatures at this time, there's plenty in the forum. So basically I get to know that CWeaponBox:Kill is a non-virtual function and requires a signature from this https://github.com/s1lentq/ReGameDLL...pons.cpp#L1583 Is every single game function inside these files? Does it mean I can find any function that I'm using and see whether it's virtual or not by using ReGameDLL? |
Re: Orpheu & WeaponBox
Quote:
Quote:
|
Re: Orpheu & WeaponBox
Quote:
PHP Code:
Doesn't being a virtual function mean being in orpheu/virtualFunctions ? |
Re: Orpheu & WeaponBox
Quote:
|
| All times are GMT -4. The time now is 12:39. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.