Raised This Month: $ Target: $400
 0% 

[ES] Bomb Cvar! [SOLUCIONADO]


  
 
 
Thread Tools Display Modes
Author Message
Helloween
BANNED
Join Date: May 2010
Location: 23 de enero
Old 05-20-2010 , 02:00   [ES] Bomb Cvar! [SOLUCIONADO]
#1

hola! tengo estos codigos:

1:

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
    
}

2:

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

#define VERSION "0.0.2"

public plugin_init()
{
    
register_plugin("No BombSites"VERSION"ConnorMcLeod")

    new 
iEntiTargetszTarget[32]
    while( (
iEnt engfunc(EngFunc_FindEntityByStringiEnt"classname""func_bomb_target")) )
    {
        
pev(iEntpev_targetszTargetcharsmax(szTarget))
        
iTarget 0

        
while( (iTarget engfunc(EngFunc_FindEntityByStringiTarget"targetname"szTarget)) )
        {
            
engfunc(EngFunc_RemoveEntityiTarget)
        }

        
engfunc(EngFunc_RemoveEntityiEnt)
    }

    while( (
iEnt engfunc(EngFunc_FindEntityByStringiEnt"classname""info_bomb_target")) )
    {
        
pev(iEntpev_targetszTargetcharsmax(szTarget))
        
iTarget 0

        
while( (iTarget engfunc(EngFunc_FindEntityByStringiTarget"targetname"szTarget)) )
        {
            
engfunc(EngFunc_RemoveEntityiTarget)
        }

        
engfunc(EngFunc_RemoveEntityiEnt)
    }

lo que quiero lograr es un cvar que al estar en 1 active este codigo y al estar en 0 esto este desactivado... lo he hecho con amx_pause_cfg y no funciona sigue el plugin funcionando :S como podria desactivarlo y activarlo? puede ser mediante cvars?
Helloween is offline
capostrike93
Veteran Member
Join Date: Feb 2009
Location: adios y??
Old 05-20-2010 , 02:10   Re: [ES] Bomb Cvar!
#2

1

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

new usa_mas_el_buscador

public plugin_init() {
    
register_plugin("PLUGIN""VERSION""AUTHOR")
    
    
usa_mas_el_buscador register_cvar("usa_el_buscador","1")

    if( 
get_pcvar_num(usa_mas_el_buscador) ) 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
    
}

2

PHP Code:
#include <fakemeta>

#define VERSION "0.0.2"

new usa_mas_el_buscador

public plugin_init()
{
    
register_plugin("No BombSites"VERSION"ConnorMcLeod")

    
usa_mas_el_buscador register_cvar("usa_el_buscador","1")

    if( !
get_pcvar_num(usa_mas_el_buscador) ) return;

    new 
iEntiTargetszTarget[32]
    while( (
iEnt engfunc(EngFunc_FindEntityByStringiEnt"classname""func_bomb_target")) )
    {
        
pev(iEntpev_targetszTargetcharsmax(szTarget))
        
iTarget 0

        
while( (iTarget engfunc(EngFunc_FindEntityByStringiTarget"targetname"szTarget)) )
        {
            
engfunc(EngFunc_RemoveEntityiTarget)
        }

        
engfunc(EngFunc_RemoveEntityiEnt)
    }

    while( (
iEnt engfunc(EngFunc_FindEntityByStringiEnt"classname""info_bomb_target")) )
    {
        
pev(iEntpev_targetszTargetcharsmax(szTarget))
        
iTarget 0

        
while( (iTarget engfunc(EngFunc_FindEntityByStringiTarget"targetname"szTarget)) )
        {
            
engfunc(EngFunc_RemoveEntityiTarget)
        }

        
engfunc(EngFunc_RemoveEntityiEnt)
    }

more info in http://forums.alliedmods.net/search.php
__________________
capostrike93 is offline
Helloween
BANNED
Join Date: May 2010
Location: 23 de enero
Old 05-20-2010 , 02:21   Re: [ES] Bomb Cvar!
#3

lo probare ahora mismo yo mismo le habia creado las cvars pero al ponerla en 0 igual quedaba funcionando dejame probar rapidamente
Helloween is offline
Helloween
BANNED
Join Date: May 2010
Location: 23 de enero
Old 05-20-2010 , 02:34   Re: [ES] Bomb Cvar!
#4

capo lo acabo de probar y sigue pasando lo mismo al llamar usa_el_buscador "0" no desactiva el codigo acabo de probar con amx_pause_cfg y tampoco se desactiva el codigo como podria hacer para que alejecutar el cvar en 0 desactive el plugin o el codigo que esta alli programado?
Helloween is offline
capostrike93
Veteran Member
Join Date: Feb 2009
Location: adios y??
Old 05-20-2010 , 02:37   Re: [ES] Bomb Cvar!
#5

amxx.cfg

usa_el_buscador "0"
__________________
capostrike93 is offline
Helloween
BANNED
Join Date: May 2010
Location: 23 de enero
Old 05-20-2010 , 10:17   Re: [ES] Bomb Cvar!
#6

capo sigue sin servir he puesto usa_el_buscador "0" en la cfg y no sirve!

como te dije ya yo habia hecho lo mismo que tu ponerlo con cvars y no me funciono no hay otra forma de hacer que este codigo se active y se desactive?

aqui puedes ver la imagen:
Attached Thumbnails
Click image for larger version

Name:	Dibujo.jpg
Views:	169
Size:	97.6 KB
ID:	66023  
Helloween is offline
shinoda
Spanish Moderator
Join Date: Nov 2009
Location: ag_crossfire
Old 05-20-2010 , 10:21   Re: [ES] Bomb Cvar!
#7

Prueba :B

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

new const Classnames[][] = {
    
"func_bomb_target",
    
"info_bomb_target"
}

new 
MiCvar

public plugin_init() {
    
register_plugin("a""99999""b")
    
MiCvar register_cvar("amx_remove_classname""1")
    
    
Remover()
}

Remover() {
    
    if(
get_pcvar_num(MiCvar) != 1) return 1
    
    
for(new i=0i<sizeof Classnamesi++)
        
remove_entity_name(Classnames[i])
        
    return 
0

__________________
Oh hell no this shit is awesome !!!
shinoda is offline
Send a message via MSN to shinoda Send a message via Skype™ to shinoda
Helloween
BANNED
Join Date: May 2010
Location: 23 de enero
Old 05-20-2010 , 10:35   Re: [ES] Bomb Cvar!
#8

hola shinoda tu codigo si quita la c4 pero al colocar amx_remove_classname "0" para que si aparezca la c4 no aparece sino que sigue eliminada :S que podra ser?
Helloween is offline
shinoda
Spanish Moderator
Join Date: Nov 2009
Location: ag_crossfire
Old 05-20-2010 , 10:39   Re: [ES] Bomb Cvar!
#9

Lo que entiendo es que tu quieres eliminar esos classnames, pero en cualquier momento que eligas quieres que aparezcan otra vez ???

Si es asi, no se puede ... o eso es lo que creo.
__________________
Oh hell no this shit is awesome !!!
shinoda is offline
Send a message via MSN to shinoda Send a message via Skype™ to shinoda
Helloween
BANNED
Join Date: May 2010
Location: 23 de enero
Old 05-20-2010 , 10:46   Re: [ES] Bomb Cvar!
#10

si osea yo tabajo con varias cfgs que se activan en momentos del juego y ps quiero eliminar colocando x cvar en 0 y despues volviendo a activar en 1.

lo he hecho con amx_pause_cfg pero tampoco se pasusa el plugin!

de verdad no hay manera? yo creo que si la debe de haber xq he visto servidores que asi lo hacen pero ni idea de como logran activar y desactivar
Helloween 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 05:01.


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