AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Hud Messages only apper for 1 sec (https://forums.alliedmods.net/showthread.php?t=163030)

saardam 07-26-2011 01:54

Hud Messages only apper for 1 sec
 
i use this mode

PHP Code:

#include <amxmodx>

public plugin_init()
{
    
register_plugin("JailBreak First writes""0.3""Zedox")
    
    
register_clcmd("say /roshem""Firstwrites")
    
register_clcmd("say /first""Firstwrites")
}

public 
Firstwrites(id)
{
    if(
is_user_admin(id))
    {
        
// Random in Normal Color
        
switch(random_num(0,2)) {
            case 
0:        set_hudmessage(25500, -1.0, -1.004.54.5// red
            
case 1:        set_hudmessage(02550, -1.0, -1.004.54.5// green
            
case 2:        set_hudmessage(00255, -1.0, -1.004.54.5// blue
        
}
        
show_hudmessage(0"The First writes will started in 5 seccond")
        
        
client_cmd(0"spk ^"vox/five^"")
        
        
set_task(5.0"ActionFirstwrites")
        
set_task(0.5"spksecond")
    } else {
        
console_print(id"You have no access to that command")
    }
}

public 
ActionFirstwrites()
{
    
// Random in Normal Color
    
switch(random_num(0,3)) {
        case 
0:        set_hudmessage(25500, -1.00.42// red
        
case 1:        set_hudmessage(02550, -1.00.42// green
        
case 2:        set_hudmessage(00255, -1.00.42// blue
        
case 3:        set_hudmessage(255255255, -1.00.42// white 
    
}

    switch(
random_num(0,4)) {
        case 
0:        show_hudmessage(0"The First writes ^" %^" moves to CT Team"random_num(0,9))
        case 
1:        show_hudmessage(0"The First writes ^" %d%^" moves to CT Team"random_num(0,9), random_num(0,9))
        case 
2:        show_hudmessage(0"The First writes ^" %d%d%^" moves to CT Team"random_num(0,9), random_num(0,9), random_num(0,9))
        case 
3:        show_hudmessage(0"The First writes ^" %d%d%d%^" moves to CT Team"random_num(0,9), random_num(0,9), random_num(0,9), random_num(0,9))
        case 
4:        show_hudmessage(0"The First writes^" %d%d%d%d%^" moves to CT Team"random_num(0,9), random_num(0,9), random_num(0,9), random_num(0,9), random_num(0,9))
    }
}

public 
spksecond()
    
client_cmd(0"spk ^"vox/second^"")

stock is_user_admin(id)
{
    new 
__flags=get_user_flags(id);
    return (
__flags>&& !(__flags&ADMIN_USER));


and other mod that uses the hud messages..
when i write /first i see message for like 0.5 sec and then the random num for 0.5 sec.. how can i fix it.. i think the problem is with the server and not the SMA anyone , help please!

eXtrem 07-26-2011 05:08

Re: Hud Messages only apper for 1 sec
 
Code:
set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 4.5, 4.5)

->

Code:
set_hudmessage(255, 0, 0, -1.0, -1.0, 0, 1.0, 4.5)

?


All times are GMT -4. The time now is 00:51.

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