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

removing weapon?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
colby
Senior Member
Join Date: Jun 2005
Location: NC
Old 07-16-2005 , 05:29   removing weapon?
Reply With Quote #1

well i'm trying to simply remove a weapon from the map and i get no errors when compiling but my server always crashes on startup. Heres the code:

Code:
public strip_weaps(id) {     new model;     model = find_ent_by_model(id,"ts_groundweapon","models/w_mk23.mdl");     remove_entity(model);     return PLUGIN_HANDLED; }
colby is offline
Send a message via AIM to colby
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 07-16-2005 , 05:42  
Reply With Quote #2

Code:
public strip_weaps( id ) {     new iEnts = get_global_int( GL_maxEntities )     new szModel[64]     for( new i = 0; i <= iEnts; i++ )     {         if( !is_valid_ent( i ) ) continue         entity_get_string( i,EV_SZ_model,szModel,63 )         if( equal( szModel,"models/w_mk23.mdl" ) )             remove_entity( i )     }     return PLUGIN_HANDLED }
Try that.
__________________
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
colby
Senior Member
Join Date: Jun 2005
Location: NC
Old 07-16-2005 , 13:28  
Reply With Quote #3

thanks v3x, works perfectly.
colby is offline
Send a message via AIM to colby
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 11:31.


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