Raised This Month: $ Target: $400
 0% 

Godmode an ent.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Minimum
Senior Member
Join Date: Jun 2006
Old 06-20-2006 , 21:58   Godmode an ent.
Reply With Quote #1

Ok, I have tried everything I have thought of to godmode an ent. It still doesn't work. A little help would be nice.

Code:
#include <amxmodx> #include <amxmisc> #include <engine> #include <fakemeta> #include <fun_stocks> #define PLUGIN "Meck V3B1 Cleanup" #define VERSION "1.0" #define AUTHOR "Minimum" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     set_task(5.0,"cleanup") } public cleanup() {     new ent = 0, entity = 0     while ((ent = find_ent_by_class(ent, "func_door"))) {         set_entity_flags(ent, FL_GODMODE, 1 );     }     while ((entity = find_ent_by_class(entity, "func_door_rotating"))) {         set_entity_flags(entity, FL_GODMODE, 1 );       }     set_entity_flags(120, FL_GODMODE, 1 );     server_print("Successfully Executed Cleanup.")     return PLUGIN_HANDLED }
Minimum is offline
Send a message via AIM to Minimum Send a message via MSN to Minimum
k007
BANNED
Join Date: Mar 2006
Location: bacon?
Old 06-20-2006 , 22:01  
Reply With Quote #2

what's the point of giving an ent godmode. the ent doesn't take damg.
could you explain?
k007 is offline
Send a message via MSN to k007
Minimum
Senior Member
Join Date: Jun 2006
Old 06-20-2006 , 22:03  
Reply With Quote #3

Ents DO take damage. The whole point of this plugin is to stop ents from being destroyed.
Minimum is offline
Send a message via AIM to Minimum Send a message via MSN to Minimum
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 06-20-2006 , 22:08  
Reply With Quote #4

Code:
entity_set_int(ent , EV_INT_flags , entity_get_int(ent , EV_INT_flags) | FL_GODMODE);
I believe that's what you want.
__________________
What am I doing these days? Well, I run my own Rust server. It's heavily modded. If you'd like to join, the ip is 167.114.101.67:28116

I also created a website called Rust Tools. It will calculate and tell you the raw amounts of resources needed to craft items.
v3x is offline
Minimum
Senior Member
Join Date: Jun 2006
Old 06-20-2006 , 22:08  
Reply With Quote #5

Hmmm... I will try it out.
Minimum is offline
Send a message via AIM to Minimum Send a message via MSN to Minimum
k007
BANNED
Join Date: Mar 2006
Location: bacon?
Old 06-20-2006 , 22:12  
Reply With Quote #6

Oh yeah there is some boxes take damg lol
k007 is offline
Send a message via MSN to k007
Spanky McNutnut
AMX Mod X Beta Tester
Join Date: Feb 2006
Old 06-20-2006 , 22:16  
Reply With Quote #7

Quote:
Originally Posted by k007
Oh yeah there is some boxes take damg lol
I suggest you just stop posting
Spanky McNutnut is offline
Trenith Tsurgi
Junior Member
Join Date: Jun 2006
Location: Lakeside
Old 06-20-2006 , 22:35  
Reply With Quote #8

Minimum, turn the safety back on, aha. I kind of died when Bubba shut the gunstore door on me.
Trenith Tsurgi is offline
Minimum
Senior Member
Join Date: Jun 2006
Old 06-20-2006 , 22:37  
Reply With Quote #9

Doors aren't godded. Could it be something else thats wrong with this? I breaking a func_door.

Code:
#include <amxmodx> #include <amxmisc> #include <engine> #include <fakemeta> #include <fun_stocks> #define PLUGIN "Meck V3B1 Cleanup" #define VERSION "1.0" #define AUTHOR "Minimum" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     set_task(5.0,"cleanup") } public cleanup() {     new ent = 0, entity = 0     while ((ent = find_ent_by_class(ent, "func_door"))) {         entity_set_int(ent , EV_INT_flags , entity_get_int(ent , EV_INT_flags) | FL_GODMODE);     }     while ((entity = find_ent_by_class(entity, "func_door_rotating"))) {         entity_set_int(entity , EV_INT_flags , entity_get_int(entity , EV_INT_flags) | FL_GODMODE);       }     entity_set_int(120 , EV_INT_flags , entity_get_int(ent , EV_INT_flags) | FL_GODMODE);     server_print("Successfully Executed Cleanup.")     return PLUGIN_HANDLED }
Minimum is offline
Send a message via AIM to Minimum Send a message via MSN to Minimum
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 06-20-2006 , 22:39  
Reply With Quote #10

Simplest way you could do this:
Code:
entity_set_float(ent,EV_FL_takedamage,0.0)
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
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 08:06.


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