AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Random fade colors (https://forums.alliedmods.net/showthread.php?t=117529)

benamo6 02-02-2010 00:56

Random fade colors
 
I got this effect from GHW_DISCO it should change player screen to random fade colors, but it just set it to one random color at start and it stay like that.
PHP Code:

new num1 random_num(0,255)
        new 
num2 random_num(0,255)
        new 
num3 random_num(0,255)
        new 
alpha random_num(40,65)
        
message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id)
        
write_short(~0)
        
write_short(~0)
        
write_short(1<<12)
        
write_byte(num1)
        
write_byte(num2)
        
write_byte(num3)
        
write_byte(alpha)
        
message_end() 


BannedUser! 02-02-2010 04:09

Re: Random fade colors
 
You need this?

PHP Code:

#include <amxmodx>
#include <amxmisc>

new a
new b
new c
new d

public plugin_init()
{
    
register_event("HLTV""event_round_start""a""1=0""2=0")
    
register_clcmd("say /fadescreen""screenfade")
}

public 
event_round_start()
{
    
random_num(1255)
    
random_num(1255)
    
random_num(1255)
    
random_num(4065)
}

public 
screenfade(id)
{
    
message_begin(MSG_ONE,get_user_msgid("ScreenFade"),{0,0,0},id)
    
write_short(~0)
    
write_short(~0)
    
write_short(1<<12)
    
write_byte(a)
    
write_byte(b)
    
write_byte(c)
    
write_byte(d)
    
message_end()  




All times are GMT -4. The time now is 07:20.

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