Raised This Month: $ Target: $400
 0% 

Special task?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Hunter-Digital
Veteran Member
Join Date: Aug 2006
Location: In the Game [ro]
Old 03-31-2011 , 22:07   Re: Special task?
Reply With Quote #5

I don't really understand what you are trying to do but, just to offer more options:

You can use looped sequenced lights:
Code:
set_lights("aaaaaaaaaaabcdeeeeeefg")
It holds on light A for some time then goes to B,C and D then holds some time on E and then goes to F an G and then again from A... I don't really know how to end the loop but you can just set a task and set the lights to a fixed value.


Or if you just want to increase or decrease lightning:
Code:
#include <amxmodx>
#include <engine>

new const g_szLights[][] = { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" }

new g_iLight

public plugin_init()
{
    //g_iLight = 12 // I don't remember how to get the light level
}

stock adjustLights(iVal)
{
    if(iVal == 0)
    {
        set_lights("#OFF")
        //g_iLight = -1 // I don't remember how to get the light level
        return
    }

    g_iLight = clamp(g_iLight + iVal, 0, sizeof g_szLights)

    set_lights(g_szLights[g_iLight])

    client_print(0, print_chat, "[debug] %s%d lights - light is now %s ", (iVal > 0 ? "+" : ""), iSet, g_szLights[g_iLight])
}
Use adjustLights(value) to adjust the lights, give it positive or negative values, 0 resets light level.
Ex:
adjustLights(1) increases the light level by 1
adjustLights(-5) decreases the light level by 5
adjustLights(0) resets light level to map default.
__________________
Hunter-Digital is offline
 



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 14:41.


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