Raised This Month: $ Target: $400
 0% 

Respawn an entity?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-20-2008 , 07:11   Re: Respawn an entity?
Reply With Quote #4

Don't delete it.
Set pev_solid -> SOLID_NOT
Set pev_effects -> pev_effects | EF_NODRAW
Set pev_nextthink -> get_gametime() + time_you_want_to_respawn


Then you also have to hook FM_THINK

in the Think function, check if the entity is one of those you use in your plugin, then, check if pev_effects & EF_NODRAW
In that case :
Set pev_solid to what it was set before when the entity should trigger the Touch
Set pev_effects -> pev_effects & ~EF_NODRAW
Set pev_nextthink if you need to.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
 



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 09:14.


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