AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   Help me add show_hudmessage to this please. (https://forums.alliedmods.net/showthread.php?t=64427)

Battousai-sama 12-15-2007 18:24

Help me add show_hudmessage to this please.
 
can anybody help me change this print chat to show_hudmessage ?
with color.

PHP Code:

#include <amxmodx>
#include <amxmisc>


public plugin_init()
{
    
register_plugin("Restarting Round","1.0","Weed")
    
register_concmd("amx_restround","admin_restround",ADMIN_RESERVATION,"<restart times> <delay>")
}

public 
drestart(param[]) 
    
set_cvar_string("sv_restartround",param)

public 
admin_restround(idlevelcid) { 
    if (!
cmd_access(idlevelcid3))
        return 
PLUGIN_HANDLED
    
new sdelay[4], stimes[4]
    
read_argv(1,stimes,3)
    
read_argv(2,sdelay,3)
    new 
delay str_to_num(sdelay)
    new 
times str_to_num(stimes)
    for(new 
times;0;--a)
        
set_taskfloat(delay a) + 1.0 "drestart"0sdelay4)
{
        
console_print(id,"Restarting round %d times. Each restart will be in delay of %d seconds.",times,delay)
        
client_print(0,print_chat,"Restarting round %d times. Each restart will be in delay of %d seconds.",times,delay)
    }
    return 
PLUGIN_HANDLED



ConnorMcLeod 12-15-2007 19:00

Re: someone help me :D
 
Sure, just change you title to a more explicit one, and explain why csx is include :mrgreen:

fresh version here

Battousai-sama 12-15-2007 19:01

Re: someone help me :D
 
cuz this is modified code like 3 restart plugins in one, but i cant figure out how to add show_hudmesage.
ill remove csx.

ConnorMcLeod 12-15-2007 19:07

Re: Help me add show_hudmessage to this please.
 
1 Attachment(s)
It's really much easier with an explicit title ;)

Note : hud_message will disappear when restart is triggered.

Battousai-sama 12-15-2007 19:17

Re: Help me add show_hudmessage to this please.
 
but i dont want a plugin >.< i want scripting help to know how to put show_hudmessage to the one i posted.

ConnorMcLeod 12-15-2007 19:39

Re: Help me add show_hudmessage to this please.
 
Replace:

PHP Code:

        console_print(id,"Restarting round %d times. Each restart will be in delay of %d seconds.",times,delay)
        
client_print(0,print_chat,"Restarting round %d times. Each restart will be in delay of %d seconds.",times,delay

with

PHP Code:

    new message[128]
    
formatex(message127"The Game will restart %d times with a %d sec. delay between restarts"timesdelay)
    
console_print(idmessage)
    
set_hudmessage(2001000, -1.00.3506.012.00.10.2, -1)
    
show_hudmessage(0message

For message color and location, look at this : http://www.amxmodx.org/funcwiki.php?...sage&go=search

Battousai-sama 12-15-2007 19:48

Re: Help me add show_hudmessage to this please.
 
Thanks connorr, it compiled successfully.
Gona test now (^ ^,)

and tell me what that means?
Code:

/home/groups/amxmodx/tmp3/textGQUmCu.sma(24) : warning 217: loose indentation
/home/groups/amxmodx/tmp3/textGQUmCu.sma(26) : warning 217: loose indentation
/home/groups/amxmodx/tmp3/textGQUmCu.sma(27) : warning 217: loose indentation
/home/groups/amxmodx/tmp3/textGQUmCu.sma(32) : warning 217: loose indentation


ConnorMcLeod 12-15-2007 20:05

Re: Help me add show_hudmessage to this please.
 
http://en.wikipedia.org/wiki/Indent_style

Battousai-sama 12-15-2007 20:35

Re: Help me add show_hudmessage to this please.
 
ah so it doesn't matter.

and thanks for the help, the plugin is working perfectly.
Now ima figure out how to add sound.


All times are GMT -4. The time now is 11:01.

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