AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   ScreenFade black Random ! (https://forums.alliedmods.net/showthread.php?t=282538)

abdobiskra 05-09-2016 14:04

ScreenFade black Random !
 
Hi !
i want make ScreenFade random btw black and normale screen in 0.1 sec
like this video
https://www.youtube.com/watch?featur...&v=RB2fdxZq41A
PHP Code:

public ScreenBlack(id
{
    
message_begin(MSG_ALL,get_user_msgid("ScreenFade"),{0,0,0},id
    
write_short(1<<15)
    
write_short(1<<13)
    
write_short(1<<12
    
write_byte
    
write_byte
    
write_byte
    
write_byte255 
    
message_end()



EFFx 05-09-2016 16:31

Re: ScreenShake Random !
 
LOL, fcking nice idea, i'll try make it, lol

wEEk 05-09-2016 18:04

Re: ScreenShake Random !
 
Show this:

PHP Code:

public crazy(taskid)
{
    new 
id taskid 231687
    
    
new Float:fVec[3];
    
fVec[0] = random_float(MIN MAX);
    
fVec[1] = random_float(MIN MAX);
    
fVec[2] = random_float(MIN MAX);
    
entity_set_vector(id EV_VEC_punchangle fVec);
    
message_begin(MSG_ONE gMsgScreenShake , {0,0,0} ,id)
    
write_short1<<14 );
    
write_short1<<14 );
    
write_short1<<14 );
    
message_end();

    
message_begin(MSG_ONE_UNRELIABLE gMsgScreenFade , {0,0,0} , id);
    
write_short1<<10 );
    
write_short1<<10 );
    
write_short1<<12 );
    
write_byterandom_num(0,255) );
    
write_byterandom_num(0,255) );
    
write_byterandom_num(0,255) );
    
write_byte95 );
    
message_end();



EFFx 05-09-2016 18:24

Re: ScreenShake Random !
 
1. #include <engine>
2. gMsgScreenShake = get_user_msgid("ScreenShake")
3. gMsgScreenFade = get_user_msgid("ScreenFade")

For no error.

MAX and MIN in random_float you add what you want, i think the 0.0 and 130.0 is the beast.


Edit: I made it :) i got it

abdobiskra 05-10-2016 03:05

Re: ScreenFade black Random !
 
wEEk

your code not complet !

EFFx 05-10-2016 08:16

Re: ScreenFade black Random !
 
I made abdobiskra, pm me

abdobiskra 05-10-2016 17:30

Re: ScreenFade black Random !
 
bump !


All times are GMT -4. The time now is 18:40.

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