Advertisement
Guest User

Untitled

a guest
Nov 15th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.76 KB | None | 0 0
  1. ScreenFade(victim, 1, 1, color, 170, 1)
  2.  
  3. stock ScreenFade(id, Timer, FadeTime, Colors[3], Alpha, type) {
  4.     if(id) if(!is_user_connected(id)) return
  5.  
  6.     if (Timer > 0xFFFF) Timer = 0xFFFF
  7.     if (FadeTime <= 0) FadeTime = 4
  8.    
  9.     message_begin(id ? MSG_ONE_UNRELIABLE : MSG_BROADCAST, get_user_msgid("ScreenFade"), _, id);
  10.     write_short(Timer * 1 << 12)
  11.     write_short(FadeTime * 1 << 12)
  12.     switch (type) {
  13.         case 1: write_short(0x0000)     // IN ( FFADE_IN )
  14.         case 2: write_short(0x0001)     // OUT ( FFADE_OUT )
  15.         case 3: write_short(0x0002)     // MODULATE ( FFADE_MODULATE )
  16.         case 4: write_short(0x0004)     // STAYOUT ( FFADE_STAYOUT )
  17.         default: write_short(0x0001)
  18.     }
  19.     write_byte(Colors[0])
  20.     write_byte(Colors[1])
  21.     write_byte(Colors[2])
  22.     write_byte(Alpha)
  23.     message_end()
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement