Raised This Month: $ Target: $400
 0% 

Special task?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
drekes
Veteran Member
Join Date: Jul 2009
Location: Vault 11
Old 03-31-2011 , 13:10   Re: Special task?
Reply With Quote #4

I got it now, will think about this.

EDIT: This works, but it sets the light to the brighest first.
Maybe you can work with this:

PHP Code:
#include <amxmodx>
#include <engine>

#pragma semicolon    1

#define TASK_LIGHT     4841

new const g_szAlphabet[][] =
{
    
"""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_iLightLvl;

public 
plugin_init()
    
register_clcmd("say /changelights""CmdChangeLights");
    

public 
CmdChangeLights(id)
{
    
g_iLightLvl sizeof(g_szAlphabet);
    
    
set_task(0.1"TaskChangeLights"TASK_LIGHT, .flags "b");
}
    
public 
TaskChangeLights()
{
    if(!--
g_iLightLvl)
    {
        if(!
task_exists(TASK_LIGHT))
            
g_iLightLvl sizeof(g_szAlphabet);
        
        else
            
remove_task(TASK_LIGHT);
    }
    
    
set_lights(g_szAlphabet[g_iLightLvl]);

__________________

Quote:
Originally Posted by nikhilgupta345 View Post
You're retarded.

Last edited by drekes; 03-31-2011 at 13:28.
drekes is offline
Send a message via MSN to drekes
 



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