Quote:
Originally Posted by Alucard^
PHP Code:
#include <amxmodx> #include <engine> new g_iCount; public plugin_init( ) { register_plugin( "Darkness", "1.0", "Mr.Noobie" ); set_task( 60.0, "Darkness" ); } public Darkness( ) { if ( ++g_iCount < 4 ) { switch( g_iCount ) { case 0: set_lights( "e" ); case 1: set_lights( "d" ); case 2: set_lights( "b" ); case 3: set_lights( "a" ); } remove_task( 0 ); } }
Rly i am not sure if my code is correctly so you have to try...
P.S: Obviusly set a short time to the task, so you can do a fast test, i dont think you want to wait 60 seconds ><
|
I try your codes. didn't work correctly meaning that when the light change to "e" it's stop doesn't e - d - b - a.
Quote:
Originally Posted by Exolent[jNr]
PHP Code:
if ( ++g_iCount < 4 ) { switch( g_iCount ) {
PHP Code:
if ( g_iCount < 4 ) { switch( g_iCount++ ) {
That way, 0 will be used.
|
I also try to change but no use.
I trying this it works but the same problem.
PHP Code:
#include <amxmodx>
#include <engine>
new Count
#define TIME_DELAY 3.0
public plugin_init( )
{
register_plugin( "Darkness", "1.0", "Mr.Noobie" )
set_task( 30.0, "Darkness" )
}
public Darkness( )
{
if ( Count < 4 )
{
switch( Count++ )
{
case 0: set_lights( "e" )
case 1: set_lights( "d" )
case 2: set_lights( "b" )
case 3: set_lights( "a" )
}
set_task( TIME_DELAY, "Darkness", Count )
remove_task( 0 )
}
}
But after "a" can't remove_task the task keep like repeat.
I don't know how to say. Can someone try that code then you see what i mean. Like suddenly flash.