Raised This Month: $51 Target: $400
 12% 

fadetoblack


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
spiider
AlliedModders Donor
Join Date: Jan 2010
Old 08-15-2011 , 11:16   fadetoblack
Reply With Quote #1

Hello,

is possible blind some users by steamid when is dead ?
spiider is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-15-2011 , 11:55   Re: fadetoblack
Reply With Quote #2

Yes, search for it.
(Here's a hint: I made it in Suggestions/Requests)
__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] is offline
spiider
AlliedModders Donor
Join Date: Jan 2010
Old 08-15-2011 , 14:51   Re: fadetoblack
Reply With Quote #3

yes i have search for that, but i only find with a file.
and i want make something like fade "steamid"
spiider is offline
Exolent[jNr]
Veteran Member
Join Date: Feb 2007
Location: Tennessee
Old 08-15-2011 , 15:04   Re: fadetoblack
Reply With Quote #4

PHP Code:
#include <amxmodx>
#include <amxmisc>
#include <hamsandwich>

new bool:g_fade_to_black[33];

new 
ScreenFade;

public 
plugin_init()
{
    
register_plugin("FadeToBlack Per SteamID""0.1""Exolent");
    
    
register_concmd("amx_fadetoblack""CmdFadeToBlack"ADMIN_KICK"<nick, #userid, authid> <0|1>");
    
    
RegisterHam(Ham_Spawn"player""FwdPlayerSpawn"1);
    
RegisterHam(Ham_Killed"player""FwdPlayerDeath"1);
    
    
register_message((ScreenFade get_user_msgid("ScreenFade")), "MessageScreenFade");
}

public 
client_disconnect(client)
{
    
g_fade_to_black[client] = false;
}

public 
CmdFadeToBlack(clientlevelcid)
{
    if( !
cmd_access(clientlevelcid3) )
    {
        return 
PLUGIN_HANDLED;
    }
    
    new 
arg[35];
    
read_argv(1argcharsmax(arg));
    
    new 
target cmd_target(clientarg, (CMDTARGET_OBEY_IMMUNITY CMDTARGET_NO_BOTS));
    
    if( !
target )
    {
        return 
PLUGIN_HANDLED;
    }
    
    
read_argv(2argcharsmax(arg));
    
    new 
bool:fade = (arg[0] == '1');
    
    if( 
fade == g_fade_to_black[target] )
    {
        
console_print(client"Target currently %s fade to black"fade "has" "does not have");
        return 
PLUGIN_HANDLED;
    }
    
    
g_fade_to_black[target] = fade;
    
    if( !
is_user_alive(target) )
    {
        
make_ScreenFade(target00, ( _:fade 0x0004 ), 000, ( _:fade 255 ) );
    }
    
    new 
name[32], targetName[32];
    
get_user_name(clientnamecharsmax(name));
    
get_user_name(targettargetNamecharsmax(targetName));
    
    
show_activity(clientname"%s fade to black %s %s"fade "set" "removed"fade "on" "from"target_name);
    
    return 
PLUGIN_HANDLED;
}

public 
FwdPlayerSpawn(client)
{
    if( 
is_user_alive(client) && g_fade_to_black[client] )
    {
        
make_ScreenFade(client000x00000000);
    }
}

public 
FwdPlayerDeath(client)
{
    if( 
g_fade_to_black[client] )
    {
        
make_ScreenFade(client000x0004000255);
    }
}

public 
MessageScreenFade(msgiddestclient)
{
    return (!
g_fade_to_black[client] || is_user_alive(client)) ? PLUGIN_CONTINUE PLUGIN_HANDLED;
}

make_ScreenFade(clientdurationholdtimeflagsrgba)
{
    
message_begin(MSG_ONEScreenFade_client);
    
write_short(duration);
    
write_short(holdtime);
    
write_short(flags);
    
write_byte(r);
    
write_byte(g);
    
write_byte(b);
    
write_byte(a);
    
message_end();

__________________
No private work or selling mods.
Quote:
Originally Posted by xPaw View Post
I love you exolent!
Exolent[jNr] 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 15:03.


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