AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   Solved Electricity Cut (https://forums.alliedmods.net/showthread.php?t=338506)

QuickDroLLL 07-08-2022 09:55

Electricity Cut
 
Hello every one QuickDroLLL here today i request a plugin
so the plugin has this functions:
when you type /cut the map light will be darkest and the normal light of map back again after 5 sec
you cannot type /cut again only when map changes i know that the normal light map is 'm' i wan't it when someone type cut it will be z and after 5 sec it will be m again i hope fully understod me.

TribalBlood 07-08-2022 13:00

Re: Electricity Cut
 
PHP Code:

#include <amxmodx>
#include <fakemeta>

new bool:Lock_Light;

public 
plugin_init()
{
    
register_plugin("Change_Light""1.0""TribalBlood");
    
register_clcmd("say /cut""Cut_the_lights");
}

public 
Cut_the_lights(id)
{
    if(
Lock_Light == true)
    {
        return 
PLUGIN_HANDLED;
    }

    
engfunc(EngFunc_LightStyle0"a");
    
set_task(5.0"Reset_Light"id);

    return 
PLUGIN_HANDLED;
}

public 
Reset_Light(id)
{
    
engfunc(EngFunc_LightStyle0"m");
    
Lock_Light true;



QuickDroLLL 07-09-2022 03:05

Re: Electricity Cut
 
Quote:

Originally Posted by TribalBlood (Post 2783357)
PHP Code:

#include <amxmodx>
#include <fakemeta>

new bool:Lock_Light;

public 
plugin_init()
{
    
register_plugin("Change_Light""1.0""TribalBlood");
    
register_clcmd("say /cut""Cut_the_lights");
}

public 
Cut_the_lights(id)
{
    if(
Lock_Light == true)
    {
        return 
PLUGIN_HANDLED;
    }

    
engfunc(EngFunc_LightStyle0"a");
    
set_task(5.0"Reset_Light"id);

    return 
PLUGIN_HANDLED;
}

public 
Reset_Light(id)
{
    
engfunc(EngFunc_LightStyle0"m");
    
Lock_Light true;



thank you very much just like i wan't


All times are GMT -4. The time now is 07:41.

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