Raised This Month: $ Target: $400
 0% 

Creating a func_door


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
FatalisDK
Senior Member
Join Date: Mar 2006
Location: bacon
Old 04-12-2006 , 11:39  
Reply With Quote #8

I'm pretty sure
Code:
direction = angles
how far to move = size of brush + lip
I tried this but it didn't work.
Code:
DispatchKeyValue(ent,"movedir","0 0 -1")
Also tried
Code:
DispatchKeyValue(ent,"movedir","90 0 0")
EDIT: I got it to work..sorta
It all works fine, except when I jump onto it. I can touch it and it goes down like I want it, but when I jump onto it, it gives fatal error "Hit func_door with no model (models/bhopbox.mdl)"

Code:
#include <amxmodx> #include <amxmisc> #include <engine> #define PLUGIN "bhop box maker" #define VERSION "0.1" #define AUTHOR "FatalisDK" public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)     register_clcmd("say /bhopbox","bhop") } public bhop(id) {     new ent = create_entity("func_door")     if (!is_valid_ent(ent)) return PLUGIN_HANDLED         new origin[3]     get_user_origin(id,origin)         new szOrigin[45]     format(szOrigin,44,"%i %i %i",origin[0],origin[1],origin[2] - 5)         DispatchKeyValue(ent,"origin",szOrigin)     DispatchKeyValue(ent,"model","models/bhopbox.mdl")         DispatchKeyValue(ent,"rendercolor","0 0 0")     DispatchKeyValue(ent,"angles","-90 0 0")     DispatchKeyValue(ent,"delay","0")     DispatchKeyValue(ent,"speed","150")     DispatchKeyValue(ent,"movesnd","0")     DispatchKeyValue(ent,"stopsnd","0")     DispatchKeyValue(ent,"wait","1")     DispatchKeyValue(ent,"lip","64")     DispatchKeyValue(ent,"dmg","0")     DispatchKeyValue(ent,"health","0")     DispatchKeyValue(ent,"locked_sound","0")     DispatchKeyValue(ent,"unlocked_sound","0")     DispatchKeyValue(ent,"locked_sentence","0")     DispatchKeyValue(ent,"unlocked_sentence","0")     DispatchKeyValue(ent,"renderfx","0")     DispatchKeyValue(ent,"rendermode","0")     DispatchKeyValue(ent,"renderamt","0")     DispatchSpawn(ent)         //entity_set_model(ent,"models/bhopbox.mdl")         entity_set_size(ent,Float:{-32.0,-32.0,-32.0},Float:{32.0,32.0,32.0})     entity_set_int(ent,EV_INT_solid,SOLID_BBOX)     entity_set_int(ent,EV_INT_movetype,MOVETYPE_PUSH)         new Float:flOrigin[3]     IVecFVec(origin,flOrigin)     flOrigin[1] += 72.0     entity_set_origin(id,flOrigin)         return PLUGIN_HANDLED } public plugin_precache() {     precache_model("models/bhopbox.mdl") }
__________________
FatalisDK is offline
 



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:02.


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