Does anyone know what wrong with this plugin ?
It works. But didn't work correctly.
I want to make it like after the 60 second the sky change to darkness like e - d - b - a then stop functioning.
My problem is the after the "a" the function repeat itself. I know there is a set_task( TIME_DELAY, "Darkness", Count ), But i try to remove_task( 0 ) Still it didn't remove task.
PHP Code:
#include <amxmodx>
#include <engine>
#define TIME_DELAY 5.0
public plugin_init( )
{
register_plugin( "Darkness", "1.0", "Mr.Noobie" )
set_task( 60.0, "Darkness", 0, _, _, "b" )
}
public Darkness( Count )
{
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" )
}
Count++
set_task( TIME_DELAY, "Darkness", Count )
remove_task( 0 )
}
}