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

Request plugin black screen


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
endlessx
Junior Member
Join Date: Sep 2023
Old 03-04-2024 , 11:28   Request plugin black screen
Reply With Quote #1

I would need a plugin so that when you write /black (only admins) the screen will be black and a white HUD message will appear in the middle where I can change the message
endlessx is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 03-04-2024 , 19:20   Re: Request plugin black screen
Reply With Quote #2

Quote:
Originally Posted by endlessx View Post
I would need a plugin so that when you write /black (only admins) the screen will be black and a white HUD message will appear in the middle where I can change the message
This request leaves more questions than answers. Now admins can blank out their screen and words come up in the middle. Need more information or just change the message how you like.

Code:
#include amxmodx //Screenfade color. #define BLK ewrite_byte(0);ewrite_byte(0);ewrite_byte(0) #define BLU ewrite_byte(0);ewrite_byte(0);ewrite_byte(random_num(200,255)) #define GRN ewrite_byte(0);ewrite_byte(random_num(200,255));ewrite_byte(0) #define PNK ewrite_byte(255);ewrite_byte(random_num(170,200));ewrite_byte(203) #define PUR ewrite_byte(118);ewrite_byte(random_num(25,75));ewrite_byte(137) #define DELAY ewrite_short(get_pcvar_num(g_cvar_bsod_iDelay)*4096) //Remember 4096 is ~1-sec per 'spec unit' #define FLAGS       ewrite_short(0x0001) #define FADE_IN     ewrite_short(1<<0) #define FADE_OUT    ewrite_short(1<<1) #define FADE_HOLD   ewrite_short(1<<2) #define ALPHA ewrite_byte(255) static g_fade new g_cvar_bsod_iDelay new const MESSAGE[] = "HUD MESSAGE or menu?" public plugin_init() {     register_plugin("Black","1.0","SPiNX")     g_fade = get_user_msgid("ScreenFade")     g_cvar_bsod_iDelay = register_cvar("screen_fade_time", "10");     register_clcmd("say /black","@fadeout",ADMIN_KICK,"Black screenfade.") } @fadeout(id) if(is_user_connected(id)) {     emessage_begin(MSG_ONE_UNRELIABLE,g_fade,{0,0,0},id)     DELAY;DELAY;FADE_OUT;BLK;ALPHA;     emessage_end();     bright_message(id) } public bright_message(id) {     if(is_user_connected(id))     {         static Float:xTex;         xTex = -1.0         static Float:yTex;         yTex = -1.0         static Float:fadeInTime; fadeInTime = 0.5;         static Float:fadeOutTime; fadeOutTime = 0.5;         static Float:holdTime; holdTime = 1.0;         static Float:scanTime; scanTime = 1.2;         static effect; effect = 2;         emessage_begin ( MSG_ONE_UNRELIABLE, SVC_TEMPENTITY, { 0, 0, 0 }, id )         ewrite_byte(TE_TEXTMESSAGE);         ewrite_byte(0);      //(channel)         ewrite_short(FixedSigned16(xTex,1<<13))//(x) -1.0 = center)         ewrite_short(FixedSigned16(yTex,1<<13))//(y) -1.0 = center)         ewrite_byte(effect)//(effect) 0 = fade in/fade out, 1 is flickery credits, 2 is write out (training room)         ewrite_byte(iRainbow())//(red)         ewrite_byte(iRainbow())//(GRN)         ewrite_byte(iRainbow())//(BLU)         ewrite_byte(200)//(alpha)         ewrite_byte(iRainbow())//(red) - effect color         ewrite_byte(iRainbow())//(GRN)         ewrite_byte(iRainbow())//(BLU)         ewrite_byte(25)//(alpha)         ewrite_short(FixedUnsigned16(fadeInTime,1<<8));         ewrite_short(FixedUnsigned16(fadeOutTime,1<<8));         ewrite_short(FixedUnsigned16(holdTime,1<<8));         if(effect == 2)             ewrite_short(FixedUnsigned16(scanTime,1<<8));         ewrite_string(MESSAGE)//Words you see on screen.         emessage_end();     } } //stock iRainbow() return random(256); //comment/uncomment for random color text. stock iRainbow() return 255 //comment/uncomment for white text. stock FixedSigned16( Float:value, scale ) // Converts floating-point number to signed 16-bit fixed-point representation {     new Output;     Output = floatround( value * scale )     if ( Output > 3276 )         Output = 32767     if ( Output < -32768 )         Output = -32768;     return  Output; } stock FixedUnsigned16( Float:value, scale ) // Converts floating-point number to unsigned 16-bit fixed-point representation {     new Output;     Output = floatround( value * scale )     if ( Output < 0 )         Output = 0;     if ( Output > 0xFFFF )         Output = 0xFFFF;     return  Output; }
__________________
DJEarthQuake is offline
endlessx
Junior Member
Join Date: Sep 2023
Old 03-05-2024 , 11:34   Re: Request plugin black screen
Reply With Quote #3

ewrite_string(MESSAGE); //Words you see on screen. -> where is (MESSAGE) i will put the text? Thank you
endlessx is offline
DJEarthQuake
Veteran Member
Join Date: Jan 2014
Location: Astral planes
Old 03-08-2024 , 18:08   Re: Request plugin black screen
Reply With Quote #4

Just above plugin_init.
__________________
DJEarthQuake 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 05:05.


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