Raised This Month: $ Target: $400
 0% 

Help me add show_hudmessage to this please.


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Battousai-sama
Veteran Member
Join Date: Jul 2007
Old 12-15-2007 , 18:24   Help me add show_hudmessage to this please.
Reply With Quote #1

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

__________________

Last edited by Battousai-sama; 12-15-2007 at 20:37.
Battousai-sama is offline
Send a message via MSN to Battousai-sama
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-15-2007 , 19:00   Re: someone help me :D
Reply With Quote #2

Sure, just change you title to a more explicit one, and explain why csx is include

fresh version here
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Battousai-sama
Veteran Member
Join Date: Jul 2007
Old 12-15-2007 , 19:01   Re: someone help me :D
Reply With Quote #3

cuz this is modified code like 3 restart plugins in one, but i cant figure out how to add show_hudmesage.
ill remove csx.
__________________
Battousai-sama is offline
Send a message via MSN to Battousai-sama
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-15-2007 , 19:07   Re: Help me add show_hudmessage to this please.
Reply With Quote #4

It's really much easier with an explicit title ;)

Note : hud_message will disappear when restart is triggered.
Attached Files
File Type: sma Get Plugin or Get Source (amx_restartround.sma - 621 views - 1.7 KB)
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Battousai-sama
Veteran Member
Join Date: Jul 2007
Old 12-15-2007 , 19:17   Re: Help me add show_hudmessage to this please.
Reply With Quote #5

but i dont want a plugin >.< i want scripting help to know how to put show_hudmessage to the one i posted.
__________________
Battousai-sama is offline
Send a message via MSN to Battousai-sama
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-15-2007 , 19:39   Re: Help me add show_hudmessage to this please.
Reply With Quote #6

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
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 12-15-2007 at 19:42.
ConnorMcLeod is offline
Battousai-sama
Veteran Member
Join Date: Jul 2007
Old 12-15-2007 , 19:48   Re: Help me add show_hudmessage to this please.
Reply With Quote #7

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
__________________
Battousai-sama is offline
Send a message via MSN to Battousai-sama
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-15-2007 , 20:05   Re: Help me add show_hudmessage to this please.
Reply With Quote #8

http://en.wikipedia.org/wiki/Indent_style
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
Battousai-sama
Veteran Member
Join Date: Jul 2007
Old 12-15-2007 , 20:35   Re: Help me add show_hudmessage to this please.
Reply With Quote #9

ah so it doesn't matter.

and thanks for the help, the plugin is working perfectly.
Now ima figure out how to add sound.
__________________
Battousai-sama is offline
Send a message via MSN to Battousai-sama
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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


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