AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Specific Maps (https://forums.alliedmods.net/showthread.php?t=87648)

fezh 03-14-2009 20:48

Specific Maps
 
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..

Arkshine 03-14-2009 21:29

Re: Specific Maps
 
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.

AntiBots 03-14-2009 21:38

Re: Specific Maps
 
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)
    }



fezh 03-15-2009 08:54

Re: Specific Maps
 
Thanks guys, I will test the AntiBots way.


All times are GMT -4. The time now is 09:01.

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