so yeah, i want a plugin to create a surf_ski_2 style jail, i got func_door_rotating and func_button to spawn but thats it
PHP Code:
iEntity = create_entity( "func_door_rotating" )
if( !is_valid_ent( iEntity ) ) {
log_amx( "There was an error with creating")
return 0;
}
entity_set_string( iEntity, EV_SZ_classname, "func_door_rotating")
entity_set_int( iEntity, EV_INT_movetype, MOVETYPE_FLY)
entity_set_int( iEntity, EV_INT_solid, SOLID_BBOX)
entorigin[0] = jailLocation[0] +0.5
entorigin[1] = jailLocation[1] -0.5
entorigin[2] = jailLocation[2] -100//+0.5
entity_set_origin(iEntity, entorigin)
entity_set_model(iEntity,"models/fakejail/jail_floor.mdl")
entity_set_vector(iEntity, EV_VEC_angles, Float:{ 0.0, 0.0 , 0.0 })
entity_set_size(iEntity,Float:{ -155.0,-155.0,-2.5}, Float:{ 155.0,155.0,2.5} )
entity_set_string(iEntity, EV_SZ_target, "jbutton")
entity_set_string(iEntity, EV_SZ_targetname, "jdoor")
entity_set_float(iEntity, EV_FL_speed, 100.0)
iEntity = create_entity( "func_button" )
if( !is_valid_ent( iEntity ) ) {
log_amx( "There was an error with creating")
return 0;
}
entity_set_string( iEntity, EV_SZ_classname, "func_button")
entity_set_int( iEntity, EV_INT_movetype, MOVETYPE_NONE)
entity_set_int( iEntity, EV_INT_solid, SOLID_BBOX)
entorigin[0] = jailLocation[0]
entorigin[1] = jailLocation[1]
entorigin[2] = jailLocation[2] +178
entity_set_origin(iEntity, entorigin)
entity_set_model(iEntity,"models/fakejail/jail_button.mdl")
entity_set_vector(iEntity, EV_VEC_angles, Float:{ 0.0, 0.0 , 0.0 })
entity_set_size(iEntity,Float:{ -16.0,-16.0,0.0}, Float:{ 16.0,16.0,32.0} )
entity_set_string(iEntity, EV_SZ_target, "jdoor")
entity_set_string(iEntity, EV_SZ_targetname, "jbutton")
also id like the door to be touch activated, i found that in valve hammer theres a "flags" tab in object properties, where you could set that, but how to do that in code
pictures of flags that need to be set:
http://www.upload.ee/image/1303364/nupp.PNG
http://www.upload.ee/image/1303366/luuk.PNG