Raised This Month: $32 Target: $400
 8% 

Solved [H3LP] First Spawn


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DarthMan
Veteran Member
Join Date: Aug 2011
Old 04-25-2017 , 15:44   [H3LP] First Spawn
Reply With Quote #1

Hey. Is there any way to use Orpheu or any other way to hook first spawn of an entity? That's because with ham_Spawn it works only on the 2nd spawn. Thanks !

Last edited by DarthMan; 04-27-2017 at 08:14. Reason: Solved
DarthMan is offline
gabuch2
AlliedModders Donor
Join Date: Mar 2011
Location: Chile
Old 04-25-2017 , 16:06   Re: [H3LP] First Spawn
Reply With Quote #2

Which entity?
__________________
gabuch2 is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 04-25-2017 , 16:08   Re: [H3LP] First Spawn
Reply With Quote #3

Quote:
Originally Posted by Gabe Iggy View Post
Which entity?
func_breakable.
DarthMan is offline
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 04-25-2017 , 16:41   Re: [H3LP] First Spawn
Reply With Quote #4

Setup hook in precache.
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
hornet
AMX Mod X Plugin Approver
Join Date: Mar 2010
Location: Australia
Old 04-25-2017 , 16:46   Re: [H3LP] First Spawn
Reply With Quote #5

Your question would be better served if you explained what your trying to achieve.
__________________
Quote:
vBulletin Tip #42: Not much would be accomplished by merging this item with itself.
hornet is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 04-25-2017 , 16:47   Re: [H3LP] First Spawn
Reply With Quote #6

Quote:
Originally Posted by PRoSToTeM@ View Post
Setup hook in precache.
Is that going to fix it?
DarthMan is offline
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 04-25-2017 , 16:47   Re: [H3LP] First Spawn
Reply With Quote #7

Quote:
Originally Posted by DarthMan View Post
Is that going to fix it?
Yup.
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
DarthMan
Veteran Member
Join Date: Aug 2011
Old 04-25-2017 , 17:04   Re: [H3LP] First Spawn
Reply With Quote #8

Quote:
Originally Posted by PRoSToTeM@ View Post
Yup.
That didn't work, I am trying to set the func_breakable max health to equal the current health when they get spawned.
DarthMan is offline
DarthMan
Veteran Member
Join Date: Aug 2011
Old 04-25-2017 , 17:08   Re: [H3LP] First Spawn
Reply With Quote #9

Quote:
Originally Posted by PRoSToTeM@ View Post
Yup.
PHP Code:
new OrpheuFunction:Entity_Spawn OrpheuGetFunctionFromClass("func_breakable","Spawn""CBasePlayer"
OrpheuRegisterHook(Entity_Spawn,"Spawn"OrpheuHookPost
This in plugin_precache.

Last edited by DarthMan; 04-25-2017 at 17:15.
DarthMan is offline
PRoSToTeM@
Veteran Member
Join Date: Jan 2010
Location: Russia, Ivanovo
Old 04-25-2017 , 17:46   Re: [H3LP] First Spawn
Reply With Quote #10

Quote:
Originally Posted by DarthMan View Post
PHP Code:
new OrpheuFunction:Entity_Spawn OrpheuGetFunctionFromClass("func_breakable","Spawn""CBasePlayer"
OrpheuRegisterHook(Entity_Spawn,"Spawn"OrpheuHookPost
This in plugin_precache.
I meant ham hook.
__________________
PRoSToTeM@ is offline
Send a message via ICQ to PRoSToTeM@ Send a message via Skype™ to PRoSToTeM@
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:44.


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