Change entity class | Orpheu
Hello. I was wondering,
1. Is it possible changing a player's class? Like if you aim at an entity and press "G" you'll become that entity. I've tried different methods but none worked, the idea came from Garry's Mod. 2. What can Orpheu be used for ? I just can't understand this module, it has weird this such as OrpheuHook, OrpheuFunction etc.. 3. Which is the best way to set player model ( Without using extra APIs such as Connor's ) ? Thank you. |
Re: Change entity class | Orpheu
1.What would be the purpose for that? It does not make sense.
2.Orpheu/okapi allows you to hook functions from game dlls(engine and mod dll), which can help you do awesome things. You can also play with memory and private data. Take for example hamsandwich, all it does is to hook some virtual functions from game. View orpheu as an extended hamsandwich, it does not limit you to some predefined functions like ham does. It gives you the power to hook and call almost all functions. The only thing that you need is a signature file so the module can identify the function. OrpheuRegisterHook is the same as RegisterHam, it registers a hook for a specific function. In order get the function based on the signature file, OrpheuGetFunction is used. For example, let's say you want to force a round end. The classic way is to kill all players, which is a poor and unreliable way. Game uses a function called CHalfLifeMultiplay::CheckWinConditions to determine when a round should end. If we have access to that function, we can call it and end the round. For that, one can use orpheu/okapi. |
Re: Change entity class | Orpheu
1. You might want to check this , it actually is pretty cool.
2. Wow, that sounds cool, can you provide an example on how to force round end? Thank you :) |
Re: Change entity class | Orpheu
1. Its not like AMXX.
2. https://forums.alliedmods.net/showthread.php?p=1122356 |
Re: Change entity class | Orpheu
2.It depends in which scenario, see Arkshine plugin for a way to do it properly. You have to create the conditions before calling the function. For example, if you want to end the round in a defuse map, you have to either set m_bTargetBombed(t will win) or m_bBombDefused(ct will win) offsets so the checks from the function are passed and the round will end. You can see the code in the mod source code(multiplay_gamerules.cpp file).
|
Re: Change entity class | Orpheu
Quote:
|
Re: Change entity class | Orpheu
@Hamlet Okay thanks, Orpheu looks more complicated compared to other modules.
@Prost Sorry my explanation was wrong, I want you to become the entity you see. |
Re: Change entity class | Orpheu
What PRoSToTeM@ said makes sense. You can make a stock for create a new entity.
PHP Code:
|
Re: Change entity class | Orpheu
@edon1337 yes it is very cool if you can change into something like Gmod.
|
Re: Change entity class | Orpheu
Quote:
Quote:
|
| All times are GMT -4. The time now is 20:50. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.