Raised This Month: $ Target: $400
 0% 

Change bomb model! (cstrike)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
TotalNoobScripter
Senior Member
Join Date: Aug 2004
Old 02-01-2005 , 23:58   Change bomb model! (cstrike)
Reply With Quote #1

How would you change the bomb model? I mean the model when its planted, not the view model or the weaponmodel, i know how to do that
TotalNoobScripter is offline
Send a message via AIM to TotalNoobScripter
TotalNoobScripter
Senior Member
Join Date: Aug 2004
Old 02-02-2005 , 00:22  
Reply With Quote #2

better yet... whats the entity name / classname of a planted / dropped bomb
TotalNoobScripter is offline
Send a message via AIM to TotalNoobScripter
BAILOPAN
Join Date: Jan 2004
Old 02-02-2005 , 00:44  
Reply With Quote #3

it's a weaponbox containing a weapon_c4, like all other weapons in CS.

search for a weapon_c4, the owner will be the weaponbox whose model you need to change.

I think that's how it works at least
__________________
egg
BAILOPAN is offline
TotalNoobScripter
Senior Member
Join Date: Aug 2004
Old 02-02-2005 , 23:20  
Reply With Quote #4

because of my noobness... how would you search all the entities if it contained a model? I only know how to get a entity string if the entity is specififed or like pfn_touch.
TotalNoobScripter is offline
Send a message via AIM to TotalNoobScripter
Peli
Veteran Member
Join Date: Mar 2004
Location: San Diego, CA
Old 02-03-2005 , 00:07  
Reply With Quote #5

I think it's :
Code:
entity_get_string()
Peli is offline
Send a message via MSN to Peli
Johnny got his gun
Veteran Member
Join Date: Jan 2004
Location: Tokyo
Old 02-03-2005 , 04:53  
Reply With Quote #6

Actually a planted bomb is a "grenade". And its EV_SZ_model is "models/w_c4.mdl".

entity_set_model() probably works to change its model.

Or you could try to hook FM_SetModel and when it says "models/m_c4.mdl", you just replace that with your new model. Probably a nice way to do it if you intend to change the model at all times.
Johnny got his gun is offline
Votorx
Senior Member
Join Date: Jun 2004
Old 02-03-2005 , 07:21  
Reply With Quote #7

Or you can just run through the entities looking for the classname "weapon_c4" and once its found just change the model with entity_set_string().
__________________
Currently Looking for a mod team.
Votorx is offline
Send a message via AIM to Votorx Send a message via MSN to Votorx Send a message via Yahoo to Votorx
TotalNoobScripter
Senior Member
Join Date: Aug 2004
Old 02-03-2005 , 20:23  
Reply With Quote #8

Quote:
Originally Posted by Johnny got his gun
Actually a planted bomb is a "grenade". And its EV_SZ_model is "models/w_c4.mdl".

entity_set_model() probably works to change its model.

Or you could try to hook FM_SetModel and when it says "models/m_c4.mdl", you just replace that with your new model. Probably a nice way to do it if you intend to change the model at all times.
can u give me an example how to use FM_SetModel ?. I've never used FakeMeta before.
TotalNoobScripter is offline
Send a message via AIM to TotalNoobScripter
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 02-03-2005 , 21:53  
Reply With Quote #9

http://www.amxmodx.org/funcwiki.php?go=func&id=615
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
TotalNoobScripter
Senior Member
Join Date: Aug 2004
Old 02-03-2005 , 23:28  
Reply With Quote #10

Code:
 register_forward ( FM_SetModel, changetoipod, 1 ) public changetoipod() {    dabomb = forward_return ( FMV_String, "EV_SZ_model" )    if (equali(dabomb,"models/w_c4.mdl") == 1 ) {       // the function to get the entity name and dispatch the new model name which i believe can be doen with entity_get_classname and entity_set_model?? return PLUGIN_CONTINUE } return PLUGIN_CONTINUE }

?
TotalNoobScripter is offline
Send a message via AIM to TotalNoobScripter
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 19:27.


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