Raised This Month: $ Target: $400
 0% 

Creating a func_door


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
FatalisDK
Senior Member
Join Date: Mar 2006
Location: bacon
Old 04-12-2006 , 00:03   Creating a func_door
Reply With Quote #1

If you ever played a bhop map, you'll know what I'm trying to do in this plugin. Basically trying to make a func_door, when you touch it it goes down into the ground (the keyvalues I have are correct).

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")     //register_clcmd("finddoor","doorfind") } /*public doorfind(id) {     new door = find_ent_by_class(-1,"func_door")     client_print(0,print_chat,"Movetype - %i",entity_get_int(door,EV_INT_movetype))     client_print(0,print_chat,"Solid - %i",entity_get_int(door,EV_INT_solid)) }*/ public bhop(id) {     new ent = create_entity("info_target")     if (!is_valid_ent(ent)) return PLUGIN_HANDLED         DispatchKeyValue(ent,"classname","func_door")     DispatchKeyValue(ent,"rendercolor","0 0 0")     DispatchKeyValue(ent,"angles","90 0 0")     DispatchKeyValue(ent,"speed","100")     DispatchKeyValue(ent,"wait","1")     DispatchSpawn(ent)         entity_set_string(ent,EV_SZ_classname,"func_door")     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_BSP) //finddoor returned 4 (SOLID_BSP)     entity_set_int(ent,EV_INT_movetype,MOVETYPE_PUSH) //finddoor returned 7 (MOVETYPE_PUSH)         new origin[3]     get_user_origin(id,origin)         new Float:flOrigin[3]     IVecFVec(origin,flOrigin)         entity_set_origin(ent,flOrigin)     flOrigin[2] += 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