Raised This Month: $ Target: $400
 0% 

Start Round


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
bat
Veteran Member
Join Date: Jul 2012
Old 12-26-2012 , 11:26   Start Round
Reply With Quote #1

Hello plzz help me : Start Round Message Radnom

" hello " 1 round
" hello2" 2 round
ect....
__________________

Last edited by bat; 12-26-2012 at 11:26.
bat is offline
Send a message via Skype™ to bat
rastafari
Senior Member
Join Date: May 2011
Old 12-30-2012 , 15:15   Re: Start Round
Reply With Quote #2

PHP Code:
#include <amxmodx>

new g_iKor=0;
static    const    
START_MESSAGE[5][]={
    
"Round 1 started",
    
"Round 2 started",
    
"Round 3 started",
    
"Round 4 started",
    
"Round 5 started"
}

public 
plugin_init(){
    
register_event("HLTV""event_new_round""a""1=0""2=0")  
    
register_event("TextMsg""restart_round""a""2=#Game_will_restart_in");
}

public 
event_new_round(id){
    
g_iKor += 1;
    
client_print(idprint_center"%s",START_MESSAGE[g_iKor])
}
public 
restart_round(){
    
g_iKor 0;    

__________________

Last edited by rastafari; 12-31-2012 at 02:01. Reason: Sorry, I misunderstood your request.
rastafari is offline
bat
Veteran Member
Join Date: Jul 2012
Old 12-30-2012 , 16:26   Re: Start Round
Reply With Quote #3

no sound but Message
__________________
bat is offline
Send a message via Skype™ to bat
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 12-30-2012 , 16:29   Re: Start Round
Reply With Quote #4

Use the HLTV event and just keep track of the number of rounds that pass and output a different message each time.
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
rastafari
Senior Member
Join Date: May 2011
Old 12-31-2012 , 02:00   Re: Start Round
Reply With Quote #5

I edited the post, please try out the new one.
__________________
rastafari is offline
bat
Veteran Member
Join Date: Jul 2012
Old 12-31-2012 , 04:40   Re: Start Round
Reply With Quote #6

No I need Message Hud Color "RED" Random Message

" This Message " 1 round
" This Other Message " 2 round
__________________
bat is offline
Send a message via Skype™ to bat
Erdener
Senior Member
Join Date: Apr 2010
Location: Turkey
Old 12-31-2012 , 04:54   Re: Start Round
Reply With Quote #7

PHP Code:
#include <amxmodx>

new g_iKor=0;
static    const    
START_MESSAGE[5][]={
    
"This Message",    // Round 1
    
"This Message",    // Round 2
    
"This Message",    // Round 3
    
"This Message",    // Round 4
    
"This Message"    // Round 5
}

public 
plugin_init(){
    
register_event("HLTV""event_new_round""a""1=0""2=0")  
    
register_event("TextMsg""restart_round""a""2=#Game_will_restart_in");
}

public 
event_new_round(id){
    
g_iKor += 1;
    
set_hudmessage(25500, -1.00.010010.0)
    
show_hudmessage(0"%s",START_MESSAGE[g_iKor])
}

public 
restart_round(){
    
g_iKor 0;    
}  
/* AMXX-Studio Notes - DO NOT MODIFY BELOW HERE
*{\\ rtf1\\ ansi\\ deff0{\\ fonttbl{\\ f0\\ fnil Tahoma;}}\n\\ viewkind4\\ uc1\\ pard\\ lang1055\\ f0\\ fs16 \n\\ par }
*/ 
__________________
Erdener is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-31-2012 , 05:41   Re: Start Round
Reply With Quote #8

Previous code gonna generate errors after round 5.

Try this :

PHP Code:
#include <amxmodx>

#define PLUGIN "Round Counter"
#define VERSION "0.0.2"

new g_iRoundIndex 1

new g_pFreezeTime

public plugin_init()
{
    
register_pluginPLUGINVERSION"ConnorMcLeod" )
    
register_event("HLTV""Event_HLTV_New_Round""a""1=0""2=0")
    
register_event("TextMsg""Event_TextMsg_Restart""a""2&#Game_C""2&#Game_w")
    
g_pFreezeTime get_cvar_pointer("mp_freezetime")
}

public 
Event_HLTV_New_Round()
{
    
g_iRoundIndex++

    new 
players[32], num

    get_players
(playersnum"ch")
    if( !
num )
    {
        return
    }

    new 
szSoundCmd[256], id
    num_to_word
(g_iRoundIndexszSoundCmdcharsmax(szSoundCmd))
    
format(szSoundCmdcharsmax(szSoundCmd), "spk ^"vox/round number %s^""szSoundCmd)

    for(--
numnum>=0num--)
    {
        
id players[num]
        if( !
is_user_connecting(id) )
        {
            
client_cmd(idszSoundCmd)
        }
    }

    
set_task(0.1"Task_ShowRoundNumber")
}

public 
Task_ShowRoundNumber()
{
    
set_hudmessage(0100200, .holdtime=floatmax(get_pcvar_float(g_pFreezeTime), 3.0), .channel=-1)
    
show_hudmessage(0"Prepare to Fight - Round %d"g_iRoundIndex)
}

public 
Event_TextMsg_Restart()
{
    
g_iRoundIndex 0

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 12-31-2012 at 05:43.
ConnorMcLeod is offline
bat
Veteran Member
Join Date: Jul 2012
Old 12-31-2012 , 05:53   Re: Start Round
Reply With Quote #9

(facepalm) no round a message Radnom message 1 round "ASdasdas"
2 Round Radnom message "Asdasdasdfasdasdasfgsd"
__________________
bat is offline
Send a message via Skype™ to bat
rastafari
Senior Member
Join Date: May 2011
Old 12-31-2012 , 11:42   Re: Start Round
Reply With Quote #10

PHP Code:
#include <amxmodx>

static    const    START_MESSAGE[5][]={
    
"ASdasdas",//message
    
"Asdasdasdfasdasdasfgsd",//other message
    
"Round started #3",//...
    
"Round started #4",
    
"Round started #5"
}

public 
plugin_init(){
    
register_event("HLTV""event_new_round""a""1=0""2=0")
}

public 
event_new_round(id){
    new 
iRandom=random(4)//Generates a number between 0-4
    
client_print(idprint_center"%s",START_MESSAGE[iRandom])

This?
__________________

Last edited by rastafari; 12-31-2012 at 11:42.
rastafari is offline
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 00:40.


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