Raised This Month: $ Target: $400
 0% 

de_office


Post New Thread Reply   
 
Thread Tools Display Modes
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
sammy
Senior Member
Join Date: Feb 2007
Old 05-06-2007 , 00:59   Re: de_office
Reply With Quote #2

i also tried to run this plugin and was unsuccessful. i would really like to get this plug going , so if anyone has any sugestion, i would greatly appreciate it...thank you....sammy
www.40calgames.com
sammy is offline
Drak
Veteran Member
Join Date: Jul 2005
Old 05-06-2007 , 01:59   Re: de_office
Reply With Quote #3

This should setup the Bomb target, but i dunno about giving the bomb.
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"))         return PLUGIN_HANDLED   /*    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"))     {         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" )         }     } } public SpawnMapItems() {     new ent;     while((ent =  find_ent_by_class(-1,"func_hostage_rescue") != 0))     {         new bomb = create_entity("func_bomb_target")                 if(bomb > 1)         {             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( ent, 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 )             entity_set_vector(bomb,EV_VEC_origin,origin)                         DispatchSpawn( bomb )                         //entity_set_string( ent, EV_SZ_model, "models/w_c4.mdl" )                         remove_entity(ent);         }     }     return PLUGIN_HANDLED }
__________________
Oh yeah
Drak is offline
Send a message via MSN to Drak
raa
Senior Member
Join Date: Oct 2005
Old 05-07-2007 , 12:45   Re: de_office
Reply With Quote #4

sixtwin, that made the round never start. just sat at the red 0:00. You see the T getting the bomb triggers round start.
__________________
raa is offline
sammy
Senior Member
Join Date: Feb 2007
Old 05-10-2007 , 14:33   Re: de_office
Reply With Quote #5

Quote:
Originally Posted by raa View Post
sixtwin, that made the round never start. just sat at the red 0:00. You see the T getting the bomb triggers round start.
bump!
sammy is offline
deadbeat090
Junior Member
Join Date: Jul 2007
Old 02-02-2008 , 02:34   Re: de_office
Reply With Quote #6

Using server side entities is so much more efficient you dont have to worry bout plugins.
deadbeat090 is offline
Reply



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