Raised This Month: $ Target: $400
 0% 

[Help]Add fadetoblack


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Erater
Junior Member
Join Date: Aug 2013
Old 01-25-2014 , 08:45   [Help]Add fadetoblack
Reply With Quote #1

First, sorry for bad or horrible english.

I need add to this code:

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

new last_stand[33],Float:duck_start_time[33],Float:last_origin[33][3]

public 
plugin_init() {
    
register_plugin("Anti DD Scroll""1.0""Empower")
    
register_forward(FM_CmdStart"pfw_CmdStart"1)
    
    
register_cvar("adds_version""1.0"FCVAR_SERVER FCVAR_SPONLY)
}

public 
pfw_CmdStart(idpUCseed)
{
    new 
iButtons get_uc(pUCUC_Buttons)
    
    
// just ducked
    
if(iButtons IN_DUCK)
    {
        if(
last_stand[id])
        {
            
pev(id,pev_origin,last_origin[id])
            
            
duck_start_time[id] = get_gametime()    
            
last_stand[id] = false;
        }
        
    }
    
// just got up
    
else
    {
        if(!
last_stand[id])
        {
            new 
Float:fGameTime get_gametime()
            
            
// So low time, this is scroll for sure, block duck.
            
if((fGameTime-duck_start_time[id])<0.02)
            {
                
engfunc(EngFunc_SetOriginidlast_origin[id])
                
set_pev(idpev_bInDuckfalse);
            }
        }
        
last_stand[id] = true;
    }
    

when the function of this plugin apply, i need set to the client the command "fadetoblack" or "black screen" for 3 seconds and remove it. Someone can help me?

Last edited by Erater; 01-25-2014 at 09:43.
Erater is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 01-25-2014 , 11:37   Re: [Help]Add fadetoblack
Reply With Quote #2

https://forums.alliedmods.net/showthread.php?t=87623

Use Util_FadeToBlack
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
Erater
Junior Member
Join Date: Aug 2013
Old 01-25-2014 , 12:45   Re: [Help]Add fadetoblack
Reply With Quote #3

sorry but i don't know how apply it. I read the examples but i dont have idea :S. If you explain me.. I really give you thanks. sorry for bad english D:
Erater is offline
Reply



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 10:06.


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