AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Zombie Plague Mod (https://forums.alliedmods.net/forumdisplay.php?f=126)
-   -   [HELP] Different lighting on different maps (https://forums.alliedmods.net/showthread.php?t=244685)

mastera40 07-22-2014 08:17

[HELP] Different lighting on different maps
 
Hello everyone,
Is there a way to automatically change the lighting on different maps... for example one map's lighting will be "b" and when the map changes to a new one it will automatically change the lighting to "d" since that map is a little darker.
Thank you for your help !

Egan 07-22-2014 11:02

Re: [HELP] Different lighting on different maps
 
configs/maps/mapname.ini ?

then the cvar i guess
zp_lighting "z"

mastera40 07-22-2014 12:06

Re: [HELP] Different lighting on different maps
 
Doesn't work. Any other ideas guys ?

H.RED.ZONE 07-22-2014 12:23

Re: [HELP] Different lighting on different maps
 
Set it as you like.

Code:

#include <amxmodx>

new const g_maps[][] = {
    "zm_dust2",
    "zm_inferno",
    "zm_nuke"
}

public plugin_init() {
    register_plugin("map lights", "1.0", "blabla")
    set_task(5.0, "chackMap")
}

public chackMap() {
    new map[32]
    get_mapname(map, 31)
    for(new i=0;i< sizeof(g_maps);i++) {
        if(equal(map, g_maps[i])) {
            server_cmd( "zp_lighting b" )
            break
        }
    }
}


mastera40 07-22-2014 12:27

Re: [HELP] Different lighting on different maps
 
Can you make it so that I have 3 different light levels ?
What I mean is this:
For map 1, 2, 3 it's b.
For map 4, 5, 6 it's c.
For map 7, 8, 9 it's d.

H.RED.ZONE 07-22-2014 12:47

Re: [HELP] Different lighting on different maps
 
Quote:

Originally Posted by mastera40 (Post 2171904)
Can you make it so that I have 3 different light levels ?
What I mean is this:
For map 1, 2, 3 it's b.
For map 4, 5, 6 it's c.
For map 7, 8, 9 it's d.

Code:

#include <amxmodx>

// Light a
new const g_maps[][] = {
    "zm_dust2",
    "zm_inferno",
    "zm_nuke"
}

// Light b
new const g_maps2[][] = {
    "zm_dsds",
    "zm_ids",
    "zm_nfsfs"
}

// Light c
new const g_maps3[][] = {
    "zm_dgrg",
    "zm_igrgr",
    "zm_nrgrr"
}


public plugin_init() {
    register_plugin("map lights", "1.0", "blabla")
    set_task(5.0, "chackMap")
}

public chackMap() {
    new map[32]
    get_mapname(map, 31)
    new i
   
    for(i=0;i< sizeof(g_maps);i++) {
        if(equal(map, g_maps[i])) {
                    server_cmd( "zp_lighting a" )
            break
        }
    }
   
    for(i=0;i< sizeof(g_maps2);i++) {
        if(equal(map, g_maps2[i])) {
                    server_cmd( "zp_lighting b" )
            break
        }
    }
   
    for(i=0;i< sizeof(g_maps3);i++) {
        if(equal(map, g_maps3[i])) {
                    server_cmd( "zp_lighting c" )
            break
        }
    }
}


mastera40 07-22-2014 12:59

Re: [HELP] Different lighting on different maps
 
Thanks ! :)

zmd94 07-22-2014 15:10

Re: [HELP] Different lighting on different maps
 
Thank you for sharing this, H.RED.ZONE. I'm also looking for this.

H.RED.ZONE 07-22-2014 15:13

Re: [HELP] Different lighting on different maps
 
I didn't shared this it was nothing special just an example. xD But ok no problem glad i could help (:

mastera40 07-22-2014 16:04

Re: [HELP] Different lighting on different maps
 
I have another question: How can I create random spawn points for maps ?
I added a couple of maps that don't have a csdm respawn file.


All times are GMT -4. The time now is 15:16.

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