View Single Post
Cruze
Veteran Member
Join Date: May 2017
Old 07-15-2022 , 10:34   Re: grey screen when death
Reply With Quote #2

PHP Code:
#include <sourcemod>

public Plugin myinfo 
{
    
name "Blue Screen On Kill",
    
author "Addicted [smol edit by Cruze]",
    
version "1.2",
    
url "oaaron.com"
};

public 
void OnPluginStart()
{
    
HookEvent("player_death"Event_PlayerDeath);
}

public 
Action Event_PlayerDeath(Event ev, const char[] namebool dbc)
{
    
int victim GetClientOfUserId(ev.GetInt("userid"));

    if(
victim || victim MaxClients || IsFakeClient(victim))
        return 
Plugin_Continue;

    
ShowScreenFade(victim211211211100); // Your preffered grey color code here

    
return Plugin_Continue;    
}

void ShowScreenFade(int clientint rint gbint a)
{
    
int duration 200holdtime 200flags = (0x0001 0x0010), color[4];

    
color[0] = r;
    
color[1] = g;
    
color[2] = b;
    
color[3] = a;

    
int clients[2];
    
clients[0] = client;

    
Handle message StartMessageEx(GetUserMessageId("Fade"), clients1);

    if (
GetUserMessageType() == UM_Protobuf)
    {
        
Protobuf pb UserMessageToProtobuf(message);
        
pb.SetInt("duration"duration);
        
pb.SetInt("hold_time"holdtime);
        
pb.SetInt("flags"flags);
        
pb.SetColor("clr"color);
    }
    else
    {
        
BfWriteShort(messageduration);
        
BfWriteShort(messageholdtime);
        
BfWriteShort(messageflags);
        
BfWriteByte(messagecolor[0]);
        
BfWriteByte(messagecolor[1]);
        
BfWriteByte(messagecolor[2]);
        
BfWriteByte(messagecolor[3]);
    }

    
EndMessage();

__________________
Taking paid private requests! Contact me

Last edited by Cruze; 07-15-2022 at 14:28. Reason: my bad. was sleepy
Cruze is offline