Hey all, K so I'm trying to help this guy out. He wants cs_office converted to de_. So I figured I would look on these forums for a plugin that did it through scripting rather then have me recreate(decompile/recompile. which is a lot of work) the whole map just for a de_ conversion.
So I found this..
http://forums.alliedmods.net/showthr...ight=de_office
But it doesn't seem to work. The plugin is loading and set to run. I've looked at the script and I can't find anything obvious. First off the bomb isn't even given to a T on spawn.
Wonder if anyone sees anything?
Heres the code:
Code:
/*********************************
* de_office
*
* 2003 - Lazy < <a href="mailto:[email protected]">[email protected]</a> >
*
* Gameplay change for the map cs_office, terrorists must plant the bomb
* at either one of the hostage rescue points.
*
* New CVars: sv_de_office < 1 / 0 >
*
* Notes : Requires Engine module to work
*
* Changelog:
* 1.2: -Fixed for cz
*
* 1.1: -Fixed to find_ent_by_class
* -Took out include xtrafun
* -Fixed string
*
* 1.0: -First Release
*********************************/
#include <amxmodx>
#include <engine>
public plugin_precache
( )
{
if ( get_cvar_num( "sv_de_office" ) == 0 )
return PLUGIN_CONTINUE
/* Do not precache unless the plugin is on */
/* Precache needed items for the bomb since it's only precached on de_ maps */
precache_model( "models/w_c4.mdl" )
precache_sound( "weapons/c4_click.wav" )
precache_sound( "weapons/c4_disarm.wav" )
precache_sound( "weapons/c4_disarmed.wav" )
precache_sound( "weapons/c4_explode1.wav" )
precache_sound( "weapons/c4_plant.wav" )
return PLUGIN_CONTINUE
}
public plugin_init
( )
{
register_plugin( "de_office",
"1.2",
"Lazy" )
register_cvar( "sv_de_office",
"1", FCVAR_SERVER
)
if ( get_cvar_num( "sv_de_office" ) == 1 )
{
new map
[ 128 ]
get_mapname( map,
128 )
if ( equali( map,
"cs_office" ) ||
equali( map,
"cs_office_cz" ))
{
set_cvar_num( "mp_c4timer",
30 )
SpawnMapItems
( )
}
else
{
pause( "a" )
}
}
return PLUGIN_CONTINUE
}
public SpawnMapItems
( )
{
new i
= 1
while ( ( i
= find_ent_by_class
( i,
"func_hostage_rescue" ) ) )
{
new bomb
= create_entity
( "func_bomb_target" )
if ( bomb
!= 0 )
{
new model
[ 512 ]
new Float:mins
[ 3 ] = { -1024.0,
-1024.0,
-1024.0 }
new Float:maxs
[ 3 ] = { 1024.0,
1024.0,
1024.0 }
new Float:origin
[ 3 ]
entity_get_vector
( i, EV_VEC_origin, origin
)
entity_set_vector
( bomb, EV_VEC_mins, mins
)
entity_set_vector
( bomb, EV_VEC_maxs, maxs
)
entity_set_int
( bomb, EV_INT_solid,
1 )
DispatchSpawn
( bomb
)
entity_set_string
( i, EV_SZ_model, model
)
//entity_set_string( i, EV_SZ_model, "models/w_c4.mdl" )
//entity_set_model( bomb, "models/w_c4.mdl" )
entity_set_model
( bomb, model
)
entity_set_origin
( bomb, origin
)
remove_entity
( i
)
}
}
i
= 1
while ( ( i
= find_ent_by_class
( i,
"func_hostage_rescue" ) ) )
{
remove_entity
( i
)
}
return PLUGIN_HANDLED
}
Thanks
__________________