Raised This Month: $ Target: $400
 0% 

Specific Maps


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fezh
Veteran Member
Join Date: Dec 2008
Location: BANNED
Old 03-14-2009 , 20:48   Specific Maps
Reply With Quote #1

I will explain what the thread's name mean.
How I can set a function wich only use an specific map (like surf_, kz_, et cetera.)

I tried this:
PHP Code:
new mapname[64]
get_mapname(mapname,63)
if(
equali(mapname"kz_"3))

        
register_plugin(PLUGINVERSIONAUTHOR)
        
set_task(0.1"it doesn't matter")

Obviously, it doesn't work..
__________________
"There is no knowledge, that is not power"
fezh is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 03-14-2009 , 21:29   Re: Specific Maps
Reply With Quote #2

Why don't you use a config per map ? You can enable only this plugin using a file plugins-kz.ini in maps/.

If you want to set on a specific function, just check if the map is a kz, save it in a global var, then in this function add a check using the var.
Arkshine is offline
AntiBots
Veteran Member
Join Date: May 2008
Location: Brazil
Old 03-14-2009 , 21:38   Re: Specific Maps
Reply With Quote #3

PHP Code:
#include <amxmodx>

new p_sv_airaccelerate

public plugin_init() 
{
    
register_plugin("""""ReymonARG")
    
p_sv_airaccelerate get_cvar_pointer("sv_airaccelerate")
    
    static 
mapname[32]
    
get_mapname(mapname31)
    
    if( 
containi("surf_"mapname) != -)
    {
        
set_pcvar_num(p_sv_airaccelerate100)
    }

__________________
AntiBots is offline
Send a message via ICQ to AntiBots Send a message via MSN to AntiBots Send a message via Skype™ to AntiBots
fezh
Veteran Member
Join Date: Dec 2008
Location: BANNED
Old 03-15-2009 , 08:54   Re: Specific Maps
Reply With Quote #4

Thanks guys, I will test the AntiBots way.
__________________
"There is no knowledge, that is not power"
fezh 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 09:01.


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