Raised This Month: $ Target: $400
 0% 

Maps


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
zombieplague
Veteran Member
Join Date: Apr 2009
Old 02-09-2010 , 01:19   Maps
Reply With Quote #1

How do like this ?

For an example :

When the map is de dust 2 the cvar wil change to 1 ?
zombieplague is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 02-09-2010 , 01:50   Re: Maps
Reply With Quote #2

addons/amxmodx/config
make a folder called maps.
there make a cfg called "mapname.cfg"
ex: for de_dust2 = de_dust2.cfg
and put your cvar in there. You should have something like this.

addons/amxmodx/configs/maps/de_dust2.cfg

in cfg:

mp_friendlyfire 1
sv_alltalk 0
your cvar 1
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
zombieplague
Veteran Member
Join Date: Apr 2009
Old 02-09-2010 , 02:40   Re: Maps
Reply With Quote #3

Quote:
Originally Posted by drekes View Post
addons/amxmodx/config
make a folder called maps.
there make a cfg called "mapname.cfg"
ex: for de_dust2 = de_dust2.cfg
and put your cvar in there. You should have something like this.

addons/amxmodx/configs/maps/de_dust2.cfg

in cfg:

mp_friendlyfire 1
sv_alltalk 0
your cvar 1
No i mean like using plugin.

something like this if the map is de dust 2

set_cvar_num( amx_nono ) == 1 )
zombieplague is offline
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 02-09-2010 , 02:49   Re: Maps
Reply With Quote #4

that's a lot harder i think, you can active a a plugin on a certain map, maybe this helps you out.

addons/amxmodx/config
make a folder called maps
there make a ini called "plugins-mapname.ini"
ex: for de_dust2 = de_dust2.ini
and put your plugins in there. You should have something like this.

addons/amxmodx/configs/maps/plugins-de_dust2.ini

in ini:

ex:
amx_nono.amxx
__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.
drekes is offline
Send a message via MSN to drekes
Merc3y
Member
Join Date: Dec 2009
Old 02-10-2010 , 01:54   Re: Maps
Reply With Quote #5

Quote:
Originally Posted by drekes View Post
that's a lot harder i think, you can active a a plugin on a certain map, maybe this helps you out.

addons/amxmodx/config
make a folder called maps
there make a ini called "plugins-mapname.ini"
ex: for de_dust2 = de_dust2.ini
and put your plugins in there. You should have something like this.

addons/amxmodx/configs/maps/plugins-de_dust2.ini

in ini:

ex:
amx_nono.amxx
No he mean like this:

If the map is de dust 2

set_cvar_num( amx_nono ) == 1 )

when the map is not dd2 the plugin still on.
__________________
How I Wish That I Can Host Without Any Problem.
Merc3y is offline
zombieplague
Veteran Member
Join Date: Apr 2009
Old 02-10-2010 , 02:06   Re: Maps
Reply With Quote #6

Quote:
Originally Posted by Merc3y View Post
No he mean like this:

If the map is de dust 2

set_cvar_num( amx_nono ) == 1 )

when the map is not dd2 the plugin still on.
Something like that.

I want like this:

If the map is not de dust 2 set_cvar_num( "amx_nono" ) == 0 )

Else if the map is de dust set set_cvar_num( "amx_nono" ) == 1 )

Can someone help me ?
zombieplague is offline
Jack86
Veteran Member
Join Date: Dec 2008
Location: Belgrade, Serbia
Old 02-10-2010 , 05:01   Re: Maps
Reply With Quote #7

Try this
PHP Code:
public plugin_cfg()
{
    new 
mapname[32]
    
get_mapname(mapname,charsmax(mapname))
    if(
equali(mapname,"de_dust2") != -1set_cvar_num("amx_nono",1)
    else 
set_cvar_num("amx_nono",0)


__________________

Jack86 is offline
zombieplague
Veteran Member
Join Date: Apr 2009
Old 02-10-2010 , 06:12   Re: Maps
Reply With Quote #8

Quote:
Originally Posted by Jack86 View Post
Try this
PHP Code:
public plugin_cfg()
{
    new 
mapname[32]
    
get_mapname(mapname,charsmax(mapname))
    if(
equali(mapname,"de_dust2") != -1set_cvar_num("amx_nono",1)
    else 
set_cvar_num("amx_nono",0)
 

Didn't work

PHP Code:
public plugin_init( )
{
    
register_logevent"logevent_round_start"2"1=Round_Start" )

    
register_cvar"amx_notice""1" )
}

public 
logevent_round_start( )

    if ( 
get_cvar_num"amx_notice" ) == )
    {  
        
// set_task( 1.0 , "z" )
    
}
 
    else if ( 
get_cvar_num"amx_notice" ) == )
    {  
        
// remove_task( )
    
}
}  

public 
plugin_cfg( )
{
    new 
mapname32 ]
    
get_mapnamemapnamecharsmaxmapname ) )
    if ( 
equalimapname"de_dust2" ) != -
    {
        
set_cvar_num"amx_notice")
    }
    else
    {
        
set_cvar_num"amx_notice")
    }

zombieplague is offline
One
Veteran Member
Join Date: Oct 2008
Location: Hardstyle-eSports.de
Old 02-10-2010 , 06:28   Re: Maps
Reply With Quote #9

here you go:

PHP Code:
public plugin_init( )
{
    
register_logevent"logevent_round_start"2"1=Round_Start" )
    
    
register_cvar"amx_notice""1" )
    
    
    new 
mapname32 ]
    
get_mapnamemapnamecharsmaxmapname ) )
    if ( !
equalimapname"de_dust2" ) ) 
    {
        
set_cvar_num"amx_notice")
    }
    else
    {
        
set_cvar_num"amx_notice")
    }
}
public 
logevent_round_start( )

    if ( !
get_cvar_num"amx_notice" ))
    {  
        
// remove_task( )
        
    
}
    
    else
    {  
        
// set_task( 1.0 , "z" )
    
}

__________________
One is offline
Send a message via ICQ to One Send a message via AIM to One Send a message via MSN to One Send a message via Yahoo to One Send a message via Skype™ to One
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 07:22.


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