Raised This Month: $ Target: $400
 0% 

You know those couple seconds once u die?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
blood2k
Senior Member
Join Date: Mar 2014
Old 11-13-2017 , 17:03   Re: You know those couple seconds once u die?
Reply With Quote #1

EDIT:
Figured it out... I'm no scripter.. but here's what I copy and pasted together.. for those who MIGHT want this on a future match server.
This is from connor mcleods code and for anyone who wants fix it up

Code:
#include <amxmodx>
#include "screenfade_util.inc"

#define VERSION "0.0.1"

new 	g_pCvarType3_Red, g_pCvarType3_Green, g_pCvarType3_Blue

public plugin_init()
{
		g_pCvarType3_Red = register_cvar("color_type3_red", "0")
		g_pCvarType3_Green = register_cvar("color_type3_green", "0")
		g_pCvarType3_Blue = register_cvar("color_type3_blue", "0")
		register_plugin("Fade From Black", VERSION, "ConnorMcLeod")

    register_event("DeathMsg", "Event_DeathMsg", "a")
}

public Event_DeathMsg()
{
		new iVictim = read_data(2)
		UTIL_ScreenFade(iVictim, get_cvar_color3(g_pCvarType3_Red, g_pCvarType3_Green, g_pCvarType3_Blue), 7.0, 7.0, 250)


}  

stock get_cvar_color1( g_pCvar ) // 4 natives // 1 if don't use clamp
{
    new Color[3]

    new iTemp = get_pcvar_num(g_pCvar)
    Color[0] = clamp(iTemp / 1000000, 0, 255)
    iTemp %= 1000000
    Color[1] = clamp(iTemp / 1000, 0, 255)
    Color[2] = clamp(iTemp % 1000, 0, 255)

    return Color
}

stock get_cvar_color2( g_pCvar ) // 8 natives // 5 if don't use clamp
{
    new Color[3]

    new szColor[12] // "RRR GGG BBB"
    get_pcvar_string(g_pCvar, szColor, charsmax(szColor))

    new szRed[4], szGreen[4], szBlue[4]
    parse(szColor, szRed, charsmax(szRed), szGreen, charsmax(szGreen), szBlue, charsmax(szBlue))
    Color[0] = clamp(str_to_num(szRed), 0, 255)
    Color[1] = clamp(str_to_num(szGreen), 0, 255)
    Color[2] = clamp(str_to_num(szBlue), 0, 255)

    return Color
}

stock get_cvar_color3( g_pCvar_Red, g_pCvar_Green, g_pCvar_Blue ) // 6 natives // 3 if don't use clamp
{
    new Color[3]

    Color[0] = clamp(get_pcvar_num(g_pCvar_Red), 0, 255)
    Color[1] = clamp(get_pcvar_num(g_pCvar_Green), 0, 255)
    Color[2] = clamp(get_pcvar_num(g_pCvar_Blue), 0, 255)

    return Color
}

with this include - https://forums.alliedmods.net/showth...=87623?t=87623

Last edited by blood2k; 11-13-2017 at 18:46.
blood2k 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 17:18.


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