Raised This Month: $51 Target: $400
 12% 

[HELP] Different lighting on different maps


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
mastera40
Member
Join Date: Jul 2014
Old 07-22-2014 , 08:17   [HELP] Different lighting on different maps
Reply With Quote #1

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 !
mastera40 is offline
Egan
BANNED
Join Date: May 2013
Location: GB
Old 07-22-2014 , 11:02   Re: [HELP] Different lighting on different maps
Reply With Quote #2

configs/maps/mapname.ini ?

then the cvar i guess
zp_lighting "z"
Egan is offline
Send a message via ICQ to Egan Send a message via AIM to Egan Send a message via Yahoo to Egan Send a message via Skype™ to Egan
mastera40
Member
Join Date: Jul 2014
Old 07-22-2014 , 12:06   Re: [HELP] Different lighting on different maps
Reply With Quote #3

Doesn't work. Any other ideas guys ?

Last edited by mastera40; 07-22-2014 at 12:17.
mastera40 is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 07-22-2014 , 12:23   Re: [HELP] Different lighting on different maps
Reply With Quote #4

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
        }
    }
}
__________________
H.RED.ZONE is offline
mastera40
Member
Join Date: Jul 2014
Old 07-22-2014 , 12:27   Re: [HELP] Different lighting on different maps
Reply With Quote #5

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.

Last edited by mastera40; 07-22-2014 at 12:28.
mastera40 is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 07-22-2014 , 12:47   Re: [HELP] Different lighting on different maps
Reply With Quote #6

Quote:
Originally Posted by mastera40 View Post
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
        }
    }
}
__________________
H.RED.ZONE is offline
mastera40
Member
Join Date: Jul 2014
Old 07-22-2014 , 12:59   Re: [HELP] Different lighting on different maps
Reply With Quote #7

Thanks !
mastera40 is offline
zmd94
Veteran Member
Join Date: Nov 2013
Location: Malaysia (9w2zow).
Old 07-22-2014 , 15:10   Re: [HELP] Different lighting on different maps
Reply With Quote #8

Thank you for sharing this, H.RED.ZONE. I'm also looking for this.
zmd94 is offline
H.RED.ZONE
Veteran Member
Join Date: Sep 2011
Location: Serbia, Belgrade
Old 07-22-2014 , 15:13   Re: [HELP] Different lighting on different maps
Reply With Quote #9

I didn't shared this it was nothing special just an example. xD But ok no problem glad i could help (:
__________________

Last edited by H.RED.ZONE; 07-22-2014 at 15:14.
H.RED.ZONE is offline
mastera40
Member
Join Date: Jul 2014
Old 07-22-2014 , 16:04   Re: [HELP] Different lighting on different maps
Reply With Quote #10

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.

Last edited by mastera40; 07-22-2014 at 16:07.
mastera40 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:36.


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