AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Flash Block (https://forums.alliedmods.net/showthread.php?t=93403)

lolzin123 05-28-2009 11:41

Flash Block
 
I need the code of the flash block to BCM4, someone help me? THX ^ ^

zacky 05-28-2009 17:14

Re: Flash Block
 
Make this:
PHP Code:

new gMsgScreenFade

Then in plugin_cfg (i think you can do this in plugin_init too, but i'm not sure):
PHP Code:

gMsgScreenFade get_user_msgid("ScreenFade"); 

And heres the flash effect:
PHP Code:

message_begin(MSG_ONE_UNRELIABLEgMsgScreenFade, {0,0,0}, id);    // Message Start
write_short();    // Duration
write_short();    // Hold Time
write_short();    // Fade in/out type
write_byte();    // Red
write_byte();    // Green
write_byte();    // Blue
write_byte();    // Alpha
message_end();    // Message End 


xPaw 05-29-2009 02:11

Re: Flash Block
 
Quote:

Originally Posted by zacky (Post 836861)
Then in plugin_cfg (i think you can do this in plugin_init too, but i'm not sure)

Yes you can do in plugin_init too.

lolzin123 05-29-2009 16:45

Re: Flash Block
 
How i can add this code for a block?Any idea? (bcm plugin)

zacky 05-29-2009 17:23

Re: Flash Block
 
just add the message_begin in your action.

But you have to make something so it doesnt spam

lolzin123 05-29-2009 17:31

Re: Flash Block
 
what? im tryng to add this code to a block, can you help me?

micke1101 05-30-2009 00:44

Re: Flash Block
 
He have.
Quote:

Originally Posted by zacky (Post 836861)
Make this:
PHP Code:

new gMsgScreenFade

Then in plugin_cfg (i think you can do this in plugin_init too, but i'm not sure):
PHP Code:

gMsgScreenFade get_user_msgid("ScreenFade"); 

And heres the flash effect:
PHP Code:

message_begin(MSG_ONE_UNRELIABLEgMsgScreenFade, {0,0,0}, id);    // Message Start
write_short();    // Duration
write_short();    // Hold Time
write_short();    // Fade in/out type
write_byte();    // Red
write_byte();    // Green
write_byte();    // Blue
write_byte();    // Alpha
message_end();    // Message End 



lolzin123 05-30-2009 10:49

Re: Flash Block
 
Can you pass the values to blind the player?

micke1101 05-30-2009 11:06

Re: Flash Block
 
Post the sma you wanna add this block to.


All times are GMT -4. The time now is 13:52.

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