AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   hud / dhud messages (https://forums.alliedmods.net/showthread.php?t=155337)

reinert 04-20-2011 15:00

hud / dhud messages
 
Hey, how to make a hud or dhud messages when it appears each one letter, it's like a writing... Like:

H
HE
HEL
HELL
HELLO

I've seen it in quakenet gathers.

Also, one more problem, is it possible to make that the hud or dhud message would not disappear after sv_restartround 1 ?

Exolent[jNr] 04-20-2011 15:06

Re: hud / dhud messages
 
Use a looping task and add a character to the end of the string each time the task is called until the string is completely filled to what you want.

Arkshine 04-20-2011 15:46

Re: hud / dhud messages
 
Or, if I've well understood, using 2 as effect.

reinert 04-20-2011 16:12

Re: hud / dhud messages
 
Arkshine, thanks. Thats what I needed. And the other question:

is it possible to make that the hud or dhud message would not disappear after sv_restartround 1 ?

By the way, could someone help me to make a say command with which I can change map ? its like:

PHP Code:

register_clcmd("say ""hook_say")

public 
hook_say(id)
{
    if(
get_user_flags(id) & ADMIN_LEVEL_H)
    {
        new 
szArg1[32];
        
read_argv(1szArg1charsmax(szArg1))
        if(
equali(szArg1"!map") != -1)
        {
            
read_argv(2szArg1charsmax(szArg1))
            if(
ValidMap(szArg1))
            {
                
client_printc(0"!g[ CLAN MATCH ]!n Switching map to %s"szArg1)
                
set_task(5.0"NextMap"555 ,szArg1)
            }
            else
            {
                
client_printc(id"!g[ CLAN MATCH ]!n There is no such map %s"szArg1)
            }
        }
    }
    return 
PLUGIN_CONTINUE;
}

public 
NextMap(MapName[])
{
    
server_cmd("changelevel %s"MapName)
}

stock bool:ValidMap(mapname[])
{
    if ( 
is_map_valid(mapname) )
    {
        return 
true;
    }
    new 
len strlen(mapname) - 4;
    
    if (
len 0)
    {
        return 
false;
    }
    if ( 
equali(mapname[len], ".bsp") )
    {
        
mapname[len] = '^0';
        
        if ( 
is_map_valid(mapname) )
        {
            return 
true;
        }
    }
    
    return 
false;


And it's not working, It has many bugs that I can't fix myself :(

It always says there is no such map, and sometimes it randomly says it, even if I did not wanted to change map :)

Arkshine 04-20-2011 17:20

Re: hud / dhud messages
 
Hud is reseted on restart round. So hook when it restarts and displays again the message.

About your other question, please create another topic.

reinert 04-20-2011 17:22

Re: hud / dhud messages
 
Ok, but I've like 10 messages which are shown second before round restart.

hleV 04-20-2011 18:07

Re: hud / dhud messages
 
Redisplay messages when player spawns.


All times are GMT -4. The time now is 19:49.

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