Raised This Month: $ Target: $400
 0% 

Making a window unbreakable...


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TiToTal
Member
Join Date: Feb 2006
Old 04-21-2006 , 00:52   Making a window unbreakable...
Reply With Quote #1

Is there a way to set just one window unbreakable with the entID?
If there is, could you please tell me how?
Thanks
TiToTal is offline
FatalisDK
Senior Member
Join Date: Mar 2006
Location: bacon
Old 04-21-2006 , 01:28  
Reply With Quote #2

Code:
DispatchKeyValue(Ent, "spawnflags", "1") // 1 = Trigger Only DispatchSpawn(Ent)
__________________
FatalisDK is offline
Batman/Gorlag
Senior Member
Join Date: Aug 2005
Old 04-21-2006 , 03:52  
Reply With Quote #3

Code:
set_pev(entid, pev_takedamage, 0.0)
If you use fakemeta.
Code:
entity_set_float(entid, EV_FL_takedamage, 0.0)
If you use engine.

I think that the entity's setting resets to its default after the end of a round, so you might want to set the window to be unbreakable, everytime a new round starts. So you might need to use this code:
Code:
register_logevent("set_unbreakable", 2, "0=World triggered", "1=Round_Start") public set_unbreakable() {    set_pev(entid, pev_takedamage, 0.0)  //Makes window unbreakable. }
__________________
GRR If only the amxmod programming were in Java.....
Java and C used to be two different languages, now Java is turning into another C. My logevent plugin
Batman/Gorlag is offline
FatalisDK
Senior Member
Join Date: Mar 2006
Location: bacon
Old 04-21-2006 , 04:00  
Reply With Quote #4

takedamage was the first thing I tried, and it didn't work. Also with my way it doesn't reset after new round.
__________________
FatalisDK is offline
TiToTal
Member
Join Date: Feb 2006
Old 04-21-2006 , 16:03  
Reply With Quote #5

I will try... thx =D

Should I put this piece of code in public client_putinserver ?
TiToTal is offline
FatalisDK
Senior Member
Join Date: Mar 2006
Location: bacon
Old 04-21-2006 , 16:37  
Reply With Quote #6

Put it in plugin_cfg() or plugin_init().
Also, ent id's change on mapchange.
__________________
FatalisDK is offline
Des12
Senior Member
Join Date: Jan 2005
Old 04-21-2006 , 22:10  
Reply With Quote #7

If a window respawns, will it still be invincible? I tried that once and if you did force_use on it, it would respawn as breakable.
__________________
-Dest Romano

www.JustRP.com
A TSRP Server

Quote:
Originally Posted by Brad
Don't you go be bringing reality into this.
Des12 is offline
Reply


Thread Tools
Display Modes

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 05:12.


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