Raised This Month: $ Target: $400
 0% 

detect whether round is started


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 11-25-2011 , 06:25   detect whether round is started
Reply With Quote #1

how to check whether the round is started or not ?
__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.
JoKeR LauGh is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 11-25-2011 , 06:30   Re: detect whether round is started
Reply With Quote #2

Code:
new bool:bRoundIsStarted public plugin_init( ) {      register_logevent( "NewRound", 2, "1=Round_Start" )      register_logevent( "RoundEnd", 2, "1=Round_End" ) } public NewRound( ) {      bRoundIsStarted = true } public RoundEnd( ) {      bRoundIsStarted = false }

Last edited by Devil259; 11-25-2011 at 11:27.
Devil259 is offline
JoKeR LauGh
Veteran Member
Join Date: May 2011
Location: Malaysia
Old 11-25-2011 , 07:40   Re: detect whether round is started
Reply With Quote #3

thx ;)
__________________
Quote:
Originally Posted by addons_zz View Post
Also, just to not read `the article`, read all you find. Read and read, for ever and ever. Never stop reading.
Why? Because there is not one single universal truth which holds the meaning for everything.
JoKeR LauGh is offline
raghunarnindi001
Member
Join Date: Apr 2011
Old 11-25-2011 , 07:41   Re: detect whether round is started
Reply With Quote #4

Or you can simply use "hamsandwish" module.....
Ham_CS_RoundRespawn,

but this help you to execute a function on Round Restart

Last edited by raghunarnindi001; 11-25-2011 at 07:42.
raghunarnindi001 is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 11-25-2011 , 07:42   Re: detect whether round is started
Reply With Quote #5

Quote:
Originally Posted by raghunarnindi001 View Post
Or you can simply use "hamsandwish" module.....
He doesn't want to revive a player...
Devil259 is offline
raghunarnindi001
Member
Join Date: Apr 2011
Old 11-25-2011 , 07:53   Re: detect whether round is started
Reply With Quote #6

@Devil259
hamsaandwich does not have only one function "reviving". see the following link

http://www.amxmodx.org/funcwiki.php?go=module&id=24
raghunarnindi001 is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 11-25-2011 , 08:07   Re: detect whether round is started
Reply With Quote #7

Quote:
Originally Posted by raghunarnindi001 View Post
Or you can simply use "hamsandwish" module.....
Ham_CS_RoundRespawn,

but this help you to execute a function on Round Restart
You said Ham_CS_RoundRespawn, that's not what he wants.

Last edited by Devil259; 11-25-2011 at 08:08.
Devil259 is offline
Erox902
Veteran Member
Join Date: Jun 2009
Location: Never Never Land
Old 11-25-2011 , 08:43   Re: detect whether round is started
Reply With Quote #8

@Devil259
The HLTV event is not the right way to detect a round start.
Quote:
Originally Posted by VEN View Post
this event is specified, i.e. is sent to every player, so if there are no players no a server then it's not possible to detect the "New Round" with this method;
this event is also can be the same for the "Round Start" because the value of the "mp_freezetime" server CVar can be equal to the value of the "Time" argument of the "RoundTime" message, so it is not accurate enough. Of course i haven't like that method so i had to think of something more efficient. So some months ago after a little research i've discovered the new method which does not have the issues that is listed above:
PHP Code:
register_event("HLTV""event_new_round""a""1=0""2=0"
Notice the two conditions.
You should use
PHP Code:
register_logevent("roundstart_functionname"2"1=Round_Start"
Erox902 is offline
Devil259
Veteran Member
Join Date: Dec 2009
Location: France (59)
Old 11-25-2011 , 11:27   Re: detect whether round is started
Reply With Quote #9

You're right. Edited.
Devil259 is offline
^SmileY
Veteran Member
Join Date: Jan 2010
Location: Brazil [<o>]
Old 11-26-2011 , 05:26   Re: detect whether round is started
Reply With Quote #10

register_event("HLTV", "round_start", "a", "1=0", "2=0") >> In Really Round_Start


register_logevent("round_start", 2, "1=Round_Start") >> After Freezetime's end.
__________________
Projects:

- See my Git Hub: https://github.com/SmileYzn
PHP Code:
set_pcvar_num(pCvar, !get_pcvar_num(pCvar)); 
^SmileY is offline
Send a message via MSN to ^SmileY Send a message via Skype™ to ^SmileY
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 19:02.


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