AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hook Orpheu Respawn (https://forums.alliedmods.net/showthread.php?t=226053)

colossus 09-13-2013 01:49

Hook Orpheu Respawn
 
This code only job in the new round.

How could I use this code using a command to revive any player?

This code only works for me when new round, but not when I use for example hookea pev_deadflag ...

I would like to know how hookear to revive at any time of the round ...

Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <orpheu> #include <orpheu_stocks> #define PLUGIN "New Plug-In" #define VERSION "1.0" #define AUTHOR "colossus" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         // Add your code here...     OrpheuRegisterHook(OrpheuGetFunctionFromClass("player","Spawn","CBasePlayer"), "CBasePlayer_Spawn") } public CBasePlayer_Spawn(id) {     }

Arkshine 09-13-2013 07:56

Re: Hook Orpheu Respawn
 
You don't need Orpheu. Just hook Ham_Spawn.

simanovich 09-13-2013 08:20

Re: Hook Orpheu Respawn
 
Quote:

Originally Posted by Arkshine (Post 2033686)
You don't need Orpheu. Just hook Ham_Spawn.

+1
Hamsandwich module is the best for hooking any entity spawn (include players).

colossus 09-13-2013 12:40

Re: Hook Orpheu Respawn
 
Okey.

I heard that it is better to hook Orpheu functions.

dark_style 09-13-2013 12:44

Re: Hook Orpheu Respawn
 
My deleted post was "Do you really need orpheu for this" but decided to delete it because you may have understood it as a spam. Orpheu is a cool module, it really gives more "power" to the coders but it isn't really needed to use it for such easy things, it will only make your work harder.

Arkshine 09-13-2013 12:47

Re: Hook Orpheu Respawn
 
Don't use virtual functions with Orpheu. Ham method is more direct and thus slightly efficient. Also, it's more convenient/simple to use Ham as all is already configured.

Use Orpheu when you can't do something with others modules.

colossus 09-13-2013 14:42

Re: Hook Orpheu Respawn
 
Woow okay. Thank you. Later I will make a thread with questions about a Orpheu code, thanks.


All times are GMT -4. The time now is 18:56.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.