Raised This Month: $ Target: $400
 0% 

Flashing Screens


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
DarkM4A1
Junior Member
Join Date: Feb 2014
Old 05-10-2014 , 06:44   Flashing Screens
Reply With Quote #1

Can someone please tell me how to make screen flash with random colors every 5 seconds
I know i could just search but can someone explain it to me. (With example code of course )
I dont want just to copy-paste the code i want to know what it means

Cheers!
DarkM4A1 is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 05-10-2014 , 08:28   Re: Flashing Screens
Reply With Quote #2

I don't know what you want to understand, just send the screenfade message each 5 seconds with random colors?
Backstabnoob is offline
DarkM4A1
Junior Member
Join Date: Feb 2014
Old 05-10-2014 , 12:53   Re: Flashing Screens
Reply With Quote #3

Quote:
Originally Posted by Backstabnoob View Post
I don't know what you want to understand, just send the screenfade message each 5 seconds with random colors?
Example Code?
DarkM4A1 is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-10-2014 , 13:01   Re: Flashing Screens
Reply With Quote #4

Quote:
Originally Posted by DarkM4A1 View Post
Example Code?
Have you searched yet?
__________________
fysiks is offline
DarkM4A1
Junior Member
Join Date: Feb 2014
Old 05-10-2014 , 13:09   Re: Flashing Screens
Reply With Quote #5

Quote:
Originally Posted by fysiks View Post
Have you searched yet?
Nope found nothing
Please give the link to the thread or post code here
DarkM4A1 is offline
Backstabnoob
BANNED
Join Date: Feb 2009
Location: Iwotadai Dorm
Old 05-10-2014 , 13:15   Re: Flashing Screens
Reply With Quote #6

How about you actually search then? Because the forums are full of these things.
Backstabnoob is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 05-10-2014 , 13:18   Re: Flashing Screens
Reply With Quote #7

Always look in the Code Snippets/Tutorials section when trying to do something new.
__________________
fysiks is offline
aron9forever
Veteran Member
Join Date: Feb 2013
Location: Rromania
Old 05-10-2014 , 19:13   Re: Flashing Screens
Reply With Quote #8

I won't post the snippet because apparently everyone wants you to search for this before posting and I don't want to promote a bad habit, but I can do the explaining part
the screen fade is made via sending a message to a client via reliable or unreliable stream, and the bits you send (you will see if you search a lot of (number)s) define the transparency of the fade as well as the time it takes to fade, and three bits for the colors in the RGB format(red green blue). If you want a specific color you can search for it's RGB value online
aron9forever is offline
ezio_auditore
Senior Member
Join Date: May 2013
Old 05-11-2014 , 02:20   Re: Flashing Screens
Reply With Quote #9

Here You Go...
Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #define PLUGIN "Random ScreenFade" #define VERSION "1.0" #define AUTHOR "ezio_auditore" new ScreenFadeMsg public plugin_init() {     register_plugin(PLUGIN, VERSION, AUTHOR)         ScreenFadeMsg = get_user_msgid("ScreenFade") } public client_authorized(id) {     screenfade(id)     set_task(5.0, "client_authorized", id) } stock screenfade(index){         message_begin(MSG_ONE, ScreenFadeMsg, _, index)     write_short(2048)     write_short(2048)     write_short(0)     write_byte(random_num(0, 200))     write_byte(random_num(0, 200))     write_byte(random_num(0, 200))     write_byte(random_num(0, 200))//alpha     message_end() }

After Every five seconds... the screen fade with random colors and transparancy.

EDIT:
I have helped for this once.
Next time serach if you are told to do so

Cheers - ezio
__________________

Last edited by ezio_auditore; 05-11-2014 at 05:38.
ezio_auditore is offline
Send a message via Skype™ to ezio_auditore
DarkM4A1
Junior Member
Join Date: Feb 2014
Old 05-12-2014 , 12:49   Re: Flashing Screens
Reply With Quote #10

Quote:
Originally Posted by ezio_auditore View Post
Here You Go...
Code:
/* Plugin generated by AMXX-Studio */ #include <amxmodx> #include <amxmisc> #define PLUGIN "Random ScreenFade" #define VERSION "1.0" #define AUTHOR "ezio_auditore" new ScreenFadeMsg public plugin_init() { &nbsp;&nbsp;&nbsp;&nbsp;register_plugin(PLUGIN, VERSION, AUTHOR) &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;ScreenFadeMsg = get_user_msgid("ScreenFade") } public client_authorized(id) { &nbsp;&nbsp;&nbsp;&nbsp;screenfade(id) &nbsp;&nbsp;&nbsp;&nbsp;set_task(5.0, "client_authorized", id) } stock screenfade(index){ &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;message_begin(MSG_ONE, ScreenFadeMsg, _, index) &nbsp;&nbsp;&nbsp;&nbsp;write_short(2048) &nbsp;&nbsp;&nbsp;&nbsp;write_short(2048) &nbsp;&nbsp;&nbsp;&nbsp;write_short(0) &nbsp;&nbsp;&nbsp;&nbsp;write_byte(random_num(0, 200)) &nbsp;&nbsp;&nbsp;&nbsp;write_byte(random_num(0, 200)) &nbsp;&nbsp;&nbsp;&nbsp;write_byte(random_num(0, 200)) &nbsp;&nbsp;&nbsp;&nbsp;write_byte(random_num(0, 200))//alpha &nbsp;&nbsp;&nbsp;&nbsp;message_end() }


After Every five seconds... the screen fade with random colors and transparancy.

EDIT:
I have helped for this once.
Next time serach if you are told to do so

Cheers - ezio
Thanks you soooooo much I was trying to make it on my own. For first time it's worked but then i got disconneted from my server everytime with the message
Host_Error Param is not client
But your snippet works awesomeeee

Cheers!
DarkM4A1 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 09:35.


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