Raised This Month: $ Target: $400
 0% 

[REQ] func_bomb_target cvar! and menu question!


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Helloween
BANNED
Join Date: May 2010
Location: 23 de enero
Old 05-23-2010 , 20:57   [REQ] func_bomb_target cvar! and menu question!
Reply With Quote #1

Hi! I have this code:

PHP Code:
#include <amxmodx>
#include <fakemeta>

public plugin_init() {
    
register_plugin("PLUGIN""VERSION""AUTHOR")
    
set_task(2.0"DoMapStrips")
}

public 
DoMapStrips() {
    
RemoveEntityAll("func_bomb_target")
    
RemoveEntityAll("info_bomb_target")
}

stock RemoveEntityAll(name[])
{
    new 
ent engfunc(EngFunc_FindEntityByString0"classname"name)
    new 
temp
    
while (ent)
    {
        
temp engfunc(EngFunc_FindEntityByStringent"classname"name)
        
engfunc(EngFunc_RemoveEntityent)
        
ent temp
    
}

I turn on and off func_bomb_target and info_bomb_target via cvar!

To be more specific I remove the classnames and then again to activate via cvar without changing map

help please...
Helloween is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 05-23-2010 , 21:15   Re: [REQ] func_bomb_target cvar!
Reply With Quote #2

Code:
#include < amxmodx > #include < amxmisc > #include < engine > public plugin_init( ) {     register_concmd( "bombsite_remove", "CmdRemove", ADMIN_RCON );     register_concmd( "bombsite_restore", "CmdRestore", ADMIN_RCON ); } public CmdRemove( iPlayer, iLevel, iCID ) {     if( cmd_access( iPlayer, iLevel, iCID, 1 ) )     {         RemoveEntity( "func_bomb_target" );         RemoveEntity( "info_bomb_target" );     }         return PLUGIN_HANDLED; } public CmdRestore( iPlayer, iLevel, iCID ) {     if( cmd_access( iPlayer, iLevel, iCID, 1 ) )     {         RestoreEntity( "func_bomb_target" );         RestoreEntity( "info_bomb_target" );     }         return PLUGIN_HANDLED; } RemoveEntity( const szClassName[ ] ) {     new szFakeClassName[ 32 ];     GetFakeClassName( szClassName, szFakeClassName, charsmax( szFakeClassName ) );         new iEntity = -1;     while( ( iEntity = find_ent_by_class( iEntity, szClassName ) ) )     {         entity_set_string( iEntity, EV_SZ_classname, szFakeClassName );     } } RestoreEntity( const szClassName[ ] ) {     new szFakeClassName[ 32 ];     GetFakeClassName( szClassName, szFakeClassName, charsmax( szFakeClassName ) );         new iEntity = -1;     while( ( iEntity = find_ent_by_class( iEntity, szFakeClassName ) ) )     {         entity_set_string( iEntity, EV_SZ_classname, szClassName );     } } GetFakeClassName( const szClassName[ ], szFakeClassName[ ], const iLen ) {     formatex( szFakeClassName, iLen, "___%s", szClassName ); }
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
Helloween
BANNED
Join Date: May 2010
Location: 23 de enero
Old 05-23-2010 , 21:23   Re: [REQ] func_bomb_target cvar!
Reply With Quote #3

wow thanks!
Helloween is offline
Helloween
BANNED
Join Date: May 2010
Location: 23 de enero
Old 05-23-2010 , 21:35   Re: [REQ] func_bomb_target cvar!
Reply With Quote #4

Exolent a question:

I have a menu but the menu has 2 pages, and i eliminate, what it says top beside the name 1/2...

You can eliminate?

I have found this:

PHP Code:
#define MEXIT_ALL        1        /* Menu will have an exit option (default)*/
#define MEXIT_NEVER        -1        /* Menu will not have an exit option */

#define MPROP_PERPAGE    1        /* Number of items per page (param1 = number, 0=no paginating, 7=default) */
#define MPROP_BACKNAME    2        /* Name of the back button (param1 = string) */
#define MPROP_NEXTNAME    3        /* Name of the next button (param1 = string) */
#define MPROP_EXITNAME    4        /* Name of the exit button (param1 = string) */
#define MPROP_TITLE        5        /* Menu title text (param1 = string) */
#define MPROP_EXIT        6        /* Exit functionality (param1 = number, see MEXIT constants) */
#define MPROP_NOCOLORS    8        /* Sets whether colors are not auto (param1 = number, 0=default) */
#define MPROP_NUMBER_COLOR    10    /* Color indicator to use for numbers (param1 = string, "\r"=default) */

#define MEXIT_NORMAL    0        /* DEPRECATED, do not use (has no effect) */
#define MENUPAD_NONE    0        /* DEPRECATED, do not use (has no effect) */
#define MENUPAD_PAGE    1        /* DEPRECATED, do not use (has no effect) */
#define MPROP_ORDER        7        /* DEPRECATED, do not use (has no effect) */
#define MPROP_PADMENU    9        /* DEPRECATED, do not use (has no effect) */ 
Serves as something for this problem?
Helloween is offline
Helloween
BANNED
Join Date: May 2010
Location: 23 de enero
Old 05-24-2010 , 02:27   Re: [REQ] func_bomb_target cvar! and menu question!
Reply With Quote #5

If I am not understood, tell me, and i explain better....

Last edited by Helloween; 05-24-2010 at 10:00.
Helloween 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:42.


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