Raised This Month: $ Target: $400
 0% 

de_office


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
raa
Senior Member
Join Date: Oct 2005
Old 05-03-2007 , 14:40   de_office
Reply With Quote #1

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
__________________
raa 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 06:39.


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