Raised This Month: $ Target: $400
 0% 

World Model Change


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SubStream
Veteran Member
Join Date: Aug 2005
Location: USA
Old 11-01-2005 , 10:22   World Model Change
Reply With Quote #1

--Edited--
SubStream is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 11-01-2005 , 11:42  
Reply With Quote #2

Example for 1 model:
Code:
#include <amxmodx> #include <engine> #include <fakemeta> public plugin_init() {     register_plugin("Set World Model", "0.1", "v3x");     register_forward(FM_SetModel, "SetModel"); } #define OLD_MODEL "models/w_m3.mdl" #define NEW_MODEL "models/w_m3_new.mdl" public SetModel(edict, const model[]) {     if (!is_valid_ent(edict))         return FMRES_IGNORED;     //new id = entity_get_edict(edict, EV_ENT_owner);     if(equal(model, OLD_MODEL))     {         entity_set_model(edict, NEW_MODEL);         return FMRES_SUPERCEDE;     }     return FMRES_IGNORED; }
__________________
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
SubStream
Veteran Member
Join Date: Aug 2005
Location: USA
Old 11-01-2005 , 13:00  
Reply With Quote #3

Edit: ty v3x
SubStream is offline
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 11-01-2005 , 17:38  
Reply With Quote #4

Try registering the forward in plugin_precache.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
SubStream
Veteran Member
Join Date: Aug 2005
Location: USA
Old 11-02-2005 , 09:52  
Reply With Quote #5

--Edited--
SubStream is offline
v3x
Veteran Member
Join Date: Oct 2004
Location: US
Old 11-02-2005 , 11:11  
Reply With Quote #6

Code:
 #include <amxmodx> #include <engine> #include <fakemeta> public plugin_init() {     register_plugin("Set World Model", "0.1", "v3x"); } public plugin_precache() {     register_forward(FM_SetModel, "SetModel"); } #define OLD_MODEL "models/w_m3.mdl" #define NEW_MODEL "models/w_m3_new.mdl" public SetModel(edict, const model[]) {     if (!is_valid_ent(edict))         return FMRES_IGNORED;     //new id = entity_get_edict(edict, EV_ENT_owner);     if(equal(model, OLD_MODEL))     {         entity_set_model(edict, NEW_MODEL);         return FMRES_SUPERCEDE;     }     return FMRES_IGNORED; }
__________________
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
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 23:38.


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